text
stringlengths
2.85k
2.55M
label
class label
11 classes
Unique Perfect Phylogeny Characterizations via Uniquely Representable Chordal Graphs arXiv:1305.1375v2 [cs.DM] 8 May 2013 Rob Gysel Department of Computer Science University of California, Davis 1 Shields Avenue, Davis CA 95616, USA [email protected] Abstract. The perfect phylogeny problem is a classic problem in computational biology, where we seek an unrooted phylogeny that is compatible with a set of qualitative characters. Such a tree exists precisely when an intersection graph associated with the character set, called the partition intersection graph, can be triangulated using a restricted set of fill edges. Semple and Steel used the partition intersection graph to characterize when a character set has a unique perfect phylogeny. Bordewich, Huber, and Semple showed how to use the partition intersection graph to find a maximum compatible set of characters. In this paper, we build on these results, characterizing when a unique perfect phylogeny exists for a subset of partial characters. Our characterization is stated in terms of minimal triangulations of the partition intersection graph that are uniquely representable, also known as ur-chordal graphs. Our characterization is motivated by the structure of ur-chordal graphs, and the fact that the block structure of minimal triangulations is mirrored in the graph that has been triangulated. 1 Introduction An X−tree is a pair Tx = (T , φ) where T is a tree and φ is a map from X to the nodes of T , such that every node of T with degree two or one is mapped to by φ. We will call the range of φ the labeled nodes of Tx , and these nodes are labeled by φ. The underlying tree of Tx is T . An X−tree is free if φ is a bijection to the leaves of T , and it is ternary if every internal node of T has degree three. Given A ⊆ X, we will use Tx (A) to denote the minimal subtree of T containing the nodes φ(A). Two subtrees Tx (A) and Tx (A0 ) of T intersect if they have one or more nodes in common, and if v is a common node of Tx (A) and Tx (A0 ) we say that Tx (A) and Tx (A0 ) intersect at v. A partial character for X is a partition χ = A1 |A2 | . . . |Ar of a subset X 0 ⊆ X. Each Ai is called a cell of χ. If Tx (A) and Tx (A0 ) do not intersect for every pair of distinct cells A and A0 of χ, then Tx displays χ. A perfect phylogeny for a set of partial characters C is an X−tree Tx that displays each character in C. When C has a perfect phylogeny, we also say that C is compatible. The perfect phylogeny problem (also called the character compatibility problem) is to determine if a set of partial characters is compatible. (ab, χ1 ) d a u (ac, χ2 ) (de, χ3 ) (ab, χ3 ) (bde, χ2 ) (cd, χ1 ) v e b c (a) Tx (b) int(C) Fig. 1. An X−tree for X = {a, b, c, d, e} and a non-chordal partition intersection graph int(C). The characters C = {χ1 , χ2 , χ3 } are χ1 = ab|cd, χ2 = ac|bde, and χ3 = ab|de. Edges of int(C) are given by solid edges, and the dashed edge represents the fill edge required to obtain the triangulation int(C, Tx ) of int(C). Both χ1 and χ3 are displayed by Tx , but χ2 is not because Tx (ac) and Tx (bde) intersect at u and v. This intersection induces the dashed fill edge of int(C), which breaks χ2 . The edge uv is distinguished by χ1 . The perfect phylogeny problem reduces to a graph theoretical problem that we detail now. Given a set of characters C, one can construct the partition intersection graph int(C) as follows. The vertex set of int(C) is {(A, χ) | χ ∈ C and A is a cell of χ} , and there is an edge between two vertices (A, χ) and (A0 , χ0 ) if and only if A and A0 have non-empty intersection. For a vertex (A, χ) of int(C), A is the cell of (A, χ) and χ is the character of (A, χ). Observe that if χ = A1 |A2 | . . . |Ar is a partial character, then every pair of distinct vertices (A, χ) and (A0 , χ) are non-adjacent in int(C). A graph is chordal if every cycle of length four or more has a chord, that is, an edge between vertices of the cycle that do not appear consecutively in the cycle. In general int(C) is not a chordal graph, and we are interested in adding edges to int(C) to obtain a chordal supergraph H of int(C) that is called a triangulation of int(C). The added edges are called fill edges. If no subset of the fill edges yields a triangulation of int(C), it is a minimal triangulation of int(C). When each fill edge is of the form (A, χ)(A0 , χ0 ) and χ 6= χ0 , the resulting triangulation is a proper triangulation of int(C). The following classic result reduces the question of determining compatibility to finding proper triangulations of the partition intersection graph. It was originally phrased in terms of proper triangulations, but from the definitions it follows that int(C) has a proper triangulation if and only if it has a proper minimal triangulation. Theorem 1. [6, 21, 26] Let C be a set of qualitative characters. Then C is compatible if and only if int(C) has a proper minimal triangulation. ∼ T 0 , if there is a bijective Two X−trees Tx and Tx0 are isomorphic, writing Tx = x 0 map ψ : V (T ) → V (T ) that has the following properties: 2 1. it preserves labels, meaning that φ0 = ψ ◦ φ; and 2. it is a graph isomorphism, that is, uv ∈ E(T ) if and only if ψ(u)ψ(v) ∈ E(T 0 ). A set of characters C defines a perfect phylogeny if it is the unique perfect phylogeny, up to isomorphism, for C. The unique perfect phylogeny problem is to determine if a set C of partial characters defines a perfect phylogeny. If Tx = (T , φ) displays χ and uv is an edge of T such that u is a node of Tx (A) and v is a node of Tx (A0 ) where A and A0 are distinct cells of χ, then uv is distinguished by χ. If every edge of Tx is distinguished by at least one character of C, then Tx is distinguished by C. The following characterization is due to Semple and Steel. Theorem 2. [24] Let C be a set of partial characters on X. Then C defines a perfect phylogeny if and only if the following conditions are satisfied: (a) int(C) has a unique proper minimal triangulation H; and (b) there is a free ternary perfect phylogeny for C and it is distinguished by C. Further, if Tx is the unique perfect phylogeny for C, then Tx is a free ternary X−tree distinguished by C, and int(C, Tx ) = H. This result is the impetus of our current work, and one of our main interests is to re-formulate condition (b) in terms of combinatorial structures that play a significant role in the study of chordal graphs and minimal triangulations. Chordal graphs are characterized by the existence of trees that represent the adjacency structure of the graph. Suppose G is a graph with vertices V (G) = {x1 , x2 , . . . , xn }. A tree representation of G consists of a tree T and subtrees T1 , T2 , . . . , Tn of T such that two trees Ti and Tj intersect if and only if xi and xj are adjacent. Here, the subtrees are in one-to-one correspondence with the vertex set of G, and this correspondence is made explicit by mapping each subtree Ti to the vertex xi of G. Observe that a node v of T defines a clique K(v) = {xi | v is a node of Ti } of G. Notationally, we will write a tree representation as an ordered pair Tr = (T , K) where K maps nodes of T to cliques of G satisfying the following properties: (Edge Coverage) a pair of vertices x and y of G are adjacent if and only if there is a node v of T such that x, y ∈ K(v); and (Convexity) for each vertex x of G, the set of nodes {v ∈ V (T ) | x ∈ K(v)} induces a subtree of T (i.e. a connected subgraph of T ). We will frequently refer to the convexity property throughout the paper. As with X−trees, we will call T the underlying tree of Tr . Often we will define a tree representation by only specifying the underlying tree T and a collection of subtrees of T , which together implicitly define K. Let T1 , T2 , . . . , Tk be a collection of subtrees of T . If each pair Ti , Tj of subtrees intersect at a node vij , then by the Helly property for subtrees of a tree [9], all of T1 , T2 , . . . , Tk intersect at a common node v. This property manifests itself as a statement about cliques of G and nodes of Tr in the following way: for any clique K of G, there is at least one node u of T such that K ⊆ K(u). In 3 particular, this is true when K is a maximal clique of G (i.e. no proper superset is also a clique), and therefore K(V (T )) contains the set of maximal cliques of G. If the maximal cliques of G are in one-to-one correspondence with the nodes of T via K, then Tr is a clique tree of G. See Figure 2 for an example. Theorem 3. [6, 8, 27] The following statements are equivalent. (a) G is a chordal graph. (b) G has a tree representation. (c) G has a clique tree. Observe that if Tr = (T , K) is a clique tree of G and uv is an edge of T , then because K(u) and K(v) are both maximal cliques of G, there is a vertex x of G in K(u) − K(v). In general, a chordal graph has an exponential number of clique trees. An algorithm to enumerate clique trees, along with a formula to count them, appears in [16]. We will often be analyzing a tree representation Tr = (T , K) of a triangulation H of int(C). Given a vertex (A, χ) of int(C), we will denote the subtree of T that it corresponds to by Tr (A, χ). Observe that v is a node of Tr (A, χ) if and only if (A, χ) ∈ K(v). Given a set of characters C on X and an X−tree Tx = (T , φ), a chordal graph int(C, Tx ) is given by adding an edge between two vertices (A1 , χ1 ) and (A2 , χ2 ) if and only if Tx (A1 ) and Tx (A2 ) intersect. This construction, along with the fact that int(C, Tx ) is a triangulation of int(C), is well-known in the phylogenetics literature, and will be discussed in detail in Section 2. A chordal graph G is uniquely representable if it has a single clique tree, or ur-chordal for short. A ur-chordal graph is ternary if each internal node of its clique tree has degree three, and its leafage 1 is the number of leaves its clique tree has. Let H be a proper triangulation of int(C) and Tr = (T , K) be a clique tree of H. An edge uv of Tr is incontractable with respect to χ if there are distinct cells A and A0 of χ such that u ∈ Tr (A, χ) and v ∈ Tr (A0 , χ). We say that Tr is incontractable with respect to C if each edge is incontractable with respect to at least one χ ∈ C. Now we present our first main result. Theorem 4. Suppose C is a set of partial characters on X. Then C defines a perfect phylogeny if and only if the following conditions hold: (a) int(C) has a unique proper minimal triangulation H; (b) H is a ternary ur-chordal graph with leafage |X|; and (c) each edge of H’s unique clique tree is incontractable with respect to C. Further, if Tx is the perfect phylogeny defined by C, then Tx is a free ternary X−tree distinguished by C, and int(C, Tx ) = H. Let C be a set of partial characters on X and χ ∈ C. Suppose H is a triangulation of int(C) with fill edge (A, χ)(A0 , χ) where A and A0 are distinct cells of χ. 1 In general, the leafage of a chordal graph is the minimum number of leaves that a clique tree of the graph can have [19]. 4 Then we say that (A, χ)(A0 , χ) breaks χ, and χ is a broken character of H. For a triangulation H of int(C), its displayed characters are the characters of C that are not broken characters of H. Bordewich, Huber, and Semple [3] proved that it is possible to find a maximum-sized compatible subset of C using the partition intersection graph. Theorem 5. Let C be a set of partial characters on X. Then C 0 is a maximumsized compatible subset of C if and only if there is a triangulation H of int(C) that has C 0 as its displayed characters, and any other triangulation of int(C) has at most |C 0 | displayed characters. A subset of partial characters C 0 ⊆ C is a maximal defining subset of C when C 0 defines a perfect phylogeny, and there is no compatible set C 00 such that C 0 ⊂ C 00 ⊂ C. Our second main result is the following. Theorem 6. Suppose C is a set of partial characters on X and C 0 ⊆ C. Then C 0 is a maximal defining subset of C if and only if the following conditions hold: (a) int(C) has a unique minimal triangulation H that has C 0 as its displayed characters, and no other minimal triangulation of int(C) has at least C 0 as its displayed character set; (b) H is a ternary ur-chordal graph with leafage |X|; and (c) each edge of H’s unique clique tree is incontractable with respect to C 0 . Further, if Tx is the perfect phylogeny defined by C 0 , then Tx is a free ternary X−tree distinguished by C 0 , and int(C, Tx ) = H. 2 Chordal Graph Preliminaries In this section, we detail known results on chordal graphs that are necessary for the remainder of the paper. Suppose G = (V, E) is a graph and S ⊆ V . Let G−S denote the graph obtained from G by removing S and all edges incident to at least one vertex in S. If there are vertices x and y of G that are connected in G but not in G − S, then S is an xy−separator, and if no proper subset of S has this property, it is a minimal xy−separator. When S is a minimal xy−separator for at least one pair of vertices x and y, it is a minimal separator. Minimality in this definition is relative; it is possible to have containment relationships between two minimal separators2 . The maximal connected subsets of G − S are the connected components of G − S. Let C be a connected component of G − S. The neighborhoood of C in G, denoted N (C), is the set of vertices of S that are adjacent to at least one vertex in C. If N (C) = S, then it is a full component of G−S. The following useful characterization of minimal separators is well-known, and left as an exercise in [9]. 2 Dirac [7] called these sets relatively minimal cut-sets, which is perhaps more descriptive, but this term has stuck of the modern literature on chordal graphs and minimal triangulations. 5 K(v) v (b) Tr (a) G Fig. 2. A chordal graph G and clique tree Tr = (T , K) of G. There are three clique trees for G, one of which is obtained by removing the bottom-leftmost node and its incident edge, and then attaching it to v. The maximal clique map K is defined by the triangle drawn inside each node. Arrows indicate vertices that consist of the intersection of a neighboring node’s maximal clique, and each such intersection is a minimal separator by Theorem 7. Lemma 1. Let G = (V, E) be a graph, and S ⊆ V . Then S is a minimal separator if and only if G − S has two or more full components. A minimal separator has multiplicity k if G − S has k − 1 full components. Interestingly, clique trees contain detailed information about the minimal separators of the graph it represents, which will be useful for our proofs in later sections. Theorem 7. [16, 20] Suppose G = (V, E) is a chordal graph, Tr = (T , K) is a clique tree of G, and S ⊆ V . Then S is a minimal separator of G if and only if there is an edge uv of T such that S = K(u) ∩ K(v)3 . Further, the multiplicity of S is the number of edges of T with this property. We will not need all of the following characterizations of ur-chordal graphs, but we list them for completeness. Theorem 8. [14, 18] Let G be a chordal graph. Then the following statements are equivalent. a) G is uniquely representable. b) If S is a minimal separator of G, then there are exactly two maximal cliques K and K 0 of G such that S ⊆ K, K 0 . c) Each minimal separator of G has multiplicity one. 3 This theorem also implies that a minimal separator of a chordal graph is a clique. In fact, chordal graphs are characterized by having only clique minimal separators, which is one of the earliest results on chordal graphs [7]. 6 d) There is no minimal separator of G that properly contains another minimal separator of G. e) The number of minimal separators of G is the number of maximal cliques of G minus one. Chordal graphs can be recognized in linear time [2], and the maximal cliques and minimal separators of a chordal graph may be computed in linear time [1]. Using property e) of Theorem 8, this allows the recognition of ur-chordal graphs in linear time. 3 X−trees, Clique Trees, and Tree Representations In this section, we define two operations to facilitate the discussion between X−trees and tree representations, and prove or state results that will be useful in later sections. Both operations are commonly used in the literature (see [24,26]), but do not seem to be named as we will do here. The results in this section will be useful for proving our characterization for maximal defining subsets. Given a set of characters C on X and an X−tree Tx = (T , φ), construct the chordal graph int(C, Tx ) having: • vertex set identical to that of int(C); and • an edge between (A, χ) and (A0 , χ0 ) if and only if Tx (A) and Tx (A0 ) intersect. This graph has a tree representation Tr with underlying tree T and subtrees obtained by defining Tr (A, χ) = Tx (A) for each vertex (A, χ) of int(C). Therefore int(C) is chordal by Theorem 3. Each edge (A1 , χ1 )(A2 , χ2 ) of int(C) has cells A1 and A2 that share at least one member of X, say a, so Tx (A1 ) and Tx (A2 ) intersect at φ(a). Therefore Tr (A1 , χ1 ) and Tr (A2 , χ2 ) intersect at φ(a) as well, so (A1 , χ1 )(A2 , χ2 ) is an edge of int(C, Tx ) by subtree intersection. Hence each edge of int(C) is also an edge of int(C, Tx ), so int(C, Tx ) is a triangulation of int(C). We will say that Tx derives the tree representation Tr = (T , K) of int(C, Tx ) and Tr is derived from Tx . In general, Tr is not a clique tree. Observation 1 Let C be a set of partial characters on X, Tx be an X−tree, and Tr be the tree representation induced by Tx . Then the underlying tree of Tr is the underlying tree of Tx , and for all χ ∈ C and cells A of χ, Tx (A) = Tr (A, χ). Further, int(C, Tx ) is a triangulation of int(C). Lemma 2. Let C be a set of partial characters on X, and Tx be an X−tree that displays C 0 ⊆ C. Suppose that each edge of Tx is distinguished by C 0 . Then the tree representation of int(C, Tx ) derived from Tx is a clique tree of int(C, Tx ). Proof. Let Tr = (T , K) be the tree representation of int(C, Tx ) derived from Tx . For the sake of contradiction, assume that Tr is not a clique tree, so that K is not a one-to-one map between the nodes of T and the maximal cliques of int(C, Tx ). Then there must be nodes u and v of T such that K(v) ⊆ K(u). Let v 0 be the 7 (ab, χ1 ) (ac, χ2 ) (cd, χ1 ) (de, χ3 ) (bde, χ2 ) (ab, χ3 ) Fig. 3. The tree representation Tr of int(C, Tx ) derived from Tx in Figure 1.a. The triangulation int(C, Tx ) of int(C) is depicted in Figure 1.b; note that any two subtrees of Tr intersect precisely when the corresponding vertices of int(C, Tx ) are adjacent. Observe that Tr is not a clique tree; for example, the two left-most nodes map to nonmaximal cliques. Additionally, there are two nodes that map to the maximal clique {(cd, χ1 ), (bde, χ2 ), (de, χ3 )}. Obtaining a clique tree from a tree representation is described in [8]. closest node to v between u and v in T , allowing the possibility that v 0 = u. Note that each vertex in K(v) is also a vertex of K(v 0 ) by convexity, so K(v) ⊆ K(v 0 ). Now, vv 0 is distinguished by some χ ∈ C 0 , so there are distinct cells A and A0 of χ such that v is a node of Tx (A) and v 0 is a node of Tx (A0 ). By Observation 1, v is a node of Tr (A, χ), so (A, χ) ∈ K(v) and by containment (A, χ) ∈ K(v 0 ). Further, (A0 , χ) ∈ K(v 0 ), so (A, χ)(A0 , χ) is a fill edge of int(C, Tx ) and it breaks χ. This contradicts the assumption that Tx displays C 0 , so Tr must be a clique tree of int(C, Tx ). t u Lemma 3. Let C be a set of partial characters on X and Tx be an X−tree that displays C 0 ⊆ C. Suppose that Tx is free, ternary, and each edge of Tx is distinguished by C 0 . Then int(C, Tx ) is uniquely representable. Proof. To prove that int(C, Tx ) is uniquely representable, we use Theorem 8 and show that there are no containment relationships between the minimal separators of int(C, Tx ). Working towards a contradiction, assume that S ⊂ S 0 are minimal separators of int(C, Tx ), and let Tr = (T , K) be the tree representation derived from Tx . Then Tr is a clique tree by Lemma 2, and there are edges uv and u0 v 0 of T such that S = K(u) ∩ K(v) and S 0 = K(u0 ) ∩ K(v 0 ) by Theorem 7. Without loss of generality, assume that the path from v to v 0 does not contain either u or u0 (perhaps v = v 0 ). Let w be the node on this path adjacent to v if v 6= v 0 , otherwise let w = u0 . In either case, K(w) contains S: if w = u0 , then S ⊆ K(w). Otherwise, each (A, χ) in S is an element of both K(u) and K(u0 ), so (A, χ) ∈ K(w) by convexity, and S ⊆ K(w). To complete the proof, we will obtain a contradiction by showing that S has a vertex not in K(w). There is a character χ0 in C 0 that distinguishes wv, and distinct cells A0 and A00 of χ0 such that v is a node of Tx (A0 ) and w is a 8 node of Tx (A00 ). Now, v has at least two neighbors, and because Tx is ternary, v must have degree three. Also, v is not mapped to by φ because Tx is free, so in order for v to be a node of Tx (A0 ), there must be at least two nodes of Tx in φ(A0 ) that are not v, and the path between these two nodes must contain v. This path must also contain two of v’s neighbors, and neither of these vertices can be w, because w is not a node of Tx (A0 ). Thus u must be on this path, so it is a node of Tx (A0 ). Both K(u) and K(v) contain (A0 , χ0 ) by Observation 1, so it must be a vertex of S = K(u)∩K(v). Further, (A0 , χ0 ) ∈ / K(w) because w is not a node of Tx (A0 ) = Tr (A0 , χ0 ). This is impossible because we have shown that both (A0 , χ0 ) ∈ S − K(w) and S ⊆ K(w). Thus there are no containment relationships between the minimal separators of int(C, Tx ), and int(C, Tx ) is uniquely representable by Theorem 8. t u Lemma 4. [3] Let C be a set of partial characters on X, Tx an X−tree, and C 0 be the subset of C displayed by Tx . Then int(C, Tx ) is a triangulation of int(C) in which the displayed characters are C 0 . The previous three lemmas can be summarized as follows. Theorem 9. Let C be a set of partial characters on X and Tx be an X−tree that displays C 0 ⊆ C. Suppose that Tx is free, ternary, and each edge of Tx is distinguished by C 0 . Then int(C, Tx ) is a uniquely representable chordal graph, and the tree representation derived from Tx is its unique clique tree. Further, the displayed characters of int(C, Tx ) are exactly C 0 . Now suppose that Tr = (T , K) is a clique tree of a triangulation H of int(C), with the goal of defining an X−tree Tx . The discussion we provide here is standard, e.g. see [3,25]. Construct a map φ from X to T by defining, for each a ∈ X, φ(a) = v if and only if K(v) contains every vertex of int(C) whose cell contains a. These vertices form a clique because a is contained in each of their cells. Because we have only added fill edges to obtain H, this clique a subset of a maximal clique of H, and hence v exists. There may be more than one choice for v, each of which we call a candidate node for a. Let u be a leaf of T with neighbor w. Then K(u) is a maximal clique that contains a vertex (A, χ) of int(C) that is not found in K(w). By convexity, u is the only node of T whose corresponding maximal clique contains (A, χ). Each a0 ∈ A has u as its unique candidate node, and hence every leaf of T is a unique candidate node for at least one element of X. Thus each leaf of T must be labeled by φ. To finish constructing an X−tree, obtain T 0 by suppressing any unlabeled nodes of T that have degree two. The result is an X−tree Tx = (T 0 , φ), and we say that Tr induces Tx and Tx is induced by Tr . We emphasize that the underlying tree of Tx need not be the same as the underlying tree of Tr . Note that, because an element of X may have multiple candidate nodes, Tr may induce multiple X−trees. Next, we show that when H is a minimal triangulation, much of Tx ’s structure is described by Tr . The following lemma will be useful. Lemma 5. [17, 22] Let G be a graph and H be a minimal triangulation of G. If uv is a fill edge of H, then there is a minimal separator of H that contains both u and v. 9 ab c de (a) Tr0 (b) Tx0 Fig. 4. A clique tree Tr0 of int(C, Tx ) from Figure 1.b and an X−tree Tx0 induced by Tr0 . Note that int(C, Tx0 ) = int(C, Tx ), where Tx is the X−tree from Fig. 1.a. Though not stated in this form, the following lemma follows from the proof of Lemma 2.4 and the statement of Corollary 2.5 in [24]. Lemma 6. Let H be a minimal triangulation of int(C), and suppose Tx is induced by a clique tree of H. Then H = int(C, Tx ). Lemma 7. Let H be a minimal triangulation of int(C), Tr = (T , K) be a clique tree of H, and suppose Tr induces Tx . Then the underlying tree of Tx is T . Proof. We have already seen that every leaf of T is the unique candidate node of some element of X. In addition to this, it was also shown in [13] that if u is a node of Tr of degree two, then u is the unique candidate node of some element of X. This was done by showing that K(u) contains either: 1. a vertex (A1 , χ1 ) of int(C) that is not contained in K(w) for any other node w 6= u of T ; or 2. an edge (A2 , χ2 )(A3 , χ3 ) of int(C), whose incident vertices have cells with non-empty intersection, and are not both contained in K(w) for any other node w 6= u of T . For completeness, we outline a proof here. Using convexity and the fact that u has degree two, it follows that either a unique vertex or unique pair of vertices are contained in K(u). It remains to show that (A2 , χ2 )(A3 , χ3 ) is actually an edge of int(C) (so A2 ∩ A3 is non-empty). If not, then by Lemma 5 there is a minimal separator S of H containing both (A2 , χ2 ) and (A3 , χ3 ). By Theorem 7, there is an edge u1 u2 of T such that S = K(u1 ) ∩ K(u2 ). But this contradicts case 2, so it must be that (A2 , χ2 )(A3 , χ3 ) is an edge of int(C). In both cases, u is the unique candidate node of some element in X (this element is either a ∈ A1 or a ∈ A2 ∩ A3 ), so every degree two node of T is labeled by φ, and there are no nodes of T that need to be suppressed. Hence the underlying tree of Tx is T . t u 10 Lemma 8. Let H be a minimal triangulation of int(C), Tr = (T , K) be a clique tree of H, and suppose Tr induces Tx . Then for each vertex (A, χ) of int(C), Tx (A) = Tr (A, χ). Proof. Let (A, χ) be a vertex of int(C) and consider a node v of Tx (A). Either v = φ(a) for some a ∈ A or v lies between φ(a1 ) and φ(a2 ) for some a1 , a2 ∈ A. In the first case, (A, χ) ∈ K(v) because v is a candidate node for a. Similarly, in the second case, (A, χ) is an element of both K(φ(a1 )) and K(φ(a2 )), and therefore (A, χ) ∈ K(v) by convexity. In both cases v is a node of Tr (A, χ), so Tx (A) ⊆ Tr (A, χ). To finish proving equality, suppose that Tx (A) ⊂ Tr (A, χ). Define a tree representation Tr0 = (T 0 , K0 ) of a graph H 0 as follows: set T 0 = T , and define subtrees Tr0 (A0 , χ0 ) of T for each vertex (A0 , χ0 ) of int(C) as follows: 1. Tr0 (A0 , χ0 ) = Tr (A0 , χ0 ) if (A0 , χ0 ) 6= (A, χ), and 2. Tr0 (A0 , χ0 ) = Tx (A) if (A0 , χ0 ) = (A, χ). We have already seen that Tr0 (A0 , χ0 ) ⊆ Tr (A0 , χ0 ) for every vertex (A0 , χ0 ) of int(C), so the edge set of H 0 is a subset of the edge set of H. If (A1 , χ1 )(A2 , χ2 ) is an edge of int(C), then A1 and A2 have at least one element a in common, and thus Tx (A1 ) and Tx (A2 ) intersect at φ(a). Further, Tx (A0 ) ⊆ Tr0 (A0 , χ0 ) for each vertex (A0 , χ0 ) of int(C), so Tr0 (A1 , χ1 ) and Tr0 (A2 , χ2 ) also intersect at φ(a). Therefore (A1 , χ1 )(A2 , χ2 ) is an edge of H 0 , and H 0 is chordal by Theorem 3, so it is a triangulation of int(C). To complete the proof, we show that H 0 must have an edge that does not exist in H. Because Tx (A) ⊂ Tr (A, χ), there is a node u of Tr (A, χ) − Tx (A) that is adjacent to a node w of Tx (A) = Tr0 (A, χ). By maximality, there is a vertex (A0 , χ0 ) ∈ K(u) − K(w), and because u is a node of Tr (A, χ), (A, χ) ∈ K(u). Therefore (A0 , χ0 )(A, χ) is an edge of H. The situation in H 0 is different: if (A0 , χ0 )(A, χ) is an edge of H 0 , then Tr0 (A, χ) and Tr0 (A0 , χ0 ) intersect at a node v 0 . But if v 0 is a node of Tr0 (A, χ), then w is on the path from v 0 to u, and by convexity this would imply that (A0 , χ0 ) ∈ K(w). Hence (A0 , χ0 )(A, χ) is not an edge of H 0 , so the edge set of H 0 is a proper subset of the edge set of H. This is impossible because H is a minimal triangulation of int(C), so it must be that Tx (A) = Tr (A, χ) for each vertex (A, χ) of int(C). t u Lemmas 6, 7, and 8 are summarized below. Theorem 10. Let H be a minimal triangulation of int(C), Tr be a clique tree of H, and suppose Tr induces Tx . Then the underlying tree of Tx is the underlying tree of Tr , and for each vertex (A, χ) of int(C), Tx (A) = Tr (A, χ). Further, H = int(C, Tx ). 4 Maximal Defining Subsets of Characters This section is devoted to the proof of Theorem 6. Its proof will follow mainly from Propositions 1 and 2. Recall that, for a graph H and a subset U of its 11 vertices, the graph H − U is obtained by removing the vertices in U and edges of H incident to one or more vertices of U . Lemma 9. Let C be a set of partial characters and C 0 ⊆ C. Suppose H 0 is a minimal triangulation of int(C 0 ), and let U be the vertices of int(C) that are not vertices of int(C 0 ). Then there is a minimal triangulation H of int(C) such that H0 = H − U . Proof. Let H 0 be a minimal triangulation of int(C 0 ) and H ∗ be the graph obtained by adding the following fill edges to int(C): 1. the fill edges of H 0 ; and 2. fill edges of the form (A, χ)(A0 , χ0 ) where (A, χ) is a vertex of U , and (A0 , χ0 ) is any vertex of int(C). First we prove that H ∗ is chordal, and then we will use it to construct H, a minimal triangulation of int(C) such that H − U = H 0 . Let (A1 , χ1 ), (A2 , χ2 ), . . . , (Ak , χk ) be a cycle in H ∗ . If χi ∈ C 0 for all i = 1, 2, . . . , k, then this cycle is also a cycle of H 0 , and therefore has a chord that is an edge of H 0 . Each edge of H 0 is also an edge of H ∗ , so this cycle has a chord in H ∗ . Otherwise, without loss of generality, χ1 ∈ C − C 0 and (A1 , χ1 ) ∈ U so either (A1 , χ1 )(A3 , χ3 ) is an edge of int(C) or is a fill edge of H ∗ of type 2. In either case, this cycle has a chord, so H ∗ is chordal. Now let H be any minimal triangulation of int(C) such that the edge set of H is a subset of the edge set of H ∗ . Every edge of H − U is either an edge of int(C 0 ) or is an edge of H 0 by the construction of H ∗ and H. Therefore the edge set of H − U is a subset of the edge set of H 0 . Further, H − U is chordal because any cycle of H − U is a cycle of H (i.e. chordality is inherited [23]), so it is a triangulation of int(C 0 ). By minimality of H 0 , it must be that the edge set of H − U is equal to the edge set of H 0 , so H 0 = H − U . t u Lemma 10. [12] see also [3] Let C be a set of partial characters on X and suppose that C 0 is a compatible subset of C. Then there is a minimal triangulation of int(C) whose displayed characters are at least C 0 . Though not stated in this form, the following lemma is a direct result of Lemma 5.1 in [3] and its proof. Lemma 11. Let C be a set of partial characters on X. Suppose H is a triangulation of int(C) with displayed characters C 0 . Then if Tx is induced by a clique tree of H, it is a perfect phylogeny for C 0 . Proposition 1. Let C be a set of partial characters on X and C 0 ⊆ C. Suppose that the following conditions hold: (i) int(C) has a unique minimal triangulation H that has C 0 as its displayed characters, and no other minimal triangulation of int(C) has at least C 0 as its displayed character set; (ii) H is a ternary ur-chordal graph with leafage |X|; and 12 (iii) each edge of H’s unique clique tree is incontractable with respect to C 0 . Then C 0 is a maximal defining subset of C. Proof. We begin by showing that C 0 has a unique perfect phylogeny using Theorem 2, and finish the proof showing that no superset of C 0 has a unique perfect phylogeny. Throughout the proof, H will denote the unique minimal triangulation of int(C) given by (i) whose displayed character set is C 0 . By Lemma 11, C 0 has a perfect phylogeny so it is compatible. There is a proper triangulation of int(C 0 ) by Theorem 1, so int(C 0 ) has a proper minimal triangulation as well. To see that condition (a) of Theorem 2 holds, suppose that H10 and H20 are proper minimal triangulations of int(C 0 ) given by Theorem 1, and let U be the set of vertices of int(C) not in int(C 0 ). By Lemma 9, there are minimal triangulations H1 and H2 of int(C) that satisfy H10 = H1 −U and H20 = H2 −U . The displayed characters of H1 and H2 must be at least C 0 , because any fill edge that breaks a character of C 0 would also appear in H10 or H20 , and both H10 and H20 are proper triangulations of int(C 0 ). By (i), we have H1 = H = H2 . Therefore H10 = H − U = H20 , so condition (a) of Theorem 2 is satisfied with respect to C 0 . Now we show condition (b) of Theorem 2 holds. Let Tr be the unique clique tree of H given by (ii), and suppose Tx is the X−tree induced by Tr . Tx displays C 0 by Lemma 11, and by Theorem 10 the underlying tree T of Tr is also the underlying tree of Tx . Further, T is ternary and has |X| leaves by (ii), so Tx must be free and ternary. To see that Tx is distinguished by C 0 , consider an edge uv of T . By (iii) uv is incontractible with respect to C 0 , so there is a character χ ∈ C 0 and distinct cells A and A0 of χ such that u is a node of Tr (A, χ) and v is a node of Tr (A0 , χ). But Tx (A) = Tr (A, χ) and Tx (A0 ) = Tr (A0 , χ) by Theorem 10, so χ distinguishes uv. Hence condition (b) of Theorem 2 also holds with respect to C 0 , so C 0 defines Tx . Last, we show that no proper superset of C 0 also defines an X−tree. If any superset C ∗ of C 0 was compatible, then by Lemma 10 some minimal triangulation of int(C) has at least C ∗ as its displayed character set. This would contradict (i), so no such superset can exist. This completes the proof. t u Lemma 12. Suppose C 0 is a maximal defining subset of C, and H, H 0 are minimal triangulations of int(C) with C 0 as its displayed character set. Then H = H 0 . Proof. Let Tx be an X−tree induced by a clique tree Tr of H and Tx0 be an X−tree induced by a clique tree Tr0 of H 0 . By Lemma 11, Tr and Tr0 are perfect phylogenies for C 0 , and because C 0 defines an X−tree it must be that Tx ∼ = Tx0 via isomorphism ψ. Additionally, for each vertex (A, χ) of int(C) we have Tr (A, χ) = Tx (A) and Tr0 (A, χ) = Tx0 (A) by Theorem 10. To prove that H = H 0 , it suffices to show that their fill edge sets are the same. Suppose that (A1 , χ1 )(A2 , χ2 ) is a fill edge of H. By the edge coverage property of clique trees, Tr (A1 , χ1 ) and Tr (A2 , χ2 ) intersect at a node v of T . We will show that Tr0 (A1 , χ1 ) and Tr0 (A2 , χ2 ) intersect at ψ(v). If there is an a ∈ A1 such that φ(a) = v, then ψ(v) = φ0 (a) is a node of Tx0 (A1 ) = Tr0 (A1 , χ1 ). Otherwise 13 there are a1 , a2 ∈ A1 and v is an internal node on the path from φ(a1 ) = v1 to φ(a2 ) = v2 . Because ψ is a graph isomorphism, ψ(v) is an internal node on the path from ψ(v1 ) to ψ(v2 ). Further, ψ(v1 ) and ψ(v2 ) are nodes of Tx0 (A1 ) = Tr0 (A1 , χ1 ), so ψ(v) is a node of Tr0 (A1 , χ1 ) as well. In both cases ψ(v) is a node of Tr0 (A1 , χ1 ), and a similar argument shows that ψ(v) is a node of Tr0 (A2 , χ2 ). Therefore Tr0 (A1 , χ1 ) and Tr0 (A2 , χ2 ) intersect at ψ(v), so (A1 , χ1 )(A2 , χ2 ) is a fill edge of H 0 , and the fill edge set of H is a subset of the fill edge set of H 0 . A symmetric argument shows that the fill edge set of H is a subset of the fill edge set of H 0 , so these fill edge sets must be equal, completing the proof. t u Proposition 2. Let C be a set of partial characters on X and C 0 be a maximal defining subset of C. Then the following conditions hold: (i) int(C) has a unique minimal triangulation H that has C 0 as its displayed characters, and no other minimal triangulation of int(C) has at least C 0 as its displayed character set; (ii) H is a ternary ur-chordal graph with leafage |X|; and (iii) each edge of H’s unique clique tree is incontractable with respect to C 0 . Further, if C 0 defines Tx , then int(C, Tx ) = H. Proof. To see that (i) holds, first observe that C 0 is compatible by definition. There is a minimal triangulation H1 of int(C) with at least C 0 as its displayed character set by Lemma 10. Because C 0 is a maximal defining subset of C, there is no C 0 ⊂ C ∗ ⊆ C that is compatible. By Lemma 11, the displayed characters of H1 are compatible, so this set must be exactly C 0 . This is true of any minimal triangulation of int(C) that has at least C 0 as its displayed characters. If H2 is such a minimal triangulation, then H1 = H2 by Lemma 12, so there is a unique minimal triangulation of int(C) that has at least C 0 as its displayed characters. We will refer to this unique minimal triangulation as H in the remainder of the proof. Now we show that (ii) holds. Let Tx be the X−tree induced by a clique tree of H. By Lemma 11, Tx is a perfect phylogeny for C 0 , and since C 0 is a maximal defining subset it must be that C 0 defines Tx . Recall that Tx is free, ternary, and distinguished by C 0 according to Theorem 2. By Theorem 9, int(C, Tx ) is urchordal. On the other hand, H = int(C, Tx ) by Theorem 10, so H is ur-chordal as well. By the same theorem, H’s unique clique tree has the same underlying tree as Tx . Since Tx is ternary, this clique tree must also be ternary, so H is a ternary ur-chordal graph. This proves statement (ii). Now consider condition (iii), and let uv be an edge of T . By Theorem 2 the edge uv is distinguished by C 0 , so there is a character χ ∈ C 0 that has cells A 6= A0 and u is a node of Tx (A) and v is a node of Tx (A0 ). From Theorem 10 we see that Tx (A) = Tr (A, χ) and Tx (A0 ) = Tr (A0 , χ), so uv is incontractable with respect to C 0 . Hence Tr is incontractable with respect to C 0 . The remainder of the theorem was shown while proving (ii) holds. t u Proof of Theorem 6. Propositions 1 and 2 show that C 0 is a maximal defining subset of C if and only if conditions (a) – (c) hold. The fact that Tx is free, 14 ternary, and distinguished by C 0 follows by Theorem 2. Finally, int(C, Tx ) = H due to Proposition 2. t u Proof of Theorem 4. Use Theorem 6, taking C 0 = C. 5 t u Discussion We conclude with a brief discussion on the role minimal separators play in minimal triangulation theory [15], and how our characterization may contribute towards constructing an algorithm that sometimes finds a maximal defining subset of characters when one exists. Minimal triangulations have been characterized by their minimal separators, which happen to be minimal separators of the triangulated graph as well [17, 22]. Further, a minimal separator of a minimal triangulation has connected components (and full components) that are identical in the graph that has been triangulated [15]. Bouchitté and Todinca [4, 5] used minimal separators and potential maximal cliques, the maximal cliques of minimal triangulations, to create a dynamic programming algorithm to solve the treewidth and minimum-fill problems in time polynomial in the number of minimal separators of a graph. This approach was extended to create a dynamic programming algorithm that solves a variety perfect phylogeny problems in [11], including the unique perfect phylogeny problem. Our results elucidate the structure of minimal separators of triangulations associated with maximal defining subsets of characters. This structure is retained in the partition intersection graph, and is closely related to the structure of potential maximal cliques, because the connected components obtained by removing the vertices in a potential maximal clique have neighborhoods that are minimal separators [4]. This may allow for the computation of a ternary ur-chordal minimal triangulation in time polynomial in the number of minimal separators of int(C) (or asserting that no ternary ur-chordal minimal triangulations exist), yielding a candidate subset C 0 of C that may be a maximal subset of characters. The number of minimal separators of int(C 0 ) is bounded by the number of minimal separators of int(C) (this is a specific example of a more general fact; see Corollary 4 in [5]). Therefore if it is computationally feasible to find C 0 due to int(C) having a small number of minimal separators, checking if C 0 defines a perfect phylogeny using the method from [11] may also be feasible. 6 Acknowledgements This research was partially supported by NSF grants IIS-0803564 and CCF1017580. 15 References 1. Anne Berry and Romain Pogorelcnik. A simple algorithm to generate the minimal separators and the maximal cliques of a chordal graph. Information Processing Letters, 111(11):508–511, 2011. 2. J.R.S. Blair and B.W. Peyton. An introduction to chordal graphs and clique trees. In J.A. George, J.R. Gilbert, and J.W-H. Liu, editors, Graph Theory and Sparse Matrix Computations, volume 56 of IMA Volumes in Mathematics and its Applications, pages 1–27. Springer–Verlag. 3. M. Bordewich, K.T. Huber, and C. Semple. Identifying phylogenetic trees. Discrete Mathematics, 300(1–3):30–43, 2005. 4. V. Bouchitté and I. Todinca. Treewidth and minimum fill-in: grouping the minimal separators. SIAM Journal on Computing, 31(1):212–232, 2001. 5. V. Bouchitté and I. Todinca. Listing all potential maximal cliques of a graph. Theoretical Computer Science, 276(1-2):17–32, 2002. 6. P. Buneman. A characterisation of rigid circuit graphs. Discrete Mathematics, 9(3):205–212, 1974. 7. G.A. Dirac. On rigid circuit graphs. Abhandlungen aus dem Mathematischen Seminar der Universität Hamburg, 25(1–2):71–76, 1961. 8. F. Gavril. The intersection graphs of subtrees in trees are exactly the chordal graphs. Journal of Combinatorial Theory, 16(1):47–56, 1974. 9. M.C. Golumbic. Algorithmic graph theory and perfect graphs. Elsevier Science, 2nd edition edition, 2004. 10. Dan Gusfield. The multi–state perfect phylogeny problem with missing and removable data: solutions via integer–programming and chordal graph theory. Journal of Computational Biology, 17(3):383–399, 2010. 11. R. Gysel. Potential maximal clique algorithms for perfect phylogeny problems. Pre-print: arXiv, 1303.3931. 12. R. Gysel and D. Gusfield. Extensions and improvements to the chordal graph approach to the multistate perfect phylogeny problem. IEEE/ACM Transactions on Computational Biology and Bioinformatics, 8(4):912–917, 2011. 13. R. Gysel, F. Lam, and D. Gusfield. Constructing perfect phylogenies and proper triangulations for three–state characters. Algorithms for Molecular Biology, 7:26, 2012. 14. H. Hara and A. Takemura. Boundary cliques, clique trees and perfect sequences of maximal cliques of a chordal graph. Technical Report METR 2006-41, Department of Mathematical Informatics, University of Tokyo, 2006. 15. P. Heggernes. Minimal triangulations of graphs: a survey. Discrete Mathematics, 306(3):297–317, 2006. 16. C. Ho and R.C.T. Lee. Counting clique trees and computing perfect elimination schemes in parallel. Information Processing Letters, 31(2):61–68, 1989. 17. T. Kloks, D. Kratsch, and J. Spinrad. On treewidth and minimum fill-in of asteroidal triple-free graphs. Theoretical Computer Science, 175(2):309–335, 1997. 18. P.S. Kumar and C.E.V. Madhavan. Clique tree generalization and new subclasses of chordal graphs. Discrete Applied Mathematics, 117(1–3):109–131, 2002. 19. I.J. Lin, T.A. McKee, and D.B. West. The leafage of a chordal graph. Discussiones Mathematicae Graph Theory, 18:23–48, 1998. 20. T.A. McKee and F.R. McMorris. Topics in Intersection Graph Theory. Number 2 in SIAM Monographs on Discrete Mathematics and Applications. 1999. 16 21. C.A. Meacham. Theoretical and computational considerations of the compatibility of qualitative taxonomic characters. In J. Felsenstein, editor, Numerical Taxonomy, volume 1 of NATO ASI Series G, pages 304–314. Springer–Verlag, 1983. 22. A. Parra and P. Scheffler. Characterizations and algorithmic applications of chordal graph embeddings. Discrete Applied Mathematics, 79(1–3):171–188, 1997. 23. D.J. Rose. Triangulated graphs and the elimination process. Journal of Mathematical Analysis and Applications, 32(3):597–609, 1970. 24. C. Semple and M. Steel. A characterization for a set of partial partitions to define an X -tree. Discrete Mathematics, 247(1–3):169–186, 2002. 25. C. Semple and M. Steel. Phylogenetics. Oxford Lecture Series in Mathematics and Its Applications. Oxford University Press, 2003. 26. M. Steel. The complexity of reconstructing trees from qualitative characters and subtrees. Journal of Classification, 9(1):91–116, 1992. 27. J.R. Walter. Representations of chordal graphs as subtrees of a tree. Journal of Graph Theory, 2(3):265–267, 1978. 17
5cs.CE
arXiv:1604.01551v1 [math.AC] 6 Apr 2016 Stably co-tame polynomial automorphisms over commutative rings Shigeru Kuroda∗ Abstract We say that a polynomial automorphism φ in n variables is stably co-tame if the tame subgroup in n variables is contained in the subgroup generated by φ and affine automorphisms in n + 1 variables. In this paper, we give conditions for stably co-tameness of polynomial automorphisms. 1 Introduction Let R be a commutative ring of characteristic p 6= 1, R[x] := R[x1 , . . . , xn ] the polynomial ring in n variables over R, and GAn (R) := AutR R[x] the automorphism group of the R-algebra R[x]. We identify each φ ∈ GAn (R) with the n-tuple (φ(x1 ), . . . , φ(xn )) of elements of R[x]. The composition is defined by φ ◦ ψ = (g1 (f1 , . . . , fn ), . . . , gn (f1 , . . . , fn )) (1.1) for φ = (f1 , . . . , fn ), ψ = (g1 , . . . , gn ) ∈ R[x]n . For each r ≥ 1, we regard GAn (R) as a subgroup of GAn+r (R) by identifying each φ ∈ GAn (R) with the unique extension φ̃ ∈ GAn+r (R) of φ defined by φ̃(xn+i ) = xn+i for i = 1, . . . , r. We say that φ ∈ GAn (R) is affine if φ = (x1 , . . . , xn )A + b for some A ∈ GLn (R) and b ∈ Rn , and set Aff n (R) := {φ ∈ GAn (R) | φ is affine}. We define ǫ(f ) := (x1 + f, x2 , . . . , xn ) ∈ GAn (R) for each f ∈ R[x̂] := R[x2 , . . . , xn ], and set En (R) := {ǫ(f ) | f ∈ R[x̂]}. We call Tn (R) := hAff n (R), En (R)i the tame subgroup, and elements of Tn (R) are said to be tame. Here, ∗ Partly supported by JSPS KAKENHI Grant Number 15K04826 1 for subsets S1 , . . . , Sr and elements g1 , . . . , gs of a group S G, we denote by hS1 , . . . , Sr , g1 , . . . , gs i the subgroup of G generated by ri=1 Si ∪ {g1 , . . . , gs }. If n ≥ 3 and R contains Q, then Tn (R) = hAff n (R), σi holds for σ = ǫ(x22 ) by Derksen (cf. [Es, Thm. 5.2.1]). We remark that Derksen’s theorem requires that R is generated by R∗ as a Q-vector space, but this assumption is in fact unnecessary (cf. §3). When R is a field and p = 0, Bodnarchuk [B] proved a similar result for more general σ’s. The situation is different if p is a prime. Maubach-Willems [MW] showed that T3 (F2 ) 6= hAff 3 (F2 ), ǫ(x22 )i, and conjectured that, if n ≥ 3 and R is a finite field, then no finite subset E of Tn (R) satisfies Tn (R) = hAff n (R), Ei. Edo [Ed] found a class of φ ∈ GAn (R) for which hAff n (R), φi contains (R). Such φ is said to be co-tame. If R is a field, no element of GA2 (R) Tn is co-tame thanks to Jung [J] and van der Kulk [K]. For n ≥ 3, it is easy to find elements of GAn (R) \ Aff n (R) which are not co-tame if R is not a field (cf. (4.1)), or if p is a prime (cf. [EK, §1 (d)]). In the case where n ≥ 3, R is a field and p = 0, the first example of such an automorphism was found by Edo-Lewis [EL] for n = 3. Recall that φ ∈ GAn (R) is said to be stably tame if φ belongs to Tn+1 (R). It is known that some non-tame automorphisms are stably tame (cf. [BEW], [N], [SU], [S]). The following is an analogue to the stably tame automorphisms. Definition 1.1. We say that φ ∈ GAn (R) is stably co-tame if hAff n+1 (R), φi contains Tn (R), or equivalently hAff n+1 (R), φi contains En (R). Clearly, co-tame automorphisms are stably co-tame. When R is a field, there exist elements of T3 (R) which are not co-tame but stably co-tame in both cases p = 0 and p > 0 (cf. §6.1). The purpose of this paper is to study when elements of GAn (R) are stably co-tame or not. If R contains an infinite field, we have a necessary and sufficient condition for stably cotameness (Corollary 2.4). This paper is organized as follows. The main results are stated in Section 2, and three key results are proved in Sections 3, 4 and 5. In Section 6, we study stably co-tameness of the example of Edo-Lewis. We also discuss a technique which is useful when R does not contain an infinite field. 2 Main results Since T1 (R) = Aff 1 (R), we always assume that n ≥ 2 unless otherwise stated. Take any φ ∈ GAn (R). We define Mφ to be the R-submodule of 2 R[x] generated by 1, xi and η(φ(xi )) for i = 1, . . . , n and η ∈ Aff n (R). By definition, we have η(Mφ ) ⊂ Mφ for each η ∈ Aff n (R). (2.1) The following theorem holds for any commutative ring R of characteristic p 6= 1. Theorem 2.1. φ ∈ GAn (R) is stably co-tame in the following four cases: (a) Mφ contains xi xj for some 1 ≤ i < j ≤ n. (b) 2 is a unit of R, and Mφ contains x2i for some 1 ≤ i ≤ n. (c) n = p = 2 and Mφ contains x21 x2 or x1 x22 . (d) n = p = 2, Mφ contains x31 or x32 , and there exists ξ ∈ R∗ satisfying ξ + 1 ∈ R∗ . Next, assume that p is zero or a prime. For a ∈ R and t1 , . . . , tn ≥ 0, we call axt11 · · · xtnn a good monomial in the following five cases: (I) p = 0 and t1 + · · · + tn ≥ 2. (II) p ≥ 2 and there exist 1 ≤ i < j ≤ n such that ti , tj ≡ 1 (mod p). (III) p ≥ 3 and there exists 1 ≤ i ≤ n such that ti 6≡ 0, 1 (mod p). (IV) n = p = 2 and there exist i, j ∈ {1, 2} such that ti ≡ 1 and tj ≡ 2 (mod 4). (V) n = p = 2 and there exists 1 ≤ i ≤ 2 such that ti ≡ 3 (mod 4). For each f ∈ R[x], let Cf denote the set of the coefficients of good monomials appearing in f . We define Iφ to be the ideal of R generated Sn by i=1 Cφ(xi ) . Theorem 2.2. Assume that p is zero or a prime. If φ ∈ GAn (R) satisfies Iφ 6= R, then φ is not stably co-tame. Throughout this paper, let k be a field. When R is a commutative kalgebra, we say that f ∈ R[x] satisfies the degree condition if degsxi f ≤ #k − 2 for i = 1, . . . , n. (2.2) Here, degsxi f denotes the separable degree of f if p > 0, and the standard degree degxi f of f if p = 0, as a polynomial in xi . The separable degree of a polynomial g(x) ∈ R[x] in one variable is defined as the degree of h(x) ∈ e R[x] \ R[xp ] such that h(xp ) = g(x) for some e ≥ 0. We say that φ ∈ GAn (R) satisfies the degree condition if φ(xi ) satisfies the degree condition for i = 1, . . . , n. Now, φ to be the ideal of R generated by the union of Cf for P we define JP f ∈ ni=1 Rφ(xi ) + ni=1 Rxi satisfying the degree condition. Since no good 3 monomial is linear, Jφ is contained in Iφ . If φ satisfies the degree condition, then Jφ is equal to Iφ . Hence, (ii) of the following theorem is a consequence of (i). Theorem 2.3. Let k be a field, R a commutative k-algebra, and φ ∈ GAn (R). (i) If Jφ = R, then φ is stably co-tame. (ii) If φ satisfies the degree condition and if Iφ = R, then φ is stably co-tame. From Theorems 2.2 and 2.3 (ii), we obtain the following corollary. Corollary 2.4. Let k be an infinite field, and R a commutative k-algebra. Then, φ ∈ GAn (R) is stably co-tame if and only if Iφ = R. In particular, if R = k is an infinite field, then φ ∈ GAn (k) is stably co-tame if and only if a good monomial appears in φ(xi ) for some i. When p = 0, this is the same as φ is non-affine. In the following three sections, we prove Theorems 2.1, 2.2 and 2.3 (i). 3 Proof of Theorem 2.1 Let R be any commutative ring, and Γ a subgroup of GAn+1 (R) containing Aff n+1 (R), where n ≥ 2. First, we study properties of Γ. Define ǫ̂(f ) := (x1 , . . . , xn , xn+1 + f ) ∈ GAn+1 (R) for each f ∈ R[x]. We identify each permutation σ ∈ Sn+1 with (xσ(1) , . . . , xσ(n+1) ) ∈ Aff n+1 (R), and write φσ := σ −1 ◦ φ ◦ σ for φ ∈ GAn+1 (R). Then, we have the following: (A) If φ = (f1 , . . . , fn ) ∈ GAn (R) belongs to Γ, then ǫ̂(fi ) = φ ◦ ǫ̂(xi ) ◦ φ−1 belongs to Γ for each 1 ≤ i ≤ n. (B) If f, g ∈ R[x̂] satisfy ǫ(f ), ǫ(gxn+1 ) ∈ Γ, then we have ǫ̂(f ) = ǫ(f )(1,n+1) ∈ Γ, and so ǫ(f g) = ǫ̂(f ) ◦ ǫ(gxn+1 ) ◦ ǫ̂(f )−1 ◦ ǫ(gxn+1 )−1 ∈ Γ. In particular, ǫ(f ) ∈ Γ implies ǫ(af ) ∈ Γ for each f ∈ R[x̂] and a ∈ R, since ǫ(axn+1 ) belongs to Aff n+1 (R), and hence to Γ. When Q ⊂ R and n ≥ 3, Derksen showed that Tn (R) is generated by Aff n (R) and {ǫ(ax22 ) | a ∈ R}, and Tn (R) = hAff n (R), ǫ(x22 )i holds if R is generated by R∗ as a Q-vector space (cf. [Es, Thm. 5.2.1]). We remark that, since n ≥ 3, the first statement and (B) imply that Tn (R) = hAff n (R), ǫ(x22 )i whenever Q ⊂ R. 4 Lemma 3.1. If Γ contains ǫ̂(x1 x2 ), or if n = 2 and Γ contains ǫ̂(x1 x22 ), then Γ contains Tn (R). Proof. We show that Γ contains ǫ(f ) for each f ∈ R[x̂]. Since ǫ(g + h) = ǫ(g)◦ǫ(h) holds for each g, h ∈ R[x̂], we may assume that f is a monomial. In the former case, Γ contains ǫ̂(x1 x2 )(1,n+1)(2,i) = ǫ(xi xn+1 ) for each 2 ≤ i ≤ n. By (B), it follows that ǫ(f ) ∈ Γ implies ǫ(xi f ) ∈ Γ. Since Γ contains ǫ(a) for each a ∈ R, the assertion follows by induction on deg f . In the latter case, Γ contains ǫ̂(x1 x22 )(1,3) = ǫ(x22 x3 ). Hence, ǫ(axl2 ) ∈ Γ implies ǫ(axl+2 2 ) ∈ Γ for each a ∈ R and l ≥ 0 similarly. Since Γ contains ǫ(a) and ǫ(ax2 ), it follows that Γ contains ǫ(axl2 ) for all l ≥ 0. The following two implications hold for the conditions listed in Theorem 2.1. Lemma 3.2. (b) implies (a), and (d) implies (c). Proof. By (2.1), (b) implies (x1 + x2 )(x1 − x2 ) = x21 − x22 ∈ Mφ . Since 2 is a unit of R, we have (x1 +x2 , x1 −x2 , x3 , . . . , xn ) ∈ Aff n (R). Hence, Mφ contains x1 x2 by (2.1). Similarly, (d) implies x21 x2 + x1 x22 = x31 + x32 + (x1 + x2 )3 ∈ Mφ . Hence, Mφ contains ((ξx1 )2 x2 + ξx1 x22 ) + ξ 2 (x21 x2 + x1 x22 ) = ξ(ξ + 1)x1 x22 . Since ξ(ξ + 1) is a unit of R, this implies that Mφ contains x1 x22 . Now, we prove Theorem 2.1. Thanks to Lemmas 3.1 and 3.2 and (2.1), it suffices to show that Γ := hAff n+1 (R), φi contains ǫ̂(f ) for each f ∈ Mφ . Write φ = (f1 , . . . , fn ) and f = h+ n X r X i=1 j=1 ai,j ηj (fi ), where h ∈ n X Rxi + R, ai,j ∈ R and ηj ∈ Aff n (R). i=1 Then, ǫ̂(f ) is the product of ǫ̂(h) and ǫ̂(ηj (ai,j fi )) for i = 1, . . . , n and j = 1, . . . , r. Since Γ contains ǫ̂(fi ) for each i by (A), Γ contains ǫ̂(ai,j fi ) for each i, j by (B). Hence, Γ contains ηj ◦ ǫ̂(ai,j fi ) ◦ ηj−1 = ǫ̂(ηj (ai,j fi )) for each i, j. Since ǫ̂(h) is affine, it follows that Γ contains ǫ̂(f ). This completes the proof of Theorem 2.1. 4 Proof of Theorem 2.2 Assume that p is zero or a prime. We define NGn (R) to be the set of φ ∈ GAn (R) such that no good monomial appears in φ(x1 ), . . . , φ(xn ). If p = 0, then we have NGn (R) = Aff n (R). In this case, the following theorem is obvious. 5 Theorem 4.1. NGn (R) is a subgroup of GAn (R), and no element of NGn (R) is stably co-tame. In fact, En (R) 6⊂ hAff n+r (R), NGn (R)i holds for any r ≥ 1. To prove Theorem 4.1, we need a lemma, where L p need not be zero or a prime. Consider the standard grading R[x] L = l>0 R[x]l . An R-submodule V of R[x] is said to be graded if V = l>0 (V ∩ R[x]l ). If V is generated by monomials, then V is graded. Recall that each (f1 , . . . , fn ) ∈ R[x]n is identified with the substitution map R[x] → R[x] defined by xi 7→ fi for i = 1, . . . , n, and R[x]n forms a monoid for the composition defined in (1.1). Note that V n is closed under this operation if and only if φ(V ) ⊂ V holds for each φ ∈ V n . Lemma 4.2. Let V be a graded R-submodule of R[x] such that V n is closed under composition. If x1 , . . . , xn ∈ V , then V n ∩ GAn (R) is a subgroup of GAn (R). Proof. Since V n ∩ GAn (R) contains (x1 , . . . , xn ), and is closed under composition, we show that φ−1 belongs to V n for each φ ∈ V n ∩ GAn (R). L There exists η ∈ V n ∩ Aff n (R) for which ψ := φ ◦ η satisfies ψ(xi ) ∈ xi + l>2 R[x]l for i = 1, . . . , n. Since φ−1 = η ◦ ψ −1 , and V n is closed under composition, it suffices to verify that ψ −1 belongs to V n . Suppose to theP contrary that f := ψ −1 (xi ) does not belong to V for some i. Write f = l>0 fl , where fl ∈ R[x] holds for some d ≥ 0. Take the minimal d, and set P l . Then, fd 6∈ V P f ′ := l<d fl and f ′′ := l>d fl . Let h, h′ and h′′ be the homogeneous components of ψ(fd ), ψ(f ′ ) and ψ(f ′′ ) of degree d, respectively. Then, h + h′ + h′′ belongs to V , since ψ(fd ) + ψ(f ′ ) + ψ(f ′′ ) = ψ(f ) = xi belongs to V , and V is graded by assumption. By the minimality of d, we have f ′ ∈ V . Since ψ = φ ◦ η belongs to V n , it follows that ψ(f ′ ) belongs to V . This implies that h′ belongs to L V as before. As for h and h′′ , we have h = fd and h′′ = 0, since ψ(xi ) ∈ xi + l>2 R[x]l holds for i = 1, . . . , n. Thus, h + h′ + h′′ = fd + h′ does not belong to V , a contradiction. Therefore, ψ −1 belongs to V n . P We remark that, if V = s∈Σ As for some Σ ⊂ R[x] and an R-subalgebra A of R[x], and if φ(A) ⊂ A and φ(Σ) ⊂ V hold for each φ ∈ V n , then V n is closed under composition. For example, assume that R has prime l l l characteristic p, and define R[xp ] := R[xp1 , . . . , xpn ] for each l ≥ 0. Set Zd := {a ∈ Z | a ≥ d} for each d ∈ Z. Let d, e ∈ Z0 and ∅ = 6 N ⊂ Z0 be such that d ≤ e, and each u, v ∈ N satisfy u + v ∈ N ∪ Zd . Then, we define a graded R-submodule of R[x] by d V := V (d, e, N) := R[xp ] + n X X i=1 u∈N 6 e u R[xp ]xpi . Let us prove that V n is closed under composition using the remark for A := u e d R[xp ] and Σ := R[xp ] ∪ {xpi | 1 ≤ i ≤ n, u ∈ N}. First, note that f ∈ V w u v v implies f p ∈ V for any v ∈ N, since each u, v ∈ N satisfy (xpi )p ∈ {xpi | u d d e w ∈ N} ∪ R[xpi ], and R[xp ] contains R[xp ]. Hence, φ(xpi ) belongs to V for l l each φ ∈ V n , 1 ≤ i ≤ n and u ∈ N. Clearly, φ(R[xp ]) ⊂ R[xp ] holds for any φ ∈ R[x]n and l ≥ 0. Therefore, we have φ(A) ⊂ A and φ(Σ) ⊂ V for each φ ∈ V n. Now, let us prove Theorem 4.1 when p is a prime. Clearly, u, v ∈ {0} implies u + v ∈ {0} ∪ Z1 . So, we define Vn := V (1, 1, {0}) and Wn := V (1, 2, {0}), i.e., Vn = R[xp ] + R[xp ]x1 + · · · + R[xp ]xn 2 2 Wn = R[xp ] + R[xp ]x1 + · · · + R[xp ]xn . If n = p = 2, then t1 , t2 ≥ 0 satisfy xt11 xt22 ∈ W2 if and only if t1 , t2 ≡ 0 (mod 2), or ti ≡ 1, tj ≡ 0 (mod 4) for some i, j ∈ {1, 2}. Hence, we have xt11 xt22 6∈ W2 if and only if xt11 xt22 is a good monomial. Similarly, when (n, p) 6= (2, 2), a nonzero monomial m is good if and only if m does not belong to Vn . Thus, NGn (R) is equal to W22 ∩ GA2 (R) if n = p = 2, and to Vnn ∩ GAn (R) otherwise. Therefore, NGn (R) is a subgroup of GAn (R) by Lemma 4.2. Note n+r n+r that hAff n+r (R), NGn (R)i is contained in Wn+r if n = p = 2, and in Vn+r n+r otherwise. Since En (R) \ Vn+r contains ǫ(x2 x3 ) if n ≥ 3, and ǫ(x22 ) if p ≥ 3, n+r while En (R) \ Wn+r contains ǫ(xp+1 2 ) for any n, p ≥ 2, we get the last part of Theorem 4.1. This completes the proof. If I is a proper ideal of R, then each φ ∈ GAn+r (R) induces an element φI of GAn+r (R/I). Since En (R) ∋ τ 7→ τI ∈ En (R/I) is surjective, (σ ◦ τ )I = σI ◦τI for each σ, τ ∈ GAn+r (R), and τ ∈ Aff n+r (R) implies τI ∈ Aff n+r (R/I), we see that En (R) ⊂ hAff n+r (R), φi implies En (R/I) ⊂ hAff n+r (R/I), φI i (4.1) for any r ≥ 0 and φ ∈ GAn (R). Hence, Theorem 4.1 implies the following corollary. Corollary 4.3. Let I be a proper ideal of R such that char(R/I) is zero or a prime. If φ ∈ GAn (R) satisfies φI ∈ NGn (R/I), then En (R) 6⊂ hAff n+r (R), φi holds for any r ≥ 1. Here, char(R/I) is the characteristic of R/I. Now, we can prove Theorem 2.2. By assumption, I := Iφ is a proper ideal of R. If p is a prime, then R contains Fp , and so char(R/I) = p. Hence, φI belongs to NGn (R/I) by the definition of I. Thus, φ is not stably co-tame 7 by Corollary 4.3. If p = 0, then φI is affine. By (4.1), this implies that φ is not stably co-tame. Finally, we remark that, if p = 2, then R[x2 ] is contained in Vn . Hence, we have E2 (R) ⊂ V22 , and so T2 (R) ⊂ V22 . Thus, for any φ ∈ T2 (R), no monomial xt11 xt22 with t1 and t2 odd appears in φ(x1 ) and φ(x2 ). If R is a domain, the same holds for any φ ∈ GA2 (R), since T2 (K) = GA2 (K) for any field K (cf. [J], [K]). Lemma 4.4. Assume that p = 2, φ ∈ GA2 (R), 1 ≤ i ≤ 2 and t1 , t2 ≥ 0 are odd. If a ∈ R is the coefficient of xt11 xt22 in φ(xi ), then a belongs to the nilradical of R. Proof. Let p be any prime ideal of R. Since R/p is a domain of characteristic two, xt11 xt22 does not appear in φp (xi ) as mentioned. Hence, a belongs to p. 5 Proof of Theorem 2.3 (i) Assume that R is a commutative k-algebra. To prove Theorem 2.3 (i), we verify that one of (a), (b) and (c) of Theorem 2.1 holds when Jφ = R. If Jφ = R, a good monomial appears in a polynomial satisfying the degree condition. This implies that #k > 2, and so there always exists ξ ∈ R∗ satisfying ξ + 1 ∈ R∗ . P e Take any f (x) ∈ R[x] and write f (x) = di=0 ui xip with d, e ≥ 0 and ui ∈ R, where we regard pe = 1 if p = 0. If k contains d + 1 distinct e elements ξ0 , . . . , ξd , then ui xip can be written as a k-linear combination of f (ξ0 x), . . . , f (ξd x) for each 0 ≤ i ≤ d by linear algebra. This remark is used to prove the following lemma. Lemma 5.1. If f ∈ R[x] satisfies the degree condition, each monomial appearing in f is written as a k-linear combination of f (ξ1 x1 , . . . , ξn xn ) for ξ1 , . . . , ξn ∈ k ∗ . Proof. We prove the lemma by P induction on n. The case n = 0 is clear. Ase sume that n ≥ 1, and write f = di=0 fi xip 1 , where d := #k−2, fi ∈ R[x̂] and e ≥ 0. Take any monomial m appearing in f . Then, there exists i such that m appears in fi xi1 . Since #k = d + 2, we may find distinct α0 , . . . , αd ∈ k ∗ . Then, fi xi1 is written as a k-linear combination of f (αl x1 , x2 , . . . , xn ) for l = 0, . . . , d as remarked. By the choice of i, we have m = m′ xi1 for some monomial m′ appearing in fi . Note that degsxj fi ≤ degsxj f ≤ d for all j. Hence, by induction assumption, m′ is written as a k-linear combination of fi (β2 x2 , . . . , βn xn ) for β2 , . . . , βn ∈ k ∗ . Thus, m = m′ xi1 is written as a k-linear combination of fi (β2 x2 , . . . , βn xn )xi1 ’s, and therefore that of f (αl x1 , β2 x2 , . . . , βn xn ) for l = 0, . . . , d and β2 , . . . , βn ∈ k ∗ . 8 Next, we define λ ∈ Aff n (R) by λ(xi ) = xi + 1 for i = 1, . . . , n. Lemma 5.2. If xt11 · · · xtnn is a good monomial, there appears in λ(xt11 · · · xtnn ) the monomial uxi xj with u ∈ k ∗ in the cases (I), (II) and (III), xi x2j in the case (IV), and x3i in the case (V), where i, j ∈ {1, . . . , n}, and where i 6= j if (II) or (IV). ′ Proof. In the case (IV), we have λ(xt11 xt22 ) = (xi +1)(x2j +1)(x4i +1)ti (x4j +1)tj for some i, j ∈ {1, 2} with i 6= j, and t′1 , t′2 ≥ 0. Then, it is easy to see that the monomial xi x2j appears in λ(xt11 xt22 ). Other cases are verified similarly. ′ Now, let us prove Theorem 2.3 (i). by assumption, we may PSince Jφ = RP find a1 , . . . , ar ∈ R and g1 , . . . , gr ∈ ni=1 Rφ(xi ) + ni=1 Rxi with r ≥ 1 as follows: (1) For Pr each 1 ≤ l ≤ r, a good monomial ml appears in gl with coefficient al . (2) l=1 al = 1, and g1 , . . . , gr satisfy the degree condition. Since gl satisfies the degree condition for each l, so does ml , and hence so does λ(ml ). Clearly, gl belongs to Mφ . Hence, ml belongs to Mφ by Lemma 5.1 and (2.1). Then, λ(ml ) belongs to Mφ , so each monomial appearing in λ(ml ) belongs to Mφ similarly. By Lemma 5.2, there appears in λ(ml ) the monomial nl := ul al xil xjl with ul ∈ k ∗ in the cases (I), (II) and (III), nl := al xil x2jl in the case (IV), and nl := al x3il in the case (V), where il , jl ∈ {1, . . . , n}, and where il 6= jl if (II) or (IV). Since nl belongs to Mφ , we have al x1 x2 ∈ Mφ in the case (II). The proof of Lemma 3.2 shows that al x1 x22 ∈ Mφ in the case (V) as well as in the case (IV). If n ≥P3 and p = 2, then ml must be of type (II) for all l. Hence, Mφ contains rl=1 al x1 x2 = x1 x2 . Therefore, (a) of Theorem 2.1 holds. If n = p = 2, then ml is of type (II) or (IV) Pror (V) for each l. In the case (II), l=1 al = 1, it follows that P al is nilpotent by Lemma 4.4. Since P u := ′ al is a unit of R, where the sum ′ isPtaken over l such that ml is of type (IV) or (V). Hence, Mφ contains u−1 ′ al x1 x22 = x1 x22 . Therefore, (c) of Theorem 2.1 holds. If p 6= 2, then each ml is of type (I) or (II) or (III), so Mφ contains ul al xil xjl . By (2.1), Mφ contains al x21 if il = jl . If il 6= jl , then Mφ contains 2 a l x1 x2 , and hence contains al x1 (x2 + x1 ) − al x1 x2 = al x1 . Thus, Mφ contains P r 2 2 l=1 al x1 = x1 . Therefore, (b) of Theorem 2.1 holds. This completes the proof of Theorem 2.3 (i). 9 6 Remarks 6.1. When R = k, Edo-Lewis [EL] showed that θN := (β ◦ π)−N ◦ π ◦ (β ◦ π)N is neither affine nor co-tame for each N ≥ 3, where β := (x1 + x22 (x2 + x23 )2 , x2 + x23 , x3 ) and π := (x2 , x1 , x3 ). Here, we mention that the expression of θN above is slightly different from the original one, due to the difference in the definitions of composition (cf. §2.2 of [EL] and (1.1)). Since R = k and θN is not affine, θN is stably co-tame if p = 0 by the remark after Corollary 2.4. If p = 2, then θN belongs to NG3 (k), and hence is not stably co-tame by Theorem 4.1. When p ≥ 3, we have the following theorem. Theorem 6.1. If p ≥ 3, N ≥ 1 and #k ≥ 42N −1 + 2, then θN is stably co-tame. Proof. Observe that θN is written as σ1 ◦ τ1 ◦ · · · ◦ σN ◦ τN ◦ σ, where σi ∈ {π ◦ β ◦ π, π ◦ β −1 ◦ π}, τi ∈ {β, β −1 } and σ ∈ {id, π} with σ1 = π ◦ β −1 ◦ π =: (h1 , h2 , x3 ). For each w = (w1 , w2 , w3 ) ∈ Z3 , we define the w-weighted grading on R[x] by degw xi := wi for i = 1, 2, 3. For f ∈ R[x] \ {0}, we denote by f w the highest w-homogeneous part of f . Now, ′ set θN := θN ◦ σ. We claim that, if degw h2 is greater than (1/4) degw h1 and 2w3 , then 2N−i ′ 4 θN (xi )w = (σ1 ◦ τ1 ◦ · · · ◦ σN ◦ τN )(xi )w = ±(hw 2 ) for i = 1, 2. In fact, the case N = 1 is checked directly, and the case N ≥ 2 follows by induction on N, since (σi ◦ τi )(x2 ) = x2 ± x21 (x1 ± x23 )2 ± x23 and (σi ◦τi )(x1 ) = x1 ±x23 ±(x2 ±x21 (x1 ±x23 )2 )2 (x2 ±x21 (x1 ±x23 )2 ±x23 )2 for each i. Since h1 = x1 − x23 and h2 = x2 − x21 h21 , the assumption of the claim holds for w = (1, 0, 0), (0, 1, 0), (0, 0, 1), (2, 0, 1), for which 4 2 4 2 2 2 hw 2 = −x1 , x2 , −x1 x3 , −x1 (x1 − x3 ) , ′ respectively. The first three of these imply degxi θN (x2 ) ≤ 4 · 42N −2 ≤ ′ #k − 2 for i = 1, 2, 3. Hence, θN (x2 ) satisfies the degree condition. Since ′ (2,0,1) 2 t θN (x2 ) = ±(x1 (x1 − x3 )) with t := 2 · 42N −2 similarly, the monomial ′ ±(x1 x23 )t appears in θN (x2 ). Since p ≥ 3, we see that xt1 x2t 3 is a good mono′ mial of type (III). Thus, we get JθN = JθN = R. Therefore, θN is stably co-tame by Theorem 2.3 (i). 10 6.2. When k is a finite field, Theorem 2.3 might not be useful due to the degree condition. In such a case, the following technique may be effective. Take any η ∈ Aff n (R), and set δ := η − id. Then, δ(Mφ ) ⊂ Mφ holds for each φ ∈ GAn (R) by (2.1). Since φ(xj ) belongs to Mφ for each j, we get the following lemma. Lemma 6.2. If φ ∈ GAn (R) and h ∈ R[x] satisfy the following condition, then h belongs to Mφ : There exist 1 ≤ j ≤ n and η1 , . . . , ηl ∈ Aff n (R) with l ≥ 1 such that (δ1 ◦ · · · ◦ δl ◦ φ)(xj ) belongs to R∗ h + Mφ , where δi := ηi − id for each i. Assume that p is a prime. For i = 1, . . . , n, take any ai ∈ R∗ , define ηi ∈ Aff n (R) by ηi (xi ) = xi + ai and ηi (xj ) = xj for j 6= i, and put δi := ηi − id. Then, we have δip = 0 since ηip = id, degxi δi (xdi ) < d for d ≥ 0, and P Rxji if p ∤ d − l for all 0 ≤ l < t. Note that ker δi δit (xdi ) ∈ R∗ xd−t + d−t−1 i j=0 is an R-subalgebra of R[x], and δi is ker δi -linear. Also, ker δi contains the R-subalgebra Ai generated by qi := xpi − ap−1 xi and xj for j 6= i. We claim i that ker δi = Ai . In fact, each f ∈ ker δi \ {0} satisfies p | degxi f =: lp, hence degxi (f − hqil ) < lp holds for some h ∈ R[{xj | j 6= i}]. Thus, we get f − hqil ∈ Ai by induction on l, and so f ∈ Ai . Now, fix l = (l1 , . . . , ln ) ∈ {0, . . . , p − 1}n , and set δ l := δ1l1 ◦ · · · ◦ δnln and Ml := n X i=0 l Rxi x + li −1 n X X Ai xji , where x0 := 1 and xl := xl11 · · · xlnn . i=1 j=0 Then, since δi ’s commute P with each other, and are Ai -linear, we see that δ l (Ml ) is contained in ni=0 Rxi . Hence, δ l (Ml ) ⊂ Mφ holds for every φ ∈ GAn (R). Using this, we can give sufficient conditions for stably co-tameness of φ. For P example, assume that l1 , l2 ≤ p − 2. Then, δ l (x1 x2 xl ) belongs to R∗ x1 x2 + 2i=0 Rxi . Hence, if φ satisfies φ(xj ) ∈ R∗ x1 x2 xl + Ml for some 1 ≤ j ≤ n, then (δ l ◦ φ)(xj ) belongs to R∗ x1 x2 + Mφ . This implies that x1 x2 belongs to Mφ by Lemma 6.2. Therefore, φ is stably co-tame by Theorem 2.1. Similarly, if p ≥ 3, l1 ≤ p − 3, and φ(xj ) belongs to R∗ x21 xl + Ml for some 1 ≤ j ≤ n, then φ is stably co-tame. 6.3. When n ≥ 3, Motoki Kuroda [MK] showed that ǫ(x22 ) is stably cotame for R = Fp with p ≥ 3, and found it hard to decide whether ǫ(x52 ) is stably co-tame for R = F3 . Note that ǫ(x52 ) is stably co-tame for R = F9 by Theorem 2.3 (ii). 6.4. The Tame Generators Problem asks if GAn (R) = Tn (R). In the context of stably co-tame automorphisms, NGn (R) is a natural generalization of Aff n (R). So, the following problem is of interest, as a generalization of the 11 Tame Generators Problem in prime characteristic (see also [EK] for other generalizations). Problem. When p is a prime, does it hold that GAn (R) = hNGn (R), Tn (R)i? References [BEW] J. Berson, A. van den Essen and D. Wright, Stable tameness of two-dimensional polynomial automorphisms over a regular ring, Adv. Math. 230 (2012), no. 4-6, 2176–2197. [B] Y. Bodnarchuk, On generators of the tame invertible polynomial maps group, Internat. J. Algebra Comput. 15 (2005), no. 5-6, 851–867. [Ed] E. Edo, Coordinates of R[x, y]: constructions and classifications, Comm. Algebra 41 (2013), no. 12, 4694–4710. [EK] E. Edo and S. Kuroda, Generalisations of the tame automorphisms over a domain of positive characteristic, Transform. Groups 20 (2015), no. 1, 65–81. [EL] E. Edo and D. Lewis, The affine automorphism group of A3 is not a maximal subgroup of the tame automorphism group, Michigan Math. J. 64 (2015), no. 3, 555–568. [Es] A. van den Essen, Polynomial automorphisms and the Jacobian conjecture, Progress in Mathematics, Vol. 190, Birkhäuser, Basel, Boston, Berlin, 2000. [J] H. Jung, Über ganze birationale Transformationen der Ebene, J. Reine Angew. Math. 184 (1942), 161–174. [K] W. van der Kulk, On polynomial rings in two variables, Nieuw Arch. Wisk. (3) 1 (1953), 33–41. [MK] M. Kuroda, Stably Derksen polynomial automorphisms over finite fields (Japanese), Master’s Thesis, Tokyo Metropolitan University, January 2016. [MW] S. Maubach and R. Willems, Polynomial automorphisms over finite fields: mimicking tame maps by the Derksen group, Serdica Math. J. 37 (2011), no. 4, 305–322 (2012). 12 [N] M. Nagata, On Automorphism Group of k[x, y], Lectures in Mathematics, Department of Mathematics, Kyoto University, Vol. 5, Kinokuniya Book-Store Co. Ltd., Tokyo, 1972. [SU] I. Shestakov and U. Umirbaev, The tame and the wild automorphisms of polynomial rings in three variables, J. Amer. Math. Soc. 17 (2004), 197–227. [S] M. K. Smith, Stably tame automorphisms, J. Pure Appl. Algebra 58 (1989), 209–212. Department of Mathematics and Information Sciences Tokyo Metropolitan University 1-1 Minami-Osawa, Hachioji Tokyo 192-0397, Japan [email protected] 13
4math.GR
Generalized Value Iteration Networks: Life Beyond Lattices Sufeng Niu∗† Siheng Chen∗‡ , Hanyu Guo∗† , Colin Targonski† , Melissa C. Smith† , Jelena Kovačevi㇠† arXiv:1706.02416v2 [cs.LG] 26 Oct 2017 ‡ Clemson University, 433 Calhoun Dr., Clemson, SC 29634, USA Carnegie Mellon University, 5000 Forbes Avenue, Pittsburgh, PA 15213, USA Abstract In this paper, we introduce a generalized value iteration network (GVIN), which is an end-to-end neural network planning module. GVIN emulates the value iteration algorithm by using a novel graph convolution operator, which enables GVIN to learn and plan on irregular spatial graphs. We propose three novel differentiable kernels as graph convolution operators and show that the embedding-based kernel achieves the best performance. Furthermore, we present episodic Q-learning, an improvement upon traditional n-step Q-learning that stabilizes training for VIN and GVIN. Lastly, we evaluate GVIN on planning problems in 2D mazes, irregular graphs, and realworld street networks, showing that GVIN generalizes well for both arbitrary graphs and unseen graphs of larger scale and outperforms a naive generalization of VIN (discretizing a spatial graph into a 2D image). Introduction Reinforcement learning (RL) is a technique that solves sequential decision making problems that lacks explicit rules and labels (Sutton and Barto 1998). Recent developments in Deep Reinforcement Learning(DRL) have lead to enormous progress in autonomous driving (Bojarski et al. 2016), innovation in robot control (Levine et al. 2015), and humanlevel performance in both Atari games (Mnih et al. 2013; Guo et al. 2014) and the board game Go (Silver et al. 2016a). Given a reinforcement learning task, the agent explores the underlying Markov Decision Process (MDP) (Bellman 1957; Bertsekas et al. 1995) and attempts to learn a mapping of high-dimensional state space data to an optimal policy that maximizes the expected return. Reinforcement learning can be categorized as model-free (Lillicrap et al. 2015; Mnih et al. 2016; 2013) and model-based approaches (Sutton and Barto 1998; Deisenroth and Rasmussen 2011; Schmidhuber 1990). Model-free approaches learn the policy directly by trial-and-error and attempt to avoid bias caused by a suboptimal environment model (Sutton and Barto 1998); the majority of recent architectures for DRL follow the model-free approach (Lillicrap et al. 2015; Mnih et al. 2016; 2013). Model-based approaches, on the other hand, allow for an agent to explicitly learn the mechanisms of an environment, which can lead to strong generalization abilities. A ∗ Equal contribution. Copyright c 2018, Association for the Advancement of Artificial Intelligence (www.aaai.org). All rights reserved. recent work, the value iteration networks (VIN) (Tamar et al. 2016) combines recurrent convolutional neural networks and max-pooling to emulate the process of value iteration (Bellman 1957; Bertsekas et al. 1995). As VIN learns an environment, it can plan shortest paths for unseen mazes. The input data fed into deep learning systems is usually associated with regular structures. For example, speech signals and natural language have an underlying 1D sequential structure; images have an underlying 2D lattice structure. To take advantage of this regularly structured data, deep learning uses a series of basic operations defined for the regular domain, such as convolution and uniform pooling. However, not all data is contained in regular structures. In urban science, traffic information is associated with road networks; in neuroscience, brain activity is associated with brain connectivity networks; in social sciences, users’ profile information is associated with social networks. To learn from data with irregular structure, some recent works have extended the lattice structure to general graphs (Defferrard, Bresson, and Vandergheynst 2016; Kipf and Welling 2016) and redefined convolution and pooling operations on graphs; however, most works only evaluate data that has both a fixed and given graph. In addition, most lack the ability to generalize to new, unseen environments. In this paper, we aim to enable an agent to self-learn and plan the optimal path in new, unseen spatial graphs by using model-based DRL and graph-based techniques. This task is relevant to many real-world applications, such as route planning of self-driving cars and web crawling/navigation. The proposed method is more general than classical DRL, extending for irregular structures. Furthermore, the proposed method is scalable (computational complexity is proportional to the number of edges in the testing graph), handles various edge weight settings and adaptively learns the environment model. Note that the optimal path can be self-defined, and is not necessarily the shortest one. Additionally, the proposed work differs from conventional planning algorithms; for example, Dijkstra’s algorithm requires a known model, while GVIN aims to learn a general model via trial and error, then apply said model to new, unseen irregular graphs. To create GVIN, we generalize VIN in two aspects. First, to work for irregular graphs, we propose a graph convolution operator that generalizes the original 2D convolution operator. With the new graph convolution operator, the proposed network captures the basic concepts in spatial graphs, such as direction, distance and edge weight. It also is able to transfer knowledge learned from one graph to others. Second, to improve reinforcement learning on irregular graphs, we propose a reinforcement learning algorithm, episodic Q-learning, which stabilizes the training for VIN and GVIN. The original VIN is trained through either imitation learning, which requires a large number of ground-truth labels, or reinforcement learning, whose performance is relatively poor. With the proposed episodic Q-learning, the new network performs significantly better than VIN in the reinforcement learning mode. Since the proposed network generalizes the original VIN model, we call it the generalized value iteration network (GVIN). The main contributions of this paper are: • The proposed architecture, GVIN, generalizes the VIN (Tamar et al. 2016) to handle both regular structures and irregular structures. GVIN offers an end-to-end architecture trained via reinforcement learning (no ground-truth labels); see Section Framework; • The proposed graph convolution operator generalizes 2D convolution learns the concepts of direction and distance, which enables GVIN to transfer knowledge from one graph to another; see Section Graph Convolution; • The proposed reinforcement learning algorithm, episodic Q-learning, extends the classical n-step Q-learning as Monte Carlo control and significantly improves the performance of reinforcement learning for irregular graphs; see Section Training via Reinforcement Learning; and • Through intensive experiments we demonstrate the generalization ability of GVIN within imitation learning and episodic Q-learning for various datasets, including synthetic 2D maze data, irregular graphs, and real-world maps (Minnesota highway and New York street maps); we show that GVIN significantly outperforms VIN with discretization input on irregular structures; See Section Experimental Results. Background Markov Decision Process. We consider an environment defined as an MDP that contains a set of states s ∈ S, a set of actions a ∈ A, a reward function Rs,a , and a series of transition probabilities Ps0 ,s,a , the probability of moving from the current state s to the next state s0 given an action a. The goal of an MDP is to find a policy that maximizes the P∞ expected return (accumulated rewards) Rt = k=0 γ k rt+k , where rt+k is the immediate reward at the (t + k)th time stamp and γ ∈ (0, 1] is the discount rate. A policy πa,s is the probability of taking action a when in state s. The value of state s under a policy π, vsπ , is the expected return when starting in s and following π; that is, vsπ = E[Rt |St = s]. The value of taking action a in state s under a policy π, qπ (a) s , is the expected return when starting in s, taking the action a and following π; that is, qπ (a) = E[Rt |St = s, At = a]. s There is at least one policy that is better than or equal to all other policies, called an optimal policy π ∗ ; that is, the optimal policy is π ∗ = arg maxπ vsπ , the optimal state-value function is vs∗ = maxπ vsπ , and the optimal action-value function ∗ ∗ is q∗ (a) = maxπ qπ (a) s s . To obtain π and v , we usually consider solving the Bellman equation. Value iteration is a popular algorithm used to solve the Bellman equation in the discrete Pstate space; that is, we iteratively compute vs ← maxa s0 Ps0 ,s,a (Rs,a +γvs0 ) until convergence. Differentiable planning module. VIN employs an embedded differentiable planning architecture, trained end-toend via imitation learning (Tamar et al. 2016). In VIN, the Bellman equation is encoded within the convolutional neural networks, and the policy can be obtained through backpropagation. However, VIN is limited to regular lattices; it requires imitation learning for maximum performance and is trained separately with a reactive policy. A more recent work Memory Augmented Control Network (MACN) (Khan et al. 2017) combines the VIN model with a memory augmented controller, which can then backtrack through the history of previous trajectories. However, as we shown later in Table 2, GVIN outperform MACN on both performance and problem scales. A different model-based work, Predictron, uses a learning and planning model that simulates a Markov reward process (Silver et al. 2016b). The architecture unrolls the "imagined" plan via a predictron core. However, Predictron is limited to the Markov rewards process and is relatively computationally expensive compared to VIN. Deep Learning with Graphs. A number of recent works consider using neural networks to handle signals supported on graphs (Niepert, Ahmed, and Kutzkov 2016; Duvenaud et al. 2015; Henaff, Bruna, and LeCun 2015). The principal idea is to generalize basic operations in the regular domain, such as filtering and pooling, to the graph domain based on spectral graph theory. For example, (Bruna et al. 2013; Henaff, Bruna, and LeCun 2015) introduce hierarchical clustering on graphs and the spectrum of the graph Laplacian to neural networks; (Defferrard, Bresson, and Vandergheynst 2016) generalizes classical convolutional neural networks by using graph coarsening and localized convolutional graph filtering; (Kipf and Welling 2016) considers semi-supervised learning with graphs by using graph-based convolutional neural networks; (Li et al. 2015) investigate learning graph structure through gated recurrent unit; (Gilmer et al. 2017) considers a message passing framework that unifies previous work, see some recent overviews in (Bronstein et al. 2016). Methodology We propose a new model-based DRL framework, GVIN, that takes a general graph with a starting node and a goal node as inputs and outputs the designed plan. The goal of GVIN is to learn an underlying MDP that summarizes the optimal planning policy applied for arbitrary graphs, which requires GVIN to capture general knowledge about planning that is structure and transition invariant and does not depend on any specific graph structure. A key component of an MDP is the transition matrix, which is needed to solve the Bellman equation. To train a general transition matrix that works for arbitrary graphs, similar to the VIN, we treat it as a graph convolution operator and parameterize it by using graphbased kernel functions, each of which represents a unique action pattern. We train the parameters in GVIN by using episodic Q-learning, which makes reinforcement learning on irregular graphs practical. Figure 1: Architecture of GVIN. The left module emulates value iteration and obtains the state values; the right module is responsible for selecting an action based on an -greedy policy (for training) or a greed policy (for testing). We emphasize our contributions, including graph convolution operator and episodic Q-learning, in the blue blocks. Framework The input of GVIN is a graph with a starting node and a goal node. In the training phase, GVIN trains the parameters by trial-and-error on various graphs; during the testing phase, GVIN plans the optimal path based on the trained parameters. The framework includes the planning module (left) and the action module (right), shown in Figure 1. The planning module emulates value iteration by iteratively operating the graph convolution and max-pooling. The action module takes the greedy action according to the value function. Mathematically, we consider a directed, weighted spatial graph G = (V, X, E, A), where V = {v1 , ..., vN } is the node set, X ∈ RN ×2 are the node embeddings with the ith row Xi ∈ R2 being the embedding of the ith node (here we consider 2D spatial graphs, but the method is generalizable), E = {e1 , ..., eM } is the edge set, and A ∈ RN ×N is the adjacency matrix, with the (i, j)th element Ai,j representing the edge weight between the ith and jth nodes. We consider a graph signal as a mapping from the nodes to real values. We use a graph signal g ∈ {0, 1}N to encode the goal node, where g is one-sparse and only activates the goal node. Let r ∈ RN , v ∈ RN , and q ∈ RN be the reward graph signal, the state-value graph signal, and the action-value graph signal, respectively. We represent the entire process in a matrixvector form as follows, P r = fR (g; wr ), (1) (a) = fP (G; wP(a) ), (2) (a) qn+1 vn+1 (a) = P (r + γvn ) , = (a) max qn+1 . a (3) (4) In the feature-extraction step (1), g is encoded to become the robust reward r via the feature-extract function fR (·), which is a convolutional neural network in the case of regular graphs, but is the identity function when operating on irregular graphs; in step (2), where P(a) is the graph convolution operator in the ath channel, a set of graph convolution operators is trained based on the graph G, which is further described in Section Graph Convolution; in (3) and (4), value iteration is emulated by using graph convolution to obtain the action-value graph signal q(a) in the ath channel and max-pooling to obtain the state-value graph signal v. wr and wP(a) are training parameters to parameterize r and P(a) , respectively. As shown in Figure 1, we repeat the graph convolution operation (3) and max-pooling (4) for K iterations b . When G is a 2D to obtain the final state-value graph signal v lattice, the planning module of GVIN degenerates to VIN. In the training phase, we feed the final state-value graph b to the action module. The original VIN extracts signal v the action values from step (3) and trains the final action probabilities for eight directions; however, this is problematic for irregular graphs, as the number of actions (neighbors) at b each node varies. To solve this, we consider converting v b ∈ RN , whose sth to a pseudo action-value graph signal, q bs = maxs0 ∈Nei(s) v bs0 , representing the action element is q value moving from s to one of its neighbors. The advantages of this approach come from the following three aspects: (1) the final state value of each node is obtained by using the maximum action values across all the channels, which is robust to small variations; (2) the pseudo action-value graph signal considers a unique action for each node and does not depend on the number of actions; that is, at each node, the agent queries the state values of its neighbors and always moves to the one with the highest value; and (3) the pseudo action-value graph signal considers local graph structure, because the next state is always chosen from one of the neighbors of the current state. The pseudo action-value graph signal is used through episodic Q-learning, which learns from trial-and-error experience and backpropagates to update all of the training parameters. In episodic Q-learning, each episode is obtained as follows: for each given starting node s0 , the agent will move sequentially from st to st+1 by the -greedy strategy; that bs0 is, with probability (1 − ), st+1 = arg maxs0 ∈Nei(st ) v and with probability , st+1 is randomly selected from one of the neighbors of st . An episode terminates when st+1 is the goal state or the maximum step threshold is reached. For each episode, we consider the loss function PT bst )2 , where q bst is a function of as, L(w) = t=1 (Rt − q the training parameters w = [wr , wP(a) ] in GVIN, T is the episode length and Rt is the expected return at time stamp t, defined as Rt = (rt+1 + γRt+1 ), where γ is the discount factor, and rt is the immediate return at time stamp t. Additional details of the algorithm will be discussed in Section Training via Reinforcement Learning. In the testing phase, we obtain the action by greedily selecting the maximal state value; that bs0 . is, st+1 = arg maxs0 ∈Nei(st ) v Graph Convolution The conventional CNN takes an image as input, which is a 2D lattice graph. Each node is a pixel and has the same local structure, sitting on a grid and connecting to its eight neighbors. In this case, the convolution operator is easy to obtain. In irregular graphs, however, nodes form diverse local structures, making it challenging to obtain a structured and translation invariant operator that transfers knowledge from one graph to another. The fundamental problem here is to find a convolution operator that works for arbitrary local structures. We solve this through learning a 2D spatial kernel function that provides a transition probability distribution in the 2D space, and according to which we evaluate the weight of each edge and obtain a graph convolution operator. The 2D spatial kernel function assigns a value to each position in the 2D space, which reflects the possibility to transit to the corresponding position. Mathematically, the transition probability from a starting position x ∈ R2 to another position y ∈ R2 is K(x, y), where K(·, ·) is a 2D spatial kernel function, which will be specified later. Definition 1. A 2D spatial kernel function K(·, ·) is shift invariant when it satisfies K(x, y) = K(x + t, y + t), for all x, y, t ∈ R2 . The shift invariance requires that the transition probability depend on the relative position, which is the key for transfer learning; in other words, no matter where the starting position is, the transition probability distribution is invariant. Based on a shift-invariant 2D spatial kernel function and the graph adjacency matrix, we obtain the graph convolution operator P = fP (G; wP ) ∈ RN ×N , where each element Pi,j = Ai,j ·KwP (Xi , Xj ), where the kernel function KwP (·, ·) is parameterized by wP and Xi , Xj ∈ R2 are the embeddings of the ith and jth node. The graph convolution operator follows from (1) graph connectivity and (2) 2D spatial kernel function. With the shift-invariant property, the 2D spatial kernel function leads to the same local transition distribution at each node; the graph adjacency matrix works as a modulator to select activations in the graph convolution operator. When there is no edge between i and j, we have Ai,j = 0 and Pi,j = 0; when there is an edge between i and j, Pi,j is high when KwP (Xi , Xj ) is high; in other words, when the transition probability from the ith node to the jth node is higher, the edge weight Pi,j is high and the influence from the ith node to the jth node is bigger during the graph convolution. Note that P is a sparse matrix and its sparsity pattern is the same with its corresponding adjacency matrix, which ensures cheap computation. As shown in (2), the graph convolution is a matrix-vector multiplication between the graph convolution operator P and the graph signal r + γvn ; see Figure 2. Note that when we work with a lattice graph and an appropriate kernel function, this graph convolution operator P is nothing but a matrix representation of the conventional convolution (LeCun, Bengio, and others ); in other words, VIN is a special case of GVIN when the underlying graph is a 2D lattice; see more details in Supplementary Graph-based Kernel Functions. We consider three types of shift-invariant 2D spatial kernel functions: the directional kernel, the spatial kernel, and the embedding kernel. Figure 2: Matrix-vector multiplication as graph convolution. Through a graph convolution operator P, r + γv diffuses over the graph to obtain the action-value graph signal q. Directional Kernel. The directional kernel is embedded with the direction information. The (i, j)th element in the graph convolution operator models the probability of following the edge from i to j ; that is, Pi,j = Ai,j · L X (t,θ` ) w` Kd (θij ) , (5) `=1 where (t,θ ) Kd `  (θ) = 1 + cos(θ − θ` ) 2 t , w` is kernel coefficient, θij is the direction of the edge connecting the ith and thejth nodes, which can be computed (t,θ ) through the node embeddings Xi , Xj ∈ R2 , and Kd ` (θ) is the directional kernel with order t and reference direction θ` , reflecting the center of the activation. The hyperparameters include the number of directional kernels L and the order t, reflecting the directional resolution (a larger t indicates more focus in one direction); see Figure 7. The kernel coefficient w` and the reference direction θ` are the training parameters, which is wP in (2). Spatial Kernel. We next consider both direction and distance. The (i, j)th element in the graph convolution operator is then, L X Pi,j = Ai,j · w` Ks(d` ,t,θ` ) (dij , θij ) , (6) `=1 where Ks(d` ,t,θ` ) (d, θ) = I|d−d` |≤  1 + cos(θ − θ` ) 2 and dij is the distance between the ith and the jth nodes, which can be computed through the node embeddings (d ,t,θ ) Xi , Xj ∈ R2 , Ks ` ` (d, θ) is the spatial kernel with reference distance d` and reference direction θ` and the indicator function I|d−d` |≤ = 1 when |d − d` | ≤  and 0, otherwise. The hyperparameters include the number of directional kernels L, the order t, the reference distance d` and the distance threshold . The kernel coefficient w` and the reference direction θ` are training parameters (wP in (2)). t , Embedding-based Kernel. In the directional kernel and spatial kernel, we manually design the kernel and provide hints for GVIN to learn useful direction-distance patterns. Now we directly feed the node embeddings and allow GVIN to automatically learn implicit hidden factors for general planning. The (i, j)th element in the graph convolution operator is then, (Ii=j + Ai,j ) ·Kemb (Xi , Xj ) , P k (1 + Ak,j ) k (1 + Ai,k ) (7) where the indicator function Ii=j = 1 when i = j, and 0, otherwise, and the embedding-based kernel function is Kemb (Xi , Xj ) = mnnet ( [Xi − Xj ]), with mnnet(·) is a standard multi-layer neural network. The training parameters wP in (2) are the weights in the multi-layer neural network. In practice, when the graph is weighted, we may also include the graph adjacency matrix Ai,j as the input of the multilayer neural network. Pi,j = pP Theorem 1. The proposed three kernel functions, the directional kernel, the spatial kernel and the embedding-based kernel, are shift invariant. The proof follows from the fact that those kernels use only the direction, distance and the difference between two node embeddings, which only depend on the relative position. Training via Reinforcement Learning We train GVIN through episodic Q-learning, a modified version of n-step Q-learning. The difference between episodic Q-learning and the n-step Q-learning is that the nstep Q-learning has a fixed episode duration and updates the training weights after n steps; while in episodic Q-learning, each episodic terminates when the agent reaches the goal or the maximum step threshold is reached, and we update the trainable weights after the entire episode. During experiments, we found that for both regular and irregular graphs, the policy planned by the original Q-learning keeps changing and does not converge due to the frequent updates. Similar to the Monte Carlo algorithms (Sutton and Barto 1998), episodic Q-learning first selects actions by using its exploration policy until the goal is reached. Afterwards, we accumulate the gradients during the entire episode and then update the trainable weights, allowing the agent to use a stable plan to complete an entire episode. This simple change greatly improves the performance (see Section Revisting 2D Mazes). The pseudocode for the algorithm is presented in Algorithm 1 (Supplementary Episodic Q-learning). Experimental Results In this section, we evaluate the proposed method on three types of graphs: 2D mazes, synthesized irregular graphs and real road networks. We first validate that the proposed GVIN is comparable to the original VIN for 2D mazes, which have regular lattice structure. We next show that the proposed GVIN automatically learns the concepts of direction and distance in synthesized irregular graphs through the reinforcement learning setting (without using any ground-truth labels). Finally, we use the pre-trained GVIN model to plan paths for the Minnesota road network and Manhattan street network. Additional experiment parameter settings are listed in the Supplementary Experiment Settings. Revisting 2D Mazes Given a starting point and a goal location, we consider planning the shortest paths for 2D mazes; see Figure 8(a) (Supplementary) as an example. We generate 22, 467 2D mazes (16 × 16) using the same scripts1 that VIN used. We use the same configuration as VIN (6/7 data for training and 1/7 data for testing). Here we consider four comparisons: VIN vs. GVIN, action-value based imitating learning vs. statevalue based imitating learning, direction-guided GVIN vs. unguided GVIN, and reinforcement learning. Four metrics are used to quantify the planning performance, including prediction accuracy—the probability of taking the ground-truth action at each state (higher means better); success rate—the probability of successfully arriving at the goal from the start state without hitting any obstacles (higher means better); path difference—the average length difference between the predicted path and the ground-truth path (lower means better); and expected reward—the average accumulated reward (higher means better). The overall testing results are summarized in Table 1. VIN vs. GVIN. GVIN performs competitively with VIN (Table 1), especially when GVIN uses direction-aware actionvalue based imitation learning (4th column in Table 1), which outperforms the others for all four metrics. Figure 8(b) (Supplementary) shows the value map learned from GVIN with direction-unaware state-value based imitation learning. We see negative values (in blue) at obstacles and positive values (in red) around the goal, which is similar to the value map that VIN reported in (Tamar et al. 2016). Action-value vs. State-value. VIN with action-value imitation learning slightly outperforms VIN with state-value imitation learning. Similarly, GVIN with action-value based imitation learning slightly outperforms GVIN with state-value based imitation learning. The results suggest that our action approximation method (Section Framework) does not impact the performance while maintaining the ability to be extended to irregular graphs. Direction-aware GVIN vs. Unaware GVIN. Directionaware GVIN slightly outperforms direction-unaware GVIN, which is reasonable because the fixed eight directions are ground truth for regular 2D mazes. It remains encouraging that the GVIN is able to find the ground-truth directions through imitation learning. As shown later, direction-unaware GVIN outperforms direction-aware GVIN in irregular graphs. Figures 3(a) and (b) show that the planning performance improves as the kernel exponential t in (8) increases due to the resolution in the reference direction being low when t is small. Figure 7 (in Supplementary) compares the kernel with the same reference direction, but two different kernel orders. When t = 5, the kernel activates wide-range directions; when t = 100, the kernel focuses on a small-range directions and has a higher resolution. 1 https://github.com/avivt/VIN VIN Action-value State-value Prediction accuracy Success rate Path difference Expected reward 95.00% 99.30% 0.089 0.963 95.00% 99.78% 0.010 0.962 GVIN Action-value State-value dir-aware unaware dir-aware unaware 95.20% 99.91% 0.004 0.965 92.90% 98.60% 0.019 0.939 94.40% 99.57% 0.013 0.958 94.80% 99.68% 0.015 0.960 Table 1: 2D Maze performance comparison for VIN and GVIN. GVIN achieves similar performance with VIN for 2D mazes (16 × 16); state-value imitation learning achieves similar performance with action-value imitation learning. (a) Prediction accuracy in 2D mazes. (b) Success rate in 2D mazes. (c) Prediction accuracy in irregular graphs (d) Success rate in irregular graphs. Figure 3: Kernel direction order influences the planning performance in both regular and irregular graphs. based kernel, direction-aware vs. direction-unaware, scale generalization, and reinforcement learning vs. imitation learning. We use the same performance metrics as the previously discussed 2D maze experiments. (a) Expected rewards. (b) Success rate. Figure 4: Q- vs. episodic Q-learning on 16 × 16 Maze. Reinforcement Learning. We also examine the performance of episodic Q-learning (Section Training via Reinforcement Learning) in VIN. Table 4 (Supplementary) shows that the episodic Q-learning algorithm outperforms the training method used in VIN (TRPO + curriculum learning). For the results reported in Table 4, we were able to train the VIN using our algorithm (episodic Q-learning) in just 200 epochs, while TRPO and curriculum learning took 1000 epochs to train VIN, as reported in (Tamar et al. 2016) (both algorithms used the same settings). As shown in Figure 4, the episodic Q-learning algorithm shows faster convergence and better overall performance when compared with Q-learning. Exploring Irregular Graphs We consider four comparisons in the following experiments: Directional kernel vs. Spatial kernel vs. Embedding- Directional Kernel vs. Spatial Kernel vs. Embeddingbased Kernel. We first train the GVIN via imitation learning. Table 2 shows that the embedding-based kernel outperforms the other kernel methods in terms of both action prediction and path difference (5th column in Table 2), indicating that the embedding-based kernel captures the edge weight information (distance) within the neural network weights better than the other methods. The spatial kernel demonstrates higher accuracy and success rate when compared with the directional kernel, which suggests the effectiveness of using bin sampling. The direction-unaware method shows slightly better results for the spatial kernel, but has a larger success rate gain for the directional kernel. Figure 8(d) (Supplementary) shows the visualization of the learned value map which shares similar properties with the regular graph value map. We also train VIN (1st column) by converting graph to 2D image. As shown in the Table, VIN fails significantly (See Supplementary Experiment Settings). Figures 3(c) and (d) show the planning performance for the irregular domain as the kernel order t in 8 increases. The results show that a larger t in the irregular domain has the opposite effect when compared with the regular domain. The observation is reasonable: in the irregular domain, the direction of each neighbor is extremely variable and a larger kernel order creates a narrower direction range (as seen in Prediction acc. Success rate Path diff. Expected reward VIN MACN (36 nodes) 26.57% 10.29% 0.992 −0.905 78% 89.4% - Directional Kernel dir-aware unaware Spatial Kernel dir-aware unaware 41.50% 34.75% 0.175 0.266 57.45% 96.56% 0.082 0.911 41.51% 65.30% 0.141 0.599 57.90% 97.17% 0.082 0.917 Embedding-based Kernel train 100 (IL) train 10 (IL) train 10 (RL) 58.90% 97.34% 0.079 0.922 56.14% 6.73% 0.041 −0.03 50.90% 100% 0.148 0.943 Table 2: The performance comparison amongst VIN and three different kernels of GVIN. All experiments except MACN (Khan et al. 2017) are tested on 100-node irregular graphs. Note the last column is trained using episodic Q-learning. IL and RL stands for imitate learning and reinforcement learning, respectively. Under similar experimental settings, MACN achieves an 89.4% success rate for 36-node graphs, while GVIN achieves a 97.34% success rate for 100-node graphs. The details about training VIN on irregular graphs sees Section Irregular Graphs in the supplementary material. Prediction Accuracy Success rate Path difference Expected reward Optimal Minnesota |V| = 100 |V| = 10 Optimal 100% 100% 0.0000 0.96043 78.37% 100% 0.1069 0.95063 78.15% 100% 0.1025 0.95069 100% 100% 0.0000 0.97279 New York City |V| = 100 |V| = 10 78.66% 100% 0.03540 0.97110 79.11% 100% 0.0353 0.97136 Table 3: Performance comparison on Minnesota and New York City street map data using GVIN. |V| = 100 is trained on 100-node graphs and |V| = 10 is trained on 10-node graphs. (a) Expected rewards (b) Success rate Figure 5: Q- vs. Episodic Q-learning on irregular graphs. Figure7), thus resulting in information loss. Reinforcement Learning. We then train the GVIN using episodic Q-learning to compare with imitation learning. As a baseline, we also train GVIN by using standard deep Qlearning techniques, including using an experience replay buffer and a target network. Both networks use the same kernel function (embedding-based kernel) and configurations. Figure 5 shows the comparison of the two algorithms’ success rate and expected rewards during the training. Clearly, episodic Q-learning converges to both a high success rate and a high expected rewards, but the standard deep Q-learning techniques fail to achieve reasonable results. Scale Generalization. We also examine the scale generalization by training on 10-node graphs and then testing on 100-node graphs using the embedding-based kernel. When GVIN is trained on 10-node graphs via imitation learning, the performance is significantly hindered as shown in Table 2 (6th column). When GVIN is trained using episodic Q-learning, Table 2 (7th column) shows excellent generalization abilities that outperform all imitation learning based results for success rate and expected rewards. Compared with imitation learning, we also observe the performance decreases for path differences and action prediction. Graph with Edge Weights. We also test how GVIN handles edge weights. We set the true weighted shortest path to be Xi − Xj Wij , where Xi − Xj is the distance between two nodes and Wij is the edge weight. As shown in Table 5, imitation learning is trained on 100-node graphs, while reinforcement learning is trained on 10-node. We also examine the GVIN by excluding edge weights from the input to see if there are any effects on performance. Table 5 (Supplementary) shows that for reinforcement learning, edge weights slightly help the agent find a more suitable policy; for imitation learning, input edge weights cause a significant failure. Validating Real Road Networks To demonstrate the generalization capabilities of GVIN, we evaluate two real-world maps: the Minnesota highway map, which contains 2642 nodes representing intersections and 6606 edges representing roads, and the New York City street map, which contains 5069 nodes representing intersections and 13368 edges representing roads. We use the same models trained on the graphs containing |V| = 100 and |V| = 10 nodes with the embedding-based kernel and using episodic Q-learning in Section Exploring Irregular Graphs, separately. We normalize the data coordinates between 0 and 1, and we set recurrence parameter to K = 200. We randomly pick start points and goal points 1000 different times. We use the A* algorithm as a baseline. Table 3 shows that both |V| = 100 and |V| = 10 generalize well on large scale data. The policy could reach the goal position with 100% in the experiments. One sample planned path is shown in Supplementary (Figures 9 and 10). Conclusions We have introduced GVIN, a differentiable, novel planning module capable of both regular and irregular graph navigation and impressive scale generalization. We also introduced episodic Q-learning that is designed to stabilize the training process of VIN and GVIN. The proposed graph convolution may be applied to many other graph-based applications, such as navigation, 3D point cloud processing and molecular analysis, which is left for future works. References Bellman, R. 1957. Dynamic programming. Princeton, USA: Princeton University Press 1(2):3. Bertsekas, D. P.; Bertsekas, D. P.; Bertsekas, D. P.; and Bertsekas, D. P. 1995. Dynamic programming and optimal control, volume 1. Athena Scientific Belmont, MA. Bojarski, M.; Del Testa, D.; Dworakowski, D.; Firner, B.; Flepp, B.; Goyal, P.; Jackel, L. D.; Monfort, M.; Muller, U.; Zhang, J.; et al. 2016. End to end learning for self-driving cars. arXiv preprint arXiv:1604.07316. Bresenham, J. 1977. A linear algorithm for incremental digital display of circular arcs. Communications of the ACM 20(2):100–106. Bronstein, M. M.; Bruna, J.; LeCun, Y.; Szlam, A.; and Vandergheynst, P. 2016. Geometric deep learning: going beyond euclidean data. arXiv preprint arXiv:1611.08097. Bruna, J.; Zaremba, W.; Szlam, A.; and LeCun, Y. 2013. Spectral networks and locally connected networks on graphs. arXiv preprint arXiv:1312.6203. Defferrard, M.; Bresson, X.; and Vandergheynst, P. 2016. Convolutional neural networks on graphs with fast localized spectral filtering. In Advances in Neural Information Processing Systems, 3837–3845. Deisenroth, M., and Rasmussen, C. E. 2011. Pilco: A modelbased and data-efficient approach to policy search. In Proceedings of the 28th International Conference on machine learning (ICML-11), 465–472. Duvenaud, D. K.; Maclaurin, D.; Iparraguirre, J.; Bombarell, R.; Hirzel, T.; Aspuru-Guzik, A.; and Adams, R. P. 2015. Convolutional networks on graphs for learning molecular fingerprints. In Advances in neural information processing systems, 2224–2232. Gilmer, J.; Schoenholz, S. S.; Riley, P. F.; Vinyals, O.; and Dahl, G. E. 2017. Neural message passing for quantum chemistry. arXiv preprint arXiv:1704.01212. Guo, X.; Singh, S.; Lee, H.; Lewis, R. L.; and Wang, X. 2014. Deep learning for real-time atari game play using offline monte-carlo tree search planning. In Advances in neural information processing systems, 3338–3346. Henaff, M.; Bruna, J.; and LeCun, Y. 2015. Deep convolutional networks on graph-structured data. arXiv preprint arXiv:1506.05163. Khan, A.; Zhang, C.; Atanasov, N.; Karydis, K.; Kumar, V.; and Lee, D. D. 2017. Memory augmented control networks. arXiv preprint arXiv:1709.05706. Kipf, T. N., and Welling, M. 2016. Semi-supervised classification with graph convolutional networks. arXiv preprint arXiv:1609.02907. LeCun, Y.; Bengio, Y.; et al. Convolutional networks for images, speech, and time series. Levine, S.; Finn, C.; Darrell, T.; and Abbeel, P. 2015. Endto-end training of deep visuomotor policies. arXiv preprint arXiv:1504.00702. Li, Y.; Tarlow, D.; Brockschmidt, M.; and Zemel, R. 2015. Gated graph sequence neural networks. arXiv preprint arXiv:1511.05493. Lillicrap, T. P.; Hunt, J. J.; Pritzel, A.; Heess, N.; Erez, T.; Tassa, Y.; Silver, D.; and Wierstra, D. 2015. Continuous control with deep reinforcement learning. arXiv preprint arXiv:1509.02971. Mnih, V.; Kavukcuoglu, K.; Silver, D.; Graves, A.; Antonoglou, I.; Wierstra, D.; and Riedmiller, M. 2013. Playing atari with deep reinforcement learning. arXiv preprint arXiv:1312.5602. Mnih, V.; Badia, A. P.; Mirza, M.; Graves, A.; Lillicrap, T.; Harley, T.; Silver, D.; and Kavukcuoglu, K. 2016. Asynchronous methods for deep reinforcement learning. In International Conference on Machine Learning, 1928–1937. Niepert, M.; Ahmed, M.; and Kutzkov, K. 2016. Learning convolutional neural networks for graphs. In Proceedings of the 33rd annual international conference on machine learning. ACM. Schmidhuber, J. 1990. An on-line algorithm for dynamic reinforcement learning and planning in reactive environments. In Neural Networks, 1990., 1990 IJCNN International Joint Conference on, 253–258. IEEE. Silver, D.; Huang, A.; Maddison, C. J.; Guez, A.; Sifre, L.; Van Den Driessche, G.; Schrittwieser, J.; Antonoglou, I.; Panneershelvam, V.; Lanctot, M.; et al. 2016a. Mastering the game of go with deep neural networks and tree search. Nature 529(7587):484–489. Silver, D.; van Hasselt, H.; Hessel, M.; Schaul, T.; Guez, A.; Harley, T.; Dulac-Arnold, G.; Reichert, D.; Rabinowitz, N.; Barreto, A.; et al. 2016b. The predictron: End-to-end learning and planning. arXiv preprint arXiv:1612.08810. Sutton, R. S., and Barto, A. G. 1998. Reinforcement learning: An introduction, volume 1. MIT press Cambridge. Tamar, A.; Levine, S.; Abbeel, P.; WU, Y.; and Thomas, G. 2016. Value iteration networks. In Advances in Neural Information Processing Systems, 2146–2154. Tieleman, T., and Hinton, G. 2012. Lecture 6.5-rmsprop: Divide the gradient by a running average of its recent magnitude. COURSERA: Neural networks for machine learning 4(2). Appendix is, Computational Complexity Let the input graph G have |V| nodes and |E| edges. In the testing phase, since the input graph are commonly sparse, the computational complexities of (1), (3) and (4) are O(|V|), O(|E|) and O(|V|) based on sparse computation, respectively. Therefore, the total computational complexity is O(|V| + K(|E| + |V|)), where K is number of iterations. For a spatial graph, the number of edges is usually proportional to the number of nodes; thus the computational complexity is O(K|V|), which is scalable to huge graphs. Episodic Q-learning We highlight the differences between episodic Q-learning and the original n-step Q-learning in blue, including the initial expected return, the termination condition and the timing of updating the gradient. Algorithm 1 Episodic Q-learning 1: input graph G and the goal sg 2: initialize global step counter T = 0 3: initialize GVIN parameters w = [wr , wP(a) ] 4: initialize parameter gradients ∆w 5: repeat (one episode) 6: clear gradients ∆w ← 0 7: t=0 8: randomly pick a start node st 9: repeat (one action) take action at according to the -greedy policy 10: (a) based on qst 11: receive reward rt and new state st+1 12: t←t+1 13: until terminal st = sg or t > tmax 14: R=0 15: for i = t : −1 : 0 do 16: R ← ri + γR 17: accumulate gradients wrt w : ∆w ← ∆w + 2 ∂(R−q(a) st ) ∂w 18: end for 19: w ← w − ∆w 20: T =T +1 21: until T > Tmax Graph-based Kernel Functions Directional Kernel. We first consider direction. When we face several roads at an intersection, it is straightforward to pick the one whose direction points to the goal. We aim to use the directional kernel to capture edge direction and parameterize the graph convolution operation. The (i, j)th element in the graph convolution operator models the probability of following the edge from i to j ; that Pi,j = Ai,j · L X (t,θ` ) w` Kd (θij ) , `=1 (t,θ` ) where Kd  (θ) = 1 + cos(θ − θ` ) 2 (8) t . where w` is kernel coefficient, θij is the direction of the edge connecting the ith and thejth nodes, which can be computed through the node embeddings Xi ∈ R2 and Xj ∈ R2 , and (t,θ ) Kd ` (θ) is the directional kernel with order t and reference direction θ` , reflecting the center of the activation. The hyperparameters include the number of directional kernels L and the order t, reflecting the directional resolution (a larger t indicates more focus in one direction); see Figure 7. The kernel coefficient w` and the reference direction θ` are the training parameters, which is wP in (2). Note that the graph convolution operator P ∈ RN ×N is a sparse matrix and its sparsity pattern is the same with the input adjacency matrix, which ensures that the computation is cheap. (a) t = 5 (b) t = 100 Figure 6: The directional kernel function activates the areas around the reference direction θ` in the 2D spatial domain. The activated area is more concentrated when t increases. The intuition behind (8) is that each graph convolution operator represents a unique direction pattern. An edge is a 2D vector sampled from the 2D spatial plane. When the direction of the edge connecting i and j matches one or some of the L reference directions, we have a higher probability to follow the edge from i to j. In GVIN, we consider several channels. In each channel, we obtain an action value for each node, which represents the matching coefficient of a direction pattern. The max-pooling operation then selects the most matching direction pattern for each node. Spatial Kernel. We next consider both direction and distance. When all the roads at the current intersection opposite to the goal, it is straightforward to try the shortest one first. We thus include the edge length into the consideration. The (i, j)th element in the graph convolution operator is then, Pi,j = Ai,j · L X w` Ks(d` ,t,θ` ) (dij , θij ) , `=1 where Ks(d` ,t,θ` )  (d, θ) = I|d−d` |≤ 1 + cos(θ − θ` ) 2 t , (9) where dij is the distance between the ith and the jth nodes, which can be computed through the node embeddings Xi ∈ (d ,t,θ ) R2 and Xj ∈ R2 , Ks ` ` (d, θ) is the spatial kernel with reference distance d` and reference direction θ` and the indicator function I|d−d` |≤ = 1 when |d − d` | ≤  and 0, otherwise. The hyperparameters include the number of directional kernels L, the order t, the reference distance d` and the distance threshold . The kernel coefficient w` and the reference direction θ` are training parameters, which is wP in (2). (a) t = 5. (b) t = 100. Figure 7: The spatial kernel function activates the areas around the reference direction θ` and reference distance d` in the 2D spatial domain. Compared to the directional kernel, the spatial kernel adds another dimension, distance; in other words, the directional kernel is a special case of the spatial kernel when we ignore the distance. Each spatial kernel activates a localized area in the direction-distance plane. With the spatial kernel, the graph convolution operator (9) represents a unique directiondistance pattern; that is, if the direction/distance of the edge connecting i and j matches one or some of the L reference directions and distances, we have a higher probability to follow the edge from i to j. Embedding-based Kernel. In the directional kernel and spatial kernel, we manually design the kernel and hint GVIN to learn useful direction-distance patterns. Now we directly feed the node embeddings and allow GVIN to automatically learn implicit hidden factors for general planning. The (i, j)th element in the graph convolution operator is then, (Ii=j + Ai,j ) ·Kemb (Xi , Xj ) , P k (1 + Ak,j ) k (1 + Ai,k ) (10) where the indicator function Ii=j = 1 when i = j, and 0, otherwise, and the embedding-based kernel function is Kemb (Xi , Xj ) = mnnet ( [Aij , Xi − Xj ]), with mnnet(·) is a standard multi-layer neural network. The training parameters wP in (2) are the weights in the multi-layer neural network. Note that the graph convolution operator P ∈ RN ×N is still a sparse matrix and its sparsity pattern is the same with the input adjacency matrix plus the identity matrix. In the directional kernel and spatial kernel, we implicitly discretize the space based on the reference direction and distance; that is, for each input pair of given direction and distance, the kernel function outputs the response based on its closed reference direction and distance. In the embeddingPi,j = pP Success rate No. of Epochs Path difference Expected reward TRPO EQL2 82.50% 1000 N/A N/A 98.67% 200 0.1617 0.9451 Table 4: Performance comparison using different training algorithms on the VIN model. The first column is VIN trained by TRPO with curriculum learning reported in (Tamar et al. 2016), the second column is VIN trained by episodic Qlearning. based kernel, we do not set the reference direction and distance to discretize the space; instead, we use the multi-layer neural network to directly regress from an arbitrary edge (with edge weight and embedding representation) to a response value. The embedding-based kernel is thus more flexible than the directional kernel and spatial kernel and may learn hidden factors. Experiment Settings Our implementation is based on Tensorflow with GPUenabled platform. All experiments use the standard centered RMSProp algorithm as the optimizer with learning rate η = 0.001 (Tieleman and Hinton 2012). All reinforcement learning experiments use a discount of γ = 0.99, RMSProp decay factor of α = 0.999, and exploration rate  annealed linearly from 0.2 to 0.001 over the first 200 epochs. 2D Mazes The experiments are set up as follows. We consider the rules as follows: the agent receives a +1 reward when reaching the goal, receives a −1 reward when hitting an obstacle, and each movement gets a −0.01 reward. To preprocess the input data, we use the same two-layer CNN for both VIN and GVIN, where the first layer involves 150 kernels with size 3 × 3 and the second layer involves a kernel with size 3 × 3 for output. The transition probability matrix is parameterized by 10 convolution kernels with size 3 × 3 in both VIN and GVIN. In GVIN, we use the directional kernel based method as shown in Equations 8 and 9 and we set ` = 8 to represent the eight reference directions. We consider two approaches to initialize the directions θ` . In directionaware approach, we fix θ` as [0, π/4, π/2, ..., 7π/4]. In the direction-unaware approach, we set θ` to be weights and train them via backpropagation. We set the recurrence K in GVIN to be 20 for 16 × 16 2D mazes. In the regular domain, we set the kernel order t = 100 to be the default. Irregular Graphs We evaluate our proposed methods in Section Graph Convolution for the irregular domain. Our experimental domain is a synthetic data which consists of N = 10000 irregular graphs, in which each graph contains 100 nodes. We follow the standard rules of random geometric graphs to generate our irregular graphs. Specifically, we generate |V| vertices with random coordinates in the box [0, 1]2 and connects a pair of two vertices with an edge when the distance between two vertices is smaller than a certain threshold. For each node in the graph, we define the coordi- (a) Input map (2D mazes). (b) Value map (2D mazes). (c) Input map (irregular graph). (d) Value map (irregular graph). Figure 8: value map visualization on regular and irregular graph. Imitation Learning w edge weight w/o edge weight Prediction accuracy Success rate Path difference Expected reward 62.24% 3.00% 0.020 −0.612 43.12% 97.60% 0.763 0.771 Reinforcement Learning w edge weight w/o edge weight 50.38% 100% 0.146 0.943 50.14% 100% 0.151 0.940 Table 5: Performance comparison for testing weighted graphs. Imitation learning is trained on 100-node irregular graphs while reinforcement learning is trained on 10-node irregular graphs. nates which represent its spatial position ranged between 0 and 1. The dataset is split into 7672 graphs for training and 1428 graphs for testing. Additionally, to exam whether GVIN could handle weighted graphs, we also generated a synthetic dataset consisting of 100 node graphs and partitioned 42857 graphs for training and 7143 graphs for testing. For the directional kernel and spatial kernel, we set the number of reference directions to ` = 8 and kernel order t = 20 to be default values for Equations 8 and 9. We also set θ` to be 0 to 2π with an interval of π/4 for direction-aware mode and we set θ` to be trainable weights for direction-unaware mode. For the spatial kernel function, we set the number of bins d` to be 10 in Equation 9. In the embedding-based kernel, we use three layers of fully connected neural networks (32-64-1), where each layer uses ReLU (·) = max(0, ·) as its activation function. The neural network are initialized with zero-mean and 0.01 derivation. or all three kernel methods, we set the graph convolution channel number to be 10 and K = 40 for recurrence. Training VIN on Irregular Graphs. To show the strong generalization of GVIN, we evaluate the VIN on irregular graph by converting graph data format to 2D image. Each testing set contains reward map and obstacle map that sizes 100 × 100 pixels. We use pre-trained weights from 28 × 28 maze with all parameters tuned to be highest performance. To make the training and testing consistent, we set the rewards map and obstacle map the same settings as 2D maze: vertices and edges are marked as free path (value set to be 0), while the other area are marked as obstacles (value set to be 1). The edge path is generated via Bresenham’s line algorithm (Bresenham 1977). We set recurrence K to be 200 so that the value iteration could cover the whole map. (a) Ground-Truth (b) GVIN prediction Figure 9: Sample planning trajectories on Minnesota highway map. (a) Ground-Truth (b) GVIN prediction Figure 10: Sample planning trajectories on New York City street map.
2cs.AI
1 Theory and Application on Adaptive-Robust Control of Euler-Lagrange Systems with Linearly Parametrizable Uncertainty Bound arXiv:1708.01442v1 [cs.SY] 4 Aug 2017 Spandan Roy, Sayan Basu Roy and Indra Narayan Kar, Senior Member, IEEE Abstract—This work proposes a new adaptive-robust control (ARC) architecture for a class of uncertain Euler-Lagrange (EL) systems where the upper bound of the uncertainty satisfies linear in parameters (LIP) structure. Conventional ARC strategies either require structural knowledge of the system or presume that the overall uncertainties or its time derivative is norm bounded by a constant. Due to unmodelled dynamics and modelling imperfection, true structural knowledge of the system is not always available. Further, for the class of systems under consideration, prior assumption regarding the uncertainties (or its time derivative) being upper bounded by a constant, puts a restriction on states beforehand. Conventional ARC laws invite overestimation-underestimation problem of switching gain. Towards this front, Adaptive Switching-gain based Robust Control (ASRC) is proposed which alleviates the overestimationunderestimation problem of switching gain. Moreover, ASRC avoids any presumption of constant upper bound on the overall uncertainties and can negotiate uncertainties regardless of being linear or nonlinear in parameters. Experimental results of ASRC using a wheeled mobile robot notes improved control performance in comparison to adaptive sliding mode control. Index Terms—Adaptive-robust control, Euler-Lagrange systems, Wheeled mobile robot, Uncertainty. I. I NTRODUCTION A. Background HE controller design aspect for nonlinear systems subjected to parametric and nonparametric uncertainties has always been a challenging task. Adaptive control and Robust control are the two popular control strategies to deal with uncertain nonlinear systems. In case of adaptive control, online computation of the unknown system parameters and controller gains for complex systems is significantly intensive [1]. On the other front, robust control reduces computation burden for complex systems compared to adaptive control, while requiring a predefined upper bound on the uncertainties. However, in practice it is not always possible to estimate a prior uncertainty bound due to the effect of unmodelled dynamics. Again, to increase the operating region of the controller, often higher uncertainty bounds are assumed. This in turn leads to overestimation of switching gain and high control effort [2]. Considering the individual constraints of adaptive and robust control, recently global research is reoriented towards adaptive-robust control (ARC). The series of publications [1], T S. Roy, S. Basu Roy and I. N. Kar are with the Department of Electrical Engineering, Indian Institute of Technology-Delhi, New Delhi, India e-mail: ([email protected], [email protected], [email protected]). [3]-[11] regarding ARC, estimate the individual uncertain system parameters through adaptive law and robust control is utilized to negate the effect of external disturbances. These works utilize the projection operator in their respective adaptive laws which necessitate the knowledge of lower and upper bound of individual uncertain system parameters. Adaptive sliding mode control (ASMC) is designed in [12] for parameter identification of mechanical servo systems with LuGre friction considering the uncertainties to be linear in parameters (LIP). In contrast, the controllers [13]-[20] assume that the overall uncertainty (or its time derivative) is bounded by some constant. Thereafter, that constant term is estimated by adaptive law, rather estimating individual uncertain system parameters. The adaptive laws in [17]-[18] involve a predefined threshold value; as a matter of fact, until the threshold value is achieved, the switching gain may still be increasing (resp. decreasing) even if the tracking error decreases (resp. increases) and thus creates overestimation (resp. underestimation) problem of switching gain.While the underestimation problem compromises the controller accuracy by applying lower switching gain than the required amount, the overestimation problem causes larger gain and high control input requirement. The adaptive law reported in [19] requires predefined bound on the time derivative of the uncertainties. As observed in [20], the method in [19] also requires frequency characteristics of the perturbation to design the filter for equivalent control. However, the work in [20] assumed that the time derivative of the uncertainties are bounded by an unknown constant. B. Motivation Let us consider the following system representing a chemostat operating under Monod kinetic [21]: ż1 = f1 (z1 , z2 ) − Dz1 , ż2 = f2 (z1 , z2 ) + S0 − Dz2 , δ1 z1 z2 −δ3 z1 z2 where f1 (z1 , z2 ) = , f2 (z1 , z2 ) = . δ2 + z2 δ2 + z2 (1) Here z1 ≥ 0, z2 ≥ 0 ∀t ≥ 0 are states; δ1 , δ2 , δ3 are uncertain positive parameters; S0 is a known constant and D is the control input. For the system (1), the following relations hold: |f1 | ≤ y1 f (z), |f2 | ≤ y2 f (z), (2) where y1 = |δ1 |/|δ2 |, y2 = |δ3 |/|δ2 |, f (z) = |z1 ||z2 |. Inspection of the uncertainties f1 and f2 from (1)-(2) reveal that though f1 , f2 are nonlinear in parameters (NLIP) but their upper bounds are LIP. 2 Similarly Euler-Lagrange (EL) systems can have uncertainties with LIP or NLIP (e.g. system with nonlinear friction ([22])) structure. However, the upper bound of the overall (or lumped) uncertainty for such systems has LIP property [23]. EL systems, in general, represent a large class of real world systems like robotic manipulators [24]-[25], mobile robots [26], ship dynamics, aircraft, pneumatic muscles [27] etc. These systems have immense applications in various domains such as defence, automation industry, surveillance, space missions etc. The controllers [13]-[18] assume that the overall uncertainties are upper bounded by some constant, while [19][20] assume the time derivative of the overall uncertainty to be bounded by some constant. Hence, for the aforementioned class of systems, consideration of such constant bound (known or unknown) restricts the system state a priori. Further, the switching gain in [17]-[18] suffers from over- and underestimation problems. In practice, it is also not always possible to have prior knowledge of bounds for system parameters as required in [1], [3]-[11] for projection operator. where q ∈ Rn denotes system state, τ ∈ Rn denotes vector of generalized control input forces, M (q) ∈ Rn×n represents mass/inertia matrix, C(q, q̇) ∈ Rn×n denotes Coriolis, centripetal terms, g(q) ∈ Rn denotes gravity vector, f (q̇) ∈ Rn represents the vector of slip, damping and friction forces and ds (t) denotes the bounded external disturbances. The system (3) possesses the following properties [23]: Property 1: The matrix (Ṁ − 2C) is skew symmetric. Property 2: ∃gb , fb , d¯ ∈ R+ such that ||g(q)|| ≤ gb , ||f (q̇)|| ≤ ¯ fb ||q̇|| and ||ds (t)|| ≤ d. Property 3: The matrix M (q) is uniformly positive definite and there exist two positive constants µ1 , µ2 such that 0 < µ1 I ≤ M (q) ≤ µ2 I. Property 4: ∃Cb ∈ R such that ||C(q, q̇)|| ≤ Cb ||q̇||. Let q d (t) is the desired trajectory to be tracked and it is selected such that q d , q̇ d , q̈ d ∈ L∞ . Let e(t) , q(t) − q d (t) be the tracking error and ef be the filtered tracking error: ef , ė + Ωe ⇒ ef = Γξ, T C. Contribution In view of the above discussion and the importance of EL systems in real-life scenarios, it is imperative to formulate a dedicated ARC framework for uncertain EL systems. Towards this front, Adaptive Switching-gain based Robust Control (ASRC) is presented in this paper for tracking control of uncertain EL systems. The formulation of ASRC is insensitive towards the nature of the uncertainties, i.e., it can negotiate uncertainties that can be either LIP or NLIP. ASRC utilizes LIP structure of the upper bound of uncertainty and does not presume the overall uncertainty (or its time derivative) to be upper bounded by a constant. The adaptive law of ASRC prevents the switching gain from becoming a monotonically increasing function by allowing the switching gain to decrease within a finite time when tracking error decreases. Moreover, ASRC alleviates the overestimation-underestimation problem of switching gain. To realize the effectiveness, the performance of ASRC is compared with ASMC [17]-[18] experimentally using PIONEER 3 wheeled mobile robot (WMR). D. Organization and Notations The remainder of the article is organized as follows: The proposed ASRC framework for second order EL systems is detailed in Section II. This is followed by the experimental results of ASRC and its comparison with ASMC [17]-[18] in Section III. Section IV presents concluding remarks. The following notations are used in this paper: λmin (•) and || • || represent minimum eigenvalue and Euclidean norm of (•) respectively; I denotes identity matrix with appropriate dimension; R+ denotes the set of positive real numbers. (4) + T T (5) n×n where Γ , [Ω I], ξ , [e ė ] and Ω ∈ R is a positive definite matrix. Multiplying the time derivative of (5) by M and using (3) yields M ėf = M (q̈ − q̈ d + Ωė) = τ − C(q, q̇)ef + σ, where σ , −(C(q, q̇)q̇ + g(q) + f (q̇) + ds + M q̈ − M Ωė − C(q, q̇)ef ) represents the overall uncertainty. Further ξ = [eT ėT ]T implies ||ξ|| ≥ ||e||, ||ξ|| ≥ ||ė||. Characterization of the upper bound of σ: Relation (5) and system Property 4 yields ||Cef − C q̇|| = ||C(ė + Ωe) − C q̇|| = || − C q̇ d + CΩe|| ≤ Cb ||q̇||||q̇ d || + Cb ||q̇||||Ω||||e|| ≤ Cb ||ė + q̇ d ||||q̇ d || + Cb ||ė + q̇ d ||||Ω||||ξ|| ≤ Cb {||ξ||||q̇ d || + ||q̇ d ||2 + ||ξ||2 ||Ω|| + ||q̇ d ||||Ω||||ξ||}. (7) Further, system Properties 2 and 3 provide the following: ||g(q) + f (q̇) + ds + M q̈ d − M Ωė|| ≤ gb + fb ||q̇|| + d¯ + µ2 ||q̈ d || + µ2 ||Ω||||ė|| ≤ gb + fb ||ė + q̇ d || + d¯ + µ2 ||q̈ d || + µ2 ||Ω||||ξ|| ≤ gb + fb ||ξ|| + fb ||q̇ d || + d¯ + µ2 ||q̈ d || + µ2 ||Ω||||ξ||. (8) Since q d , q̇ d , q̈ d ∈ L∞ , it can be verified using (7)-(8) that ∃θi∗ ∈ R+ i = 0, 1, 2 such that the upper bound of σ holds the following LIP structure [23]: ||σ|| ≤ θ0∗ + θ1∗ ||ξ|| + θ2∗ ||ξ||2 , Y (ξ)T Θ∗ , A. Problem Formulation In general, an EL system with second order dynamics can be written as M (q)q̈ + C(q, q̇)q̇ + g(q) + f (q̇) + ds = τ, (3) (9) where Y (ξ) = [1 ||ξ|| ||ξ||2 ]T and Θ∗ = [θ0∗ θ1∗ θ2∗ ]T . Let Θ̄ , {Θ ∈ R3 : θi ≥ θi∗ ∀i = 0, 1, 2} such that the following condition always holds from (9): ||σ|| ≤ Y (ξ)T Θ, ∀Θ ∈ Θ̄. II. C ONTROLLER D ESIGN (6) d (10) A robust controller for the system (3) can be designed as [23] ( e ρ ||eff || if ||ef || ≥ $ (11) τ = −e − Gef − ∆τ, ∆τ = e ρ $f if ||ef || < $, ρ = Y (ξ)T Θ, (12) 3 where ∆τ provides robustness against σ through switching gain ρ; $ ∈ R+ is a small scalar used for chattering removal; G ∈ Rn×n is a positive definite matrix. Evaluation of Switching Gain: Evaluation of ρ like (12) is conservative in nature and evidently requires the knowledge of Θ∗ , which is not always possible in the face of uncertain parametric variations and external disturbances. The control laws developed in [13]-[18] and [19]-[20] assume that σ and σ̇ is upper bounded by constant, respectively. Exploring the structure of ||σ|| from (9) it can be easily inferred that such constant bound assumption on the uncertainties, whether known or unknwon, puts a restriction on the states a priori. Moreover, the switching gain in [17]-[18] suffers from overestimation-underestimation problem. B. Adaptive Switching-gain based Robust Control (ASRC) The major aims of the proposed ASRC framework are: • To compensate the uncertainties that can be either LIP or NLIP. However, the upper bound of the uncertainties satisfies the LIP property (9). • To alleviate the overestimation-underestimation problem of switching gain. The control input of the proposed ASRC is designed as ( e ρ̂ ||eff || if ||ef || ≥ $ (13) τ = −e − Gef − ∆τ, ∆τ = e if ||ef || < $, ρ̂ $f ρ̂ = θ̂0 + θ̂1 ||ξ|| + θ̂2 ||ξ||2 + γ , Y (ξ)T Θ̂ + γ, (14) where ∆τ provides robustness against σ through ρ̂; Θ̂ = [θ̂0 θ̂1 θ̂2 ]T is the estimate of Θ; γ is an auxiliary gain. The importance of γ will be explained later. The gains γ, θ̂i , i = 0, 1, 2 are evaluated using the following adaptive laws: (i) for ||ef || ≥ $  S2 i T  αi ||ξ|| ||ef || if {e ė > 0} ∪ { i=0 θ̂i ≤ 0} ˙ θ̂i = ∪{γ ≤ β}   i −αi ||ξ|| ||ef || otherwise,  S2 T  α3 ||ef || if {e ė > 0} ∪ { i=0 θ̂i ≤ 0} γ̇ = ∪{γ ≤ β}   −ςα3 ||ξ||4 otherwise, (15) with θ̂i (t0 ) > 0, i = 0, 1, 2, γ(t0 ) > β. Remark 2. For ||ef || < $, the tracking error remains bounded inside the ball B$ , {||Γξ|| < $} using the relation ef = Γξ. This implies that the switching gains are sufficient enough to keep the error within B$ . Hence, the gains are kept unchanged for ||ef || < $. One can choose small $ to improve tracking accuracy (as B$ gets reduced) as long as the value of $ does not invite chattering. Remark 3. The initial condition of the gains are selected as θ̂i (t0 ) > 0, γ(t0 ) > β. Further, for ||ef || ≥ $, the adaptive laws (15)-(16) force the gains to increase if either of the gains attempt S2 to breach their respective lower bounds (governed by { i=0 θ̂i ≤ 0} ∪ {γ ≤ β}). This ensures that γ(t) ≮ β, θ̂i (t) ≮ 0 ∀i = 0, 1, 2 when ||ef || ≥ $. Again, gains remain unchanged for ||ef || < $. Hence, combination of the conditions mentioned above implies θ̂i (t) ≥ 0 ∀i = 0, 1, 2 and γ(t) ≥ β ∀t ≥ t0 . (20) The condition (20) is later exploited in stability analysis. To guarantee the alleviation of the overestimation problem of switching gain, it is necessary that θ̂i , γ decrease within a finite time. This is shown through Theorem 1. Theorem 1. Let t = tin be any time instant when gains start increasing. Then there exist finite times t1 , t2 , t3 , δt such that the gains θ̂0 , θ̂1 , θ̂2 , γ decrease for t ≥ tin + T where T ≤ t̄ + δt, t̄ = max{t1 , t2 , t3 }. These times are obtained as θ∗ ||Γ|| θ∗ ||Γ||2 θ0∗ , t2 ≤ 1 2 , t3 ≤ 2 3 , (α0 + α3 )$ α1 $ α2 $ 2 δt ≤ (1/%)ln{2V (t̄)/(||e(t̄)|| )}, t1 ≤ where V = 21 eTf M ef + 21 eT e, % , (21) (22) min{λmin (G),λmin (Ω)} . max{µ2 ,1} (17) Proof. Here, tin can be any time when gains start increasing and it is solely used for analysis. The objective of Theorem 1 is to find when the gains start to decrease. Further, it is to be noted from the laws (15)-(17) that the gains increase only when ||ef || ≥ $. So, it is sufficient to investigate the condition when all the gains increase and ||ef || ≥ $. Moreover, using ef = Γξ from (5) one has (18) $ ≤ ||ef || ≤ ||Γ||||ξ|| ⇒ ||ξ|| ≥ ($/||Γ||). (16) (ii) for ||ef || < $ ˙ θ̂i = 0, γ̇ = 0, the proposed law certainly does not make the switching gain a monotonically increasing function and thus alleviates the overestimation problem. (23) + Here t0 is the initial time and β, ς, α0 , α1 , α2 , α3 ∈ R are user defined scalars. Substituting (13) into (6), the closed loop system is formed as: M ėf = −e − Gef − ∆τ − Cef + σ. (19) Remark 1. For ||ef || ≥ $, it can be noticed from the adaptive laws (15)-(16) that the gains θ̂i , γ increase if error trajectories move away from ||e|| = 0 (governed by eT ė > 0) and decrease if error trajectories do not move away from ||e|| = 0 (governed by the ’otherwise’ condition in (15)-(16) S2 which implies {eT ė ≤ 0} ∩ { i=0 θ̂i > 0} ∩ {γ > β}). Hence, So, the first laws of (15), (16) and the condition (23) yields ˙ ˙ ˙ θ̂0 ≥ α0 $, θ̂1 ≥ (α1 $2 )/||Γ||, θ̂2 ≥ (α2 $3 )/||Γ||2 , γ̇ ≥ α3 $. (24) Let V be a Lypaunov function. Using (19) and the relation eT ė = eT (ef − Ωe) (from (5)), the time derivative of V yields V̇ = eTf M ėf + (1/2)eTf Ṁ ef + eT ė = eTf (−e − Gef − ∆τ + σ) + (1/2)eTf (Ṁ − 2C)ef + eT (ef − Ωe). (25) 4 Further, substituting (13) into (25) and using Property 1 (implying eTf (Ṁ − 2C)ef = 0), V̇ is simplified as C. Stability Analysis Exploring the structures of the adaptive laws (15)-(17), three ˙ possible scenarios are identified: Case (1): θ̂i , γ̇ increase and V̇ = −eTf Gef − eT Ωe + eTf (−ρ̂(ef /||ef ||) + σ) ˙ ||ef || ≥ $; Case (2): θ̂i , γ̇ decrease and ||ef || ≥ $; Case (3) ≤ −eTf Gef − eT Ωe − (Y (ξ)T Θ̂ + γ)||ef || + Y (ξ)T Θ∗ ||ef || ˙ θ̂i = 0, γ̇ = 0 when ||ef || < $ ∀i = 0, 1, 2. ≤ −λmin (G)||ef ||2 − λmin (Ω)||e||2 − {(θ̂0 + γ − θ0∗ ) Theorem 2. The closed loop system (19) with control input + (θ̂1 − θ1∗ )||ξ|| + (θ̂2 − θ2∗ )||ξ||2 }||ef ||. (26) (13)-(17) guarantees e(t), ef (t), θ̃i (t), γ(t) to be Uniformly Ultimately Bounded (UUB) where θ̃i , (θ̂i − θi∗ ), i = 0, 1, 2. Thus, the sufficient condition to achieve V̇ < 0 would be Proof. The stability analysis of the overall system is carried ∗ ∗ ∗ θ̂0 + γ ≥ θ0 , θ̂1 ≥ θ1 and θ̂2 ≥ θ2 . (27) out for the three cases mentioned above using the following common Lyapunov function: Let the system (3) does not posses finite time escape [28]. 2 X 1 2 1 2 Then integrating both sides of the inequalities in (24) and θ̃i + γ . (33) V1 = V + 2α 2α i 3 using those results in (27) lead to the expressions of t1 , t2 , t3 i=0 in (21). So, for t ≥ tin + t̄ ˙ Case (1): θ̂i , γ̇ increase ∀i = 0, 1, 2 and ||ef || ≥ $. P ˙ 2 V̇ ≤ −λmin (G)||ef ||2 − λmin (Ω)||e||2 Note that i=0 α1i θ̃i θ̂i = Y (ξ)T (Θ̂ − Θ∗ )||ef ||. Then using ≤ −%m (||ef ||2 + ||e||2 ), (28) (15)-(16) and following the procedure in (26) one obtains where %m , min{λmin (G), λmin (Ω)}. Further, the definition of V yields 2 2 V ≤ %M (||ef || + ||e|| ), (29) V̇ ≤ −%V ⇒ V (t) ≤ V (tin + t̄)e−%(t−t̄) ∀t ≥ tin + t̄, (30) where % , %m /%M . Here θ̂i > 0, γ > β as gains were T increasing. S2 So, to ensure the ‘otherwise’ condition (i.e.T{e ė ≤ 0} ∩ { i=0 θ̂i > 0} ∩ {γ > β}), the condition e ė ≤ 0 (i.e. ||e(t)|| does not increase) needs to take place. From the definition of V , the upper bound of e follows p V (t) ≥ (1/2)||e(t)||2 ⇒ ||e(t)|| ≤ 2V (t) ∀t ≥ t0 . (31) Let ||e(tin + t̄)|| = ψ which implies V (tin + t̄) ≥ ψ 2 /2 from (31). As V (t) decreases exponentially ∀t ≥ tin + t̄ following (30), there exist a finite time δt = t − (tin + t̄) such that V (tin + t̄ + δt) =Sψ 2 /2 implying ||e(tin + t̄ + δt)|| ≤ ψ. 2 So, {eT ė ≤ 0} ∩ { i=0 θ̂i > 0} ∩ {γ > β} would occur at t ≥ tin +T where T ≤ t̄+δt and θ̂i , γ would start decreasing. The time δt is found from (30): ∀t ≥ tin + t̄ 2 ⇒ δt ≤ (1/%)ln{2V (tin + t̄)/ψ }. + Y (ξ)T (Θ̂ − Θ∗ )||ef || + γ||ef || ≤ −eTf Gef − eT Ωe − (Y (ξ)T Θ̂ + γ)||ef || + Y (ξ)T Θ∗ ||ef || where %M , max{µ2 , 1}. Substituting (29) into (28) and using the comparison Lemma [29] yields ψ 2 ≤ 2V (tin + t̄)e−%δt , V̇1 ≤ −eTf Gef − eT Ωe + eTf (−ρ̂(ef /||ef ||) + σ) (32) + Y (ξ)T (Θ̂ − Θ∗ )||ef || + γ||ef || ≤ −λmin (G)||ef ||2 − λmin (Ω)||e||2 ≤ 0. From (34) it can be inferred that V1 (t) ∈ L∞ . Thus, the definition of V1 yields γ(t), θ̃i (t), e(t), ef (t) ∈ L∞ ⇒ ξ(t), θ̂i ∈ L∞ . Thus, for this case the closed-loop system remains stable. The gains γ, θ̂i , i = 0, 1, 2 remain bounded for Case (1), decrease for Case (2) and remain constant for Case (3). Hence, ∃ γ̄, θ̄i ∈ R+ such that θ̂0 (t) ≤ θ̄0 , θ̂1 (t) ≤ θ̄1 , θ̂2 (t) ≤ θ̄2 , γ(t) ≤ γ̄ ∀t ≥ t0 . (35) ˙ Case (2): θ̂i , γ̇ decrease ∀i = 0, 1, 2 and ||ef || ≥ $. Using γ ≥ β (from (20)) and ||ef || ≤ ||Γ||||ξ|| yields: V̇1 ≤ −eTf Gef − eT Ωe + eTf (−ρ̂(ef /||ef ||) + σ) − Y (ξ)T (Θ̂ − Θ∗ )||ef || − γς||ξ||4 ≤ −eTf Gef − eT Ωe − (Y (ξ)T Θ̂ + γ)||ef || + Y (ξ)T Θ∗ ||ef || − ςβ||ξ||4 − Y (ξ)T (Θ̂ − Θ∗ )||ef || ≤ −ςβ||ξ||4 + 2||Γ||{θ0∗ + θ1∗ ||ξ|| + θ2∗ ||ξ||2 }||ξ|| − λmin (G)||ef ||2 − λmin (Ω)||e||2 . (36) Since 0 ≤ θ̂i (t) ≤ θ̄i , β ≤ γ ≤ γ̄ (from (20) and (35)), the definition of V1 in (33) yields V1 ≤ %M (||ef ||2 + ||e||2 ) + ζ, where ζ , Remark 4. The increment and decrement of θ̂i , γ can occur several times depending on the error incurred by the system. However, time interval ∆t between two successive decrement will always satisfy ∆t ≤ t̄ + δt. Moreover, high values of α0 , α1 , α2 , α3 help to reduce t̄ and achieve faster adaptation. (34) P2 1 ∗2 i=0 α i (θi + θ̄i2 ) + 1 2 α3 γ̄ . (37) Thus using (37) −λmin (G)||ef ||2 − λmin (Ω)||e||2 ≤ −%V1 + %ζ. (38) Substitution of (38) into (36) yields V̇1 ≤ −%V1 + fp (||ξ||), (39) 5 where fp (||ξ||) = −ςβ||ξ||4 + 2||Γ||{θ0∗ ||ξ|| + θ1∗ ||ξ||2 + + %ζ. Applying Descarte’s rule of sign change [31], one can verify that fp (||ξ||) has maximum one positive real root. Further, it is to be noticed that fp (||ξ|| = 0) = %ζ ∈ R+ and fp (||ξ||) → −∞ as ||ξ|| → ∞. Hence, according to Bolzano’s Intermediate Value Theorem [32], fp (||ξ||) will have at least one positive real root. So, combination of the Intermediate Value Theorem and Descarte’s rule of sign change reveals that fp (||ξ||) has exactly one positive real root. Therefore, the nature of roots of fp (||ξ||) will be either (i) one positive real root and three negative real roots or (ii) one positive real root, one negative real root and a pair of complex conjugate roots. θ2∗ ||ξ||3 } Let ι ∈ R+ be the positive real root of fp (||ξ||). Figure 1 depicts the nature of fp (||ξ||) depending on the various combination of roots [33]. It is to be noted that the actual graph and values of the roots of the polynomial fp (||ξ||) would depend on the values of the coefficients of fp (||ξ||). However, θ0∗ , θ1∗ , θ2∗ and ζ are unknown here. Nevertheless, to study the stability of the system, it is sufficient to analyse the nature of fp (||ξ||) (i.e. the instances when fp (||ξ||) > 0 or fp (||ξ||) ≤ 0) rather than determining the values of the roots. The nature of any polynomial can be understood from the occurrence of its real roots [33]. Moreover, the leading coefficient of fp (||ξ||) (the coefficient of the highest degree term ||ξ||4 ) is negative (as ς, β ∈ R+ ). As a matter of fact, one can notice from Fig. 1 that fp (||ξ||) ≤ 0 when ||ξ|| ≥ ι. Hence, the overall system would be UUB for this case. From the point of view of controller design, it is important to reduce ι such that better tracking accuracy can be achieved and this can be obtained by increasing ς. Similar to Case (1), V̇1 can be simplified for this case as V̇1 ≤ −eTf Gef − eT Ωe + eTf (−ρ̂(ef /$) + σ) ≤ −eTf Gef − eT Ωe − (Y (ξ)T Θ̂ + γ)(||ef ||2 /$) + Y (ξ)T Θ∗ ||ef || ≤ −λmin (G)||ef ||2 − λmin (Ω)||e||2 + Y (ξ)T Θ∗ ||ef ||. (40) For ||ef || < $, the system remains bounded inside the ball B$ , {||Γξ|| < $} as ef = Γξ. This implies that Y (||ξ||) ∈ L∞ . Hence, for ||ef || < $, ∃ϑ ∈ R+ such that ||Y (ξ)T Θ∗ ||||ef || ≤ $ϑ. (41) Let us define a scalar z as 0 < z < λmin (G). Then using (37) and (41), (40) is modified as V̇1 ≤ −λmin (Ω)||e||2 − {λmin (G) − z}||ef ||2 − z||ef ||2 + $ϑ ≤ −%1 V1 − z||ef ||2 + %1 ζ + $ϑ, (42) where %1 , {min{(λmin (G) − z), λmin (Ω)}}/%M . Hence, the system would be UUB when p (43) ||ef || = ||Γξ|| ≥ (%1 ζ + $ϑ)/z. Since the closed loop system remains UUB for both the cases ||ef || ≥ $ and ||ef || < $ using the common Lyapunov function (33), the overall closed loop system also remains UUB [34]. Remark 5. It is noteworthy that the condition (20) is necessary for stability of the system. Moreover, high values of ς helps to reduce ι which consequently can improve controller accuracy. However, one needs to be careful that too high value of ς may excite the condition γ ≤ β leading to the increment in all the gains γ, θ̂i , i = 0, 1, 2. Further, the scalar terms z, ϑ, ψ, µ2 , ζ, θ̄i and γ̄ are only used for the purpose of analysis and not used to design control law. Remark 6. The importance of the auxiliary gain γ can be realized from Theorems 1 and 2. It can be observed from (21) that t1 gets reduced due to the presence of α3 (contributed by γ̇ > 0) which leads to faster adaptation. Moreover, the negative fourth degree term −ςβ||ξ||4 in fp (||ξ||) (contributed by γ̇ < 0) ensures system stability for Case (2) by making fp (||ξ||) ≤ 0 for ||ξ|| ≥ ι. This also indicates the reason for selecting β > 0 while lower bounds of other gains θ̂i i = 0, 1, 2 are selected as zero. Figure 1. fp (||ξ||) with (a) one positive real root and three negative real roots (b) one positive real root, one negative real root and a pair of complex conjugate roots. Hence, the overall system would be UUB [29] for this case. ˙ Case 3: θ̂i = 0, γ̇ = 0, ∀i = 0, 1, 2 when ||ef || < $. Special Case: The quadratic term ||ξ||2 in uncertainty bound (9) is contributed by the matrix C(q, q̇) (through property 4 in (7)). EL systems such as robotic manipulator, underwater vehicles, ship dynamics etc. includes C(q, q̇). However, there also exist second order EL system (e.g. reduced order WMR system) which does not have the term C(q, q̇). For such systems, the following LIP structure would hold: ||σ|| ≤ θ0∗ + θ1∗ ||ξ|| , Y (ξ)T Θ∗ , (44) 6 where Y (ξ) = [1 ||ξ||]T and Θ∗ = [θ0∗ θ1∗ ]T . Hence, following the switching gain laws (14)-(17), the control laws for uncertainty structure (44) are modified as ρ̂ = θ̂0 + θ̂1 ||ξ|| + γ , Y (ξ)T Θ̂ + γ, (45) (i) for ||ef || ≥ $  S1 i T  αi ||ξ|| ||ef || if {e ė > 0} ∪ { i=0 θ̂i ≤ 0} ˙ θ̂i = ∪{γ ≤ β}   −αi ||ξ||i ||ef || otherwise, (46)  S1 T  α3 ||ef || if {e ė > 0} ∪ { i=0 θ̂i ≤ 0} γ̇ = (47) ∪{γ ≤ β}   3 −ςα3 ||ξ|| otherwise, (ii) for ||ef || < $ ˙ θ̂i = 0, γ̇ = 0, insufficient and error will increase again. However, K will not increase (rather it keeps on decreasing) until ||s|| > , which creates underestimation problem. Low (resp. High) value of  may force K to increase (resp. decrease) for longer duration when ||s|| ≥  (resp. ||s|| < ) resulting in escalation of the overestimation (resp. underestimation) problem of ASMC. Whereas, ASRC allows its gains to decrease when error trajectories move towards ||e|| = 0 and ||ef || ≥ $ (overcoming overestimation problem) and keeps the gains unchanged when they are sufficient to keep the error within the ball B$ (overcoming underestimation problem). Since the overestimation-underestimation problems are alleviated by ASRC for any $, one can in fact reduce $ for better tracking accuracy as long as chattering does not occur. III. A PPLICATION : N ONHOLONOMIC WMR (48) with θ̂i (t0 ) > 0, i = 0, 1, γ(t0 ) > β. (49) System stability employing (45)-(48) can be analysed exactly like Theorem 2 using the following Lyapunov function: V1 = V + 1 X (1/2αi )θ̃i2 + (1/2α3 )γ 2 . (50) i=0 One can verify that the cubic polynomial 2||Γ||{θ0∗ + θ1∗ ||ξ|| + θ2∗ ||ξ||2 }||ξ|| in fp (||ξ||) of Case (2) would be modified as quadratic polynomial 2||Γ||{θ0∗ + θ1∗ ||ξ||}||ξ|| using (44) and (50). Hence, following the argument in Remark 6, it can be noticed that a cubic term −ςα3 ||ξ||3 is selected in the adaptive law (48) for system stability. Thus, with EL system (3), only two structures are possible for ||σ||: (i) Y (ξ) = [1 ||ξ|| ||ξ||2 ]T , Θ∗ = [θ0∗ θ1∗ θ2∗ ]T and (ii) Y (ξ) = [1 ||ξ||]T , Θ∗ = [θ0∗ θ1∗ ]T . Both these situations are covered here. For better inference, the ASRC algorithm is summarized in Table I for various system structures. Table I ASRC A LGORITHM FOR VARIOUS S YSTEM S TRUCTURES System Structure (3) C(q, q̇) 6= 0 C(q, q̇) = 0 LIP structure of ||σ|| Control law (9) (44) (13) - (18) (13), (45) - (49) Comparison with existing Adaptive-Robust law: To gain further insight into the advantage of the proposed adaptive law, the following adaptive law of ASMC [17]-[18] for switching gain K is provided: ( K̄||s||sgn(||s|| − ), if K > β K̇(t) = (51) β if K ≤ β, where , K̄ ∈ R+ are user defined scalars and s is the sliding surface. It can be observed from (51) that when ||s|| ≥  the switching gain K increases monotonically even if error trajectories move close to ||s|| = 0. This gives rise to the overestimation problem of switching gain. Again, even if K is sufficient to keep ||s|| within , it decreases monotonically when ||s|| < . So, at certain time, K would become Figure 2. Schematic of a WMR. Nonholonomic WMR, which has vast applications in transportation, planetary exploration, surveillance, security, humanmachine-interfaces etc., provides a unique platform to test the proposed control law. Hence, the performance of the proposed ASRC is verified using a commercially available ’PIONEER 3’ WMR in comparison to Adaptive Sliding Mode Control (ASMC) [17]-[18]. The ASMC law is detailed in [17]-[18] while it follows the adaptive law (51). The Euler-Lagrangian formulation of a nonholonomic WMR (Fig. 2) is given as [35]: M (q)q̈ + C(q, q̇)q̇ = Lτ − A∗ T λ∗ ,  m 0 mdsinϕ 0  0 m −mdcosϕ 0  ¯ mdsinϕ −mdcosϕ I 0 where M =    0 0 0 Iw 0 0 0 0     2 0 0 mdϕ̇ cosϕ 0 0 mdϕ̇2 sinϕ        , C(q, q̇)q̇ =   , τ = τr . 0 0 0 L =     τl   1 0 0 0 1 0 (52)  0 0  0 , 0 Iw 7 Here q ∈ R5 = {xc , yc , ϕ, θr , θl } is the generalized coordinate vector of the system; (xc , yc ) are the coordinates of the center of mass (CM) of the system and ϕ is the heading angle; (θr , θl ) and (τr , τl ) are rotation and torque inputs of the right ¯ Iw , rw and b represent the and left wheels respectively; m, I, system mass, system inertia, wheel inertia, wheel radius and robot width respectively; d is the distance to the CM from the center of the line joining the two wheel axis; A∗ and λ∗ represent the constraint matrix and vector of constraint forces (Lagrange multipliers) respectively. Expressions of A∗ and I¯ can be found in [35]. It is noteworthy that the system (52) has only two control inputs although having five generalized coordinates. In fact, for WMR, one can only directly control wheel positions (θr , θl ) rather than (xc , yc , ϕ). So, the system dynamics can be represented as a combination of a reduced order dynamics and kinematic model for efficient controller design as in [30], [35]: specifically in the face of unmodeled dynamics and timevarying uncertainty. During the experiment, the payload of the system may be varied due to addition or removal of sensors according to the application requirement; this causes variations in overall system mass, center of mass, inertia etc. Further, the original systems dynamics (53) is formed based on the pure rolling assumption. This assumption is not satisfied in practice due to the friction effect between wheel and surface; this is denoted by f (q̇R ) in the WMR dynamics (57). Apart from this, there are also effects of external disturbances ds . However, the evaluation of switching gain for robust controller like [26] requires prior knowledge of the bound of the uncertainties. This implies the designer needs to have the knowledge of θ0∗ , θ1∗ for WMR (due to the absence of Coriolis term in the WMR dynamics). This further means that the designer should have the knowledge of the parametric variations in systems as well as bound of f (q̇R ) and ds . This demands tedious modelling job which is also not always accurate. The benefit, applicability and efficacy of the proposed MR q̈R + CR q̇R = τ, (53) ASRC can be realized in this context. ASRC does not require any knowledge of the systems dynamics terms MR , f (q̇R ) and  rw b   rw b d s of WMR system (57) (and for the matter of fact any EL sysb 2 cos(ϕ) − dsin(ϕ) b 2 cos(ϕ) + dsin(ϕ) rw b tem representing dynamics (3)). Further, while implementing   rw b sin(ϕ) + dcos(ϕ)  b 2 b 2 sin(ϕ) − dcos(ϕ)  the control law, it does not need any knowledge of θ0∗ , θ1∗ and   q̇ =  rw /b −rw /b  q̇R , rather adapts these terms by the adaptive law (46)-(49) (since   1 0 Coriolis component is zero, the ASRC algorithm applied to 0 1 | {z } WMR is based on the control laws (13), (45)-(49)). Hence, S(q) ASRC eliminates any effort to model the system as well as (54) avoids any need to characterize the time-varying uncertain parameters and disturbances. It is to be noted that S(q) is only   used for coordinate transformation and WMR pose (xc , yc , ϕ) k k2 where MR = S T M S = 1 , (55) representation and, not for control law design. k2 k1 Hence, the objective is to apply ASRC and ASMC to the k1 = Iw + {I¯ + m(b2 /4 − d2 )}(rw 2 /b2 ), d reduced order WMR system (57) to track a desired qR (t) ¯ w 2 /b2 ), k2 = {m(b2 /4 + d2 ) − I}(r d which in effect track a desired q (t) through (54). To illustrate   0 0 CR = S T (M Ṡ + CS) = , qR = [θr θl ]T . (56) the fact: one can direct a WMR to move in a specified circular 0 0 path by designing two suitable different and fixed wheel velocities or in a Lawn-Mower path by applying approximated As WMR moves on ground, the gravity vector g(q) and the square-wave velocity profile to the wheels [26]. potential function would certainly be zero which implies that MR , CR satisfies the Properties 1 and 3 [30], [36]. The main implication of system Property 1 is to hold eTf (Ṁ −2C)ef = 0 A. Experimental Scenario and this can be easily verified from (55)-(56). The WMR The WMR is directed to follow a circular path using the dynamics (52) is based on rolling without slipping condition following desired trajectories: and hence the term f (q̇R ) is omitted. However, in practical θrd = (4t + π/10)rad, θld = (3t + π/10)rad. circumstances a WMR is always subjected to uncertainties like friction, slip, skid, external disturbance etc. Hence, incorpoPIONEER 3 uses two quadrature incremental encoders (500 rating (56), the system dynamics (53) is modified as ppr) and always starts from θr (t0 ) = θl (t0 ) = 0 and the initial wheel position error (π/10, π/10) rad helps to realize MR q̈R + f (q̇R ) + ds = τ, (57) the error convergence ability of the controllers. The desired where f (q̇R ) and ds are considered to be the unmodelled dy- WMR pose (xdc , ycd , ϕd ) and actual WMR pose (xc , yc , ϕ) namics and disturbance respectively. Often, simple controllers can be determined from (54) using (θ̇rd , θ̇ld ) and (θ̇r , θ̇l ) such as open loop control (OLC), PID controller are used (obtained from encoder) respectively with rw = 0.097m, b = in practice for their simplicity. However, the various works 0.381m, d = 0.02m (supplied by the manufacturer). The such as [26] and the references of [26] (e.g., reference [15] control laws for both ASRC and ASMC are written in VC++ in [26]) have discussed the need to formulate advanced robust environment. Considering the hardware response time, the tracking controllers for WMR compared to conventional open sampling interval is selected as 20ms for all the controllers. loop control or PID control to improve tracking accuracy, Further, to create a dynamic payload variation, a 3.5kg payload 8 is added (kept for 5 sec) and removed (for 5 sec) periodically on the robotic platform at different places. The controller parameters for ASRC are selected as: G = Ω = I, $ = 0.5, θ̂i (t0 ) = γ(t0 ) = 20, αi = α3 = 10 ∀i = 0, 1, β = 0.1, ς = 10. Further, the controller parameters for ASMC are selected as s = ef , K̄ = 10, K(t0 ) = 35,  = 0.5. B. Experimental Results and Comparison The path tracking performance of ASRC is depicted in Fig. 3 while following the desired circular path. The tracking performance comparison of ASRC with ASMC is illustrated in Fig. 4 in terms of Ep ( defined by the Euclidean distance in xc , yc error) and Eτ (defined as ||τ ||). ASMC framework is built on the assumption that uncertainties are upper bounded by an unknown constant (i.e. θ1∗ = θ2∗ = 0 for general EL systems and θ1∗ = 0 for this particular WMR based experiment as CR = 0). This assumption is restrictive in nature for EL systems and the switching gain is thus insufficient to provide the necessary robustness. As a matter of fact, ASRC provides better tracking accuracy over ASMC. To evaluate the benefit of the proposed adaptive-robust law, the evaluation of switching gain for ASMC and ASRC are provided in Fig. 5 and 6 respectively. Figure 5 reveals that K, the switching gain of ASMC, increases even when ||s|| approaches towards ||s|| = 0 during the time t=0−1.2 sec. This is due to the fact that K does not decrease unless ||s|| <  and this gives rise to the overestimation problem. On the other hand for ASRC, it can be seen from Fig. 6 that all the gains d ) decreases (i.e. γ, θ̂0 , θ̂1 ) decrease when ||eR || (eR = qR − qR during t=0−1 sec when ||efR || ≥ $ (||efR || = ėR + ΩeR ). So, ASRC overcomes the overestimation problem which is encountered in ASMC. Further, K decreases monotonically for time durations t=1.2−38.5 sec, when ||s|| < . This monotonic decrement makes K insufficient to tackle uncertainties at certain time creating underestimation problem. As a result, ||s|| starts increasing again for t > 38.5 sec leading to poor tracking accuracy and K increases again when ||s|| ≥ . Gains of ASRC, on the contrary, stay unchanged for t > 1 sec when the gains are sufficient to keep ||efR || < $ avoiding any underestimation problem. Further the evaluation ρ̂ of ASRC is shown in Fig. 7. It is to be noted that ρ̂ = θ̂0 + θ̂1 ||ξ|| + γ for WMR. Hence, though θ̂0 , θ̂1 and γ remain constant for t > 1 sec, ρ̂ is not constant for t > 1 due to the presence of ξ. This is shown by magnifying ρ̂ for time durations t = 1−5 sec and t = 20 − 25 sec in Fig. 7. While reduction of  would cause more overestimation problem for ASMC, Table II shows how tracking accuracy of ASRC improves with reduced $ (other control parameters are kept unchanged) while chattering is not observed in control input. $ = 0.5 0.053 89.78 $ = 0.3 0.0421 75.46 Figure 4. Performance comparison between ASRC and ASMC. Figure 5. Switching gain evaluation of ASMC. Table II P ERFORMANCE OF ASRC FOR VARIOUS $ RMS (root mean squared) Ep (m) RMS ||τ || (Nm) Figure 3. Circular path tracking with ASRC. $ = 0.1 0.0362 67.13 It can be noticed from Fig. 7 that initials gains are high enough such that ||eR || decreases from the beginning and so do the gains γ, γ̂i . Hence, it would be prudent to verify the capability of ASRC in alleviating the overestimation- 9 Figure 8. Performance comparison between various controllers. Figure 6. Switching gain evaluation of ASRC. Figure 9. Switching gain evaluation of ASRC2. of the gains. Figure 7. Evaluation of ρ̂ of ASRC. underestimation problem while starting with relatively low gains. Therefore, the same experiment for ASRC is repeated with much lower initial value of the gains θ̂i , i = 0, 1 and γ. Previously, the initial values were γ(t0 ) = θ̂i (t0 ) = 20. This time they are selected to be γ(t0 ) = θ̂i (t0 ) = 10. The tracking performance and evaluation of the switching gain for the later case is shown in Fig. 8 and 9 respectively. Here ASRC1 denotes when γ(t0 ) = θ̂i (t0 ) = 20 and ASRC2 denotes when γ(t0 ) = θ̂i (t0 ) = 10. It can be noticed from Fig. 8 and 9 that initially the tracking error is high for ASRC2 compared to ASRC1 and ASMC (initial gain K(t0 ) = 35) due to low initial gains. However, at t ≥ 5sec tracking accuracy of ASRC2 begins to improve as the gains became sufficient enough to negotiate the uncertainties and eventually the tracking performance of ASRC2 is found to be similar to ASRC1 from t ≥ 12sec and much improved compared to ASMC. This proves that the proposed adaptive law can perform satisfactorily even with low initial conditions Another important aspect to verify is whether ASRC2 can alleviate the over- and under-estimation issue similar to ASRC1. It can verified from Fig. 9 that when ||efR || > $, the gains follow the pattern of ||eR || according to the adaptive laws (46)-(47). Due to the initial low values, ||eR || increases and so do the gains; similarly at t ≥ 5sec the gains decrease as ||eR || decreases. Further, at t ≥ 8sec the gains remain unchanged when they were sufficient to keep the filtered tracking error ||efR || ≤ $, according to the law (48), thus overcoming the underestimation problem. Moreover, that gains do not increase during t = 3.78 − 8sec when ||eR || decrease sand thus avoids the overestimation problem. Hence, low initial gain conditions do not affect the capability ASRC2 in alleviating the over- and under-estimation problem. Moreover, it can be noticed from the first conditions of (46)(47) that the rate of increment of θ̂0 and γ are same; hence they have similar value in Fig. 9 when ||eR || increases during t = 0 − 3.7sec (please note that we have selected α0 = α3 = 10 in the experiment) . However, their rate of falling are different (second conditions of (46)-(47)); thus, they exhibit different falling pattern in Fig. 9. 10 IV. C ONCLUSIONS A novel ASRC law is proposed for a class of uncertain EL systems where the upper bound of uncertainty possesses a LIP structure. The benefit of the ASRC lies in the fact that it is independent of the nature of the uncertainty and can negotiate uncertainties which can be LIP or NLIP. ASRC does not presume the overall uncertainty to be bounded by a constant and avoids putting any prior restriction on states. Moreover, the proposed adaptive law alleviates the overestimationunderestimation problem of switching gain. The experimental results validate the efficacy of the proposed control law in comparison with the existing adaptive sliding mode control. The future work would be to extend the ASRC law for systems with unmatched disturbances. R EFERENCES [1] X. Liu, H. Su, B. Yao and J. Chu, Adaptive robust control of a class of uncertain nonlinear systems with unknown sinusoidal disturbances, 47th IEEE Conference on Decision and Control, pp. 2594-2599, 2008. [2] B. Bandyopadhayay, S. Janardhanan and S. K. Spurgeon, Advances in Sliding Mode Control, Springer-Verlag, New York, 2013. [3] X. Zhu, G. Tao, B. Yao and J. Cao, Adaptive robust posture control of parallel manipulator driven by pneumatic muscles with redundancy, IEEE/ASME Transactions on Mechatronics, vol. 13(4), pp. 441-450, 2008. [4] X. Zhu, G. Tao, B. Yao and J. Cao, Integrated direct/indirect adaptive robust posture control of parallel manipulator driven by pneumatic muscles, IEEE Transactions on Control System Technology, vol. 17(3), pp. 576-588, 2009. [5] G. Zhang, J. Chen and Z. Lee, Adaptive robust control of servo mechanisms with partially known states via dynamic surface control approach, IEEE Transactions on Control System Technology, vol. 18(3), pp. 723-731, 2010. [6] C.Guan and S. Pan, Nonlinear adaptive robust Control of single-rod electro-hydraulic actuator with unknown nonlinear parameters, IEEE Transactions on Control System Technology, vol. 16(3), pp. 434-445, 2008. [7] C. Hu, B. Yao, Z. Chen, and Q. Wang, Adaptive robust repetitive control of an industrial biaxial precision gantry for contouring tasks, IEEE Transactions on Control System Technology, vol. 19(6), pp. 1559-1568, 2011. [8] W. Sun, Z. Zhao and H. Gao, Saturated adaptive robust control for active suspension systems, IEEE Transactions on Industrial Electronics, vol. 60(9), pp. 3889-3896, 2013. [9] S. Islam, P. X. Liu and A. E. Saddik, Robust control of four rotor unmanned aerial vehicle with disturbance uncertainty, IEEE Transactions on Industrial Electronics, vol. 63(3), pp. 1563-1571, 2015. [10] Z. Chen, B. Yao and Q. Wang, µ-synthesis based adaptive robust posture control of linear motor driven stages with high frequency dynamics: a case study, IEEE/ASME Transactions on Mechatronics, vol. 20(3), pp. 1482-1490, 2015. [11] Z. Liu, H. Su and S. Pan, A new adaptive sliding mode control of uncertain nonlinear dynamics, Asian Journal of Control, vol. 16(1), pp. 198-208, 2014. [12] Q. Chen, L. Tao, Y. Nan and X. Ren, Adaptive nonlinear sliding mode control of mechanical servo system with lugre friction compensation, ASME Journal of Dynamic Systems, Measurement, and Control, vol. 138, DOI: 10.1115/1.4032068, 2016. [13] A. Nasiri, S. K. Nguang and A. Swain, Adaptive sliding mode control for a class of MIMO nonlinear systems with uncertainty, Journal of The Franklin Institute, vol. 351, pp. 2048-2061, 2014. [14] Q. Meng, T. Zhang, X. Gao and J. Y. Song, Adaptive sliding mode fault-tolerant control of the uncertain stewart platform based on offline multibody Dynamics, IEEE/ASME Transactions on Mechatronics, vol. 19(3), pp. 882-894, 2014. [15] S. Liu, H. Zhou, X. Luo and J. Xiao, Adaptive sliding fault tolerant control for nonlinear uncertain active suspension systems, Journal of The Franklin Institute, DOI 10.1016/j.jfranklin.2015.11.002, 2015. [16] S. Mobayen, An adaptive chattering-free PID sliding mode control based on dynamic sliding manifolds for a class of uncertain nonlinear systems, Nonlinear Dynamics, DOI 10.1007/s11071-015-2137-7, 2015. [17] F. Plestan, Y. Shtessel, V. Bregeault and A. Poznyak, New methodologies for adaptive sliding mode control, International Journal of Control, vol. 83(9), pp. 1907-1919, 2010. [18] F. Plestan, Y. Shtessel, V. Bregeault and A. Poznyak, Sliding mode control with gain adaptation - application to an electropneumatic actuator state, Control Engineering Practice, vol. 21, pp. 679-688, 2013. [19] V. Utkin and A. Poznyak, Adaptive sliding mode control with application to super-twist algorithm: equivalent control method, Automatica, vol. 49, pp. 39-47, 2013. [20] J. A. Moreno, D. Y. Negrete, V. Torres-Gonzalez and L. Fridman, Adaptive continuous twisting algorithm, International Journal of Control, DOI: 10.1080/00207179.2015.1116713, 2015. [21] V. Adetola, M. Guay and D. Lehrer, Adaptive estimation for a class of nonlinearly parametrized dynamical systems, IEEE Transactions on Automatic Control, vol. 59(10), pp. 2818-2824, 2014. [22] A. M. Annaswamy, F. P. Skantze and A-P Loh, Adaptive control of continuous time systems with convex/concave Parametrization, Automatica, vol. 34(1), pp. 33-49, 1998. [23] M. W. Spong, S. Hutchinson and M. Vidyasagar, Robot Dynamics and Control, John Wiley and Sons, New York, 2004. [24] W. Shang and S. Cong, Motion Control of parallel manipulators using acceleration feedback, IEEE Transactions on Control System Technology, vol. 20(1), pp. 314-320, 2014. [25] T. Y. Choi, B. S. Choi and K. H. Seo, Position and compliance control of a pneumatic muscle actuated manipulator for enhanced safety, IEEE Transactions on Control System Technology, vol. 19(4), pp. 832-842, 2011. [26] S. Roy, S. Nandy, R. Ray and S. N. Shome, Time delay sliding mode control nonholonomic wheeled mobile robot: experimental validation, IEEE International Conference on Robotics and Automation, pp. 28862892, 2014. [27] J. Wu, J. Huang, Y. Wang and K. Xing, Nonlinear disturbance observerbased dynamic surface control for trajectory tracking of pneumatic muscle system, IEEE Transactions on Control System Technology, vol. 22(2), pp. 440-455, 2014. [28] W. M. Haddad and V. Chellaboina, Nonlinear dynamical systems and control: a Lyapunov-based approach, Princeton University Press, 2008. [29] H. Khalil, Nonlinear systems, 3rd ed. Prentice Hall, 2002. [30] T. Das and I. N. Kar, Design and implementation of an adaptive fuzzy logic-based controller for wheeled mobile robots, IEEE Transactions on Control System Technology, vol. 14(3), pp. 501-510, 2006. [31] B. Anderson, J. Jackson and M. Sitharam, Descartes’ Rule of Signs Revisited, The American Mathematical Monthly, vol. 150, pp. 447-451, 1998. [32] S. B Russ, A Translation of Bolzano’s Paper on the Intermediate Value Theorem, Historia Mathematica, vol. 2, pp. 156-185, 1980. [33] K. T. Leung, I. A. C Mok and S. N. Suen Polynomials and functions, Honk Kong University Press, 1992. [34] D. Liberzon, Switching in systems and control, Birkhäuser, 2003. [35] P. Coelho and U. Nunes, Path-following control of mobile robots in presence of uncertainties, IEEE Transactions on Robotics and Automation, vol. 21, no. 2, pp. 252-261, 2005. [36] G. Campion, B. d’Andrea-Novel and G. Bastin, Modelling and state feedback control of nonholonomic mechanical systems, 30th IEEE Conference on Decision and Control, pp. 1184-1189, 1991.
3cs.SY
How fast can we make interpreted Python? Russell Power Alex Rubinsteyn arXiv:1306.6047v2 [cs.PL] 13 Aug 2013 New York University {power,alexr}@cs.nyu.edu Abstract Python is a popular dynamic language with a large part of its appeal coming from powerful libraries and extension modules. These augment the language and make it a productive environment for a wide variety of tasks, ranging from web development (Django) to numerical analysis (NumPy). Unfortunately, Python’s performance is quite poor when compared to modern implementations of languages such as Lua and JavaScript. Why does Python lag so far behind these other languages? As we show, the very same API and extension libraries that make Python a powerful language also make it very difficult to efficiently execute. Given that we want to retain access to the great extension libraries that already exist for Python, how fast can we make it? To evaluate this, we designed and implemented Falcon, a high-performance bytecode interpreter fully compatible with the standard CPython interpreter. Falcon applies a number of well known optimizations and introduces several new techniques to speed up execution of Python bytecode. In our evaluation, we found Falcon an average of 25% faster than the standard Python interpreter on most benchmarks and in some cases about 2.5X faster. 1. Introduction Python is popular programming language, with a long history and an active development community. A major driver of Python’s popularity is the diverse ecosystem of libraries and extension modules which make it easy to do almost anything, from writing web-servers to numerical computing. But despite significant effort by Python’s developers, the performance of Python’s interpreter still lags far behind implementations of languages such as Lua and JavaScript. What differentiates Python from “faster” languages? Obviously, implementation choices (JIT vs. interpreter) can have a dramatic effect on performance. In the case of Python, however, the landscape of choices is severely constrained by the very same API that makes it easy to extend. The standard interpreter for Python (called CPython) exposes a low-level API (the Python C API [4]) which allows for building extension libraries and for embedding the interpreter in other programs. The Python C API allows access to almost every aspect of the interpreter, including inspecting the current interpreter state (what threads are running, function stacks, etc..) and pulling apart the representation of various object types (integer, float, list, dictionary, or user-defined). For performance reasons, many Python libraries are written in C or another compiled language, and interface to Python via the C API. In an ideal world, any implementation of Python’s semiformal specification [19] would be interchangeable with the CPython implementation. Unfortunately, to avoid breaking libraries, an alternative implementation must also support the full C API. While the size of the C API (∼700 functions) is burdensome, what really makes it problematic is the degree to which it exposes the internal memory layout and behavior of Python objects. As a result of this many Python extensions have become intimately coupled to the current implementation of the CPython interpreter. For instance, modifying the layout of the basic object format (for example, to use less memory) breaks even source level compatibility with existing extensions. The value of these extensions to Python is hard to overstate. Python already has a fast JIT compiler in the form of PyPy [9], but is has not seen widespread adoption. This is, to a large extent, due to the lack of support for existing CPython extension libraries. Replacing these libraries is not a simple undertaking; NumPy [16] alone consists of almost 100k lines of C source, and the SciPy libraries which build upon it are another 500k lines. To evaluate how much we can improve over CPython (without breaking existing extension modules), we developed an alternative Python virtual machine called Falcon. Falcon converts CPython’s stack-oriented bytecode into a register-based format and then performs optimizations to remove unnecessary operations and occasionally elide type checks. Falcon’s register bytecode is then executed by a threaded interpreter, which attempts to accelerate common code patterns using attribute lookup caching and register tagging. Overall, we found that: • A combination of register conversion, simple bytecode optimization, and a virtual machine with threaded dispatch result in an average 25% speedup over CPython. On certain benchmarks, Falcon was up to 2.5X faster. the array of local values? This is the essence of a register bytecode. Every instruction explicitly labels which registers (local variable slots) it reads from and to which register it writes its result. Translated into register code, the above example would look like: r2 = B I N A R Y _ A D D( r0 , r1 ) R E T U R N _ V A L U E r2 • Just-in-time register conversion and optimization are fast enough to run online for every function. This means that a system like Falcon can accelerate any code without the need for profiling and compilation heuristics. Figure 3. Register code for adding two inputs When converted into register code, the local variables and z are represented by the registers r0, r1 and r2. Since the source and destination registers are part of each instruction, it is possible to express this function using only two instructions. The downside to Falcon’s register code format (like any register code) is that each instruction must be larger to make room for register arguments. There are two advantages to register code which make the space increase worthwhile. The first is a potential for reducing the time spent in virtual machine dispatch by reducing the number of instructions that must be executed. Previous research has verified that switching from a stack-based virtual machine to a register machines can improve performance [12, 18]. Additionally, it is much easier to write optimizations for a register code. The reason for this is that when every instruction implicitly affects a stack, program analyses and optimizations must track these side effects in some form of virtual stack. A register code, on the other hand, admits the expression of more compact optimization implementations (section 3.2), since instructions only depend on each other through explicit flows of data along named registers. x, y 2. Overview Falcon does not replace the standard CPython interpreter, but rather runs inside of it. A user-defined function can be marked for execution by Falcon with the decorator @falcon. When a decorated function is called, Falcon translates that function’s stack bytecode into Falcon’s more compact register code. This register code is then optimized to remove redundant computations and decrease the number of registers needed by a function. The optimized register code is then passed on to Falcon’s virtual machine for evaluation. For example, consider executing the following function, which adds its two inputs, assigns their sum to a local variable, and then returns that variable: def add (x , y ): z = x + y return z Figure 1. Python function that adds two inputs When Python first encounters this code, it is compiled into the following bytecode. 3. Compiler LOAD_FAST LOAD_FAST BINARY_ADD STORE_FAST LOAD_FAST RETURN_VALUE (x) (y) (z) (z) Figure 2. Python stack code that adds two inputs Each operation in Python’s bytecode implicitly interacts with a value stack. Python first pushes the values of the local variables x and y onto the stack. The instruction BINARY_ADD then takes these two values, adds them, and pushes this new result value onto the stack. Where did the values of the local variables come from? In addition to the stack, Python’s virtual machine maintains a distinct array of values for named local variables. The numerical arguments attached to the LOAD_FAST and STORE_FAST instructions indicate which local variable is being loaded or stored. Even from this simple example, we can see that Python bytecode burdens the virtual machine with a great deal of wasteful stack manipulations. Could we get better performance if we did away with the stack and instead only used The Falcon compiler is structured as a series of passes, each of which modifies the register code in some way. To illustrate the behavior of each pass we will use a simple example function called count_threshold - which counts the number of elements in a list below a given threshold: def c o u n t _ t h r e s h o l d(x , t ): return sum ([ xi < t for xi in x ]) For count_threshold Python generates the following stack bytecode (Figure 4): Before we can do anything else, we need to convert our original stack machine bytecode to the equivalent register code. 3.1 Stack-to-register conversion To convert from Python stack code to register code Falcon uses abstract interpretation [10]. In Falcon this takes the form of a “virtual stack” which stores register names instead of values. Falcon steps through a function’s stack operations, evaluates the effect each has on the virtual stack, and emit an equivalent register machine operation. LOAD_GLOBAL BUILD_LIST LOAD_FAST GET_ITER 10: FOR_ITER STORE_FAST LOAD_FAST LOAD_FAST COMPARE_OP LIST_APPEND JUMP_ABSOLUTE 31: C A L L _ F U N C T I O N RETURN_VALUE ( sum ) (x) ( to 31) ( xi ) ( xi ) (t) ( <) Python Falcon BUILD_LIST 0 r5 = BUILD_LIST 0 Stack h4i → h5, 4i instructions directly, we can alias these variables to specially designated register names, which simplifies our code and reduces the number of instructions needed. 10 Python Falcon LOAD_FAST 0 (x) Stack h5, 4i → h1, 5, 4i Figure 4. Python stack machine bytecode Handling control flow For straight-line code this process is fairly easy; most Python instructions have a fairly straightforward effect on the stack. But what happens when we encounter a branch? We need to properly simulate both execution paths. To handle this situation, we must make a copy of our virtual stack, and evaluate both sides of the branch. With branches come merge points; places where two or more branches of execution come together. Each thread of control flow might have assigned different register names to each stack position. To handle this situation Falcon inserts rename instructions before merge points, ensuring that all incoming register stacks are compatible with each other. (This is the same mechanism employed by compilers which use static single assignment form (SSA)[11] to resolve φnodes.) Register r1 is aliased to the local variable x. Therefore for the LOAD_FAST operation here, we don’t need to generate a Falcon instruction, and can instead simply push r1 onto our virtual stack. GET_ITER pops a sequence off of the stack and pushes back an iterator for the sequence. Python Falcon GET_ITER r6 = GET_ITER(r1) Stack h1, 5, 4i → h6, 5, 4i FOR_ITER is a branch instruction. It either pushes the next element in the iterator onto the stack and falls-through to the next instruction, or pops the iterator off the stack and jumps to the other side of the loop. Python Falcon FOR_ITER r7 = FOR_ITER(r6) Stack h6, 5, 4i → h7, 6, 5, 4i or h5, 4i Example conversion Let’s walk through how this works for the example stack code above (figure 4). First we find the value of the function “sum” using the LOAD_GLOBAL instruction. In the CPython interpreter, LOAD_GLOBAL looks up a particular name in the dictionary of global values and pushes that value onto the stack. Since the set of literal names used in a function is known at compile time, the instruction can simply reference the index of the string “sum” in a table of constant names. The equivalent register machine instruction assigns the global value to a fresh register (in this case r4). For brevity, the “stack” column in the listings below will show just the register number for each instruction. Python Falcon LOAD_GLOBAL 0 r4 = LOAD_GLOBAL 0 Stack hi → h4i The effect of this operation on the virtual stack is to push the register r4 on top. When a later operation consumes inputs off the stack, it will be correctly wired to use r4 as an argument. BUILD_LIST constructs an empty list to contain the results. We create a new register r5 and push it onto the stack. Python has special operations to load and store local variables and to load constants. Rather than implement these One branch of the FOR_ITER instruction takes us into inner loop, which continues until the iterator is exhausted: Python Falcon STORE_FAST (xi) r3 = r7 LOAD_FAST (xi) LOAD_FAST (t) COMPARE_OP r8 = r3 > r2 LIST_APPEND APPEND(r5, r8) JUMP_ABSOLUTE JUMP_ABSOLUTE Stack h7, 6, 5, 4i → h6, 5, 4i h6, 5, 4i → h3, 6, 5, 4i h3, 6, 5, 4i → h2, 3, 6, 5, 4i h2, 3, 6, 5, 4i → h8, 6, 5, 4i h8, 6, 5, 4i → h6, 5, 4i h6, 5, 4i The behavior of the LIST_APPEND instruction here might look somewhat surprising; it appears to “peek into” the stack to find r5. This special behavior is unique to the LIST_APPEND instruction, and likely is a result of past performance tuning in the CPython interpreter (building lists is a very common operation in Python). And the other branch takes us to our function’s epilogue: Python Falcon CALL_FUNCTION (sum) r9 = sum(r4) RETURN_VALUE RETURN_VALUE(r9) Stack h5, 4i → h6i h6i → hi Operations with dynamic stack effects In the above example, the effect of each instruction on the stack was known statically. It turns out that this is the case for almost all Python instructions. In fact, only one operation (END_FINALLY) has a stack effect that must be determined at runtime. This instruction appears in functions which have a try...finally block, and determines whether a caught exception should be re-raised. While it is possible to handle such an instruction dynamically (by inserting branches in the generated code for each possible stack effect), we chose a much simpler option - we simply do not compile functions containing this instruction. Instead these functions are evaluated using the existing Python interpreter. As this instruction is relatively rare, (occurring in only 4% of the functions in the Python standard library), and is almost never found in performance sensitive code, the cost of not supporting it is minimal. stead use the original source (r7). In the code from Figure 5, copy propagation changes “r8 = COMPARE_OP(r3, r2)” into “r8 = COMPARE_OP(r7, r2)”. By itself, this optimization will not improve performance. Instead, it enables other optimizations to remove useless instructions and to reuse unoccupied registers. Dead Code Elimination If the value contained in a register is never used in a program (likely to occur after copy propagation), it may be possible to delete the instruction which “created” that register. Instructions which lack side effects (simple moves between registers) are safe to delete, whereas instructions which may run user-defined code (such as BINARY_ADD) must be preserved even if their result goes unused. Once copy propagation is applied to the code above, the register r3 is never used. Thus, the move instruction “r3 = r7” gets deleted by dead code elimination. 3.2 Bytecode Optimizations After the stack to register pass, the bytecode for count_threshold now looks like Figure 5. bb_0 : r4 = L O A D _ G L O B A L ( sum ) r5 = B U I L D _ L I S T r6 = GET_ITER ( r1 ) -> bb_10 bb_10 : r7 = FOR_ITER ( r6 ) -> bb_13 , bb_31 bb_13 : r3 = r7 r8 = C O M P A R E _ O P( r3 , r2 ) L I S T _ A P P E N D( r5 , r8 ) J U M P _ A B S O L U T E() -> bb_10 bb_31 : r9 = C A L L _ F U N C T I O N( r5 , r4 ) R E T U R N _ V A L U E( r9 ) Figure 5. Unoptimized register code Note that rather than using positions in the code for jump targets, Falcon splits up code into basic blocks (indicated with the bb_* prefix). This change has no effect on the code that ultimately gets run by the virtual machine but greatly simplifies the implementation of optimization passes. The register machine bytecode emitted from the stack-toregister pass tends to be sub-optimal: it uses too many registers and often contains redundant loads used to emulate the effect of stack operations. To improve performance, we perform a number of optimizations that remove these redundant operations and improve register usage. The advantage of switching to a register code becomes clear at this point; we can apply known optimization techniques to our unoptimized register code with almost no modification. The optimizations used in Falcon are common to most compilers; we briefly describe them and their application to Falcon here. Copy Propagation Whenever a value is copied between registers (e.g. r3 = r7), it is possible to change later uses of the target register (r3) to in- Register Renaming Even if a register is used at some point in the program, it might not necessarily be “alive” for the entire duration of a function’s execution. When two registers have nonoverlapping live ranges, it may be possible to keep just one of them and replace all uses of the other register. This reduces the total number of registers needed to run a function, saving memory and giving a slight performance boost. Register code after optimization After Falcon’s optimizations are applied to the bytecode in 5, extraneous store instructions (such as r3 = r7) are removed. Furthermore, register renaming causes the registers r7 and r4 to be used repeatedly in place of several other registers. The optimized register bytecode achieves a greater instruction density, compared with the original stack code. Optimization in general reduces the number of instructions by 30%, with a similar improvement in performance. bb_0 : r4 = L O A D _ G L O B A L( sum ) r5 = B U I L D _ L I S T() r6 = GET_ITER ( r1 ) -> bb_10 bb_10 : r7 = FOR_ITER ( r6 ) -> bb_13 , bb_31 bb_13 : r7 = C O M P A R E _ O P( r7 , r2 ) L I S T _ A P P E N D( r5 , r7 ) J U M P _ A B S O L U T E() -> bb_10 bb_31 : r4 = C A L L _ F U N C T I O N [1]( r5 , r4 ) R E T U R N _ V A L U E( r4 ) -> Figure 6. Optimized register code Difficulty of Optimizing Python Code It would be desirable to run even more compiler optimizations such as invariant code motion and common subexpression elimination. Unfortunately these are not valid when applied to Python bytecode. The reason these optimizations are invalid is that almost any Python operation might trigger the execution of user-defined code with unrestricted side effects. For example, it might be tempting to treat the second BINARY_ADD in the following example as redundant. r3 = B I N A R Y _ A D D r1 , r2 r4 = B I N A R Y _ A D D r1 , r2 However, due to the possibility of encountering an overloaded __add__ method, no assumptions can be made about the behavior of BINARY_ADD. In the general absence of type information, almost every instruction must be treated as INVOKE_ARBITRARY_METHOD. 4. Virtual Machine After compilation, the register code is passed over to the virtual machine to evaluate. Falcon uses a 3 main techniques (token-threading, tagged-registers and lookup hints) to try and improve the dispatch performance, which we cover in this section. Token-threading The common, straightforward approach (used by Python 2.*) to writing a bytecode interpreter is to use a switch and a while loop: Code * ip = i n s t r u c t i o n s; while (1) { switch ( ip - > opcode ) { case B I N A R Y _ A D D: Add ( ip - > reg [0] , ip - > reg [1] , ip - > reg [2]); break ; case B I N A R Y _ S U B T R A C T: Sub ( ip - > reg [0] , ip - > reg [1] , ip - > reg [2]); break ; } ++ ip ; } Figure 7. Switch dispatch Most compilers will generate an efficient jump-table based dispatch for this switch statement. The problem with this style of dispatch is that it will not make effective use of the branch prediction unit on a CPU. Since every instruction is dispatched from the top of the switch statement, the CPU is unable to effectively determine which instructions tend to follow others. This leads to pipeline stalls and poor performance. Fortunately, there is an easy way to improve on this. Token-threading is a technique for improving the performance of switch based interpreters. The basic idea is to “inline” the behavior of our switch statement at the end of every instruction. This requires a compiler which supports labels as values [2] (available in most C compilers, with the Microsoft C compiler being a notable exception). By inlining the jump table lookup we replace the single difficult to predict branch with many, more predictable j u m p _ t a b l e = { && BINARY_ADD , && BINARY_SUBTRACT , ... }; B I N A R Y _ A D D: Add ( ip - > reg [0] , ip - > reg [1] , ip - > reg [2]); goto j u m p _ t a b l e [(++ ip ) - > opcode ]; B I N A R Y _ S U B T R A C T: Sub ( ip - > reg [0] , ip - > reg [1] , ip - > reg [2]); goto j u m p _ t a b l e [(++ ip ) - > opcode ]; Figure 8. Token threading branches. For example, if BINARY_ADD is always followed by BINARY_SUBSCR in a certain loop, the processor will be able to accurately predict the branch and avoid stalling. Token threading was recently added to the Python 3.1 interpreter[3]. We can go one step further, and modify our bytecode to contain the actual address of the handler for each instruction. This results in direct-threading [7]. foreach ( instr in function ) { instr . handler = j u m p _ t a b l e[ ip . opcode ] } B I N A R Y _ A D D: Add ( ip - > reg [0] , ip - > reg [1] , ip - > reg [2]); goto (++ ip ) - > handler ; Figure 9. Direct threading Direct threading increases the size of each instruction while removing a lookup into the jump table. We implemented both token and direct threading for Falcon. Token threading seems to provide a modest (∼5%) performance improvement over switch based dispatch. Tagged Registers The default Python object format (PyObject) is inefficient. A simple word-size integer requires 3 words of space, and must be dereferenced to get the actual value. For numerically intensive code, the cost of this indirection can dominate the interpreter runtime. This overhead can be reduced by using a more efficient object format. In general, changing the object format would break compatibility with existing code, but here the Falcon’s use of registers proves to be very convenient. As long as a value is in a register, we can store it in whatever format is most efficient. Only when a value has to be handed to the Python API (or other external call) do we need to convert it back to the normal Python object format. For our tests, we chose a simple tagged integer format. Integer tagging takes advantage of the fact that object pointers are always aligned in memory to word boundaries; the least significant 2 bits are always zero. We can therefore use the least significant bit of a register to indicate whether it is storing an integer value or a pointer. If it is storing an integer, we shift the register right one bit to obtain the value. Boland [8] provides detailed descriptions of different tagged representations and their cost/benefits. A simplified example of how tagged registers are implemented is show in Figure 10 . struct Register { union { int int_val ; PyObject * py_val ; }; bool is_int () { return int_val & 1; } int as_int () { return int_val >> 1; } // Mask bottom 2 bits out PyObject * as_obj () { return py_val & 0 x f f f f f f f c; } }; Figure 10. Tagged register format Lookup Hints Attribute lookups (e.g. myobj.foo) are handled by the LOAD_ATTR instruction and account for a significant portion of the time spent in the Python interpreter. Just-in-time compilers for many languages accelerate method lookups using polymorphic inline caching [15] (PIC) and shadow classes. In many instances, these can replace expensive dictionary (hash-map) with direct pointer offsets (making them effectively no more costly than a struct in C). Unfortunately, this technique is difficult to employ in the context of Falcon for a few reasons: nately, this would increase the complexity of Falcon by an order of magnitude; while it may be an appropriate choice in the future, we were interested in determining whether a simpler approach might be effective. Falcon uses a variant on PIC, which we call “lookup hints”. As the name suggests, these provide a guess for where an attribute can be found. A hint records the location where an attribute was found the last time the instruction was run. A hint can indicate that the attribute was in the instance dictionary an object, or as an attribute of parent class. When a hint is found, the location specified by the hint is checked first before the normal lookup traversal is performed. If the hint matches, the resulting value is returned immediately; otherwise the full lookup procedure is performed and a new hint generated. The benefit of hints depends greatly on the application being executed. Code that references lots of attributes in a consistent manner can see a large improvement in performance; in general we observed a ∼5% improvement for most of our benchmarks. void LoadAttr ( RegOp op , E v a l u a t o r* eval ) { // Load the hint for this i n s t r u c t i o n. L o o k u p H i n t h = eval - > hint [ op . hint_pos ]; PyObject * o b j _ k l a s s = g e t _ c l a s s( op . reg [0]); PyObject * obj_dict = get_dict ( op . reg [0]); PyObject * key = op . reg [1]; // If we p r e v i o u s l y found our a t t r i b u t e in // our instance dictionary , look there again . if ( h . dict == obj_dict && h . d i c t _ s i z e == obj_dict - > size && h . klass == o b j _ k l a s s && obj_dict . keys [ h . offset ] == key ) { return obj_dict . values [ h . offset ]; } // no hint , normal path ... • Fixed object format. Shadow classes require control over how objects are laid out in memory, which would break our compatibility goal. • Complex lookup behavior. Python provides a great deal of flexibility to application programmers in choosing how attribute lookup is performed. The builtin behavior for resolving lookups is similar to that found in most languages (first check the object dictionary, then the class dictionary, then parent classes. . . ). In addition to this, Python offers an unusual degree of flexibility for programmers in the form of accessor methods. These allow specifying what happens if an attribute is not found (using the __getattr__ method) or even completely override the normal lookup process (the __getattribute__ method). What’s more, these methods can be added to a class after objects have been created, which creates complications for mechanisms like shadow-classes, which expect lookup behavior to remain consistent. • Attribute lookup is hidden by the bytecode. Making matters worse is that the bytecode generated by Python does not explicitly check whether methods such as __getattr__ have been defined. Instead, the LOAD_ATTR instruction is expected to implicitly perform checks for the various accessor functions for every lookup. One general way of handling such complex behavior is to use a traces within a just-in-time compiler [6]. Unfortu- } Figure 11. Simplified implementation lookup hints 5. Implementation Falcon is implemented in C++ as a Python extension module and is compatible with Python 2.6 through 3.3. Building on top of the existing Python interpreter means that Falcon takes a relatively small amount of code to implement; the entire package is only 3000 lines of code, evenly split between the compiler/optimizer and the interpreter. The method used to implement the Falcon VM is somewhat unusual. A typical VM interpreter is structured as a single method containing the code to handle each type of instruction. The approach we took with Falcon was implemented as a number of C++ classes, one for each Python opcode. We use the compiler function attributes to force the inlining of the code for each opcode into the main interpreter dispatch loop. We have found this technique to be very effective, allowing a clean separation of code without sacrificing speed. Like the CPython interpreter, Falcon overlays Python function calls onto the C execution stack (each Python call corresponds to a C function call). Python exceptions are emulated using C++ exceptions. This allows Falcon to leverage the builtin C++ exception handling facility, and greatly simplifies the main interpreter code. (Proper handling of exceptions and return values is a significant source of complexity for the mainline Python interpreter). 100% 80% 60% 40% 20% • Compile times are negligible. All of our benchmark re- sults include time taken to compile from stack to register code and run the optimization passes. Despite our best efforts at making an inefficient compiler (copies used many places where references might suffice, multiple passes over the code), the time taken to convert and optimize h uc fan nk ld tre e ho ta thr es fas ou nt cry pto ult rdc wo 60% 40% 20% h uc nk fan ld tre e ho es thr ta fas nt cry pto ou rdc wo ma tm ult 0% qu Figure 13 shows the runtime performance of Falcon relative to the runtime of CPython interpeter. The three bars represent the time taken by (1) unoptimized Falcon code using untagged (ordinary PyObject) registers, (2) optimized code with untagged registers and (3) optimized code with tagged. registers. We were surprised by the inconsistency of benefit from using tagged registers. For some benchmarks, such as matrix multiplication, the performance improvement from switching to tagged registers was quite dramatic. Most of the other benchmarks saw either little improvement or even some slowdown from the switch. We also looked at the change in the number of instructions used after converting to register code, and after optimizations have been run. (figure 14) As expected, the register code version of each benchmark requires significantly fewer instructions to express the same computation, using on average 45% fewer instructions. A few interesting observations can be made: tm so ma ick qu 80% ick Figure 12. Benchmark Descriptions Unoptimized Optimized 100% rt Description Multiply square matrices Recursive control flow # of distinct words AES encrypt+decrypt Classic sorting algorithm Random string generation # values > threshold Count permutations Figure 13. Falcon performance relative to Python so We evaluated the runtime performance of Falcon on a variety of benchmarks. All tests were performed on a machine with 8GB of memory and a Xeon W3520 processor. For most benchmarks, Falcon provides a small performance benefit over the CPython interpreter. For benchmarks that are bound by loop or interpreter dispatch overhead, Falcon is over twice as fast as CPython. rt 0% 6. Evaluation Benchmark Matrix Multiplication Decision Tree Wordcount Crypto Quicksort Fasta Count threshold Fannkuch[5] Unoptimized Optimized Optimized+tagged Figure 14. Effect of compiler optimizations on number of opcodes, relative to number of Python stack operations functions is very small, varying from 0.1ms for simple functions to 1.1ms for the most complex function in our benchmark set (AES encryption). This implies that is profitable to simply convert everything to register code, rather than relying on profile-based techniques (such as those used by Psyco [17]) to determine whether it is worthwhile. • Optimization is important. For some benchmarks, the compiler optimizations result in a 30% improvement over the unoptimized code; in some cases changing Falcon from being slower than CPython to being significantly faster. The register code is more amenable to optimization, but the register machine instructions are slower and more expensive to dispatch than simple stack machine operations. • Bit tagging registers yields mixed results. Switching to a more compact and efficient internal representation seemed like it would be a straightforward win, but this is not always the case. The potential benefit of using a tagged inline integer value must be weighed against the potential cost of converting these integers into Python objects whenever they must be passed into API functions. In functions that are dominated by arithmetic and logic operations, tagged registers are a performance win. In other functions, however, unpacking an integer value to be stored directly in a register is simply wasted work. 7. Related Work Many different projects have sought to speed up the performance of Python programs using a variety of techniques. Nuitka, Cython [1], and ShedSkin reduce the runtime overhead of opcode dispatch by statically compiling Python programs into C API calls. This approach, if combined with aggressive optimization, can also remove some redundant runtime checks. The disadvantage of this approach is that it requires an explicit (and sometimes lengthy) compilation step, which is at odds with the usual programming style in a dynamic language like Python. The currently most popular approach to accelerating dynamic language is tracing just-in-time (JIT) compilation [13], which has proven particularly effective for JavaScript [14]. One of the primary ways a JIT is able to achieve good performance is by using unboxed representations for data, which is incompatible with a native API that exposes the internal representation of data. Unfortunately, this is the case with Python. The only currently active JIT project for Python is PyPy [9]. Although PyPy is able to achieve impressive performance gains, it does so at the expense of breaking C API compatibility. This is particularly problematic for scientific Python libraries, which act largely as wrappers over pre-compiled C or Fortran code and are often written with particular expectations about the Python object layout. Psyco [17] was an older (now abandoned) just-in-time compiler for Python. By coupling intimately with the Python interpreter and switching between efficient (unboxed) representations and externally compatible boxed representations, Psyco was able to avoid breaking C extensions. Unfortunately, this compatibility required a great deal of conceptual and implementation complexity, which eventually drove the developers to abandon the project in favor of PyPy. 8. Conclusion To investigate how fast we could make a binary compatible interpreter for Python, we built Falcon, a fast register based compiler and virtual machine for Python. Falcon combines many well-known techniques and few new ones in order to achieve a significant speedup over regular Python. What did we learn from the experience? Stack and register bytecodes aren’t too different. Our register based interpreter proved to be ∼25% faster then the basic Python stack interpreter for most tasks. While this is a nice improvement, much larger gains could be made if we had the ability to change the object format. Tagged object formats are important. The performance improvement of using an inline tagged format (integer or NaN tagging) for primitive types is worth the extra effort; for any sort of performance sensitive code, it easily means the difference between an interpreter that is 5 times slower then C and one that is 100 times slower. If this type of object format could be used uniformly within the CPython interpreter, it would greatly improve the performance for almost every task. API design. The most important lesson we can draw from our experience is that interpreter APIs should be designed with care. In particular, an API which exposes how the internals of an interpreter work may be convenient for gaining a quick performance boost (i.e. use a macro instead of a function), but in the long-term, exposing these internal surfaces makes it nearly impossible to change and improve performance in the future. For Python, it is not the size of the C API that is the problem, but rather its insistence on a particular object format. The assumption made by an API are not always obvious. For instance, when writing an API for an interpreter, it may be tempting to have functions which directly take and return object pointers. This simple decision has unexpected consequences; it prevents the use of a copying garbage collector. 9. Future Work One of our goals with Falcon was to build a platform that would simplify writing new experiments. The use of register code and a pass based compiler format makes trying out new optimization techniques on Python bytecode easy. Particular ideas we would like to explore in the future include: • Type specialization. At compile time, type propagation can be performed to determine the types of registers. Unboxed, type specific bytecode can then be generated to leverage this information. • Container specialization. The performance benefit of tagged registers is primarily limited by the need to convert to and from the CPython object format whenever an API call is made. This is almost always due to a register being stored into a Python list or dictionary object. We can improve on this by creating specialized versions of lists and dictionaries for each primitive type. These specialized objects would support the standard list/dictionary interface and convert to and from the Python object format on demand (thus allowing them to be used in external code); internally they would store objects in an efficient tagged format. • Improving attribute hints. The current Falcon hinting mechanism improves performance slightly, but is very limited in its application. Better results could be obtained by making lookup more explicit in the bytecode (first check for accessor functions, then look up the actual name). F RANZ , M. Trace-based just-in-time type specialization for dynamic languages. In PLDI (2009), pp. 465–478. The source code for Falcon is available online at: http://github.com/rjpower/falcon/; we encourage anyone who is interested to try it out and provide feedback. [15] H ÖLZLE , U., C HAMBERS , C., AND U NGAR , D. Optimizing dynamically-typed object-oriented languages with polymorphic inline caches. In ECOOP’91 European Conference on Object-Oriented Programming (1991), Springer, pp. 21–38. References [16] O LIPHANT, T. E. Python for scientific computing. Computing in Science & Engineering 9, 3 (2007), 10–20. [1] Cython: C-Extensions for Python. http://cython.org/. [2] GCC documentation: Labels as Values. gcc.gnu.org/onlinedocs/gcc/Labels-as-Values.html. Accessed: August 13th 2013. [3] Python 3 token threading. bugs.python.org/issue4753. Accessed: August 13th 2013. [4] Python/C API Reference Manual. docs.python.org/2/c-api/. Accessed: August 13th 2013. [5] A NDERSON , K. R., AND R ETTIG , D. Performing Lisp analysis of the FANNKUCH benchmark. [6] BALA , V., D UESTERWALD , E., AND BANERJIA , S. Dynamo: a transparent dynamic optimization system. In PLDI 2000 (2000), vol. 35, ACM, pp. 1–12. [7] B ELL , J. R. Threaded code. Commun. ACM 16, 6 (June 1973), 370–372. [8] B OLAND , C. Memory Allocation and Access Patterns in Dynamic Languages. PhD thesis, Heinrich Heine University Dsseldorf, 2012. [9] B OLZ , C. F., C UNI , A., F IJALKOWSKI , M., AND R IGO , A. Tracing the meta-level: PyPy’s tracing JIT compiler. In Proceedings of the 4th workshop on the Implementation, Compilation, Optimization of Object-Oriented Languages and Programming Systems (2009), ACM, pp. 18–25. [10] C OUSOT, P., AND C OUSOT, R. Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints. In Proceedings of the 4th ACM SIGACT-SIGPLAN symposium on Principles of programming languages (1977), ACM, pp. 238–252. [11] C YTRON , R., F ERRANTE , J., ROSEN , B. K., W EGMAN , M. N., AND Z ADECK , F. K. Efficiently computing static single assignment form and the control dependence graph. ACM Transactions on Programming Languages and Systems 13, 4 (Oct 1991), 451–490. [12] DAVIS , B., B EATTY, A., C ASEY, K., G REGG , D., AND WALDRON , J. The case for virtual register machines. In In Interpreters, Virtual Machines and Emulators (IVME ’03) (2003), ACM Press, pp. 41–49. [13] G AL , A., B EBENITA , M., AND F RANZ , M. One method at a time is quite a waste of time. In Proceedings of the Second ECOOP Workshop on Implementation, Compilation, Optimization of Object-Oriented Languages, Programs and Systems (2007). [14] G AL , A., E ICH , B., S HAVER , M., A NDERSON , D., M AN DELIN , D., H AGHIGHAT, M. R., K APLAN , B., H OARE , G., Z BARSKY, B., O RENDORFF , J., RUDERMAN , J., S MITH , E. W., R EITMAIER , R., B EBENITA , M., C HANG , M., AND [17] R IGO , A. Representation-based just-in-time specialization and the Psyco prototype for Python. In Proceedings of the 2004 ACM SIGPLAN symposium on Partial evaluation and semantics-based program manipulation (2004), ACM, pp. 15–26. [18] S HI , Y., C ASEY, K., E RTL , M. A., AND G REGG , D. Virtual machine showdown: Stack versus registers. ACM Trans. Archit. Code Optim. 4, 4 (Jan. 2008), 2:1–2:36. [19] VAN ROSSUM , G., 1994. ET AL . Python programming language,
6cs.PL
Logic Programming for an Introductory Computer Science Course for High School Students Timothy Yuen1, Maritz Reyes2, Yuanlin Zhang3 1 The University of Texas at San Antonio, USA 2 The University of Texas at Austin, USA 3 Texas Tech University, USA [email protected], [email protected], [email protected] Abstract. This paper investigates how high school students approach computing through an introductory computer science course situated in the Logic Programming (LP) paradigm. This study shows how novice students operate within the LP paradigm while engaging in foundational computing concepts and skills, and presents a case for LP as a viable paradigm choice for introductory CS courses. Keywords: CS education, high school CS, declarative programming, logic programming, answer set programming 1 Introduction The debate in paradigm selection in CS0 and CS1 type courses is often split between object-oriented (OO) and procedural paradigms, which also leads to discussions on programming language choice. Selection is a difficult task as there are no standard languages or paradigms to use in the field. Though both these approaches have been successful in introductory CS courses [1], some research has also shown only minimal differences when comparing the outcomes between paradigms [2, 3]. At the same time, research on the teaching of introductory CS courses also reveals the limitations of those approaches [4, 5] (e.g., the suitability of Java, C, C++ for education is debatable [4] as well as the objects-first). However, the Logic Programming (LP) based approach is largely ignored by the CS0/CS1 community [4] despite continuing efforts in both teaching and research on LP. 1.1 Logic Programming and CS Education Prolog may be the most well-known instance in which LP was used to teach CS. In particular, Prolog was used to teach children in the 1980s [6, 7]. As a pioneer, Kowalski [6] focused on the declarative aspects of Prolog and restricted the use of procedural aspects of Prolog to a minimum. Later, researchers and practitioners found that the procedural aspects of Prolog have been the main source of misconceptions and difficulties [8], while the benefits of its declarative aspects were acknowledged. In the last two 2 decades, Prolog has made some appearances: listed in high school curriculum [9], and taught in gifted and talented high school students [10] and in general high school/undergraduate students [11], though it does not enjoy the same attention as procedural and OO paradigms. 1.2 Advantages of Logic Programming From the existing work and practice in LP and general programming [4, 5, 9, 12], the main advantages of LP as related to computing education are: simple syntax and intuitive/declarative semantics, natural connection to abstraction, logic reasoning and knowledge representation which form the foundation of computing and other disciplines, involvement of non-trivial, interesting and challenging problems (e.g., Sudoku problem) early, and the mathematical flavor of LP. LP also provides a rich context for embedded essential computing concepts and skills. As for industrial relevance, LP and Declarative Programming (DP), in general, have seen their profound application and impact in database query languages, problem (formal) specification languages, and domain specification languages including popular web application development languages such as HTML, CSS and XSLT etc. A breakthrough in LP research in the last two decades is the establishment of the Answer Set Programming (ASP) [13, 14] paradigm which has inherited the declarative nature of Prolog while fully getting rid of its procedural features. Currently, ASP is a dominating LP formalism in knowledge representation. 1.3 Research Questions Although there are some movements [e.g., 15] in expanding LP, research on how ASP, with full declarative nature, facilitates student learning in introductory computer science is still absent. The research question for this study is: How does adopting ASP to teach an introductory CS course for high school students impact their understanding of computer science and computing? 2 Methods This study adopts a qualitative approach in exploring, in-depth, how high students’ understanding of CS and computing through LP, specifically ASP. 2.1 Setting and Participants Participants were recruited from the TexPREP program at Texas Tech University during Summer 2015. TexPREP is a summer program for 6th-12th graders and offers full day courses in science, engineering, math, and computer science over several weeks. Courses are typically taught by local K-12th grade teachers as well as university faculty members and students. In the case of this study, the class was taught by the third author with some TAs (the second author was also a TA). TexPREP is a selective program: 3 students had to have an A/B+ average, letters of recommendations, a written, and a personal interview for consideration. Prospective participants were in their fourth year of TexPREP taking Computer Science 4 (CS4). They have already taken its CS2 (Scratch [17]) and CS3 (Alice [18]) courses in the CS sequence. The TexPREP CS4 course teaches the foundations of computing using ASP [14]. This course emphasized problem solving and knowledge representation through the ASP paradigm. The course met Monday through Friday from 1:00pm to 1:50pm. Informed consent was obtained from both the participants and their parents prior to the start of class. There were sixteen (N=16) participants for the study. There were seven females and nine males. Participants were students at high school in the Texas Tech area in Lubbock, TX. In terms of rising grades, there were eleven 10th graders, three 11th graders, and two 12th graders. 2.2 Data Collection and Procedures Surveys. Participants responded to surveys with open-ended questions at the beginning (pre) and end (post) of the course regarding their experiences with computing and declarative programming. The purpose of the surveys was to provide some background information on participants' CS knowledge and to triangulate the findings from the clinical interviews. The survey refers to declarative programming (DP), rather than LP or ASP even though this study focused on the latter two paradigms. The rationale for referring to the more general DP is because: ASP belongs to the LP paradigm and LP is one paradigm of DP and knowing other DP paradigms (such as functional programming) may give an edge to the students in learning ASP. The pre-survey asked about participants' general knowledge of computer science and declarative programming. The pre-survey questions were: • What is computer science? • Describe what you know about declarative programming. The post-survey asked about participants' knowledge of computer science and the topics of this course. The post-survey questions specifically asked what participants learned in this course and how they understood the concepts; that is, rather than asking participants directly to explain declarative programming, these questions asked how they perceived declarative programming. • What is computer science? • What have you learned, if anything? • After having taken this course do you feel that you understood the subject of this course and the tasks that were asked of you? Why or why not? Clinical Interviews. Clinical interviews are task-based activities in which the researcher attempts to explore subjects’ understanding and cognitive process through active questioning and probing [19]. During the last week of class, participants were asked to work out one class-based problem while thinking aloud. Since this was a class assignment during a limited time with few researchers, participants only worked on part of the assignment. Clinical interviews were conducted one-on-one by the research team and the participant. Researchers asked probing questions in order to prompt participants 4 to explain and clarify their thought processes. All researchers received the same training from the first and third author on conducting the clinical interviews. Clinical interviews lasted 30 minutes or when the participant completed their tasks—whichever came first. Clinical interviews were video recorded and transcribed. In the interview task, each student was asked to write a SPARC program to represent the knowledge about family relationships. Some relations, such as father(X, Y), denoting X is the father of Y, and mother(X, Y) are given. A program stub including the declarations of these relations is also given. The students are asked to represent the following knowledge: 1) Jon is the father of Matthew, and 2) about the following relations: grandparent(X, Y), son(X, Y), aunt(X, Y), and descendant(X, Y). SPARC is a programming language and system instance of ASP paradigm [20]. It offers a type system to overcome some challenging syntax restrictions in existing ASP systems, such as DLV [21] or Clingo [22] and help discover some programming errors early. The results of the surveys and interviews are presented in the following sections. 3 Survey Results Survey responses were transcribed and were analyzed by the researchers using an inductive coding approach. The main unit of analysis was a sentence. Longer sentences with representing multiple ideas were sometimes separated for further coding. Similarly, some consecutive sentences were grouped together for analysis when they continued the same line of thought. Through this analysis, researchers found common themes across participants. Responses were grouped by common themes, which are presented below. Participants were given pseudonyms in the presentation of the results in the form of P#. 3.1 What LP Students Know about Computer Science Since this course was the third in the pre-engineering program sequence, participants already had two courses in computing with other science and engineering courses. Most participants’ definition of computer science in the pre-survey centered on the creation of a program that does some task with the programming language being the means through which those tasks are completed [e.g., The science behind how a computer functions and performs tasks (P1), Computer science is using different computer “languages” to get computers to perform tasks (P13), and Understanding and being able to reproduce the code and programs that make a computer do its task (P4)]. There was a strong connection between computer science and programming with ten participants mentioning programming or the creation of software in their responses. Some participants acknowledged the importance of computers and technologies in the advancement of society [e.g., The study on how to develop computers to help the world be an easier and more efficient place (P10); and It has become extremely prominent in our daily lives and must always be improved for technology to come (P11)]. At the end of the course, participants were asked the same question. In the post-survey, only three participants mentioned programming in their definition of computer 5 science. The participants’ responses could be categorized as defining computer science as problem solving [e.g., Computer science is a study that involves mathematics and helps us understand the way a computer thinks (P3); Computer science is the study on how to make a computer work/think like a “human” (P10); It is how we get computers to solve problems and how we can use them for simplifying, numbers, solutions, or problems themselves (P11)] and the study of technologies [e.g., The science behind a computer and how it functions (P1); Computer science is the study of how and why computers work (P16)]. Thus, by the end of the course, the participants’ definition of CS had broadened a bit away from just programming; rather, it become more holistic and more on emphasizing problem solving in order to complete tasks. 3.2 What LP Students Know about Declarative Programming In the pre-survey, most participants did not know what DP was; however, many were familiar with the more “traditional” procedural programming and/or had prior programming experience. Eight participants said that they did not know what declarative programming was. Some participants offered an explanation of what declarative programming could be [e.g., I would guess that it is a branch of computer science that has to do with making statements and receiving some form of output from the statements (P12); or I believe that you give a description to of an object then the program runs it to find the item similar to what was described (P8)] or explanation that they have done programming before [e.g., In school, I have learned a little about Java and how Java is a declarative language, Other than that, I don’t know much else about declarative programming (P3)]. In such explanations, participants were attempting to make connections to previous programming experiences, even though those were incorrect. The remaining five participants did not explicitly say they did not know what DP was. Rather, they offered some incorrect or incomplete definitions: Declarative programming is stating a statement and being able to program that statement. Giving the computer a “command” and programming it to accomplish that particular command (P5); It is a program where it does the things you type out (P10); Declarative programming is more of an elaboration off of algorithmic programming as it is developed for a broader use compared to Algorithmic programming. It is much more elaborates and is well suited for situations with similarities (P12); and It is the type of programming needs to be defined before any output action can be achieved (P15). Participant 16 was the closest to having a correct answer: I know that declarative programming works like telling a computer rules for what something is then having the computer rules for what something is then having the computer go find all the somethings [sic] in a set. Thus, most participants did not have experience with DP though have had some experience in other paradigms, which included object-oriented, procedural, and imperative. 3.3 What Students Have Learned in this LP Course The data showed that most students reported learning how to program with the SPARC language within the context of their lab assignments. Though most did not explicitly articulate their understanding of LP, as they did with procedural-type languages from 6 prior CS experiences, they were able to report how they solved problems using ASP methodologies and tools. Although the participants emphasized learning how to program with SPARC, eleven responses implied that the programming language provided the structure that required students to think about their problems through a deeper, more thorough perspective, which lends itself to declarative programming. P12’s response was representative of how learning the programming language helped guide declarative understanding: I’ve learned how to reevaluate my thinking process and consider the basis of my thought (so I can program). I’ve learned how to ‘translate’ – by writing my goals/rules/knowledge in English, then transferring and modifying it to fit SPARC code. Similar responses include: I learned how to look at a problem in a different way (P2); I have learned how to sort objects, define relationships with predicates, use multiple variables, use multiple predicates/ rules, use tex*** rules with variables, and use if when for rules to help simplify solutions (P11); I have learned a new coding language to go along with the others I know, which is very valuable to me. I have also learned a new way to look [at] relations between objects (P15); and New syntax - A new way to specify relations (P9). These examples show that the rules and structure (i.e., syntax and semantics) that SPARC required and the associated methodologies helped guide participants in their problem solving. Four participants emphasized learning about the syntax and coding style. P8 also mentioned that this was the first course in which she had to type out her programming rather than through a drag-and-drop interface. 3.4 How Students Understood the LP Course Topics and Tasks Eight participants stated that they understood the subject of this course within the confines of the course activities and three were indifferent. They understood that there was more to learn with respect to the programming language [e.g., I think if given more time and work on the computer, I could use this language in the future (P3); The prompt and things that were asked were clear and easy to understand. They were easy to pick up on and gave a general understanding – making it relatively easy to complete a given task (P5); and I understand the subject because it was easy. I’m pretty sure that if you wanted to program more complex things, it would be harder (P13). Two participants stated they were able to understand the subject of the course, but were unsure how it was applicable in a real world or everyday setting: I understand how, but not why. So, I don’t understand the purpose of this type of program and how it will be beneficial to the world, other than artificial intelligence, but I feel as though this program requires more to get to that point (P9) and I do feel I understood the subject of the course as I did actually learn something. However, I did not always understand exactly what I was supposed to do and I was occasionally completely lost (P4). Therefore, most participants knew that there was more to learn about LP beyond the contexts with which they were presented. The two participants (P10 and P14) that stated they did not understand the course topics mainly due to time management in the course. P10 felt that the course was too repetitive with the simple topics and was not challenging enough. Similarly, P14 felt the course was also repetitive with instructor teaching topics already found in their notes. 7 4 Interview Results A grounded theory methodology [16] was adopted to generate a theory that explained how students understood and approached computing through ASP activities based on the interview data. This qualitative approach generates a theory or explanation through systematic analysis of data [16]. Grounded theory goes beyond describing and categorizing by finding the processes and relationships in the phenomenon being studied [16]. This approach was conducted on the clinical interview data and served as the main analysis for this study. The unit of analysis was an utterance, which consisted of a complete thought or phrases spoken by the participant. In cases where utterances were rich with many potential units, they were broken down into smaller utterances. Utterances made by the researcher provided context to those made by the participant, but were not analyzed. There were 1,452 utterances used for analysis. The first author analyzed the data through an open-coding process [16] coding each utterance with a descriptive label. This process required several iterations to ensure that coding was consistent across the entire dataset. Then, the third author coded the data using the set of labels created by the first author. Through that process, the researchers debated the labels and coding of the utterances, which led to several iterations of recoding the data and revision of the initial labels. Memos were kept during this analysis process regarding the rationale behind labels and the formation of coding [16]. Since the third author was the expert in the field of ASP and DP and taught the course, his coding was used for the remaining analysis. The next step was creating categories that represented larger constructs that was happening the data. Axial coding analyzed the way these categories were related based on their properties [16] and formed larger categories. In the case of this study, many of the merged labels were found to relate to each other as well with infrequent labels. The five major categories were: abstraction, representation, reasoning, revision, and procedural. The first author led the first stage of axial coding which led to these five major categories. Then, these were also debated and discussed by the researchers. The surveys, particularly the post-surveys, were used to guide the axial coding and the creation of the categories. The definitions of the categories also went through several revisions. The next sections define each category and give example quotes. 4.1 Abstraction This category describes instances where the participants understand the problem space in more general or abstract terms and are thinking on a higher level or in real world terms and within the context of the code they are writing. Participants are generally describing relationships with respect to these real-world terms and/or integrating their prior knowledge of the problem space. Example quotes included: (P8) The descendant part because the descendants can be anything that's…that was before that person, well before X in this case.; (P10) So, father of person and person, ok, parent, sister, same parent, gender; (P12) I am thinking of like a family tree I guess sort of and so I am thinking of X being or I am thinking of Y being so I am thinking of Y being a person, whose descendants we are looking at… 8 4.2 Representation. This category refers to the process in which the participants are trying to understand the problem space in coding terms; that is, how their abstraction or understanding of the problem translates into the code. This category includes references to both the conceptual and coding as well as the transition process between the two. Example quotes included: (P1) You can’t say, X is the parent of Y if X, if Y is the son, because it’s flipped. I hope I am explaining it right. So then I’m saying X is the son of Y if Y is the parent of X, and I’m putting gender because if you are a son you have to be male. And if X is a male. Yes, Ok. All right I am going to move on to aunt.; (P14) A descendant is like it’s the same as a child it’s umm like the child of two parents. That is their descendant that’s their heir so that is what I am trying to say but I don’t know how to say it.; (P15) I put X is the son of Y. I put that in the predicates. This is it. The son is a person. And I know that we have the example here. I can put Matthew is the son of Jon… 4.3 Reasoning This category represents the problem solving process. It describes instances in which participants were actively thinking about the problem, apply problem-solving strategies associated with ASP, and adapting existing code to solve the current problem. Reasoning was selected for the category name as that the most frequent related label. Example quotes included: (P2) So grandchild Isaac of George, grandchild Joseph, George, grandchild Susie, George. Grandchild, those are the children, so, grandchild, grandchild, X is a grandchild of Y, if Y is grandfather, if Y is the grandfather of X and X is the, do we define gender? Yes, gender of X is male, because grandfather has to be a male; (P5) I have like separate ones like I have sister and I have like aunt and I have parent; (P11) Nephew, so then you have Isaac, and actually you can create a rule... 4.4 Revision Revision encapsulates a lot of the overall debugging process, but emphasizes the importance of participants asking questions in SPARC to see if their code was correct. This category includes the participants' process of questioning to see if they completed the tasks correctly, which was done through querying to see if their solutions were right. Example quotes included: (P1): So I’ll write aunt and then I’ll write Rose comma = Susie, and then I’ll have to add a question mark, and then have to press execute; (P14): Ok and now I need to write queries to see if my program works; (P12): I am going to ask who are descendants of George because George is like the patriarch of the family… 4.5 Procedural This category represents a large part of the data in which participants were either restating or interpreting facts or instructions. In some cases, participants were asking if 9 they have the correct interpretation of the assignment instructions. In this category, participants frequently mentioned specific rules and strategies associated with declarative programing. Often, these utterances were co-labeled with other more descriptive categories such as representation and reasoning. Example quotes included: (P1): Whenever I am talking about the son I forgot to include that it has- and he has to be male, and that X has to be male.; (P8): So now I am at son. Oh forgot to add the periods. Ok. Got it, got it, and got it. Now I need it aunt.; (P16): Jon is the father of Matthew, so that rule that I wrote works. 4.6 Order of Category Occurrences As part of axial coding, there was an analysis of when these categories occurred during the clinical interview to learn more about the categories themselves and how they related to the other categories. A color-coded graph plotted out the occurrence of each category in the order they appear with each participant. Plots varied in length due to the variance in number of coded utterances. Figure 1 shows an example of this graph. When an utterance had more than one category associated with it, plots are stacked. Fig. 1. Sample of Order of Category Occurrence A visual analysis of all participants’ graphs was conducted to describe when each category occurred and the relationships between those occurrences. Across all participants, interviewers had them all read the instructions once at the beginning, but these utterances were not coded. Since participants were asked to work on their assignments, some participants had already started on them prior to the interview. Thus, those graphs immediately started with non-procedural labels. The visual analysis found the following: Revision. Ten participants were engaged in revision during the last half the interview, which was expected as they spent the first half identifying the objects, relationships, knowledge, and coding before testing. P10 did not get as far during the interview to be engaged in revision. Other participants had already started their assignments before the interview, so they were quicker to be in revisions. Abstraction. Evidence of abstraction mostly came from the beginning to the middle for most participants. For several participants, it occurred alongside procedural (7 participants) as well as with representation (6 participants). Three participants had abstraction after revision, which may suggest that the questioning process may support part of abstraction abilities. Another three participants showed no evidence of abstraction during the interview. However, the interviewer reported that P2 did not get a chance to test 10 their program and P3 had technical issues with the laptop. P13 was reported to feel confident about what they were doing, and started revision early. Reasoning. Reasoning came throughout interview for most participants, similar to the procedural utterances, which may suggest that it is an important recurring process. Reasoning occurred with and between instances of revision (P1, P16) and representation (P2, P13), abstraction (P14, P15). Thus, reasoning is also intertwined with other parts of the ASP process. There was no evidence reasoning from P6; however, there were not many coded utterances from that participant in general. Representation. Similar to reasoning and procedural, representation also happened throughout the interview. For the most part, representation started before clusters of revision for 11 participants. However, for three of these participants, there were more revision afterward. For P13, representation was intertwined into revision throughout the interview. Most of P14's interview consisted of utterances labeled as representation as he was mostly listing out what had to be represented in the knowledge base. Procedural. All participants had instances of procedural utterances and distributed throughout the interview as well as simultaneously with other codes. An interesting observation was that there were procedural moments throughout the interview, but not just at the beginning. That is, participants kept going back to the instructions and/or the facts presented in the assignment. Although the procedural category did not seem to provide much insight into how the participants approached computing and computer science, at first. After all, these utterances were of participants reading and re-reading the rules and asking if they understood the instructions and information correctly. Procedural utterances were made throughout the entire overall computing process. In selective coding where analysis examines a category that could be connected to the other categories [16], procedural was found as that central theme. Identifying objects and relations in the problem, through English definitions, by carefully reading the problem description and integrating one's common sense knowledge was a major component of the explicit methodology for solving LP problems. Thus, there was deep interaction between the procedural and other processes. Students had also mentioned in their post surveys that they had learned this methodology to solve the problems. Although that may not be surprising, it showed that they were able to adopt those strategies, which in turn, led to more reasoning and representation processes. 11 4.7 Model of How Participants Approach LP Based on the grounded theory analysis, supported by the visual analysis of ordering of categories, model was constructed that may explain how participants approach computing through LP as based on the data (see Figure 2). This figure highlights the founFig. 2. Model of How Participants Approach LP dational importance of the following the strategies of declarative programming. In the case of Answer Set Programming, it provided an explicit methodology, which guided students towards abstracting the concepts, representing it in code, and reasoning in their problem solving. Abstraction, representation, and reasoning often happened together and are grouped separately from revision, which mostly came toward the end of the task. Similarly, abstraction and representation happened more sequentially with abstraction coming before representation. Reasoning was observed throughout the interview, which is indicated by a larger rectangle. The model showed the importance of procedures; in this case, students were able to follow the explicit methodology in LP. The students also demonstrated the general problem solving skill of iterative refinement. There are two distinguishable big loop components: knowledge specification and revision. Knowledge specification is again an iterative refinement using interleaving steps: abstraction, representation and reasoning. As an example, when students try to specify their knowledge about aunt, they try to figure out the objects (individual persons) and relations (e.g., who is whose sister, or who is whose parent) and then try to define their knowledge about aunt using these objects and relations. Participants tried to make sure the definition captures their intended meaning, which requires them to reason with and understand the relations better. In fact, this model reflects the intended skills most researchers would like the students to obtain in an introductory course: the skills should be general but important in computing (and beyond). The skills include the procedure (a general methodology for problem solving), iterative refinement in problem solving, programming (revision in our category name), abstraction, rigorous high level (logic) representation of knowledge and (logic based) reasoning with the knowledge. LP can be thought of as introducing an explicit problem solving methodology: problem understanding and precise representation and reasoning with knowledge. This methodology is almost universal in problem solving. It will also particularly be useful as LP lays the foundation for problem understanding and knowledge representation. 5 Discussions The students had done very well in their lab assignments and final interview tasks, which, together with the pre and post surveys, which shows that LP is easy to learn [8]. 12 The main reason is the simple syntax and intuitive/natural semantics of ASP, which allow the students to focus less on language specific feature and more on the problem solving skills. The clinical interview data shows further that the students were able to learn and apply intensively the important concepts underlying computing. The model (Figure 2) shows that they were able to apply explicit LP methodologies in problem solving and iterative refinement in both big steps (knowledge specification and revision) and small steps (abstraction, representation and reasoning), when solving the problems. Participants applied abstraction, representation and reasoning heavily, in an interwoven manner, in understanding, extracting and defining the knowledge needed in solving a given problem. Once they identified/defined the knowledge needed, they are able to carry out the standard programming tasks (labeled as “revision” in our categories) from coding to debugging the program. The model generated showed that students were able to engage in computing skills, such as abstraction, problem solving (representation), and debugging (revision). Indeed, they were able to explain computing concepts within the context of this course and tasks. Students were able to operate within the LP paradigm driven by the explicit methodology for LP; however, they may not immediately see how it is applicable outside the context of the assignments. They understood the LP concepts and processes and were successful in completing their assignments. More work needs to be done to make connections to how they see CS in the real world through LP. Students understood the problem solving nature of CS and believed LP was one way of solving problems. 5.1 Limitations Participants were above average students and were pre-screened for this program, and had some experience with Scratch and Alice. However, participants stated no experience with LP or DP. Though every student initially volunteered for this study, there were still some participants who stopped attending or did not complete an assignment. Lastly, this course met for four weeks, which provided limited exposure to LP as compared to regular K-12 or university courses. Future studies on LP in introductory CS courses could be conducted on full semester courses rather than short courses. 6 Conclusions This paper asserts that CS educators should take a closer look at using LP during the introductory courses. As suggested in [12], future computer scientists should be equipped with foundational programming language principles involving logic and formal specification to design and implement complex software systems needed by the society. Our results show that the students were able to focus on the key concepts of computing including abstraction, representation and reasoning when solving problems. The simple syntax and intuitive semantics of ASP allows them to put less attention on the language specific features. These findings support LP as a viable option to teach an introductory CS course using ASP. 13 Acknowledgments. The authors acknowledge Cynthia Perez and Rocky Upchurch for their contributions to this project, and thank Michael Gelfond for sharing his teaching materials. This work is partially supported by NSF grant CNS-1359359. References 1. S. Draft, "Computer Science Curricula 2013," ed, 2012. 2. T.-Y. Chen, A. Monge, and B. Simon, "Relationship of early programming language to novice generated design," ACM SIGCSE Bulletin, vol. 38, pp. 495-499, 2006. 3. T. Vilner, E. Zur, and J. Gal-Ezer, "Fundamental concepts of CS1: Procedural vs. object oriented paradigm-a case study," in ACM SIGCSE Bulletin, 2007, pp. 171-175. 4. A. Pears, S. Seidman, L. Malmi, L. Mannila, E. Adams, J. Bennedsen, et al., "A survey of literature on the teaching of introductory programming," ACM SIGCSE Bulletin, vol. 39, pp. 204-223, 2007. 5. M. M. Chakravarty and G. Keller, "The risks and benefits of teaching purely functional programming in first year," Journal of Functional Programming, vol. 14, pp. 113-123, 2004. 6. B. Kowalski, Logic as a computer language for children: Wiley-Interscience, 1987. 7. J. Nichol, J. Dean, and J. Briggs, Prolog, children and students: Nichols Publishing Co., 1988. 8. P. Mendelsohn, T. Green, and P. Brna, "Programming languages in education: The search for an easy start," Psychology of programming, pp. 175-200, 1990. 9. Z. Scherz and B. Haberman, "Logic programming based curriculum for high school students: the use of abstract data types," in ACM SIGCSE Bulletin, 1995, pp. 331-335. 10. J. Stutterheim, W. Swierstra, and D. Swierstra, "Forty hours of declarative programming: Teaching Prolog at the Junior College Utrecht," arXiv preprint arXiv:1301.5077, 2013. 11. S. Beux, D. Briola, A. Corradi, G. Delzanno, A. Ferrando, F. Frassetto, et al., "Computational Thinking for Beginners: A Successful Experience using Prolog." 12. T. Ball and B. Zorn, "Teach foundational language principles," Communications of the ACM, vol. 58, pp. 30-31, 2015. 13. R. Kowalski, "Logic Programming," in Computational Logic. vol. 9, J. Siekmann, Ed., ed: Elsevier, 2014. 14. M. Gelfond and Y. Kahl, Knowledge representation, reasoning, and the design of intelligent agents: The answer-set programming approach: Cambridge University Press, 2014. 15. A. Dovier, P. Benoli, M. C. Brocato, L. Dereani, and F. Tabacco, "Reasoning in High Schools: do it with ASP!," in 31st Italian Conference on Computational Logic, 2016. 16. A. Strauss and J. Corbin, Basics of Qualitative Research: Techniques and Procedures for Developing Grounded Theory. Thousand Oaks, CA: SAGE Publications, Inc., 1998. 17. MIT Media Lab, "Scratch," ed. 18. Carnegie Mellon University, "Alice," ed. 19. H. P. Ginsburg, Entering the Child's Mind: The Clinical Interview in Psychological Research and Practice. New York, Ny: Cambridge University Press, 1997. 20. E. Balai, M. Gelfond, and Y. Zhang, "Towards answer set programming with sorts," in International Conference on Logic Programming and Nonmonotonic Reasoning, 2013, pp. 135-147. 21. M. Alviano, W. Faber, N. Leone, S. Perri, G. Pfeifer, and G. Terracina, "The disjunctive datalog system DLV," in Datalog Reloaded, ed: Springer, 2011, pp. 282-301. 22. M. Gebser, B. Kaufmann, R. Kaminski, M. Ostrowski, T. Schaub, and M. Schneider, "Potassco: The Potsdam answer set solving collection," AI Communications, vol. 24, pp. 107-124, 2011.
2cs.AI
arXiv:1701.01393v5 [math.AC] 24 Aug 2017 On the n-th row of the graded Betti table of an n-dimensional toric variety Alexander Lemmens Abstract We prove an explicit formula for the first non-zero entry in the n-th row of the graded Betti table of an n-dimensional projective toric variety associated to a normal polytope with at least one interior lattice point. This applies to Veronese embeddings of Pn . We also prove an explicit formula for the entire n-th row when the interior of the polytope is onedimensional. All results are valid over an arbitrary field k. Index terms— syzygies, toric varieties, lattice polytopes, Koszul cohomology Contents 1 Introduction 1 2 Toric varieties and graded Betti tables 4 3 Combinatorial proof 8 1 Introduction Let k be a field. In this article we study syzygies of projectively embedded toric varieties X/k. More precisely, we give explicit formulas in terms of the combinatorics of the defining polytope for certain graded Betti numbers, which appear in the minimal free resolution of the homogeneous coordinate ring of X as a graded module, obtained by repeatedly taking syzygies. These Betti numbers are typically gathered in the graded Betti table: 0 1 2 3 .. . 0 1 1 0 0 κ1,1 0 κ1,2 0 κ1,3 .. .. . . 2 0 3 0 4 0 κ2,1 κ2,2 κ2,3 .. . κ3,1 κ3,2 κ3,3 .. . κ4,1 κ4,2 κ4,3 .. . ... ... ... ... ... Here κp,q is the number of degree p + q summands of the p-th module in the resolution. One alternatively defines κp,q as the dimension of the Koszul 1 The final publication is http://dx.doi.org/10.1007/s10801-017-0786-y available 1 at springer via cohomology space Kp,q (X, O(1)). The graded Betti table is expected to contain a wealth of geometric information and is the subject of several important open problems and conjectures. But the vast part of it is poorly understood. For a number of entries an explicit formula in terms of the defining lattice polytope was known before. Examples of this can be found in [3, 11]. But for this paper the most relevant result is that of Schenck, who proved [16] that for projective toric surfaces coming from a lattice polygon with b lattice boundary points κp,2 = 0 for all p ≤ b − 3. Hering proved in [11, Theorem IV.20] using a theorem of Gallego-Purnaprajna [9, Theorem 1.3] that the next entry κb−2,2 is not zero. Both results were already known in the case this polygon is equal to the triangle with vertices (0, d), (d, 0), (0, 0). This polygon gives the d-fold Veronese embedding of the projective plane, for which Loose [12] proved that the number of zeroes in the quadratic strand equals 3d−3 (not counting κ0,2 = 0 as a zero). This result was independently rediscovered by Ottaviani and Paoletti [14], and they generalized this to the following conjecture: Conjecture 1. For the d-fold Veronese embedding of n-dimensional projective space κp,q = 0 whenever p ≤ 3d − 3 and q ≥ 2. This is known as property Np with p = 3d − 3. For d > n this is generalized by the following conjecture [7, p. 643, Conjecture 7.6] which the authors already proved for q = n: Conjecture 2. If we take a minimal free resolution of the line bundle OPn (b) on the Veronese embedding of Pn of degree d with d ≥ b + n + 1 then κp,q = 0 for all 1 ≤ q ≤ n and     d+q d−b−1 p< − − q. q q Syzygies of Veronese embeddings are still an active area of research [2, 6, 10, 15, 13]. For a short introduction to syzygies and to toric varieties we refer the reader to the next section. We will not prove this conjecture, but we will prove an explicit formula for κ(d+n)−(d−b−1)−n,n which is the first non-zero entry on the n-th row. We also n n prove a formula for the first non-zero entry in the n-th row of the Betti table of any projectively normal toric variety of dimension n, if this row is not zero. Note that the n-th row is the last non-zero row if it is not zero. We will work over an arbitrary field k. For a convex lattice polytope ∆ we denote by ∆(1) the convex hull of the lattice points in the topological interior of ∆. ∆(1) We are now ready to formulate our main result: 2 Theorem 3. Let X be a toric variety coming from an n-dimensional normal polytope ∆ ⊆ Rn . Let ∆(1) be the interior polytope of ∆. Let S = ∆ ∩ Zn , T = ∆(1) ∩ Zn and N = #S, N (1) = #T . • If p < N − N (1) − n then κp,n = 0.  (1) −2 • If ∆(1) is not 1-dimensional then κN −N (1) −n,n = t+N where t is the N (1) −1 number of translations of T that are contained in S. (If N (1) = 0 then κN −N (1) −n,n = 0.)  N −ℓ • If ∆(1) is 1-dimensional then ∀p ≥ 0: κp+N −N (1) −n,n = (p + 1) N (1) −p−1 where ℓ is the number of lines parallel to ∆(1) that are not disjoint with S. The first statement actually follows from Green’s linear syzygy theorem [8, Theorem 7.1] combined with Koszul duality. The second statement already appeared for n = 2 as a conjectural formula in [3], where more information on Koszul cohomology of toric surfaces can be found. Recall that κp,q = 0 whenever q > n, and note that if ∆(1) = ∅ then κp,q = 0 whenever q ≥ n as follows from [11, Proposition IV.5 p. 17-18]. Theorem 4. In the context of conjecture 2 the first non-zero entry on the n-th row equals   b+2n+1  + d−b−1 −2 n n  κ(d+n)−(d−b−1)−n,n = . d−b−1 n d −1 n These two theorems will be proved at the end of section 2 using results from section 3. Corollary 5. For toric surfaces coming from polygons of lattice width two, we know the entire Betti table explicitly.       N −3 N −1 N −3 κp,2 = max(p−N +N (1) +3, 0) , κp,1 = κp−1,2 +p −2A p p+1 p−1 where A = N/2 + N (1) /2 − 1 is the area of ∆. Of course κ0,0 = 1 and everything else is zero. The second formula comes from [3, lemma 1.3], the first follows directly from our theorem 3. Using [4, Theorem 1.3] one can deduce the following formula for the graded Betti table of the canonical model of a tetragonal curve in a toric surface:     X 2 g−3 g−3 max(p − bi − 1, 0) , κg−p−2,1 = κp,2 = (g − p − 2) + p p−2 i=1 where b1 , b2 are the tetragonal invariants introduced by Schreyer in [17, p. 127], and g is the genus. Actually this formula is true for all tetragonal curves as follows from the explicit minimal free graded resolution in Schreyer’s article. 3 We include this explicit formula because it is not easy to find in the literature. In section 2 we explain toric varieties, syzygies, Koszul cohomology and we prove these theorems using results from section 3. We use Koszul duality [1, p. 21] which expresses Betti numbers on the n-th row in terms of Betti numbers on the first row of the Betti table of the Serre dual line bundle. The core of the article is section 3 where we construct an explicit basis for the last non-zero entry L on the first row of the graded Betti table of any graded module of the form q≥0 H 0 (qL + M ) for line bunldes L, M with H 0 (M ) = 0, H 0 (L) 6= 0, H 0 (L + M ) 6= 0 on any normal projective toric variety. This comes down to constructing a basis of the kernel of the map p ^ H 0 (L) ⊗ H 0 (L + M ) → p−1 ^ H 0 (L) ⊗ H 0 (2L + M ) with p = dim H 0 (L + M )− 1. Theorems 3 and 4 can then be proved from results from section 3, namely theorem 9 (which actually also follows from Green’s linear syzygy theorem [8, Theorem 7.1]), corollary 21 and theorem 22. Acknowledgements This article is part of my Ph.D thesis which is funded by the Research Foundation Flanders (FWO). It was my colleagues Wouter Castryck and Filip Cools who noticed patterns in Betti tables of certain toric surfaces, which motivated me to find an explicit basis. I am also grateful to the referee for carefully reading my article and making many useful suggestions. I also want to thank Milena Hering for bringing the article [7] to my attention. 2 Toric varieties and graded Betti tables Projectively normal toric varieties We work over an arbitrary field k. By lattice points we mean points of Zn . Projective toric varieties are built out of polytopes ∆ ⊆ Rn that are the convex hull of a finite set of lattice points. This works as follows. Suppose ∆ is ndimensional and let P1 , . . . , PN∆ be a list of all lattice points of ∆, we define an embedding φ∆ : (A1 \{0})n → PN∆ −1 : (λ1 , . . . , λn ) 7→ n Y i=1 P λi 1,i : . . . : n Y i=1 PN∆ ,i λi  , where Pj,i is the i-th coordinate of Pj . Let X∆ be the closure of the image of φ∆ . If it happens that a∆ ∩ Zn + b∆ ∩ Zn = (a + b)∆ ∩ Zn for all positive integers a, b, then the polytope is called normal. In this case the projective toric variety corresponding to ∆ is just X∆ and it is projectively normal. Example. The d-fold Veronese embedding of projective space is given by a polytope of the following form: ∆ = {(x1 , . . . , xn ) ∈ (R≥0 )n |x1 + . . . + xn ≤ d} 4 This gives the Veronese embedding of Pn into PN −1 where N = #∆ ∩ Zn = n+d d . For instance if n = 2 and d = 2 we get the embedding A1 \{0} × A1 \{0} → P5 : (x, y) 7→ (x2 : xy : x : y 2 : y : 1). The monomials x2 , xy, x, y 2 , y, 1 correspond to the lattice points of the triangle ∆ with vertices (2, 0), (0, 2), (0, 0). y2 y xy 1 x x2 When taking the Zariski closure of the image this corresponds to the standard Veronese embedding P2 → P5 : (x : y : z) 7→ (x2 : xy : xz : y 2 : yz : z 2 ). If ∆ is not normal then one can still take integer multiples q∆, q ≥ 1, which will be normal for sufficiently large q. One can then associate to ∆ the toric variety Xq∆ where q is large enough so that q∆ is normal. This variety does not depend on q (but its embedding does). However for simplicity we will restrict to the case when ∆ is normal. The homogeneous coordinate ring of X∆ is given by M M Vq∆ = H 0 (X, qL), q≥0 q≥0 where by Vq∆ we mean the vector space spanned by the monomials (possibly with negative exponents) xi11 . . . xinn corresponding to lattice points (i1 , . . . , in ) ∈ q∆. By L we mean the very ample line bundle coming from the embedding into projective space. Graded Betti tables Given any projective variety X with homogeneous coordinate ring R = H 0 (X, qL) we can consider the graded Tor modules ToriS ∗ H 0 (X,L) (R, k). L q≥0 Note that R is a graded module over the symmetric algebra S ∗ H 0 (X, L). These graded Tor modules can be computed either by taking a graded free resolution of R (syzygies) or by taking a graded free resolution of k (Koszul cohomology). We will mainly work with the latter. The graded Betti table is a table of nonnegative integers κp,q , in the p-th column and the q-th row, where p, q ≥ 0. They are defined as the dimension over k of the degree p+q part of TorpS ∗ H 0 (X,L) (R, k). In general the table has the following shape: 0 1 2 3 .. . 0 1 1 0 0 κ1,1 0 κ1,2 0 κ1,3 .. .. . . 2 0 3 0 4 0 κ2,1 κ2,2 κ2,3 .. . κ3,1 κ3,2 κ3,3 .. . κ4,1 κ4,2 κ4,3 .. . 5 ... ... ... ... ... Example. When ∆ is the convex hull of (2, 0), (0, 2), (0, 0) we have the minimal graded free resolution of R: d d d d 1 2 3 0 S ∗ V∆∩Z2 −→ F1 −→ F2 −→ 0 −→ F3 −→ R. Here V∆∩Z2 is the vector space spanned by the monomials x2 , xy, x, y 2 , y, 1 corresponding to the lattice points of ∆. The symmetric algebra S ∗ V∆∩Z2 is the polynomial ring in 6 variables x(2,0) , x(1,1) , x(1,0) , x(0,2) , x(0,1) , x(0,0) and is the homogeneous coordinate ring of P5 . The image of d0 corresponds to the ideal cutting out the Veronese surface. This ideal is generated by six elements: x(2,0) x(0,2) − x2(1,1) , x(0,2) x(0,0) − x2(0,1) , x(2,0) x(0,0) − x2(1,0) , x(2,0) x(0,1) − x(1,0) x(1,1) , x(1,0) x(0,2) − x(0,1) x(1,1) , x(1,1) x(0,0) − x(1,0) x(0,1) . These constitute a minimal set of generators of the ideal. So F1 is a free graded module of rank six over the polynomial ring S ∗ V∆∩Z2 where the basis elements all have degree two and are mapped by d0 to the generators of the ideal. This makes sure that d0 is a degree-preserving morphism of modules. This means that κ1,1 = 6. The image of d1 consists of the relations between these generators, called syzygies. It turns out that there is a minimal generating set of eight syzygies of degree 3, so that F2 is a rank 8 graded free module where the basis elements have degree 3. So κ2,1 = 8. It turns out that F3 has rank 3 where the basis elements have degree 4. This gives the graded Betti table: 0 1 0 1 0 1 0 6 2 0 0 .. .. .. . . . 2 0 8 0 .. . 3 0 3 0 .. . 4 0 0 0 .. . ... ... ... ... Note that κ0,0 = 1 because the polynomial ring S ∗ V∆∩Z2 is a free module of rank one over itself with the monomial 1 as a generator. Koszul cohomology Let L, N be line bundles on a complete variety S ∗ V = S ∗ H 0 (X, L) be L X. Let 0 0 the symmetric algebra over H (X, L), then q≥0 H (X, qL + N ) is a graded module over S ∗ V . We define the Koszul cohomology space Kp,q (X, N, L) as the homology of the following sequence: p+1 ^ δp+1 V ⊗ H 0 (X, (q − 1)L + N ) −→ δp −→ p ^ V ⊗ H 0 (X, qL + N ) p−1 ^ V ⊗ H 0 (X, (q + 1)L + N ) Pp where δp (v1 ∧ . . . ∧ vp ⊗ w) = i=1 (−1)i v1 ∧ . . . ∧ vˆi ∧ . . . ∧ vp ⊗ (vi w). The vˆi indicates that vi is removed from the wedge product. When N = 0 we write Kp,q (X, L) = Kp,q (X, 0, L). We denote the dimension of Kp,q (X, N, L) 6 (resp. Xp,q (X, L)) by κp,q (X, N, L) (resp. κp,q (X, L)). If L is the very ample line bundle coming from a projective embedding this agrees with our earlier definition of κp,q using syzygies. Example. For our Veronese example with n = d = 2 we will construct an explicit element of the cohomology space K2,1 (X, L): y 2 ∧ xy ⊗ xz − y 2 ∧ yz ⊗ x2 + xy ∧ yz ⊗ yx ∈ 2 ^ V∆ ⊗ V∆ , which is in the kernel of δ2 , so it defines an element of K2,1 (X, L). We now turn to the proof of theorem 1 and corollary 2. To any n-dimensional convex lattice polytope ∆ ⊆ Rn one can associate the inner normal fan Σ [5, p. 321] whose rays ρ are in one-to-one correspondence with the facets of ∆ and the torus-invariant prime divisors Dρ . In general for any torus-invariant divisor P D = ρ aρ Dρ the vector space H 0 (X, D) has a basis that naturally corresponds to {P ∈ Zn |∀ρ ∈ Σ(1) : hP, ρi ≥ −aρ } where Σ(1) is the set of rays of the fan Σ. Multiplication of these global sections corresponds to coordinatewise addition of lattice points. The divisor whose global sections correspond to ∆ gives the very ample line bundle of our embedding into projective space. Note that in this setting nothing changes when extending the field k. In the next proof we assume k algebraically closed. We also use in the following proof that taking the pull-back of a line bundle through a birational morphism of projective normal varieties preserves global P P sections. We will also use the fact that adding ρ∈Σ(1) −Dρ to a divisor ρ aρ Dρ amounts to taking the interior of the corresponding polytope (∗). Proof of theorem 3 using results from the next section. This will rely on Koszul duality which requires smoothness, so letP X ′ → X be a toric resolution of singularities as in [5, p. 515-519] and let K = ρ∈Σ′ (1) −Dρ be the canonical divisor of X ′ . Let L be the line bundle on X coming from its projective embedding. The pull-back of L to X ′ (which we also denote by L) is globally generated on X ′ and hence nef. By Demazure vanishing [5, p. 410] H i (X ′ , qL) = 0, ∀i, q ≥ 1. By Koszul duality [1, p. 21] we have κN −1−n−p,n (X, L) = κN −1−n−p,n (X ′ , L) = κp,1 (X ′ , K, L), ∀p ≥ 0. The first equality follows because H 0 (X, qL) = H 0 (X ′ , qL), ∀q ≥ 0 as taking the pull-back of L through X ′ → X preserves global sections. We claim that κp,1 (X ′ , K, L) is the dimension of the kernel of the following map: δ: p ^ VS ⊗ VT → p−1 ^ VS ⊗ V(2∆)(1) ∩Zn where by VS (resp. VT ) we mean a vector space with S (resp. T ) as a basis. This is because H 0 (X ′ , K) = 0 and H 0 (X ′ , L+K) corresponds to T = ∆(1) ∩ Zn Vp−1 VS ⊗VS+T . which we know by (∗). Note that the image of δ is contained in Now all the results of the theorem follow from theorem 9, corollary 21 and theorem 22, except when p = 0 and N (1) = 1, but then δ = 0 and the result is easy. For the case where ∆(1) is one-dimensional, note that ℓ (as in theorem 3) equals N − #X, with X as in theorem 22. 7 By the same duality as in the proof of theorem 3 it follows that κp,q = 0 whenever q > n. Proof of theorem 4. Denote by κp,q (b; d) the dimension of the Kuszul cohomology of the graded module M H 0 (OPn (b + id)), i≥0 Let N =  n+d n be the number of lattice points in dΣ where Σ = {(x1 , . . . , xn ) ∈ R≥0 |x1 + . . . + xn ≤ d} is the standard simplex of dimension n. As in the proof of theorem 3 we have duality: κp,n (b; d) = κN −n−p−1,1 (−b − n − 1; d). Strictly speaking, we cannot apply theorem [1, p. 21], but the proof obviously generalizes and the vanishing condition will be satisfied because H 1 , . . . , H n−1 of any line bundle on Pn will vanish. This κN −n−p−1,1 (−b − n − 1; d) is the dimension of the kernel of N −n−p−1 ^ S⊗T → N −n−p−2 ^ S ⊗ S + T, where T = (d − b − n − 1)Σ ∩ Zn and S = dΣ ∩ Zn so that X = (b + n + 1)Σ ∩ Zn. Applying theorem 9 we find that κp,n (b; d) = 0 whenever N − n − p − 1 ≥ #T =    d−b−1 , or equivalently p < n+d − d−b−1 − n. The formula for κp,n (b; d) n n n   d−b−1 when p = n+d − − n follows from corollary 21. n n 3 Combinatorial proof In this section we do not require our polytopes to be normal. From now on instead of working with spaces of monomials VS , VT etcetera, we replace monomials xi11 . . . xinn by the corresponding lattice point (i1 , . . . , in ). Let S and T ⊆ Zn with T finite, let p ≥ 0. We abusively write S (resp. T ) for a vector space with S (resp. T ) as a basis. We are interested in the kernel of the following map: δ: p ^ P1 ∧ . . . ∧ Pp ⊗ Q 7−→ S⊗T → p X p−1 ^ S ⊗ (S + T ) : (−1)i P1 ∧ . . . ∧ P̂i ∧ . . . ∧ Pp ⊗ (Q + Pi ), i=1 where in Zn . V−1 of a vector space is zero. By Q+Pi we mean coordinate-wise addition Definition 6. Let S and T be finite subsets of Zn and p ≥ 0 an integer. If Vp S⊗T then x can be uniquely written (up to order) as a linear combination x∈ (with non-zero coefficients) of expressions of the form P1 ∧ . . . ∧ Pp ⊗ Q with P1 , . . . , Pp ∈ S, Q ∈ T and P1 > . . . > Pp for some total order on S. We define the support of x, denoted supp(x), as the convex hull of the set of points Pi occurring in the wedge part of the terms of x. 8 Definition 7. A lattice pre-order on Zn is a reflexive transitive relation ≤ on Zn such that ∀P1 , P2 ∈ Zn : P1 ≤ P2 or P2 ≤ P1 and ∀P1 , P2 , P3 ∈ Zn : if P1 ≤ P2 then P1 +P3 ≤ P2 +P3 . We call ≤ a lattice order if it is anti-symmetric. One way to obtain a lattice pre-order is to take a linear map L : Rn → R and set P1 ≤ P2 if L(P1 ) ≤ L(P2 ). If the coefficients defining L are linearly independent over Q then it defines a lattice order. We write P1 < P2 if P1 ≤ P2 and not P2 ≤ P1 , and we write P1 ∼ P2 if P1 ≤ P2 and P2 ≤ P1 . In the proof of the following lemma we will use the property that for any points P, PM , Q, Q′ ∈ Zn and any pre-order on Zn , if P ≤ PM and Q ≤ Q′ then either P + Q < PM + Q′ or PM ∼ P and Q′ ∼ Q. Lemma 8. Let S and T be finite subsets of Zn , p ≥ 1. Let x ∈ ker δ be non-zero with δ as above. Let ≤ be a lattice pre-order such that supp(x) has a unique maximum PM . Let S ′ = supp(x)\{PM } and T ′ the set of non-maximal points Vp−2 ′ Vp−1 ′ S ⊗(S ′ +T ′) be defined analogously S ⊗T ′ → Q ∈ T . Finally, let δ ′ : ′ to δ. Then there exists a non-zero y ∈ ker δ such that x = PM ∧ y + terms not containing PM in the ∧ part. Proof. Write X λi PM ∧ P2,i ∧ . . . ∧ Pp,i ⊗ Qi + terms not containing PM in the ∧ part, x= i without any redundant terms. Then define X λi P2,i ∧ . . . ∧ Pp,i ⊗ Qi . y= i All we have to prove now is that y ∈ ker(δ ′ ). It is clear that supp(y) ∩ Zn ⊆ S ′ . Let us prove that every Qi in this expression is in T ′ . We know that Qi ∈ T . If it is not in T ′ then it is maximal. But then, applying δ, the term −P2,i ∧. . .∧Pp,i ⊗ (PM + Qi ) of δ(x) has nothing to cancel against, contradicting the fact that δ(x) = 0. The reason that it has nothing to cancel against is that all terms in δ(x) end with ⊗(P + Q) with P ≤ PM and Q ≤ Qi so that P + Q < PM + Qi unless P ∼ PM , and Q ∼ Qi . As PM is the unique maximum of supp(x) P ∼ PM implies P = PM . But if Q 6= Qi and P = PM then we still have P + Q 6= PM + Qi , so that we have only one term of δ(x) ending on ⊗(PM + Qi ), which has nothing to cancel against. So y is in the domain of δ ′ . We now prove that δ ′ (y) = 0: 0 = δ(x) = −PM ∧ δ ′ (y) + terms not containing PM in the ∧ part. Because terms of PM ∧ δ ′ (y) cannot cancel against terms without PM in the ∧ part, δ ′ (y) must be zero. Example. Our Veronese example of n = d = 2 becomes S = T = {(2, 0), (1, 1), (1, 0), V2 S⊗S (0, 2), (0, 1), (0, 0)} and in the new notation the explicit cochain in becomes x = (0, 2) ∧ (1, 1) ⊗ (1, 0) − (0, 2) ∧ (0, 1) ⊗ (2, 0) + (1, 1) ∧ (0, 1) ⊗ (1, 1). 9 If we take the pre-order coming from the linear map L(x1 , x2 ) = x2 then PM = (0, 2) is the unique maximum of supp(x) = {(0, 2), (1, 1), (0, 1)} and the lemma gives y = (1, 1)⊗(1, 0)−(0, 1)⊗(2, 0). Indeed, x = (0, 2)∧y+(1, 1)∧(0, 1)⊗(1, 1) and the last term does not have (0, 2) in the wedge part. x2 2 x2 PM 2 supp(x) 1 1 S T′ 1 2 x1 1 Theorem 9. Notation as above. Suppose #T ≤ p, then δ : Vp−1 S ⊗ (S + T ) is injective. 2 Vp x1 S⊗T → Proof. By induction on p. The case p = 0 is trivial as the domain of δ is zero (because T = ∅). Let p ≥ 1, and take a non-zero element x of the kernel. Let ≤ be a lattice order. Now apply the construction of lemma 8 to obtain S ′ and T ′ and a non-zero y ∈ ker δ ′ . Since #T ′ < #T , we have #T ′ ≤ p − 1. Applying the induction hypothesis we get a contradiction. Note that this also follows fromL Green’s Linear syzygy theorem [8,L Theorem 7.1] applied to the graded module q≥0 qS + T over the graded ring q≥0 qS. We give this direct proof because we rely on the same technique later. We now want to construct elements of the kernel of δ when p = #T − 1. To this end we do the following construction: let X = {P ∈ Zn |P +QT ⊆ S} and consider the elements of X as variables. To any monomial A = P ∈X P aP of degree p with variables in X we will associate an element xA of the kernel of δ. Let P1 , . . . , Pp be a list of points in X such that each point P occurs aP times in the list. Let Q1 , . . . , Qp+1 be a list of all points of T . Now we define xA = Y 1 X sgn(σ)(P1 + Qσ(1) ) ∧ . . . ∧ (Pp + Qσ(p) ) ⊗ Qσ(p+1) . aP ! P σ∈Sp+1 Up to sign, this will be independent of the choice of lists P1 , . . . , Pp and Q1 , . . . , Qp+1 . Lemma 10. The xA we just constructed has integer coefficients and is in the kernel of δ. Proof. Consider permutations σ, σ ′ ∈ Sp+1 as in the previous definition such that σ({i|Pi = P }) = σ ′ ({i|Pi = P }) for all P ∈ X. We claim that the terms in xA corresponding to σ and σ ′ will be equal. This is because in the wedge product the only thing that changes is the order, and the change in sign caused by changing the order is compensated by the change in sgn(σ). ′ Now the number of bijections σQ with the property that σ({i|Pi = P }) = ′ σ ({i|Pi = P }), ∀P is equal to P aP !, hence the expression will have integer coefficients. We now prove that xA is in the kernel of δ. Obviously the sums Pi + Qσ(i) are 10 all in S. We claim that when applying δ everything cancels. Let C be the set of all ordered pairs (σ, i) where σ ∈ Sp+1 and i ∈ {1, . . . , p}. Then Y  aP ! δ(xA ) P = X (−1)i sgn(σ)(P1 + Qσ(1) ) ∧ . . . ∧ (Pi \ + Qσ(i) ) ∧ . . . ∧ (Pp + Qσ(p) )) (σ,i)∈C ⊗ (Qσ(p+1) + Qσ(i) + Pi ). We now partition C into (unordered) pairs: (σ, i) and (σ ′ , i′ ) belong to the same pair if either they are equal or the following conditions are met: • i = i′ • σ(j) = σ ′ (j), for all j ∈ / {i, p + 1} • σ(i) = σ ′ (p + 1) and σ ′ (i) = σ(p + 1). These conditions imply that σ ′−1 ◦ σ is a transposition, and hence has sign -1. One now easily sees that pairs in C yield terms that cancel. Example. Suppose S = {(2, 0), (1, 1), (1, 0), (0, 2), (0, 1), (0, 0)} and T = {(1, 0), (0, 1), (0, 0)} and p = 2. Then X = {(1, 0), (0, 1), (0, 0)}. Take for example the monomial A = (1, 0)(0, 1). If we take the lists (1, 0), (0, 1) and (1, 0), (0, 1), (0, 0) we get: xA =(1, 0) ∧ (1, 1) ⊗ (0, 1) − (1, 0) ∧ (0, 2) ⊗ (1, 0) + (2, 0) ∧ (0, 2) ⊗ (0, 0) −(2, 0) ∧ (0, 1) ⊗ (0, 1) + (1, 1) ∧ (0, 1) ⊗ (1, 0) − (1, 1) ∧ (1, 1) ⊗ (0, 0). Of course the last term is zero. Note that each term is of the form P ∧ Q ⊗ ((2, 2) − P − Q) where P belongs to the lower right blue triangle and Q to the upper left one. (0,2) S (0,1) (0,1) (1,1) T (0,0) (1,0) (2,0) (0,0) (1,0) Example. Suppose S = {(0, 0), (1, 0), (2, 0), (3, 0), (0, 1), (1, 1), (2, 1), (3, 1)} and T = {(0, 0), (1, 0), (0, 1), (1, 1)} so that X = {(0, 0), (1, 0), (2, 0)}, p = 3 and consider the monomial A = (0, 0)2 (2, 0), then we get xA = − (0, 0) ∧ (1, 0) ∧ (3, 1) ⊗ (0, 1) + (0, 0) ∧ (1, 0) ∧ (2, 1) ⊗ (1, 1) − (0, 0) ∧ (1, 1) ∧ (2, 1) ⊗ (1, 0) + (0, 0) ∧ (1, 1) ∧ (3, 0) ⊗ (0, 1) − (0, 0) ∧ (0, 1) ∧ (3, 0) ⊗ (1, 1) + (0, 0) ∧ (0, 1) ∧ (3, 1) ⊗ (1, 0) − (1, 0) ∧ (0, 1) ∧ (3, 1) ⊗ (0, 0) + (1, 0) ∧ (0, 1) ∧ (2, 0) ⊗ (1, 1) − (1, 0) ∧ (1, 1) ∧ (2, 0) ⊗ (0, 1) + (1, 0) ∧ (1, 1) ∧ (2, 1) ⊗ (0, 0) − (0, 1) ∧ (1, 1) ∧ (3, 0) ⊗ (0, 0) + (0, 1) ∧ (1, 1) ∧ (2, 0) ⊗ (1, 0) 11 In this case the first two wedge factors in each term are from the left blue square and the third wedge factor is from the right blue square. In the definition there are 24 terms but each term occurs twice and we divide by two so only twelve terms are left. S (0,1) (1,1) (0,1) (1,1) (2,1) (3,1) T (0,0) (1,0) (2,0) (3,0) (0,0) (1,0) Q One way to get rid of the factor P a1P ! is to only sum over one element of each equivalence class, where two permutations σ, σ ′ are equivalent if σ ′ ({i|Pi = P }) = σ ′ ({i|Pi = P }) for all P ∈ X. So the construction works over any field. Proposition 11. The xA for distinct monomials A are linearly independent and the support of any linear combination of them is the convex hull of the union of the supp(xA ) occurring with non-zero coefficient. Proof. By induction on p. In the case p = 0 there is only one monomial namely the constant monomial 1. The corresponding xA is ∧(∅) ⊗ Q where Q is the unique point of T . So the statement is obvious. So suppose p ≥ 1. Let x = P λ x j A j with the Aj distinct. We have to prove that j  [ supp(xAj ) 6= ∅. supp(x) = conv j To prove this equality, it is enough to prove that every linear map L : Rn → R attains the same maximum on both sides of the equation. It is enough to show this when L|Zn is injective (as these L are dense). Given such an L, let ≤ be the order it induces on Zn . Let QM be the maximum of T for this order and PM ∈ X the greatest point occurring as a variable in some monomial Aj . We will prove that PM + QM is the maximum of both sides of the equation, proving that L attains the same maximum on both, and that both sides are non-empty. Obviously nothing greater than PM + QM can possibly occur in any supp(xAj ). We have X X λj xAj . λj xAj + x= j PM |Aj j PM does not occur in Aj For any Aj containing PM we define Bj as the monomial Aj /PM of degree p − 1. Using T ′ = T \{QM } we can associate to any Bj an element xBj so that xAj = ±(PM + QM ) ∧ xBj plus terms where everything in the ∧ part is smaller than PM + QM . By induction xBj 6= 0 so PM + QM is the maximum of supp(xAj ). Finally X ± λj xBj + terms without PM + QM in the ∧ part. x = (PM + QM ) ∧ j PM |Aj By induction the linear combination of the xBj is not zero so PM + QM is the maximum of supp(x). 12 So far, we have studied the kernel of the map δ: p ^ P1 ∧ . . . ∧ Pp ⊗ Q 7−→ S⊗T → p X p−1 ^ S ⊗ (S + T ) : (−1)i P1 ∧ . . . ∧ P̂i ∧ . . . ∧ Pp ⊗ (Q + Pi ). i=1 We now introduce the following maps δi : S ⊗p ⊗ T → S ⊗(p−1) ⊗ (S + T ) : P1 ⊗ . . . ⊗ Pp ⊗ Q 7→ P1 ⊗ . . . ⊗ P̂i ⊗ . . . ⊗ Pp ⊗ (Pi + Q). This time we look at the intersection of the kernels of the δi . If p = 0 there is T nothing to intersect so we put 0i=1 ker δi = T . We introduce this new machinery because it helps us prove our main result. Example. Let S = T = {(1, 1), (1, 0), (0, 1), (0, 0)} then x =(1, 0) ⊗ (0, 1) ⊗ (0, 0) − (1, 0) ⊗ (0, 0) ⊗ (0, 1) −(0, 0) ⊗ (0, 1) ⊗ (1, 0) + (0, 0) ⊗ (0, 0) ⊗ (1, 1) is in ker δ1 ∩ ker δ2 . Proposition 12. There is an injective map ι: p ^ S ⊗ T → S ⊗p ⊗ T : P1 ∧ . . . ∧ Pp ⊗ Q 7→ X sgn(σ)Pσ(1) ⊗ . . . ⊗ Pσ(p) ⊗ Q σ∈Sp and ι(ker δ) ⊆ Tp i=1 ker δi Proof. Note that the definition of ι does not depend on any choices. It is injective as cancellation is impossible. Let us prove the last assertion. We define g: p−1 ^ S ⊗ (S + T ) → S ⊗(p−1) ⊗ (S + T ) analogously to T ι. If we can prove that δi ◦ ι = (−1)i g ◦ δ for all i then it follows that ι(ker δ) ⊆ i ker δi . Let x = P1 ∧ . . . ∧ Pp ⊗ Q, we compute X [ δi (ι(x)) = sgn(σ)Pσ(1) ⊗ . . . ⊗ P σ(i) ⊗ . . . ⊗ Pσ(p) ⊗ (Pσ(i) + Q) σ∈Sp g(δ(x)) = p X X (−1)j sgn(τ )Pτ ′ (1) ⊗ . . . ⊗ Pτ ′ (p−1) ⊗ (Pj + Q), j=1 τ ∈Sp−1 where τ ′ = (j j + 1 . . . p) ◦ τ . Here (j j + 1 . . . p) maps every number from j up to p − 1 to itself plus one and everything smaller than j to itself, and p is mapped to j. For every τ ∈ Sp−1 we formally put τ (p) = p so that Sp−1 ⊆ Sp . There is a bijection from Sp to {1, . . . , p} × Sp−1 mapping σ to (j, τ ) where σ ◦ (i i + 1 . . . p) = (j j + 1 . . . p) ◦ τ. Note that sgn(σ)(−1)p−i = sgn(τ )(−1)p−j . Using this bijection one sees that δi (ι(x)) = (−1)i g(δ(x)). This proves that δi ◦ ι = (−1)i g ◦ δ and hence that ι(ker δ) ⊆ ker δi . 13 For anyT sequence P1 , . . . , Pp of points in X = {P |P + T ⊆ S} one defines an p element of i=1 ker δi : X xP1 ,...,Pp := sgn(σ)(P1 + Qσ(1) ) ⊗ . . . ⊗ (Pp + Qσ(p) ) ⊗ Qσ(p+1) σ∈Sp+1 where Q1 , . . . , Qp+1 is a list of all the points of T . Whenever we use this notation we assume that #T = p + 1. Just as the xT A are intended to be a basis of ker δ, p the xP1 ,...,Pp are intended to be a basis of i=1 ker δi . Lemma 13. Consider the right group action of Sp on the set of sequences P1 , . . . , Pp ∈ X by permutation. So P1 , . . . , Pp · σ = Pσ(1) , . . . , Pσ(p) . For a given such sequence let A be the monomial P1 . . . Pp , then X xPσ(1) ,...,Pσ(p) . ι(xA ) = σ̄∈Stab(P1 ,...,Pp )\Sp (We sum over the right cosets of the stabilizer.) Proof. It is enough to prove this equality in characteristic zero. We have Y ι(xA ) aP ! P  X  =ι sgn(σ)(P1 + Qσ(1) ) ∧ . . . ∧ (Pp + Qσ(p) ) ⊗ Qσ(p+1) σ∈Sp+1 = X X sgn(σ ◦ τ )(Pτ (1) + Qσ(τ (1)) ) ⊗ . . . ⊗ (Pτ (p) + Qσ(τ (p)) ) ⊗ Qσ(p+1) τ ∈Sp σ∈Sp+1 = X X sgn(σ ′ )(Pτ (1) + Qσ′ (1) ) ⊗ . . . ⊗ (Pτ (p) + Qσ′ (p) ) ⊗ Qσ′ (p+1) τ ∈Sp σ′ ∈Sp+1 = X xPτ (1) ,...,Pτ (p) τ ∈Sp = Y P aP ! X xPτ (1) ,...,Pτ (p) τ̄ ∈Stab(P1 ,...,Pp )\Sp The last equality follows because theQorder of the stabilizer is result follows by removing the factor P aP !. Q P aP !. The ι(ker δ) is generated by Lemma 14. The span of the xP1 ,...,Pp intersected with T p the ι(xA ). In particular if the xP1 ,...,Pp are a basis of i=1 ker δi then the xA are a basis of ker δ. Proof. We have a right group action of Sp on S ⊗p ⊗ T , restricting to one on T p i=1 ker δi : any σ ∈ Sp maps P1 ⊗ . . . ⊗ Pp ⊗ Q to sgn(σ)Pσ(1) ⊗ . . . ⊗ Pσ(p) ⊗ Q. Clearly any element of ι(ker δ) is fixed by this action. The action of Sp on the set of sequences P1 , . . . , Pp in X from the previous lemma is compatible with the action on S ⊗p ⊗ T in the sense that xP1 ,...,Pp · σ = xPσ(1) ,...,Pσ(p) . Choose an element Rj = P1,j , . . . , Pp,j out of each orbit of the action on sequences. Consider an element x of ι(ker δ) that is a linear combination of the xP1 ,...,Pp . We prove that it is generated by the ι(xA ). Write it as a linear combination of the xP1 ,...,Pp : X X λj,σ̄ xPσ(1),j ,...,Pσ(p),j . x= j σ̄∈Stab(Rj )\Sp 14 Applying the action on S ⊗p ⊗ T to this expression permutes the λj,σ̄ , for each j. Since x is fixed by the action of Sp and the xP1 ,...,Pp are linearly independent (by lemma 18 below), λj,σ̄ doesn’t depend on σ. So x is a linear combination of the X xPσ(1),j ,...,Pσ(p),j = ι(xA ), σ̄∈Stab(Rj )\Sp where A = P1,j . . . Pp,j . Note that we used the previous lemma in the last equality. This proves the first assertion. The second assertion follows from the first, the injectivity of ι and proposition 11. Vp Having established a connection between the S ⊗T context and the S ⊗p ⊗ T context, we now focus on the latter. Tp Definition 15. For any x ∈ i=1 ker δi and i ∈ {1, . . . , p} we define suppi (x) to be the convex hull of the set of lattice points occurring in the i-th factor of some term of x. The following lemma is analogous to lemma 8. T Lemma 16. Let x ∈ pi=1 ker δi and let ≤ be a lattice pre-order on Zn . Fix an i and suppose P ∈ suppi (x) is strictly greater than any other point of suppi (x). ′ Let T ′ be the set of non-maximal points in T . Let δ1′ , . . . , δp−1 : S ⊗(p−1) ⊗ T ′ → S ⊗(p−2) ⊗ (S + T ′ ) be defined analogously to δ1 , . . . , δp . Write X λj P1,j ⊗. . .⊗P (place i)⊗. . .⊗Pp,j ⊗Qj +terms not having P at place i x= j y= X λj P1,j ⊗ . . . ⊗ Pp,j ⊗ Qj (with P removed from place i). j Then y ∈ Tp−1 j=1 ker δj′ . We omit the proof since it is analogous to that of lemma 8. Example. Let S = T = {(1, 1), (1, 0), (0, 1), (0, 0)} then x =(1, 0) ⊗ (0, 1) ⊗ (0, 0) − (1, 0) ⊗ (0, 0) ⊗ (0, 1) −(0, 0) ⊗ (0, 1) ⊗ (1, 0) + (0, 0) ⊗ (0, 0) ⊗ (1, 1) is in ker δ1 ∩ ker δ2 . If we take the order coming from the linear map L(x1 , x2 ) = x2 then PM = (0, 1) is the unique maximum of supp2 (x) = {(0, 1), (0, 0)}. Applying the lemma with i = 2 we get y = (1, 0) ⊗ (0, 0) − (0, 0) ⊗ (1, 0). x2 x2 PM supp2 (x) S supp1 (x) Lemma 17. If p ≥ #T then S x1 x1 Tp i=1 ker δi = 0. Again the proof is analogous to that of theorem 9. 15 LemmaP 18. Let δi : S ⊗p ⊗T → S ⊗(p−1) ⊗(S+T ) be the usual maps, p = #T −1. combination with non-zero coefficients then Let x = j λj xP1,j ,...,Pp,j be a linear S suppi (x) is the convex hull of j suppi (xP1,j ,...,Pp,j ). In particular the xP1 ,...,Pp are linearly independent. One can prove this with the same technique as proposition 11. Lemma 19. Let ∆ be a lattice polytope of dimension at least two with p + 1 lattice points and let δi T : (Zn )⊗p ⊗ (∆ ∩ Zn ) → (Zn )⊗(p−1) ⊗ Zn be the usual p maps. Then for all x ∈ i=1 ker δi \{0} and i ∈ {1, . . . , p} we have ∆ − ∆ ⊆ suppi (x) − suppi (x). Note that the lemma can fail if ∆ is one-dimensional. If n = 1, ∆ = [0, 2] and x = v0 ⊗v0 ⊗v2 −v0 ⊗v1 ⊗v1 −v1 ⊗v0 ⊗v1 +v1 ⊗v1 ⊗v0 then supp1 (x) = [0, 1] and the conclusion of the lemma fails. Proof. We prove this Tpby induction on p. We can suppose i = 1 without loss of generality. Let x ∈ i=1 ker δi \{0} and take v ∈ (∆ − ∆)\(supp1 (x) − supp1 (x)) with integer coordinates. Let P1 , P2 ∈ ∆∩Zn with P2 −P1 = v. Using a unimodular transformation we can suppose P1 = (0, 0, . . . , 0) and P2 = v = (d, 0, . . . , 0) for some d > 0. Case 1: ∆\[P1 , P2 ] contains more than one lattice point. Take a linear map L : Rn → R that does not attain a maximum at P1 or P2 on ∆. We take L to attain its maximum on supp2 (x) at only one point. This induces a lattice pre-order ≤. Tp−1We apply lemma 16 for place 2 to obtain S ′ , T ′ and a non-zero y ∈ j=1 ker(δj′ ) with supp1 (y) ⊆ supp1 (x), so [P1 , P2 ] − [P1 , P2 ] * supp1 (y) − supp1 (y). If #T ′ = p we get a contradiction with the induction hypothesis and if #T ′ < p we get a contradiction with lemma 17. We needed the fact that ∆\[P1 , P2 ] contains more than one lattice point to ensure that T ′ is of dimension at least two, so we can apply the induction hypothesis. Case 2: ∆\[P1 , P2 ] contains only one lattice point. We can suppose this lattice point is (0, −1, 0, . . . , 0). Note that p = #T − 1 = d + 1. Define L1 , L2 : Zn → Z as follows: L1 ((x1 , x2 , . . .)) = −x1 , L2 ((x1 , x2 , . . .)) = x1 −dx2 . We claim that L1 (resp. L2 ) attains its maximum on supp1 (x) at more than one lattice point of supp1 (x). Indeed, applying lemma 16 with L1 (resp. L2 ) and place 1 we get T ′ = {(1, 0, 0, . . . , 0), . . . , (d, 0, 0, . . . , 0)} (resp. {(0, 0, . . . , 0), . . . , (d − 1, 0, 0, . . . , 0)}). In each case the y we obtain leads to a contradiction with lemma 17, unless L1 (resp. L2 ) does not attain its maximum on supp1 (x) at a unique point of supp1 (x) (in which case we cannot apply lemma 16). Therefore L1 (resp. L2 ) attains its maximum at more than one lattice point of supp1 (x). Case 2a: n = 2. Let (x1 , y1 ) and (x1 , y1 + 1) be points of supp1 (x) on which L1 reaches its maximum and let (x2 , y2 ) and (x2 + d, y2 + 1) be points of supp1 (x) on which L2 reaches its maximum. We know by maximality that x2 ≥ x1 and L2 ((x1 , y1 )) ≤ L2 ((x2 , y2 )). If y2 ≤ y1 then [(x2 , y2 + 1), (x2 + d, y2 + 1)] ⊆ supp1 (x) and similarly if y2 ≥ y1 then [(x1 , y1 + 1), (x1 + d, y1 + 1)] ⊆ supp1 (x). In any case we get a contradiction with the fact that v = (d, 0) ∈ / supp1 (x) − supp1 (x). 16 (x1 , y1 + 1) ∇L1 (x1 , y1 ) (x2 + d, y2 + 1) (x2 , y2 ) ∇L2 Case 2b: n ≥ 3. Let π : Zn → Zn−2 bePthe projection that deletes the first two coordinates. So π(∆) = 0. Now δ1 = P ∈Zn−2 δP where δP maps Q1 ⊗ . . . ⊗ Qp ⊗ Q to Q2 ⊗ . . . ⊗ Qp ⊗ (Q + Q1 ) if π(Q1 ) = P and to zero otherwise. As π(Q + Q1 ) = π(Q) + π(Q1 ) = P , there can’t be any cancellation between δP (x) for different P . Therefore δP (x) = 0 for all P ∈ Zn−2 . For any P ∈ Zn−2 and Q0 ∈ π −1 (0) we define a linear automorphism αP,Q0 : (Zn )⊗p ⊗ T −→ (Zn )⊗p ⊗ T ( (Q1 + Q0 ) ⊗ . . . ⊗ Qp ⊗ Q : Q1 ⊗ . . . ⊗ Qp ⊗ Q 7→ Q1 ⊗ . . . ⊗ Qp ⊗ Q if π(Q1 ) = P else. (Recall that by Zn (resp. T ) we mean the vector space with Zn (resp. T ) as a basis. So we define the linear map on basis elements and linearly extend them over the base field.) For any P, P ′ ∈ Zn−2 and Q0 we define α′P,P ′ ,Q0 : (Zn )⊗(p−1) ⊗ T −→ (Zn )⊗(p−1) ⊗ T ( Q1 ⊗ . . . ⊗ Qp−1 ⊗ (Q + Q0 ) if P = P ′ : Q1 ⊗ . . . ⊗ Qp−1 ⊗ Q 7→ Q1 ⊗ . . . ⊗ Qp−1 ⊗ Q else. Then α′P,P ′ ,Q0 ◦ δP ′ = δP ′ ◦ αP,Q0 , from which it follows that αP,Q0 (x) is in ker(δP ′ ) for all P ′ ∈ Zn−2 and Q0 ∈ π −1 (0). So αP,Q0 (x) ∈ ker δ1 and if we define α′′P,Q0 : (Zn )⊗p−1 ⊗ T −→ (Zn )⊗p−1 ⊗ T ( (Q1 + Q0 ) ⊗ . . . ⊗ Qp−1 ⊗ Q : Q1 ⊗ . . . ⊗ Qp−1 ⊗ Q 7→ Q1 ⊗ . . . ⊗ Qp−1 ⊗ Q if π(Q1 ) = P else, then α′′P,Q0 ◦ δi = δi ◦ αP,Q0 for all i = 2, . . . , p. Therefore αP,Q0 (x) ∈ Tp i=1 ker δi . suppP (αP,Q (x)) 0 suppP (x) supp1 (αP,Q0 (x)) supp1 (x) For any P ∈ Zn−2 we define suppP (x) as the convex hull of all points in π −1 (P ) that occur in the first factor of some term of x. Of course this is at most two-dimensional. If we can prove that whenever this support is 17 non-empty it contains more than 1 point where L1 (resp. L2 ) attains its maximum, then we can perform the same reasoning as in case 2a on suppP (x) to obtain a contradiction. If we choose a Q0 with L1 (Q0 ) (resp. L2 (Q0 )) high enough, then L1 (resp. L2 ) will attain its maximum on supp1 (αP,Q0 (x)) only at points of suppP (αP,Q0 (x)). This means that there are at least two points of suppP (αP,Q0 (x)) where L1 (resp. L2 ) attains its maximum. Since suppP (αP,Q0 (x)) = Q0 + suppP (x) the same is true for suppP (x), so we are done. Theorem 20. If S = ∆′ ∩ Zn , T = ∆ ∩ Zn and p = #T − 1 with ∆, ∆′ convex and ∆ a bounded lattice polytope of dimension greater than one, Tpthen the expressions xP1 ,...,Pp with Pi ∈ X := {P |P + T ⊆ S} are a basis of i=1 ker δi and hence the xA for monomials A of degree p with variables in X are a basis of ker δ. Proof. Let H be the set of all bounded convex lattice polytopes in Zn that are either of dimension greater than one or have just two lattice points. By lemma 14 we only have to prove Tpthe first statement. In fact we only have to prove that the xP1 ,...,Pp generate i=1 ker δi by lemma 18. We prove it for all ∆ ∈ H by induction on p = #∆ ∩ Zn − 1. Suppose first p = 1, then T has just two points and we have to show that the kernel of δ1 : S ⊗ T → S + T is generated by expressions of the form (P + Q1 ) ⊗ Q2 − (P + Q2 ) ⊗ Q1 where T = {Q1 , Q2 } and P ∈ X. Consider the map f : S × T → S + T of sets given by addition of lattice points, then every point P ′ of S + T is reached by at most two elements of S × T namely (P + Q1 , Q2 ) and (P + Q2 , Q1 ) with P = P ′ − Q1 − Q2 . We can write S ⊗ T as the direct sum of the linear span of each f −1 (P ) with P ∈ S + T . The kernel of δ1 is the direct sum of the kernels of δ1 restricted to each span of f −1 (P ). The result easily follows. Now for the induction step suppose p ≥ 2. Let QM be any extreme point of ∆ such that conv(∆ ∩ Zn \{QM }) ∈ H. Using some unimodular transformations one can squeeze ∆ into (R≥0 )n in such a way that QM = (xM , 0, . . . , 0) and all other points of ∆ have first coordinate smaller than xM . We can also make sure that the smallest first coordinate in ∆ is zero. (One can do all this as follows: first one chooses a linear form L : Zn → Z that attains its maximum on ∆ only at QM . One can choose L with integer coefficients with no prime factors that they all share. One then chooses ∼ = a unimodular transformation U1 : Zn → Zn whose first component is L. Then U1 (QM ) has its first coordinate greater than that of any other point of U1 (∆). Next one chooses a unimodular transformation U2 of the form (x1 , . . . , xn ) 7→ (x1 , x2 − a2 x1 , . . . , xn − an x1 ) with a2 , . . . , an large enough so that all the other coordinates of U2 (U1 (QM )) are smaller than those of the other points of U2 (U1 (∆)). Finally one uses a translation to map U2 (U1 (QM )) to (xM , 0, . . . , 0) where xM is the greatest first coordinate on U2 (U1 (∆)) minus the smallest.) Claim: It is enough to prove the statement in the case where ∆′ = Rn . Suppose it is true for ∆′ = Rn , we prove it for arbitrary ∆′ . If x ∈ Proof. Tp ker δi then it is a linear combination of some xP1 ,...,Pp . By lemma 18 their i=1 supports are contained in the supports of x, hence in ∆′ . Henceforth we assume ∆′ = Rn . We put the lexicographical ordering on (Z≥0 )n , 18 meaning (x1 , . . . , xn ) < (x′1 , . . . , x′n ) if for the smallest i with xi 6= x′i we have xi < x′i . Tp So suppose there exists an x ∈ i=1 ker δi that is not a linear combination of the xP1 ,...,Pp . We can translate the first factor so that supp1 (x) ⊆ (R≥0 )n . We take x so that the lexicographic maximum of supp1 (x) is minimal. (We can do this because there are no lexicographic infinite descents in (Z≥0 )n .) We will ′ find a contradiction. Let PM be the maximum of supp1 (x) and e its first coorn dinate. Let Qm ∈ ∆ ∩ Z be some point with first coordinate zero. By lemma 19 QM − Qm ∈ ∆ − ∆ ⊆ supp1 (x) − supp1 (x). It follows that e ≥ xM . So ′ PM := PM − QM ∈ (R≥0 )n because its first coordinate e − xM is ≥ 0 and all ′ the other coordinates are equal to those of PM . x2 x2 ′ PM supp1 (x) Qm e ∆ QM xM x1 x1 T n ⊗(p−1) ′ ′ ⊗ We now apply lemma 16 to x to obtain y ∈ p−1 i=1 ker δi where δi : (Z ) ′ n ⊗(p−2) n ′ T → (Z ) ⊗ Z are the usual maps and where T = T \{QM }. This y satisfies ′ ′ x = PM ⊗ y plus terms whose first factor is < PM . By induction y= X λj yP1,j ,...,Pp−1,j , for some Pi,j ∈ Zn . j Using the fact that xPM ,P1,j ,...,Pp−1,j = (PM + QM ) ⊗ yP1,j ,...,Pp−1,j plus terms ′ ′ whose first factor is smaller than PM + QM = PM we see that PM is the ′ maximum of supp1 (x ) where X λj xPM ,P1,j ,...,Pp−1,j . x′ = j ′ In x − x′ the terms with PM cancel so the maximum of supp1 (x − x′ ) is smaller ′ than PM , contradicting the minimal choice of x. (The fact that PM ∈ (R≥0 )n is important because it ensures that supp1 (x − x′ ) ⊆ (R≥0 )n .) The last assertion of the theorem follows from lemma 14. Corollary 21. Let ∆ and ∆′ be convex lattice polytopes with ∆ of dimension greater than 1 and T = ∆ ∩ Zn , S = ∆′ ∩ Zn and p = #T − 1. If δ: p ^ S⊗T → p−1 ^ S ⊗ (S + T ) is the usual map then the dimension of ker δ is S}. p+#X−1 p  where X = {P |P +T ⊆ This follows because the number of degree p monomials with variables in X  is p+#X−1 . We end with the case when ∆ is 1-dimensional. This time the p formula works for all p. 19 Theorem 22. Let ∆ = conv((0, 0, . . . , 0), (d, 0, . . . , 0)) with d ≥ 0 and let ∆′ ⊆ Zn a bounded convex lattice polygon, then for all p ≤ d + 1 the dimension of the kernel of the usual map δ is (d − p + 1) #X where X = p n ′ {P |P + {(0, . . . , 0), (1, 0, . . . , 0)} ⊆ S}, S = ∆ ∩ Z . Proof. Let T = ∆ ∩ Zn . Put a lattice order ≤ on Zn such that (1, 0, . . . , 0) > (0, . . . , 0). Let I = {(0, 0, . . . , 0), (1, 0, . . . , 0)}. For any P1 < . . . < Pp in X and Q ∈ T with first coordinate in {p, . . . , d} we define X (1) (−1)i1 +...+ip (P1 + i1 ) ∧ . . . ∧ (Pp + ip ) ⊗ (Q − i1 − . . . − ip ), i1 ,...,ip ∈I where we abusively write (−1)i1 +...+ip for the power of −1 whose exponent is the first coordinate of i1 + . . . + ip . These expressions are in the kernel of δ. We will prove that they are a basis of the kernel which proves the theorem because there are exactly (d − p + 1) #X of these. We will do so by induction on #S. p The case where p = 0 is easy as the domain and kernel of δ are both just T and have the points in T as a basis. So suppose p ≥ 1 and let x ∈ ker δ, we will show that it is a linear combination of expressions like (1). Let PM be the maximum of S. If PM ∈ / supp(x) we apply the induction hypothesis to S ′ = S\{PM } and we are done. So assume PM ∈ supp(x), then by lemma 8 we can x = PM ∧ y plus terms not containing PM in the ∧ part. Here Vp write S ′ ⊗ T ′ where T ′ = {(0, 0, . . . , 0), . . . , (d − 1, 0, . . . , 0)}. Note also that y∈ PM − (1, 0, . . . , 0) ∈ S as otherwise the terms in δ(x) where PM is removed from the ∧ would have nothing to cancel against. This is because these would be the only terms of δ(x) where the point after the ⊗ agrees with PM in all but the first coordinate. Applying the induction hypothesis to y we get X X λj (−1)i1 +...+ip−1 y= j i1 ,...,ip−1 ∈I (P1,j + i1 ) ∧ . . . ∧ (Pp−1,j + ip−1 ) ⊗ (Qj − i1 − . . . − ip−1 ). Therefore x can be written as (−1)p x′ plus terms not containing PM in the ∧ part where X X λj (−1)i1 +...+ip x′ = j i1 ,...,ip ∈I (P1,j + i1 ) ∧ . . . ∧ (Pp−1,j + ip−1 ) ∧ (PM − (1, 0, . . . , 0) + ip ) ⊗ (Qj + (1, 0, . . . , 0) − i1 − . . . − ip ). So we can apply the induction hypothesis to x − (−1)p x′ to conclude that x is a linear combination of expressions like (1). Finally, we show linear independence of the expressions, P again by induction on #S. the case p = 0 is again trivial, let p ≥ 1. Let i λi xi be a linear combination of our expressions that yields zero. Each xi containing PM in its support can be written as PM ∧yi plus terms not containing PM . Then up to sign yi is an expression like (1) but with p − 1 instead of p and with the set S\{PM } in stead of S. By the induction hypothesis the yi are linearly independent. But then it follows that PM cannot occur at all in the wedge part of any xi , otherwise the linear combination could not yield zero. And then one again applies the induction hypothesis with S\{PM } to obtain a contradiction. 20 References [1] Marian Aprodu and Jan Nagel, Koszul cohomology and algebraic geometry, University Lecture Series 52, American Mathematical Society, 125 pp. (2010) [2] Winfried Bruns, Aldo Conca, Tim Römer, Koszul homology and syzygies of Veronese subalgebras, Mathematische Annalen 351(4), pp. 761-779 (2011) [3] Wouter Castryck, Filip Cools, Jeroen Demeyer, Alexander Lemmens, Computing graded Betti tables of toric surfaces, preprint [4] Wouter Castryck, Filip Cools, Alexander Lemmens, Canonical syzygies of smooth curves in toric surfaces, preprint [5] David Cox, John Little and Hal Schenck, Toric varieties, Graduate Studies in Mathematics 124, American Mathematical Society (2011) [6] Lawrence Ein, Daniel Erman, Robert Lazarsfeld, A quick proof of nonvanishing for asymptotic syzygies, Algebraic Geometry 3(2), pp. 211-222 (2016) [7] Lawrence Ein, Robert Lazarsfeld, Asymptotic Syzygies of Algebraic Varieties, Inventiones Mathematicae 190, pp. 603-646 (2012) [8] David Eisenbud, The geometry of syzygies. A second course in commutative algebra and algebraic geometry, Graduate Texts in Mathematics 229, Springer-Verlag, New York (2005) [9] Francisco J. Gallego and Bangere P. Purnaprajna, Some results on rational surfaces and Fano varieties, Journal für die Reine und Angewandte Mathematik 538, pp. 25-55 (2001) [10] Ornella Greco and Ivan Martino, Syzygies of the Veronese modules, Communications in Algebra 44(9), pp. 3890-3906 [11] Milena Hering, Syzygies of toric varieties, Ph.D. thesis, University of Michigan (2006) [12] Frank Loose, On the graded Betti numbers of plane algebraic curves, Manuscripta Mathematica 64(4), pp. 503-514 (1989) [13] Elena Rubei, A result on resolutions of Veronese embeddings, Annali dell’Università di Ferrara Sezione VII. Scienze Matematiche 50, pp. 151-165 (2004) [14] Giorgio Ottaviani, Raffaela Paoletti, Syzygies of Veronese embeddings, Compositio Mathematica 125(1), pp. 31-37 (2001) [15] Euisung Park, On syzygies of Veronese embedding of arbitrary projective varieties, Journal of Algebra 322(1), pp. 108-121 (2009) [16] Hal Schenck, Lattice polygons and Green’s theorem, Proceedings of the American Mathematical Society 132(12), pp. 3509-3512 (2004) [17] Frank-Olaf Schreyer, Syzygies of canonical curves and special linear series, Mathematische Annalen 275, pp. 105-138 (1986) 21
0math.AC
Acting Thoughts: Towards a Mobile Robotic Service Assistant for Users with Limited Communication Skills arXiv:1707.06633v3 [cs.AI] 30 Nov 2017 F. Burget* L.D.J. Fiederer* D. Kuhner* M. Völker* J. Aldinger* R.T. Schirrmeister J. Boedecker B. Nebel T. Ball W. Burgard Abstract— As autonomous service robots become more affordable and thus available also for the general public, there is a growing need for user friendly interfaces to control the robotic system. Currently available control modalities typically expect users to be able to express their desire through either touch, speech or gesture commands. While this requirement is fulfilled for the majority of users, paralyzed users may not be able to use such systems. In this paper, we present a novel framework, that allows these users to interact with a robotic service assistant in a closed-loop fashion, using only thoughts. The brain-computer interface (BCI) system is composed of several interacting components, i.e., non-invasive neuronal signal recording and decoding, high-level task planning, motion and manipulation planning as well as environment perception. In various experiments, we demonstrate its applicability and robustness in real world scenarios, considering fetch-and-carry tasks and tasks involving human-robot interaction. As our results demonstrate, our system is capable of adapting to frequent changes in the environment and reliably completing given tasks within a reasonable amount of time. Combined with high-level planning and autonomous robotic systems, interesting new perspectives open up for non-invasive BCI-based humanrobot interactions. I. I NTRODUCTION For patients with heavily impaired communication capabilities, such as severly paralyzed patients, their condition forces them to constantly rely on the help of human caretakers. Robotic service assistants can re-establish some autonomy for these patients, if they offer adequate interfaces and possess a sufficient level of intelligence. Generally, an intelligent system requires adaptive task and motion planning modules to determine appropriate task plans and motion trajectories for the robot, that implement a task in the real world. Moreover, it requires a perception component, e.g., to detect objects of interest or to avoid accidental collisions with obstacles. Typically used interfaces, such as haptic (buttons), audio (speech) or visual (gesture) interfaces, to command the robotic system are intuitive and easy options for healthy users, but difficult to impossible to use for paralyzed individuals. In this paper, we present a novel framework, schematically depicted in Fig. 1, that allows closed-loop interaction between users with minimal communication capabilities and C. Do Motion and Manipulation Planning Motion Execution High-Level Planner Knowledge Base EEG-based User Interaction Object Detection Fig. 1. Framework unifying decoding of neuronal signals, high-level task planning, low-level motion and manipulation planning, scene perception with a centralized knowledge base at its core. Intuitive goal selection is provided through an adaptive graphical user interface. a robotic service assistant. To do so, we record neuronal activity elicited in the human brain, the common origin of all types of communication, with an electroencephalography (EEG) system. Furthermore, we adopt a convolutional neural network approach for online decoding of neuronal activity, in order to allow users to navigate through a graphical user interface (GUI) provided by a high-level task planner. The set of feasible actions displayed in the GUI, depends in turn on the current state of the world, which is stored in a central knowledge base and continuously updated with information provided by the robot and a camera perception system. Once a task has been selected, it is decomposed into a sequence of atomic actions by the high-level planner. Subsequently, each action is resolved to a motion for the mobile manipulator using low-level motion and manipulation planning techniques. In the following, the individual components shown in Fig. 1 will be described in detail, before presenting a quantitative evaluation of the overall system regarding its performance. II. R ELATED W ORK * These authors contributed equally to the work. Authors are with the Department of Computer Science and Faculty of Medicine, University of Freiburg, Germany. {burgetf, kuhnerd, do, aldinger, jboedeck, nebel, burgard}@informatik.uni-freiburg.de and {lukas.fiederer, martin.voelker, robin.schirrmeister, tonio.ball}@uniklinik-freiburg.de. This research was supported by the German Research Foundation (DFG, grant number EXC 1086) and grant BMI-Bot by the Baden-Württemberg Stiftung. Multiple previous studies have focused on robotic systems assisting people with disabilities. For example, Park et al. [1] implemented a system for the autonomous feeding of yogurt to a person. Chung et al. [2] focused on autonomous drinking which involved locating the drink, picking it up and bringing it to the person’s mouth. Using a hybrid BCI and head movement control, Achic et al. [3] studied a setup with a moving wheelchair and an attached robotic arm. None of these systems used pure BCI control. In contrast, Wang et al. [4] used a motor imagery BCI with three classes to achieve low-level control of a robotic arm. More relevant, Schröer et al. [5] developed a robotic system which receives a BCI command from a user and autonomously assists the user in drinking from a cup. However, this approach only considers a single object and a fixed-base manipulator. More recently, Muelling et al. [6] presented a shared-control approach to assistive robotics, albeit focused on invasive BCIs. Nonetheless, their approach could be combined with the high-level planning approach presented in our work. In these applications, robust decoding of brain signals is required. Inspired by the successes of deep convolutional neural networks (ConvNets) in computer vision [7], [8] and speech recognition [9], [10], deep ConvNets have recently been applied more frequently to EEG brain-signal decoding. Deep ConvNets were already applied to decoding tasks useful for building brain-computer interfaces. Lawhern et al. [11] used a deep ConvNet to decode P300 oddball signals, feedback error-related negativity and two movement-related tasks. When evaluated cross-subject, i.e., trained on some subjects and evaluated on others, their ConvNet yields competitive accuracies compared with widely-used traditional brain-signal decoding algorithms. Tabar and Halici [12] used a ConvNet combined with a convolutional stacked autoencoder to decode motor imagery within-subject, yielding better accuracies than several non-ConvNet decoding algorithms. Schirrmeister et al. [13] used a shallow and a deep ConvNet to decode both motor imagery and motor execution within-subject, reaching or slightly surpassing the accuracies of the widely used EEG motor-decoding algorithm filter bank common spatial patterns [14]. Bashivan et al. [15] used a ConvNet trained on fourier-transformed inputs to estimate mental workload. In addition to the work on evaluating ConvNet decoding accuracies, ConvNet visualization methods allow us to get a sense of what brain-signal features the network is using [13], [15], [16]. Taken together, these advances make deep ConvNets a viable alternative for brainsignal decoding in brain-computer interfaces. Still, to our knowledge, online control with deep ConvNets has not yet been reported for an EEG-based brain-computer interface. III. O NLINE D ECODING OF N EURONAL S IGNALS The system at hand is developed to control more complex scenarios than the ones considered in previous work. Particularly, we consider scenarios involving manipulation of objects as well as human-robot interaction. Feasible goals are determined by our GUI which is controlled by directional commands. As reliable classification of brain signals into navigation directions cannot yet be achieved directly with non-invasive BCIs, we used a deep ConvNet approach for decoding of multiple mental tasks from EEG (Schirrmeister et al. [13]). This approach introduces a hybrid network, combining a deep ConvNet with a shallower ConvNet ar- chitecture. The deep part consists of 4 convolution-pooling blocks using exponential linear units (ELU) [17] and max pooling, whereas the shallow part uses a single convolutionpooling block with squaring non-linearities and mean pooling. Both parts use a final convolution with ELU to produce output features. These features are then concatenated and fed to a final classification layer. We trained the ConvNet to decode five mental tasks: right hand finger and both feet toe movements, object rotation, word generation and rest. These mental tasks evoke discernible brain patterns and are used as surrogate signals to control the GUI. Offline training was done with a cropped training strategy using shifted time windows within the trials as input data [13]. From our experience it is important to train the BCI decoder and subjects in an environment that is as close as possible to the real application environment to avoid pronounced performance drops. Therefore, we designed a gradual training paradigm within the high-level planner GUI where the displayed environment, timing and actions are identical to those of the real control task. The training paradigm proceeds as follows: We first train each subject offline using simulated feedback. Subjects are aware of not being in control of the GUI. The mental tasks are cued using grayscale images presented for 0.5 s in the center of the display. At all times a fixation circle is displayed at the center of the GUI and the subject is instructed to fixate on it to minimize eye movements. After a random time interval of 1-7 s the fixation circle is switched to a disk for 0.2 s, which indicates the end of the mental task. At the same time the GUI action (go up, go down, select, go back, do nothing) corresponding to the cued mental task is performed to update the GUI. To keep training realistic we include a 20 % error rate, i.e., on average every fifth action is erroneous. We instruct the subjects to count the error occurrences to assert their vigilancy. This offline data is used to train the individual deep ConvNets. Then, the subjects do online training by performing the decoded mental tasks in the GUI. Finally, we stop cueing the mental tasks. To evaluate the performance of the BCI control, we let the subjects create instructed high-level plans in the GUI. These tasks are then executed by a simulated robot or the real mobile manipulator, when available. To provide more control over the mobile manipulator and enhance the feeling of agency, subjects have to confirm the execution of every planned action and can interrupt the chain of actions at any moment during their execution. BCI decoding accuracies for the label-less instructed tasks are assessed by manually rating each decoding based on the instructed task steps. Statistical significance of the decoding accuracies were tested using a conventional permutation test with 100 k random permutations of the labels (i.e., p-value is the fraction of label permutations that would have led to better or equal accuracies than the accuracy for the original labels). IV. H IGH -L EVEL G OAL F ORMULATION P LANNING We use domain independent planning to derive the required steps for reaching a desired high-level goal in a complex task. The user can formulate a high-level goal without knowledge of the internal representation of objects in the planning system and the exact capabilities of the robot. This is achieved by an intuitive graphical user interface, where the object parameters of the goal are specified by incrementally refining the objects by referring to their type, e.g., “cup” or attributes, e.g., “content = apple-juice”. Domain independent planning identifies a sequence of actions that transforms the current world state into a state satisfying a goal condition. A planning task consists of: (i) a planning domain describing static components such as the object type hierarchy and the available actions and (ii) a problem instance describing the objects present in the world and their current state, as well as a goal description. While the current state of the objects can be extracted from the knowledge base, the goal has to be chosen in the GUI. A restricted vocabulary is shared between the user and the planning system. Objects or sets of objects are identified by creating referring expressions to them composed of shared references built on this vocabluary [18]. We briefly describe the relevant aspects of our previous work in this area [19]. In general, a referring expression φ is a logical formula with a single free variable. φ refers to an object o if φ(o) is valid. E.g., the reference φ(x) ≡ cup(x) ∧ contains(x, water) refers to all cups containing water. We restrict ourselves to references that are simple conjunctions of facts, which is not only preferable for computational reasons, but also allows us to incrementally refine references by adding constraints. For example, adding contains(x, water) to cup(x), restricts the set of all cups to the set of cups containing water. We distinguish between three types of fundamental object references: individual references, typename references and relational references. Individual references are identified by name, such as the “omniRob” robot. Typename references can be identified by the name of their type. While we cannot refer to the cups in our scenario directly, we can refer to an unspecific cup. Relational references are encountered when objects can be referred to via predicates in which they occur as an argument. The relations in our scenario are object attributes. For example, the content of the cup is used to clarify which cup is meant. These object references are used to create references to goals. We start defining goals with the action that achieves it as we found that this is most natural to the user, e.g., put(x, y) ∧ cup(x) ∧ shelf (y). After the initial selection of a goal type (e.g., drop) it is necessary to determine the objects for all parameters of the goal predicate or action. These parameters are refined by constraining the previous choice until the argument is either determined uniquely (i.e., it is impossible to constrain the argument further) or the user declares that any remaining option is acceptable. We exclude unreachable goals, but we allow for goals that can only be achieved after a sequence of preceding actions (e.g., drinking water could require to fetch a cup, bring it to the patient, fetch a bottle and pour the water into the cup in order to be executed). The goal that is determined by the selection process of the GUI is then passed to a custom domain independent planner. V. ROBOT M OTION G ENERATION For generating paths for the mobile base, we apply the sampling-based planning framework BI2 RRT* [20]. Given a pair of terminal configurations, it performs a bidirectional search using uniform sampling in the configuration space until an initial sub-optimal solution path is found. This path is subsequently refined for the remaining planning time, adopting an informed sampling strategy, which yields a higher rate of convergence towards the optimal solution. Execution of paths is implemented via a closed-loop joint trajectory tracking algorithm using robot localization feedback. To realize pick, place, pour and drink motions efficiently, we adopt a probabilistic roadmap planner approach [21]. The planner uses a graph of randomly sampled task poses (endeffector poses), which are connected by edges. To find a plan between two poses, the planner connects both poses with the roadmap graph and uses the A* algorithm to find an optimal path between the start and goal pose. The execution of the plan maps the task space velocity commands to joint velocity commands by employing a task space motion controller. We sample random poses around the object to determine grasp motions. For dropping objects we extract horizontal planes from the camera’s point cloud and sample poses above those planes to find a suitable drop location. VI. I MPLEMENTATION D ETAILS Implementation of our framework in the real world requires several components, such as neuronal signal decoding, scene perception, knowledge base operations as well as symbolic and motion planning, to run in parallel. Therefore, we distributed the computation across a network of 7 computers, communicating among each other via ROS. The decoding of neuronal signals has four components. EEG measurements are performed using Waveguard EEG caps with 64 electrodes and a NeurOne amplifier in AC mode. Additionally, vertical and horizontal EOGs, EMGs of the four extremities and ECG’s are recorded. For recording and online-preprocessing, we used BCI2000 and Matlab. We then transferred the data to a GPU server where our deep ConvNet classified the data into 5 classes. The high-level planner GUI consists of a back- and front-end. The backend of the GUI uses the Fast Downward planner [22] to iteratively build goal references and to find symbolic plans for the selected goal. As the planning time is not crucial for the performance of our system, we used Fast Downward with a basic configuration in our experiments. The central knowledge base is implemented as a ROS node, which is able to store objects with arbitrary attribute information. All changes in the knowledge base automatically trigger updates of the front-end, unexpected ones interrupt the current motion trajectory execution. Finally, we used SimTrack [23] for object pose detection and tracking. VII. E XPERIMENTS To evaluate our framework, we consider the environment schematically depicted in Fig. 2, containing two shelves and a table as potential locations for manipulation actions. The TABLE I AGGREGATED MEAN±STD RESULTS FOR 52 BCI CONTROL RUNS (E XP. VII-A), * P - VALUE < 10−6 Runs Accuracy* # [%] Shelf Shelf S1 S2 S3 S4 Robot User GUI Table EEG Camera Object Location Fig. 2. Experimental environment: Two shelves and a table can be considered by the robot for performing manipulation actions. Five RGBD sensors observe the environment. A human operator selects a goal using EEG control and the high-level planner GUI. user sits in a wheelchair in front of a screen, displaying the graphical interface of the high-level planner. The robot used in the experiments is the omniRob omni-directional mobile manipulator platform by KUKA Robotics, which is composed of 10 degrees of freedom (DOF), i.e., 3 DOF for the mobile base and 7 DOF for the manipulator. Additionally, the Dexterous Hand 2.0 by Schunk is attached to the manipulator’s flange and used to perform grasping and manipulation actions. The tasks we considered in our experiments required the robotic system to autonomously perform the following actions: drive from one location to another, pick up an object, drop an object (on a shelf or table), pour liquid from a bottle into a cup, supply a user with a drink. Moreover, we use a perception system composed of five RGBD cameras. Three of them are statically mounted at the shelves and the table, in order to observe the scene and to report captured information to the knowledge base. The other two cameras are carried by the robot on-board. The first one is located at the mobile base and used to perform collision checks in manipulation planning. The second camera is mounted at the robot’s end-effector and used for tasks involving physical human-robot interaction. A demonstration of our framework can be found in the accompanying video: http://www.informatik.uni-freiburg.de/~burgetf/ecmr17/. A. Online Decoding of Neuronal Signals We evaluated the BCI control setup with four healthy subjects (S1-4, all right-handed, three females, aged 26.75±5.9). At the time of writing the validation, S4 was still in progress and no validation with the mobile manipulator was performed. In total, 52 runs have been recorded (20 with the real robot) where the subjects executed various instructed high-level plans. For 32 runs, we used simulated feedback from the GUI in order to generate a significant amount of data for the evaluation. The performance of the BCI decoding during these runs was assessed using video Time [s] Steps # Path Optimality Time/Step [%] [s] 18 14 17 3 84.1±6.1 76.8±14.1 82.0±7.4 63.8±15.6 125±84 150±32 200±159 176±102 13.0±7.8 10.1±2.8 17.6±11.4 26.3±11.2 70.1±22.3 91.3±12.0 65.7±28.9 34.5±1.2 9±2 9±3 11±4 6±2 52 76.7±9.1 148±50 16.7±7.1 65.4±23.4 9±2 recordings of interactions with the GUI. We rated GUI actions as correct if they correspond to the instructed path and incorrect otherwise. Actions which are necessary to remediate a previous error are interpreted as correct if the correction is intentionally clear. Finally, we rated rest actions as correct during the (simulated) robot executions, incorrect if the next robotic action had to be initialized and ignored them during high-level plan creation. For evaluation, five metrics have been extracted from the video recordings: (i) the accuracy of the control, (ii) the time it took the subjects to execute a high-level plan, (iii) the number of steps used to execute a high-level plan, (iv) the path optimality, i.e., the ratio of the steps used to the minimally possible number of steps, and (v) the average time per step. We summarized the results in Table I. In total, a 76.67 % correct BCI control was achieved, which required 9 s per step. Selecting a plan using the GUI took on average 148 s and required the user to perform on average 16.74 steps in the GUI of the highlevel planner. The path formed by these steps is on average 34.6 % away from the optimal path. The decoding accuracy of every subject is significantly above chance (p < 10−6 ). The subject-averaged EEG data used to train the hybrid ConvNets and the decoding results of the train/test transfer are visualized in Fig. 3. In Fig. 3(a) we show the signal-tonoise ratio (SNR) of all 5 classes C of the labeled datasets. We define the SNR for a given frequency f , time t and electrode e as SNRf,t,e = IQR ({median (Mi )}) median ({IQR (Mi )}) i ∈ C, where Mi corresponds to the set of values at position (f, t, e) of the i-th task, with |Mi | being the number of repetitions. median(·) and IQR(·) is the median and interquartile range (IQR), respectively. The upper part describes the variance of the class medians, i.e., a large variance means more distinguishable class clusters and a higher SNR. The denominator describes the variance of values in each class, i.e., a lower variance of values results in a higher SNR. The low SNR in EMG channels shows that the subjects did not move during the tasks. The decoding accuracies achieved on the test data after initial training of the ConvNets are visualized in Fig. 3(b). To further support the neural origin of the BCI control signals, Fig. 3(c) shows physiologically plausible input-perturbation network-prediction correlation results (see [13] for methods). TABLE II AGGREGATED RESULTS FOR 10 RUNS (E XP. VII-B) (a) Actions SNR 0.7 # Executions (# Scheduled) Success Executions [%] Grasp Drop Approach 10 (10) 9 (10) 19 (20) 90.0 89.0 100.00 37.56 34.13 33.05 4.62 5.75 18.48 Total 38 (40) 94.74 34.42 14.02 TABLE III AGGREGATED RESULTS FOR 10 RUNS (E XP. VII-C) 0 Actions (b) Grasp Drop Approach Pour Drink (c) Hand (R) Feet Predictions Runtime [s] Mean Std Hand (R) Rotation Feet Words Rotation Rest Words Sensitivity Targets Rest Correlation x10-2 -0.4 0 0.4 Fig. 3. EEG data and decoding results. (a) SNR of the first 4 s of data used to train the hybrid ConvNet. Highest SNR can be observed in the alpha (7-14 Hz) and lower beta (16-26 Hz) bands. These frequency bands are robust markers of task related mental tasks. Note that the non-EEG channels (top row) were withheld from the ConvNets at any time and are displayed as negative control. Not all channels are displayed because of space constraints. (b) Confusion matrix of decoding accuracies for the train/test transfer. Accuracies are well above the theoretical chance level of 20 %. (c) Topographically plausible input-perturbation network-prediction correlation maps in the alpha (7-13 Hz) frequency band. For details on the visualization technique we refer the reader to [13]. Total # Executions (# Scheduled) 34 30 80 10 13 (30) (30) (80) (10) (10) 167 (160) Success Executions [%] Runtime [s] Mean Std 91.0 97.0 100.0 100.0 77.0 40.42 37.59 20.91 62.90 57.10 10.31 4.83 7.68 7.19 8.20 95.86 32.46 15.51 might differ for two reasons. A number of executed calls, lower than the scheduled ones, indicates that a previous action step has failed to succeed and plan recovery was not possible. On the other hand, a higher number of executed calls indicates that the user was able to achieve plan recovery by commanding a repetition of the failed action. Moreover, we recorded the largest standard deviation for the approach action, which can be attributed to the diverse complexity of the planning problem for the mobile base and the distance to travel between the selected grasp and drop location. In total, our system achieved a success rate of 80% for the entire task. Planning and execution required on average 140.63±36.7 s. Errors were mainly caused by object detection issues, i.e., the system was not able to detect the object or the detection was not precise enough to be able to successfully grasp or drop an object. C. Drinking Task B. Fetch and Carry Task The first experiment, considering the use of the real robot, evaluates the complete system in fetch-and-carry tasks. The goal was to transfer an object from one location to another, e.g., from a shelf to the table, using the robot. To fulfill such tasks the robot typically needs to execute four subtasks: approach object location, grasp object, approach other location, drop object. The user was instructed to select a predefined goal using the EEG-controlled high-level planner. Moreover, we selected a random initial placement for the objects in each run, in order to cover different environment states. The experiment was repeated ten times by the user. Table II shows the averaged results for the experiment. The second column indicates the overall number of desired action calls, as scheduled by the high-level planner, as well as the number of calls actually performed. The third to fifth columns represent the success rate, mean and standard deviation for the runtime of actions, respectively. Note, that the number of scheduled and actually executed actions The last experiment evaluates the direct interaction between user and robot. Therefore, we implemented an autonomous robotic drinking assistant. Our approach enables the robot to fill a cup with a liquid, move the robot to the user and finally provide the drink to the user by execution of the corresponding drinking motion in front of the user’s mouth. In addition to the techniques described above, successful pouring and drinking using a robot requires the detection of the liquid level in the cup and a reliable detection and localization of the user’s mouth. To detect the liquid level while pouring, we follow a vision-based approach introduced by Do et al. [24]. Given the camera’s viewing angle and the liquid’s index of refraction, the liquid height is determined from the depth measurement using a relationship based on Snell’s law (see [25] for more details). Using this knowledge, we first detect the cup, extract the depth values for the liquid and finally estimate the real liquid height. The type of liquid and hence the index of refraction is assumed to be given beforehand. The viewing angle can be determined from the depth data. A Kalman filter is then used to track the liquid level and compensate for noise. Once it is detected that the liquid level has exceeded a user defined value, a stop signal is sent to terminate the pouring motion. For detection and localizing of the user’s mouth, we adopt a two step approach. In the first step, we segment the image based on the output of a face detection algorithm in order to extract the image region containing the user’s mouth and eyes. Afterwards, we detect the position of the mouth of the user, considering only the obtained image patch. Regarding the mouth orientation, we additionally consider the position of the eyes in order to obtain a more robust estimation of the face orientation, hence compensating for slightly changing angles of the head. The face, mouth and eye detectors are implemented in OpenCV by applying an algorithm that uses Haar cascades [26], [27]. Table III shows the averaged results for the experiment. Here, only 3.75% of the 160 scheduled actions had to be repeated in order to complete the task successfully. In one run, plan recovery was not possible leading to abortion of the task. Thus, our system achieved in total a success rate of 90% for the drinking task. Planning and execution required on average 545.56±67.38 s. For the evaluation of the liquid level detection approach, we specified a desired fill level and executed 10 runs of the pour action. The resulting mean error and standard deviation is 6.9±8.9 mm. In some instances the bottle obstructed the camera view, resulting in poor liquid level detection and a higher error. VIII. C ONCLUSIONS In this paper, we presented a thought-controlled mobile robotic service assistant, capable of successfully performing complex tasks, including close range interaction with the user, in a continuously changing environment to increase the independence of severely paralyzed patients. Through the use of a high-level planner as an intermediate layer between user and autonomous mobile robotic service assistant, we overcome the curse of dimensionality typically encountered in non-invasive BCI control schemes, thus opening up new perspectives for human-robot interaction scenarios. R EFERENCES [1] D. Park, Y. K. Kim, Z. M. Erickson, and C. C. Kemp, “Towards assistive feeding with a general-purpose mobile manipulator,” arXiv:1605.07996, 2016. [2] C.-S. Chung, H. Wang, and R. A. Cooper, “Autonomous function of wheelchair-mounted robotic manipulators to perform daily activities,” in Rehabilitation Robotics (ICORR), 2013 IEEE International Conference on. IEEE, 2013, pp. 1–6. [3] F. Achic, J. Montero, C. Penaloza, and F. Cuellar, “Hybrid bci system to operate an electric wheelchair and a robotic arm for navigation and manipulation tasks,” in Advanced Robotics and its Social Impacts (ARSO), 2016 IEEE Workshop on. IEEE, 2016, pp. 249–254. [4] C. Wang, B. Xia, J. Li, W. Yang, D. Xiao, A. C. Velez, and H. Yang, “Motor imagery bci-based robot arm system,” in Natural Computation (ICNC), 2011 Seventh International Conference on, vol. 1. IEEE, 2011, pp. 181–184. [5] S. Schröer, I. Killmann, B. Frank, M. Völker, L. D. J. Fiederer, T. Ball, and W. Burgard, “An autonomous robotic assistant for drinking,” in Robotics and Automation (ICRA), 2015 IEEE International Conference on. IEEE, 2015, pp. 6482–6487. [6] K. Muelling, A. Venkatraman, J.-S. Valois, J. E. Downey, J. Weiss, S. Javdani, M. Hebert, A. B. Schwartz, J. L. Collinger, and J. A. Bagnell, “Autonomy infused teleoperation with application to brain computer interface controlled manipulation,” Autonomous Robots, pp. 1–22, 2017. [7] A. Krizhevsky, I. Sutskever, and G. E. Hinton, “Imagenet classification with deep convolutional neural networks,” in Advances in neural information processing systems, 2012, pp. 1097–1105. [8] K. He, X. Zhang, S. Ren, and J. Sun, “Deep Residual Learning for Image Recognition,” arXiv:1512.03385, 2015. [9] T. N. Sainath, B. Kingsbury, G. Saon, H. Soltau, A.-r. Mohamed, G. Dahl, and B. Ramabhadran, “Deep Convolutional Neural Networks for Large-scale Speech Tasks,” Neural Networks, vol. 64, pp. 39–48, 2015. [10] T. Sercu, C. Puhrsch, B. Kingsbury, and Y. LeCun, “Very deep multilingual convolutional neural networks for LVCSR,” in IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), 2016, pp. 4955–4959. [11] V. J. Lawhern, A. J. Solon, N. R. Waytowich, S. M. Gordon, C. P. Hung, and B. J. Lance, “Eegnet: A compact convolutional network for eeg-based brain-computer interfaces,” CoRR, vol. abs/1611.08024, 2016. [12] Y. R. Tabar and U. Halici, “A novel deep learning approach for classification of EEG motor imagery signals,” Journal of Neural Engineering, vol. 14, no. 1, p. 016003, 2017. [13] R. T. Schirrmeister, J. T. Springenberg, L. D. J. Fiederer, M. Glasstetter, K. Eggensperger, M. Tangermann, F. Hutter, W. Burgard, and T. Ball, “Deep learning with convolutional neural networks for brain mapping and decoding of movement-related information from the human eeg,” arXiv:1703.05051, 2017. [14] K. K. Ang, Z. Y. Chin, H. Zhang, and C. Guan, “Filter Bank Common Spatial Pattern (FBCSP) in Brain-Computer Interface,” in IEEE International Joint Conference on Neural Networks (IJCNN), 2008, pp. 2390–2397. [15] P. Bashivan, I. Rish, M. Yeasin, and N. Codella, “Learning Representations from EEG with Deep Recurrent-Convolutional Neural Networks,” in arXiv: 1511.06448, 2016. [16] S. Stober, “Learning Discriminative Features from Electroencephalography Recordings by Encoding Similarity Constraints,” in Bernstein Conference 2016, 2016. [17] D.-A. Clevert, T. Unterthiner, and S. Hochreiter, “Fast and Accurate Deep Network Learning by Exponential Linear Units (ELUs),” in ArXiv e-prints, vol. 1511, 2016, p. arXiv:1511.07289. [18] R. Dale and E. Reiter, “Computational interpretations of the gricean maxims in the generation of referring expressions,” Cognitive science, vol. 19, no. 2, pp. 233–263, 1995. [19] M. Göbelbecker, “Assisting with Goal Formulation for Domain Independent Planning,” in KI 2015: Advances in Artificial Intelligence. Springer, 2015, pp. 87–99. [20] F. Burget, M. Bennewitz, and W. Burgard, “BI2 RRT*: An efficient sampling-based path planning framework for task-constrained mobile manipulation,” in IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), Daejeon, Korea, 2016. [21] L. E. Kavraki and J.-C. Latombe, Probabilistic Roadmaps for Robot Path Planning. John Wiley, 1998, pp. 33–53. [22] M. Helmert, “The Fast Downward Planning System,” Journal of Artificial Intelligence Research 26 (JAIR 2006), pp. 191–246, 2006. [23] K. Pauwels and D. Kragic, “Simtrack: A simulation-based framework for scalable real-time object pose detection and tracking,” in IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS). IEEE, 2015, pp. 1300–1307. [24] C. Do, T. Schubert, and W. Burgard, “A probabilistic approach to liquid level detection in cups using an RGB-D camera,” in IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), Daejeon, Korea, 2016. [25] Y. Hara, F. Honda, T. Tsubouchi, and A. Ohya, “Detection of Liquids in Cups Based on the Refraction of Light with a Depth Camera Using Triangulation,” in IROS, 2014. [26] P. Viola and M. Jones, “Rapid object detection using a boosted cascade of simple features,” in Computer Vision and Pattern Recognition, 2001. CVPR 2001. Proceedings of the 2001 IEEE Computer Society Conference on, vol. 1. IEEE, 2001, pp. I–I. [27] R. Lienhart and J. Maydt, “An extended set of haar-like features for rapid object detection,” in Image Processing. 2002. Proceedings. 2002 International Conference on, vol. 1. IEEE, 2002, pp. I–I.
2cs.AI
arXiv:1707.01415v1 [cs.AI] 5 Jul 2017 Machine Learning, Deepest Learning: Statistical Data Assimilation Problems Henry Abarbanel, Department of Physics and Marine Physical Laboratory (Scripps Institution of Oceanography) Center for Engineered Natural Intelligence [email protected] Paul Rozdeba and Sasha Shirman Department of Physics University of California, San Diego 9500 Gilman Drive, Mail Code 0374 La Jolla, CA 92093-0374, USA Draft of July 6, 2017 1 1 Abstract We formulate a strong equivalence between machine learning, artificial intelligence methods and the formulation of statistical data assimilation as used widely in physical and biological sciences. The correspondence is that layer number in the artificial network setting is the analog of time in the data assimilation setting. Within the discussion of this equivalence we show that adding more layers (making the network deeper) is analogous to adding temporal resolution in a data assimilation framework. How one can find a candidate for the global minimum of the cost functions in the machine learning context using a method from data assimilation is discussed. Calculations on simple models from each side of the equivalence are reported. Also discussed is a framework in which the time or layer label is taken to be continuous, providing a differential equation, the Euler-Lagrange equation, which shows that the problem being solved is a two point boundary value problem familiar in the discussion of variational methods. The use of continuous layers is denoted “deepest learning”. These problems respect a symplectic symmetry in continuous time/layer phase space. Both Lagrangian versions and Hamiltonian versions of these problems are presented. Their well-studied implementation in a discrete time/layer, while respected the symplectic structure, is addressed. The Hamiltonian version provides a direct rationale for back propagation as a solution method for the canonical momentum. 2 Introduction Through the use of enhanced computational capability two, seemingly unrelated, ‘inverse’ problems have flourished over the past decade. One is machine learning in the realm of artificial intelligence [1, 12, 21] with developments that often go under the name “deep learning”. The other is data assimilation in the physical and life sciences. This describes the transfer of information from observations to models of the processes producing those observations [4, 9, 2]. This paper is directed towards demonstrating that these two areas of investigation are the same at a fundamental level. Each is a statistical physics problem where methods utilized in one may prove valuable for the other. 2 The main goal of the paper is to point out that many developments in data assimilation can be utilized in the arena of machine learning. We also suggest that innovative methods from machine learning may be valuable in data assimilation. Two areas of focus are attended to here: (1) a variational annealing (VA) method for the action (cost function) for machine learning or statistical data assimilation that permits the location of the apparent global minimum of that cost function. (2) The notion of analyzing each problem in continuous time or layer, which we call deepest learning, wherein it is clear that one is addressing a two point boundary value problem [33, 11] with an underlying symplectic structure. Methods abound for solving such two point boundary value problems [27] and for assuring that symplectic structures are respected when time (or layer) is discretized. These may be quite fruitful in machine learning. This paper primarily discusses multilayer perceptrons or feedforward networks [12] though it also makes it is clear that the discussion carries over to recurrent networks as well [14, 8, 26]. 3 3.1 Background Machine Learning; Standard Feedforward Neural Nets We begin with a brief characterization of simple architectures in feedforward neural networks [1, 12, 21]. The network we describe is composed of an input layer l0 and output layer lF and hidden layers l1 , l2 , ..., lF − 1. Within each layer we have N active units, called ‘neurons’, each of which has d degreesof-freedom. (Usually d is chosen to be 1.) Each layer has N neurons with d degrees of freedom, so each layer has D = N d degrees-of-freedom. For our purposes the ‘neurons’ in each layer are the same structure. This can be generalized to different numbers and different types of neurons in each layer at the cost of a notation explosion. Data is available to layer l0 and layer lF in M pairs of L-dimensional input, at l0 , and output, at lF . These are sets of vectors: {yr(k) (l0 ), yr(k) (lF )} where k = 1, 2, ..., M labels the pairs, r is an index on the L-dimensional data r = 1, 2, 3, ..., L ≤ D. The activity of the units in each hidden layer l, x(k) α (l); l0 < l < lF , is 3 determined by the activity in the previous layer. The index α combines the neuron number j and the neuron degrees-of-freedom a into one label: α = 1, 2, ..., N d = D; j = 1, 2, ...N ; a = 1, 2, ...d. This connection is described by the nonlinear function fα (•) via x(k) α (l) = fα (x(l − 1), l) = fα NX d=D (k)  Wα β (l)xβ (l − 1) , (1) β=1 (k) (k) (k) where x(k) (l) = {x(k) α (l)} = {x1 (l), x2 (l), ..., xN d (l)}. The summation over weights Wα β (l) determines how the activities in layer l − 1 are combined before allowing fα (•) to act, yielding the activities at layer l. There are numerous choices for the manner in which the weight functions act as well as numerous choices for the nonlinear functions, and we direct the reader to the references for the discussion of the virtues of those choices [1, 12, 21]. At the input and the output layers l0 , lF the network activities are compared to the observations, and the network performance is assessed using an error metric, often a least squares criterion, or cost function CM   M  L 1 X 1 X (k) (k) 2 (k) (k) 2 = Rm (r) [xr (l0 ) − yr (l0 )] + [xr (lF ) − yr (lF )] , (2) M k=1 2 L r=1 where Rm (r) permits an inhomogeneous weighting in the comparison of the network activities and the data. Minimization of this cost function over all xα(k) (l) and weights Wα β (l), subject to the network model Eq. (1), is used to determine the weights, the variables x(k) α (l)in all layers, and any other parameters appearing in the architecture of the network. Before moving along to data assimilation, we note that one wishes to find the global minimum of the cost function Eq. (2), which is a nonlinear function of the neuron activities, the weights and any other parameters in the functions at each layer. This is an NP-complete problem [25] and as such suggests one cannot find a global minimum of the machine learning problem, as set, unless there is a special circumstance. We will see just such a circumstance in a data assimilation problem equivalent to machine learning tasks. The machine learning problem as described here assumes there is no error in the model itself, so that the minimization of the cost function Eq. (2) is subject to strong equality constraints through the model. This results in the output at layer lF x(k) (lF ) being a very complicated function of the parameters in the model and the activities at layers x(k) (l ≤ lF ). This is likely 4 connected with the many local minima associated with the NP-complete nature of the search problem. We introduce a variational annealing (VA) method in the next section which regularizes this by moving the equality constraint into the cost function via a penalty function. This introduces a hyperparameter allowing us to systematically vary the complexity of the search process. 3.2 Standard Statistical Data Assimilation Now we describe the formulation of a statistical data assimilation problem. In data assimilation observations are made of a sparse set of dynamical variables, associated with a model of the processes producing the observations. This will allow the estimation of parameters in the model and of the unobserved state variables of the model. The goal is to estimate any unknown parameters in the model, and because not all of the dynamical state variables in the model may be observed, to estimate those unmeasured state variables as well. After a certain time window in which information is transferred to the model, we have an estimate of the full model including an initial condition for all state variables, and predictions are made with the completed model and compared to new observations. This validation by prediction is essentially the same as the question of generalization as addressed in machine learning [12]. In data assimilation, one has a window in time [t0 , tF ] during which observations are made at times t = {τ1 , τ2 , ..., τF } which lie in [t0 ≤ τs ≤ tF ]; s = 1, 2, ..., F . At each observation time L measurements yl (τs ); l = 1, 2, ..., L are made, L ≤ D. Through knowledge of the measurement instruments the observations are related to the state variables of the model via ‘measurement functions’ hl (x) : yl (τk ) = hl (x(τk )); l = 1, 2, ..., L. Using what knowledge we have of the processes producing the observations, we develop a dynamical model for the state variables. These satisfy a set of D dynamical differential equations dxa (t) = Fa (x(t), t); a = 1, 2, ..., D. dt (3) The time dependence of the vector field F(x, t) may come from external forcing functions driving the dynamics. This set of differential equations will necessarily be represented in discrete time when solving them numerically, resulting in a map xa (tk ) → xa (tk+1 ) = 5 fa (x(tk ), tk ) in which the discrete time vector field fa (•) is related to Fa (x, t) via the integration procedure one chooses for Eq. (3). Starting from an initial condition at t0 , xa (t0 ) we use the discrete time model xa (tk+1 ) = fa (x(tk ), tk ) (4) to move forward to the first observation time τ1 , then to τ2 , ... eventually reaching the end of the observation window at tF . Altogether by making N model integration steps in each of the intervals [τn , τn+1 ] we make (F + 1)N time steps.: t0 → τ1 → τ2 ... → τF → tF . The measurements are noisy, and the models have errors; so this is a statistical problem. Our goal is to construct the conditional probability distribution, P (X|Y), of the model states X(tF ) = {x(t0 ), x(t1 ), ..., x(tN ), ..., x(tF )}, conditioned on the LF measurements Y(τF ) = {y(τ1 ), y(τ2 ), ..., y(τk ), ..., y(τF )}. Assuming the transition to the model state at time tk+1 depends only on the model state at time tk (that is, the dynamics in Eq. (4) is Markov) and using identities on conditional probabilities [2], one may write the action A(X) = − log[P (X|Y)] (suppressing the dependence on the observations Y in A(X)) as A(X) = − F X CM I[X(τn ), y(τn )|Y(τn−1 )] n=1 N (F +1)−1 − X log[P (x(tn+1 )|x(tn ))] − log[P (x(t0 ))], (5) n=0 where the conditional mutual information is given as [10] CM I(a, b|c) =   log P (a,b|c) P (a|c) P (b|c) . If the model is error free, P (x(tn+1 )|x(tn )) is a delta function: P (x(tn+1 )|x(tn )) = δ D (x(tn+1 ) − f (x(tn ), tn )). With a representation of P (X|Y) we may evaluate conditional expected values of functions G(X) on the path X(N F ) of the model through the observation window [t0 , tF ] as R E[G(X)|Y] = hG(X)i = dX G(X) exp[−A(X)] R , dX exp[−A(X)] in which A(X) = − F X log[P (y(τn )|X(τn ), Y(τn−1 )] n=1 6 (6) N (F +1)−1 X − log P [(x(tn+1 )|x(tn ))] − log[P (x(t0 ))], (7) n=0 and terms depending only on the observations were canceled between numerator and denominator in the expected value. If the observations at the times τk are independent, and if the measurement function is the identity yr (τk ) = hr (x(τk )) = xr (τk ), and if the noise in the measurements is Gaussian, with a diagonal inverse covariance matrix Rm (r, τk ), the first term in the action A(X), the measurement error term, takes the form  2 F X L X Rm (r, τn ) (8) xr (τn ) − yr (τn ) . 2 n=1 r=1 If no measurement is made at τk , Rm (r, τk ) = 0. If the error in the model Eq. (4) is taken as additive and Gaussian with diagonal inverse covariance matrix Rf (a) the second term in A(X), the model error term, becomes N (F +1)−1 D X X n=0 2 Rf (a) xa (tn+1 ) − fa (x(tn ), tn ) 2 a=1  . (9) In each term constants having to do with normalizations of the Gaussians cancel in the expected value. If we keep these constants and take the limit Rf (a) → ∞, we would restore the delta function in the dynamics. Finally, if one accepts ignorance of the distribution of initial conditions P (x(t0 )) and selects it as uniform over the dynamical range of the model variables, hG(X)i is evaluated with A0 (X) =  L F X X Rm (r, τn ) 2 n=1 r=1 N (F +1)−1 D + X X Rf (a)  n=0 a=1 2 R hG(X)i = 2 xr (τn ) − yr (τn ) xa (tn+1 ) − fa (x(tn ), tn ) dX G(X) exp[−A0 (X)] R , dX exp[−A0 (X)] 2 . (10) (11) This is the desired connection between the machine learning formulation (with model error) and the statistical data assimilation formulation: identify layer labels as time l ⇔ t. 7 This alone could be of passing interest. However, there is much in the connection that may be of some utility. We will discuss these items in the data assimilation language, but the translation should be easy at this point. For statistical data assimilation we call this A0 (X) the standard model. The critical suggestion here relative to standard practice in machine learning [1, 12, 21], is that by allowing Rf to be finite from the outset–so acknowledging model error–we may add an additional tool for exploration in machine learning environments where typically no account for model error is introduced. Further, the hyper-parameter Rf serves as a regulating device for the complexity of the surface in path space in which the estimation of states and parameters occurs. 4 4.1 Data Assimilation Developments of Use in Machine Learning Finding the Global Minimum The key to establishing estimates for unobserved state variables (L < D) and for unknown parameters in the model is to perform, approximately of course, the integral Eq. (11). One can do this using Monte Carlo methods [18] or by the method of Laplace [19, 20]. In the Laplace method one seeks minima of the action A0 (X), Eq. (10). The integral is not Gaussian. If it were, we would just do it. As the functions fa (•) are nonlinear, we must perform a numerical evaluation of Eq. (6). The Laplace method approximates the integral with contributions from the lowest minima of the action, if one can find them. Minima associated with paths X having larger action give exponentially smaller contributions to expected values, Eq. (11), than paths with smaller action. This allows one to circumvent a search for the global minimum if the parameters, hyperparameters [12], and other aspects of the model and data yield a set of action levels connected with minima of the action such that one path yields an action level much smaller than any other path. For numerical accuracy one may use that smallest minimum path (comprised of parameters and ‘hidden’ (unobserved) state variables) neglecting larger minima of the action. We have developed a variational annealing (VA) approach [32, 33], to finding the path with the smallest value of the action. While we have no proof that the global minimum is found, our numerical results indicate this 8 may be the case. The VA method produces a set of minima of the action giving a numerical clue as to the roughness of the surface in path X space. In data assimilation the surface depends, among other items, on the number of measurements L at each observation time τk , on the hyper-parameter Rf , and on the number of model time steps between measurement times τn . This translates directly to the analogous machine learning problem with time → layer. As the number of model time steps between measurement times increases, the number of hidden layers increases and the model architecture deepens. VA proceeds by a kind of numerical continuation [3] in Rf of the requirement that varying over all X and all parameters in A0 (X) minimizes A0 (X). The procedure begins by taking Rf → 0, namely the complete opposite of the value found in usual machine learning where Rf → ∞ (deterministic, error free layer to layer maps) from the outset. In the Rf = 0 limit, the action is just a quadratic function of the model variables x(τk ) at the times measurements are made, and the minimization is simple: xr (τk ) = yr (τk ) for the r = 1, 2, ..., L ≤ D data presented at the input and output layers. The minimum can be degenerate as we know only L ≤ D values for the state variables. At the first step of VA we choose as a solution to the optimization problem xr (τk ) = yr (τk ) and select the other D−L states as drawn from a uniform distribution with ranges known from the dynamical range of the state variables. One can learn that well enough by solving the underlying model forward for various initial conditions. We make this draw K times, and now have K paths X0 as candidates for the VA procedure. Now we select a small value for Rf , call it Rf 0 . With the previous K paths X0 as K initial choices in our minimization algorithm, we find K paths X1 for the minimization problem with Rf = Rf 0 . This gives us K values of the action A0 (X1 ) associated with the new paths X1 . Next we increase the value of Rf to Rf = Rf 0 α where α > 1. (We have found values of α in the range 1.1 to 2 to be good choices). For this new value of Rf , we perform the minimization of the action starting with the K initial paths X1 from the previous step to arrive at K new paths X2 . Evaluating the action on these paths A0 (X2 ) now gives us an ordered set of actions that are no longer as degenerate. Many of the paths X2 may give the same numerical value of the action, however, typically the ‘degeneracy’ lies within the noise √ level of the data ≈ (1/ Rm ). This procedure is continued until Rf is ‘large enough’ which is indicated 9 by at least one of the action levels becoming substantially independent of Rf . As a check on the calculation, we observe that if the action A0 (X) is independent of Rf , its expected value is that of the measurement error term. As the measurement errors were taken to be Gaussian, this term in the action is distributed as χ2 , and its expected value is readily evaluated. If the action levels are at this expected value of χ2 for large Rf , the procedure is consistent and no further increases in Rf are required. Effectively VA starts with a problem (Rf = 0) where the global minimum is apparent and systematically tracks it and many other paths through increases in Rf . In doing the ‘tracking’ of the global minimum, one must check that the selected value of α is not too large lest one leave the global minimum and land in another minimum. Checking the result using smaller α is worthwhile. It is important to note that simply starting with a large value of Rf places one in the undesirable situation of the action A0 (X) having multiple local minima into which any optimization procedure is quite likely to fall. In the dynamical problems we have examined, one typically finds that as the number of measurements L at each τk is increased, fewer and fewer minima of the action remain and when L is large enough there is one minimum. This we attribute to the additional information from the augmented set of measurements, and this will be manifest in the discussion below where the additional information effectively controls unstable directions in the phase space. 4.2 Smallest Minimum; Not Necessarily a Convex Action As our goal is to provide accurate estimations of the conditional expected value of functions G(X) where X, a path in model space, is distributed as exp[−A(X)], we actually do not require convexity of A(X) as a function in path space. From the point of view of accurately estimating expected values, it is sufficient that the lowest action level be much smaller than the second lowest action level. If the action value at the lowest level A(Xlowest ) is much smaller than the action value at the next minimum A(Xsecond lowest ), then by a factor exp[−{A(Xlowest ) − A(Xsecond lowest )}], the lowest path Xlowest dominates the integral to be done and provides a sensible choice for the path at which to evaluate the integral. 10 5 Examples from Feedforward Neural Networks and from Data Assimilation In this section we examine one example from multi-layer perceptrons and one example from statistical data assimilation. The latter utilizes a differential equation model introduced by Lorenz in 1996 [23] which permits one to easily increase the number of dimensions of the phase space, to easily select the number of observations within a designated measurement window, and to easily choose the number of model evaluations between measurement times. The latter is analogous to increasing the number of layers in a multi-layer perceptron. In each case we perform a ‘twin experiment’. We use a model to generate solutions from some initial conditions. These solutions, when Gaussian noise is added to them, become our noisy data. Using the noisy data we use VA to estimate the unobserved state variables (hidden layer variables) and parameters/weights. 5.1 Data Assimilation for Lorenz96 Model We begin by examining the dynamical equations introduced by [23]: dxa (t) = xa−1 (t)(xa+1 (t) − xa−2 (t)) − xa (t) + ν dt (12) and a = 1, 2, ..., D; x−1 (t) = xD−1 (t); x0 (t) = xD (t); xD+1 (t) = x1 (t). ν is a fixed parameter which we take to be 10.0 where the solutions to the dynamical equations are chaotic [16]. The equations for the states xa (t); a = 1, 2, ..., D are meant to describe ‘weather stations’ on a periodic spatial lattice. This model is widely used in atmospheric science as a testbed for the exploration of innovative data assimilation ideas. Our example selects D = 11, and displays the action level plot for L = 2, 4, 5, and 6 observations at each measurement time within the window [t0 , tF ]. We perform a ‘twin experiment’ wherein we generate D time series {xa (t); a = 1, 2, ..., D} for Eq. (12) using a standard adaptive fourth order Runge-Kutta algorithm with a time step ∆t = 0.025 and an initial condition x(t0 ) drawn from a uniform distribution over the range of the variables x(t), namely [-10, +10]. To these solutions of Eq. (12) we add Gaussian noise with mean zero and variance σ 2 = 0.2 to each time series xa (t). These noisy 11 versions of our model time series constitute our ‘data’ {ya (t)}. L of these D time series are presented to the model at times τn ; t0 ≤ τn ≤ tF . The measurement window is from t0 = 0 to tF = 4.125. L = 2, 4, 5, 6 ‘measurements’ are made at each time step; these are the y(τn ). The measurement error matrix Rm is taken to have diagonal elements at each measurement time τn and is zero at other times. Its magnitude is taken as Rm = 1/σ 2 = 5. The model error matrix Rf (a) is also taken as diagonal, with elements along the diagonal Rf = Rf 0 2β , in performing the VA procedure, and we take β = 0, 1, 2, . . . . Rf 0 was chosen 0.01. The minimizations of nonlinear objective functions in the example using the Lorenz96 model was performed using the public domain software IPOPT [30] with a front end script written in Python. In Fig. (1) we display action level plots for L = 2, 3, 4, and 6 observations at each measurement time. As we can see in the TopLeftPanel, where L = 2, there are numerous local minima in the action A0 (X) for all values of Rf ≥ Rf 0 , and these remain to large Rf . None of these minima is very far separated from the paths with the smallest minimum, so that the evaluation of the expected value integrals Eq. (11) would require contributions from many maxima of the conditional probability distribution. When L = 4, TopRightPanel we begin to see an isolated action level whose contribution to the expected value integral is overwhelmingly larger than the contribution from path giving rise to the next largest action level. The value L = 4 is consistent with the observation in [16] that around 0.4D the instabilities in the Lorenz96 state space appear to be controlled by the data assimilation process. At L = 5 or 6, BottomPanels, we see that the dominance of the lowest action level is even clearer. The horizontal olive colored line is the expected value of the measurement error term in the action. This is a sign of the consistency of the data assimilation calculations. In Fig. (2) we explore another aspect of the action level plots. We still use D = 11, and we hold L = 6 fixed. The number of observations within the window [t0 , tF ] has been reduced from 165 to 28 and we move the model forward between observations 0, 2, 5 or 11 times. This is to provide an analogy to how many layers are present in an equivalent machine learning example. Our example here differs by having many entry points in the measurement window while the machine learning example has only one. We display in the LeftPanel the action level plots for the selected number 12 of model evaluation steps. As one can see for 0 and 2 intermediate steps we have many persisting minima of the action. At 5 and 11 intermediate steps, there is only a single minimum that is found, and for large Rf it comes to the same action level as with 2 intermediate steps. All are consistent with the expected value of the measurement error term. This calculation, performed in a machine learning context provides information on how many hidden layers are required to achieve a desired accuracy. In the RightPanel we display the accuracy of the estimation of the single parameter in the Lorenz96 model. It has been set at ν = 10.0 in producing the data, and that value is clearly selected for 5 or 11 intermediate model evaluations, while it is not so clearly selected for 2 intermediate steps and with zero intermediate steps there is a consistent few percent error. We see, in this collection of calculations, as noted earlier [32, 33], the ability to identify the dominant minimum of the action depends on the number of measurements presented during the statistical data assimilation procedure embodying transfer of information from the data to the model. In data assimilation this is associated with the number of positive conditional Lyapunov exponents [16] of the model. In the machine learning instantiation it may play the same role when the number of data presented at the output layer is not sufficient to determine the parameters and hidden states in each layer. We also see the analogue of deepening the network produces higher accuracy estimates of conditional expected values. 5.2 A Multi-Layer Perceptron; Feedforward Network We constructed a feedforward network with lF layers: One input layer at l0 and one output layer at lF . This network has lF − 2 hidden layers. We analyzed lF = 20, 30, 50 and 100. There are N = 10 ‘neurons’ in each layer. The activity in neuron j in layer l xj (l) is related to xj (l − 1) in the previous layer as z (13) xj (l) = g(W (l)x(l − 1)); g(z) = 0.5[1 + tanh( )]. 2 We also investigated the “ReLU”-like function g(z) = log[1 + ez ], but we do not report on those results. The activations at the input layer are drawn from a Gaussian N (0, 1). The weights are selected from a uniform distribution U [−0.1, 0.1]. Gaussian measurement noise was added to the ‘data’ generated by the model; this has zero mean and variance 0.0025. 13 Figure 1: Action level plots for the Lorenz96 model Eq. (12) with D = 11 and ν = 10.0. The variational annealing procedure is performed with 100 different initial conditions for the minimization of the action at each value of Rf = Rf 0 αβ ; β = 0, 1, ...; α = 2. Top Left Panel: L = 2 measurements at each measurement time. At L = 2, there are many minima, but none so much smaller than the others that it dominates the expected value integral Eq. (11). Top Right Panel: L = 4 measurements at each measurement time. At L = 4, the action in path space X has numerous local minima. The lowest minimum has an action value much smaller than the action values from the other minima, and this dominates the expected value integral Eq. (11). Bottom Left Panel: L = 5 measurements at each measurement time. At L = 5, the number of minima found is only two, and again the lowest minimum dominates the expected value integral. Bottom Right Panel L = 6 measurements at each measurement time. At L = 6, there is only one minimum of the action. The solid green line is the expected value of the measurement error term. This is distributed as χ2 . As the action becomes independent of Rf , its expected value should equal this value. 14 Figure 2: Parameter estimation and action level results for the Lorenz96 model, D = 11, L = 6. The parameter value ν = 10.0 was used in the twin experiments on the model. Observations were made every ∆tobs = 0.15, and L = 6 measurements were made at each observation time. Left Panel: Action Level Estimates These are the action levels when L = 6 observations are made at each measurement time and with the choice of 0, 2, 5, and 11 model evaluation steps between measurement times. The horizontal olive green line indicates the expected action level for large Rf . Right Panel Parameter estimates Between the observations the model was evaluated 0, 2, 5 and 11 times leading to ∆tmodel = 1.0, 0.33, 0.16, and 0.08 ∗∆tobs . The parameter estimates are quite accurate for 5 and for 11 model time steps between observations. They are more distributed for 0 or 2 model step between observations. One can associate the idea of increasing the number of model steps between observations as equivalent to ‘deepening’ the hidden (unobserved) layers. The horizontal olive green line indicates the parameter value, 10.0, used in generating the data. 15 Our data are for the twin experiment, where we know all weights, all inputs and generate all values of x(l) in each layer [l0 , lF ]. These are recorded, and Gaussian noise with mean zero and variance 0.0025 is added to the data at layers l0 = 1 and lF starting from known values x(l0 ). These data are yi (1) for the input layer and yi (20) for the output layer. M input/output pairs are presented to the model with L = 1, 5, and 10 (k) (k) inputs yi (l0 ) at layer l0 and L = 1, 5, 10 data outputs yi (lF ) at layer lF . k = 1,2,...,M, and we investigated M = 1, 10, 100. We minimize the action over all the weights and the states x(k) a (l) at all layers of the model:  M  L  Rm X 1 X (k) (k) (k) (k) 2 2 (xr (l0 ) − yr (l0 )) + (xi (lF ) − yi (lF )) AM (X) = M k=1 2L r=1 lF −1 X N X Rf x(k) (l + 1) − g(W (l)x(k) (l)) N (lF − 1) l=1 a=1 a 2   + , (14) where we have N = 10 neurons in each layer and L ≤ N data at the input l0 and at the output layers lF . We use the variational annealing procedure described above to identify the action levels for various paths through the network. The initial value of Rf 0 /Rm is taken to be 10−8 and this is incremented via Rf /Rm = Rf 0 αβ with α = 1.1 and β = 0, 1, ...,. In the numerical optimizations for the machine learning example we used L-BFGS-B [5, 34]. There are at least two ways to present more information to the model in this setting: • increase the number of training pairs available to the network at l0 and lF ; this is our number M . M can be chosen as large as the user wishes. • increase the number of components of the input/output pair vectors; this is our number L. L ≤ N , the number of neurons in l0 or lF . The resolution of the model in its ability to capture variations in activity from layer to layer is improved by increasing the number of layers lF . In Fig. (3) we explore the action levels as a function of Rf /Rm as we increase the number of layers lF in the model: lF = 20, 30, 50, 100. We hold fixed the number of neurons N = 10, the number of training pairs M = 100 and the number of inputs and outputs L = 10 at l0 and lF . 16 In each case there are many local minima, but only when lf = 50 does the lowest action minimum significantly split from the other action minima and qualify to dominate the expected value integral Eq. (11). When lF is increased from 50 to 100, the lowest action minimum comes closer to the second lowest minimum. This is seen as a result of the much larger number of weights to be estimated at the latter value of lF while we are holding fixed through the values of L and M the information available to make those estimations. In Fig. (4) we hold M fixed at 100, and lF fixed at 50 while we look at L = 1, 5, 10 values of the dimension of input/output pairs. In Fig. (5) we hold fixed the number of layers lF , the number of neurons in each layer N = 10 and the dimension of the input/output vectors yr(k) (l0 ) and yr(k) (lF ); r = 1, 2, ..L = 10. We show the effect of increasing the number of input/output pairs from M = 1 to M = 10 to M = 100. The emergence of a lowest action minimum as M increases is displayed. This can serve as a candidate for approximating Eq. (11). In Fig. (6) we display the error in prediction after the mode, with lF = 50 layers, has been set by the estimation of the weights. This error is constructed by selecting MP new input output pairs. Using each of the input elements for L ≤ N components, we use the model with our estimated weights to (k) evaluate x(k) r (lF ) and compare that with yr (lF ) from each of the MP pairs. The square error averaged over L presented components and over MP pairs MP X L 1 X (xr(k) (lF ) − yr(k) (lF ))2 LMP k=1 r=1 (15) is displayed. We see that increasing the information presented via increasing L or M leads to decreased average prediction errors when choosing the path corresponding to the lowest action level, Top Layers, or choosing the path associated with the second lowest action level Bottom Panel. The differences in quality of prediction (or generalization) in these examples among the cases analyzed is not large, and this has been noted [12]. 5.3 Recurrent Networks In this network architecture one allows both interactions among neurons from one layer to another layer as well as interactions among neurons within 17 Figure 3: Holding the number of neurons in each layer fixed at 10, the number of input/output pairs fixed at M = 100, and the number of inputs and outputs at l0 and lF fixed at L = 10, we vary the number of layers (the deepening of the network) and examine the action level plots arising from the variational annealing procedure. Upper Left Panel lF = 20 Top Right Panel lF = 30 Bottom Left Panel lF = 50 and Bottom Right Panel lF = 100. 18 Figure 4: Holding the number of neurons fixed N = 10, the number of layers fixed lF = 50, and the number of input/output training pairs fixed M = 100, we display the action levels as we vary the number of inputs at l0 and the number of outputs at lF . Top Left Panel L = 1. Top Right Panel L = 5. Bottom Panel L = 10. 19 Figure 5: Holding the number of neurons fixed N = 10, the number of layers fixed lF = 50, and the number of inputs L = 10 at l0 and the number of outputs at lF , we display the action levels as we vary the number of training pairs M . Top Left Panel M = 1. Top Right Panel M = 10. Bottom Panel M = 100. 20 Figure 6: Prediction Errors for the AI/Machine Learning Network (k) (k) 2 r=1 (xr (lF ) − yr (lF )) averaged over MP new input/output k=1 pairs. A noisy input yr(k) (l0 ) produces the output x(k) r (lF ) using the model estimated using the M training sets. This is compared with the output yr(k) (lF ) produced with the original model used to produce the ‘data’ for the twin experiment. In each case the number of neurons is N = 10 and lF = 50. Top Left Panel Using the model associated with lowest Action Level: L = 10 and M = 1 and M = 10. Top Right Panel Using the model associated with lowest Action Level: L = 5 and L = 10; M = 100. Bottom Panel Using the model associated with the second lowest Action Level: L = 5 and 10; M = 100. 1 LMP PMP PL 21 a single layer [14, 8]. The activity xj (l) of neuron j, j = 1,2,...,N in layer l P {l0 , l1 , ..., lF } is given by xj (l) = f [ i wji (l)xi (l − 1)] in a feedforward, layer goes to the next layer, network. We can add interactions with a layer in the same fashion, and to give some ‘dynamics’ to this within-layer activity we introduce a sequential label σ to the activity of neuron j in layer l: xj (l, σ). The mapping from layer to layer and within a layer can be summarized by xj (l, σ) = f [ X wji (l)xi (l − 1, σ) + i X Wji (l)xj (l, σ − 1)], (16) i Another version of this allows the nonlinear function to be different for layerto-layer connections and within-layer connections, so xj (l, σ) = f [ X X wji (l)xi (l − 1, σ)] + g[ i Wji (l)xj (l, σ − 1)], (17) i where f (x) and g(x) can be different nonlinear functions. We can translate these expressions into the DA structure by recognizing that xj (l) is the ‘model variable’ in the layer-to-layer function while in the recurrent network, the state variables become xj (l, σ). It seems natural that as dimensions of connectivity are added–here going from solely feedforward to that plus within-layer connections–that additional independent variables would be aspects of the ‘neuron’ state variables’ representation. In adding connections among the neurons within a layer we have another independent variable, we called it σ, and the ‘point’ neurons depending on layer alone become fields xj (l, σ). In the machine learning/AI networks we have no restrictions on the number of independent variables. This may lead to the investigation of ‘neural’ fields φj (v) where v is a collection of independent variables indicating which layers are involved in the progression of the field from an input to an output layer. However many independent variables and however many ‘neurons’ we utilize in the architecture of our model network, the overall goal of identifying the conditional probability distribution P (X|Y) and estimating the moments or expected values of interest still comes down to one form or another in the approximation of integrals such as Eq. (6). 22 5.4 Making Time Continuous; Continuous Layers: Deepest Learning There is much to learn about the data assimilation or machine learning problem as the number of layers or equivalently the number of time points within an epoch becomes very large. The limit of the action where the number of layers in an epoch becomes a continuous variable is, in data assimilation notation [15], Z tF A0 (x(t), ẋ(t)) = dt L(x(t), ẋ(t), t) t0 L X 2 Rm (l, t) L(x(t), ẋ(t), t) = xr (t) − yr (t) 2 r=1  +  D X Rf (a) a=1 2 2 x˙a (t) − Fa (x(t)) . In this formulation the quantity Rm (l, t) is non-zero only near the times t ≈ τk . It can be taken as proportional to δ(t − τk ). Within the machine learning context we call this ‘deepest learning’ as the number of layers goes to infinity in a useful manner. The minimization of the action now requires that the paths  x(t) in {x(t), ẋ(t)} d ∂L(x(t),ẋ(t),t) = ∂L(x(t),ẋ(t),t) , space satisfy the Euler-Lagrange equation dt ∂ ẋa (t) ∂xa (t) along with the boundary conditions δxa (t0 )pa (t0 ) = 0; δxa (tF )pa (tF ) = 0 where pa (t) = ∂L(x(t), ẋ(t), t)/∂ ẋa (t) is the canonical momentum. For the standard model, the Euler-Lagrange equations take the form Rf [ dxb (t) d δab + DFab (x(t))][ − Fb (x(t))] = Rm (l, t)δar (xr (t) − yr (t)), (18) dt dt where we have DF(x) = ∂F(x)/∂x. The E-L equations are the necessary condition, along with the accompanying boundary conditions, that show how errors represented on the right hand side of the E-L equation drive the model variables at all layers to produce x(l) → y(l) where data is available. In the integral for < G(X) >, the coordinates x(t0 ) and x(tF ) are not restricted, so we have the ‘natural’ boundary conditions [11, 17, 22] pa (t0 ) = 0 and pa (tF ) = 0. This shows quite clearly that the minimization problem requires a solution of a two point boundary value problem in {x(t), v(t) = ẋ(t)} space. One way to address two point boundary value problems is to start at one end, t0 with a value of x(t0 ) and proceed from tF with a value of x(tF ) and integrate both 23 ways requiring a match [27]. Furthermore, the residual of the measurement error term on the right hand side of Eq. (18) nudges the solution in x(t) to the desired output. If one were to specify x(t0 ), but not x(tF ), then the boundary conditions for the Euler-Lagrange equation are the given x(t0 ) (δx(t0 ) = 0) and require the canonical momentum pa (tF ) = 0. Examining the Hamiltonian dynamics for this problem then suggest integrating the x(t) equation forward from t0 and the canonical momentum equation backward from tF . This is back propagation. 5.4.1 Hamiltonian Dynamics Realization If one moves from the Lagrangian realization of the variational problem to a Hamiltonian version by trading in the phase space from {x(t), v(t)} to canonical coordinates {x(t), p(t)}, then the Hamiltonian H(x, p) for the standard model reads H(x, p, t) = D  X pa (t)pa (t) a=1 2Rf (a)  + pa (t)Fa (x(t)) − L X Rm (r, t) r=1 2 (xr (t) − yr (t))2 . (19) In these coordinates the equations of motion are then given by Hamilton’s equations dpa (t) ∂Fb (x(t)) = −pb (t) + δar Rm (r, t)(xr (t) − yr (t)) dt ∂xa (t) dxa (t) pa (t) = Fa (x(t)) + . dt Rf (a) (20) Returning from this to discrete time (or layers) we see that if the variational principle is carried out in {x, p} space, the boundary conditions pa (t0 ) = pa (tF ) = 0 are quite easy to impose while the other variables, all the xa (tk ) and the pa (tk ); k 6= 0, F , are varied. Going forward in x and backward in p is neither required nor suggested by this formulation. It is worth noting that in either {x, v} space or {x, p} space, the continuous time (layer) formulation has a symplectic symmetry [11, 15]. This not automatically maintained when the discrete time (layer) problem is reinstated [24, 31]; however, many choices of integration procedure in which time/layer becomes discrete and the symplectic symmetry is maintained are known [24, 31, 13] In a detailed analysis [15, 33] of the variational problem in Lagrangian and Hamiltonian formulations, it appears that the direct Lagrangian version 24 in which the state variables x(tn ) or x(ln ) are varied, the symplectic structure can be maintained and the boundary conditions on the canonical momentum respected [24, 31]. In practice, this means that the direct variational methods suggested for the machine learning problems taking into account model error (Rf 6= ∞) may skirt issues associated with back propagation. This issue may be seen a bit more directly by comparing how one moves in {x(t), ẋ(t)} space organized by Eq. (18) with the motion in {x(t), p(t)} space guided by Eq. (20). These are equivalent motions of the model in time/layer, connected by a Legendre transformation from {x(t), ẋ(t)} → {x(t), p(t)}. In the Hamiltonian form, where Rf → ∞ is the limit where one usually works, moving in regions where DF(x) may have saddle points may ‘slow down’ the progression in the canonical momentum p(t). This may occur at a maximum, at a minimum, or at a saddle point of DF(x). At any of these the observation in [21]: “The analysis seems to show that saddle points with only a few downward curving directions are present in very large numbers, but almost all of them have very similar values of the objective function. Hence, it does not much matter which of these saddle points the algorithm gets stuck at.” may apply. In the Lagrangian formulation Eq. (18) the manner in which DF(x) enters the motion is quite different and may well avoid this confounding property. We have pointed out that Eq. (20) is backprop. The use of the Lagrangian variational principle [24, 31] solves the same problem, so may have an unexpected virtue. 6 Summary and Discussion This paper has been directed to drawing a direct analogy between the formulation of a much utilized class of machine learning problems and a set of equivalent problems in data assimilation as encountered in many physical, biological and geoscience problems as well as in many engineering analyses where data driven model development and testing is a goal. The fundamental equivalence of the two inquiries is the core of this paper. The analogy allows us to identify methods developed in data assimilation as potentially quite useful in machine learning contexts. In particular the possibility of using variational annealing to produce the global minimum of the action (cost function) of the standard model of data assimilation with both observation error and model error appears potentially of value. 25 The idea of making time continuous for purposes of exploring properties of data assimilation suggests a similar tactic in machine learning. The machine learning step of making layers continuous we have called “deepest learning” as deep learning appears to result from increasing the number of layers. In the continuous layer (time) formulation, we see clearly that the problem to be solved is a two point boundary value problem. This may lead to the construction and solution of tractable models that may helpfully illuminate how deep learning networks operate successfully and expand the possibilities of utilizing them employing additional methods for numerical calculations and for interpretation. In the formulation of the statistical data assimilation problem at the general level expressed in Eq. (5) we see that the measurement error term which is where information from data is passed to the model, it is explicitly information through the conditional mutual information that is being passed from observations to the model. This suggests that the idea that deep learning works because of major increases in computing power as well as in having large data sets, however, the attribute of the data sets is not so much as they are large but that they possess information, in a precise manner, that can be utilized to learn about models. The conjunction of information transfer and state and parameter estimation is embodied in the work of Rissanen [28, 29] where he identifies the cost of estimating a parameter or a state variable at some time. The arguments we have presented suggest evaluating how much information in a data set is available to inform a model is of greater utility than just the size of the data set itself. One point not made explicit in the main text, but worth noting, is that once we have formulated the data assimilation or machine learning problems as accurately performing high dimensional integrals such as Eq. (6), the Laplace approximation method, namely the usual variational principle, permits the investigation of corrections through further terms in the expansion of the action about the path leading to the global minimum. In [33] it is shown that corrections to this first approximation are small as Rf becomes large when analyzing the standard model. This need not be the case for other choices of noise distributions in the measurement error or model error terms in the action. Another item of interest is the argument noted in [21] that as the dimension of a model increases, one may find fewer and fewer local minima confounding the search in path space for a global minimum, and in that situation many more unstable saddle points in path space will arise [7, 6]. 26 In the case of a chaotic system such as the Lorenz96 model, the evidence is that however large the dimension of the model itself and the paths over which one may search, there are multiple local minima until the number of measurements at any observation time is large enough and the information transferred to the model is sufficient. The role of the number of model evaluations between observations, suggested in some of the arguments here, also play a significant part in establishing whether the action surface has many local minima. The view of a deep network as moving from a few hidden layers to many may also be illuminated by our arguments. One idea is that by increasing the number of hidden layers one is increasing the resolution in the analog of ‘time’ in data assimilation. When one does that in data assimilation, we see it as probing the variation of the underlying model as it evolves from an initial condition through ‘layer’ = ‘time.’ Missing the higher frequency variations in time by employing a coarse grid in discrete time should have its counterpart role in the feedforward networks discussed here. It is recognized that the ‘neuron’ models widely utilized in machine learning applications have little in common with properties of biological neurons, the construction and implementation of large networks that have successful function within machine learning may prove a useful guide for the construction and implementation of functional natural neural networks. Finally, it is important to comment that while the analogy drawn and utilized here may improve the testing and validation of models supported by observational data, it does not assist in the selection of the models and their formulation. That is still a task to be addressed by the user. Acknowledgments We express our appreciation to our colleagues Dan Breen and Jeff Elman for important discussions. Also the CENI team made finding the analogs in this paper possible. Many thanks to Tim Gentner, Gert Cauwenberghs, and especially Gabe Silva improved the manuscript. Jon Shlens provided a detailed view from the active world of machine learning. Partial support from the MURI Program (N00014-13-1-0205) sponsored by the Office of Naval Research is acknowledged as is support for A. Shirman from the ARCS Foundation. 27 References [1] Perspectives on Research in Artificial Intelligence and Artificial General Intelligence Relevant to DoD, 2017. https://www.google. com/?gws_rd=ssl#q=perspectives+on+research+in+artificial+ intelligence+and+artificial+general+intelligence. [2] Henry D. I. Abarbanel. Predicting the Future: Completing Models of Observed Complex Systems. Springer, 2013. [3] E. L. Allgower and K. Georg. Numerical Continuation Methods: An Introduction. Springer-Verlag, 1990. [4] A. F. Bennett. Inverse Methods in Physical Oceanography. Cambridge University Press, 1992. [5] R. H. Byrd, P. Lu, and J. Nocedal. A limited memory algorithm for bound constrained optimization. SIAM Journal on Scientific and Statistical Computing, 16:1190–1208, 1995. [6] Anna Choromanska, Mikael Henaff, Michael Mathieu, Ge’rard Ben Arous, and Yann LeCun. The loss surfaces of multilayer networks. In 18th International Conference on Artificial Intelligence and Statistics (AISTATS), 2015. [7] Yann N. Dauphin, Razvan Pascanu, Caglar Gulcehre, Kyunghyun Cho, Surya Ganguli, and Yoshua Bengio. Identifying and attacking the saddle point problem in high-dimensional non-convex optimization. In Proceedings of the 27th International Conference on Neural Information Processing Systems, NIPS’14, pages 2933–2941, Cambridge, MA, USA, 2014. MIT Press. [8] J. L. Elman. Finding structure in time. Cognitive Science, 14:179–211, 1990. [9] Geir Evensen. Springer, 2009. Data Assimilation: The Ensemble Kalman Filter. [10] Robert M. Fano. Transmission of Information; A Statistical Theory of Communication. MIT Press, 1961. 28 [11] I. M. Gelfand and S. V. Fomin. Calculus of Variations. Dover Publications, Inc., 1963. [12] Ian Goodfellow, Yoshua Bengio, and Aaron Courville. Deep Learning. MIT Press, Cambridge, MA; London, UK, 2016. http://www. deeplearningbook.org. [13] Ernst Hairer, Gerhard Wanner, and Christian Lubich. Geometric Numerical Integration: Structure-Preserving Algorithms for Ordinary Differential Equations. Springer Series in Computational Mathematics; Volume 31, 2nd edition, 2006. [14] M. Jordan. Attractor dynamics and parallelism in a connectionist sequential machine. In Proceedings of the Eighth Conference of the Cognitive Science Society, pages 531–546. Cognitive Science Society, 1986. [15] N. Kadakia, D. Rey, J. Ye, and H. D. I. Abarbanel. Symplectic structure of statistical variational data assimilation. Quarterly Journal of the Royal Meteorological Society, 143(703):756–771, 2017. [16] Mark Kostuk. Synchronization and statistical methods for the data assimilation of hvc neuron models. PhD Dissertation in Physics, University of California, San Diego, 2012. [17] Mark Kot. A First Course In the Calculus of Variations. American Mathematical Society; Providence, Rhode Island., 2014. [18] Rubin H. Landau, Manuel Jose’ Paez, and Cristian C. Bordeianu. A Survey of Computational Physics: Introductory Computational Science. Princeton University Press, 2010. [19] Pierre Simon Laplace. Memoir on the probability of causes of events. Mémoires de Mathématique et de Physique, Tome Sixième, pages 621– 656, 1774. [20] Pierre Simon Laplace. Memoir on the probability of the causes of events. Statistical Science, 1(3):364–378, 1986. Translation to English by S. M. Stigler. [21] Yann LeCunn, Yoshua Bengio, and Geoffrey Hinton. Deep learning. Nature, 521:436–444, 2015. 29 [22] Daniel Liberzon. Calculus of Variations and Optimal Control Theory. Princeton University Press, 2012. [23] Edward N Lorenz. Predictability: A problem partly solved. In Tim Palmer and Renate Hagedorn, editors, Predictability of weather and climate. Cambridge, 2006. [24] J. E. Marsden and M. West. Discrete mechanics and variational integrators. Acta Numerica, pages 357–514, 2001. [25] K. G. Murty and S. N. Kabadi. Some np-complete problems in quadratic and nonlinear programming. Mathematical Programming, 39:117–129, 1987. [26] Alexander G. Parlos, Kil T. Chong, and Amir F. Atiya. Application of the recurrent multilayer perceptron in modeling complex process dynamics. IEEE Transactions on Neural Networks, 5:255–266, 1994. [27] W. H. Press, S. A. Teukolsky, W. T. Vetterling, and B. P. Flannery. Numerical Recipes: The Art of Scientific Computing, Third Edition. Cambridge University Press, 2007. [28] Jorma Rissanen. Stochastic Complexity in Statistical Inquiry Theory. World Scientific Publishing Co., Inc., River Edge, NJ, USA, 1989. [29] Jorma Rissanen. Information and Complexity in Statistical Modeling. Springer, 2007. [30] A. R. Wachter and L. T. Biegler. On the implementation of an interiorpoint filter line-search algorithm for large-scale nonlinear programming. Mathematical programming, 106:25–57, 2006. [31] J. M. Wendlandt and J. E. Marsden. Mechanical integrators derived from a discrete variational principle. Physica D: Nonlinear Phenomena, 106:223–246, 1997. [32] J. Ye, N. Kadakia, P. J. Rozdeba, H. D. I. Abarbanel, and J. C. Quinn. Improved variational methods in statistical data assimilation. Nonlinear Processes in Geophysics, 22(2):205–213, 2015. 30 [33] J. Ye, Daniel Rey, Nirag Kadakia, Michael Eldridge, Uri Morone, Paul Rozdeba, Henry D. I. Abarbanel, and John C. Quinn. A systematic variational method for statistical nonlinear state and parameter estimation. Physical Review E, 2015. [34] C. Zhu, R. H. Byrd, and J. Nocedal. L-bfgs-b: Algorithm 778: L-bfgs-b, fortran routines for large scale bound constrained optimization. ACM Transactions on Mathematical Software, 23:550–560, 1997. 31
2cs.AI
Strongly connected components -Algorithm for finding the strongly connected components of a graphAuthor: Vlad-Andrei Munteanu 1. Abstraction A directed graph G (V, E) is strongly connected if and only if, for any pair of vertices X and Y from V, there exists a path from X to Y and a path from Y to X. In Computer Science, the partition of a graph in strongly connected components is represented by the partition of all vertices from the graph, so that for any two vertices, X and Y, from the same partition, there exists a path from X to Y and a path from Y to X and for any two vertices, U and V, from different partition, the property is not met. The algorithm presented below is meant to find the partition of a given graph in strongly connected components in O (numberOfNodes + numberOfEdges * log* (numberOfNodes)), where log* function stands for iterated logarithm. 2. Algorithm For a better understanding of the algorithm it is recommended a revision of Disjoint-set Data Structure (section 6) and DFS oriented graph traversing (section 7). We will consider a strongly connected component as a set. With no doubt, two strongly connected components represent two disjoint sets because, if there exists a vertex X which belongs to the first strongly connected component as well as to the second strongly connected component, it means that for any vertex U from the first strongly connected component and any vertex V from the second strongly connected component, we can find both, a path from V and a path from U to V through X. This holds because X belongs to the same strongly connected component as U and V. From here, it results that the two strongly connected components we have selected can be joined in a bigger one. Using induction, we can prove that, if two or more strongly connected components are linked by one or more vertices, that means that they can be jointed. Therefore, the strongly connected components of a graph are pairwise disjointed. Initially, we will consider that every vertex is in its own strongly connected component (by definition, a vertex is a strongly connected component) and, using a DFS traversal, we will link those vertices that are in the same strongly connected component). The Algorithm is recursive type, and in the following lines, I will present the steps that must be followed: 1. the X vertex is added in the DFS stack and it is marked as being visited (either as DFS source, either as adjacent vertex to the top vertex of the stack); 2. iterate through all adjacent vertices of X in any order and for every neighbor, Y, it will be: - the case in which Y had already been visited, so the algorithm just verifies if any vertex from the stack is in the same strongly connected component as Y, and, if case positive, it joins the strongly connected components of X and Y; - the case in which the neighbor has not been visited yet, so it must be introduced in the stack. The algorithm is executed for the vertex Y, starting from the first step. After the execution of the algorithm for Y, it is popped out from the stack and, now being visited, the checking mentioned above between the nodes in the stack and Y needs to be done. If case positive, the strongly connected components of X and Y must be joined as above. 3. the vertex X is popped out from the stack; A crucial point of the algorithm is how we may know that a vertex from the stack is in the same connected components as the neighbor. In order to solve this problem, we must hold the minimum level from the DFS stack of each strongly connected component, which will be initialized with infinity. If the level of the strongly connected component of Y is infinity, there is no vertex in the stack which belongs to it. We have to reset to infinity the level of a strongly connected component when the vertex with the lowest level which belongs to that component is to be popped out from the DFS stack. When two strongly connected components are joined, the dominant one will hold the minimum level between its level and the level of the other one. 3. Proof of correctness The last paragraphs focused on the algorithm itself and on the most important observation which allows us to use Disjoint-set Data Structure. The following paragraphs will focus on proving the correctness of the algorithm. We will take into account all the situations which could appear with the adding of a new vertex in the stack (let`s assume that the new added vertex is X): -Case 1: The vertex X is the first pushed to the stack and the algorithm begins. -Case 2: The vertex X has a father, vertex Y, and they belong to the same strongly connected component. -Case 3: The vertex X has a father, vertex Y, and they belong to different strongly connected components. Case 1: If X is the first pushed vertex, it does not have a father, so this will not be an attempt to change the strongly connected component (joining attempt is done only for the pairs {father, vertex}. Case 2: If the X vertex has a father, node Y and they are found in the same strongly connected component, it means that there exists a path from X to Y (the path from Y to X being a direct edge). We will consider the path as X->Vertex1->Vertex2->Vertex3->…->Vertexk->Y (in the case in which there are more valid paths, consider the first which will be taken into account by the DFS traversal). Due to the properties of the DFS traversal which guarantees that all the paths from the current node which have not been visited until then will be taken into consideration, we could jump to the conclusion that if the vertex Vertexi is not visited, then all vertices Vertexi, Vertex(i+1),…, Vertexk and Y are visited and they are in the DFS stack (if at least one from these is not visited it means that the chosen path is not the first one selected by the DFS traversal, and if they would not be in the stack and but visited, it would mean that a complete DFS traversal has been executed, so X, being previously visited too, cannot be added now) and, moreover, any vertex Z, which belongs to a path from X to Y, but does not belong to the chosen path, it is not visited (in the case in which it was previously visited, either a complete execution of DFS traversal has been executed, which leads to the contradiction discussed before, or the chosen path is not the first one -the first path being the one which goes through Z-, which leads to a contradiction of the hypothesis). Therefore, there exists a vertex, Vertexj, with the property that all vertices Vertexj, Vertex(j+1), …, Vertexk, Y are visited and in the stack and all vertices X, Vertex1, Vertex2,…, Vertex(j-1) are not visited. From the same property of the DFS traversal, it is guaranteed that it must lead to the traversal of X, Vertex1, Vertex2, …, Vertex(j-1) at some point. Arrived in Vertex(j-1), we will find Vertexj which is visited and in the stack, so the strongly connected components of Vertex(j-1) and Vertexj are joined. Back from recursion to Vertex(j-2), it is confirmed the fact that Vertex(j-1) it is in the stack through the link with Vertexj. Inductively, the link would be made between Vertex(j-2) and Vertex(j-3), between Vertex(j-3) and Vertex(j-4), …, between Vertex1 and X, and, finally, between X and Y, being in the stack through Vertexj. In conclusion, if two vertices X and Y which are connected by an edge are in the same component, the algorithm will join them. Case 3: If the vertex X has a father, vertex Y, and they are in different strongly connected components, it means that there exists no path from X to Y (the path from Y to X exists through direct edge). As there exists no path from X to Y, it means that for any vertex Y` with the property that there exists a path from Y` to Y and vertex X` with the property that there exists a path from X to X`, there exists no path from X` to Y`. Therefore, the DFS traversal, would not find any path from any “son" of Y to any “father" of X, and so, no vertex which is in the same set as Y ( Y included) will be connected with no vertex which is in the same set as X( X included). In conclusion, the behavior of the algorithm is as desired in all possible cases, so the correctness is demonstrated. 4. Complexity The complexity is given by the DFS traversal and by a possible connection between of any two vertices which are connected through and edge, so we have O(numberOfNodes+numberOfEdges + numberOfEdges * log* (numberOfNodes)), which is O(numberOfNodes + numberOfEdges * log* (numberOfNodes)), where log* stands for the iterated logarithm. 5. Implementation A simple and clean implementation of the algorithm can be done through five methods (you can see the C++ code below): 1. The method which generate the set of a specific element (vertex) int getComponent (int currentElement) { int currentKing = currentElement; while (currentSCC[currentKing] != currentKing) { currentKing = currentSCC[currentKing]; } while (currentElement != currentKing) { int copyOfElement = currentElement; currentElement = currentSCC[copyOfElement]; currentSCC[copyOfElement] = currentKing; } return currentKing; } //getComponent 2. The method which joins the sets of two given elements (vertices) void uniteComponents (int firstElement, int secondElement) { int firstComponent = getComponent(firstElement); int secondComponent = getComponent(secondElement); if (firstComponent == secondComponent) { return; } if (heightOfSCC[firstComponent] < heightOfSCC[secondComponent]) { swap (firstComponent, secondComponent); } if (heightOfSCC[firstComponent] == heightOfSCC[secondComponent]) { ++heightOfSCC[firstComponent]; } currentSCC[secondComponent] = firstComponent; minLevelInDFS[firstComponent] = min (minLevelInDFS[firstComponent], minLevelInDFS[secondComponent]); } //uniteComponents 3. DFS method void solveIt (int node, int currentLevel) { int componentOfNode = getComponent(node); minLevelInDFS[componentOfNode] = min (minLevelInDFS[componentOfNode], currentLevel); visited[node] = true; for (auto currentNeighbour : graph[node]) { if (visited[currentNeighbour] == false) { solveIt(currentNeighbour, currentLevel + 1); } int componentOfNeighbour = getComponent(currentNeighbour); if (minLevelInDFS[componentOfNeighbour] < currentLevel) { uniteComponents(node, currentNeighbour); } } componentOfNode = getComponent(node); if (minLevelInDFS[componentOfNode] == currentLevel) { minLevelInDFS[componentOfNode] = MAXLevel; } } //solveIt 4. Main method int main() { ofstream fout ("output"); int numberOfNodes, numberOfEdges; readIt(numberOfNodes, numberOfEdges); prepareIt(numberOfNodes); for (int currentNode = 1; currentNode <= numberOfNodes; ++currentNode) { if (visited[currentNode] == false) { solveIt(currentNode, 1); } } int howmanySCC = 0; for (int currentNode = 1; currentNode <= numberOfNodes; ++currentNode) { if (currentNode == currentSCC[currentNode]) { ++howmanySCC; } } fout << howmanySCC << '\n'; int currentIndexSCC = 0; for (int currentNode = 1; currentNode <= numberOfNodes; ++currentNode) { int currentSCC = getComponent(currentNode); if (buildFinalSCC[currentSCC]) { SCC[buildFinalSCC[currentSCC]].push_back(currentNode); } else { ++currentIndexSCC; buildFinalSCC[currentSCC] = currentIndexSCC; SCC[buildFinalSCC[currentSCC]].push_back(currentNode); } } for (int currentSCC = 1; currentSCC <= howmanySCC; ++currentSCC) { for (auto currentNode : SCC[currentSCC]) { fout << currentNode << ' '; } fout << '\n'; } return 0; } //main 5. Declarations //Declarations - begin const int MAXN = 1e5 + 5; const int MAXLevel = 1e8; vector <int> graph[MAXN]; vector <int> SCC[MAXN]; int currentSCC[MAXN]; int heightOfSCC[MAXN]; int minLevelInDFS[MAXN]; int buildFinalSCC[MAXN]; bool visited[MAXN]; //Declarations - end 6. Disjoint-set Data Structure Disjoint-set is a data structure used for keeping disjoint sets and it was first described by Bernard A. Galler and Michael J. Fischer in 1964. It allows us to find the set which a specific element belongs to or to join the sets of two specific elements in complexity O (log* (numberOfElementsInTheSets)). The main idea is to represent each set as a tree, where the root is the father of the whole set. When two sets are to be joined, the set with the higher tree is considered the dominant one and its father becomes the father for the both sets, and when we need to find the father of a specific element, we will change the fathers of all elements on the path between it and the root, linking each of those to the root. These two optimizations generate the complexity mentioned above. More information about it may be found following the links in bibliography. 7. DFS Traversal Depth-First Search is an algorithm for traversing trees or graphs (directed and undirected). A version of it was developed by French mathematician Charles Pierre Tremaux in the 19th century. It makes use of a stack, the top of it being considered the current node. The idea is to iterate through the neighbors of the current node and, if one of those has not been visited yet, it will be pushed in the stack and it will be set as the current node. More information about it may be found following the links in bibliography. 8. Bibliography https://en.wikipedia.org/wiki/Depth-first_search https://en.wikipedia.org/wiki/Disjoint-set_data_structure
8cs.DS
arXiv:1701.03322v2 [cs.AI] 28 Apr 2017 From First-Order Logic to Assertional Logic Yi Zhou Abstract First-Order Logic (FOL) is widely regarded as one of the most important foundations for knowledge representation. Nevertheless, in this paper, we argue that FOL has several critical issues for this purpose. Instead, we propose an alternative called assertional logic, in which all syntactic objects are categorized as set theoretic constructs including individuals, concepts and operators, and all kinds of knowledge are formalized by equality assertions. We first present a primitive form of assertional logic that uses minimal assumed knowledge and constructs. Then, we show how to extend it by definitions, which are special kinds of knowledge, i.e., assertions. We argue that assertional logic, although simpler, is more expressive and extensible than FOL. As a case study, we show how assertional logic can be used to unify logic and probability, and more building blocks in AI. 1 Introduction Classical First-Order Logic (FOL) is widely regarded as one of the most important foundations of symbolic AI. FOL plays a central role in the field of Knowledge Representation and Reasoning (KR). Many of its fragments (such as propositional logic, modal and epistemic logic, description logics), extensions (such as second-order logic, situation calculus and first-order probabilistic logic) and variants (such as Datalog and first-order answer set programming) have been extensively studied in the literature [6, 22]. Nevertheless, AI researchers have pointed out several issues regarding using FOL for knowledge representation and reasoning, mostly from the reasoning point of view. First, FOL is computationally very difficult. Reasoning about FOL is a well-known undecidable problem. Also, FOL is monotonic in the sense that adding new knowledge into a first-order knowledge base always results in more consequences. However, human reasoning is sometimes nonmonotonic. In this paper, we argue that FOL also has some critical issues from the knowledge representation point of view. First of all, although FOL is considered natural for welltrained logicians, it is not simple and flexible enough for knowledge engineers with less training. One reason is the distinction and hierarchy between term level, predicate level and formula level. From my own experience as a teacher in this subject, although strongly emphasized in the classes, many students failed to understand why a predicate or a formula cannot be in the scope of a function. Another reason is the notion of free occurrences of variables. For instance, it is not easily understandable for many students why the GEN inference rule has to enforce the variable occurrence restrictions. Last 1 but not least, arbitrary nesting also raises issues. Although natural from a mathematical point of view, a nested formula, e.g., (x∨¬(y ∧z))∧(¬y ∨¬x) is hard to be understood and used. Secondly, FOL has limitations in terms of expressive power. FOL cannot quantify over predicates/functions. This can be addressed by extending FOL into high-order logic. Nevertheless, high-order logic still cannot quantify over formulas. As a consequence, FOL and high-order logic are not able to represent an axiom or an inference rule in logic, such as Modus Ponens. Flexible quantification beyond the term level is needed in applications. As an example, in automated solving mathematical problems, we often use proof by induction. To represent this, we need to state that for some statement P with a number parameter, if that P holds for all numbers less than k implies that P holds for the number k as well, then P holds for all natural numbers. Here, P is a statement at a formula level, possibly with complex sub-statements within itself. Hence, in order to represent and use proof by induction, we need to quantify over P that is at a formula level. Thirdly, FOL is hard to be extended with new building blocks. FOL itself cannot formalize some important AI notions including probability, actions, time etc., which are needed in a wide range of applications. For this purpose, AI researchers have made significant progresses on extending FOL with these notions separately, such as first-order probabilistic logic [4, 12], situation calculus [15, 16], CTL [7] etc. Each is a challenging task in the sense that it has to completely re-define the syntax as well as the semantics. However, combing these notions together, even several of them, seems an extremely difficult task. Moreover, there are many more building blocks to be incorporated in applications. For instance, consider task planning for home service robots [13]. It is necessary to represent actions, probability, time and more building blocks such as preferences altogether at the same time. To address these issues, we propose assertional logic, in which all syntactic objects are categorized as set theoretic constructs including individuals, concepts and operators, and all kinds of knowledge are uniformly formalized by equality assertions of the form a = b, where a and b are either atomic individuals or compound individuals. Semantically, individuals, concepts and operators are interpreted as elements, sets and functions respectively in set theory, and knowledge of the form a = b means that the two individuals a and b are referring to the same element. We first present the primitive form of assertional logic that uses minimal assumed knowledge and primitive constructs. Then, we show how to extend it with more building blocks by definitions, which are special kinds of knowledge, i.e., assertions used to define new individuals, concepts and operators. Once these new syntactic objects are defined, they can be used as a basis to define more. As an example, we show how to define multi-assertions by using Cartesian product, and nested assertions by using multi-assertions. We show that assertional logic, although simpler, is more expressive and extensible than FOL. As a case study, we show how to extend assertional logic for unifying logic and probability, and more important AI building blocks including time. Note that our intention is not to reinvent the wheel of these building blocks but to borrow existing excellent work on formalizing these building blocks separately and to assemble them within one framework (i.e., assertional logic) so that they can live happily ever after. 2 2 Meta Language and Prior Knowledge One cannot build something from nothing. Hence, in order to establish assertional logic, we need some basic knowledge. Of course, for the purpose of explanation, we need an informal meta language whose syntax and semantics are pre-assumed. As usual, we use a natural language such as English. Nevertheless, this meta language is used merely for explanation and it should not affect the syntax as well as the semantics of anything defined formally. Only a meta level explanation language is not enough. Other than this, we also need some core objects and knowledge, whose syntax and semantics are pre-assumed as well. These are called prior objects and prior knowledge. For instance, when defining real numbers, we need some prior knowledge about natural numbers; when defining probability, we need some prior knowledge about real numbers. In assertional logic, we always treat the equality symbol “=” as a prior object. There are some prior knowledge associated with the equality symbol. For instance, “=” is an equivalence relation satisfying reflexivity, symmetricity, and transitivity. Also, “=” satisfies the general substitution property, that is, if a = b, then a can be used to replace b anywhere. Other than the equality symbol, we also assume some prior objects and their associated prior knowledge in set theory [11], including set operators such as set union and Cartesian product, Boolean values, set builder notations and natural numbers. 3 Assertional Logic: the Primitive Form In this section, we present the primitive form of assertional logic. As the goal of assertional logic is to syntactically represent knowledge in application domains, there are two essential tasks, i.e., how to capture the syntax of the domain and how to represent knowledge in it. 3.1 Capturing the syntax Given an application domain, a syntactic structure (structure for short if clear from the context) of the domain is a triple hI, C, Oi, where I is a collection of individuals, representing objects in the domain, C a collection of concepts, representing groups of objects sharing something in common and O a collection of operators, representing relationships and connections among individuals and concepts. Concepts and operators can be nested and considered as individuals as well. If needed, we can have concepts of concepts, concepts of operators, concepts of concepts of operators and so on. An operator could be multi-ary, that is, it maps a tuple of individuals into a single one. Each multi-ary operator O is associated with a domain of the form (C1 , . . . , Cn ), representing all possible values that the operator O can operate on, where Ci , 1 ≤ i ≤ n, is a concept. We call n the arity of O. For a tuple (a1 , . . . , an ) matching the domain of an operator O, i.e., ai ∈ Ci , 1 ≤ i ≤ n, O maps (a1 , . . . , an ) into an individual, denoted by O(a1 , . . . , an ). 3 Operators are similar to functions in FOL but differs in two essential ways. First, operators are many-sorted as C1 , . . . , Cn could be different concepts. More importantly, C1 , . . . , Cn could be high-order constructs, e.g., concepts of concepts, concepts of operators. 3.2 Representing knowledge Let hI, C, Oi be a syntactic structure. A term is an individual, either an atomic individual a ∈ I or the result O(a1 , . . . , an ) of an operator O operating on some individuals a1 , . . . , an . We also call the latter compound individuals. An assertion is of the form a = b, (1) where a and b are two terms. Intuitively, an assertion of the form (1) is a piece of knowledge in the application domain, claiming that the left and the right side refer to the same object. A knowledge base is a set of assertions. Terms and assertions can be considered as individuals as well. Similar to concepts that group individuals, we use schemas to group terms and assertions. A schema term is either an atomic concept C ∈ C or of the form O(C1 , . . . , Cn ), where Ci , 1 ≤ i ≤ n are concepts. Essentially, a schema term represents a set of terms, in which every concept is grounded by a corresponding individual. That is, O(C1 , . . . , Cn ) is the collection {O(a1 , . . . , an )}, where ai ∈ Ci , 1 ≤ i ≤ n are individuals. Then, a schema assertion is of the same form as form (1) except that terms can be replaced by schema terms. Similarly, a schema assertion represents a set of assertions. We say that a schema term/assertion mentions a set {C1 , . . . , Cn } of concepts if C1 , . . . , Cn occur in it, and only mentions if {C1 , . . . , Cn } contains all concepts mentioned in it. Note that it could be the case that two or more different individuals are referring to the same concept C in schema terms and assertions. In this case, we need to use different copies of C, denoted by C 1 , C 2 , . . . , to distinguish them. For instance, all assertions x = y, where x and y are human, are captured by the schema assertion Human1 = Human2 . On the other side, in a schema, the same copy of a concept C can only refer to the same individual. For instance, Human = Human is the set of all assertions of the form x = x, where x ∈ Human. 3.3 The semantics We propose a set theoretic semantics for assertional logic. Since we assume set theory as the prior knowledge, in the semantics, we freely use those individuals (e.g., the empty set), concepts (e.g., the set of all natural numbers) and operators (e.g., the set union operator) without explanation. An interpretation (also called a possible world) is a pair h∆, .I i, where ∆ is a domain of elements, and .I is a mapping function that admits all prior knowledge, and maps each individual into a domain element in ∆, each concept into a set in ∆ and each n-ary operator into an n-ary function in ∆. The mapping function .I is generalized for 4 terms by mapping O(a1 , . . . , an ) to OI (aI1 , . . . , aIn ). Similar to terms and assertions, interpretations can also be considered as individuals to be studied. It is important to emphasize that an interpretation has to admit all prior knowledge. For instance, since we assume set theory, suppose that an interpretation maps two individuals x and y as the same element a in the domain, then the concepts {x} and {y} must be interpreted as {a}, and x = y must be interpreted as a = a. Let I be an interpretation and a = b an assertion. We say that I is a model of a = b, denoted by I |= a = b iff .I (a) = .I (b), also written aI = bI . Let KB be a knowledge base. We say that I is a model of KB, denoted by I |= KB, iff I is a model of all assertions in KB. We say that an assertion A is a property of KB, denoted by KB |= A, iff all models of KB are also models of A. In particular, we say that an assertion A is a tautology iff it is modeled by all interpretations. Since we assume set theory as our prior knowledge, we directly borrow some set theoretic constructs. For instance, we can use ∪(C1 , C2 ) (also written as C1 ∪ C2 ) to denote a new concept that unions two concepts C1 and C2 . Applying this to assertions, we can see that assertions of the primitive form (1) can indeed represent many important features in knowledge representation. For instance, the membership assertion, stating that an individual a is an instance of a concept C, is the following assertion ∈ (a, C) = ⊤ (also written as a ∈ C). The containment assertion, stating that a concept C1 is contained by another concept C2 , is the following assertion ⊆ (C1 , C2 ) = ⊤ (also written as C1 ⊆ C2 ). The range declaration, stating that the range of an operator O operating on some concepts C1 , . . . , Cn equals to another concept C, is the following assertion O(C1 , . . . , Cn ) = C. 4 Extensibility via Definitions As argued in the introduction section, extensibility is a critical issue for knowledge representation. In assertional logic, we use definitions for this purpose. Definitions are (schema) assertions used to define new syntactic objects (including individuals, concepts and operators) based on existing ones. Once these new syntactic objects are defined, they can be used to define more. Note that definitions are nothing extra but special kinds of knowledge (i.e. assertions). We start with defining new individuals. An individual definition is an assertion of the form a = t, (2) where a is an atomic individual and t is a term. Here, a is the individual to be defined. This assertion claims that the left side a is defined as the right side t. For instance, 0 = ∅ means that the individual 0 is defined as the empty set. Defining new operators is similar to defining new individuals except that we use schema assertions instead. Let O be an operator to be defined and (C1 , . . . , Cn ) its domain. An operator definition is a schema assertion of the form O(C1 , . . . , Cn ) = T, where T is a schema term that mentions concepts only from C1 , . . . , Cn . 5 (3) Since a schema assertion represents a set of assertions, essentially, an operator definition of the form (3) defines the operator O by defining the value of O(a1 , . . . , an ) one-by-one, where ai ∈ Ci , 1 ≤ i ≤ n. For instance, for defining the successor operator Succ, we can use the schema assertion Succ(N) = {N, {N}}, meaning that, for every natural number n, the successor of n, is defined as {n, {n}}. Defining new concepts is somewhat different. As concepts are essentially sets, we directly borrow set theory notations for this purpose. There are four ways to define a new concept. Enumeration Let a1 , . . . , an be n individuals. Then, the collection {a1 , . . . , an } is a concept, written as C = {a1 , . . . , an }. (4) For instance, we can define the concept Digits by Digits = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}. Operation Let C1 and C2 be two concepts. Then, C1 ∪ C2 (the union of C1 and C2 ), C1 ∩ C2 (the intersection of C1 and C2 ), C1 \ C2 (the difference of C1 and C2 ), C1 × C2 (the Cartesian product of C1 and C2 ), 2C1 (the power set of C1 ) are concepts. Operation can be written by assertions as well. For instance, the following assertion C = C1 ∪ C2 (5) states that the concept C is defined as the union of C1 and C2 . As an example, one can define the concept M an by M an = Human ∩ M ale. Restricted Comprehension Let C be a concept and A(C) a schema assertion that only mentions concept C. Then, individuals in C satisfying A, denoted by {x ∈ C|A(x)} (or simply C|A(C)), form a concept, written as C ′ = C|A(C). (6) For instance, we can define the concept M ale by M ale = {Animal |Sex(Animal) = male}, meaning that M ale consists of all animals whose sexes are male. Replacement Let O be an operator and C a concept on which O is well defined. Then, the individuals mapped from C by O, denoted by {O(x) | x ∈ C} (or simply O(C)), form a concept, written as C ′ = O(C). (7) For instance, we can define the concept P arents by P arents = P arentOf (Human), meaning that it consists of all individuals who is a P arentOf some human. Definitions can be incremental. We may define some syntactic objects first. Once defined, they can be used to define more. One can always continue with this incremental process. For instance, in arithmetic, we define the successor operator first. Once defined, it can be used to define the add operator, which is further served as a basis to define more. Since terms and assertions can be considered as individuals, we can define new type of terms and assertions by definitions. As an example, we extend assertions of the form (1) into multi-assertions by using Cartesian product. We first define multi-assertions of a fixed number of assertions. Given a number n, we define a new operator Mn with arity n by the following schema assertion: Mn (C1 = D1 , . . . , Cn = Dn ) = (C1 , . . . , Cn ) = (D1 , . . . , Dn ), 6 where Ci , Di , 1 ≤ i ≤ n, are concepts of terms. Notice that, (C1 , . . . , Cn ) = (D1 , . . . , Dn ) is a single assertion of the form (1). In this sense, an n-ary multiassertion is just a syntax sugar. Then, we define the concept of multi-assertions: [ M ulti − Assertion = Mi (A1 , . . . , Ai ), 1≤i≤∞ where A1 , . . . , Ai are i copies of standard assertions. For convenience, we use Assertion1 , . . . , Assertionn to denote an n-ary multi-assertion. Once multi-assertion is defined, it can be used to define more syntactic objects. As an example, we use multi-assertion to define nested assertions. We first define nested terms as follows: N ested − T erm = N − T erm = T erm ∪ N − T erm Op(N ested − T erm). Then, nested assertions can be defined as N ested − Assertion = N ested − T erm = N ested − T erm. Again, once nested assertion is defined, it can be used as basis to define more, so on and so forth. Using nested assertions can simplify the representation task. However, one cannot overuse it since, essentially, every use of a nested term introduces a new individual. 5 Embedding FOL into Assertional Logic In the previous section, we show how to extend assertions of the primitive form (1) into multi-assertions and nested assertions. In this section, we continue with this task to show how to define more complex forms of assertions with logic connectives, including propositional connectives and quantifiers. We start with the propositional case. Let A be the concept of nested assertions. We introduce a number of operators over A in assertional logic, including ¬(A) (for negation), ∧(A1 , A2 ) (for conjunction), ∨(A1 , A2 ) (for disjunction) and → (A1 , A2 ) (for implication). There could be different ways to define these operators in assertional logic. Let a = a′ and b = b′ be two (nested) assertions. The propositional connectives are defined as follows: ¬(a = a′ ) = ∧(a = a′ , b = b′ ) = ′ ′ ∨(a = a , b = b ) = → (a = a′ , b = b′ ) = {a} ∩ {a′ } = ∅ ({a} ∩ {a′ }) ∪ ({b} ∩ {b′ }) = {a, a′ , b, b′ } ({a} ∩ {a′ }) ∪ ({b} ∩ {b′ }) 6= ∅ ({a, a′ } \ {a} ∩ {a′ }) ∪ ({b} ∩ {b′ }) 6= ∅, where a 6= a′ is used to also denote ¬(a = a′ ). One can observe that the ranges of all logic operators are nested assertions. Hence, similar to multi-assertion and nested assertion, propositional logic operators are syntactic sugar as well. 7 Now we consider to define operators for quantifiers, including ∀ (for the universal quantifier) and ∃ (for the existential quantifier). The domain of quantifiers is a pair (C, A(C)), where C is a concept and A(C) is a schema assertion that only mentions C. The quantifiers are defines as follows: ∀(C, A(C)) = C|A(C) = C (8) ∃(C, A(C)) = C|A(C) 6= ∅ (9) Intuitively, ∀(C, A(C)) is true iff those individuals x in C such that A(x) holds equals to the concept C itself, that is, for all individuals x in C, A(x) holds; ∃(C, A(C)) is true iff those individuals x in C such that A(x) holds does not equal to the empty set, that is, there exists at least one individual x in C such that A(x) holds. We can see that the ranges of quantifiers are nested assertions as well. In this sense, quantifiers are also syntactic sugar of the primitive form. Note that quantifiers defined here are ranging from an arbitrary concept C. If C is a concept of all atomic individuals and all quantifiers range from the same concept C, then these quantifiers are first-order. Nevertheless, the concepts could be different. In this case, we have many-sorted FOL. Moreover, C could be complex concepts, e.g., a concept of all possible concepts. In this case, we have monadic second-order logic. Yet C could be many more, e.g., a concept of assertions, a concept of concepts of terms etc. In this sense, the quantifiers become high-order. Finally, the biggest difference is that C can even be a concept of assertions so that quantifiers in assertional logic can quantify over assertions (corresponding to formulas in classical logics), while this cannot be done in classical logics including high-order logic. It can be verified that all tautologies in propositional logic and FOL (e.g., DeMorgan’s laws) are also tautologies in assertional logic. For space reasons, we leave the theorems and their proofs to a full version of this paper. 6 Incorporating Probability and More Probability is another important building block for knowledge representation. In the last several decades, with the development of uncertainty in artificial intelligence, a number of influential approaches [4, 8, 10, 17, 18, 20] have been developed, and important applications have been found in machine learning, natural language processing etc. Normally, to incorporate probability in logic, one has to complete redefine the whole semantics since the integrations between probability and logic connectives and quantifiers are complicated. In this section, we show how this can be easily done in assertional logic. The key point is, although the interactions between logic and probability are complicated, their interactions with assertions of the basic form (1) is relatively simple. As shown in the previous section, the interactions between logic and assertions can be defined by a few lines. In this section, following Gaifman’s idea [8], we show that this is indeed the case for integrating assertions with probability as well. Then, the interactions between logic and probability will be automatically established via assertions. 8 6.1 Integrating assertions with probability Since operations over real numbers are involved in defining probability, we need to assume a theory of real number as our prior knowledge. Gaifman [8] proposed to define the probability of a logic sentence by the sum of the probabilities of the possible worlds satisfying it. Following this idea, in assertional logic, we introduce an operator P r (for probability) over the concept A of assertions. The range of P r is the concept of real numbers. For each possible world w, we assign an associated weight Ww , which is a positive real number. Then, for an assertion A, the probability of A, denoted by P r(A), is define by the following schema assertion: P r(A) = Σw,w|=A Ww . Σw Ww (10) This definition defines the interactions between probability and assertions. In case that there are a number of infinite worlds, we need to use measure theory. Nevertheless, this is beyond the scope of our paper. Once we have defined the probability P r(A) of an assertion A as a real number, we can directly use it inside other assertions. In this sense, P r(A) = 0.5, P r(A) ≥ 0.3, P r(A) ≥ P r(∀(C, B(C))) − 0.3, P r(A) × 0.6 ≥ 0.4 and P r(P r(A) ≥ 0.3) ≥ 0.3 are all valid assertions. We are able to vefiry some properties about probability, for instance, Kolmogorov’s first and second probability axioms. We also extend this definition for conditional probability. We again introduce a new operator P r over pairs of two assertions. Following a similar idea, the conditional probability P r(A1 , A2 ) of an assertion A1 providing another assertion A2 , also denoted by P r(A1 |A2 ), is defined by the following schema assertion: P r(A1 |A2 ) = Σw,w|=A1,w|=A2 Ww . Σw,w|=A2 Ww (11) Again, once conditional probability is defined as a real number, we can use it arbitrarily inside other assertions. Similarly, we can verify some properties about conditional probabilities, including the famous Bayes’ theorem, i.e., P r(A1 ) × P r(A2 |A1 ) = P r(A2 ) × P r(A1 |A2 ). for all assertions A1 and A2 . 6.2 Interactions between logic and probability via assertions Although we only define probabilities for assertions of the basic form, the interactions between probability and other building blocks, e.g., logic, are automatically established since assertions connected by logic operators can be reduced into the primitive form. In this sense, we can investigate some properties about the interactions between logic and probability. For instance, it can be observed that Kolmogorov’s third probability axiom is a tautology in assertion logic. That is, let A1 , . . . , An be n assertions that are pairwise disjoint. Then, P r(A1 ∨ · · · ∨ An ) = P r(A1 ) + · · · + P r(An ). 9 It can be verified that many axioms and properties regarding the interactions between logic and probability are tautologies in assertional logic, for instance, the additivity axiom: P r(φ) = P r(φ ∧ ψ) + P r(φ ∧ ¬ψ) and the distributivity axiom: φ ≡ ψ implies that P r(φ) = P r(ψ), for any two assertions φ and ψ. In this sense, assertional logic can also be used to validate existing properties about the interactions of logic and probability. In addition, it may foster new discoveries, e.g., the interactions between higher-order logic and probability and some properties about nested probabilities. Note that we do not intend to reinvent the wheel of defining probability nor its interactions with logic. All definitions about (conditional) probability are borrowed from the literature. Instead, we take probability as a case study to show how one building block (e.g., logic) and another (e.g., probability) can be interacted through assertions without going deeper into the interactions between themselves. 6.3 More building blocks More critically, there are many more important building blocks to be incorporated. It is barely possible to clarify the interactions among them all. Nevertheless, it becomes possible to unify them altogether in assertional logic as one only needs to consider the interactions between these building blocks and the basic form of assertions separately. Consequently, the interactions among these building blocks themselves will be automatically established via assertions, as what we did for unifying logic and probability. As another case study, we consider how to formalize time in assertional logic. Time itself can be understood in different ways such as time points, time interval, LTL and CTL [1, 7, 19]. Following the same idea of incorporating probability, we only need to consider the interactions between time and assertions. In this paper, we only report the simple case of integrating assertions with time points. Let T p be a concept of time points. We introduce a new operator t whose domain is a pair (I, T p). Intuitively, t(i, tp), i ∈ T , tp ∈ T p, is the value of individual i at time point tp. Then, we introduce temporal formulas, a new Boolean operator T whose domain is a pair (A, T p), by the following schema assertion: T (a = b, tp) = t(a, tp) = t(b, tp). (12) Then, the interactions between time points and logic connectives and probability can be automatically established. We are able to investigate some properties. For instance, for all assertions A and B, T (A, tp) = ⊤ iff T (¬A, tp) = ⊥; T (A ∧ B, tp) = ⊤ |= T (A, tp) = ⊤ etc. Hence, we have an integrated formalism combing logic, probability and time points in assertional logic. 7 Discussion, Related Work and Conclusion In this paper, we argue that, for the purpose of knowledge representation, classical firstorder logic has some critical issues, including simplicity, flexibility, expressivity and extensibility. To address these issues, we propose assertional logic instead, in which the syntax of an application domain is captured by individuals (i.e., objects in the domain), concepts (i.e., groups of objects sharing something in common) and operators (i.e., 10 connections and relationships among objects), and knowledge in the domain is simply captured by equality assertions of the form a = b, where a and b are terms. In assertional logic, without redefining the semantics, one can extend a current system with new syntactic objects by definitions, which are special kinds of knowledge (i.e., assertions). Once defined, these syntactic objects can be used to define more. This can be done for assertional logic itself. We extend the primitive form of assertional logic with multi-assertions and nested assertions as well as logic connectives and quantifiers. We further consider how to extend assertional logic with other important AI building blocks. The key point is that, when one wants to integrate a new building block in assertional logic, she only needs to formalize it as syntactic objects (including individuals, concepts and operators) and defines its interactions with the basic form of assertions (i.e., a = b). Then, the interactions between this building block and others will be automatically established since all complicated assertions can essentially be reduced into the basic form. As a case study, we briefly discuss how to incorporate probability and time points in this paper. Of course, assertional logic is deeply rooted in first-order logic. Individuals, concepts and operators are analogous to constants, unary predicates and functions respectively, and assertions are originated from equality atoms. Nevertheless, they differ from many essential aspects. Firstly, individuals can be high-order objects, e.g., concepts and assertions, so are concepts and operators. Secondly, assertional logic is naturally many-sorted, that is, the domain of an operator can be a tuple of many different concepts including high-order ones. Thirdly, concepts play a central role in assertional logic, which is natural for human knowledge representation. While concepts can be formalized as unary predicates in FOL, they are not specifically emphasized. Fourthly, in assertional logic, all kinds of knowledge are uniformly formalized in the same form of equality assertions. As shown in Section 5, complicated logic sentences are defined as equality assertions as well by embedding connectives and quantifiers as operators over assertions. Fifthly, following the above, although connectives, quantifiers and nesting can be defined in assertional logic, they are not considered as primitive constructs. In this sense, they will only be used on demand when necessary. We argue that this is an important reason that makes assertional logic simpler than FOL. Sixthly, in assertional logic, the simple form of a = b is expressive as a and b can be high-order constructs and can be inherently related within the rich syntactic structure. In contrast, equality atoms in FOL do not have this power. Last but not least, assertional logic directly embraces extensibility within its own framework by syntactic definitions. For instance, to define quantifiers, assertional logic only needs two lines (see Equations 8 and 9) without redefining a whole new semantics, which is much simpler than FOL. Assertional logic is also inspired by many approaches in symbolic AI. Traditionally in FOL, there is a strict hierarchy from the term level to the formula level. To some extent, this is broken in situation calculus [15, 16] and game description language [21] that have to quantify over situations, actions and fluents and to directly talk about whether a fluent holds in a particular situation by a meta-predicate Hold. Assertional logic goes much further by completely demolishing the distinction and hierarchy between term level, predicate level and formula level. In assertional logic, one can flexibly use, e.g., atoms and predicates in the scope of a function as long as they match its domain definition. Also, one can quantify over any well-defined concepts, 11 including a concept of assertions. This makes assertional logic even more expressive than high-order logic that cannot quantifier over formulas. Another inspiration comes from the family of description logics [2], where the terminologies individuals and concepts are borrowed from. The family of description logics allows a certain level of extensibility. By interpreting individuals, concepts and roles as domain elements, unary predicates and binary predicates respectively, one can extend the basic description logics with more building blocks (e.g., nominal, number restrictions, inverse and transitive roles etc.) based on the same foundational semantics. Also, one can freely assemble those building blocks into different fragments of description logics such as ALC, SHIQ, SHION and so on. However, many important AI building blocks, e.g., actions, probability, time, rules, etc. are still difficult to be incorporated by this method. Some interesting pioneering work have been done to consider more extensibility in description logics [3, 5, 9, 14]. Nevertheless, they differ from assertional logic that embraces extensibility at a syntactic level instead of a semantic one. This paper is only concerned with the representation task and the definition task. We leave the reasoning task to our future work. Certainly, complete reasoning in assertional logic is undecidable as FOL can be embedded in it. Traditionally, the way to address this issue is to find decidable fragments. Nevertheless, we shall propose an alternative approach that focuses on efficient but not necessarily complete reasoning. We have developed such an approach, in which the flexibility and extensibility of assertional logic play a critical role. We shall present this in another paper. Nevertheless, we argue that representation and definition are worth study on their own merits. Such successful stories include entity-relationship diagram, semantic network and many more. Besides, extending assertional logic with some important AI building blocks, e.g., actions and their effects, is indeed challenging and worth pursuing. Acknowledgement The author gratefully acknowledges Prof. Fangzhen Lin’s comments on a first draft of this paper. References [1] James F. Allen. Maintaining knowledge about temporal intervals. Commun. ACM, 26(11):832–843, November 1983. [2] Franz Baader, Diego Calvanese, Deborah L. McGuinness, Daniele Nardi, and Peter F. Patel-Schneider, editors. The Description Logic Handbook: Theory, Implementation, and Applications. Cambridge University Press, New York, NY, USA, 2003. [3] Franz Baader and Philipp Hanschke. A scheme for integrating concrete domains into concept languages. In Proceedings of the 12th International Joint Conference 12 on Artificial Intelligence - Volume 1, IJCAI’91, pages 452–457, San Francisco, CA, USA, 1991. Morgan Kaufmann Publishers Inc. [4] Fahiem Bacchus. Representing and Reasoning with Probabilistic Knowledge: A Logical Approach to Probabilities. MIT Press, Cambridge, MA, USA, 1990. [5] Alexander Borgida. Extensible knowledge representation: the case of description reasoners. J. Artif. Intell. Res. (JAIR), 10:399–434, 1999. [6] Ronald J. Brachman and Hector J. Levesque. Knowledge Representation and Reasoning. Elsevier, 2004. [7] Edmund M. Clarke and E. Allen Emerson. Design and synthesis of synchronization skeletons using branching-time temporal logic. In Logic of Programs, Workshop, pages 52–71, London, UK, UK, 1982. Springer-Verlag. [8] Haim Gaifman. Concerning measures in first order calculi. Israel J. Math., 2:1– 18, 1964. [9] Giuseppe De Giacomo, Maurizio Lenzerini, and Riccardo Rosati. Higher-order description logics for domain metamodeling. In Proceedings of the Twenty-Fifth AAAI Conference on Artificial Intelligence, AAAI’11, pages 183–188. AAAI Press, 2011. [10] Theodore Hailperin. Probability logic. Notre Dame J. Formal Logic, 25:198–212, 1984. [11] Paul Halmos. Naive Set Theory. Van Nostrand, 1960. Reprinted by SpringerVerlag, Undergraduate Texts in Mathematics, 1974. [12] Joseph Y. Halpern. An analysis of first-order logics of probability. Artif. Intell., 46(3):311–350, 1990. [13] Thomas Keller, Patrick Eyerich, and Bernhard Nebel. Task planning for an autonomous service robot. In Proceedings of the 33rd Annual German Conference on Advances in Artificial Intelligence, KI’10, pages 358–365, Berlin, Heidelberg, 2010. Springer-Verlag. [14] O. Kutz, C. Lutz, F. Wolter, and M. Zakharyaschev. E-connections of abstract description systems. Artificial Intelligence, 156(1):1–73, 2004. [15] Hector Levesque, Fiora Pirri, and Ray Reiter. Foundations for the situation calculus. Electronic Transactions on Artificial Intelligence, Vol. 2(1998), Issue 3-4:pp. 159–178, 1991. [16] Fangzhen Lin. Situation calculus. In Handbook of Knowledge Representation, pages 649–669. 2008. [17] Brian Christopher Milch. Probabilistic Models with Unknown Objects. PhD thesis, Berkeley, CA, USA, 2006. AAI3253991. 13 [18] Judea Pearl. Probabilistic Reasoning in Intelligent Systems: Networks of Plausible Inference. Morgan Kaufmann Publishers Inc., San Francisco, CA, USA, 1988. [19] Amir Pnueli. The temporal logic of programs. In Proceedings of the 18th Annual Symposium on Foundations of Computer Science, SFCS ’77, pages 46–57, Washington, DC, USA, 1977. IEEE Computer Society. [20] Matthew Richardson and Pedro Domingos. Markov logic networks. Machine learning, 62(1-2):107–136, 2006. [21] Michael Thielscher. GDL-III: A proposal to extend the game description language to general epistemic games. In ECAI 2016 - 22nd European Conference on Artificial Intelligence, 29 August-2 September 2016, The Hague, The Netherlands - Including Prestigious Applications of Artificial Intelligence (PAIS 2016), pages 1630–1631, 2016. [22] Frank van Harmelen, Vladimir Lifschitz, and Bruce W. Porter, editors. Handbook of Knowledge Representation, volume 3 of Foundations of Artificial Intelligence. Elsevier, 2008. 14
2cs.AI
Two Distinct Seasonally Fractionally Differenced Periodic Processes arXiv:1803.03154v1 [math.ST] 8 Mar 2018 1 Ahmed BENSALMA 1,2 ENSSEA Pôle universitaire Koléa, Tipaza (ex: INPS 11 Doudou mokhtar Benaknoun) Algeria) 2 Faculty of Mathematics, University of Science and Technology Houari Boumediene, Algeria Abstract This article is devoted to study the effects of the S-periodical fractional differencing filter (1 − LS )Dt . To put this effect in evidence, we have derived the periodic auto-covariance functions of two distinct univariate seasonally fractionally differenced periodic models. A multivariate representation of periodically correlated process is exploited to provide the exact and approximated expression auto-covariance of each models. The distinction between the models is clearly obvious through the expression of periodic auto-covariance function. Besides producing different auto-covariance functions, the two models differ in their implications. In the first model, the seasons of the multivariate series are separately fractionally integrated. In the second model, however, the seasons for the univariate series are fractionally co-integrated. On the simulated sample, for each models, with the same parameters, the empirical periodic autocovariance are calculated and graphically represented for illustrating the results and support the comparison between the two models. 1 Introduction Since their introduction by Gladyshev (1961, 1963) much attention has been given to periodically correlated processes. The interest, for such processes is due to their potential use in modeling of cyclical phenomena appearing in hydrology, climatology and in econometrics. Following pioneer work of Gladyshev (1963), an important part of the literature has been devoted to the periodically correlated discrete time processes. A discrete time process is periodically correlated, if there is a non zero integer S such that E (Xt+S ) = E (Xt ) and Cov(Xt1 +S , Xt2 +S ) = Cov(Xt1 , Xt2 ). A review of the periodically correlated discrete time processes is proposed in Lund and Basawa (1999), Bentarzi and Hallin (1994) give invertibility conditions for periodic moving average.. A large part of the literature on the subject is devoted to the periodic ARM A (P ARM A) models, which have the following representation: Xt − pt X i=0 φi,t Xt−i = qt X θj,t ut−j , t = 0, ±1, ±2, ...., j=0 1 where ut is a zero-mean white noise with variance σ 2t . Among searchers who were interested with the periodic autoregressifs processes not periodically stationary, we cite Boswijk and Franses (1995) which studied the problem of the presence of a unit root in a periodic autoregression model of order p (P AR(p)) and Boswijk, Franses and Haldrup (1997) which studied the presence of multiple unit roots in a periodic autoregression model of order p. All work cited above were made under the assumption that the processes are periodically integrated of order zero (P I(0)), integrated of order one (I(1)) or periodically integrated of order one ((P I(1)). However currently, it well-known that in the scientific fields mentioned above (hydrology, meteorology, econometrics) much of sets of data that have a certain periodicity; have also a long range dependence (or long memory). Such phenomena can be modeled by stationary processes. The stationary processes with seasonal long memory are well know (see for example Gray, Zhang and Woodward (1989): Garma models; Purter-Hudak (1990):Seasonal ARF IM A; Oppenheim, G. and al (2000); ould Haye and al (2003) for references, properties and simulations). Another alternative, to take account of certain periodic phenomena with long memory is to consider nonstationary models (but periodically stationary) such as the periodically correlated processes with long memory. The periodically correlated processes, within the meaning of Gladyshev (1963), with long memory did not receive much attention on behalf of the statisticians and the probabilists. Among works associating periodicity within the meaning of Gladyshev (1963) and the presence of long memory we cite, Hui and Li (1995), Franses and Ooms (1997), Ooms and Franses (2001). For modelling of the Hong Kong United Christian Hospital attendance series, Hui and Li (1995) propose a 2-periodic correlated process, (1 − L)dt Yt = ut , (1.1) where {ut , t ∈ Z} is a zero mean white noise with variance σ2t , and dt the 2-periodic fractional parameter. The empirical series yt concerns seventy five (approximately one and half years) data on the average number of people entering the emergency unit on weekday and weekend. On the other hand, in order to analyzes the long-memory properties in the conditional mean of the quarterly inflation rate in the United Kingdom Franses and Ooms (1997) propose a 4-periodic correlated process, Yt = (1 − L)−dt ut , (1.2) where {ut , t ∈ Z} is defined as above and dt is the 4-periodic fractional parameter. Finally, for the monthly empirical data, which concern the log transformed data of the monthly mean river flow in cubic feet per second, Ooms and Franses (2001) propose to use the seasonal periodic fractional operator defined, in simple framework as follows, Yt = (1 − LS )−Dt ut , S = 12 (1.3) where {ut , t ∈ Z} is defined as above and S = 12. The main difference between, the one hand, the models (1.1) and (1.2) and the other hand, the model (1.3), is in the unit of lag to which the 2 fractional difference operator is applied. In the models (1.1) and (1.2) the fractional difference operator was applied to weekly and quarterly lags, respectively, corresponding to the basic time interval of the time series analyzed. In the model (1.3) the fractional difference operator was applied to yearly, which is the seasonal lag of the time series analyzed. Indeed, by using a binomial expansion for the difference operator (1−L)dt , (1−L)−dt , (1−LS )−dt we can rewrite, respectively, the models (1.1), (1.2) and (1.3) as the following, ∞ X j=0 Γ (j − dt ) Yt−j = ut , Γ (j + 1) Γ (−dt ) Yt = ∞ X Γ (j + dt ) ut−j , Γ (j + 1) Γ (dt ) (1.5) Γ (j + Dt ) ut−Sj . Γ (j + 1) Γ (Dt ) (1.6) j=0 Yt = ∞ X j=0 where Γ (z) = (1.4)  R +∞ 0 sz−1 e−z ds, ∞ if z > 0 if z = 0, if z < 0, Γ (z) is defined in terms of the above expressions and the recurrence formula zΓ (z) = Γ (z + 1). While, the invertibility and stationarity conditions of the model (1.3) are known (see Ooms and Franses 2001), apart when dt = d is a constant, nothing is clear about the models (1.1) and (1.2). More precisely, no thing is clear about the stationarity conditions for the model (1.1), because his infinite moving average representation is unknown and no thing is clear about the invertibility conditions for the model (1.2), because his infinite autoregressive representation is unknown. The model (1.3) is invertible and stationary if −0.5 < Dt < 0.5 and it is easy to show in this case that the infinite autoregressive representation of the process yt is given by ∞ X j=0 Γ (j − Dt ) Yt−Sj = ut . Γ (j + 1) Γ (−Dt ) For the model (1.4), at any case, in general, we have, Yt 6= ∞ X j=0 Γ (j + dt ) ut−j , Γ (j + 1) Γ (dt ) and for the model (1.5), at any case, in general, we have, ∞ X j=0 Γ (j − dt ) Yt−j 6= ut . Γ (j + 1) Γ (−dt ) For the particular periodic ARF IM A(0, dt , 0), namely (1 − L)dt yt = ut , ut ∼ i.i.d(0, σ 2t ), the infinite moving average representation is unknown. In this paper, we give the closed form of this representation. It 3 is important to known such representation in order to deduce the stationarity condition of this type of model. Unfortunately, the closed form obtained is not easy to handle due to her parametric complexity (see Appendix). Since the P ARF IM A(p, dt , q) is not easy to handle. The work that we present in this article is concerned only on the Seasonal periodical fractional operator, namely (1−LS )Dt . More Precisely, in this work we are interested in certain theoretical properties of the SP ARF IM A(p, 0, 0)(0, Dt , 0)S (Seasonal periodic ARF IM A). The study of the theoretical properties of this class of models remains to be made; because among works which evoke this class, only one exists; that is of Franses and Ooms (2001). The work of Franses and Ooms has to consist in adjusting a SP ARF IM A(p, 0, 0)(0, Dt , 0)S to a set of real data. Precisely the model considered by Ooms and Franses is defined as follows: φt (L) (Xt − µt ) = η t , t ∈ N∗ , with η t = (1 − LS )−Dt ut , where µt is S-periodical constant such as µt = µt+S , φt (L) = 1 − φt,1 L − φt,2 L2 − ... − φt,p Lp . The parameters φt,i i = 1, ..., p are periodic functions in t, and η t a white noise seasonally fractionally integrated of order Dt , where Dt is S-periodical fractional parameter. The model above, if 0 ≤ Dt < 0.5, ∀t can be written as follows: (1 − LS )Dt φt (L) (Xt − µt ) = ut , t ∈ Z. (M odel(I)) There is another class of models SP ARF IM A(p, 0, 0)(0, Dt , 0)S distinct from that used by Franses and Ooms (2001); this class is defined as follows: φt (L)(1 − LS )Dt (Xt − µt ) = ut , t ∈ Z, (M odel(II)) where µt , φt (L), Dt are defined like above. These two classes coincide, only if Dt = D, ∀t, since, generally, the composition of φt (L) and (1 − LS )Dt is not necessarily commutative. To convince, it is sufficient to notice that the S-variate representation of the model (I) is a V ARF I model (vector autoregressive model, driven by fractionally integrated innovation) whereas the multivariate writing of the model (II) is a F IV AR model (fractionally integrated vector autoregression) (see Rebecca Sela and Clifford Mr. Hurvich (2008)). These two distinct classes, generalize the univariate model ARF IM A, the first is closely related to the cointegrated processes, whereas the second is closely related to the integrated processes. Consequently, in our case, the model (I) is closely related to the cointegrated season and the model (II) is closely related to the integrated season. In order to distinguish between the model (I) and (II), we note them, respectively as the following: P AR(p) − P SF I(Dt ) and P SF I(Dt ) − P AR(p). The rest of this paper is organized as follows: section 2 is devoted to defined two class of processes; the periodic autoregressive of order p process with periodic seasonal fractional integrated of order Dt innovation, namely P AR(p) − P SF I(Dt ) and the periodic seasonal fractional integrated process, periodic autoregressive of order p, namely P SF I(Dt ) − P AR(p). In section 3, for each model defined in section 2, 4 we provide the exact and approximated expression of the periodic autocovariances function. In the section 4, on the simulated samples for each model, with the same parameters for the model (I) and (II), the empirical periodic autocovariances are calculated and graphically represented for illustrating the theoretical results and comparison between the two models. Without restricting the generality, we suppose that all processes defined below have zero mean. 2 Representation and notation 2.1 S-periodical seasonally fractionally integrated, periodic autoregressive process (P SF I(Dt)−P AR(p)) A periodically correlated process {Yt , t ∈ Z} is said S-periodical seasonally fractionally integrated of order Dt , periodic autoregressive of order p; if it has the following representation: Φt (L)(1 − LS )Dt Yt = ut , t ∈ Z, (2.1) where {ut , t ∈ Z} is a zero mean white noise with variance σ2t and (1 − LS )Dt are defined like above. φt (L) = 1 − φt,1 L − φt,2 L2 − ... − φt,p Lp where φt,1 , ..., φt,p are S-periodical parameters. Letting Yτ = (Y1,τ , ..., Ys,τ , ..., YS,τ )′ and uτ = (u1,τ , ..., us,τ , ..., uS,τ )′ with Ys,τ = Ys+Sτ and us,τ = us+Sτ then the process (2.1) can be rewritten in the S variate form D Φ0 ∇S (L)Y τ − P X D Φi ∇S (L)Y τ −i = uτ , (2.2) i=1   + 1, with [x] denotes the smallest integer than or equal where P = p+1 S D to x, ∇S (L) is defined like above. The autoregressive coefficient matrices are given by  1 s = j,  0 s < j, (Φ0 )s,j =  −φs−j,j s > j, and (Φi )s,j = φiS+s−j,s , s, j = 1, ..., S and 1 ≤ i ≤ P. The periodic stationarity condition of the model (2.2) is the same as the stationarity condition of it equivalent fractional integrated vector autoregression, namely F IV AR, (Rebecca Sela and Clifford Hurvich (2008)) representation (2.2), which means that the roots of the determinantal equation ! P X P −1 P−i det IS z − Φ0 Φi z = 0, i=1 are less than 1 in absolute value (Hannan (1970), Fuller (1976)) and 0 ≤ Ds < 0.5, for all s = 1, ..., S, 5 (Hosking (1981)). If the process (2.2) is stationary, then it has an infinite moving average representation given by D Y τ = ∇S (L)−1 Φ (L)−1 uτ , ! ! ∞ ∞ P P j j Ψj L Πj L uτ , = j=0 = ∞ P j=0 = ∞ P j=0  j P  Ψk Πj−k uτ −j , k=0 (2.3) Cj uτ −j , j=0  D where ∇S (L) = diag (1 − L)D1 , · · · , (1 − L)Ds , · · · , (1 − L)DS , Φ (L) = ∞ P Φ0 − Φ1 L − ... − ΦP LP and [Φ (L)]−1 = Π(L) = Πj Lj , with (Πj )j∈N j=0 is sequence of absolutely summable matrix i.e. ∞ P |Πj (l, k)| < ∞, ∀l ∈ j=0 {1, ..., S} and ∀k ∈ {1, ..., S}. Cj = j P Ψk Πj−k with Ψj defined like k=0 above. The ith element of Y τ , Yi,τ is written as follows  Yi,τ = (1 − LS )Di Φ (L)−1 i uτ (2.4)  where Φ (L)−1 i is the ith rows of Φ (L)−1 . From (2.4) we see clearly that, Yi,τ is integrated of order Di , i = 1, ..., S. 2.2 Periodic autoregressive, S-periodical seasonally fractionally integrated process (P AR(p)−P SF I(Dt)) A periodically correlated process {Zt , t ∈ Z} is said, periodic autoregressive of order p; S-periodical seasonally fractionally integrated of order Dt if it has the following representation: Φt (L)Zt = (1 − LS )−Dt ut , t ∈ Z, (2.5) LS )Dt where {ut , t ∈ Z}, (1 − and φt (L) are defined like above. Letting Zτ = (Z1,τ , ..., Zs,τ , ..., ZS,τ )′ and uτ = (u1,τ , ..., us,τ , ..., uS,τ )′ with Zs,τ = Zs+Sτ and us,τ = us+Sτ then the process (2.5) can be rewritten in the S variate form Φ0 Zτ − P X −D Φi Zτ −i = ∇S (L)uτ , (2.6) i=1   + 1, with [x] denotes the smallest integer than or equal where P = p+1 S (L), Φ to x, ∇−D 0 and Φi , i = 1, ..., P are defined like above. The S model (2.6) is vector autoregression with fractional integrated innovation, namely V ARF I (Rebecca Sela and Clifford Hurvich (2008)). The 6 periodic stationarity condition of the model (2.6) is the same than the model (2.2). The ith relation of (2.6) is written (Φ(L))i Zτ = (1 − LS )−Di ui,τ where Φ (L) = Φ0 −Φ1 L−...−ΦP LP and (Φ(L))i is the ith rows of Φ (L), this means that the ith relation of (2.6) is integrated of order Di . Among the S relations of (2.6), those which are integrated of order lower than max Di are relations of cointegration. If all the values Di are different, 1≤i≤S then we can say that there are (S − 1) relations of cointegrations. If D1 = .... = DS it does not exist any relation of cointegration. Generally, when we have D1 < D2 < ...DS−R−1 < (DS−R = DS−R+1 = ... = DS ) that means that there are (S − R − 1) relations of cointegrations between the S seasons. If the model (2.6) is stationary, it has an infinite moving average representation given by −D Zτ = Φ (L)−1 ∇S (L)uτ ! ! ∞ ∞ P P j j Πj L Ψj L uτ = j=0 = ∞ P j=0 = ∞ P j=0  j P Πk Ψj−k k=0  uτ (2.7) Hj uτ −j , j=0 where Hj = j P Πk Ψj−k . The ith element of Zτ , Zi,τ is written as follows k=0 Zi,τ = S X s=1 −1  Φ(L)−1  i,s (1 − L)−DS us,τ , where Φ(L) is (i, s) th element of the matrix Φ(L)−1 . Zi,τ is i,s written like linear combination of S independent processes, respectively, integrated of order D1 , ..., Ds , ..., DS ; consequently Zi,τ is integrated of order max Di (Granger 1986). 1≤i≤S 3 Periodic autocovariances This section deals with the determination of theoretical periodic autocovariances of periodically correlated processes defined in precedent section. 3.1 P SF I(Dt) − P AR(p) periodic autocovariances Theorem 1 Given the stationary S-variate process Yτ defined by (2.2), we have h i h i (3.1) ΓYτ (h) ∼ ∆ hD−0.5 A∆ hD−0.5 , as h → ∞ where the (i, k) th element of S × S matrix A is: Γ (1 − Di − Dk ) ′ Π ΩΠk Γ (Dk ) Γ (1 − Dk ) i 7 with Π′i is the ith rows of the matrix Π and Ω = diag(σ21 , ..., σ 2s , ..., σ2S ). Proof. See Ching-Fan Chung (2002). Corollary 2 Given the process Yt defined in (2.1), we have:   Γ(1 − Ds − Ds+ν−S∗δ ) γ (s) (j) ∼ (h+δ)Ds +Ds+ν−S∗δ −1 Π′s ΩΠs+ν−S∗δ , Γ(Ds+ν−S∗δ )Γ(1 − Ds+ν−S∗δ ) (3.2) where h and ν are integers such as j = h × S + ν, and j > 0, i.e. j ≡ ν [h] with 0 ≤ ν < S − 1 and δ is defined as follows:  δ = 0, if 1 ≤ s + ν < S, δ = 1, if S + 1 ≤ s + ν ≤ 2S − 1, Π′s is the sth rows of the matrix Π and Ω = diag(σ21 , ..., σ 2s , ..., σ2S ). Proof. The proof of the corollary, rises directly from theorem 1. From theorem 1, we have : (i,k) ΓY τ (h) ∼ h(Di +Dk −1) Γ(1 − Di − Dk ) ′ Πi ΩΠk , Γ(Dk )Γ(1 − Dk ) (3.3) (i,k) where ΓY τ (h) = Cov(Yi,τ , Yk,τ +h ) are the (i, k) th element of the covariance matrix of ΓYτ (h). Moreover, it is known that γ (s) (j) = Cov(YSτ +s , YSτ +s+j ) = Cov(Ys,τ , Ys+j,τ ). (3.4) Putting j = Sh + ν with 0 ≤ ν < S − 1, by replacing j by Sh + ν in (3.4), we have γ (s) (j) = Cov(Ys,τ , Ys+ν,τ +h ). (3.5) According to the value of (s + ν), the equality (3.5), becomes ( (s,s+ν) ΓY τ (h), if 1 ≤ s + ν < S, (s) γ (j) = (s,s+ν−S) (h + 1), if (S + 1) ≤ s + ν ≤ 2S − 1. ΓY τ By using the approximation (3.3), we have:  Γ(1−Ds −Ds+ν ) Π′s ΩΠs+ν , h(Ds +Ds+ν −1) Γ(Ds+ν )Γ(1−D   s+ν )    if 1 ≤ s + ν < S,  γ (s) (j) ∼  Γ(1−Ds −Ds+ν−S∗ν )   (h + 1)(Ds +Ds+ν−S∗δ −1) Γ(Ds+ν )Γ(1−D Π′s ΩΠs+ν−S∗δ ,   s+ν−S∗δ )  if (S + 1) ≤ s + ν ≤ 2S − 1, where Π′s is the sth rows of the matrix Π and Ω = diag(σ21 , ..., σ2s , ..., σ 2S ). From corollary 1; emerges several remarks, the most important are Remark 3 : The periodic autocovariances γ (s) (j) s = 1, ..., S taper off at different hyperbolic rates. If we suppose that min Di = D1 and max Di = 1≤i≤S 1≤i≤S DS (this does not restrict the generality) than γ (1) (j), with j ≡ 0[S] has the more speedy taper off hyperbolic rate (∝ h2D1 −1 ) and γ (S) (j), with j ≡ 0[S] has the lowest taper off hyperbolic rate (∝ h2DS −1 ). 8 This remark will be largely clarified graphically (see section 4, couples of figures (1a, 1b) to (5a, 5b). The advantage which offer by the periodic process is the possibility of representing the graph of the autocovariances in various manners. The autocovariances functions γ (s) (j), s = 1, ..., S can be represented in the same plot (hui ad Li 1995), or separately. For j = Sh + ν, with 0 ≤ ν < S − 1 we can also represented γ (s) (Sh + ν), ν = 0, ..., S − 1 in the same plot. These are the three kinds of graphs which we will use in the next section. 3.2 P AR(p) − P SF I(Dt) periodic autocovariances Before stating the main result of this section, we need some further notation. Let Dmax = max Ds and define Before stating the main result of 1≤s≤S this section, we need some further notation. Let Dmax = max Ds and de1≤s≤S fine F = {1, ..., s, ..., S}, F1 = {i, i ∈ F / Di = Dmax }, with |F1 | = R and F2 = {i, i ∈ F / Di < Dmax }, with |F2 | = S − R. We have F1 ∩ F2 = ∅ and F1 ∪ F2 = F . Theorem 4 Given the stationary S-variate process Zτ defined by (2.6), we have ΓZτ (j) ∼ j 2Dmax −1 A, as j → ∞ (3.6) where the (i, k) th element of S × S matrix A, is: A(l, m) = X Γ (1 − 2Dmax ) Π(l, i)Π(m, i)σ2i Γ (Dmax ) Γ (1 − Dmax ) i∈F 1 where Π = [Φ (1)]−1 = ∞ P Πj and Π(l, i) is (l, i) th element of Π. j=0 Proof. See Ching-Fan Chung (2002). The corollary below, gives the approximated expression, as j → ∞, of the periodic autocovariances function, γ (s) (j) = cov(ZSτ +s , ZSτ +s+j ) of the process Zt , defined in (2.5). Corollary 5 Given the process Zt defined in (2.5), we have,  X Γ(1 − 2Dmax ) γ (s) (j) ∼ (h+δ)2Dmax −1 Π(s, i)Π(s+ν−Sδ, i)σ2i Γ(Dmax )Γ(1 − Dmax ) i∈F 1 (3.7) where h and ν are integers such as j = hS + ν, and j > 0, i.e. j ≡ ν [h] with 0 ≤ ν < S − 1, and δ is defined as follows:  δ = 0, if 1 ≤ s + ν < S δ = 1, if S + 1 ≤ s + ν ≤ 2S − 1 and Π (i, s) is the (i, s) th element of the matrix Π = [Φ (1)]−1 = ∞ P Πj . j=0 Proof. The proof of the corollary, rises directly from theorem 3. From theorem 3, we have : X Γ (1 − 2Dmax ) (l,k) ΓZ (j) ∼ j 2Dmax −1 Π(l, i)Π(k, i)σ 2i (3.8) τ Γ (Dmax ) Γ (1 − Dmax ) i∈F 1 9 (l,k) where ΓZτ (j) = Cov(Zl,τ , Zk,τ +j ) is the (i, k) th element of the covariance matrix ΓZτ (j). Moreover, it is known that γ (s) (j) = Cov(ZSτ +s , ZSτ +s+j ) = Cov(Zs,τ , Zs+j,τ ) (3.9) Putting j = Sh + ν with 0 ≤ ν < S − 1, by replacing j by Sh + ν in (3.9), we have γ (s) (j) = Cov(Zs,τ , Zs+ν,τ +h ) (3.10) According to the value of (s + ν), the equality (3.10), becomes ( (s,s+ν) Γ Zτ (h), if 1 ≤ s + ν < S (s) γ (j) = (s,s+ν−S) (h + 1), if (S + 1) ≤ s + ν ≤ 2S − 1 Γ Zτ By using the approximation (3.8), we have,  P 2 max )  h(2Dmax −1) Γ(DΓ(1−2D  i∈F1 Π(s, i)Π(s + ν, i)σ i , max )Γ(1−Dmax )    if 1 ≤ s + ν < S    (s) γ (j) ∼   P  Γ(1−2Dmax ) 2  (h + 1)(2Dmax −1)   i∈F1 Π(s, i)Π(s + ν − S, i)σ i , Γ(Dmax )Γ(1−Dmax )   if (S + 1) ≤ s + ν ≤ 2S − 1 Remark 6 If D1 = D2 = ... = DS the periodic autocovariances γ (s) (j) of the model (2.2) coincide with those of model (2.8) Remark 7 From corollary 4; we see that the periodic autocovariances γ (s) (j) s = 1, ..., S taper off at the same hyperbolic rates. 4 Simulation In this section we compare the finite sample of the periodic autocovariances γ (s) (j) s = 1, ..., 4 of the models (1.3), (2.1) and (2.5) for different value of D = (D1 , D2 , D3 , D4 ). The sample size for each model is T = 1000. The model we consider for the simulation study are • Model A (1 − L4 )Dt Xt = εt which has the following S-variate representation  (1 − L)D1 0 0 0 D2  0 (1 − L) 0 0   0 0 (1 − L)D3 0 0 0 0 (1 − L)D4 10   X = u τ  τ • Model B Φt (L)(1 − L4 )Dt Yt = ut which has the following S-variate representation   (1 − L)D1 0 1 0 0 −0.7   −0.8 0 (1 − L)D2 1 0 0    0 −0.6 1 0  0 0 0 0 −0.4 1 0 0 • Model C 0 0 (1 − L)D3 0 (1 − L4 )Dt Φt (L)Zt = ut which has the following S-variate representation  (1 − L)D1 0 0 0 D2  0 (1 − L) 0 0   0 0 (1 − L)D3 0 0 0 0 (1 − L)D4  1   −0.8   0 0 0 1 −0.6 0 where uτ are i.i.d N (0, Ω) with Ω = diag(1, 1, 1, 1). 4.1  0  0 Y = u τ  τ 0 D4 (1 − L) Simulated Autocovariances of model A In figures 1 to 4, we represent the empirical autocovariances function γ (s) (j) s = 1, ..., 4 in the same plot, for the model A for different value of 11 0 0 1 −0.4  −0.7 0  Z = u τ 0  τ 1 D = (D1 , D2 , D3 , D4 ). Figure 1: The periodic autocovariances γ b(s) (j), s = 1, ..., 4, for lag j = 1 to 25 with D = (0.1, 0.2, 0.3, 0.4) for model A Figure 2: The periodic autocovariances γ b(s) (j), s = 1, ..., 4, for lag j = 1 to 25 with D = (0.1, 0.2, 0.4, 0.4) for model A Figure 3: The periodic autocovariances γ b(s) (j), s = 1, ..., 4, for lag j = 1 to 25 with D = (0.1, 0.4, 0.4, 0.4) for model A 12 Figure 4: The periodic autocovariances γ b(s) (j), s = 1, ..., 4, for lag j = 1 to 25 with D = (0.4, 0.4, 0.4, 0.4) for model A The figures 1, illustrate well the theoretical result of theorem 1 and also states that the periodicity is caused by the fractional parameters D = (0.1, 0.2, 0.3, 0.4) (the auto-covariances γ (s) (j) s = 1, ..., 4 for lag j ≡ 0[4] taper off, respectively, at hyperbolic rates, according the value of D. 4.2 Simulated autocovariances of model B For D = (0.1, 0.2, 0.3, 0.4), the figures (1a) and (1b) represents the empirical autocovariances b γ (s) (j) s = 1, ..., 4, respectively, in spike graph and in line graph of the model B. The couples of figures (2a, 2b) to (5a, 5b) represents the empirical autocovariances γ b(1) (4h+ν), ν = 0, ..., 3 to b γ (4) (4h+ν), ν = 0, ..., 3, for h = 1 to 25, respectively, in spike graph and line graph, for the model B. Figure 1a Figure 1b (s) The periodic autocovariances b γ (j), s = 1, ..., 4, for lag j = 1 to 100, of model B, with D = (0.1, 0.2, 0.3, 0.4), taper off at different hyperbolic rates figure 2a figure 2b The figure 2a and 2b represents, respectively, the speedy and the lowest taper off hyperbolic rate of autocovariances of model (B) 13 Figure 2a Figure 2b (1) The periodic autocovariances γ (4h + ν), ν = 0, ..., 3, for fixed h (h = 1 to 25) have tendency to increase according with the value of D1 + D1+ν−4δ Figure 3a Figure 3b (2) The periodic autocovariances γ b (4h + ν), ν = 0, ..., 3, for fixed h (h = 1 to 25) have tendency to increase according with the value of D2 + D2+ν−4δ Figure 4a Figure 4b The periodic autocovariances γ (3) (4h + ν), ν = 0, ..., 3, for fixed h (h = 1 to 24) have tendency to increase according with the value of D3 + D3+ν−4δ 14 figure 5a figure 5b (4) The periodic autocovariances γ b (4h + ν), ν = 0, ..., 3, for fixed h (h = 1 to 25) have tendency to increase according with the value of D4 + D4+ν−4δ 4.3 Simulated autocovariances of model C The figures (1c) and (2c) represents the empirical autocovariances γ b(s) (j) s = 1, ..., 4, respectively, in spike graph and in line graph of the model C. The difference between the periodic autocovariances γ (s) (j), s = 1, ..., 4, for lag j = 1 to 100, decreases at the same manner, mainly because they taper off at the same hyperbolic rates Figure 1c Figure 2c The periodic autocovariances γ b(s) (j), s = 1, ..., 4, for lag j = 1 to 100 and D = (0.1, 0.2, 0.4, 0.4), taper off at the same hyperbolic rates 4.4 Simulated comparison between autocovariances of model B and C In order to compare, both autocovariances γ b(s) (j), s = 1, ..., 4 for model (B) and model (C) we represent them graphically in the same scale for different value of D = (D1 , D2 , D3 , D4 ) (see below). 15 Figure 5: The periodic autocovariances b γ (s) (j), s = 1, ..., 4, for lag j = 1 to 100, D = (0.1, 0.2, 0.3, 0.4) for respectively, model (B) and model (C) Figure 6: The periodic autocovariances b γ (s) (j), s = 1, ..., 4, for lag j = 1 to 100, D = (0.1, 0.2, 0.4, 0.4) for respectively, model (B) and model (C) Figure 7: The periodic autocovariances b γ (s) (j), s = 1, ..., 4, for lag j = 1 to 100, D = (0.1, 0.4, 0.4, 0.4) for, respectively, model (B) and model (C) 16 Figure 8: The periodic autocovariances b γ (s) (j), s = 1, ..., 4, for lag j = 1 to 100, D = (0.4, 0.4, 0.4, 0.4) for, respectively, model (B) and model (C) In figures 5 to 8 we plot the autocovariance sequences b γ (s) (j), s = 1, ..., 4 of model B and model C in the same scale and with identical parameters (Φ(L), Ω, and D). The autocovariances sequences differ dramatically. Rebecca Sela and Clifford Hurvich (2008) presents a similar conclusion for cross-covariance sequences of bivariate F IV AR(1, D) and V ARF I(1, D) processes with the same parameters. They point out that the first model have the series integrated separately (in our case the seasons are integrated separately) and in the second there is cointegration relation between the two series (in our case there are 3 cointegrations relations between the four seasons). This fact, does not explain clearly why there is such difference between the autocovariances of model B and model C. Further more, the taper off hyperbolic rates of the autocovariances of model (C) is equal than the lowest tapper off hyperbolic rate of the autocovariances of model (B), so why the autocovariance sequences differ dramatically? The explanation is in explicit results of corollary 3.1 and corollary 3.2. Generally, in the literature of long memory models, attention is focused on the fractional parameters (which associate with hyperbolic tapper off of autocovariance) rather than on autoregressive or moving average parameters and V (εt ) included in expression of autocovariance. In the expression (3.4), the autoregressive parameters and V (εt ) appears in the following form: π′s Ωπ s+ν−S∗δ and in expression (3.6) it appears in the following form: Π(s, S)Π(s + ν − S ∗ δ, S)σ2S . From model (B) and model (C), the set, of possible values, of these two quantities are respectively:   2.131 1.8989 1.4628 1.3938  1.8989 2.6744 1.8634 1.3923    (4.1)  1.4628 1.8634 2.2734 1.2975  1.3938 1.3923 1.2975 1.6743 and  0.65398  0.52318   0.31391 0.93428 0.52318 0.41854 0.25113 0.74742 17 0.31391 0.25113 0.15068 0.4445  0.93428 0.74742   0.44845  1.3347 (4.2) It seen that all, possible values, of π ′s Ωπ s+ν−S∗δ are greater than 1 (some are greater than 2, see the diagonal of matrix (4.1)). On the other hand, all values of Π(s, S)Π(s + ν − S ∗ δ, S)σ 2S are lower than 1 (except the last value in the diagonal of matrix (4.2). 5 Conclusion For Seasonal-Periodic-ARF IM A(p, 0, 0)(0, D, 0) model, allowing the seasonal fractional parameter D to be S-periodic rather than constant we have highlighted the existence of two distinct models (see section 1, model(I) and model (II)). For these two distinct models we have established the exact and approximated expression of the periodic autocovariance. On the simulated sample, for each model, the empirical periodic autocovariance are calculated and graphically represented. It is clear, through, theoretical and simulated results that it is not easy to distinguish between these two models (the shape of the autocovariance for each model is not sufficient). If we consider the general model, namely, Seasonal-Periodic-ARF IM A(p, dt , q)(P, Dt , Q) the situation becomes more complex to handle, because the number of different models we can distinguish is more than two models. Furthermore, the non seasonal part of the general model (i.e. P ARF IM A(p, dt , q)) did not receive much attention on behalf of the statisticians and the probabilists. References [1] Peter Boswijk, H. & Franses, Philip Hans, 1995. Testing for periodic integration, Economics Letters, Elsevier, vol. 48(3-4), pages 241-248. [2] Boswijk, H. Peter & Franses, Philip Hans & Haldrup, Niels, 1997. Multiple unit roots in periodic autoregression, Journal of Econometrics, Elsevier, vol. 80(1), pages 167-193. [3] Chung, Ching-Fan. (2002). Sample Means, Sample Autocovariances, and Linear Regression of Stationary Multivariate Long Memory Processes,” Econometric Theory, 18(1), 51-78. [4] Franses, P.H. and Ooms, M. (1997). A periodic long memory model for quartely UK inflation. International Journal of Forecasting 13, 117-126. [5] Gladyshev, E. G. (1961). Periodically correlated random sequences. Soviet. Mathematics, 2. [6] Gladyshev, E. G. (1963). Periodically and almost PC random processes with continuous time parameter. Theory Probability and its Applications, 8. [7] Gray, H. L., Zhang, N.-F., and Woodward, W. (1989). On generalized fractional processes. J. Time Ser. Anal., 10:233–258. [8] Granger, C.W. J. (1980). Long Memory Relationships and the Aggregation of Dynamic Models. Journal of Econometrics, 14 227–238. 18 [9] Granger, C.W. J. (1986). Developements in the study of Cointegrated Economic Variables, Oxford Bulletin of Economics and Statistics, 48 (3), 213-228. [10] Hosking, J. R. M. (1981) Fractional differencing, Biometrica, 68,16576. [11] Hui, Y. and Li, W. (1995). On fractionally differenced periodic processes. Sankhya,Ser. B, 57(1):19–31. [12] Lund, R. B. and Basawa, I. V. (1999). Modeling and inference for periodically correlated time series. In Asymptotics, nonparametrics, and time series, volume 158 of Statist. Textbooks Monogr., pages 37–62. Dekker, New York. [13] Rebecca J. Sela & Clifford M. Hurvich, (2009). Computationally efficient methods for two multivariate fractionally integrated models, Journal of Time Series Analysis, Wiley Blackwell, vol. 30(6), pages 631-651. [14] Ooms, M. and Franses, P.H. (2001). A seasonal periodic long memory model for monthly river flows. Envoronmental Modelling and Software. Volume 16, Issue 6, pages 495-581. [15] Oppenheim, G., Ould Haye, M., and Viano, M.-C. (2000). Long memory with seasonal effects. Statist. Inf. for Stoch. Proc., 3:53–68. [16] Ould Haye, M. and Viano, M.-C. (2003). Limit theorems under seasonal longmemory. In Doukhan, Paul (ed.) et al., Theory and applications of long-range dependence. Boston, MA: Birkhuser. 101-110. [17] Porter Hudak, S. (1990). An aplication of the seasonal fractionally di erenced model to the monetary aggegrates. Journal of the American Statistical Association, 85, 338-344. 6 Appendix A Proposition: The infinite moving average representation of the process, {yt , t ∈ Z} , defined by (1.1), is given by yt = ut + ∞ P j=1 j P (−1) k k=1 P π i1 (−dt )πi2 (−dt−i1 )πi3 (−dt−i1 −i2 ) · · · π ik i1 +i2 +···+ik =j t +i1 −1) . The numwhere π 0 (−dt ) = 1 and πi1 (−dt ) = −dt (−dt +1)···(−d (i1 )! P j−1 ber terms in the sum ” i1 +i2 +···+ik =j ” is equal 2 . The number 2j−1 represent the cardinal sets of k positive integers, namely, (i1 , i2 , · · · , ik ), which when summed together give j. Proof. Putting Π0 (−dt ) = 1 and Γ (j − dt ) = Πj (−dt ), Γ (j + 1) Γ (−dt ) we can rewrite (1.4) as yt + ∞ X Πj (−dt )yt−j = ut . j=1 19 (A1)  −d Pk−1 t− l=1 il ! ut−j , More generally, we have yt−j + ∞ X Πj (−dt−j )yt−j−k = ut−j . k=1 Suppose that the infinite moving average representation of (A1) is given by ∞ X Ψj (t)ut−j , with Ψ0 = 1, (A2) yt = Ψ0 (t)ut + j=1 we have for the lagged variable yt−j , yt−j = ut−j + ∞ X Ψk (t − j)ut−j−k . (A3) k=1 By replacing yt−j by ut−j + Yt + ∞ X Πj (−dt )ut−j + j=1 P∞ k=1 ∞ ∞ X X Ψk (t − j)ut−j−k in (A1), we obtain Πj (−dt )Ψk (t − j)ut−j−k = ut . (A4) j=1 k=1 Putting k′ = k + j, (A4) becomes Yt + ∞ X j=1 Πj (−dt )ut−j + ∞ ∞ X X Πj (−dt )Ψk′ −j (t − j)ut−k′ = ut . (A5) j=1 k′ =j+1 Let Φj,k′ (t − j) = Πj (−dt )Ψk′ −j (t − j), then we can rewrite (A5) as, 20 Yt +Π1 (−dt )ut−1 + ∞ P k′ =j+1 ∞ P j=2 Πj (−dt )ut−j + ∞ P k′ =2 Φ1,k′ (t − 1)ut−k′ + Φj,k′ (t − j)ut−k′ + · · · = ut , (A6) ∞ P k′ =3 Φ2,k′ (t − 2)ut−k′ + · · · We can rewrite (A6) as, Yt + Π1 (−dt )ut−1 + (Π2 (−dt ) + Φ1,2 (t − 1)) ut−2 (A7) + (Π3 (−dt ) + Φ1,3 (t − 1) + Φ2,3 (t − 2)) ut−3 + (Π4 (−dt ) + Φ1,4 (t − 1) + Φ2,4 (t − 2) + Φ3,4 (t − 3)) ut−4 .. . + (Πh (−dt ) + Φ1,h (t − 1) + Φ2,h (t − 2) + · · · + Φh−1,h (t − h + 1)) ut−h . + .. Let Πh (−dt ) + Φ1,h (t − 1) + Φ2,h (t − 2) + · · · + Φh−1,h (t − h + 1) = β h (t − h + 1), for h ≥ 1, then we can rewrite (A7) as Yt + β 1 (t)ut−1 + β 2 (t − 1)ut−2 + · · · + β h (t − h + 1)ut−h + · · · = ut . (A8) From (A8), the infinite moving average representation of the process yt is ∞ X  −β j (t) ut−j . (A9) Yt = ut + j=1 By identification between (A2) and (A9), we obtain Ψj (t) = −β j (t − j + 1). (A10) From (A10), the first three coefficients, (Ψ1 (t), Ψ2 (t), Ψ3 (t)) are: • Ψ1 (t) = −β 1 (t), = −Π1 (−dt ). • Ψ2 (t) = −β 2 (t − 1) = − (Π2 (−dt ) + Φ1,2 (t − 1)) = −Π2 (−dt ) − Π1 (−dt )Ψ1 (t − 1) = −Π2 (−dt ) + Π1 (−dt )Π1 (−dt−1 )  = 2 P P π i1 (−dt ) + (−1)k  k=1 i1 =2 i1 6=0 with il 6= 0, l ∈ 1, 2 P i1 +i2 =2 i1 6=0; i2 6=0   πi1 (−dt )π i2 (−dt−i1 ) • Ψ3 (t) = −β 3 (t − 2) = − (Π3 (−dt ) + Φ1,3 (t − 1) + Φ2,3 (t − 2)) = − (Π3 (−dt ) + Π1 (−dt )Ψ2 (t − 1) + Π2 (−dt )Ψ1 (t − 2)) = −Π3 (−dt )+Π1 (−dt )Π2 (−dt−1 )−Π1 (−dt )Π1 (−dt−1 )Π1 (−dt−2 )+ Π2 (−dt )Π1 (−dt−2 ) 3 P P P π i1 (−dt )πi2 (−dt−i1 ) + (−1)k π i1 (−dt ) + = i1 +i2 =3 i1 =3 k=1 P πi1 (−dt )π i2 (−dt−i1 )πi3 (−dt−i1 −i2 ), i1 +i2 +i3 =3 21 with il 6= 0, l ∈ 1, 3.More generally, we have, Ψj (t) = −β j (t − j + 1)  j X X =  (−1)k k=1 i1 +i2 +···+ik =j  π i1 (−dt )πi2 (−dt−i1 )πi3 (−dt−i1 −i2 ) · · · π ik (−dt−j+ik ) , (A11) with il 6= 0, l ∈ 1, k  When dt = d = constant, we have (Ψ1 (t), Ψ2 (t), Ψ3 (t)) = d, 22 d(d+1) , d(d+1)(d+2) 1 2  .
10math.ST
Analyzing Attacks on Cooperative Adaptive Cruise Control (CACC) Rens van der Heijden, Thomas Lukaseder, Frank Kargl arXiv:1710.05789v2 [cs.CR] 8 Dec 2017 Institute of Distributed Systems Ulm University, Germany [email protected], [email protected], [email protected] Abstract—Cooperative Adaptive Cruise Control (CACC) is one of the driving applications of vehicular ad-hoc networks (VANETs) and promises to bring more efficient and faster transportation through cooperative behavior between vehicles. In CACC, vehicles exchange information, which is relied on to partially automate driving; however, this reliance on cooperation requires resilience against attacks and other forms of misbehavior. In this paper, we propose a rigorous attacker model and an evaluation framework for this resilience by quantifying the attack impact, providing the necessary tools to compare controller resilience and attack effectiveness simultaneously. Although there are significant differences between the resilience of the three analyzed controllers, we show that each can be attacked effectively and easily through either jamming or data injection. Our results suggest a combination of misbehavior detection and resilient control algorithms with graceful degradation are necessary ingredients for secure and safe platoons. I. I NTRODUCTION In this paper, we study cooperative adaptive cruise control (CACC), an application of Vehicular Ad-Hoc Networks (VANETs) aimed at increasing road efficiency by partially automating driving. CACC is essentially an extension of existing cruise control (CC) and adaptive cruise control (ACC) technologies, both of which are designed to allow the driver to maintain constant speed while driving. In the case of ACC, vehicular sensors, such as RADAR, LIDAR and cameras, are used to measure the distance to the preceding vehicle, in order to automatically respond to changes in its’ driving behavior. CACC extends this concept by allowing vehicles to communicate and create a platoon, consisting of a leader vehicle and multiple followers, as shown in Figure 1. There are many different controller implementations in the literature that enable this behavior [1] since the proposal of CACC proposal in the 90s. It has been shown that CACC can be more efficient than ACC, and that even a constant spacing between vehicles (i.e., independent of platoon speed) can be theoretically achieved, whereas it has been shown that ACC alone cannot achieve this goal [2]. Since CACC was proposed, VANETs have made significant leaps in development, including the DSRC standard and a variety of ETSI, IEEE and SAE standards that define the various network layers. In parallel to these developments, security standards were designed, in order to protect against attacks common in other fields. In relatively early research, ©2017 IEEE accepted for VNC 2017 (no DOI available yet) aA = -30 m/s2 di … i+1 victims i A attacker … 0 v0, a0 leader Fig. 1. This figure shows a platoon with a leader and several followers: in our work, the red vehicle is the attacker, and the platoon length is 8. The attacker transmits a malicious beacon with a false acceleration of −30m/s2 . it became clear that integrity is the most significant security goal for VANETs in general [3], although availability is also significant. The IEEE 1609.2 standard defines how to protect against common external attacks, by providing message integrity and message authenticity (i.e., only legitimate vehicles can transmit messages). Both the C2C-CC in Europe and the CAMP in the US have since started deployment of security credential management systems (SCMSs) to manage what constitutes legitimate vehicles. In parallel, one of the major advances in the security community was the introduction of misbehavior detection, as a mean to detect and revoke vehicles that transmit malicious data. This type of behavior is at the focus of this work, particularly because the desired increased road usage with CACC requires vehicles to move in a way that would be unstable if only ACC was deployed. The research in misbehavior detection for VANETs concentrates mostly on being able to detect incorrect information in beacon messages. These messages, defined by the previously mentioned standards, are periodically sent to all neighboring vehicles to inform them of the state of the sender. One of the main application areas studied to evaluate such detection schemes is position-based routing, where multi-hop communication is enabled by finding routes based on vehicle positions. Because vehicle position is also used in order to avoid potential accidents in normal traffic (e.g., by warning the driver with an alarm tone), many detection algorithms operate on position information specifically. However, CACC typically uses acceleration and speed information to compute the behavior of the local vehicle based on that of the leader and predecessor vehicles (and in some cases, the entire platoon). If this information becomes unavailable or is incorrect, accidents may occur. The data for CACC controllers is essential to protect, but the security of these controllers when considering malicious insiders has only been studied by few authors [4], [5], [6], [7]. Existing work shows, that attacks can impact safety (i.e., potentially cause accidents), but lack a rigorous analysis and a framework within which such attacks and the resilience of the respective controllers can be analyzed. In this paper, we lay the groundwork for such a framework: we implement several attacks and provide a concrete quantification to measure the impact of an attack. Going beyond simply finding whether an accident occurs or not, we analyze the significance of such an attack (in terms of the ∆v of the accident) and quantify how the stability of an individual platoon is affected even if no accident occurs. We present results for three existing controllers implemented in Plexe [8]. Because we use this extensible platooning simulator as a basis for our evaluation, our work can easily be extended with new controllers. Similarly, our attack implementation can easily be extended to study the impact of more attacks. We publish the source code, data analysis scripts, and recorded data in order to stimulate further research in this area. The remainder of this paper is organized as follows. Section II discusses the existing analyses of attacks on CACC and platooning, as well as some basics regarding the controllers in Plexe. In Section III we divide existing attacks into three categories, of which two are analyzed extensively in this paper. We also discuss which proposed attacks are infeasible under the assumption that current security standards are implemented correctly. Section IV describes our simulation setup and the corresponding evaluation methodology.We discuss these results and their implications for CACC in Section V, and close with a conclusion in Section VI. II. R ELATED W ORK We distinguish two areas of related work: controllers, which implement the functionality that CACC and ACC offer, and existing studies on misbehavior in platooning and similar settings. A. Controllers Platoons are vehicles driving in a group, attempting to keep a minimal but still safe distance between the vehicles within the group. This can be achieved using ACC and CACC; the main reason for using CACC is that the safe distance can be much smaller. In both settings, a platoon normally consists of a single leader and a set of followers, together referred to as the platoon (or sometimes, string). The set of followers can be dynamic, although this usually requires some kind of join and leave procedures. Each vehicle implements a controller that determines the desired acceleration, which is used to configure the vehicles’ engine and brake controller. In this work we focus on the upper controller (i.e., setting the desired acceleration) exclusively, since this is the controller that an attacker can easily reach (either through communication or through attacks on sensors). There is a broad scope of literature from the control theory and engineering side covering a variety of different controllers [1]. This literature typically introduces two stability metrics: local stability and string stability. Here, local stability refers to a vehicles’ distance to the next vehicle, while string stability is a property of the platoon that determines how spacing errors propagate through the platoon. A platoon is considered string stable when the ∞-norm of the transfer function is less than 1 (||Ĥ(s)||∞ ≤ 1) [2], which basically means that the platoon will eventually converge to a stable state if the leader keeps a specific velocity perfectly. Maintaining the distance to the next vehicle can done by keeping a fixed distance (i.e., meters) or by maintaining a speed-dependent headway time (i.e., seconds), referred to as constant spacing and constant-time spacing. Earlier work has shown that noncooperative methods (i.e., ACC) cannot achieve string stability in a constant spacing policy [2]. In this work we focus on controllers implemented by Segata et al. [8] in Plexe, which includes a constant spacing controller, a controller with graceful degradation and a consensus controller. The constant spacing controller is taken from Rajamani [2] and keeps a fixed distance based on the measured distance and the received speed and acceleration of the preceding vehicle and the leader vehicle. The controller by Ploeg et al. [9] is designed to enable graceful degradation on network errors: their degraded CACC controller predicts the acceleration of the preceding vehicle if this information is not received. The idea is that this degraded controller outperforms ACC, and can thus be used to bridge communication gaps; this is particularly interesting for jamming attacks. The last controller is a consensus algorithm by di Bernardo et al. [10], which uses the position, speed, and acceleration information of all vehicles in the platoon. This controller has a larger spacing, but aims to maintain stability bidirectionally (i.e., vehicles also adapt their behavior to that of vehicles behind them); this is particularly interesting with respect to data injection attacks. B. Existing Attacks Attacks on CACC have typically been studied from two different perspectives, mostly working in parallel. Security research in vehicular networks has already suggested new types of attacks for the overall network in the previous decade [3]. More recent work has concentrated on misbehavior detection [11] and data injection attacks, which are uniquely suitable for vehicular networks and other cyberphysical systems. Platooning is one of the motivating examples for these researchers. On the other hand, authors from the control theory side have gained an understanding of potential security concerns, and have started developing attack-resilient control algorithms. In terms of attacks, some authors have also investigated how to exploit knowledge of the controller to show that attacks causing instability are possible. Alipour-Fanid et al. [7] discussed platoon behavior under jamming. In their attack scenario, the jammer is a drone flying above the platoon, aiming to use its’ limited power to disrupt the platoon from above. Jamming is thus done reactively (i.e., with success rate < 100%) to conserve power, although power consumption is not considered further. Their work shows that their ACC controller is string stable at 2.2 seconds headway distance, while CACC under the influence of their reactive jammer is string stable at 1.7 seconds headway distance. Additionally, they show the attack works best when the attacker is located near the first vehicle in the platoon. Amoozadeh et al. [6] discuss a two-level controller model and describe a variety of attacks, including application and network layer attacks, as well as other issues such as sensor tampering and privacy issues. They present a result of a message falsification attack, which in their setting is a vehicle external to the platoon that falsifies all beacons; the result of the attack is platoon instability (i.e., the platoon does not converge back to a stable state). They also explain that such an attack is most effective when acceleration changes occur. Similar results are presented for a jamming attack – here, the authors’ controller downgrades to ACC automatically. In our work, we aim to show that such a downgrade is not necessarily sufficient, depending on how system parameters are chosen. DeBruhl et al. [5] also use a two component controller, consisting of a PD feedback controller (radar-based) to keep distance and a feedforward controller (communication-based), whose outputs are added together to form the desired acceleration that is provided to the vehicle drivetrain. This controller has been shown to be string-stable in real networked platoons, and DeBruhl et al. examine its’ behavior under various attack strategies, including a collision induction attack. The authors continue to develop an error calculation and detection algorithm, which essentially estimates the expected behavior of the vehicle in front and switches to ACC if this vehicle appears to behave differently than it claims to. Outside of the context of communication, but also relevant to secure and safe platooning, is the work from the research group of Gerdes et al. [12] and Dadras et al. [4]. These authors looked at ACC-based platoons, and examined adversarial behavior within such a platoon, where the attacker systematically disrupts the distributed control algorithm using another algorithm that manipulates control input of their own vehicle to achieve their goal. In the first work, the authors show that for a given PID controller, they can cause significantly increased energy consumption in neighboring vehicles; as reduced energy consumption is one of the main drivers of CACC research, this impact is significant. The second work shows that for a PD controller, the attacker can cause the platoon to be asymptotically unstable, i.e., destabilize and eventually dissolve the platoon. III. ATTACKER M ODEL In this section, we describe our attacker model, which covers attacks proposed in the literature above, as well as elements from the area of misbehavior detection [11] and attacks on sensors [13]. In particular, we are interested in how realistic the attacks proposed in the literature are, when considering currently standardized security mechanisms. Standardized security mechanisms include the use of pseudonymous certificates to protect driver privacy, the corresponding private keys of which are stored in a hardware security module (HSM), which is somewhat protected against tampering. The core of our attacker model is that an attacker may gain control over a vehicle, and thus over legitimate key material. This can happen either through software compromise (e.g., malware spread through applications running on the entertainment system), by physical manipulation of the vehicle, or through key extraction from an old HSM. However, unlike traditional network attacker models, the attacker additionally must obey the laws of physics that are observable by any network participant (e.g., an attacker is not omnipresent throughout the network). For CACC specifically, we assume the software and protocol implementations are suitable, i.e., the attacker cannot find an exploit here, and must obey the protocol. In other words, we restrict the target of the attack to the platooning application, and assume other mechanisms are in place to filter out invalid or improperly formatted messages. In our model, the attackers’ primary goal is to cause a crash within the platoon, with the secondary goal of destabilizing it. We assume the attacker is already part of the platoon, a position from which the attacks can do the most damage. However, as the literature points out [5], if the attacker controls the leader vehicle, they have complete control over the platoon, and therefore attacks should be performed by a non-leader vehicle. We follow this argument and also assume attacks are executed by a follower in order to study the potential impact of attacks. Another argument for this is that leader vehicles can be placed under additional scrutiny and replaced if necessary, while followers are more difficult to replace if they are non-cooperative. A. Jamming Denial of service (DoS) attacks includes a variety of jamming attacks (regular and reactive), which are the most popular variant of this attack within vehicular networks. This also includes various attacks on higher layers that influence reception (e.g., violating the MAC protocol, causing others to wait). Some authors [6] also suggest a DoS attack may be launched on the network layer, in order to disrupt communication by overloading the hardware security module (HSM). This leads to a form of cryptographic packet loss, i.e., packet loss caused because messages cannot be verified, or cannot be verified in time [14]. In this work, we consider all of these attacks to have the same effect, i.e., that messages will no longer arrive, and we refer to it as jamming. This generalizes the attack compared to the related work [7], where the authors considered reactive jamming. B. V2X Data Injection The second class of attacks we identify is V2X Data Injection, which generalizes a variety of different attacks discussed in related work [6], [5]. Any attack that requires the attacker (or a vehicle compromised by the attacker) to send modified packets falls into this category; it is particularly useful because these types of attacks may be feasible to mitigate through misbehavior detection. The specific implementation of this attack is usually dependent on the type of data exchanged by the controller, and thus the corresponding impact is different for every controller. Similarly, the goal of an attacker is significant for the implementation, and sometimes used as a distinguishing factor in the literature (this includes the reduced headway attack, the collision induction attack and the misreporting attack, among others). However, these goals can often be achieved through one of the other classes of attacks (e.g., collision induction is possible through jamming), and thus we avoid this terminology. Spoofing and replay attacks can also be considered examples of this class, but these are considered mostly solved in the vehicular networking security community. In vehicular networks, where GPS is often assumed to be practically ubiquitous, replay attacks can be protected against using (close to) synchronized clocks. Similarly, because cryptographic keys are authenticated through pseudonymous certificates, and messages are protected by digital signatures, spoofing attacks that cause the receiver to misinterpret the origin of the message are not possible. This also applies to message falsification attacks (i.e., attacks that manipulate messages of other vehicles), for which digital signatures are an adequate countermeasure. However, it is possible to use multiple certificates to simulate more than one vehicle – this is referred to as a Sybil attack (as originally introduced by Douceur [15]). Whether this attack is feasible depends on how easy it is for the attacker to obtain pseudonymous certificates that can be used simultaneously. C. Sensor Manipulation The third and final class of attacks is sensor manipulation, which constitutes any attack that causes the internal network of the vehicle to report incorrect information to the controller. An attacker could either have access to the internal network of the vehicle and transmit false data here, causing the vehicle to react incorrectly (or even destabilize the platoon through the controller attack [4]). Although this could also be done in software, i.e., manipulating memory before the controller processes the inputs, attacks on the internal network are considered to be more interesting, because misbehavior detection is a potential countermeasure. Software attacks, on the other hand, are difficult to prevent through misbehavior detection, as the detection system will likely also be compromised in such a setting. Another variant of sensor manipulation positions the attacker outside of the target vehicle: instead of attacking the network, the attacker uses their sensors and other tools to blind the sensors of the target vehicle, or cause them to behave in a certain way. Researchers have shown that both LIDAR and cameras are vulnerable to such attacks [13], and the effect of such an attack is very similar to the other type of sensor manipulation attack (i.e., the controller sees invalid inputs). The only distinction is where the attacker is located, which influences the cost of such an attack, but the expected results for the platoon behavior are similar, and thus for the study of attacks we place these attacks in the same category. TABLE I E XCERPT OF SIMULATION PARAMETERS : FULL PARAMETERS AVAILABLE IN THE DATA AND SOURCE CODE REPOSITORIES . transmit power sensitivity platoon length attacker ID controllers CACC spacing target speed attack: speed value attack: accel value attack: position shift 100mW -94dBm 8 3 CACC, Ploeg, Consensus 5, 7, 9, 11, 13, 20 m 50, 80, 100, 120, 150 km/h -50, 0, 50, 100, 150 m/s -30, -10, 0, 10, 30 m/s2 3, 5, 7, 9, 11 m/s IV. ATTACK A NALYSIS In this paper we focus on communication only: we want to answer the question how CACC behaves under misbehavior, i.e., what are the potential impacts of such attacks. The aim of this work is to provide a general framework for attack analysis, which is helpful for the development of resilient control algorithms, as well as the misbehavior detection community. A. Simulation Setup We use Plexe (version 2.0) [8], which is a simulation toolkit based on VEINS, as basis for our analysis due to its’ flexibility in implementing control algorithms and accurate simulation of network behavior. Plexe also extends SUMO, which provides realistic microsimulations of physical vehicles; it extends this toolkit with various controllers: a constant spacing controller [2], a loss-tolerant controller [9] and a consensus controller [10]. For our implementation, we leave Plexe mostly unchanged, and only extend it to include our attacks. We implement four attacks: one jamming attack and three data injection attacks. Our jamming attack is designed to analyze the maximum possible impact of an attack, and is therefore implemented by locally dropping received messages after the attack starts. This simulates any type of denial of service, including cryptographic packet loss and various jamming strategies, and provides an upper bound on the attack success, although it may overestimate it in some cases. The alternative would be to implement a specific attack (e.g., as done by AlipourFanid et al. [7]), but this approach is not as generalizable as ours. Our data injection attacks are all implemented by exchanging some data with false data in the message an attacker would send according to the normal control algorithm. We analyze three different types: injecting false positions, false speeds or false acceleration values. There are multiple ways to implement these attacks; in our case, we set the attackers’ value to a constant value for speed and acceleration, which greatly simplifies the interpretation of the results. In addition, we again aim to provide an upper bound on the attack effectiveness. For position falsification, we provide a position error that increases linearly over time, and is added to the vehicles’ current position for each beacon. The simulation scenario we analyze is a standard scenario from Plexe, which was used by the authors to analyze platoon behavior: the sinusoidal scenario. This scenario initializes the platoon and then provides the leader with a specific acceleration profile that leads to a sinusoidal speed graph. By performing attacks at different points in time, we can use this scenario to approximate the impact of attacks on real behavior. The significant simulation parameters can be found in I; the complete configuration file and code is available on Github1 . Because of the way Plexe is implemented, simulating chain collisions reliably was not possible, so we collected information about the first collision only. 50 80 30.0 100 120 150 50 80 30.5 100 B. Metrics 120 In this work, we aim to analyze the effectiveness of various attacks on different CACC controllers. The goal of our attacker is to either cause a crash or maximize instability of the platoon. As such, we distinguish between two cases: a crash or some instability. If a crash occurs, impact velocity ∆v is used to quantify the impact of the attack (medical research suggests that this is the best predictive factor for injury [16]). If there is no crash, we quantify the instability in the platoon for the remainder of the simulation (approximately 30 seconds). Since all the studied controllers have been shown to be string stable, we can assume that the platoon eventually stabilizes. The option we chose is maxs,i,t (e), where s is the simulation run, i is the ith vehicle in the platoon, t is time and e is spacing error, which most accurately represent the worst case. This was inspired by earlier work [7], where a similar metric is used. The spacing error is defined as the difference between the desired distance of the controller and the actual distance between two vehicles. The alternative metrics were avgs (avgi (maxt (e))), the average maximum spacing error, and avgs (avgi (maxt (a))), the average maximum acceleration, both of which can be considered metrics for passenger comfort. Usability studies have shown [17] that spacing is important for user acceptance; we included the acceleration as an additional metric, which is also common in transportation research. Averaging over simulations and vehicles allow us to estimate the average comfort of all vehicles in a platoon; however, the maximum spacing error more accurately represents the potential inefficiency and risk due to an attack, which is why we decided on this metric2 . 150 50 80 31.0 120 150 50 80 31.5 1 https://github.com/vs-uulm/vnc2017-CACC-code 2 The data repository for this paper includes all metrics. 3 https://github.com/vs-uulm/vnc2017-CACC-data 100 120 150 50 80 32.0 100 120 150 50 80 32.5 100 120 C. Results sim ul at io ge n t tim sp ee e d (k ph ) C A C C -5 C A C C -7 C A C C -9 C A C C -1 C 1 A C C -1 C 3 A C C -2 0 Pl oe C g on se ns us 150 ta r This section presents the results of our attack experiments, and shows how we used our metrics to gain insight into the effectiveness of different attacks, as well as the resilience of the existing CACC algorithms. The data on which these results are based will also be published on Github3 , although they can also be re-generated using the source code and configuration mentioned above. 100 Fig. 2. Heat map showing attack success and impact for the constant jamming attack at the given point in simulation time, for different target platoon speeds and different controllers. Red/italics: attack leads to accident; number is impact velocity in m/s. Blue/bold: no accident; number is maximum spacing error in m. leader target speed (in km/h) leader target speed (in km/h) 150 50 140 120 100 80 120 100 80 Δ 60 20 C A C C C5 A C C -2 0 P C loe on g se ns us 40 20 A C C A -5 C C -2 0 Pl o C on eg se ns us C 140 40 C A C C A -5 C C -2 0 P C loe on g se ns us C C C A C C C5 A C C -2 0 P C loe on g se ns us Δ 60 150 C A C C C5 A C C -2 0 P C loe on g se ns us 3m 5m 7m 9m 11 m 100 -50 km/h 0 km/h 50 km/h 100 km/h 150 km/h C A C C A -5 C C -2 0 P C lo e on g se ns us 100 C 50 Fig. 3. The effect of position falsification: blue areas represent points not related to a crash. Fig. 4. Attacking with false speeds: blue areas represent points not related to a crash. 1) Jamming: We first discuss the results of our jamming attack, which are shown in Figure 2. This figure includes both successful attacks (i.e., crashes, marked in red) and stability impact (i.e., no crash, marked in blue), as well as the corresponding impact (see Section IV-B). The figure shows aggregated values (using the previously discussed aggregation approach) over five runs. In all cases, the impact of the attack remained similar (i.e. all five runs resulted in collisions or all five runs did not result in collisions). We simulated this for different target speeds and different jamming times: the target speed is the intended average speed of the platoon (i.e., the average speed of the leader vehicle), while the jamming time is the time at which jamming starts. The jamming time directly corresponds to the range in which acceleration of the leader vehicle is positive; since the leader data is disseminated throughout the platoon, the attacker can use this acceleration profile to choose the time of attack. Based on the speed profile generated from Plexe’s standard configuration, we determined that the positive acceleration lies between 30 and 32.5 seconds of simulation time (since the behavior is sinusoidal, this pattern repeats every 5 seconds). As can be seen in the figure, the target speed has no impact on the effectiveness of the attack on CACC. However, the attacks are more successful with higher velocities when Ploeg or Consensus are used as the spacing of these algorithms depends on the platoon target speed. We can therefore conclude, that spacing has a strong influence on attack effectiveness. On the other hand, attack effectiveness is not directly influenced by the target velocity. In general, with more spacing, attack impact decreases. The figure shows that this is not always true (e.g. CACC-13 vs. CACC-20 at 32s simulation time). This is due to the fact that with CACC-13 and lower, the attack occurs between the attacker (car 3) and the subsequent car 4. With CACC-20, car 4 can avoid colliding with the attacker, however, car 5 does collide with car 4. 2) Position Injection: The next step in our analysis covers position falsification attacks, often cited as one of the most significant types of data injection attacks on vehicular networks. In our model, the false position is a shift of the attackers’ real position that increases over time. It turns out that this attack is completely ineffective against the Ploeg and constant spacing controllers – it only causes crashes when the consensus controller is used. However, we can furthermore see that the spacing error of the Ploeg controller increases significantly with the leader target speed. This is because the consensus controller is the only one that uses received position information directly. Somewhat surprisingly, the impact of this attack on the consensus controller depends only on the value transmitted by the attacker, and not significantly on the target speed with which the leader (and thus the platoon) is moving. The full results are shown in Figure 3: for each shift parameter (mark and color of the scatter plot), with different leader target speeds (top, left to right), the graph includes the results for four different controller configurations (bottom, left to right). The impact speed of successful attacks (white background) varies from 2 to 9 m/s, while the maximum spacing error (gray background) is unaffected by the position falsification. This means that all attacks that have any effect lead to an accident. 3) Speed Injection: Our next attack was manipulating the speed transmitted by the attacker. Here, we continuously output the same value regardless of platoon or controller behavior, which causes the error between the attacker’s value and actual value to vary from 10 to −10 km/h if it falsifies the platoon target speed. The result of our analysis, displayed in Figure 4, shows that speed injection is successful against constant spacing CACC only, where the most significant crashes happen at lower speeds; the attacker claims to accelerate, but actually does not. When the attacker claims negative speeds (e.g., −50) the result is a high position error. The Ploeg controller shows the same behavior as before (i.e., it is not affected by the attack), and here the consensus controller is also unaffected, although the spacing error is much higher. Due to a constant falsified speed, the attacker does not achieve success in the constant value matching the leaders’ speed; we expect this will change if the leader behavior is less predictable. 4) Acceleration Injection: The final attack we performed is manipulation of the transmitted acceleration. Here, we also chose a relatively extreme scope, in order to discover the maximum potential of these attacks (−30, −10, 0, 10, 30 m/s2 ). The resulting statistics are shown in Figure 5. As expected, this attack affects all controllers, because acceleration is used in all leader target speed (in km/h) 50 100 -30 -10 0 10 30 150 140 m/s2 m/s2 m/s2 m/s2 m/s2 120 100 80 Δ 60 40 20 A C C A -5 C C -2 0 Pl o C on eg se ns us C C C A C C C5 A C C -2 0 P C loe on g se ns us C A C C C5 A C C -2 0 P C loe on g se ns us 0 Fig. 5. Behavior of controllers with falsified acceleration information: blue areas represent points not related to a crash. the control algorithms. However, the effect is widely different per controller: the consensus controller can tolerate these large errors in acceleration information (although the maximum spacing error increases slightly), while the others fail almost completely. This is likely due to the fact that the consensus controller is the only bi-directionally coupled controller (or more precisely, each vehicle considers all others in its’ control algorithm). Similar to the speed injection attack, injecting false acceleration data causes attack impact dependent on the injected value; the attack impact is significant for positive acceleration values. However, here the impact of false negative acceleration is also significant — however, at some point, the distance sensor notices that the distance is too large, and it resets to ACC behavior. V. D ISCUSSION Our results show that most CACC controllers are unreliable when subject to effective denial of service attacks, and that the impact of injection is also significant for any data that is used in the controller directly. This confirms earlier results on individual jamming and injection experiments, and shows that these results also hold when simulation parameters are changed. Beyond this, our results show that the window of opportunity for the attacker to jam or transmit false information is broad, i.e., the attacker does not need to hit precisely the correct timing for the attack to work. Our results can also be used as a guide for the attacker to further hone the effectiveness of an attack against more resilient control algorithms. Overall, we can conclude that the Ploeg controller deals well with jamming even considering that this controller was only intended for intermittent, unreliable channels, and not for complete failure. However, we still managed to cause some accidents even with this algorithm, suggesting that an eventual complete fallback to ACC may be advisable. The consensus controller behaves differently, and only fails with a later starting point when jamming — future work could more thoroughly investigate the cause of this behavior. Finally, we conclude that the constant spacing controller is completely unsuitable for unreliable communication; the window for causing a crash is at least 2 seconds. For data injection attacks, the actual value transmitted by the attacker had an important influence over the attack impact, but the target speed of the leader did not matter much in comparison. We expected our attacks to increase in impact as the overall platoon speed increases, because we expected the controllers to react more quickly in those scenarios. Although this is the case for some position errors, the crash impact remains relatively consistent for the CACC controller. For the Ploeg controller, the impact is dependent on the speed, but this dependence is mainly due to the speed-dependent gap that should occur between vehicles. The one exception to all these observations is the consensus controller, which is surprisingly resilient against attacks, showing no impact from speed and acceleration falsification. However, the impact of position shift on this controller is significant. Nevertheless, this suggests that the consensus controller might be a good starting point for building a resilient controller, despite its’ relative ineffectiveness, illustrated by a higher overall position error. Our results are likely to extend to similar scenarios; the CACC and Ploeg controllers both rely only on the leader and the preceding vehicle, so any platoon long enough to contain the crashing vehicle is affected by potential crashes. It is unclear how well the results transfer for the consensus controller, since its’ intended behavior is quite different from the other two controllers, considering all the vehicles in the platoon for the control of each vehicle. However, the overall methodology we applied here is not constrained to the scenario — the tools we provide can easily be used to further tune the parameters of the controllers for increased safety, or the attackers’ parameters to improve attack effectiveness. VI. C ONCLUSION & F UTURE W ORK In this paper, we have discussed a more holistic attacker model, implemented several attacks and tested their impact on existing controllers using our proposed analysis methodology. Overall, the results show not only that controllers are vulnerable to attack, but that there are significant differences between controllers in terms of how they are affected by attacks. The research community should critically discuss the limitations of CACC under the influence of these attacks. Our future work focuses on improving the attacks and studying their detection; however, detection alone is likely insufficient, because of the volume of crashes we encountered. Work should therefore focus also on prevention, through the design of resilient controllers on the one hand, and effective detection and revocation mechanisms on the other. Future work in false data injection could look at how other types of controllers behave, or study the effectiveness of simultaneously falsifying multiple fields in the beacon. The latter is particularly relevant, because it circumvents many typical misbehavior detection mechanisms (which could detect most of the attacks we have described with reasonable accuracy, in part due to the values we chose). An alternative route that has not yet been studied very well is the injection of false data into external sensors. Some research has shown that camera and LIDAR sensors can be tricked easily in a lab environment [13]. Once Plexe has been extended to include some sensor error models, experimenting with these attacks and combining them with false data injection will likely be an interesting path. Even though attacks on sensors would rely on line-of-sight and additional equipment (i.e., it cannot be done by manipulating a vehicle with malware), we have also found that some injection attacks cause crashes between vehicles further behind the attacker. For the development of future control algorithms, we suggest that authors consider a fallback mechanism similar to the Ploeg controller. However, we suggest that this eventually downgrades from degraded CACC to pure ACC, because the error in the estimated acceleration will increase over time if a jamming attack is maintained long enough. To improve reliability, using all available inputs may be a feasible approach to reduce the impact of attacks (e.g., as partially demonstrated by the consensus controller), especially because common controllers typically only use leader and preceding vehicle information. This may not increase overall security, but will make it more difficult to successfully fine-tune attacks and achieve a desired impact. Should the information show inconsistencies, a fallback mechanism could again be considered; here the challenge is ensuring that the entire platoon mutually decides on performing a fallback, to avoid a heterogeneous controller environment. The attacks discussed in this work may be detected with relative ease using plausibility checks; however, the main aim of this work was to show how attack impact may be maximized. Future work may look at the maximum tolerance of the attacks we designed; however, our currently proposed metrics are bound to the behavior of the leader. The next step is then to decide how to use this information, apart from invalidating the vehicle in the SCMS [18], preventing damage from ongoing attacks is also a goal. If using a controller with graceful degradation (similar to Ploeg), the detection may trigger this functionality: when combined with effective revocation, this will ensure that temporarily degraded service is the best possible attack. An interesting side aspect is that not all detection algorithms are compatible with platooning, because the corresponding behavior is different: it may thus be a feasible path to design specialized misbehavior detection mechanisms for the CACC scenario specifically. ACKNOWLEDGMENT The authors would like to thank Johannes Diebold for the thesis upon which this work expands, and Henning Kopp for proof reading the paper. Experiments for this work were performed on the computational resource bwUniCluster funded by the Ministry of Science, Research and the Arts Baden-Württemberg and the Universities of the State of Baden-Württemberg, Germany, within the framework program bwHPC. This work was supported in part by the BadenWürttemberg Stiftung gGmbH Stuttgart as part of the project IKT-05 AutoDetect of its IT security research programme. R EFERENCES [1] D. Jia, K. Lu, J. Wang, X. Zhang, and X. Shen, “A survey on platoonbased vehicular cyber-physical systems,” IEEE Communications Surveys Tutorials, vol. 18, no. 1, pp. 263–284, Firstquarter 2016. [2] R. Rajamani, Vehicle Dynamics and Control. Springer US, 2012. [3] M. Raya and J.-P. Hubaux, “Securing vehicular ad hoc networks,” Journal of Computer Security, vol. 15, pp. 39–68, 2007. [4] S. Dadras, R. M. Gerdes, and R. Sharma, “Vehicular platooning in an adversarial environment,” in Proceedings of the 10th ACM Symposium on Information, Computer and Communications Security, ser. ASIA CCS ’15. New York, NY, USA: ACM, 2015, pp. 167–178. [5] B. DeBruhl, S. Weerakkody, B. Sinopoli, and P. Tague, “Is your commute driving you crazy?: A study of misbehavior in vehicular platoons,” in Proceedings of the 8th ACM Conference on Security & Privacy in Wireless and Mobile Networks, ser. WiSec ’15. New York, NY, USA: ACM, 2015, pp. 22:1–22:11. [Online]. Available: http://doi.acm.org/10.1145/2766498.2766505 [6] M. Amoozadeh, A. Raghuramu, C. n. Chuah, D. Ghosal, H. M. Zhang, J. Rowe, and K. Levitt, “Security vulnerabilities of connected vehicle streams and their impact on cooperative driving,” IEEE Communications Magazine, vol. 53, no. 6, pp. 126–132, June 2015. [7] A. Alipour-Fanid, M. Dabaghchian, H. Zhang, and K. Zeng, “String stability analysis of cooperative adaptive cruise control under jamming attacks,” in 2017 IEEE 18th International Symposium on High Assurance Systems Engineering (HASE), Jan 2017, pp. 157–162. [8] M. Segata, S. Joerer, B. Bloessl, C. Sommer, F. Dressler, and R. Lo Cigno, “PLEXE: A Platooning Extension for Veins,” in 6th IEEE Vehicular Networking Conference (VNC 2014). Paderborn, Germany: IEEE, December 2014, pp. 53–60. [9] J. Ploeg, E. Semsar-Kazerooni, G. Lijster, N. van de Wouw, and H. Nijmeijer, “Graceful degradation of cacc performance subject to unreliable wireless communication,” in Intl. IEEE Conference on Intelligent Transportation Systems (ITSC 2013), Oct 2013, pp. 1210–1216. [10] M. di Bernardo, A. Salvi, and S. Santini, “Distributed consensus strategy for platooning of vehicles in the presence of time-varying heterogeneous communication delays,” IEEE Transactions on Intelligent Transportation Systems, vol. 16, no. 1, pp. 102–112, Feb 2015. [11] R. W. van der Heijden, F. Kargl, O. M. F. Abu-Sharkh, and A. AlMomani, “Enhanced position verification for vanets using subjective logic,” in Vehicular Technology Conference Fall. IEEE, 2016. [12] R. M. Gerdes, C. Winstead, and K. Heaslip, “CPS: An efficiencymotivated attack against autonomous vehicular transportation,” in Proc. Annual Computer Security Applications Conference, ser. ACSAC ’13. New York, NY, USA: ACM, 2013, pp. 99–108. [13] J. Petit and S. E. Shladover, “Potential Cyberattacks on Automated Vehicles,” IEEE Transactions on Intelligent Transportation Systems, vol. 16, no. 2, pp. 546–556, Apr. 2015. [14] M. Feiri, J. Petit, and F. Kargl, “Congestion-based certificate omission in vanets,” in Intl. Workshop on Vehicular Inter-networking, Systems, and Applications, ser. VANET ’12. NY, USA: ACM, 2012, pp. 135–138. [15] J. R. Douceur, “The Sybil Attack,” in Peer-to-Peer Systems, ser. Lecture Notes in Computer Science, P. Druschel, F. Kaashoek, and A. Rowstron, Eds., vol. 2429. Springer Berlin Heidelberg, Mar. 2002, pp. 251–260. [16] H. C. Joksch, “Velocity change and fatality risk in a crash – a rule of thumb,” Accident Analysis & Prevention, vol. 25, no. 1, pp. 103–104, 1993. [17] M. Larburu, J. Sanchez, and D. J. Rodriguez, “Safe road trains for environment: Human factors’ aspects in dual mode transport systems,” in ITS World Congress, Busan, Korea, 2010. [18] W. Whyte, A. Weimerskirch, V. Kumar, and T. Hehn, “A security credential management system for v2v communications,” in 2013 IEEE Vehicular Networking Conference, Dec 2013, pp. 1–8.
3cs.SY
arXiv:1410.8512v2 [math.GR] 16 Sep 2016 QUASI-ISOMETRIC CLASSIFICATION OF RIGHT-ANGLED ARTIN GROUPS I: THE FINITE OUT CASE JINGYIN HUANG Abstract. Let G and G0 be two right-angled Artin groups. We show they are quasi-isometric if and only if they are isomorphic, under the assumption that the outer automorphism groups Out(G) and Out(G0 ) are finite. If we only assume Out(G) is finite, then G0 is quasi-isometric G if and only if G0 is isomorphic to a subgroup of finite index in G. In this case, we give an algorithm to determine whether G and G0 are quasi-isometric by looking at their defining graphs. Contents 1. Introduction 1.1. Backgrounds and Summary of Results 1.2. Comments on the Proof 1.3. Organization of the Paper 1.4. Acknowledgement 2. Preliminaries 2.1. Notation and Conventions 2.2. CAT (0) space and CAT (0) cube complex 2.3. Coarse intersections of convex subcomplexes 2.4. Right-angled Artin groups 3. Stable subgraph 3.1. Coarse intersection of standard subcomplexes and flats 3.2. Standard flats in transvection free RAAG’s 3.3. Standard flats in general RAAG’s 4. From quasi-isometries to isomorphisms 4.1. The extension complexes 4.2. Reconstruction of quasi-isometries 4.3. The automorphism groups of extension complexes 5. Quasi-isometries and special subgroups 5.1. Preservation of extension complex 5.2. Coherent ordering and coherent labeling 6. The geometry of finite index RAAG subgroups 6.1. Constructing finite index RAAG subgroups 6.2. Rigidity of RAAG subgroups 6.3. Generalized star extension References 1 2 2 5 7 7 7 7 8 10 11 13 13 17 20 25 25 28 31 34 34 36 41 41 44 50 53 2 JINGYIN HUANG 1. Introduction 1.1. Backgrounds and Summary of Results. Given a finite simplicial graph Γ with vertex set {vi }i∈I , the right-angled Artin group (RAAG) with defining graph Γ, denoted by G(Γ), is given by the following presentation: {vi , for i ∈ I | [vi , vj ] = 1 if vi and vj are joined by an edge} {vi }i∈I is called a standard generating set for G(Γ) (cf. Section 2.4). The class of RAAG’s enjoys a balance between simplicity and complexity. On one hand, RAAG’s have many nice geometric, combinatorial and group theoretic properties (see [Cha07] for a summary); on the other hand, this class inherits the full complexity of the collection of finite simplicial graphs, and even a single RAAG could have very complicated subgroups (see, for example [BB97]). In recent years, RAAG’s have become important models to understand other unknown groups, either by (virtually) embedding the unknown groups into some RAAG’s (such a program is outlined in [Wis09, Section 6], see also the references over there), or by finding embedded copies of RAAG’s in the unknown groups ([CLM10, Kob12b, Tay13, KK13a, BKK14]). In this paper, we study the asymptotic geometry of RAAG’s and classify a particular class of RAAG’s by their quasi-isometric types. Previously, the quasiisometric classification of RAAG’s has been done for the following two classes. (1) Tree groups by Behrstock and Neumann. It is shown in [BN08] that for any two trees Γ1 and Γ2 with diameter ≥ 3, G(Γ1 ) and G(Γ2 ) are quasiisometric. Higher dimensional analogs of tree groups are studied in [BJN10]. (2) Atomic groups by Bestvina, Kleiner and Sageev. A RAAG is atomic if its defining graph Γ is connected and does not contain valence one vertices, cycles of length < 5 and separating closed stars. It is shown in [BKS08a] that two atomic RAAG’s are quasi-isometric if and only if they are isomorphic. Note that atomic groups are much more “rigid” than tree groups. We define the dimension of G(Γ) to be the maximal n such that G(Γ) contains a Zn subgroup, and it coincides with the cohomological dimension of G(Γ). All atomic groups are 2-dimensional, hence it is natural to ask what are higher dimensional RAAG’s which satisfy similar rigidity properties as atomic RAAG’s. This is the starting point of the current paper. Since we are looking for RAAG’s which are rigid, those ones with small quasiisometry groups would be reasonable candidates. However, even in the atomic case, the quasi-isometry group QI(G(Γ)) is huge (see the discussion of quasi-isometry flexibility in [BKS08a, Section 11]). Then we turn to the outer automorphism group Out(G(Γ)) for guidance. Now we ask whether those RAAG’s with “small” outer automorphism groups are also geometrically rigid in an appropriate sense. Actually, “small” outer automorphism groups and (quasi-isometric or commensurability) rigidity results come together in several other cases, for example, higher rank lattices ([Mos73, KL97, EF97, Esk98]), mapping class groups ([Ham05, BKMM12]), Out(Fn ) ([FH07]) etc. Our first result is about the quasi-isometric classification for RAAG’s with finite outer automorphism group. Theorem 1.1. Pick G(Γ1 ) and G(Γ2 ) such that Out(G(Γi )) is finite for i = 1, 2. Then they are quasi-isomeric if and only if they are isomorphic. QUASI-ISOMETRIC CLASSIFICATION OF RIGHT-ANGLED ARTIN GROUPS I 3 This theorem is proved in Section 4. See Theorem 4.18 for a more detailed version of Theorem 1.1. The collection of RAAG’s with finite outer automorphism group is a reasonably large class. Recall that there is a 1-1 correspondence between finite simplicial graphs and RAAG’s ([Dro87]), thus it makes sense to talk about a random RAAG by considering the Erdős–Rényi model for random graphs. If the parameters of the model are in the right range, then almost all RAAG’s have finite outer automorphism group ([CF12, Day12]). The class of 2-dimensional RAAG’s with finite outer automorphism group is strictly larger than the class of atomic RAAG’s, moreover, there are plenty of higher dimensional RAAG’s with finite outer automorphism group. Whether Out(G(Γ)) is finite or not can be easily read from Γ. We defined the closed star of a vertex v in Γ, denoted by St(v), to be the full subgraph (see Section 2.1) spanned by v and vertices adjacent to v. Similarly, lk(v) is defined to be the full subgraph spanned by vertices adjacent to v. Note that this definition is slightly different from the usual one. By results in [Ser89, Lau95], Out(G(Γ)) is generated by the following four types of elements (we identify the vertex set of Γ with a standard generating set of G(Γ)): (1) Given vertex v ∈ Γ, sending v → v −1 and fixing all other generators. (2) Graph automorphisms of Γ. (3) If lk(w) ⊂ St(v) for vertices w, v ∈ Γ, sending w → wv and fixing all other generators induces a group automorphism. It is called a transvection. When d(v, w) = 1, it is an adjacent transvection, otherwise it is a non-adjacent transvection. (4) Suppose Γ \ St(v) is disconnected. Then one obtains a group automorphism by picking a connected component C and sending w → vwv −1 for each vertex w ∈ C (all other generators are fixed). It is called a partial conjugation. Elements of type (3) or (4) have infinite order in Out(G(Γ)) while elements of type (1) or (2) are of finite order. Out(G(Γ)) is finite if and only if Γ does not contain any separating closed star, and there do not exist distinct vertices v, w ∈ Γ such that lk(w) ⊂ St(v). Theorem 1.2. Suppose Out(G(Γ1 )) is finite. Then the following are equivalent: (1) G(Γ2 ) is quasi-isometric to G(Γ1 ). (2) G(Γ2 ) is isomorphic to a subgroup of finite index in G(Γ1 ). (3) Γe2 is isomorphic to Γe1 . Here Γe denotes the extension graph introduced by Kim and Koberda in [KK13b] (see Definition 2.11). Extension graphs can be viewed as “curve graphs” for RAAG’s ([KK14]). This analog carries on to the aspect of quasi-isometric rigidity. Namely, if G is a mapping class group and q : G0 → G is a quasi-isometry, then it is shown in [BKMM12] that G0 naturally acts on the curve graph associated with G. This is still true if G is a RAAG with some restriction on its outer automorphism group, for example, Out(G) is finite. However, in general, there exists a pair of commensurable RAAG’s with different extension graphs, see Example 3.29. There also exists a pair of non-quasi-isometric RAAG’s with isomorphic extension graphs, see [Hua16, Section 5.3]. 4 JINGYIN HUANG Motivated by Theorem 1.2 (2), we now look at finite index RAAG subgroups (i.e. subgroups which are also RAAG’s) of G(Γ1 ). Given a RAAG G(Γ) (not necessarily having a finite outer automorphism group) and pick a standard generating set S for G(Γ). Let dS be the word metric on G(Γ) with respect to S. A subset K ⊂ G(Γ) is S-convex if for any three points x, y ∈ K and z ∈ G(Γ) such that dS (x, y) = dS (x, z) + dS (z, y), we must have z ∈ K. Every finite S-convex subset K naturally gives rise to a finite index RAAG subgroup G ≤ G(Γ) such that K is the fundamental domain of the left action G y G(Γ). For example, if G(Γ) = Z ⊕ Z and pick K to be a rectangle of size n by m, then the corresponding subgroup is of form nZ ⊕ mZ. The detailed construction in the more general case is given in Section 6.1. G is called an S-special subgroup of G(Γ). A subgroup of G(Γ) is special if it is S-special for some standard generating set S. A similar construction in the case of right-angled Coxeter groups is in [Hag08]. Here is an alternating description in terms of the canonical completion introduced by [HW08]. Let S(Γ) be the Salvetti complex of G(Γ) (see Section 2.4) and let X(Γ) be the universal cover. We pick an identification between G(Γ) and the 0-skeleton of X(Γ). The above subset K gives rise to a convex subcomplex K̄ ⊂ X(Γ). Then the corresponding special subgroup is the fundamental group of the canonical completion with respect the local isometry K̄ → S(Γ). Our next result says if Out(G(Γ)) is finite, then this is the only way to obtain finite index RAAG subgroups of G(Γ). Theorem 1.3. Suppose Out(G(Γ)) is finite and let S be a standard generating set for G(Γ). Then all finite index RAAG subgroups are S-special. Moreover, there is a 1-1 correspondence between non-negative finite S-convex subsets of G(Γ) based at the identity and finite index RAAG subgroups of G(Γ). See Theorem 6.20 for a slight reformulation of Theorem 1.3. We need to explain two terms: non-negative and based at the identity. For example, take G = nZ ⊕ mZ inside Z ⊕ Z, then any n by m rectangle could be the fundamental domain for the action of G. We naturally require the rectangle to be in the first quadrant and contain the identity, which would give us a unique choice. Similar things can be done in all RAAG’s and this two terms will be defined precisely in Section 6. The most simple example is when G(Γ) = Z, we have a 1-1 correspondence between finite index subgroups of form nZ and the intervals of form [0, n − 1]. Corollary 1.4. If Out(G(Γ1 )) is finite, then G(Γ2 ) is quasi-isometric to G(Γ1 ) if and only if G(Γ2 ) is isomorphic to a special subgroup of G(Γ1 ). It turns out that there is an algorithm to enumerate the defining graphs of all special subgroups of a RAAG, so Theorem 1.5. If Out(G(Γ)) is finite, then G(Γ0 ) is quasi-isometric to G(Γ) if and only if Γ0 can be obtained from Γ by finitely many GSE’s. In particular, there is an algorithm to determine whether G(Γ0 ) and G(Γ) are quasi-isometric by looking at the graphs Γ and Γ0 . GSE is a generalized version of star extension in [BKS08a, Example 1.4], see also [KK13b, lemma 50]. It will be defined in Section 6. A question motivated by Theorem 1.2 is the following: QUASI-ISOMETRIC CLASSIFICATION OF RIGHT-ANGLED ARTIN GROUPS I 5 Question 1.6. Let G(Γ) be a RAAG such that Out(G(Γ)) is finite. And let H be a finite generated group quasi-isometric to G(Γ). What can we say about H? As a partial answer to this question, we prove the following result in [HK16]. Theorem 1.7. ([HK16]) Let G(Γ) and H be as in Question 1.6. Then the induced quasi-action H y X(Γ) is quasi-isometrically conjugate to a geometric action H y X 0 . Here X 0 is a CAT (0) cube complex which is closely related to X(Γ). 1.2. Comments on the Proof. 1.2.1. Proof of Theorem 1.1. We start with several notations. The Salvetti complex of G(Γ) is denoted by S(Γ), the universal cover of S(Γ) is denoted by X(Γ), and flats in X(Γ) that cover standard tori in S(Γ) are called standard flats. See Section 2.4 for precise definition of these terms. Let q : X(Γ) → X(Γ0 ) be a quasi-isometry. The proof of Theorem 1.1 follows the scheme of the proof of the main theorem in [BKS08a]. Similar schemes can also be found in [KL97, BKMM12]. There are three steps in [BKS08a]. First they show q maps top dimensional flats to top dimensional flats up to finite Hausdorff distance. However, the collection of all top dimensional flats is too large to be linked directly to the combinatorics of RAAG’s, so the second step is to show quasi-isometries preserve standard flats up to finite Hausdorff distance. The third step is to straighten the quasi-isometry such that it actually maps standard flats to standard flats exactly, not just up to finite Hausdorff distance, and the conclusion follows automatically. In our cases, the first step has been done in [Hua14], where we show q still preserves top dimensional flats up to finite Hausdorff distance in higher dimensional case. No assumption on the outer automorphism group is needed for this step. The second step consists of two parts. First we show q preserves certain top dimensional maximal products up to finite Hausdorff distance. Then one wish to pass to standard flats by intersecting these top dimensional objects. However, in the higher dimensional case, a lower dimensional standard flat may not be the intersection of top dimensional objects, and even in the case it is an intersection, one may not be able to read this information directly from the defining graph Γ. This is quite different from the 2-dimensional situation in [BKS08a] and relies on several new ingredients. A necessary condition for q to preserve the standard flats is that every elements in Out(G(Γ)) should do so, which implies there could not be any transvections in Out(G(Γ)). This condition is also sufficient. Theorem 1.8. Suppose Out(G(Γ)) is transvection free. Then there exists a positive constant D = D(L, A, Γ) such that for any standard flat F ⊂ X(Γ), there exists a standard flat F 0 ⊂ X(Γ0 ) such that dH (q(F ), F 0 ) < D. Here dH denotes the Hausdorff distance. In step 3, we introduce an auxiliary simplicial complex P(Γ), which serves as a link between the asymptotic geometry of X(Γ) and the combinatorial structure of X(Γ). More precisely, on one hand, P(Γ) can be viewed as a simplified Tits boundary for X(Γ), on the other hand, one can read certain information about the wall space structure of X(Γ) from P(Γ). This complex turns out to coincide with the extension graph introduced in [KK13b], where it was motivated from the viewpoint of mapping class group. 6 JINGYIN HUANG Denote the Tits boundary of X(Γ) by ∂T (X(Γ)), and let T (Γ) ⊂ ∂T (X(Γ)) be the union of Tits boundaries of standard flats in X(Γ). Then T (Γ) has a natural simplicial structure. However, T (Γ) contains redundant information, this can be seen in the similar situation where the link of the base point of S(Γ) looks more complicated than Γ, but they essentially contain the same information. This redundancy can be resolved by replacing the spheres in T (X) that arise from standard flats by simplexes of the same dimension. This gives rise to a well defined simplicial complex P(Γ), since for any standard flats F1 and F2 with ∂T F1 ∩∂T F2 6= ∅, there exists a standard flat F such that ∂T F = ∂T F1 ∩ ∂T F2 . See Section 4.1 for more properties of P(Γ). By Theorem 1.8, if both Out(G(Γ)) and Out(G(Γ0 )) are transvection free, then q induces a boundary map ∂q : P(Γ) → P(Γ0 ), which is a simplicial isomorphism. Next we want to consider the converse and reconstruct a map X(Γ) → X(Γ0 ) from the boundary map ∂q in the following sense. Pick vertex p ∈ X(Γ), let {Fi }ni=1 be the collection of maximal standard flats containing p. By Theorem 1.8, for each i, there exists a unique maximal standard flat Fi0 ⊂ X(Γ0 ) such that dH (q(Fi ), Fi0 ) < ∞. One may wish to map p, which turns out to be the intersection of Fi ’s, to the intersection of all Fi0 ’s. However, in general ∩ni=1 Fi0 may be empty, or contain more than one point, hence our map may not be well-defined. It turns out that if we also rule out partial conjugations in Out(G(Γ)), then ∩ni=1 Fi0 is exactly a point. This give rises to a well-defined map q̄ : X(Γ)(0) → X(Γ0 )(0) which maps vertices in a standard flat to vertices in standard flat. If Out(G(Γ0 )) is also finite, then we can define an inverse map of q̄ and this is enough to deduce Theorem 1.1. 1.2.2. Proof of Theorem 1.2. If only Out(G(Γ)) is assumed to be finite, we can still recover the fact that ∂q is a simplicial isomorphism (this is non-trivial, since Theorem 1.8 does not say for any standard flat F 0 ⊂ X(Γ0 ), we can find a standard flat F ⊂ X(Γ) such that dH (q(F ), F 0 ) < ∞). Hence we can define q̄ as before. However the inverse of q̄ does not exist in general. The next step is to trying to extend q̄ to a cubical map (Definition 2.1) from X(Γ) to X(Γ0 ). There are obvious obstructions: though q̄ maps vertices in a standard geodesic to vertices in a standard geodesic, q̄ may not preserve the order of these vertices. A typical example is given in the following picture, where one can permute the green level and the red level in a tree, then the order of vertices in the black line is not preserved. QUASI-ISOMETRIC CLASSIFICATION OF RIGHT-ANGLED ARTIN GROUPS I 7 A remedy is to “flip backwards”. Namely we will pre-compose q̄ with a sequence of permutations of “levels” such that the resulting map restricted to each standard geodesic respects the order. Then we can extend q̄ to a cubical map. This argument relies on the understanding of quasi-isometric flexibility, namely how much room we have to perform these flips. One formulation of this aspect is the following. Theorem 1.9. If Out(G(Γ)) is finite, then Aut(P(Γ)) ∼ = Isom(G(Γ), dr ). Here dr denotes the syllable metric, see [KK14, Section 5.2]. Theorem 1.2 - Theorem 1.5 will rely on the cubical map q̄. In particular, q̄ −1 (x) (x ∈ X(Γ0 ) is a vertex) is a compact convex subcomplex and this is how we obtain the S-convex subset in Theorem 1.3. 1.3. Organization of the Paper. Section 2 contains basic notations used in this paper and some background material about CAT (0) cube complexes and RAAG’s. In particular, Section 2.3 collects several technical lemmas about CAT (0) cube complex. One can skip Section 2.3 on first reading and come back when needed. In Section 3 we prove Theorem 1.8. Section 3.1 is about the stability of top dimensional maximal product subcomplexes under quasi-isometries and Section 3.2 deals with lower dimensional standard flats. In Section 4 we prove Theorem 1.1. We will construct the extension complex from our viewpoint in Section 4.1 and explain how is this object related to Tits boundary, flat space and contact graph. In Section 4.2, we describe how to reconstruct the quasi-isometry. Section 5.1 and Section 5.2 are devoted to proving Theorem 1.2. We prove Theorem 1.3, Corollary 1.4 and Theorem 1.5 in Section 6. 1.4. Acknowledgement. I would like to thank Bruce Kleiner and Robert Young, for reading parts of the paper and give valuable comments. I would thank Jason Behrstock, Ruth Charney, and Walter Neumann for suggestion interesting questions, which leads to Section 6.3 of this paper. I would thank Pallavi Dani, Mark Hagen, Thomas Koberda, Do-gyeom Kim and Sang-hyun Kim for related discussions. I also thank the referee for carefully reading the paper and providing helpful comments. 2. Preliminaries 2.1. Notation and Conventions. All graphs in this paper are simple. The flag complex of a graph Γ is denoted by F (Γ), i.e. F (Γ) is a flag complex such that its 1-skeleton is Γ. A subcomplex K 0 in a combinatorial polyhedral complex K is full if K 0 contains all the subcomplexes of K which have the same vertex set as K 0 . If K is 1dimensional, then we also call K 0 a full subgraph. We use “∗” to denote the join of two simplicial complexes and “◦” to denote the join of two graphs. Let K be a simplicial complex or a graph. By viewing the 1-skeleton as a metric graph with edge length = 1, we obtain a metric defined on the 0-skeleton, which we denote by d. Let N ⊂ K be a subcomplex. We define the orthogonal complement of N , denoted by N ⊥ , to be the set {w ∈ K (0) | d(w, v) = 1 for any vertex v ∈ N }; define the link of N , denoted by lk(N ), to be the full subcomplex spanned by N ⊥ ; and define the closed star of N , denoted by St(N ), to be the full subcomplex spanned by N ∪ lk(N ). Suppose L is a subcomplex such that N ⊂ L ⊂ K. We denote the closed star of N in L by St(v, L). If L is a full 8 JINGYIN HUANG subcomplex, then St(N, L) = St(N ) ∩ L. We can define lk(N, L) in a similar way. Let M ⊂ K be an arbitrary subset. We denote the collection of vertices inside M by v(M ). We use id to denote the identity element of a group, and use Id to denote the identity map from a space to itself. Let (X, d) be a metric space. The open ball of radius r centred at p in X will be denoted by B(p, r). Given subsets A, B ⊂ X, the open r-neighborhood of a subset A is denoted by Nr (A). The diameter of A is denoted by diam(A). The Hausdorff distance between A and B is denoted by dH (A, B). We will also use the following adapted notation of coarse set theory introduced in [MSW04]. Symbol A ⊂r B A ⊂∞ B r A=B ∞ A=B A ∩r B Meaning A ⊂ Nr (B) ∃r > 0 such that A ⊂ Nr (B) dH (A, B) ≤ r dH (A, B) < ∞ Nr (A) ∩ Nr (B) 2.2. CAT (0) space and CAT (0) cube complex. The standard reference for CAT (0) spaces is [BH99]. Let (X, d) be a CAT (0) space. Pick x, y ∈ X, we denote the unique geodesic segment joining x and y by xy. For y, z ∈ X \ {x}, denote the comparison angle between xy and xz at x by ∠x (y, z) and the Alexandrov angle by ∠x (y, z). The boundary of X, denoted by ∂X, is the collection of asymptotic classes of geodesic rays. ∂X has an angular metric, which is defined by ∠(ξ1 , ξ2 ) = lim ∠p (l1 (t), l2 (t0 )) 0 t,t →∞ where l1 and l2 are unit speed geodesic rays emanating from a base point p such that li (∞) = ξi for i = 1, 2. This metric does not depend on the choice of p, and the length metric associated to the angular metric, denoted by dT , is called the Tits metric. The Tits boundary, denoted by ∂T X, is the CAT (1) space (∂X, dT ) (see Chapter II.8 and II.9 of [BH99]). Given two metric spaces (X1 , p d1 ) and (X2 , d2 ), denote the Cartesian product of X1 and X2 by X1 × X2 , i.e. d = d21 + d22 on X1 × X2 . If X1 and X2 are CAT (0), then so is X1 × X2 . An n-flat in a CAT (0) space X is the image of an isometric embedding En → X. Note that any flat is convex in X. Pick a convex subset C ⊂ X, then C is also CAT (0). We use πC to denote the nearest point projection from X to C. πC is well-defined and is 1-Lipschitz. Moreover, pick x ∈ X \ C, then ∠πC (x) (x, y) ≥ π/2 for any y ∈ C such that y 6= πC (x) (see Proposition II.2.4 of [BH99]). If C 0 ⊂ X is another convex set, then C 0 is parallel to C if d(·, C)|C 0 and d(·, C 0 )|C are constant functions. In this case, there is a natural isomorphism between C × [0, d(C, C 0 )] and the convex hull of C and C 0 . We define the parallel set of C, denoted by PC , to be the union of all convex subsets of X parallel to C. If C has geodesic extension property, or more generally, C is boundary-minimal (Section 3.C of [CM09]), then PC is a convex subset in X. Moreover, PC admits a canonical splitting PC = C × C ⊥ , where C ⊥ is also a CAT (0) space. QUASI-ISOMETRIC CLASSIFICATION OF RIGHT-ANGLED ARTIN GROUPS I 9 Now we turn to CAT (0) cube complexes. All cube complexes in this paper are assumed to be finite dimensional. A cube complex X is obtained by gluing a collection of unit Euclidean cubes isometrically along their faces, see II.7.32 of [BH99] for a precise definition. Then the cube complex has a natural piecewise Euclidean metric. This metric is complete and geodesic since X is finite dimensional (I.7.19 of [BH99]) and is non-positively curved if the link of each vertex is a flag complex ([Gro87]). If in addition X is simply connected, then this metric is CAT (0) and X is said to be a CAT (0) cube complex. We can put a different metric on the 1-skeleton X (1) by considering it as a metric graph with all edge lengths 1. This is called the `1 metric. We use d for the CAT (0) metric on X and d`1 for the `1 metric on X (1) . The natural injection (X (1) , d`1 ) ,→ (X, d) is a quasi-isometry (I.7.31 of [BH99] or Lemma 2.2 of [CS11]). In this paper, we will mainly use the CAT (0) metric unless otherwise specified. Also any notions which depend on the metric, like geodesic, convex subset, convex hull etc, will be understood automatically with respect to the CAT (0) metric unless otherwise specified. Definition 2.1. (cf. [CS11, Section 2.1]) A cellular map between CAT (0) cube complexes is cubical if its restriction σ → τ between cubes factors as σ → η → τ , where the first map σ → η is a natural projection onto a face of σ and the second map η → τ is an isometry. A geodesic segment, geodesic ray or geodesic in X is an isometric embedding of [a, b], [0, ∞) or R into X with respect to the CAT (0) metric. A combinatorial geodesic segment, combinatorial geodesic ray or combinatorial geodesic is a `1 -isometric embedding of [a, b], [0, ∞) or R into X (1) such that its image is a subcomplex. Let X be a CAT (0) cube complex and let Y ⊂ X be a subcomplex. Then the following are equivalent (see [Hag08]): (1) Y is convex with respect to the CAT (0) metric. (2) Y is a full subcomplex and Y (1) ⊂ X (1) is convex with respect to the `1 metric. (3) Lk(p, Y ) (the link of p in Y ) is a full subcomplex of Lk(P, X) for every vertex p ∈ Y . The collection of convex subcomplexes in a CAT (0) cube complex enjoys the following version of Helly’s property ([Ger98]): Lemma 2.2. Let X be as above and {Ci }ki=1 be a collection of convex subcomplexes. If Ci ∩ Cj 6= ∅ for any 1 ≤ i 6= j ≤ k, then ∩ki=1 Ci 6= ∅. Lemma 2.3. Let X1 and X2 be two CAT (0) cube complexes and let K ⊂ X1 × X2 be a convex subcomplex. Then K admits a splitting K = K1 × K2 where Ki is a convex subcomplex of Xi for i = 1, 2. The lemma is clear when X1 ∼ = [0, 1], and the general case follows from this special case. Now we come to the notion of hyperplane, which is the cubical analog of “track” introduced in [Dun85]. A hyperplane h in a cube complex X is a subset such that (1) h is connected. (2) For each cube C ⊂ X, h ∩ C is either empty or a union of mid-cubes of C. (3) h is minimal, i.e. if there exists h0 ⊂ h satisfying (1) and (2), then h = h0 . 10 JINGYIN HUANG Recall that a mid-cube of C = [0, 1]n is a subset of form fi−1 (1/2), where fi is one of the coordinate functions. If X is a CAT (0) cube complex, then the following are true (see [Sag95]): (1) Each hyperplane is embedded, i.e. h ∩ C is either empty or a mid-cube of C (in more general cube complexes, it is possible that h ∩ C contains two or more mid-cubes of C); (2) h is a convex subset in X and h with the induced cell structure from X is also a CAT (0) cube complex; (3) X \ h has exactly two connected components, they are called halfspaces. The closure of a halfspace is called closed halfspace, which is also convex in X with respect to the CAT (0) metric. (4) Let Nh be the smallest subcomplex of X that contains h. Then Nh is a convex subcomplex of X and there is a natural isometry i : Nh → h × [0, 1] such that i(h) = h × {1/2}. Nh is called the carrier of h. (5) For every edge e ⊂ X, there exists a unique hyperplane he which intersects e in its midpoint. In this case, we say he is the hyperplane dual to e and e is an edge dual to the hyperplane he . (6) Lemma 2.2 is also true for a collection of hyperplanes. Now it is easy to see an edge path ω ⊂ X is a combinatorial geodesic segment if and only if there do not exist two different edges of ω such that they are dual to the same hyperplane. Moreover, for two vertices v, w ∈ X, their `1 distance is exactly the number of hyperplanes that separate v from w. Pick an edge e ⊂ X and let πe : X → e ∼ = [0, 1] be the CAT (0) projection. Then (1) The hyperplane dual to e is exactly πe−1 (1/2). (2) πe−1 (t) is convex in X for any 0 ≤ t ≤ 1, moreover, if 0 < t < t0 < 1, then πe−1 (t) and πe−1 (t0 ) are parallel. (3) Let Nhe be the carrier of the hyperplane dual to e. Then Nhe is the closure of πe−1 (0, 1). Alternatively, we can describe Nhe as the parallel set of e. 2.3. Coarse intersections of convex subcomplexes. Lemma 2.4 (Lemma 2.10 of [Hua14]). Let X be a CAT (0) cube complex of dimension n and let C1 , C2 be convex subcomplexes. Put ∆ = d(C1 , C2 ). Let Y1 = {y ∈ C1 | d(y, C2 ) = ∆} and Y2 = {y ∈ C2 | d(y, C1 ) = ∆}. Then: (1) Y1 and Y2 are not empty. (2) Y1 and Y2 are convex; πC1 maps Y2 isometrically onto Y1 and πC2 maps Y1 isometrically onto Y2 ; the CAT (0) convex hull of Y1 ∪ Y2 is isometric to Y1 × [0, ∆] (since we are taking the CAT (0) convex hull, it does not has to be a subcomplex). (3) Y1 and Y2 are subcomplexes, and πC2 |Y1 is a cubical isomorphism from Y1 to Y2 with its inverse given by πC1 |Y2 . (4) For any  > 0, there exists A = A(∆, n, ) such that if p1 ∈ C1 , p2 ∈ C2 and d(p1 , Y1 ) ≥  > 0, d(p2 , Y2 ) ≥  > 0, then (2.5) d(p1 , C2 ) ≥ ∆ + Ad(p1 , Y1 ); d(p2 , C1 ) ≥ ∆ + Ad(p2 , Y2 ) Remark 2.6. Equation (2.5) implies for any r > 0, (C1 ∩r C2 ) ⊂r0 Yi (i = 1, 2), where r0 = min(1, (2r − ∆)/A) + r and A = A(∆, n, 1). Moreover, ∂T C1 ∩ ∂T C2 = ∂T Y1 = ∂T Y2 . QUASI-ISOMETRIC CLASSIFICATION OF RIGHT-ANGLED ARTIN GROUPS I ∞ 11 ∞ The remark implies Y1 = Y2 = (C1 ∩r C2 ) for r large enough. We use I(C1 , C2 ) = (Y1 , Y2 ) to describe this situation, where I stands for the word “intersect”. The next lemma gives a combinatorial description of Y1 and Y2 . Lemma 2.7. Let X, C1 , C2 , Y1 and Y2 be as above. Pick an edge e in Y1 (or Y2 ) and let h be the hyperplane dual to e. Then h ∩ Ci 6= ∅ for i = 1, 2. Conversely, if a hyperplane h0 satisfies h0 ∩ Ci 6= ∅ for i = 1, 2, then h0 is the dual hyperplane of some edge e0 in Y1 (or Y2 ). Moreover, I(h0 ∩ C1 , h0 ∩ C2 ) = (h0 ∩ Y1 , h0 ∩ Y2 ). Proof. The first part of the lemma follows from Lemma 2.4. Let I(h0 ∩C1 , h0 ∩C2 ) = (Y10 , Y20 ). Pick x ∈ Y10 and let x0 = πh0 ∩C2 (x) ∈ Y20 . Then πh0 ∩C1 (x0 ) = x. Let Nh0 = h0 ×[0, 1] be the carrier of h0 . Then (h0 ∩Ci )×( 21 −, 12 +) = Ci ∩(h0 ×( 12 −, 12 +)) for i = 1, 2 and  < 12 . Thus for any y ∈ C2 , ∠x0 (x, y) ≥ π/2, which implies x0 = πC2 (x). Similarly, x = πC1 (x0 ) = πC1 ◦ πC2 (x), hence x ∈ Y1 and Y10 ⊂ Y1 . By the same argument, Y20 ⊂ Y2 , thus Yi0 = Yi ∩ h0 for i = 1, 2 and the lemma follows.  Lemma 2.4, Remark 2.6 and Lemma 2.7 can also be applied to CAT (0) rectangle complexes of finite type, whose cells are of form Πni=1 [0, ai ]. “Finite type” means there are only finitely many isometry types of rectangle cells in the rectangle complex. Lemma 2.8. Let X, C1 , C2 , Y1 and Y2 be as above. If h is a hyperplane separating C1 from C2 , then there exists a convex set Y ⊂ h such that Y is parallel to Y1 (or Y2 ). Proof. Let ∆ = d(C1 , C2 ) and let M = Y1 × [0, ∆] be the convex hull of Y1 and Y2 . We want to prove M ∩ h = Y1 × {t} ⊂ Y1 × [0, ∆] for some t ∈ [0, ∆]. It suffices to show for any edge e ⊂ Y1 , (e × [0, ∆]) ∩ h = e × {t} for some t. Pick point x ∈ e and let {x} × {t} be the point in M = Y1 × [0, ∆]. Since e × {t} is parallel to e, e × {t} sits inside a cube and e × {t} is parallel to an edge of this cube. Thus either e × {t} ⊂ h or e × {t} is parallel to some edge dual to h, but the second case implies that h is dual to e and h ∩ Y1 6= ∅, which is impossible, so e × {t} ⊂ (e × [0, ∆]) ∩ h. Now we are done since ({x} × [0, ∆]) ∩ h is exactly one point for each x ∈ e.  2.4. Right-angled Artin groups. Pick a finite simplicial graph Γ. Let G(Γ) be a RAAG. A generating set S ⊂ G(Γ) is called a standard generating set if all relators in the associated group presentation are commutators. Each standard generating set S determines a graph ΓS whose vertices are elements in S and two vertices are adjacent if the corresponding group elements commute. It follows from [Dro87] that the isomorphism type of ΓS does not depend on the choice of the standard generating set S, in particular, ΓS is isomorphic to Γ. Let S be a standard generating set for G(Γ). We label the vertices of Γ by elements in S. G(Γ) has a nice Eilenberg-MacLane space S(Γ), called the Salvetti complex (see [CD95, Cha07]). S(Γ) is a non-positively curved cube complex. The 2-skeleton of S(Γ) is the usual presentation complex of G(Γ). If the presentation complex contains a copy of 2-skeleton of a 3-torus, then we attach a 3-cell to obtain a 3-torus. We can build S(Γ) inductively in this manner, and this process will stop after finitely many steps. The closure of each k-cell in S(Γ) is a k-torus. Torus of this kind is called a standard torus. There is a 1-1 correspondence between the k-cells (or standard tori of dimension k) in S(Γ) and k-cliques (complete subgraph 12 JINGYIN HUANG of k vertices) in Γ, thus dim(S(Γ)) = dim(F (Γ)) + 1. We define the dimension of G(Γ) to be the dimension of S(Γ). Denote the universal cover of S(Γ) by X(Γ), which is a CAT (0) cube complex. Our previous labeling of vertices of Γ induces a labeling of the standard circles of S(Γ), which lifts to a labeling of edges of X(Γ). We choose an orientation for each standard circle of S(Γ) and this would give us a directed labeling of the edges in X(Γ). If we pick a base point v ∈ X(Γ) (v is a vertex), then there is a 1-1 correspondence between words in G(Γ) and edge paths in X(Γ) which start at v. Each full subgraph Γ0 ⊂ Γ gives rise to a subgroup G(Γ0 ) ,→ G(Γ). Subgroup of this kind is called a S-standard subgroup and a left coset of an S-standard subgroup is called a S-standard coset (we will omit S when the generating set is clear). There is also an embedding S(Γ0 ) ,→ S(Γ) which is locally isometric. Let p : X(Γ) → S(Γ) be the covering map. Then each connect component of p−1 (S(Γ0 )) is a convex subcomplex isometric to X(Γ0 ). We will call these components standard subcomplexes with defining graph Γ0 . A standard k-flat is a standard complex which covers a standard k-torus in S(Γ). When k = 1, we also call it a standard geodesic. We pick an identification of the Cayley graph of G(Γ) with the 1-skeleton of X(Γ), hence G(Γ) is identified with the vertices of X(Γ). Let v ∈ X(Γ) be the base vertex which corresponds to the identity in the Cayley graph of G(Γ). Then for any h ∈ G(Γ), the convex hull of {hgv}g∈G(Γ0 ) is a standard subcomplex associated with Γ0 . Thus there is a 1-1 correspondence between standard subcomplexes with defining graph Γ0 in X(Γ) and left cosets of G(Γ0 ) in G(Γ). Note that for every edge e ∈ X(Γ), there is a vertex in Γ which shares the same label as e, and we denote this vertex by Ve . If K ⊂ X(Γ) is a subcomplex, we define VK to be {Ve | e is an edge in K} and ΓK to be the full subgraph spanned by VK . ΓK is called the support of K. In particular, if K is a standard subcomplex, then the defining graph of K is ΓK . Every finite simplicial graph Γ admits a canonical join decomposition Γ = Γ1 ◦ Γ2 ◦· · ·◦Γk , where Γ1 is the maximal clique join factor and for 2 ≤ i ≤ k, Γi does not allow any non-trivial join decomposition and is not a point. Γ is irreducible if this join decomposition is trivial. This decomposition induces a product decomposition X(Γ) = En ×Πki=2 X(Γi ), which is called the De Rahm decomposition of X(Γ). This is consistent with the canonical product decomposition of CAT (0) cube complex discussed in Section 2.5 of [CS11]. We turn to the asymptotic geometry of RAAG’s. A right-angled Artin group G(Γ) is one-ended if and only if Γ is connected. Moreover, the n-connectivity at infinity of G(Γ) can be read off from Γ, see [BM01]. In order to classify all RAAG’s up to quasi-isometry, it suffices to consider those one-ended RAAG’s. This follows from the main results in [PW02]. Moreover, Lemma 3.2 of [PW02] implies the following: Lemma 2.9. If q : X(Γ) → X(Γ0 ) is an (L, A)-quasi-isometry, then there exists D = D(L, A) > 0 such that for any connected component Γ1 ⊂ Γ such that Γ1 is not a point and any standard subcomplex K1 ⊂ X(Γ) with defining graph Γ1 , there is a unique connected component Γ01 ⊂ Γ0 and a unique standard subcomplex K10 ⊂ X(Γ0 ) with defining graph Γ01 such that dH (q(K1 ), K10 ) < D. It is shown in [BC12] and [ABD+ 13] that G(Γ) has linear divergence if and only if Γ is a join or Γ is one point, which implies Γ being a join is a quasi-isometric QUASI-ISOMETRIC CLASSIFICATION OF RIGHT-ANGLED ARTIN GROUPS I 13 invariant. Moreover, their results together with Theorem B of [KKL98] implies that the De Rahm decomposition is stable under quasi-isometry: Qk Theorem 2.10. Given X = X(Γ) and X 0 = X(Γ0 ), let X = Rn × i=1 X(Γi ) Qk0 0 and let X 0 = Rn × j=1 X(Γ0j ) be the corresponding De Rahm decomposition. If φ : X → X 0 is an (L, A) quasi-isometry, then n = n0 , k = k 0 and there exist constants L0 = L0 (L, A), A0 = A0 (L, A), D = D(L, A) such that after re-indexing the factors in X 0 , we have (L0 , A0 ) quasi-isometry φi : X(Γi ) → X(Γ0i ) so that Qk Qk Qk d(p0 ◦ φ, i=1 φi ◦ p) < D, where p : X → i=1 X(Γi ) and p0 : X 0 → i=1 X(Γ0i ) are the projections. Thus in order to study the quasi-isometric classification of RAAG’s, it suffices to study those RAAG’s which are one-ended and irreducible, but this will rely on finer quasi-isometric invariant of RAAG’s. Recall that in the case of Gromov hyperbolic spaces, quasi-isometries map geodesics to geodesics up to finite Hausdorff distance, hence induces a well-defined boundary map. The analog of this fact for 2-dimensional RAAG’s has been established in [BKS08b], i.e. quasi-isometries map 2-flats to 2-flats up to finite Hausdorff distance. The following is a higher dimensional generalization of Theorem 3.10 of [BKS08b]. Theorem 2.11 (Theorem 5.20 of [Hua14]). If φ : X(Γ1 ) → X(Γ2 ) is an (L, A)quasi-isometry, then dim(X(Γ1 )) = dim(X(Γ2 )). And there is a constant D = D(L, A) such that for any top-dimensional flat F1 ⊂ X(Γ1 ), there is a unique flat F2 ⊂ X(Γ2 ) such that dH (φ(F1 ), F2 ) < D. For each right-angled Artin group G(Γ), there is a simplicial graph Γe , called the extension graph, which is introduced in [KK13b]. Extension graphs can be viewed as “curve graphs” for RAAG’s ([KK14]). Definition 2.12 (Definition 1 of [KK13b]). The vertex set of Γe consists of words in G(Γ) that are conjugate to elements in S (recall that S is a standard generating set for G(Γ)), and two vertices are adjacent in Γe if and only if the corresponding words commute in G(Γ). The flag complex of the extension graph is called the extension complex. Since the curve graph captures the combinatorial pattern of how Dehn twist flats intersect in a mapping class group, it plays an important role in the quasi-isometric rigidity of mapping class group ([Ham05, BKMM12]). Similarly, we will see in Section 4 that the extension graph captures the combinatorial pattern of the coarse intersection of certain collection of flats in a RAAG, and it is a quasi-isometric invariant for certain classes of RAAG’s. 3. Stable subgraph We study the behavior of certain standard subcomplexes under quasi-isometries in this section. 3.1. Coarse intersection of standard subcomplexes and flats. Lemma 3.1. Let Γ be a finite simplicial graph and let K1 , K2 be two standard subcomplexes of X(Γ). If (Y1 , Y2 ) = I(K1 , K2 ), then Y1 and Y2 are also standard subcomplexes. 14 JINGYIN HUANG Proof. The lemma is clear if K1 ∩ K2 6= ∅. Now we assume d(K1 , K2 ) = c > 0. Pick a vertex v1 ∈ K1 , by Lemma 2.4, there exists vertex v2 ∈ K2 such that d(v1 , v2 ) = c. Let l : [0, c] → X(Γ) be the unit speed geodesic from v1 to v2 . We can find sequence of cubes {Bi }N i=1 and 0 = t0 < t1 < ... < tN −1 < tN = c such that each Bi contains {l(t) | ti−1 < t < ti } as interior points. Let Vl = ∪N i=1 VBi (recall that VBi is the collection of the labels of edges in Bi , cf. Section 2.4) and let Vi = VKi for i = 1, 2. Put V 0 = V1 ∩ V2 ∩ Vl⊥ (Vl⊥ denotes the orthogonal complement of V1 , see Section 2.1) and let Γ0 be the full subgraph spanned by V 0 . Let Y10 be the standard subcomplex that has defining graph Γ0 and contains v1 (if V 0 is empty, then Y10 = v1 ). We claim Y1 = Y10 . Pick an edge e ⊂ K1 such that v1 ∈ e and Ve ∈ V 0 . Let h be the hyperplane dual to e and Nh ∼ = h × [0, 1] be the carrier of h. Since d(Ve , w) = 1 for any w ∈ Vl , we can assume l ⊂ h × {1} ⊂ Nh . By our definition of V 0 , there is an edge e0 ∈ K2 with v2 ∈ e0 and h dual to e0 , thus e and e0 cobound an isometrically embedded flat rectangle (one side of the rectangle is l), which implies e ⊂ Y1 . Let l0 be the side of the rectangle opposite to l. We can define Vl0 similarly as we define Vl , then Vl0 = Vl . Now let ω be any edge path starting at v1 such that Ve0 ∈ V 0 for any edge e0 ⊂ ω. Then it follows from the above argument and induction on the combinatorial length of ω that ω ⊂ Y1 , thus Y10 ⊂ Y1 . For the other direction, since Y1 is a convex subcomplex by Lemma 2.4, it suffices to prove every vertex of Y1 belongs to Y10 . By the induction argument as above, we only need to show for edge e1 with v1 ∈ e1 , if e1 ⊂ Y1 , then e1 ⊂ Y10 . Lemma 2.4 implies that there exists edge e2 ⊂ Y2 such that e1 and e2 cobound an isometrically embedded flat rectangle (one side of the rectangle is l). So l is in the carrier of the hyperplane dual to e1 . It follows that Ve1 ∈ V 0 and e1 ⊂ Y10 .  Corollary 3.2. Let K1 , K2 , Y1 and Y2 be as above. Let h be a hyperplane separating K1 and K2 and let e be an edge dual to h. Then Ve ∈ VY⊥1 = VY⊥2 . In particular, pick vertex v ∈ Γ, then v ∈ VY1 if and only if (1) v ∈ VK1 ∩ VK2 . (2) For any hyperplane h0 separating K1 from K2 and any edge e0 dual to h0 , d(v, Ve0 ) = 1. Proof. Let l and Vl be the same as the proof of Lemma 3.1. Let Vl0 be a collection of vertices of Γ such that v ∈ Vl0 if and only if v = Ve0 for some edge e0 ⊂ X(Γ) satisfying (2). It suffices to prove Vl0 = Vl . Vl0 ⊂ Vl is clear since if a hyperplanes h separates K1 from K2 , then l intersects h transversally at one point. To see Vl ⊂ Vl0 , it suffices to show h∩Ki = ∅ for i = 1, 2, where h is a hyperplane that intersects l transversally. Let x = l ∩ h. Suppose h ∩ K1 6= ∅ and let x0 = πh∩K1 (x). Now consider the triangle ∆(v1 , x, x0 ) (recall that v1 = l(0)), we have ∠v1 (x, x0 ) ≥ π/2 (since πK1 (x) = v1 ), ∠x0 (v1 , x) ≥ π/2 (see the proof of Lemma 2.7) and ∠x (v1 , x0 ) > 0, which is a contradiction, so h∩K1 = ∅, similarly h ∩ K2 = ∅.  Remark 3.3. Recall that a standard coset of G(Γ) is a left coset of a standard subgroup of G(Γ). Lemma 3.1 implies that for each pair of standard cosets of G(Γ), we can associated another standard coset, which captures the coarse intersection of the pair. Moreover, we can also define a notion of distance between two standard cosets, which takes value on G(Γ). QUASI-ISOMETRIC CLASSIFICATION OF RIGHT-ANGLED ARTIN GROUPS I 15 Lemma 3.4. Let K ⊂ X(Γ) be a convex subcomplex and let Γ0 = lk(ΓK ) (ΓK is the support of K, see Section 2.4; lk(ΓK ) is the full subgraph spanned by VK⊥ , see Section 2.1). Then the parallel set PK of K is a convex subcomplex and canonically splits as K × X(Γ0 ). Note that we do not require K to satisfy geodesic extension property. Proof. Pick a vertex v ∈ K. Let Γ00 = ΓK and let P1 be the unique standard subcomplex that passes through v and has defining graph Γ0 ◦ Γ00 (recall that ◦ denotes the graph join). Then K ⊂ P1 . Let P 0 be the natural copy of K × X(Γ0 ) inside P1 . It is clear that P 0 ⊂ PK . Let K 0 be a convex subset parallel to K and let φ : K → K 0 be the isometry induced by CAT (0) projection onto K 0 . Pick vertex v ∈ K and let l be the geodesic segment connecting v and φ(v). We define Vl as in the proof of Lemma 3.1 (note that φ(v) is not necessarily a vertex). Let e be any edge such that v ∈ e ⊂ K. Then there is a flat rectangle with e, φ(e) and l as its three sides. Thus l is contained in the carrier of the hyperplane dual to e and Vl ⊂ Ve⊥ . Note that if l0 is the side opposite to l, then Vl0 = Vl . For any given edge e0 ⊂ K, we can find an edge path ω ⊂ K such that e is the first and e0 is the last edge in ω. By induction on the combinatorial length of w and the same argument as above, we can show Vl ⊂ Ve⊥0 ,  thus Vl ⊂ VK⊥ and K 0 ⊂ P 0 . It follows that PK ⊂ P 0 , so PK = P 0 . Remark 3.5. The following is a generalization of the above lemma for general CAT (0) cube complexes. Let X be a CAT (0) cube complex. A convex set K ⊂ X is regular if for any x ∈ K, Σx K (the space of direction of x in K, see Chapter II.3 of [BH99]) satisfies: (1) Σx K is a subcomplex of Σx X with respect to the canonical all-right spherical complex structure on Σx X. (2) There exists r > 0 such that B(x, r) ∩ K is isometric to the r-ball centred at the cone point in the Euclidean cone over Σx K. If K ⊂ X is a regular convex subset, the PK is convex and admits a splitting PK ∼ = K × N where N has an induced cubical structure from X (N is CAT (0)). Lemma 3.6. Let q : X(Γ1 ) → X(Γ2 ) be an (L, A)-quasi-isometry and let F ⊂ X(Γ1 ) be a subcomplex isometric to Ek . Suppose n = dim(X(Γ1 )) = dim(X(Γ2 )). R If there exist R1 > 0, R2 > 0 and top dimensional flats F1 , F2 such that F =2 ∞ F1 ∩R1 F2 and F = F1 ∩R F2 for any R ≥ R1 , then (1) There exist a constant D = D(L, A, R1 , R2 , n) and a subcomplex F 0 ⊂ D X(Γ2 ) isometric to Ek such that q(F ) = F 0 . D0 (2) There exists a constant D0 = D0 (L, A) such that q(PF ) = PF 0 . Proof. By Theorem 2.11, there exist top dimensional flats F10 ⊂ X(Γ2 ) and F20 ⊂ D X(Γ2 ) such that q(Fi ) =1 F10 for D1 = D1 (L, A) and i = 1, 2. Thus there exists R0 = R0 (L, A, R1 , R2 ) and R3 = R3 (L, A, R1 , R2 ) > R1 such that q(F1 ∩R1 F2 ) ⊂ F10 ∩R0 F20 ⊂ q(F1 ∩R3 F2 ), this and Remark 2.6 imply (3.7) D q(F1 ∩R1 F2 ) =2 F10 ∩R0 F20 for D2 = D2 (n, d(F1 , F2 )) = D2 (L, A, R1 , R2 , n). 16 JINGYIN HUANG Let (Y1 , Y2 ) = I(F10 , F20 ). Then there exists D3 = D3 (L, A, R1 , R2 , n) such that D Y1 =3 F10 ∩R0 F20 . (3.8) From (3.7) and (3.8), we have D q(F ) =4 Y1 (3.9) for D4 = D4 (L, A, R1 , R2 , n). By Lemma 2.4, Y1 is a convex subcomplex of F10 . Qk0 This together with (3.9) imply Y1 = F 0 × i=1 Ii where F 0 is isometric to Ek and Qk 0 0 {Ii }ki=1 are finite intervals. Moreover, by (3.9), diam( i=1 Ii ) must be bounded in terms of D4 , L and A, thus (1) follows. Let {Fλ }λ∈Λ be the collection of top dimensional flats in X(Γ1 ) which are contained in the parallel set PF of F . Lemma 3.4 implies (3.10) dH (∪λ∈Λ Fλ , PF ) ≤ 1. For λ ∈ Λ, there exists Rλ > 0 such that F ⊂Rλ Fλ . Let Fλ0 be the top dimensional D flat in X(Γ2 ) such that q(Fλ ) =1 Fλ0 . Then by (1), there exists Rλ0 > 0 such that F 0 ⊂Rλ0 (Fλ0 ). This and Lemma 2.4 imply Fλ0 ⊂ PF 0 for any λ ∈ Λ. Thus by (3.10), there exists D0 = D0 (L, A) such that q(PF ) ⊂D0 PF 0 . And (2) follows by running the same argument for the quasi-isometry inverse of q.  A tree product is a convex subcomplex K ⊂ X(Γ) such that K splits as a product of trees, i.e. there exists a cubical isomorphism K ∼ = Πni=1 Ti where Ti ’s are trees. A standard tree product is a tree product which is also a standard subcomplex. One can check that K is a standard tree product if and only if the defining graph ΓK of K has a join decomposition ΓK = Γ1 ◦ Γ2 ◦ · · · ◦ Γn where each Γi is discrete. Thus one can choose the above Ti ’s to be standard subcomplexes of K. Note that every standard flat is a standard tree product, and every subcomplex isometric to Ek is a tree product. 0 Lemma 3.11. Suppose Qn dim(X(Γ)) = n. Let q : X(Γ) → X(Γ ) be a quasiisometry. Let K = i=1 Ti be a top dimensional tree product with its tree factors. Then there exists a standard tree product K 0 in X(Γ0 ) such that q(K) ⊂∞ K 0 . The proof essentially follows [BKS08a, Theorem 4.2]. Proof. For 1 ≤ i ≤ n, let Vi = VTi ∈ Γ be the collection of labels of edges in Ti . The case where all Vi ’s are consist of one point follows from Theorem 2.11. If each Vi contains at least two points, then by Lemma 3.6, for any geodesic l ⊂ Ti , ∞ there exists a subcomplex l0 ⊂ X(Γ0 ) isometric to R such that q(l) = l0 . Since l0 is 0 unique up to parallelism, the collection of labels of edges in l does not depend on the choice of l0 and will be denoted by Vq(l) . For 1 ≤ i ≤ n, define Vi0 = ∪l⊂Ti Vq(l) where l varies among all geodesics in Ti . We claim Vi0 ⊂ (Vj0 )⊥ for i 6= j. To see this, pick geodesic li ∈ Ti and let Qn F = i=1 li . Then there exist top dimensional flat F 0 and geodesic lines {li0 }ni=1 ∞ ∞ (li0 is a subcomplex) in X(Γ0 ) such that q(F ) = F 0 and q(li ) = li0 . Since li0 ⊂∞ F 0 , by Lemma 2.4, we can assume li0 is a subcomplex of F 0 . Pick i 6= j. Since li and lj are orthogonal, they have infinite Hausdorff distance. Thus li0 and lj0 have infinite Hausdorff distance. By our assumption, li0 and lj0 are isometric to E1 , and they are convex subcomplexes of F 0 ∼ = En . Thus either li0 and lj0 are parallel, or they QUASI-ISOMETRIC CLASSIFICATION OF RIGHT-ANGLED ARTIN GROUPS I 17 are orthogonal. The former is impossible since li0 and lj0 have infinite Hausdorff distance. Thus {li0 }ni=1 is a mutually orthogonal collection. Let Γ01 = V10 ◦V20 ◦· · ·◦Vn0 ⊂ Γ0 . Then each Vi0 has to be a discrete full subgraph by our dimension assumption. Let {Fλ }λ∈Λ be the collection of top dimensional flats ∞ in K and let Fλ0 be the unique flat such that q(Fλ ) = Fλ0 . Note that for arbitrary Fλ1 and Fλ2 , there exists a finite chain in {Fλ }λ∈Λ which starts with Fλ1 and ends with Fλ2 such that the intersection of adjacent elements in the chain contains a top dimensional orthant. Thus the collection {Fλ0 }λ∈Λ also have this property. Then ∪λ∈Λ Fλ0 is contained in a standard subcomplex of X(Γ0 ) with defining graph Γ01 . It remains to deal with the case where there exist i 6= j such that |Vi | = 1 and |Vj | ≥ 2. We suppose |V Qi |m= 1 for 1 ≤ i ≤ m and |Vi | ≥ 2 for i > m. By applying Lemma 3.6 with F = i=1 Ti , we can reduce to lower dimensional case and the lemma follows by induction on dimension.  Corollary 3.12. Let q : X(Γ) → X(Γ0 ) be a quasi-isometry and let K be a top dimensional maximal standard tree product, i.e. K is not properly contained in another tree product. Then there exists a standard tree product K 0 ⊂ X(Γ0 ) such ∞ that q(K) = K 0 . 3.2. Standard flats in transvection free RAAG’s. Up to now, we have only dealt with top dimensional standard subcomplexes. The next goal is to study those standard subcomplexes which are not necessarily top dimensional. In particular, we are interested in whether quasi-isometries will preserve standard flats up to finite Hausdorff distance. The answer turns out to be related to the outer automorphism group of G(Γ). One direction is obvious, namely, if for any quasi-isometry q : X(Γ) → X(Γ0 ), q maps any standard flat in X(Γ) to a standard flat in X(Γ0 ) up to finite Hausdorff distance, then Out(G(Γ)) must be transvection free (i.e. Out(G(Γ)) does not contain any transvections). The converse is also true. Now we set up several necessary tools to prove the converse. In this section, Γ will always be a finite simplicial graph. Definition 3.13. A subgraph Γ1 ⊂ Γ is stable in Γ if (1) Γ1 is a full subgraph. (2) Let K ⊂ X(Γ) be a standard subcomplex such that ΓK = Γ1 and let Γ0 be a finite simplicial graph so that, for some L, A, there is an (L, A)-quasiisometry q : X(Γ) → X(Γ0 ). Then there exists D = D(L, A, Γ1 , Γ) > 0 and a standard subcomplex K 0 ⊂ X(Γ0 ) such that dH (q(K), K 0 ) < D. For simplicity, we will also say the pair (Γ1 , Γ) is stable in this case. A standard subcomplex K ⊂ X(Γ) is stable if it arises from a stable subgraph of Γ. We claim the defining graph ΓK 0 of K 0 is stable in Γ0 . To see this, pick any graph Γ00 so that there is an (L, A)-quasi-isometry q 0 : X(Γ0 ) → X(Γ00 ), and pick any standard subcomplex K10 ⊂ X(Γ0 ) with defining graph ΓK 0 . Note that there is an isometry i : X(Γ0 ) → X(Γ0 ) such that i(K 0 ) = K10 . Since the map q 0 ◦ i ◦ q is a quasi-isometry from X(Γ) to X(Γ00 ), then by the stability of Γ1 , q 0 ◦ i ◦ q(K) is Hausdorff close to a standard subcomplex in X(Γ00 ), hence the same is true for q 0 (K10 ). It follows from this claim that one can obtain quasi-isometric invariants by identifying certain classes of stable subgraphs. 18 JINGYIN HUANG It is immediate from the definition that for finite simplicial graphs Γ1 ⊂ Γ2 ⊂ Γ3 , if (Γ1 , Γ2 ) is stable and (Γ2 , Γ3 ) is stable, then (Γ1 , Γ3 ) is stable. However, it is not necessarily true that if (Γ1 , Γ3 ) and (Γ2 , Γ3 ) are stable, then (Γ1 , Γ2 ) is stable. In the sequel, we will investigate several other properties of stable subgraph. The following lemma is an easy consequence of Lemma 3.1 and Remark 2.6: Lemma 3.14. Suppose Γ1 and Γ2 are stable in Γ. Then Γ1 ∩ Γ2 is also stable in Γ. The following result follows from Lemma 2.9. Lemma 3.15. If Γ1 is stable in Γ, then every connected component of Γ1 that contains more than one point is also stable in Γ. Lemma 3.16. Suppose Γ1 is stable in Γ. Let V be the vertex set of Γ1 and let Γ2 be the full subgraph spanned by V and the orthogonal complement V ⊥ . Then Γ2 is also stable in Γ. Proof. Let K2 ⊂ X(Γ) be a standard subcomplex with its defining graph ΓK2 = Γ2 and let K1 ⊂ K2 be any standard subcomplex satisfying ΓK1 = Γ1 . Lemma 3.4 implies K2 = PK1 = K1 × K1⊥ . For vertex x ∈ K1⊥ , denote Kx = K1 × {x}. Let q : X(Γ) → X(Γ0 ) be an (L, A)-quasi-isometry. Then there exists standard ∞ subcomplex Kx0 such that dH (q(Kx ), Kx0 ) < D = D(L, A, Γ1 , Γ). Thus Kx0 = Ky0 for vertices x, y ∈ K1⊥ . It follows from Lemma 3.1 that Kx0 and Ky0 are parallel. Thus q(PK1 ) ⊂R PKx0 for R = D+L+A. Moreover, PKx0 is also a standard subcomplex by Lemma 3.4. By considering the quasi-isometry inverse and repeating the previous ∞ argument, we know q(PK1 ) = PKx0 , thus Γ2 is also stable in Γ.  Lemma 3.17. Suppose Γ1 is stable in Γ. Pick vertex v ∈ / Γ1 , then the full subgraph spanned by v ⊥ ∩ Γ1 is stable in Γ. Proof. We use Γ2 to denote the full subgraph spanned by v ⊥ ∩ Γ1 . Let K2 ⊂ X(Γ) be a standard subcomplex such that ΓK2 = Γ2 and let K1 ⊂ X(Γ) be the unique standard subcomplex such that ΓK1 = Γ1 and K2 ⊂ K1 . Pick vertex x ∈ K2 and let e ⊂ X(Γ) to be the edge such that Ve = v and x ∈ e. Suppose x̄ is the other end point of e. Let K̄i be the standard subcomplex that contains x̄ and has defining graph Γi for i = 1, 2. Denote the hyperplane dual to e by h. Since v ∈ / Γ1 , h ∩ K1 = ∅ and h ∩ K̄1 = ∅, thus h separates K1 and K̄1 and d(K1 , K̄1 ) = 1. It D follows from Corollary 3.2 that I(K1 , K̄1 ) = (K2 , K̄2 ), in particular K2 = K1 ∩R K̄1 for D depending on R and the dimension of X(Γ). Now the lemma follows since Γ1 is stable.  The next result is a direct consequence of Corollary 3.12. Lemma 3.18. If Γ1 is stable in Γ, then there exists Γ2 which is stable in Γ1 such that (1) Γ2 is a graph join Γ̄1 ◦ Γ̄2 ◦ · · · ◦ Γ̄k where Γ̄i is discrete for 1 ≤ i ≤ k. (2) k = dim(X(Γ1 )). Lemma 3.19. Let Γ be a finite simplicial graph such that there do not exist vertices v 6= w of Γ such that v ⊥ ⊂ St(w). Then every stable subgraph of Γ contains a stable vertex. QUASI-ISOMETRIC CLASSIFICATION OF RIGHT-ANGLED ARTIN GROUPS I 19 Proof. Let Γ1 be a minimal stable subgraph, i.e. it does not properly contain any stable subgraph of Γ. It suffices to show Γ1 is a point. We argue by contradiction and assume Γ1 contains more than one point. First we claim Γ1 can not be discrete. Suppose the contrary is true. Pick vertices v, w ∈ Γ1 and pick vertex u ∈ v ⊥ \ St(w). By Lemma 3.17, u⊥ ∩ Γ1 is also stable. Note that v ∈ u⊥ ∩ Γ1 and w ∈ / u⊥ ∩ Γ1 , which contradicts the minimality of Γ1 . We claim Γ1 must be a clique. Since Γ1 is not discrete, by Lemma 3.18, we can find a stable subgraph (3.20) Γ2 = Γ̄1 ◦ Γ̄2 ◦ · · · ◦ Γ̄m ⊂ Γ1 where {Γ̄i }m i=1 are discrete full subgraphs and m ≥ 2. Then Γ2 = Γ1 . Suppose some Γ̄i contains more than one point, and let Γ3 be the join of the remaining join factors. Then Theorem 2.10 implies that Γ3 is stable, contradicting the minimality of Γ1 . Therefore Γ1 is a clique. Pick distinct vertices v1 , v2 ∈ Γ1 . By our assumption, there exists vertex w ∈ v1⊥ \ St(v2 ). Since Γ1 is a clique, Γ1 ⊂ St(v2 ), then w ∈ / Γ1 . Let Γ4 be the full subgraph spanned by w⊥ ∩ Γ1 . Then Γ4 is stable by Lemma 3.17. Moreover, Γ4 ( Γ1 (since v2 ∈ / Γ4 ), which yields a contradiction.  Lemma 3.21. Let Γ be as in Lemma 3.19 and let Γ1 be a stable subgraph of Γ. Then for any vertex w ∈ Γ1 , there exists a stable vertex v ∈ Γ1 such that d(v, w) ≤ 1. Proof. Denote the combinatorial distance in Γ and Γ1 by d and d1 respectively. Since Γ1 is a full subgraph, d(x, y) = 1 if and only if d1 (x, y) = 1 and d(x, y) ≥ 2 if and only if d1 (x, y) ≥ 2 for vertices x, y ∈ Γ1 . If w is isolated in Γ1 , then we can use the argument in the second paragraph of the proof of Lemma 3.19 to get rid of all vertices in Γ1 except w, which implies w is a stable vertex. If w is not isolated, we can assume Γ1 is connected by Lemma 3.15. By Lemma 3.19, there exists a stable vertex u ∈ Γ1 . If d1 (u, w) ≤ 1, then we are done, otherwise let ω be a geodesic in Γ1 connecting u and w (ω might not be a geodesic in Γ) and let {vi }ni=0 be the consecutive vertices in ω, here v0 = w, vn = u and n = d1 (w, u). Since u is stable, by Lemma 3.16, St(u) is also stable. Note that d1 (vn−2 , u) = 2, ⊥ so d(vn−2 , u) = 2 and vn−2 ∈ / St(u). Lemma 3.17 implies vn−2 ∩ St(u) is stable and ⊥ ⊥ by Lemma 3.14, vn−2 ∩St(u)∩Γ1 is also stable. Note that vn−2 ∩St(u)∩Γ1 6= ∅ since ⊥ it contains vn−1 . Lemma 3.19 implies there is a stable vertex u0 ∈ vn−2 ∩ St(u) ∩ Γ1 0 and it is easy to see d1 (w, u ) = n − 1. Now the lemma follows by induction.  Lemma 3.22. Let Γ be as in Lemma 3.19. Then every vertex of Γ is stable. Proof. Let Γw be the intersection of all stable subgraphs that contain w. By Lemma 3.14, Γw is the minimal stable subgraph that contains w. It suffices to prove Γw = {w}. We argue by contradiction and denote the vertices in Γw \ {w} by {vi }ki=1 . The minimality of Γw implies we can not use Lemma 3.17 to get rid of some vi while keep w, thus w⊥ \ St(vi ) ⊂ {v1 · · · vi−1 , vi+1 · · · vk } for any i, in other words (3.23) w⊥ ⊂ St(vi ) ∪ {v1 · · · vi−1 , vi+1 · · · vk } for 1 ≤ i ≤ k. Then there does not exist i such that Γw ⊂ St(vi ), otherwise we would have w⊥ ⊂ St(vi ) by (3.23). 20 JINGYIN HUANG On the other hand, Lemma 3.21 implies there exists a stable vertex u ∈ Γw with d(w, u) = 1. Then St(u) is stable (Lemma 3.16) and St(u) ∩ Γw is stable (Lemma 3.14). Note that w ∈ St(u) ∩ Γw , by the minimality of Γw , Γw ⊂ St(u), which yields a contradiction.  Lemma 3.24. Let Γ be a finite simplicial graph and pick stable subgraphs Γ1 , Γ2 of Γ. Let Γ̄ be the full subgraph spanned by V and V ⊥ where V = VΓ1 . If Γ2 ⊂ Γ̄, then the full subgraph spanned by Γ1 ∪ Γ2 is stable in Γ. To simplify notation, in the following proof, we will denote q(K) ≈ K 0 where q, K and K 0 are as in Definition 3.13. We will also assume without loss of generality that q(K) ⊂ K 0 . Proof. Let q : X(Γ) → X(Γ0 ) be an (L, A)-quasi-isometry. Suppose K1 and K are standard subcomplexes in X(Γ) such that ΓK1 = Γ1 , ΓK = Γ̄ and K1 ⊂ K. Put K 0 ≈ q(K), K10 ≈ q(K1 ), K = K1 × K1⊥ and K 0 = K10 × K10⊥ . The proof of Lemma 3.16 implies there exist a quasi-isometry q 0 : K1⊥ → K10⊥ and a constant D1 = D1 (L, A, Γ1 , Γ) such that (3.25) d(q 0 ◦ p2 (x), p02 ◦ q(x)) < D1 for any x ∈ K where p2 : K → K1⊥ and p02 : K 0 → K10⊥ are projections. Let Γ2 = Γ21 ◦Γ22 where Γ21 = Γ1 ∩Γ2 and let K22 , K2 be standard subcomplexes such that ΓK22 = Γ22 , ΓK2 = Γ2 and K22 ⊂ K2 ⊂ K. By (3.25), it suffices to prove 0 there exist a standard subcomplex K22 ⊂ K 0 and a constant D = D(L, A, Γ1 , Γ2 , Γ) 0 0 such that dH (p2 ◦ q(K22 ), K22 ) < D. Let K20 ≈ q(K2 ). Then K20 ⊂ K 0 and p02 (K20 ) ∞ ∞ is a standard subcomplex. By (3.25), p02 ◦ q(K22 ) = p02 ◦ q(K2 ) = p02 (K20 ), thus we 0 can take K22 = p02 (K20 ).  Remark 3.26. In general the full subgraph spanned by Γ1 ∪ Γ2 is not necessarily stable even if Γ1 and Γ2 are stable, see Remark 3.35. The next theorem follows from Lemma 3.22 and Lemma 3.24. Theorem 3.27. Given finite simplicial graph Γ, the following are equivalent: (1) Out(G(Γ)) is transvection free. (2) For any (L, A)-quasi-isometry q : X(Γ) → X(Γ0 ), there exists positive constant D = D(L, A, Γ) such that for any standard flat F ⊂ X(Γ), there exists a standard flat F 0 ⊂ X(Γ0 ) such that dH (q(F ), F 0 ) < D. 3.3. Standard flats in general RAAG’s. At this point, we have the following natural questions: (1) In Theorem 3.27, is it true that every standard flat in X(Γ0 ) comes from some standard flat in X(Γ)? A related question could be, is condition (1) in Theorem 3.27 a quasi-isometric invariant for right-angled Artin groups? (2) What can we say about the stable subgraphs of Γ if we drop condition (1) in Theorem 3.27? We will first give a negative answer to question (1) in Example 3.29 below. Then we will prove the Theorem 3.28, which answers question (2). Section 4, and in particular the proof of Theorem 1.1, will not depend on this subsection. However, we will need Theorem 3.28 and Lemma 3.30 for Section 5. QUASI-ISOMETRIC CLASSIFICATION OF RIGHT-ANGLED ARTIN GROUPS I 21 Theorem 3.28. Let Γ be an arbitrary finite simplicial graph. A clique Γ1 ⊂ Γ is stable if and only if there do not exist vertices w ∈ Γ1 and v ∈ Γ \ Γ1 such that w⊥ ⊂ St(v). In other words, the clique Γ1 is stable if and only if the corresponding Zn subgroup of G(Γ1 ) is invariant under all transvections. Example 3.29. Let Γ1 be the graph on the left and let Γ2 be the one on the right. It is easy to see Out(G(Γ1 )) is transvection free while Out(G(Γ2 )) contains nontrivial transvection (Γ2 has a dead end at vertex u). We claim G(Γ1 ) and G(Γ2 ) are commensurable, and in particular quasi-isometric. w z k v u Let Γ ⊂ Γ1 be the pentagon on the left side and let Y be the Salvetti complex of Γ. Suppose X1 = Y t Y t (S 1 × [0, 1])/ ∼, here the two boundary circles of the annulus are identified with two standard circles which are in different copies of Y . Then π1 (X1 ) = G(Γ1 ). Define homomorphism h1 : G(Γ) → Z/2 by sending w to the non-trivial element in Z/2 and other generators to the identity element. Let Y 0 be the 2-sheet cover of Y with respect to ker(h1 ). Define homomorphism h2 : G(Γ1 ) → Z/2 by sending w and k to the non-trivial element in Z/2 and other generators to the identity element. Let X be the 2-sheet cover of X1 with respect to ker(h2 ). Then X is made of two copies of Y 0 and two annuli with the boundaries of the annuli identified with the v-circles in Y 0 (each Y 0 has two v-circles which cover the v-circle in Y ), see the picture below. X is homotopy equivalent to a Salvetti complex. To see this, let Sw be the circle in Y 0 which covers the w-circle in Y two times and let Sz ∨ Sv be a wedge of the two circles in Y 0 which covers the wedge of z-circle and v-circle in Y . There is a copy of Sw × (Sz ∨ Sv ) inside Y 0 . Let I be a segment in Sw such that its end points are mapped to the base point of Y under the covering map. We collapse I × (Sz ∨ Sv ) to {pt} × (Sz ∨ Sv ) inside each copy of Y 0 in X, and collapse one of the annuli in X to a circle by killing the interval factor. Denote the resulting space by X 0 . Then X 0 is homotopy equivalent to X and the un-collapsed annulus in X becomes a torus in X 0 . It is not hard to see X 0 is a Salvetti complex with defining graph Γ2 . Any standard geodesic in X(Γ2 ) which comes from vertex u is not Hausdorff close to a quasi-isometric image of some standard geodesic in X(Γ1 ), since u is not a stable vertex while every vertex in Γ1 is stable. 22 JINGYIN HUANG Here is a generalization of the above example. Suppose Γ is a finite simplicial graph such that there exist vertices v1 , v2 ∈ Γ with d(v1 , v2 ) = 2 so that they are separated by the intersection of links lk(v1 ) ∩ lk(v2 ). Define a homomorphism h : G(Γ) → Z/2 by sending v1 and v2 to the non-trivial element in Z/2 and killing all other generators. Then ker(h) is also a right-angled Artin group by the same argument as before. To find its defining graph, let {Ci }ni=1 be the components of Γ \ (lk(v1 ) ∩ lk(v2 )) and suppose v1 ∈ C1 . Define Γ1 = C1 ∪ (lk(v1 ) ∩ lk(v2 )) and Γ2 = (∪ni=2 Ci ) ∪ (lk(v1 ) ∩ lk(v2 )). Then Γ1 and Γ2 are full subgraphs of Γ, moreover, St(vi ) ∈ Ci . For i = 1, 2, let Γ0i be the graph obtained by gluing two copies of Γi along St(vi ) and let Γ03 be the join of one point and lk(v1 ) ∩ lk(v2 ). Then the defining graph of ker(h) can be obtained by gluing Γ01 , Γ02 and Γ03 along lk(v1 ) ∩ lk(v2 ). Note that we are taking advantage of separating closed stars while constructing the counterexample. If separating closed stars are not allowed in Γ, then we have a positive answer to question (1) (see Section 5). In the rest of this subsection, we will prove Theorem 3.28. Γ will be an arbitrary finite simplicial graph in the rest of this subsection. Theorem 3.28 is actually a consequence of the following more general result. Lemma 3.30. Pick a vertex w ∈ Γ and let Γw be the intersection of all stable subgraphs of Γ that contain w. Define W = {w0 ∈ Γ | w⊥ ⊂ St(w0 )}. Then Γw is the full subgraph spanned by W . In other words, G(Γw ) ≤ G(Γ) is the minimal standard subgroup containing w with the property that G(Γw ) is invariant under any transvection. Now we show how to deduce Theorem 3.28 from Lemma 3.30 Proof of Theorem 3.28. The only if part can be proved by contradiction (choose a transvection which does not preserve the subgroup G(Γ1 )). For the converse, let {vi }ni=1 be the vertex set of Γ1 and let Γvi be the minimal stable subgraph that contains vi for 1 ≤ i ≤ n. By our assumption and Lemma 3.30, Γvi ⊂ Γ1 . Thus the full subgraph spanned by ∪ni=1 Γvi is stable by Lemma 3.24, which means Γ1 is stable.  It remains to prove Lemma 3.30. We first set up several auxiliary lemmas. Lemma 3.31. Let v ∈ Γ be a vertex which is not isolated. Then at least one of the following is true: QUASI-ISOMETRIC CLASSIFICATION OF RIGHT-ANGLED ARTIN GROUPS I 23 (1) v is contained in a stable discrete subgraph with more than one vertex. (2) v is contained in a stable clique subgraph. (3) There is a stable discrete subgraph with more than one vertex whose vertex set is in v ⊥ . (4) There is a stable clique subgraph whose vertex set is in v ⊥ . Proof. Since v is not isolated, we can assume Γ is connected by Lemma 3.15. By Lemma 3.18, we can find a stable subgraph Γ1 = Γ̄1 ◦ Γ̄2 ◦ · · · ◦ Γ̄n where {Γ̄i }ni=1 are discrete full subgraphs and n = dim(X(Γ)). If v ∈ Γ1 , then by the third paragraph of the proof of Lemma 3.19, we know either (1), (2) or (4) is true. Suppose d(v, Γ1 ) = 1. Let Γ2 be the full subgraph spanned by v ⊥ ∩ Γ1 . Then Γ2 is stable by Lemma 3.17. The proof of Lemma 3.19 implies every stable subgraph of Γ contains either a stable discrete subgraph or a stable clique subgraph (this does not depend on the v ⊥ * St(w) assumption), thus either (3) or (4) is true. Suppose d(v, Γ1 ) ≥ 2. Pick vertex u ∈ Γ1 such that d(v, u) = d(v, Γ1 ) = n and let ω be a geodesic connecting v and u. Suppose {vi }ni=0 are the consecutive vertices ⊥ in ω such that v0 = v and vn = u. Let Γ0 be the full subgraph spanned by vn−1 ∩Γ 00 ⊥ and let Γ be the full subgraph spanned by V and V where V = VΓ0 (the vertex set of Γ0 ). Then Γ0 is stable by Lemma 3.17 and Γ00 is stable by Lemma 3.16. Note that d(v, x) ≥ n for any vertex x ∈ V , so d(v, y) ≥ n − 1 for any vertex y ∈ V ⊥ . Thus d(v, Γ00 ) ≥ n − 1. However, vn−1 ∈ Γ00 . So d(v, Γ00 ) = n − 1. Now we can induct on n and reduce to the d(v, Γ1 ) = 1 case.  It is interesting to see that if Γ has large diameter, then there are a lot of nontrivial stable subgraphs. We record the following lemma which is an easy consequence of Theorem 2.10. Lemma 3.32. Suppose Γ = Γ1 ◦ Γ2 where Γ1 is the maximal clique join factor of Γ. If Γ02 is stable in Γ2 , then Γ1 ◦ Γ02 is stable in Γ. Now we are ready to prove Lemma 3.30. Proof of Lemma 3.30. By Lemma 3.14, Γw is the minimal stable subgraph that contains w. If there exists vertex w0 ∈ W such that w0 ∈ / Γw , then sending w → ww0 and fixing all other vertices would induce a group automorphism, which gives rise to a quasi-isometry from X(Γ) to X(Γ). The existence of such quasi-isometry would contradict the stability of Γw , thus W ⊂ Γw . Let W 0 be the vertex set of Γw . It remains to prove W 0 ⊂ W . Suppose W ( W 0 and let u ∈ W 0 \ W . Then ∅ 6= w⊥ \ St(u). The minimality of Γw implies we can not use Lemma 3.17 to get rid of u while keep w, then w⊥ \ St(u) ⊂ W 0 \ {u, w}. In summary, (3.33) ∅= 6 w⊥ \ St(u) ⊂ W 0 \ {u, w}. In particular, w is not isolated in Γw and (3.34) Γw * St(u). Now we apply Lemma 3.31 to Γw and w, and recall that if a subgraph is stable in Γw , then it is stable in Γ. If case (1) in Lemma 3.31 is true, then we will get a contradiction since w is not isolated in Γw . If case (2) is true, then Γw sits inside some clique, which is contradictory to (3.34). If case (3) is true, let Γ1 ⊂ Γw be the corresponding stable discrete subgraph. Let V1 = VΓ1 and let V10 = {u ∈ Γw | d(u, v) = 1 for any v ∈ V1 }. Suppose Γ0w is 24 JINGYIN HUANG the full subgraph spanned by V1 and V10 . Then Γ0w is stable by Lemma 3.16, hence Γ0w = Γw . Let Γw = Γ̄1 ◦ Γ̄2 ◦ · · · ◦ Γ̄k be the join decomposition induced by the De Rahm decomposition of X(Γw ). Then k ≥ 2 and u does not sit inside the clique factor by (3.34). If there is no clique factor, then each join factor is stable by Theorem 2.10 and w is inside one of the join factors, which contradict the minimality of Γw . If the clique factor exists and w sits inside the clique factor, then by Theorem 2.10, the clique factor is stable and we have the same contradiction as before. If the clique factor exists and w sits outside the clique factor, this reduces to the next case. If case (4) is true, let Γ2 ⊂ Γw be the corresponding stable clique subgraph. We can also assume without loss of generality that w is not contained in a stable clique. Let V2 = VΓ2 and V20 = {u ∈ Γw | d(u, v) = 1 for any v ∈ V2 }. Suppose Γ00w is the full subgraph spanned by V2 and V20 . Then Γ00w = Γw as before. Let Γw = Γ01 ◦ Γ02 where Γ01 corresponds to the Euclidean De Rahm factor of X(Γw ). Note that Γ02 is non-trivial and w, u ∈ Γ02 as in the discussion of case (3). Equation (3.33) implies that w⊥ * St(u) is still true if we take the orthogonal complement of w and the closed star of u in Γ02 , in particular, w is not isolated in Γ02 . Moreover, dim(X(Γ02 )) < dim(X(Γw )) ≤ dim(X(Γ)). If dim(X(Γ)) = 2, then Γ02 has to be discrete, which is contradictory to that w is not isolated in Γ02 . If dim(X(Γ)) = n > 2, by induction we can assume the lemma is true for all lower dimensional graphs. Then there exists Γ̄w stable in Γ02 such that w ∈ Γ̄w and u ∈ / Γ̄w . By Lemma 3.32, Γ̄w ◦ Γ01 is stable in Γw , hence in Γ, which contradicts the minimality of Γw .  Remark 3.35. It is nature to ask whether Theorem 3.28 is still true if we do not require Γ1 to be a clique. There turns out to be counterexamples. Let Γ be the graph as below and Γ1 ⊂ Γ be the disjoint union of v and w. It is easy to check there do not exist v1 ∈ Γ1 and v2 ∈ Γ \ Γ1 such that v1⊥ ⊂ St(v2 ). Note that St(u) separates Γ, then we get a partial conjugation that sends v → v and w → u−1 wu, which implies Γ1 is not stable. v u w A more interesting example (but of the same nature) is the following. Let Γ1 be the graph in the left side as below and Γ2 be the graph in the right side. Then G(Γ1 ) is quasi-isometric to G(Γ2 ) by the discussion in Section 11 of [BKS08a]. Let q : X(Γ2 ) → X(Γ1 ) be a quasi-isometry and let K be a standard subcomplex in X(Γ2 ) such that its defining graph ΓK is a pentagon in Γ2 . Suppose q(K) is Hausdorff close to a standard subcomplex K 0 in X(Γ). Then ΓK 0 must be a connected proper subgraph of Γ1 , hence is a tree. But this is impossible by the results in [BN08]. QUASI-ISOMETRIC CLASSIFICATION OF RIGHT-ANGLED ARTIN GROUPS I 25 4. From quasi-isometries to isomorphisms 4.1. The extension complexes. 4.1.1. Extension complexes and standard flats. Let q : X(Γ) → X(Γ0 ) be a quasiisometry. Usually q does not induce a well-defined boundary map, see [CK00]. However, Theorem 3.27 implies we still have control on a subset of the Tits boundaries when Out(G(Γ)) and Out(G(Γ0 )) are transvection free. In this subsection, we will reorganize this piece of information in terms of extension complexes. Recall that we identify the vertex set of Γ with a standard generating set S of G(Γ). And we also label the standard circles in the Salvetti complex by elements in S. By choosing an orientation for each standard circle, we obtain a directed labeling of edges in X(Γ). Denote the extension complex of Γ by P(Γ). We give an alternative definition of P(Γ) here, which is natural for our purposes. The vertices of P(Γ) are in 1-1 correspondence with the parallel classes of standard geodesics in X(Γ) (two standard geodesics are in the same parallel class if they are parallel). Two distinct vertices v1 , v2 ∈ P(Γ) are connected by an edge if and only if we can find standard geodesic li in the parallel class associated with vi (i = 1, 2) such that l1 and l2 span a standard 2-flat. The next observation follows from Lemma 3.1 and Lemma 2.4: Observation 4.1. If v1 6= v2 , then v1 and v2 are joined by an edge if and only if there exist li0 in the parallel class associated with vi (i = 1, 2) and R > 0 such that l10 ⊂ NR (Pl20 ). P(Γ) is defined to be the flag complex of its 1-skeleton. Lemma 4.2. P(Γ) is isomorphic to the extension complex of Γ. Proof. It suffices to show the 1-skeleton of P(Γ) is isomorphic to the extension graph Γe . Pick vertex v ∈ P(Γ) and let l be a standard geodesic in the parallel class associated with v. We identify l with R in an orientation-preserving way (the orientation in l is induced by the directed labeling). Recall that G(Γ) y X(Γ) by deck transformations. Let αv ∈ G(Γ) be the element such that αv (l) = l and αv (x) = x + 1 for any x ∈ l. It is easy to see αv is conjugate to an element in S, thus αv gives rise a vertex αv ∈ Γe by Definition 2.12. Note that αv does not depend the choice of l in the parallel class, so we have a well-defined map from the vertex set of P(Γ) to the vertex set of Γe . Moreover, if v1 and v2 are adjacent, then αv1 and αv2 commute. Now we define an inverse map. Pick α = gsg −1 ∈ Γe (s ∈ S). Then all standard geodesics which are stabilized by α are in the same parallel class. Let vα be the vertex in P(Γ) associated with this parallel class. We map the vertex α of Γe to the vertex vα . Now we show this map extends to the 1-skeleton. For i = 1, 2, let αi = gi si gi−1 ∈ Γe . By the centralizer theorem of [SDS89], α1 and α2 commute if 26 JINGYIN HUANG and only if [s1 , s2 ] = 1 and there exists g ∈ G(Γ) such that αi = gsi g −1 . Thus vα1 and vα2 are adjacent in P(Γ).  Since every edge in the standard geodesics of the same parallel class has the same label, the labeling of the edges of X(Γ) induces a labeling of the vertices of P(Γ). Moreover, since G(Γ) y X(Γ) by label-preserving cubical isomorphisms, we obtain an induced action G(Γ) y P(Γ) by label-preserving simplicial isomorphisms. Moreover, the unique label-preserving map from the vertices of P(Γ) to the vertices of F (Γ) extends to a simplicial map (4.3) π : P(Γ) → F (Γ). Pick arbitrary vertex p ∈ X(Γ), one can obtain a simplicial embedding ip from the flag complex F (Γ) of Γ to P(Γ) by considering the collection of standard geodesics passing through p. We will denote the image of ip by (F (Γ))p . Note that for each vertex p ∈ X(Γ), π ◦ ip : F (Γ) → F (Γ) is the identity map. Pick (k − 1)-simplex in P(Γ) with vertex set {vi }ki=1 and pick standard geodesic li in the parallel class associated with vi for 1 ≤ i ≤ k. Since Pli ∩ Plj 6= ∅ for 1 ≤ i 6= j ≤ k, by Lemma 2.2, ∩ki=1 Pli 6= ∅. By Corollary 3.2 and Lemma 3.4, there exist standard geodesics {li0 }ki=1 satisfying (1) li0 is parallel to li for each i. (2) The convex hull of {li0 }ki=1 is a standard k-flat, denoted by Fk . (3) ∩ki=1 Pli = PFk . Thus we have a 1-1 correspondence between the (k − 1)-simplexes of P(Γ) and parallel classes of standard k-flats in X(Γ). In particular, maximal simplexes in P(Γ), namely those simplexes which are not properly contained in some larger simplexes of P(Γ), are in 1-1 correspondence with maximal standard flats in X(Γ). For standard flat F ⊂ X(Γ), we denote the simplex in P(Γ) associated with the parallel class containing F by ∆(F ). Observation 4.4. Let ∆1 , ∆2 be two simplexes in P(Γ) such that ∆ = ∆1 ∩ ∆2 6= ∅. For i = 1, 2, let Fi ⊂ X(Γ) be a standard flat such that ∆(Fi ) = ∆i . Set (F10 , F20 ) = I(F1 , F2 ). Then ∆(F10 ) = ∆(F20 ) = ∆. We define the reduced Tits boundary, denoted ∂¯T (X(Γ)), to be the subset of ∂T (X(Γ)) which is the union of Tits boundaries of standard flats in X(Γ). For standard flat F ⊂ X(Γ), we triangulate ∂T F into all-right spherical simplexes which are the Tits boundaries of orthant subcomplexes in F . Pick another standard flat F 0 ⊂ X(Γ), then ∂T F ∩∂T F 0 is a subcomplex in both ∂T F and ∂T F 0 by Lemma 3.1 and Remark 2.6. Thus we can endow ∂¯T (X(Γ)) with the structure of an all-right spherical complex. Now we look at the relation between ∂¯T (X(Γ)) and P(Γ). For each standard flat F ⊂ X(Γ), we can associate ∂T F with ∆(F ) ⊂ P(Γ). This induces a surjective simplicial map s : ∂¯T (X(Γ)) → P(Γ) (s can be defined by induction on dimension). Note that the inverse image of each simplex in P(Γ) under s is a sphere in ∂¯T (X(Γ)). Then one can construct ∂¯T (X(Γ)) from P(Γ) as follows. We start with a collection of S0 ’s which are in 1-1 correspondence to vertices of P(Γ) and form a join of n copies of S0 ’s if and only if the corresponding n vertices in P(Γ) span a (n − 1)simplex. In other words, ∂¯T (X(Γ)) is obtained by applying the spherical complex construction in the sense of [BRS07, Definition 2.1.22] to P(Γ). QUASI-ISOMETRIC CLASSIFICATION OF RIGHT-ANGLED ARTIN GROUPS I 27 Let K1 ⊂ X(Γ) be a standard subcomplex. We define ∂¯T (K1 ) to be the union of Tits boundaries of standard flats in K1 . Note that ∂¯T (K1 ) = ∂¯T (X(Γ)) ∩ ∂T K1 . ∂¯T (K1 ) descends to a subcomplex in P(Γ), which will be denoted by ∆(K1 ). Lemma 4.5. Let K1 and K2 be two standard subcomplexes of X(Γ). Put (K10 , K20 ) = I(K1 , K2 ). Then ∆(K10 ) = ∆(K20 ) = ∆(K1 ) ∩ ∆(K2 ). Proof. By Remark 2.6, we have ∂T K10 = ∂T K20 = ∂T K1 ∩ ∂T K2 , hence ∂¯T K10 = ∂¯T K20 = ∂¯T K1 ∩ ∂¯T K2 and ∆(K10 ) = ∆(K20 ) = ∆(K1 ) ∩ ∆(K2 ).  Now we study how the extension complexes behave under quasi-isometries. Lemma 4.6. Pick Γ1 and Γ2 such that Out(G(Γi )) is transvection free for i = 1, 2. Then any quasi-isometry q : X(Γ1 ) → X(Γ2 ) induces a simplicial isomorphism q∗ : P(Γ1 ) → P(Γ2 ). If only Out(G(Γ1 )) is assumed to be transvection free, we still have a simplicial embedding q∗ : P(Γ1 ) → P(Γ2 ). Proof. We only proof the case when both Out(G(Γ1 )) and Out(G(Γ2 )) are transvection free. The other case is similar. By Theorem 3.27, every vertex in Γ1 is stable, thus q sends any parallel class of standard geodesics in X(Γ1 ) to another parallel class of standard geodesics in X(Γ2 ) up to finite Hausdorff distance. This induces a well-defined map q∗ from the 0-skeleton of P(Γ1 ) to the 0-skeleton of P(Γ2 ). The map q∗ is a bijection by considering the quasi-isometry inverse. Moreover, Observation 4.1 implies two vertices in P(Γ1 ) are adjacent if and only if their images under q∗ are adjacent. So we can extend q∗ to be a graph isomorphism between the 1-skeleton of P(Γ1 ) and the 1-skeleton of P(Γ2 ). Since both P(Γ1 ) and P(Γ2 ) are flag complexes, we can extend the isomorphism to the whole complex.  4.1.2. Extension complexes and their relatives. Now we discuss the relation between P(Γ) with several other objects in the literature. The material in this subsection will not be used later. We can endow F (Γ) with the structure of complex of groups, which gives us an alternative definition of P(Γ). More specifically, P(Γ) = F (Γ) × G(Γ)/ ∼, here St(v) × g1 and St(v) × g2 (v ∈ F (Γ) is a vertex) are identified if and only if there exists an integer m such that g1−1 g2 = v m (we also view v as one of the generators of G(Γ)). Hence for k-simplex ∆k ⊂ F (Γ) with vertex set {vi }ki=1 , St(∆k ) × g1 and St(∆k ) × g2 are identified if and only if g1−1 g2 belongs to the Zk subgroup of G(Γ) generated by {vi }ki=1 . One can compare this with a similar construction for Coxeter group in [Dav83]. There is another important object associated with a right-angled Artin group, called the modified Deligne complex in [CD95] and the flat space in [BKS08a]. Definition 4.7. Let P(Γ) be poset of left cosets of standard abelian subgroups of G(Γ) (include the trivial subgroup) such that the partial order is induced by inclusion of sets. Then the modified Deligne complex is defined to be the geometric realization of the derived poset of P(Γ). Recall that elements in the derived poset of a poset P are totally ordered finite chains in P. It can be viewed as an abstract simplex. The extension complex P(Γ) can be viewed as a coarse version of the modified Deligne complex. Let A, B be two subsets of a metric space. We say A and B are ∞ coarsely equivalent if A = B, and A are coarsely contained in B if A ⊂∞ B. Let 0 P (Γ) be the poset whose elements are coarsely equivalent classes of left cosets of 28 JINGYIN HUANG non-trivial standard abelian subgroups of G(Γ), and the partial order is induced by coarse inclusion of sets. Observation 4.8. The poset P0 (Γ) is an abstract simplicial complex and it is isomorphic to P(Γ). Roughly speaking, P(Γ) captures the combinatorial pattern of how standard flats in X(Γ) intersect with each other, and P(Γ) is about how they coarsely intersect with each other, thus P(Γ) contains more information than P(Γ). However, in certain cases, it is possible to recover information about P(Γ) from P(Γ), and this enable us to prove quasi-isometric classification/rigidity results for RAAG’s. We can define the poset P0 (Γ) for arbitrary Artin group by considering the collection of coarse equivalent classes of spherical subgroups in an Artin group under coarse inclusion. Then the geometric realization of the derived poset of P0 (Γ) would be a natural candidate for the extension complex of an Artin group. It is interesting to ask how much of the results in [KK14] can be generalized to this context. There is also a link between P(Γ) and the structure of hyperplanes in X(Γ). Recall that for every CAT (0) cube complex X, the crossing graph of X, denoted by C(X), is a graph whose vertices are in 1-1 correspondence to the hyperplanes in X, and two vertices are adjacent if and only if the corresponding hyperplanes intersect. The contact graph, introduced in [Hag14] and denoted by C(X), has the same vertex set as C(X), and two vertices are adjacent if and only if the carriers of the corresponding hyperplanes intersect. There is a natural surjective simplicial map p : C(X(Γ)) → Γe defined as follows. Pick a vertex v ∈ C(X(Γ)) and let h be the corresponding hyperplane. Since all standard geodesics which intersect h at one point are in the same parallel class, we define p(v) to be the vertex in Γe associated with this parallel class (see Lemma 4.2). It is clear that if v1 , v2 ∈ C(X(Γ)) are adjacent vertices, then p(v1 ) and p(v2 ) are adjacent, so p extends to a simplicial map. Pick vertex w ∈ Γe , then p−1 (e) is the collection of hyperplanes dual to a standard geodesic. Theorem 4.9 ([KK13b, Hag14, HK14]). If Γ is connected, then C(X(Γ)), C(X(Γ)) and P(Γ) are quasi-isometric to each other, moreover, they are quasi-isometric to a tree. From this viewpoint, P(Γ) captures both the geometric information of X(Γ) (the standard flats) and the combinatorial information (the hyperplanes). 4.2. Reconstruction of quasi-isometries. We show the boundary map q∗ : P(Γ) → P(Γ0 ) in Lemma 4.6 induces a well defined map from G(Γ) to G(Γ0 ). Lemma 4.10. Let F1 and F2 be two maximal standard flats in X(Γ) and let ∆1 , ∆2 be the corresponding maximal simplexes in P(Γ). If F1 and F2 are separated by a hyperplane h, then there exist vertices vi ∈ ∆i for i = 1, 2 and v ∈ P(Γ) such that v1 and v2 are in different connected component of P(Γ) \ St(v). Proof. Let e be an edge dual to h and let l be the standard geodesic that contains e. Set v = ∆(l) ∈ P(Γ). By Lemma 3.4, the parallel set Pl of l is isometric to h × E1 . Thus every standard geodesic parallel to l must have non-trivial intersection with h. Since F1 ∩ h = ∅, F1 can not contain any standard geodesic parallel to l, which means v ∈ / ∆1 . Moreover, ∆1 * St(v) since ∆1 is a maximal simplex. Similarly, ∆2 * St(v), thus we can find vertices vi ∈ ∆i \ St(v) for i = 1, 2. We claim v1 , v2 and v are the vertices we are looking for. QUASI-ISOMETRIC CLASSIFICATION OF RIGHT-ANGLED ARTIN GROUPS I 29 If there is a path ω ⊂ P(Γ) \ St(v) connecting v1 and v2 , we can assume ω is consist of a sequence of edges {ei }ki=1 with v1 ∈ e1 and v2 ∈ ek . For each ei , pick a maximal simplex ∆0i that contains ei and let Fi0 be the maximal standard flat such that ∆(Fi0 ) = ∆0i . Then v ∈ / ∆0i for 1 ≤ i ≤ k, hence Fi0 ∩ h = ∅. 0 0 0 Set ∆0 = ∆1 , ∆k+1 = ∆2 , F00 = F1 and Fk+1 = F2 . Since ∆0i ∩ ∆0i+1 contains a vertex in ω, we have (4.11) (∆0i ∩ ∆0i+1 ) \ St(v) 6= ∅ 0 for 0 ≤ i ≤ k. Since F00 and Fk+1 are in different sides of h, there exists i0 such that 0 0 h separates Fi0 and Fi0 +1 . Let (Fi000 , Fi000 +1 ) = I(Fi00 , Fi00 +1 ). By Observation 4.4, ∆(Fi000 ) = ∆(Fi000 +1 ) = ∆0i ∩ ∆0i+1 . However, by Lemma 2.8, there exists a convex subset of h parallel to Fi000 , thus Fi000 ⊂∞ h ⊂ Pl . It follows from Observation 4.1 that ∆0i ∩ ∆0i+1 ⊂ St(v), which contradicts (4.11).  Denote the Cayley graph of G(Γ) with respect to the standard generating set S by C(Γ). We pick an identification between C(Γ) and the 1-skeleton of X(Γ). Thus G(Γ) is identified with the vertex set of X(Γ). Lemma 4.12. Let Γ1 be a finite simplicial such that (1) There is no separating closed star in F (Γ1 ). (2) F (Γ1 ) is not contained in a union of two closed stars. Then any simplicial isomorphism s : P(Γ1 ) → P(Γ2 ) induces a unique map s0 : G(Γ1 ) → G(Γ2 ) such that for any maximal standard flat F1 ⊂ X(Γ1 ), vertices in F1 are mapped by s0 to vertices lying in a maximal standard flat F2 ⊂ X(Γ2 ) with ∆(F2 ) = s0 (∆(F1 )). Proof. Pick vertex p ∈ G(Γ1 ). Let {Fi }ki=1 be the collection of maximal standard flats containing p. For 1 ≤ i ≤ k, define ∆i = ∆(Fi ) and ∆0i = s(∆i ). Let Fi0 ⊂ X(Γ2 ) be the maximal standard flat such that ∆(Fi0 ) = ∆0i . Let Kp = (F (Γ1 ))p = ∪ki=1 ∆i (recall that Kp ∼ = F (Γ1 )). We claim (4.13) ∩ki=1 Fi0 6= ∅. The lemma will then follows from (4.13). To see this, we deduce from condition (2) that ∩ki=1 ∆i = ∅. Hence ∩ki=1 Fi = {p}. It follows that ∩ki=1 ∆0i = ∅. This together with (4.13) imply that ∩ki=1 Fi0 is exactly one point. We define s0 by sending p to this point. One readily verifies that s0 has the required properties. It remains to prove (4.13). Suppose (4.13) is not true. Then by Lemma 2.2, there exist i1 and i2 such that Fi01 ∩ Fi02 = ∅. Thus Fi01 and Fi02 are separated by a hyperplane. It follows from Lemma 4.10 that there exist vertices v 0 ∈ P(Γ2 ), v10 ∈ ∆0i1 and v20 ∈ ∆0i2 such that v10 and v20 are in different connected components of P(Γ2 ) \ St(v 0 ). Let v = s−1 (v 0 ), v1 = s−1 (v10 ) and v2 = s−1 (v20 ). Then Kp \ (Kp ∩ St(v)) is disconnected (since v1 , v2 ∈ Kp and they are separated by St(v)). If v ∈ Kp , then Kp would contain a separating closed star, which yields a contradiction, thus (4.13) is true in this case. Suppose v ∈ / Kp . Pick a standard geodesic l such that ∆(l) = v and let {hi }ni=1 be the collection of hyperplanes in X(Γ) such that each hi separates p from the parallel set Pl of l (note that p ∈ / Pl ). For 1 ≤ i ≤ n, pick an edge ei dual to hi and let wi be the unique vertex in Kp that has the same label as ei . Let w0 ∈ Kp be 30 JINGYIN HUANG the unique vertex which has the same label as v. We claim (4.14) St(v) ∩ Kp = ∩ni=0 (St(wi ) ∩ Kp ). For every u ∈ Kp , let lu be the unique standard geodesic such that ∆(lu ) = u and p ∈ lu . Pick u ∈ St(v) ∩ Kp . Observation 4.1 implies I(lu , Pl ) = (lu , lu0 ), where lu0 is some standard geodesic in Pl . Then for 1 ≤ i ≤ n, hi separates lu from Pl , otherwise hi ∩ lu 6= ∅ and Lemma 2.7 implies hi ∩ Pl 6= ∅, which is a contradiction. It follows from Corollary 3.2 that u and wi are adjacent for 0 ≤ i ≤ n, thus u ∈ ∩ni=0 (St(wi ) ∩ Kp ). Therefore St(v) ∩ Kp ⊂ ∩ni=0 (St(wi ) ∩ Kp ). Pick u ∈ ∩ni=0 (St(wi ) ∩ Kp ). First we show lu ∩ Pl = ∅. Suppose there is a vertex z in lu ∩ Pl . Since v and w0 have the same label and u ∈ St(w0 ), it follows that the edge in lu which contains z belongs to the parallel set Pl . Then lu ⊂ Pl , contradicting the fact that p ∈ / Pl . Therefore lu ∩ Pl = ∅. Now we pick an edge path ω of shortest combinatorial length that travels from lu to Pl . Let {fj }m j=1 be the consecutive edges in ω such that f1 ∩ lu 6= ∅. For each fj , let h̄j be the hyperplane dual to fj . Then h̄j separates lu from Pl (otherwise ω would not be the shortest edge path), hence separates p from Pl . This and u ∈ ∩ni=0 (St(wi ) ∩ Kp ) imply that d(π(u), Vfj ) ≤ 1 for each j, where π is the map in (4.3) and Vfj is the label of the edge fj . It follows that ω is contained in the parallel set Plu , and hence the intersection Plu ∩ Pl contains some vertex z. Again, since u ∈ St(w0 ), and w0 has the same label as v, we find that the standard geodesic lu0 ⊂ Plu that is parallel to lu and passes through z, is contained in Pl . Therefore u ∈ St(v) ∩ Kp . Then (4.14) follows. By condition (2) of Lemma 4.12, we have (4.15) (St(w0 ) ∩ Kp ) ∪ (∩ni=1 (St(wi ) ∩ Kp )) ( Kp . Let A = Kp \ (St(w0 ) ∩ Kp ) and let B = Kp \ (∩ni=1 (St(wi ) ∩ Kp )). Then (4.15) implies A ∩ B 6= ∅. Thus we have the following Mayer-Vietoris sequence for reduced homology. · · · → H̃0 (A ∩ B) → H̃0 (A) ⊕ H̃0 (B) → H̃0 (A ∪ B) → 0. Recall that Kp \(Kp ∩St(v)) is disconnected, we deduce that H̃0 (A∪B) is nontrivial from (4.14). Thus H̃0 (A) ⊕ H̃0 (B) is nontrivial, which implies either ∩ni=1 (St(wi ) ∩ Kp ) or St(w0 ) ∩ Kp would separate Kp . Thus we can induct on n to deduce that there exists i0 such that St(wi0 ) ∩ Kp separates Kp . This yields a contradictory to condition (1) of Lemma 4.12.  There are counterexamples if we only assume (1) in Lemma 4.12. For example, let Γ1 and Γ2 be discrete graphs made of two points. Then P(Γ1 ) and P(Γ2 ) are discrete sets. Now it is not hard to construct a permutation of a discrete set to itself which does not satisfy the conclusion of Lemma 4.12. If we go back to the proof of Lemma 4.12, then the step using Mayer-Vietoris sequence will fail, since we need A ∩ B 6= ∅ in order to use the reduced version of Mayer-Vietoris sequence. Corollary 4.16. Suppose G(Γ1 ) and G(Γ2 ) both satisfy the assumption of Lemma 4.12. Then they are isomorphic if and only if P(Γ1 ) and P(Γ2 ) are isomorphic as simplicial complexes. Proof. The only if direction follows from the fact that G(Γ1 ) and G(Γ2 ) are isomorphic if and only if Γ1 and Γ2 are isomorphic, see [Dro87]. It remains to prove the QUASI-ISOMETRIC CLASSIFICATION OF RIGHT-ANGLED ARTIN GROUPS I 31 if direction. Pick an isomorphism s : P(Γ1 ) → P(Γ2 ), and let s0 : G(Γ1 ) → G(Γ2 ) be the map in Lemma 4.12. Pick vertex p ∈ G(Γ1 ) and let q = s(p). We define (F (Γ1 ))p ⊂ P(Γ1 ) and (F (Γ2 ))q ⊂ P(Γ2 ) as in the first paragraph of the proof of Lemma 4.12. Then (4.13) implies s((F (Γ1 ))p ) ⊂ (F (Γ2 ))q . This induces a graph embedding Γ1 ,→ Γ2 . By repeating the previous discussion for s−1 , we obtain another graph embedding Γ2 ,→ Γ1 . Since both Γ1 and Γ2 are finite simplicial graphs, they are isomorphic. Hence G(Γ1 ) ∼  = G(Γ2 ). Lemma 4.17. Let G(Γ) be a RAAG such that Out(G(Γ)) is finite and G(Γ)  Z. Then F (Γ) satisfies the assumption of Lemma 4.12. Proof. It is clear that F (Γ) should satisfy condition (1) of Lemma 4.12 since no nontrivial partial conjugation is allowed. If F (Γ) is contained in a closed star, then Γ is a point. So if (2) is not true, then F (Γ) = St(v) ∪ St(w) for distinct vertices v, w ∈ Γ. Since the orthogonal complement v ⊥ satisfies v ⊥ * St(w), there exists u ∈ v ⊥ such that d(u, w) ≥ 2. Pick any edge e such that u ∈ e, then e * St(w), so e ⊂ St(v). This implies u⊥ ⊂ St(v), hence Out(G(Γ)) is infinite, which yields a contradiction.  By Lemma 4.6, Lemma 4.17 and Corollary 4.16, we have following result, which in particular establishes Theorem 1.1 of the introduction. Theorem 4.18. Let Γ1 and Γ2 be two finite simplicial graphs such that Out(G(Γi )) is finite for i = 1, 2. Then G(Γ1 ) and G(Γ2 ) are quasi-isometric if and only if they are isomorphic. Moreover, for any (L, A)-quasi-isometry q : X(Γ1 ) → X(Γ2 ), there exist a bijection q 0 : G(Γ1 ) → G(Γ2 ) and a constant D = D(L, A, Γ1 ) such that (1) d(q(v), q 0 (v)) < D for any v ∈ G(Γ1 ). (2) For any standard flat F1 ⊂ X(Γ1 ), there exists a standard flat F2 ⊂ X(Γ2 ) such that q 0 induces a bijection between F1 ∩ G(Γ1 ) and F2 ∩ G(Γ2 ). If G(Γ1 ) 6= Z, then such q 0 is unique. Proof. It suffices to look at the case G(Γ1 ) 6= Z. Then G(Γ2 ) 6= Z. In this case, every vertex v in Γ1 or Γ2 is the intersection of maximal cliques that contain v (otherwise there exist vertex w such that w 6= v and v ⊥ ⊂ St(w)). It follows that every standard geodesic in X(Γ1 ) or X(Γ2 ) is the intersection of finitely many maximal standard flats, so is every standard flat. Let q∗ : P(Γ1 ) → P(Γ2 ) be the map in Lemma 4.6. We apply Lemma 4.12 to q∗ and q∗−1 to obtain q 0 with the required properties. Note that each vertex of X(Γ) is the intersection of maximal standard flats that contain it, thus q 0 is unique.  4.3. The automorphism groups of extension complexes. Suppose Out(G(Γ)) is finite, by Theorem 4.18, each element in the simplicial automorphism group Aut(P(Γ)) of P(Γ) induces a bijection G(Γ) → G(Γ). However, this bijection does not extend to an isomorphism from X(Γ) to itself in general. We start by looking at the following example which was first pointed out in [BKS08a, Section 11] in a slightly different form. Example 4.19. Let l ⊂ X(Γ) be a standard geodesic let πl : X(Γ) → l be the CAT(0) projection. We identify the vertex set of l with Z. Let X (0) (Γ) be the vertex set of X(Γ). Then the above projection induces a map πl : X (0) (Γ) → Z. 32 JINGYIN HUANG Recall that each edge of X(Γ) is oriented and labeled, and G(Γ) acts on X(Γ) by transformations that preserve labels and orientations. There is a unique element α ∈ G(Γ) such that α translates l one unit towards the positive direction. We want to define a bijection q : X (0) (Γ) → X (0) (Γ) which basically flips πl−1 (0) and πl−1 (1). More precisely:   if πl (x) 6= 0, 1 x q(x)= α(x) if x ∈ πl−1 (0)   −1 α (x) if x ∈ πl−1 (1) One can check the following: (1) q is a quasi-isometry. (2) q does not respect the word metric. (3) q maps vertices in a standard flat to vertices in another standard flat. Thus q induces an element in Aut(P(Γ)). The above example implies that in general, elements in Aut(P(Γ)) do not respect the order along the standard geodesics of X(Γ). There is another metric on G(Γ) which “forgets about” the ordering. Following [KK14], we define the syllable length of a word ω to be minimal l such that ω can be written as a product of l elements of form viki , where vi is a standard generator and ki is an integer. An alternative definition is the following. Let {hi }ki=1 be the collection of hyperplanes separating ω ∈ G(Γ) and the identity element (recall that we have identified G(Γ) with the 0-skeleton of X(Γ)). For each i, pick a standard geodesic li dual to hi . Then the syllable length of ω is the number of elements in {∆(li )}ki=1 . The syllable length induces a left invariant metric on G(Γ), which will be denoted by dr . Note that the map in Example 4.19 is an isometry with respect to dr . Denote the word metric on G(Γ) with respect to the standard generators by dw . Corollary 4.20. Let Γ be a graph such that Out(G(Γ)) is finite and denote the simplicial automorphism group of P(Γ) by Aut(P(Γ)). Then Aut(P(Γ)) ∼ = Isom(G(Γ), dr ) Proof. We have a group homomorphism h1 : Aut(P(Γ)) → P erm(G(Γ)) by Lemma 4.12, here P erm(G(Γ)) is the permutation group of elements in G(Γ). Take φ ∈ Aut(P(Γ)), by Lemma 4.17, ϕ = h1 (φ) and ϕ−1 = h1 (φ−1 ) satisfy the conclusion of Lemma 4.12. Since every standard geodesic is the intersection of finitely many maximal standard flats, points in a standard geodesic are mapped to points in a standard geodesic by φ, which implies dr (ϕ(v1 ), ϕ(v2 )) ≤ dr (v1 , v2 ) if dr (v1 , v2 ) ≤ 1. By triangle inequality, we have dr (ϕ(v1 ), ϕ(v2 )) ≤ dr (v1 , v2 ) for any v1 , v2 ∈ G(Γ). Similarly, dr (ϕ−1 (v1 ), ϕ−1 (v2 )) ≤ dr (v1 , v2 ). Thus ϕ ∈ Isom(G(Γ), dr ) and we have a homomorphism h1 : Aut(P(Γ)) → Isom(G(Γ), dr ). Now pick ϕ ∈ Isom(G(Γ), dr ). Let v1 , v2 , v3 ∈ G(Γ) such that dr (v1 , vi ) = 1 for i = 2, 3. We claim (4.21) ∠v1 (v2 , v3 ) = π/2 ⇔ ∠ϕ(v1 ) (ϕ(v2 ), ϕ(v3 )) = π/2. If ∠v1 (v2 , v3 ) = π/2, then we can find v4 ∈ G(Γ) such that {vi }4i=1 are the vertices of a flat rectangle in X(Γ). Note that dr (v1 , v4 ) = dr (v2 , v3 ) = 2 and dr (v4 , v2 ) = dr (v4 , v3 ) = 1, so dr (ϕ(v1 ), ϕ(v4 )) = dr (ϕ(v2 ), ϕ(v3 )) = 2 and dr (ϕ(v4 ), ϕ(v2 )) = dr (ϕ(v4 ), ϕ(v3 )) = 1. Now we consider the 4-gon formed by ϕ(v1 )ϕ(v2 ), ϕ(v2 )ϕ(v4 ), ϕ(v4 )ϕ(v3 ) and ϕ(v3 )ϕ(v1 ). Then the angles at the four vertices of this 4-gon are QUASI-ISOMETRIC CLASSIFICATION OF RIGHT-ANGLED ARTIN GROUPS I 33 bigger or equal to π/2. It follows from CAT (0) geometry that the angles are exactly π/2 and the 4-gon actually bounds a flat rectangle. Thus one direction of (4.21) is proved, the other direction is similar. We need another observation as follows. If three points v1 , v2 , v3 ∈ G(Γ) satisfies dr (vi , vj ) = 1 for 1 ≤ i 6= j ≤ 3, then the angle at each vertex of the triangle ∆(v1 , v2 , v3 ) could only be 0 or π, thus {vi }3i=1 are inside a standard geodesic. It follows from this observation that points in a standard geodesic are mapped by ϕ to points in a standard geodesic. We define φ : P(Γ) → P(Γ) as follows. For vertex w ∈ P(Γ), let l be a standard geodesic such that ∆(l) = w. Suppose l0 ⊂ X(Γ) is the standard geodesic such that φ(v(l)) ⊂ l0 (v(l) denotes the vertex set of l). Suppose w0 = ∆(l0 ). We define w0 = φ(w). (4.21) implies w0 does not depend on the choice of l, and φ(w1 ) and φ(w2 ) are adjacent if vertices w1 , w2 ∈ P(Γ) are adjacent. Thus φ is a well-defined simplicial map. Note that ϕ−1 also induces a simplicial map from P(Γ) to itself in a similar way, so φ ∈ Aut(P(Γ)). We define φ = h2 (ϕ). One readily verify that h2 : Isom(G(Γ), dr ) → Aut(P(Γ)) is a group homomorphism and h2 ◦ h1 = h1 ◦ h2 = Id. Thus the corollary follows.  Remark 4.22. If we drop the assumption in the above corollary about Γ, then there is still a monomorphism h : Isom(G(Γ), dr ) → Aut(P(Γ)), moreover, any ϕ ∈ Isom(G(Γ), dr ) maps vertices in a standard flat to vertices in a standard flat of the same dimension. The homomorphism h is surjective if Out(G(Γ)) is finite. Remark 4.23. For any finite simplicial graphs Γ1 and Γ2 , G(Γ1 ) ∼ = G(Γ2 ) if and only if (G(Γ1 ), dr ) and (G(Γ2 ), dr ) are isometric as metric spaces. The if only direction follows from [Dro87, Lau95]. For the other direction, let ϕ : (G(Γ1 ), dr ) → (G(Γ2 ), dr ) be an isometry. Pick v ∈ G(Γ1 ) and let {li }ki=1 be the collection of standard geodesics passing through v. Pick vi ∈ G(Γ1 ) such that vi ∈ li \ {v}. Then dr (v, vi ) = 1 for 1 ≤ i ≤ k and dr (vi , vj ) = 2 for 1 ≤ i 6= j ≤ k. So dr (ϕ(v), ϕ(vi )) = 1 for 1 ≤ i ≤ k and dr (ϕ(vi ), ϕ(vj )) = 2 for 1 ≤ i 6= j ≤ k, and ∠v (vi , vj ) = π/2 if and only if ∠ϕ(v) (ϕ(vi ), ϕ(vj )) = π/2 by (4.21). This induces a graph embedding Γ1 → Γ2 . By considering ϕ−1 , we obtain another graph embedding Γ2 → Γ1 . Hence Γ1 and Γ2 are isomorphic. Corollary 4.24. If Out(G(Γ)) is finite, then we have the following commutative diagram, where i1 , i2 and i3 are injective homomorphisms: Isom(G(Γ), dw ) i1 QI(G(Γ)) i2 Isom(G(Γ), dr ) i3 QI(G(Γ)) is the quasi-isometry group of G(Γ). Proof. The homomorphism i1 and i3 are obvious and i2 is given by Lemma 4.6 and Corollary 4.20. It is clear that i2 is a group homomorphism and i3 = i2 ◦ i1 . Note that i3 is injective, so i1 is injective. Pick α ∈ QI(G(Γ)), by Corollary 4.20, we know i2 (α) = Id implies the image of every standard flat under α is uniformly Hausdorff close to itself, thus α is of bounded distance from the identity map.  34 JINGYIN HUANG 5. Quasi-isometries and special subgroups Let G(Γ) be a RAAG with finite outer automorphism group. In this section we characterize all other RAAG’s quasi-isometric to G(Γ). 5.1. Preservation of extension complex. Lemma 5.1. Let Γ be a finite simplicial graph. Pick a vertex w ∈ Γ and let Γw be the minimal stable subgraph containing w. Denote Γ1 = lk(w) and Γ2 = lk(Γ1 ) (see Section 2.1 for definition of links). Then either of the following is true: (1) Γw is a clique. In this case St(w) is a stable subgraph. (2) Both Γ1 and Γ1 ◦Γ2 are stable subgraphs of Γ. Moreover, Γ2 is disconnected. Recall that we use (Γ0 )⊥ to denote the orthogonal complement of the subgraph Γ ⊂ Γ (see Section 2.1) and we assume (∅)⊥ = Γ. 0 Proof. If Γw ⊂ St(w), then Γw is a clique by Lemma 3.30. We also deduce from ⊥ ⊥ since Lemma 3.30 that each vertex of St(w) \ Γw is in Γ⊥ w . Moreover, Γw ⊂ w w ∈ Γw . Thus St(w) is the full subgraph spanned by vertices in Γw and Γ⊥ w . So St(w) is stable by Lemma 3.16. If Γw * St(w), let Γ11 be the full subgraph spanned by vertices in Γw ∩ lk(w) and let Γ02 be the full subgraph spanned by vertices in Γw \ Γ11 . By Lemma 3.30, Γw = Γ11 ◦ Γ02 and Γ02 = Γ2 . Note that Γ2 is disconnected with isolated point w ∈ Γ2 , and Γ11 may be empty. Let Vw = v(Γw ) be the vertex set of Γw and let Γ12 be the full subgraph spanned by Vw⊥ . Then Γw ◦ Γ12 = Γ11 ◦ Γ2 ◦ Γ12 is stable by Lemma 3.16. Pick vertex v ∈ Γ1 \ Γ11 , then v ∈ w⊥ ⊂ St(u) for any vertex u ∈ Γw by Lemma 3.30, thus v ∈ Γ12 and Γ1 ⊂ Γ11 ◦ Γ12 . On the other hand, w ∈ Γ2 , so Γ11 ◦ Γ12 ⊂ Γ1 and Γ1 = Γ11 ◦Γ12 . Since Γ2 does not contain any clique factor and Γ11 ◦Γ2 ◦Γ12 = Γ1 ◦Γ2 is stable, we know Γ1 is stable in Γ by Theorem 2.10.  Remark 5.2. In the above proof, Γ12 may be empty. But if Γ12 6= ∅, then it does not contain any clique join factor. Thus Γ11 is the maximal clique join factor of Γ11 ◦ Γ2 ◦ Γ12 . The next result answers the question at the end of Example 3.29. Theorem 5.3. Suppose Out(G(Γ)) is finite and let q : X(Γ) → X(Γ0 ) be a quasiisometry. Then q induces a simplicial isomorphism q∗ : P(Γ) → P(Γ0 ), in particular, Out(G(Γ0 )) is transvection free. In the following proof, we identify Γ with the one-skeleton of F (Γ), which is the flag complex of Γ. Also recall that there are label-preserving projections π : P(Γ) → F (Γ) and π : P(Γ0 ) → F (Γ0 ). Proof. By Lemma 4.6, there is a simplicial embedding q∗ : P(Γ) → P(Γ0 ). Note that q∗ (P(Γ)) is a full subcomplex in P(Γ0 ). To see this, pick a simplex ∆0 ⊂ P(Γ0 ) with its vertices in q∗ (P(Γ)). Then each vertex of ∆0 comes from a stable standard geodesic line in X(Γ0 ). Thus there exists a stable standard flat F 0 ⊂ X(Γ0 ) such that ∆(F 0 ) = ∆0 by Lemma 3.24. By considering the quasi-isometry inverse of q, we know F 0 is Hausdorff close to the q-image of a stable standard flat in X(Γ). Thus ∆(F 0 ) = ∆0 ⊂ q∗ (P(Γ)). QUASI-ISOMETRIC CLASSIFICATION OF RIGHT-ANGLED ARTIN GROUPS I 35 Pick vertex p ∈ X(Γ) and let {∆i }ki=1 , {Fi }ki=1 , {∆0i }ki=1 and {Fi0 }ki=1 be as in the proof of Lemma 4.12. We claim (5.4) ∩ki=1 Fi0 6= ∅. Suppose (5.4) is not true. Then there exist 1 ≤ i1 6= i2 ≤ k and hyperplane h0 ⊂ X(Γ) such that h0 separates Fi01 and Fi02 . Let l0 be a standard geodesic that intersects h0 transversely and let v 0 = ∆(l0 ). By the discussion in Lemma 4.10, we can find vertices v10 ∈ ∆0i1 and v20 ∈ ∆0i2 such that v10 and v20 are separated by St(v 0 ). If there exists i0 such that Fi00 ∩ h 6= ∅, then v 0 ∈ q∗ (P(Γ0 )) and we can prove (5.4) as in Lemma 4.12. Now we assume Fi0 ∩ h0 = ∅ for any i. Let w0 = π(v 0 ) ∈ Γ0 and let Γw0 be the minimal stable subgraph of Γ0 that contains w0 . We apply Lemma 5.1 to w0 ∈ Γ0 , if case (1) is true, let F 0 be the standard flat in X(Γ0 ) such that l0 ⊂ F 0 and ΓF 0 = Γw0 . Since Γw0 is stable, ∆(F 0 ) ⊂ q∗ (P(Γ0 )), in particular, v 0 ∈ q∗ (P(Γ0 )) and we can prove (5.4) as in Lemma 4.12. If case (2) is true, let Γ01 = lk(w0 ) and let Γ02 = lk(Γ01 ). Take K10 and K 0 to be the standard subcomplexes in X(Γ0 ) such that (1) the defining graphs ΓK10 , ΓK 0 of K10 and K 0 satisfy ΓK10 = Γ01 and ΓK 0 = Γ01 ◦ Γ02 ; (2) l0 ⊂ K 0 and K10 ⊂ K 0 . Set M10 = ∆(K10 ) and M 0 = ∆(K 0 ). Let K20 be an orthogonal complement of K10 in K 0 , i.e. K20 is a standard subcomplex such that ΓK20 = Γ02 and K 0 = K10 × K20 . It follows that M 0 = M10 ∗ M20 for M20 = ∆(K20 ). By construction, v 0 ∈ M 0 and lk(v 0 ) = M10 . Since K 0 and K10 are stable, there exist stable standard subcomplexes K and K1 ∞ ∞ in X(Γ) such that q(K) = K 0 and q(K1 ) = K10 . Moreover, by applying Theorem 2.10 to the quasi-isometry between K and K 0 , there exists a standard subcomplex K2 ⊂ K such that K = K1 × K2 and K2 is quasi-isometric to K20 . Thus ΓK2 is also disconnected. Let Mi = ∆(Ki ) ⊂ P(Γ) for i = 1, 2 and M = M1 ∗ M2 = ∆(K). Then q∗ (M1 ) ⊂ M10 (at this stage we may not know q∗ (M1 ) = M10 ) and (5.5) q∗−1 (M10 ) = M1 . To see this, pick a simplex ∆ ⊂ P(Γ) with q∗ (∆) ⊂ M10 . Suppose ∆ = ∆(F ) for a stable standard flat F ⊂ X(Γ). Then q(F ) ⊂∞ K10 , hence F ⊂∞ K1 and ∆ ⊂ M1 . Let L = ∪ki=1 ∆i and L0 = ∪ki=1 ∆0i . By the proof of Lemma 4.12, L0 \ (St(v 0 ) ∩ L0 ) is disconnected, thus L \ q∗−1 (St(v 0 ) ∩ L0 ) is disconnected. Recall that lk(v 0 ) = M10 , and we are assuming v 0 ∈ / L0 . Thus (St(v 0 ) ∩ L0 ) ⊂ M10 . Then q∗−1 (St(v 0 ) ∩ L0 ) ⊂ −1 0 −1 q∗ (M1 ), hence q∗ (St(v 0 ) ∩ L0 ) ⊂ M1 by (5.5). Let N = π(q∗−1 (St(v 0 ) ∩ L0 )) and let Ni = π(Mi ) for i = 1, 2. Then N separates F (Γ), N ⊂ N1 and N2 is disconnected. Pick vertices u1 , u2 in different connected components of N2 , then d(u1 , u2 ) ≥ 2 (since N2 is the full subcomplex spanned by ΓK2 ). Since π(M ) = N1 ∗ N2 ⊂ F (Γ), N ⊂ St(ui ) \ {ui } for i = 1, 2. Let {Cj }dj=1 be the connected components of F (Γ) \ N . Then at most one of Cj is contained in St(u1 ). If d ≥ 3, then St(u1 ) would separate F (Γ), which is a contradiction. Now we suppose d = 2. Note that for i = 1, 2, there must exist j such that Cj ⊂ St(ui ), otherwise St(ui ) would separate F (Γ). Moreover, if Cj ⊂ St(ui ), then ui ∈ Cj . So we can assume without loss of generality that C1 ⊂ St(u1 ) and C2 ⊂ St(u2 ), which implies F (Γ) = St(u1 ) ∪ St(u2 ), contradiction again (Lemma 4.17). Thus case (2) is impossible and (5.4) is true. Let {Fλ }λ∈Λ be the collection of maximal standard flats in X(Γ). Then X(Γ) = ∪λ∈Λ Fλ . For each λ, let Fλ0 be the unique maximal standard flat in X(Γ0 ) such 36 JINGYIN HUANG ∞ that q(Fλ ) = Fλ0 . Then (5.6) ∞ X(Γ0 ) = ∪λ∈Λ Fλ0 . Let h ⊂ X(Γ0 ) be an arbitrary hyperplane. Then h ∩ (∪λ∈Λ Fλ0 ) 6= ∅, otherwise ∪λ∈Λ Fλ0 would stay on one side of the hyperplane since it is a connected set by (5.4), and this contradicts (5.6). Pick any standard geodesic r ⊂ X(Γ0 ) and let hr be a hyperplane dual to r. Then there exists λ ∈ Λ such that Fλ0 ∩hr 6= ∅. It follows that r ⊂∞ Fλ0 . So ∆(r) ∈ ∆(Fλ0 ) ⊂ q∗ (P(Γ)), which implies q∗ is surjective on the vertices. However, q∗ (P(Γ)) is a full subcomplex in P(Γ0 ), so q∗ is surjective.  5.2. Coherent ordering and coherent labeling. Throughout this section, we assume Out(G(Γ)) is finite and G(Γ)  Z. If q : G(Γ) → G(Γ0 ) is a quasi-isometry, then G(Γ0 ) has a quasi-action (cf. [KL01, Definition 2.2]) on G(Γ), which induces a group homomorphism: H : G(Γ0 ) → QI(G(Γ)) On the other hand, since G(Γ) acts by isometries on X(Γ), we can identify G(Γ) as a subgroup of QI(G(Γ)) (more precisely, we embed G(Γ) into Isom(G(Γ), dw ) and embed Isom(G(Γ), dw ) into QI(G(Γ)) by Corollary 4.24). In this subsection, we will understand the following question. Does there exist g ∈ QI(G(Γ)) such that g · H(G(Γ0 )) · g −1 ⊂ G(Γ)? Recall that we have picked an identification between G(Γ) and the 0-skeleton of X(Γ). Each circle in the 1-skeleton of the Salvetti complex of G(Γ) is labeled by an element in the standard generating set S of G(Γ). Moreover, we have chosen an orientation for each such circle. By pulling back the labeling and orientation of edges to the universal cover X(Γ), we obtain a G(Γ)-invariant directed labeling of edges in X(Γ). Moreover, both the labeling and orientation of edges in X(Γ) are compatible with parallelism between edges. This also induces an associated G(Γ)-invariant labeling of vertices in P(Γ). Let {lλ }λ∈Λ be the collection of standard geodesics in X(Γ) and let Vλ = v(lλ ) be the vertex set of lλ . A coherent ordering of G(Γ) is obtained by assigning a collection of bijections fλ : Vλ → Z for each λ ∈ Λ such that if lλ1 and lλ2 are parallel, then the fλ2 ◦ p ◦ fλ−1 : Z → Z is a translation, where p : Vλ1 → Vλ2 is the 1 map induced by parallelism. The map fλ pulls back the total order on Z to Vλ , which we denote by ≤λ . Then p : Vλ1 → Vλ2 is order-preserving. Two coherent ordering Ω1 and Ω2 are equivalent, denoted by Ω1 = Ω2 , if their collections of bijections agree up to a translation of Z. Recall that we have a G(Γ)invariant orientation of edges in X(Γ) which is compatible with parallelism between edges. This induces a unique coherent ordering Ω of G(Γ) up to the equivalence relation defined before. Moreover, for any element g ∈ G(Γ), the pull back g ∗ (Ω) is also a coherent ordering, moreover, g ∗ (Ω) = Ω. Recall that for any vertex v ∈ X(Γ), there is a label-preserving simplicial embedding iv : F (Γ) → P(Γ) by considering the standard geodesics passing through v. A coherent labeling of G(Γ) is a simplicial map a : P(Γ) → F (Γ) such that a ◦ iv : F (Γ) → F (Γ) is a simplicial isomorphism for every vertex v ∈ X(Γ). The label-preserving projection L : P(Γ) → F (Γ) gives rise to a coherent labeling of G(Γ). Recall that G(Γ) acts on P(Γ) by simplicial automorphisms, and the labeling of vertices in P(Γ) is G(Γ)-invariant. Thus for any element g ∈ G(Γ), the pull back g ∗ (L) is also a coherent labeling and g ∗ (L) = L. QUASI-ISOMETRIC CLASSIFICATION OF RIGHT-ANGLED ARTIN GROUPS I 37 We have the following alternative characterization of elements in Isom(G(Γ), dr ). Lemma 5.7. There is a 1-1 correspondence which associates each element of Isom(G(Γ), dr ) to a triple consisting of: (1) A point v ∈ G(Γ). (2) A coherent ordering of G(Γ) (up to the equivalence relation defined above). (3) A coherent labeling of G(Γ). Proof. Pick φ ∈ Isom(G(Γ), dr ) and let ϕ = h(φ) : P(Γ) → P(Γ), where h is the monomorphism in Remark 4.22. Then ϕ∗ L = L ◦ ϕ : P(Γ) → F (Γ) is a coherent labeling of G(Γ). Pick a standard geodesic l1 ⊂ X(Γ). Then the parallel set Pl1 admits a splitting Pl1 = l1 × l1⊥ . Since φ maps vertices in a standard flat bijectively to vertices in a standard flat, there exists a standard geodesic l2 ⊂ X(Γ) such that φ(v(l1 )) = v(l2 ) and φ(v(Pl1 )) = Pl2 , moreover, φ respects the product structure on Pl1 . Thus the pull-back φ∗ Ω is a coherent ordering of G(Γ). Now we can set up the correspondence in one direction: φ φ(id), φ∗ Ω and ϕ∗ L here id denotes the identity element of G(Γ). Conversely, given a point v ∈ G(Γ), a coherent ordering Ω0 and a coherent labeling L0 , we can construct a map φ as follows. Set φ(id) = v. For u ∈ G(Γ), pick a word wu = a1 a2 · · · an representing u. Let ui be the point in G(Γ) represented by the word a1 a2 · · · ai for 1 ≤ i ≤ n and let u0 = id. We define qi = φ(a1 a2 · · · ai ) ∈ G(Γ) inductively as follows. Set q0 = v and suppose qi−1 is already defined. Denote the standard geodesic containing ui−1 and ui by li . Let vi = L0 (∆(li )) which is a vertex of Γ, and let li0 be the standard line that contains qi−1 and is labeled by vi . Denote the vertex set of li with the order from Ω0 by (v(li ), ≤Ω0 ). Suppose k : (v(li ), ≤Ω0 ) → (v(li0 ), ≤Ω ) is the unique order preserving bijection such that k(ui−1 ) = qi−1 . Then we define qi = k(ui ). We claim that for any other word wu0 representing u, φ(wu ) = φ(wu0 ), hence there is a well-defined map φ : G(Γ) → G(Γ). To see this, recall that one can obtain wu from wu0 by performing the following two basic moves: (1) w1 aa−1 w2 → w1 w2 . (2) w1 abw2 → w1 baw2 when a and b commute. It is clear that φ(w1 aa−1 w2 ) = φ(w1 w2 ). For the second move, let ui−1 , ui , u0i , and ui+1 be points in G(Γ) represented by w1 , w1 a, w1 b and w1 ab = w1 ba respectively. Define qi−1 = φ(w1 ), qi = φ(w1 a), qi0 = φ(w1 b), qi+1 = φ(w1 ab) and 0 qi+1 = φ(w1 ba). Since L0 is a coherent labeling, ∠qi (qi+1 , qi−1 ) = ∠qi−1 (qi , qi0 ) = 0 ∠qi0 (qi−1 , qi+1 ) = π/2, moreover, the standard geodesic containing qi and qi+1 is parallel to the standard geodesic containing qi−1 and qi0 . Since Ω0 is a coherent ordering, d(qi , qi+1 ) = d(qi−1 , qi0 ), thus qi qi+1 and qi−1 qi0 are parallel. Similarly, 0 0 qi−1 qi and qi0 qi+1 are parallel, thus qi+1 = qi+1 . 0 Now we define another map φ : G(Γ) → G(Γ), which serves as the inverse of φ. Set φ0 (v) = id and pick word w = a1 a2 · · · an . Let ri be the point in G(Γ) represented by va1 a2 · · · ai for 1 ≤ i ≤ n and r0 = v. We define pi = φ0 (va1 a2 · · · ai ) inductively as follows. Put p0 = id and suppose pi−1 is already defined. Since L0 is a coherent labeling, there exists a unique standard geodesic li containing pi−1 such that L0 (∆(li )) and the edge ri−1 ri share the same label. Let li0 be the unique standard geodesic containing ri−1 and ri and let k 0 : (v(li0 ), ≤Ω ) → (v(li ), ≤Ω0 ) be 38 JINGYIN HUANG the unique order preserving bijection such that k 0 (ri−1 ) = pi−1 . Put pi = k 0 (ri ). By a similar argument as above, φ0 : G(Γ) → G(Γ) is well-defined. It is not hard to deduce the following properties from our construction: (1) φ0 ◦ φ = φ ◦ φ0 = Id. (2) dr (φ(v1 ), φ(v2 )) ≤ dr (v1 , v2 ) and dr (φ0 (v1 ), φ0 (v2 )) ≤ dr (v1 , v2 ) for any vertices v1 , v2 ∈ G(Γ). (3) If L0 = L and Ω0 = Ω, then φ is a left translation. If in addition v = id, then φ = Id. It follows from (1) and (2) that φ ∈ Isom(G(Γ), dr ). Moreover, v = φ(id), L0 = ϕ∗ L (ϕ = h(φ) where h is the monomorphism in Remark 4.22) and Ω0 = φ∗ Ω, thus we have established the required 1-1 correspondence.  Pick finite simplicial graphs Γ and Γ0 such that (1) Out(G(Γ)) is finite; (2) there exists a simplicial isomorphism s : P(Γ) → P(Γ0 ). By Lemma 4.12, s induces a map φ : G(Γ) → G(Γ0 ). For every g 0 ∈ G(Γ0 ), there is a left translation φ̄g0 : G(Γ0 ) → G(Γ0 ), which gives rise to a simplicial isomorphism s̄g0 : P(Γ0 ) → P(Γ0 ). Let sg0 = s−1 ◦ s̄g0 ◦ s. Then sg0 gives rise to a map φg0 ∈ Isom(G(Γ), dr ) by Corollary 4.20, moreover, by Lemma 4.12, φ̄g0 ◦ φ = φ ◦ φg0 (5.8) 0 0 0 for any g ∈ G(Γ ). So G(Γ ) acts on G(Γ), and we can define a homomorphism Φ : G(Γ0 ) → Isom(G(Γ), dr ) by sending g 0 to φg0 . Φ is injective since each step in defining Φ is injective. Lemma 5.9. In the above setting, there exists an element φ1 ∈ Isom(G(Γ), dr ) such that it conjugates the image of Φ to a finite index subgroup of G(Γ). We identify G(Γ) as a subgroup of Isom(G(Γ), dr ) via the left action of G(Γ) on itself. Proof. Pick a reference point q ∈ Im φ and let Kq = (F (Γ0 ))q . Denote the points in φ−1 (q) by {pλ }λ∈Λ and let Kpλ = (F (Γ))pλ . Since {φ(Kpλ )}λ∈Λ are distinct subcomplexes of Kq , Λ is a finite set. Let L : P(Γ) → F (Γ) and Ω be the coherent labeling and coherent ordering induced by the G(Γ)-invariant labeling of X(Γ) and P(Γ). We can obtain a coherent labeling L0 : P(Γ0 ) → F (Γ0 ) and a coherent ordering Ω0 for G(Γ0 ) in a similar fashion which are invariant under the G(Γ0 )-action, i.e. (5.10) (s̄g0 )∗ L0 = L0 and (φ̄g0 )∗ Ω0 = Ω0 . Our goal is to find a coherent labeling L1 and a coherent ordering Ω1 of G(Γ) such that (sg0 )∗ L1 = L1 and (φg0 )∗ Ω1 = Ω1 for any g 0 ∈ G(Γ0 ). Let iq : F (Γ0 ) → P(Γ0 ) be the canonical embedding and let L1 = L ◦ s−1 ◦ iq ◦ L0 ◦ s be the simplicial map from P(Γ) to F (Γ). Pick arbitrary p ∈ G(Γ) and let ip : F (Γ) → P(Γ) be the canonical embedding. We need to show L1 ◦ ip is a simplicial isomorphism. Let Kp = ip (F (Γ)) and let g10 ∈ G(Γ0 ) such that g10 · φ(p) = q. Then iq ◦ L0 |s(Kp ) = s̄g10 |s(Kp ) . Thus L1 ◦ ip = L ◦ s−1 ◦ iq ◦ L0 ◦ s ◦ ip = L ◦ s−1 ◦ s̄g10 ◦ s ◦ ip = L ◦ sg10 ◦ ip , QUASI-ISOMETRIC CLASSIFICATION OF RIGHT-ANGLED ARTIN GROUPS I 39 which is a simplicial isomorphism by Lemma 4.12. It follows that L1 is a coherent labeling, moreover, (sg0 )∗ L1 = (L ◦ s−1 ◦ iq ◦ L0 ◦ s) ◦ (s−1 ◦ s̄g0 ◦ s) = L ◦ s−1 ◦ iq ◦ L0 ◦ s̄g0 ◦ s = L ◦ s−1 ◦ iq ◦ L0 ◦ s = L1 for any g 0 ∈ G(Γ0 ), where the third equality follows from (5.10). So L1 is the required coherent labeling. To simplify notation, we will write x <Ω y if x < y under the ordering Ω. We define Ω1 as follows. Let p1 , p2 ∈ G(Γ) be two distinct points in a standard geodesic line. If φ(p1 ) 6= φ(p2 ), then we set p1 <Ω1 p2 if and only if φ(p1 ) <Ω0 φ(p2 ). If φ(p1 ) = φ(p2 ), then by (5.8), there exists a unique g 0 ∈ G(Γ0 ) such that φg0 (pi ) ∈ φ−1 (q) for i = 1, 2 and we set p1 <Ω1 p2 if and only if φg0 (p1 ) <Ω φg0 (p2 ). It follows from (5.10), (5.8) and our construction that p1 <Ω1 p2 if and only if φg0 (p1 ) <Ω1 φg0 (p2 ) for any p1 , p2 in the same standard geodesic line and any g 0 ∈ G(Γ0 ), thus (φg0 )∗ Ω1 = Ω1 . To verify Ω1 is coherent, pick parallel standard geodesics l1 and l2 in X(Γ) and pick distinct vertices p11 , p12 ∈ l. Let p21 , p22 be the corresponding vertices in l2 via parallelism. We assume p11 <Ω1 p12 , it suffices to prove p21 <Ω1 p22 . Case 1: We assume φ(p11 ) 6= φ(p12 ). Recall that l1 can be realized as an intersection of finitely many maximal standard flats, so by Lemma 4.12, there exists a standard geodesic line l10 ⊂ X(Γ0 ) such that φ(v(l1 )) ⊂ v(l10 ) and φ(v(Pl1 )) ⊂ v(Pl10 ), moreover, φ respects the product structures of Pl1 and Pl10 . Thus φ(p11 )φ(p21 ) and φ(p21 )φ(p22 ) are the opposite sides of a flat rectangle in X(Γ0 ). Now p21 <Ω1 p22 follows since Ω0 is coherent. Case 2: We assume φ(p11 ) = φ(p12 ) 6= φ(p21 ). In this case, we can assume without loss of generality that φ(p11 ) = φ(p12 ) = q (since (φg0 )∗ Ω1 = Ω1 ) and the points p11 and p21 stay in the same standard geodesic. For i = 1, 2, let ri be the standard geodesic passing p1i and p2i . Take ri0 ⊂ X(Γ0 ) and li0 ⊂ X(Γ0 ) to be the standard geodesics such that φ(v(ri )) ⊂ v(ri0 ) and φ(v(li )) ⊂ v(li0 ) respectively. Denote q 0 = φ(p21 ). Since φ restricted on v(Pl1 ) respects the product structure, φ(p21 ) = φ(p22 ) = q 0 and r10 = r20 . Let φg0 be the left translation such that φg0 (q 0 ) = q. Since q 0 ∈ r10 and q ∈ r10 , φg0 is a translation along r10 and sg0 fixes every point in St(∆(r10 )), hence sg0 fixes every point in s−1 (St(∆(r10 ))) = St(∆(r1 )) and (5.11) φg0 (ri ) = ri for i = 1, 2. Let l3 = φg0 (l2 ). Then l3 is parallel to l1 (or l2 ). To see this, note that ∆(l1 ) ∈ St(∆(r1 )), hence ∆(l1 ) is fixed by sg0 . Put p3i = φg0 (p2i ) for i = 1, 2. Then p3i ∈ ri by (5.11), hence p11 p12 and p31 p32 are the opposite sides of a flat rectangle. Moreover p3i ∈ φ−1 (q) for i = 1, 2 by (5.8), then p31 <Ω1 p32 since Ω is coherent and Ω = Ω1 while restricted on φ−1 (q). Now the G(Γ0 )-invariance of Ω1 implies p21 <Ω1 p22 . Case 3: If φ(p11 ) = φ(p12 ) = φ(p21 ), then we can assume without loss of generality that they all equal to q. It follows that φ(p22 ) = q since φ respects the product structure while restricted on v(Pl1 ). Thus p21 <Ω1 p22 by definition. 40 JINGYIN HUANG By Lemma 5.7, there exists φ1 ∈ Isom(G(Γ), dr ) such that φ∗1 Ω = Ω1 and s∗1 L = L1 (s1 = h(φ1 ) where h is the monomorphism in Remark 4.22). Thus −1 ∗ −1 ∗ −1 ∗ ∗ ∗ ∗ ∗ (φ1 ◦ φg0 ◦ φ−1 1 ) Ω = (φ1 ) ◦ (φg 0 ) ◦ (φ1 Ω) = (φ1 ) ◦ (φg 0 ) Ω1 = (φ1 ) Ω1 = Ω ∗ 0 0 for any g 0 ∈ G(Γ0 ). Similarly, (s1 ◦ sg0 ◦ s−1 1 ) L = L for any g ∈ G(Γ ). Note that −1 −1 0 s1 ◦ sg0 ◦ s1 = h(φ1 ◦ φg0 ◦ φ1 ), thus by Lemma 5.7, G(Γ ) acts on G(Γ) by left 0 translations via g 0 → φ1 ◦ φg0 ◦ φ−1 1 . This induces a monomorphism G(Γ ) → G(Γ). −1 Moreover, by (5.8) and the fact that φ (q) is finite, this action has finite quotient, thus we can realize G(Γ0 ) as a finite index subgroup of G(Γ).  The next result basically says under suitable conditions, if there exists a quasiisometry q : G(Γ) → G(Γ0 ), then there exists a very “nice” quasi-isometry q 0 : G(Γ) → G(Γ0 ). However, we do not insist that q 0 is of bounded distance away from q (compared to Theorem 4.18). Theorem 5.12. Let Γ and Γ0 be finite simplicial graphs such that Out(G(Γ)) is finite and G(Γ0 ) is quasi-isometric to G(Γ). Then there exists a cubical map (cf. Definition 2.1) ϕ : X(Γ) → X(Γ0 ) such that (1) The map ϕ is onto, and ϕ maps any standard flat in X(Γ) onto a standard flat in X(Γ0 ) of the same dimension. (2) The map ϕ maps combinatorial geodesics in the 1-skeleton of X(Γ) to combinatorial geodesics in the 1-skeleton of X(Γ0 ). (3) The map ϕ is a quasi-isometry. Proof. Let f : G(Γ) → G(Γ0 ) be a quasi-isometry. By Theorem 5.3, f induces a simplicial isomorphism s : P(Γ) → P(Γ0 ). By Lemma 4.12, s induces a map φ : G(Γ) → G(Γ0 ) such that dw (f (x), φ(x)) < D for any x ∈ G(Γ). Let φ1 be the map in Lemma 5.9 and let ϕ = φ ◦ φ−1 1 . We will use the same notation as in the proof of Lemma 5.9. We claim that if F = ∩hi=1 Fi where each Fi is a maximal standard flat, then there exists a unique standard flat F 0 ⊂ G(Γ0 ) such that φ(v(F )) = v(F 0 ). To see this, let Fi0 be the maximal standard flat in X(Γ0 ) such that ∆(Fi0 ) = s(∆(Fi )) for 1 ≤ i ≤ h and let F 0 = ∩hi=1 Fi0 . Then it follows from Lemma 4.12 that φ(v(F )) ⊂ v(F 0 ). Recall that G(Γ0 ) acts on G(Γ0 ), P(Γ0 ), G(Γ) and P(Γ). The stabilizer Stab(v(F 0 )) fixes ∆(Fi0 ) for all i, hence it fixes ∆i for all i and Stab(v(F 0 )) ⊂ Stab(v(F )). Since Stab(v(F 0 )) acts on v(F 0 ) transitively, (5.8) implies φ(v(F )) = v(F 0 ) and |φ−1 (y) ∩ F | = |φ−1 (y 0 ) ∩ F | for any y, y 0 ∈ v(F 0 ). It also follows that Stab(v(F )) ⊂ Stab(v(F 0 )), thus Stab(v(F 0 )) = Stab(v(F )). Note that the above claim is also true for ϕ, and any standard geodesic satisfies the assumption of the claim. Moreover, ϕ is surjective since φ1 is surjective by (5.8). Pick standard geodesic l ⊂ X(Γ) and l0 ⊂ X(Γ0 ) such that v(l0 ) = ϕ(v(l)), and we identify v(l) and v(l0 ) with Z in an order-preserving way. Then the above claim and the construction of φ1 imply that ϕ|v(l) is of form (5.13) ϕ(a) = ba/dc + r for some integers r and d (d ≥ 1). In particular, ϕ can be extended to a simplicial map from the Cayley graph C(Γ) of G(Γ) to C(Γ0 ). Pick a combinatorial geodesic ω ⊂ C(Γ) connecting vertices x and y, we claim that ω 0 = φ(ω) is also a geodesic in C(Γ0 ) (it could be a point). Let {vi }ni=0 be vertices in ω such that for 0 ≤ i ≤ n−1, [vi , vi+1 ] is a maximal sub-segment of ω that QUASI-ISOMETRIC CLASSIFICATION OF RIGHT-ANGLED ARTIN GROUPS I 41 is contained in a standard geodesic (v0 = x and vn = y). Denote the corresponding standard geodesic by li . For 0 ≤ i ≤ n − 1, let li0 ⊂ X(Γ0 ) be the standard geodesic such that v(li0 ) = ϕ(v(li )) and ωi0 = φ([vi , vi+1 ]). Then ωi0 is a (possibly degenerate) n−1 segment in li0 by (5.13). Since ω is a geodesic, none of two geodesics in {li }i=0 are parallel. Note that ϕ is induced by a simplicial isomorphism between P(Γ) and P(Γ0 ), thus the same property is true for the collection of geodesics {li0 }n−1 i=0 . It follows that no hyperplane in X(Γ0 ) could intersect ω 0 at more than one point, hence ω 0 is a combinatorial geodesic. Let ui = ϕ(vi ). Then dw (ui , ui+1 ) ≤ dw (vi , vi+1 ) by (5.13) (recall that dw denotes the word metric on the corresponding group). Thus (5.14) dw (ϕ(x), ϕ(y)) = n−1 X dw (ui , ui+1 ) ≤ i=0 n−1 X dw (vi , vi+1 ) = dw (x, y) i=0 for any x, y ∈ G(Γ). Pick p ∈ G(Γ0 ) and let k = |ϕ−1 (p)|. Then k does not depend on p by (5.8). It follows that dw (ϕ(x), ϕ(y)) ≥ 1 whenever dw (x, y) ≥ k + 1. Now we can cut ω into pieces of length k + 1. Since ϕ(ω) is a combinatorial geodesic, dw (x, y) − 1. k+1 Note that ϕ naturally extends to a cubical map from X(Γ) to X(Γ0 ), which satisfies all the required properties.  dw (ϕ(x), ϕ(y)) ≥ Theorem 5.15. If Γ and Γ0 are finite simplicial graphs such that Out(G(Γ)) is finite, then the following are equivalent: (1) G(Γ0 ) is quasi-isometric to G(Γ). (2) P(Γ0 ) is isomorphic to P(Γ) as simplicial complexes. (3) G(Γ0 ) is isomorphic to a subgroup of finite index in G(Γ). Proof. (1) ⇒ (2) follows from Theorem 5.3. (2) ⇒ (3) follows from Lemma 5.9. (3) ⇒ (1) is trivial.  This establishes Theorem 1.2 in the introduction. 6. The geometry of finite index RAAG subgroups Throughout this section, we assume G(Γ)  Z, since the main results of this section (Theorem 6.20 and Theorem 6.26) are trivial when G(Γ) ∼ = Z. 6.1. Constructing finite index RAAG subgroups. A right-angled Artin subgroup is a subgroup which is also a right-angled Artin group. In this section, we introduce a process to obtain finite index RAAG subgroups of an arbitrary RAAG. Lemma 6.1. Let X be a CAT (0) cube complex, let l ⊂ X be a geodesic in the 1-skeleton and let {hi }i∈Z be consecutive hyperplanes dual to l. Let πl : X → l be the CAT (0) projection. Then (1) For every edge e ⊂ X, if e ∩ hi = ∅ for all i, then πl (e) is a vertex in l, if e ∩ hi 6= ∅ for some i, then πl (e) is an edge in l. (2) If K is any connected subcomplex such that e ∩ hi = ∅ for all i, then πl (K) is a vertex in l, moreover, if K stays between hi and hi+1 , then πl (K) is the vertex in l that stays between hi and hi+1 . 42 JINGYIN HUANG (3) For every interval [a, b] ⊂ l, πl−1 ([a, b]) is a convex set in X. In particular, if x ∈ l is a vertex, then πl−1 (x) is a convex subcomplex of X. (4) If K is a convex subcomplex such that K ∩ l 6= ∅, then πl (K) = K ∩ l. Proof. Here (1) and (3) follow from the fact the every hyperplane has a carrier, and (2) follows from (1). To see (4), it suffices to show for i such that hi ∩ l 6= ∅ and hi ∩ K 6= ∅, we have ei ⊂ K (ei is the edge in l dual to hi ). Let Nhi be the carrier of hi . By Lemma 2.3, d(x, Nhi ∩ K) ≡ c for any x ∈ ei . Moreover, d(x, Nhi ∩ K) = d(x, K) for x in the interior of ei , so we must have c = 0, otherwise the convexity of d(·, K) would imply K ∩ l = ∅.  Lemma 6.2. Let l ⊂ X(Γ) be a standard geodesic. Then there is a map π∆(l) : v(P(Γ) \ St(∆(l))) → v(l) (recall that v(P(Γ) \ St(∆(l)) is the collection of vertices in P(Γ) \ St(∆(l)) such that if v1 and v2 are in the same connected component of P(Γ) \ St(∆(l)), then π∆(l) (v1 ) = π∆(l) (v2 ). Proof. Let πl : X(Γ) → l be the CAT(0) projection and let l1 ⊂ X(Γ) be a standard geodesic such that d(∆(l1 ), ∆(l)) ≥ 2. Then πl (l1 ) is a vertex in l by Lemma 3.1 and Corollary 3.2. Moreover, we claim πl (l1 ) = πl (l2 ) if l2 is a standard geodesic parallel to l1 . It suffices to prove the case when there is a unique hyperplane h separating l1 from l2 . Note that d(∆(l1 ), ∆(l)) ≥ 2 yields h ∩ l = ∅, so l1 and l2 are pinched by two hyperplanes dual to l, then the claim follows from Lemma 6.1. Thus πl induces a well-defined map π∆(l) : v(P(Γ) \ St(∆(l))) → v(l). If ∆(l1 ) and ∆(l2 ) are connected by an edge, then there exist standard geodesics l10 and l20 such that l10 ∩ l20 6= ∅ and li0 is parallel to li for i = 1, 2. Thus πl (l1 ) = πl (l10 ) = πl (l20 ) = πl (l2 ) and π∆(l) (∆(l1 )) = π∆(l) (∆(l2 )).  Pick a standard generating set S of G(Γ) and let C(Γ, S) be the Cayley graph. We identify G(Γ) as a subset of C(Γ, S) and attach higher dimensional cubes to C(Γ, S) to obtain a CAT (0) cube complex X(Γ, S), which is basically the universal cover of the Salvetti complex. Here we would like to think G(Γ) as a fixed set and C(Γ, S), X(Γ, S) as objects formed by adding edges and cubes to G(Γ) in a particular way determined by S, so we write S explicitly. We will choose a G(Γ)equivariant orientation for edges in X(Γ, S) as before. An S-flat (or an S-geodesic) in G(Γ) is defined to be the vertex set of a standard flat (or geodesic) in X(Γ, S). We define P(Γ, S) as before such that its vertices correspond to coarse equivalence classes of S-geodesics. We define an isometric embedding I : G(Γ) → `1 (v(P(Γ, S))) which depends on S and the orientation of edges in X(Γ, S). Pick standard geodesic l ⊂ X(Γ, S) and let πl : X(Γ, S) → l be the CAT (0) projection. We identify v(l) with Z∆(l) in an orientation preserving way such that πl (id) = 0 (id is the identity element in G(Γ)). Then πl induces a coordinate function I∆(l) : G(Γ) → Z∆(l) . If we change l to a standard geodesic l1 parallel to l, then I∆(l) and I∆(l1 ) are identical by Lemma 6.1. Thus for every vertex v ∈ P(Γ), there is a well-defined coordinate function Iv : G(Γ) → Zv . These coordinate functions induce a map I : G(Γ) → Z(v(P(Γ))) . I is an embedding since every two points in G(Γ) are separated by some hyperplane. I(G(Γ)) ⊂ `1 (v(P(Γ))) since for any g ∈ G(Γ), there are only finitely many hyperplanes separating id and g. I naturally extends to a map I : X(Γ, S) → `1 (v(P(Γ))) and it maps combinatorial geodesics to geodesics by the argument in Theorem 5.12. Thus I is an isometric embedding with respect to the `1 metric on QUASI-ISOMETRIC CLASSIFICATION OF RIGHT-ANGLED ARTIN GROUPS I 43 X(Γ, S). We say a convex subcomplex K ⊂ X(Γ, S) is non-negative if each point in I(K) has non-negative coordinates (this notion depends on the orientation of edges in X(Γ, S)). Let CN (Γ, S) be the collection of compact, convex, non-negative subcomplexes of X(Γ, S) that contain the identity. For any K ∈ CN (Γ, S), we find a maximal collection of standard geodesics {ci }si=1 such that ci ∩ K 6= ∅ for all i and ∆(ci ) 6= ∆(cj ) for any i 6= j. Let gi ∈ S be the label of edges in ci and let αi = πci (id). Put ni = |v(K ∩ ci )| and vi = αi gini αi−1 . Let G0 be the subgroup generated by {vi }si=1 . It follows from the convexity of K that if a standard geodesic c is parallel to ci and c ∩ K 6= ∅, then |v(K ∩ ci )| = |v(K ∩ c)|. Thus {vi }si=1 and G0 do not depend on the choice of ci ’s. Lemma 6.3. G0 is a finite index subgroup of G(Γ). Proof. We prove this by showing G0 · v(K) = G(Γ). Let dr be the syllable metric on G(Γ) defined in Section 4.3. Pick word α ∈ G(Γ) and assume α ∈ G0 · v(K) when dr (α, id) ≤ k − 1. If dr (α, id) = k, then there exists β ∈ G(Γ) such that dr (id, β) = k − 1 and dr (β, α) = 1. Let β = β1 β2 for β1 ∈ G0 and β2 ∈ v(K). Then dr (β2 , β1−1 α) = 1. Suppose c is the standard geodesic containing β2 and β1−1 α. Then there exists i such that ci and c are parallel. Note that Pc ∩ K is a convex set in the parallel set Pc , hence respects the natural splitting Pc = c × c⊥ , moreover, the left action of vi translates the c factor by ni units and fixes the other factor. Thus there exists d ∈ Z and β20 ∈ K ∩ c such that vid β20 = β1−1 α, which implies α = β1 vid β20 ∈ G0 · v(K).  Let Γ0 be the full subgraph of P(Γ) spanned by points {∆(ci )}si=1 . Then there is a natural homomorphism G(Γ0 ) → G0 . Lemma 6.4. The homomorphism G(Γ0 ) → G0 is actually an isomorphism. Hence G0 is a finite index RAAG subgroup of G(Γ). We will follow the strategy in [Kob12a], where the following version of ping-pong lemma for right-angled Artin groups was used. Theorem 6.5 (Theorem 4.1 of [Kob12a]). Let G = G(Γ) and let X be a set with a G-action. Suppose the following hold. (1) For each vertex vi of Γ, there exists subset Xi ⊂ X, such that the union of all Xi ’s is properly contained in X. (2) For each nonzero k ∈ Z and vertices vi , vj joined by en edge, vik (Xj ) ⊂ Xj . (3) For each nonzero k ∈ Z and vertices vi , vj not joined by en edge, vik (Xj ) ⊂ Xi . (4) There exists x0 ∈ X \ ∪i∈V Xi (V is the vertex set of Γ) such that for each nonzero k ∈ Z, vik (x0 ) ∈ Xi . Then the G-action is faithful. Proof of Lemma 6.4. We will apply Theorem 6.5 with X = X(Γ, S) and G = G(Γ0 ). For 1 ≤ i ≤ s, we identify ci and R in an orientation preserving way such that πci (id) corresponds to 0 ∈ R. Define Xi+ = πc−1 ([ni − 1/2, ∞)), Xi− = πc−1 ((−∞, −1/2]) i i + − and Xi = Xi ∪ Xi . It clear that the identity element id ∈ / Xi for all i, so (1) of Theorem 6.5 is true. Each vi = αi gini αi−1 translates ci by ni units, so (4) is also true with x0 = id. 44 JINGYIN HUANG If ∆(ci ) and ∆(cj ) are connected by an edge in P(Γ), then vi stabilizes every hyperplane dual to vj , thus vik (Xj ) = Xj and (2) is true. If (6.6) d(∆(ci ), ∆(cj )) ≥ 2, then πcj (ci ) is a point. Lemma 6.1 and ci ∩ K 6= ∅ yield that πcj (ci ) ⊂ πcj (K) = cj ∩ K = [0, nj − 1], thus (6.7) ci ∩ Xj = ∅. (−1/2) be the boundary of Xj− and let Nh be the Similarly ci ∩Xj = ∅. Let h = πc−1 j carrier of h. Then (6.6) implies that h has empty intersection with any hyperplane dual to ci , so is Nh . It follows from Lemma 6.1 that πci (h) = πci (Nh ) = p is a vertex in ci . If h1 = πc−1 (p − 1/2) and h2 = πc−1 (p + 1/2) are two hyperplanes that pinch p, i i then h ∩ hk = ∅ for k = 1, 2. This and (6.7) yield Xj− ∩ hk = ∅, hence πci (Xj− ) = p by Lemma 6.1. Similarly πci (Xj+ ) = p, so p = πci (Xj ) = πci (cj ) ⊂ πci (K) = ci ∩ K = [0, ni − 1]. Note that (πci ◦ vik )(Xj ) = (vik ◦ πci )(Xj ) = vik (p) = p + kni , so vik (Xj ) ⊂ Xi for k 6= 0.  The discussion in this subsection yields a well-defined map ΘS : CN (Γ, S) → {Finite index RAAG subgroups of G(Γ)}. The images of ΘS are called S-special subgroups of G(Γ). A subgroup of G(Γ) is special if it is S-special for some standard generating set S of G(Γ). 6.2. Rigidity of RAAG subgroups. In this subsection, we will assume G(Γ0 ) is finite index RAAG subgroup in G(Γ) and Out(G(Γ)) is finite. We will show that under such condition, G(Γ0 ) must arise from the process described in the previous subsection. We will prove this in 3 steps. First we produce a convex subcomplex of X(Γ, S) from G(Γ0 ). Then we will modify this convex subcomplex such that it is an element in CN (Γ, S). Thus we have defined a map from finite index RAAG subgroups of G(Γ) to elements in CN (Γ, S). In the last step, we show the map defined in step 2 is an inverse to the map ΘS defined in Section 6.1. Also near the end of this subsection, we will leave several relatively long remarks which discuss relevant material in the literature. The reader can skip these remarks at first reading. Recall that Out(G(Γ)) is finite and Out(G(Γ0 )) is transvection free (Theorem 5.3), so any two standard generating sets of G(Γ) (or G(Γ0 )) differ by a sequence of conjugations or partial conjugations. Then given any two standard generating sets S and S1 for G(Γ), there is a canonical way to identify P(Γ, S) and P(Γ, S1 ) (every S-geodesic is Hausdorff close to an S1 -geodesic). Thus we will write P(Γ) and P(Γ0 ) and omit the generating set. Lemma 6.8. Let φ, s be as in the discussion before Lemma 5.9. Let l ⊂ X(Γ) and l0 ⊂ X(Γ0 ) be standard geodesics such that φ(v(l)) = v(l0 ). Then φ◦π∆(l) = π∆(l0 ) ◦s. Proof. Pick standard geodesics r ⊂ X(Γ) and r0 ⊂ X(Γ0 ) such that φ(v(r)) = v(r0 ), then s(∆(r)) = ∆(r0 ) by Lemma 4.12 (recall that r is the intersection of maximal standard flats). Therefore, by the definition of π∆(l) , it suffices to show φ ◦ πl (x) = πl0 ◦ φ(x) for any vertex x ∈ X(Γ). Let y be a vertex such that y ∈ / l and let x = πl (y). By Lemma 6.1, we can approximate xy by a combinatorial geodesic ω in the 1-skeleton of πl−1 (y), then no hyperplane could intersect both l and ω. Let {vi }ni=0 be vertices in ω such that for 0 ≤ i ≤ n − 1, [vi , vi+1 ] is a maximal QUASI-ISOMETRIC CLASSIFICATION OF RIGHT-ANGLED ARTIN GROUPS I 45 sub-segment of ω that is contained in a standard geodesic (v0 = x and vn = y). Denote the corresponding standard geodesic by li . Then ∆(l) 6= ∆(li ) for all i. Let ui = φ(vi ) and let li0 be the standard geodesic such that φ(v(li )) = v(li0 ). Then ui ui+1 ⊂ li0 and ∆(l0 ) 6= ∆(li0 ) for all i, thus πl0 (li0 ) is a point by Corollary 3.2 and πl0 (ui ) = πl0 (uj ) for all 1 ≤ i, j ≤ n.  Step 1: We produce a convex subcomplex of X(Γ, S) from G(Γ0 ). The left action G(Γ) y G(Γ) induces G(Γ0 ) y G(Γ) and G(Γ0 ) y X(Γ, S). By choosing a standard generating set S 0 of G(Γ0 ), we have left action G(Γ0 ) y X(Γ0 , S 0 ). For h ∈ G(Γ0 ), we use φh , φ̄h , sh and s̄h to denote the action of h on G(Γ), G(Γ0 ), P(Γ) and P(Γ0 ) respectively. Pick a G(Γ0 )-equivariant quasi-isometry q : X(Γ, S) → X(Γ0 , S 0 ) such that q|G(Γ0 ) = Id. By Theorem 5.3 and Lemma 4.12, q induces surjective G(Γ0 )-equivariant maps φ : G(Γ) → G(Γ0 ) and s : P(Γ) → P(Γ0 ). Note that φ depends on the choice of generating set S and S 0 , and this flexibility comes from the automorphism groups of G(Γ) and G(Γ0 ). The key of step 1 is to choose a “nice” standard generating set S 0 of G(Γ0 ) such that φ behaves like ϕ in Theorem 5.12. Lemma 6.9. By choosing a possibly different standard generating set S 0 for G(Γ0 ), we can assume the map φ satisfies φ(id) = id, where id denotes the identity element in the corresponding group. Proof. Assume φ(id) = a 6= id, we claim if we change the generating set from S 0 to aS 0 a−1 , then the resulting φ will satisfy our requirement. By the construction of φ, it suffices to show for any maximal S 0 -flat F10 such that a ∈ F10 , there exists a maximal aS 0 a−1 -flat F20 such that id ∈ F20 and dH (F10 , F20 ) < ∞. Let us assume F10 = {ag k }k∈Z for some g ∈ S 0 . Then F20 = {(aga−1 )k }k∈Z would satisfy the required condition. We can prove the general case in a similar way.  Pick a standard geodesic l ⊂ X(Γ, S), we want to flip the order of points of l in a G(Γ0 )-equivariant way such that (5.13) is true. We choose an order preserving identification of v(l) and Z. Let d = |φ−1 (φ(p)) ∩ v(l)| where p is a vertex in v(l). Let Stab(v(l)) be the stabilizer of v(l) under the action G(Γ0 ) y G(Γ). By the second paragraph of the proof of Theorem 5.12, d does not depend on the choice of p in v(l), and Stab(v(l)) acts on v(l) in the same way as dZ acts on Z (recall that φ is G(Γ0 )-equivariant and the action of G(Γ0 ) on G(Γ) is induced from the left action of G(Γ) on itself). We will write χ(l) = d. If ¯l and l are parallel, then χ(l) = χ(¯l). Thus χ : P(Γ) → Z is well-defined. Since χ(l) only depends on how Stab(v(l)) acts on v(l), χ does not depend on the standard generating set S 0 . However, for any choice of S 0 , χ descends to χ : S 0 → Z by the G(Γ0 )-equivariance of φ. Let φ(0) = a. Then Stab(v(l)) is generated by aha−1 for some h ∈ S 0 . By the same reasoning as Lemma 6.9, we can assume a = id. Let S 0 = {hλ }λ∈Λ . For each hλ ∈ S 0 , we associated an integer nλ as follows. If hλ h = hhλ , we set nλ = 0. Now we consider the case hλ h 6= hhλ . Let lλ0 ⊂ X(Γ0 , S 0 ) be the standard geodesic that contains all powers of hλ , and let bλ = π∆(l) ◦s−1 (∆(lλ0 )) (π∆(l) is the map in Lemma 6.2). Then nλ is defined to be the unique integer such that bλ + nλ d ∈ [0, d − 1] (recall that d = χ(l)). Define f : S 0 → G(Γ0 ) by sending hλ to hnλ hλ h−nλ , then f extends to an automorphism of G(Γ0 ) and S 00 = {f (hλ )}λ∈Λ is also a standard generating set. Indeed, if ∆(lλ0 1 ) and ∆(lλ0 2 ) stay in the same connected component 46 JINGYIN HUANG of P(Γ0 ) \ St(∆(l0 )), then bλ1 = bλ2 by Lemma 6.2, hence nλ1 = nλ2 . It follows that f can be realized as a composition of partial conjugations. Lemma 6.10. We replace S 0 by S 00 in the definition of φ and denote the new map by φ1 . Then φ1 |v(l1 ) satisfies (5.13) for any standard geodesic l1 ⊂ X(Γ, S) with ∆(l1 ) ∈ {sh (∆(l))}h∈G(Γ0 ) . Recall that for any h ∈ G(Γ0 ), we use sh to denote the action of h on P(Γ). Proof. It suffices to show φ1 |v(l) satisfies (5.13), and the rest follows from the G(Γ0 )equivariance of φ1 . To show this, we only need to prove φ1 (i) = id for any i ∈ [0, d − 1]. Let Λ, bλ and nλ be as above. We pick i ∈ [0, d − 1]. Then there exists λ ∈ Λ such that bλ + nλ d = i. By Lemma 6.8, φ(bλ ) = id, hence φ(i) = hnλ . Let li be a standard geodesic such that bλ ∈ li and d(∆(li ), ∆(l)) ≥ 2. Then there exists hλ0 ∈ S 0 with bλ0 = bλ such that φ(v(li )) = {hkλ0 }k∈Z . Then (φh )nλ (v(li )) is an S-geodesic passing through i, and (φ ◦ (φh )nλ )(v(li )) = ((φ̄h )nλ ◦ φ)(v(li )) = {hnλ hkλ0 }k∈Z . Note that (6.11) dH ({hnλ hkλ0 }k∈Z , {(f (hλ0 ))k }k∈Z ) < ∞ Now we look at the new map φ1 . Note that φ1 (0) = id is still true. Moreover, (6.11) and Lemma 6.8 imply φ1 (i) = id. Thus the lemma follows.  The next lemma basically says the above change of basis process does not affect other geodesics in an essential way. Lemma 6.12. Let r be a standard geodesic in X(Γ, S) which satisfies the condition that ∆(r) ∈ / {sh (∆(l))}h∈G(Γ0 ) . Pick two different vertices x1 , x2 ∈ r. If φ(x) = φ(y), then φ1 (x) = φ1 (y). Proof. For i = 1, 2, let ri ⊂ X(Γ, S) be a standard geodesic containing xi such that d(∆(ri ), ∆(r)) ≥ 2 for i = 1, 2. Let r0 (resp. r00 ) be an S 0 -geodesic (resp. S 00 geodesic) such that φ(v(r)) = v(r0 ) (resp. φ1 (v(r)) = v(r00 )). Let α = φ(x) = φ(y). Then there exist elements hλ , hλ1 and hλ2 in S 0 such that φ(v(ri )) = {αhkλi }k∈Z for i = 1, 2, and r0 = {αhkλ }k∈Z . Note that (6.13) h 6= hλ , hλ1 6= hλ , hλ2 6= hλ Recall that h is the generator of Stab(v(l)). The first inequality of (6.13) follows from ∆(r) ∈ / {sh (∆(l))}h∈G(Γ0 ) . It suffices to show there exist S 00 -geodesics r100 and r200 such that (6.14) dH (φ(v(ri )), ri00 ) < ∞ for i = 1, 2 and (6.15) π∆(r00 ) (∆(r100 )) = π∆(r00 ) (∆(r200 )), then φ1 (x) = φ1 (y) follows from Lemma 6.8. Define ri00 = {αh−nλi (f (hλi ))k }k∈Z , then (6.14) is immediate. Note that for any a ∈ r10 and b ∈ r20 , we have b = a · (f (hλ1 ))k1 · hnλ1 −nλ2 · (f (hλ2 ))k2 for some k1 , k2 ∈ Z, then (6.15) follows from (6.13) and the definition of π∆(r00 ) .  QUASI-ISOMETRIC CLASSIFICATION OF RIGHT-ANGLED ARTIN GROUPS I 47 Similarly, we can prove that if we change φ with respect to the conjugation S 0 → aS 0 a−1 , then Lemma 6.12 is still true with r being an arbitrary standard geodesic. By Lemma 6.10 and Lemma 6.12, we can apply the above change-of-basis procedure for finitely many times to find appropriate standard generating set S 0 of G(Γ0 ) such that the corresponding map φ satisfies (5.13) when restricted to any standard geodesic in X(Γ, S). By the proof of Theorem 5.12, we can extend φ to a cubical map φ : X(Γ, S) → X(Γ0 , S 0 ) such that combinatorial geodesics in C(Γ, S) are mapped to combinatorial geodesics in C(Γ0 , S 0 ). Thus φ−1 (id) is a combinatorially convex subcomplex. The subcomplex φ−1 (id) is also compact since φ−1 (id) contains finitely many vertices. Recall that combinatorial convexity in `1 -metric and convexity in CAT (0) metric are the same for subcomplexes of CAT (0) cube complexes ([Hag07]), so we have constructed a compact convex subcomplex φ−1 (id) ⊂ X(Γ, S) from a given finite index RAAG subgroup G(Γ0 ) ≤ G(Γ). Step 2: We show φ−1 (id) can be assumed to be an element in CN (Γ, S). For K ⊂ G(Γ), denote the union of all standard geodesics in X(Γ, S) that have non-trivial intersection with K by K ∗ . K is S-convex if and only if K is the vertex set of some convex subcomplex in X(Γ, S). Now we return to φ. By step 1, we can assume φ(id) = id, and φ−1 (y) is S-convex for any y ∈ G(Γ0 ). Step 2.1. Let {li }qi=1 be the collection of standard geodesics passing through id and Λ1 = {id}. Let I : G(Γ) → `1 (v(P(Γ, S))) and I∆(l) : G(Γ) → Z∆(l) be the map defined in Section 6.1. Since v(li ) and v(lj ) are in different G(Γ0 )-orbits for i 6= j, by Lemma 6.10 and Lemma 6.12, we can apply the change-of-basis procedure in step 1 to find a standard generating set S 0 for G(Γ0 ) such that for each 1 ≤ i ≤ q, (6.16) −1 I∆(l ([0, χ(li ) − 1]) ∩ v(li ) ⊂ φ−1 (id). i) Step 2.2. Let Λ2 = Λ∗1 ∩ φ−1 (id). Pick a vertex x ∈ Λ2 \ Λ1 (if such x does not exist, then our process terminate). Let l be a standard geodesic such that x ∈ l. If l is parallel to some li in step 2.1, then (6.16) with li replaced by l is automatically true without any modification on S 0 , because both I and φ respect the product structure of Pli . If l is not parallel to any li , then I∆(l) (x) = 0. Moreover, ∆(l) is not in the G(Γ0 )-orbits of ∆(li )’s, so we can modify S 0 as before such that both −1 (6.16) and I∆(l) ([0, χ(l) − 1]) ∩ v(l) ⊂ φ−1 (id) are true. We deal with other standard geodesics passing through x and other points in Λ2 \ Λ1 in a similar way. Step 2.3. Let Λ3 = Λ∗2 ∩ φ−1 (id). For each vertex in Λ3 \ Λ2 , we repeat the procedure in step 2.2. Then we can define Λ4 , Λ5 , · · · . Since |φ−1 (id)| is finite and this number does not change after adjusting S 0 , our procedure must terminate after finitely many steps. Since φ−1 (id) remains connected in each step, once the procedure terminates, we must have already dealt with each point in φ−1 (id) and each standard geodesic passing through each point in φ−1 (id). By construction, the −1 resulting φ satisfies id ∈ φ−1 (id) and I∆(l) ([0, χ(l) − 1]) ∩ v(l) ⊂ φ−1 (id) for each standard geodesic l which intersects φ−1 (id). Thus φ−1 (id) is non-negative. Note that the sets Λi ’s actually do not depend on the map φ from step i−1. They only depend on the map χ : v(P(Γ)) → Z. Thus non-negative subset φ−1 (id) ⊂ G(Γ) produced above depends only on S and the subgroup G(Γ0 ) ≤ G(Γ). Then we have a well-defined map ΞS : {Finite index RAAG subgroups of G(Γ)} → CN (Γ, S) 48 JINGYIN HUANG Step 3: We show ΞS is an inverse to the map ΘS defined in Section 5.2. First we prove ΘS ◦ ΞS = Id. Let K = ΞS (G(Γ0 )). Let S 0 be the corresponding standard generating set for G(Γ0 ) and let φ : G(Γ) → G(Γ0 ) be the corresponding map. We find a maximal collection of standard geodesics {ci }si=1 such that ci ∩K 6= ∅ for all i and ∆(ci ) 6= ∆(cj ) for any i 6= j. Let ni = χ(ci ) and let gi ∈ S be the label of edges in ci . Suppose αi = πci (id) where πci : X(Γ, S) → ci is the CAT (0) projection. Then it suffices to prove the following lemma. Lemma 6.17. S 0 = {αi gini αi−1 }si=1 . Proof. Pick h ∈ S 0 and let ch ⊂ X(Γ0 , S 0 ) be the standard geodesic containing id and h. Then there exists a unique i such that φ(v(ci )) = ch . To see this, let c be a standard geodesic in X(Γ, S) such that s(∆(c)) = ∆(ch ). Then φ(v(c)) and ch are parallel and there exists u ∈ G(Γ0 ) which sends φ(v(c)) to v(ch ). Thus φ ◦ φu (v(c)) = v(ch ) by (5.8), where φu is defined in the beginning of step 1. Note that φu (v(c)) has nontrivial intersection with K. We choose ci to be the geodesic parallel to φu (v(c)). Then φ(v(ci )) = v(ch ). For any standard geodesic c0i parallel to ci , φ(c0i ) is parallel to ch , so h ∈ Stab(v(φ(c0i ))) = Stab(v(c0i )). It follows that φh stabilizes the parallel set Pci and acts by translation along the ci -direction. Note that (I∆(ci ) ◦ φh )(x) = I∆(ci ) (x) + χ(ci ) for any x ∈ v(Pci ), so h = φh (id) = αi gini αi−1 and the claim follows.  It remains to show ΞS ◦ ΘS = Id. This follows from the following result. Lemma 6.18. Let Γ be an arbitrary finite simplicial graph. Pick a standard generating set S for G(Γ) and K ∈ CN (Γ, S). Let G(Γ0 ) = ΘS (K) and let S 0 be the corresponding generating set. Suppose q : G(Γ) → G(Γ0 ) is a G(Γ0 )-equivariant quasi-isometry such that q|G(Γ0 ) is the identity map. Then (1) q induces a simplicial isomorphism q∗ : P(Γ, S) → P(Γ0 , S 0 ). (2) q∗ induces a G(Γ0 )-equivariant retraction r : G(Γ) → G(Γ0 ) such that r sends every S-flat to an S 0 -flat. (3) r extends to a surjective cubical map r : X(Γ, S) → X(Γ0 , S 0 ) such that r−1 (id) = K. In particular, the vertex set of K is the strict fundamental domain for the left action G(Γ0 ) y G(Γ). Proof. It suffices to prove the case when Γ does not admit a nontrivial join decomposition and Γ is not a point. By the construction of ΘS , we know the q-image of any S-flat which intersects K is Hausdorff close to an S 0 -flat which contains the identity. Moreover, if the S-flat is maximal, then the corresponding S 0 -flat is unique. Since G(Γ0 ) · v(K) = G(Γ), so the equivariance of q implies the q-image of every S-flat is Hausdorff close to an S 0 -flat. Since q is a quasi-isometry, so images of parallel S-geodesics are Hausdorff closed to each other. This induces q∗ : P(Γ, S) → P(Γ0 , S 0 ). q∗ is injective since q is a quasi-isometry and q∗ is surjective by the G(Γ0 )-equivariance. Pick x ∈ G(Γ), let {Fi }i∈I be the collection of maximal S-flats containing x. For each i, let Fi0 be the unique maximal S 0 -flat such that dH (q(Fi ), Fi0 ) < ∞. Note that ∩i∈I Fi = x by our assumption on Γ. So ∩i∈I Fi0 is either empty or one point. Note that if x ∈ K, then ∩i∈I Fi0 = id. The equivariance of q∗ implies for every x, ∩i∈I Fi0 is a point, which is defined to be r(x). It is clear that v(K) ⊂ r−1 (id), but |G(Γ) : G(Γ0 )| ≤ |v(K)|, so v(K) = r−1 (id). It follows that v(K) is the strict QUASI-ISOMETRIC CLASSIFICATION OF RIGHT-ANGLED ARTIN GROUPS I 49 fundamental domain for the left action of G(Γ0 ), and r is a G(Γ0 )-equivariant map which maps v(K) to id. Note that r(id) = id. Then the G(Γ0 )-equivariance of r implies r(g) = g for any g ∈ G(Γ0 ) ⊂ G(Γ). Thus r is a retraction. Similarly, by using the G(Γ0 )equivariance of r, we deduce that r sends every S-flat that intersects K to an S 0 -flat passing through the identity element of G(Γ0 ). Thus r sends every S-flat to an S 0 -flat by the equivariance of r. It is easy to see r extends to a cubical map r : X(Γ, S) → X(Γ0 , S 0 ) such that r−1 (id) = K.  Remark 6.19. We can generalize some of the results in Lemma 6.18 to infinite convex subcomplexes of X(Γ, S). A convex subcomplex K ⊂ X(Γ, S) is admissible if for any standard geodesic l, the CAT (0) projection πl (K) is either a finite interval or the whole l (a ray is not allowed). Let {lλ }λ∈Λ be a maximal collection of standard geodesics such that (1) lλ ∩ K 6= ∅; (2) lλ and lλ0 are not parallel for λ 6= λ0 ; (3) πlλ (K) is a finite interval. For each lλ , let αλ ∈ G(Γ) be an element which translates along lλ with translation length = 1 + length(πlλ (K)). Let GK be the subgroup generated by S 0 = {αλ }λ∈Λ . If K is admissible, we can prove GK · v(K) = G(Γ) as before. Moreover, for any finite subset S10 ⊂ S 0 , the subgroup G1 generated by S10 is a right-angled Artin group, and G1 ,→ GK is an isometric embedding with respect to the word metric. We can define S 0 -flat as before and view each vertex of GK as a 0-dimensional S 0 -flat. Now we show v(K) is a strict fundamental domain for the action GK y G(Γ). It suffices to show α(K) ∩ K = ∅ for each nontrivial α ∈ GK . We can assume there is a right-angled Artin group G1 such that α ∈ G1 ⊂ GK . Let α = w1 w2 · · · wn be a canonical form of α (see [Cha07, Section 2.3]). Then (1) Each wi belongs to an abelian standard subgroup of G1 . ki,n k k (2) For each i, let wi = ri,1i,1 ri,2i,2 · · · ri,ni i (ri,j ∈ S 0 ). Then for each ri+1,j (1 ≤ j ≤ ni+1 ), there exists ri,j 0 which does not commute with ri+1,j . We associate each generator ri,j with a subset Xi,j ⊂ X(Γ, S) as in the proof of Lemma 6.4, and claim there exists j with 1 ≤ j ≤ n1 such that α(K) ⊂ X1,j , then α(K) ∩ K = ∅ follows. We prove by induction on n and assume w2 w3 · · · wn (K) ⊂ X2,j 0 . By (2), there is r1,j such that r1,j and r2,j 0 does not k1,h k1,j commute, so r1,j (X2,j 0 ) ⊂ X1,j . Moreover, by (1), r1,h (X1,j ) = X1,j for h 6= j, so α(K) ⊂ w1 (X2,j 0 ) ⊂ X1,j . Now we can define a GK -equivariant map r : G(Γ) → GK by sending v(K) to the identity of GK . We prove as before that r maps S-flats to (possibly lower dimensional or 0-dimensional) S 0 -flats, thus r is 1-Lipschitz with respect to the word metric. Let i : GK ,→ G(Γ) be the inclusion. Then by the equivariance of r, r ◦ i is a left translation of GK . In particular, if K contains the identity, then r is a retraction. It follows that if S 0 is finite, then i is a quasi-isometric embedding. Note that a related construction in the case of right-angled Coxeter groups has been discussed in [Hag08]. By taking larger and larger convex compact subcomplexes of X(Γ, S), we know G(Γ) is residually finite. Moreover, pick β ∈ Stab(K) ⊂ G(Γ), by definition of S 0 , S 0 = βS 0 β −1 , so Stab(K) normalize GK . Now we have obtained a direct proof of the fact that every word-quasi-convex subgroup of a finite generated right-angled Artin group is separable (Theorem F of [Hag08]) by using the above discussion together with the outline in Section 1.5 of [Hag08]. The following result follows readily from the above discussion. 50 JINGYIN HUANG Theorem 6.20. Let G(Γ) be a RAAG with Out(G(Γ)) finite. We pick a standard generating set S for G(Γ). Then there is a 1-1 correspondence between non-negative convex compact subcomplexes of X(Γ, S) that contain the identity and finite index RAAG subgroups of G(Γ). In particular, these subgroups are generated by conjugates of powers of elements in S. In particular, Theorem 1.3 in the introduction follows from Theorem 6.20. Remark 6.21. If we drop the finite automorphism group assumption in the above theorem, then there exist a RAAG G(Γ1 ) and its finite index RAAG subgroup G(Γ2 ) such that G(Γ2 ) is not isomorphic to any special subgroup of G(Γ1 ). To see this, let G(Γ1 ) be a right-angled Artin group such that Out(G(Γ1 )) is transvection free. Then Lemma 6.18 and Theorem 3.27 imply each special subgroup of G(Γ1 ) does not admit non-trivial transvection in its outer automorphism group. Let Γ1 and Γ2 be the graphs in Example 3.29. Then G(Γ2 ) is a right-angled Artin subgroup of G(Γ1 ) and there are non-trivial transvections in Out(G(Γ2 )). Thus G(Γ2 ) is not isometric to any special subgroup of G(Γ1 ). Remark 6.22. Pick G(Γ) such that Out(G(Γ)) is finite, then Theorem 6.20 can be used to show certain subgroup of G(Γ) is not a RAAG. For example, let {vi }ki=1 be a subset of some standard generating set for G(Γ). We define homomorphism h : G(Γ) → Z/2 by sending each vi to the non-trivial element in Z/2 and killing all other generators. Then ker(h) is a RAAG if and only if k = 1. One can compare this example to Example 3.29. Remark 6.23. It is shown in [KK13b, Theorem 2] that if F (Γ0 ) embeds into P(Γ) as a full subcomplex, then there exists a monomorphism G(Γ0 ) ,→ G(Γ). This result can be recovered by the our previous discussion as follows. Let Γ be an arbitrary finite simplicial graph. Let S be a standard generating set for G(Γ). For any vertex w ∈ P(Γ), let αw ∈ G(Γ) be a conjugate of some element in S such that αw (l) = l for every standard geodesic l ⊂ X(Γ, S) with ∆(l) = w. Suppose M ⊂ P(Γ, S) is a compact full subcomplex and Γ0 is the 1-skeleton of M . Denote the vertex set of M by {wi }ni=1 and let li be a standard geodesic with ∆(li ) = wi . We identify each li in an orientation-preserving way with R such that 0 ∈ R is identified with πli (id) ⊂ li , whereπli is the CAT (0) projection to li and id is the identity element of G(Γ). For 1 ≤ i ≤ n, define Λi = {1 ≤ j ≤ n | d(wi , wj ) ≥ 2}. For each i, we define a pair of integers ai and ki as follows. If Λi 6= ∅, then let [ai , ai + ki ] ⊂ R be the minimal interval such that ∪j∈Λi πli (lj ) ⊂ [ai , ai + ki ] (recall that li is identified with R). If Λi = ∅, then we pick an arbitrary ai and set ki = 0. Define Xi = πc−1 ((−∞, ai − 1/2]) ∪ πc−1 ([ai + ki + 1/2, ∞)). Then by construction, Xi ∩ Xj = ∅ i i for i, j satisfying d(wi , wj ) ≥ 2. Using the argument in Section 6.1, we can show ki +1 n the subgroup generated by S 0 = {αw }i=1 is a RAAG with defining graph Γ0 . i At this point it is natural to ask the following question. Question 6.24. Let S be a standard generating set of G(Γ) and let S 0 be a finite collection of elements of form αrk α−1 , where r ∈ S, k ∈ Z and α ∈ G(Γ). Suppose G is the subgroup generated by S 0 . Is G a right-angled Artin group? 6.3. Generalized star extension. Our goal in this subsection is to find an algorithm to determine whether G(Γ) and G(Γ0 ) are quasi-isometric or not, given Out(G(Γ)) is finite. QUASI-ISOMETRIC CLASSIFICATION OF RIGHT-ANGLED ARTIN GROUPS I 51 For convex subcomplex E ⊂ X(Γ), we denote the full subcomplex in P(Γ, S) spanned by {∆(lλ )}λ∈Λ by Ê, where {lλ }λ∈Λ is the collection of standard geodesics in X(Γ) with lλ ∩ E 6= ∅. Now we describe a process to construct a graph Γ0 from Γ such that G(Γ0 ) is isomorphic to a special subgroup of G(Γ). Let Γ1 = Γ and let K1 be one point. We will construct a pair (Γi , Ki ) inductively such that (1) Ki is a compact CAT (0) cube complex and there is a cubical embedding f : Ki → X(Γ) such that f (Ki ) is convex in X(Γ). (2) Γi is a finite simplicial graph and there is a simplicial isomorphism g : F (Γi ) → f\ (Ki ). Note that these assumptions are true for i = 1. We associate each edge e ⊂ Ki with a vertex in Γi , denoted by ve , as follows. Let le be the standard geodesic in X(Γ) that contains f (e). We define ve := g −1 (∆(le )). Each vertex x ∈ Ki can be associated with a full subcomplex Φ(x) ⊂ F (Γi ) defined by Φ(x) = g −1 (x̂). To define (Γi+1 , Ki+1 ), pick a vertex v ∈ Γi and let {xj }m j=1 be the collection of vertices in Ki such that v ∈ Φ(xj ). Then {f (xj )}kj=1 are exactly the vertices in Pl ∩ f (Ki ), where l is a standard geodesic such that ∆(l) = g(v). Let L be the convex hull of {xj }m j=1 in Ki . Then e ⊂ L for any edge e ⊂ Ki with ve = v. Since f (L) = Pl ∩ f (Ki ), the natural product decomposition Pl ∼ = l × l⊥ induces a product decomposition of L = h × [0, a]. Note that it is possible that a = 0, and a > 0 if and only if there exists an edge e ⊂ Ki with ve = v. When a > 0, h is isomorphic to the hyperplane dual to e, and for any edge e0 ∈ Ki with ve0 = v, the projection of e0 to the interval factor [0, a] is an edge. Let Li = h×{a} ⊂ L and let Mi = ∪x∈Li Φ(x) (x is a vertex). We define F (Γi+1 ) to be the simplicial complex obtained by gluing F (Γi ) and Mi along St(v, Mi ) (see Section 2.1 for the notation), and define Ki+1 to be the CAT (0) cube complex obtained by gluing Ki and Li × [0, 1] along Li . One readily verifies that one can extend f to a cubical embedding f 0 : Ki+1 → X(Γ) such that f 0 (Ki+1 ) is convex. This also induces an isomorphism g 0 : F (Γi+1 ) → K̂i+1 which is an extension of g. By construction, each G(Γi ) is isomorphic to a special subgroup of G(Γ), moreover, the associated convex subcomplex of this special subgroup is Ki . Also note that the above induction process actually does not depend on knowing what X(Γ) is. Thus it also provides a way to construct convex subcomplexes of X(Γ) by hand. The above process of obtaining (Γi+1 , Ki+1 ) from (Γi , Ki ) is called a generalized star extension (GSE) at v. Note that the following are equivalent. (1) Γi ( Γi+1 . (2) Pl ( X(Γ), where l is the standard geodesic in X(Γ) such that ∆(l) = g(v). (3) St(π(g(v))) ( F (Γ), where π : P(Γ) → F (Γ) is the natural label-preserving projection defined in (4.3). A GSE is nontrivial if Γi ( Γi+1 . If Γ is not a clique, then at each stage, there exists a vertex v ∈ Γi such that the GSE at v is nontrivial. Lemma 6.25. Suppose G(Γ0 ) is isomorphic to a special subgroup of G(Γ). Then we can construct Γ0 from Γ by using finitely many GSE’s. 52 JINGYIN HUANG Proof. Let ΘS and CN (Γ, S) be the objects defined in Section 6.1. Suppose G(Γ0 ) is isomorphic to ΘS (K) for K ∈ CN (Γ, S). We define a sequence of convex subcomplexes in K by induction. Let K1 be the identity element in G(Γ). Suppose Ki is already defined. If Ki = K, then the induction terminates. If Ki ( K, pick an edge ei ⊂ K such that ei ∩ Ki is a vertex and let Ki+1 be the convex hull of Ki ∪ ei . Let {Ki }si=1 be the resulting collection of convex subcomplexes. An alternative way of describing Ki+1 is the following. If hi is the hyperplane in K dual to ei and Ni is the carrier of hi in K, then hi ∩ Ki = ∅ by the convexity of Ki . Thus Ki ∩ Ni is disjoint from hi . Hence there is a copy of (Ki ∩ Ni ) × [0, 1] inside Ni , which is denoted by Mi . Then Ki+1 = Ki ∪ Mi . Now one readily verifies that one can obtain (K̂i+1 , Ki+1 ) from (K̂i , Ki ) by a GSE.  The above construction gives rise to an algorithm to detect whether G(Γ0 ) is isomorphic to a special subgroup of G(Γ). If there are n vertices in Γ0 , then Γ0 can be obtained from Γ by at most n nontrivial GSE’s. So we can start with Γ, enumerate all possible n-step nontrivial GSE’s from Γ, and compare each resulting graph with Γ0 . By Theorem 5.15 and Theorem 6.20, we have the following result. Theorem 6.26. If Out(G(Γ)) is finite, then G(Γ0 ) is quasi-isometric to G(Γ) if and only if Γ0 can be obtained from Γ by finitely many GSE’s. In particular, there is an algorithm to determine whether G(Γ0 ) and G(Γ) are quasi-isometric. Note that a GSE gives rise to a pair (Γi , Ki ). If one does not care about the associated convex subcomplex Ki , then there is a simpler description of GSE when Out(G(Γ)) is finite. Suppose we have already obtained F (Γi ) together with a finite collection of full subcomplexes {Gλ }λ∈Λi such that (1) {Gλ }λ∈Λi is a covering of F (Γi ). (2) Each Gλ is isomorphic to F (Γ). When i = 1, we pick the trivial cover of F (Γ) by itself. To construct Γi+1 , pick vertex v ∈ F (Γi ), let Λv = {λ ∈ Λi | v ∈ Gλ } and let Γv = ∪λ∈Λv Gλ . Suppose {Cj }m j=1 is the collection of connected components of Γv \ St(v, Γv ) and suppose Cj0 = Cj ∪ St(v, Γv ). Then F (Γi+1 ) is defined by gluing C10 and F (Γi ) along St(v, Γv ), and Γi+1 is the 1-skeleton of F (Γi+1 ). Lemma 6.27. Suppose Out(G(Γ)) is finite. Then the above simplified process is consistent with GSE. Proof. We assume inductively that there is a CAT (0) cube complex Ki such that the two induction assumptions for GSE are satisfied, moreover, {Gλ }λ∈Λi coincides with {Φ(x)}x∈Ki (x is a vertex). Let L = h × [0, a] be as before and let Lj = h × {j} ⊂ L for each integer j ∈ [0, a]. It suffices to show there is a 1-1 correspondence 0 between {Lj }aj=0 and {Cj0 }m j=1 such that for each j, there exists a unique j with f\ (Lj ) = g(C 0 0 ). Pick adjacent vertices x1 , x2 ∈ f (Lj ) and let w̄ ∈ Γ be the label j of edge x1 x2 . Suppose v̄ = π(g(v)). Then d(w̄, v̄) = 1. Since Out(G(Γ)) is finite, the orthogonal complement of w̄ satisfies w̄⊥ * St(v̄). Then there is a vertex ū ∈ w̄⊥ such that d(ū, v̄) = 2. The lifts of ū in x̂1 and x̂2 are the same point, so (x̂1 ∩ x̂2 ) \ St(g(v)) contains a vertex. Since F (Γ) does not have separating closed stars, x̂i \ St(g(v)) is connected for i = 1, 2. Thus (x̂1 ∩ x̂2 ) \ St(g(v)) is connected. It follows that f\ (Lj ) \ St(g(v)) is connected. Moreover, Lemma 4.10 implies that QUASI-ISOMETRIC CLASSIFICATION OF RIGHT-ANGLED ARTIN GROUPS I 53 f\ (Lj1 )\St(g(v)) and f\ (Lj2 )\St(g(v)) are in different components of P(Γ)\St(g(v)) when j1 6= j2 , so there exists a unique j 0 such that f\ (Lj ) = g(Cj0 0 ).  References [ABD+ 13] Aaron Abrams, Noel Brady, Pallavi Dani, Moon Duchin, and Robert Young. Pushing fillings in right-angled Artin groups. Journal of the London Mathematical Society, 87(3):663–688, 2013. [BB97] Mladen Bestvina and Noel Brady. Morse theory and finiteness properties of groups. Inventiones mathematicae, 129(3):445–470, 1997. [BC12] Jason Behrstock and Ruth Charney. Divergence and quasimorphisms of right-angled Artin groups. Mathematische Annalen, 352(2):339–356, 2012. [BH99] Martin R. Bridson and André Haefliger. Metric spaces of non-positive curvature, volume 319 of Grundlehren der Mathematischen Wissenschaften [Fundamental Principles of Mathematical Sciences]. Springer-Verlag, Berlin, 1999. [BJN10] Jason A. Behrstock, Tadeusz Januszkiewicz, and Walter D. Neumann. Quasi-isometric classification of some high dimensional right-angled Artin groups. Groups Geom. Dyn., 4(4):681–692, 2010. [BKK14] Hyungryul Baik, Sang-hyun Kim, and Thomas Koberda. Right-angled Artin subgroups of the C ∞ interval diffeomorphism group. arXiv preprint arXiv:1404.5559, 2014. [BKMM12] Jason Behrstock, Bruce Kleiner, Yair Minsky, and Lee Mosher. Geometry and rigidity of mapping class groups. Geom. Topol., 16(2):781–888, 2012. [BKS08a] Mladen Bestvina, Bruce Kleiner, and Michah Sageev. The asymptotic geometry of right-angled Artin groups. I. Geom. Topol., 12(3):1653–1699, 2008. [BKS08b] Mladen Bestvina, Bruce Kleiner, and Michah Sageev. Quasiflats in CAT (0) complexes. arXiv preprint arXiv:0804.2619, 2008. [BM01] Noel Brady and John Meier. Connectivity at infinity for right angled Artin groups. Transactions of the American Mathematical Society, 353(1):117–132, 2001. [BN08] Jason A Behrstock and Walter D Neumann. Quasi-isometric classification of graph manifold groups. Duke Mathematical Journal, 141(2):217–240, 2008. [BRS07] Noel Brady, Tim Riley, and Hamish Short. The geometry of the word problem for finitely generated groups. Springer Science & Business Media, 2007. [CD95] Ruth Charney and Michael W. Davis. Finite K(π, 1)s for Artin groups. In Prospects in topology (Princeton, NJ, 1994), volume 138 of Ann. of Math. Stud., pages 110–124. Princeton Univ. Press, Princeton, NJ, 1995. [CF12] Ruth Charney and Michael Farber. Random groups arising as graph products. Algebr. Geom. Topol, 12(2):979–995, 2012. [Cha07] Ruth Charney. An introduction to right-angled Artin groups. Geometriae Dedicata, 125(1):141–158, 2007. [CK00] Christopher B Croke and Bruce Kleiner. Spaces with nonpositive curvature and their ideal boundaries. Topology, 39(3):549–556, 2000. [CLM10] Matt Clay, Christopher J Leininger, and Johanna Mangahas. The geometry of right angled Artin subgroups of mapping class groups. arXiv preprint arXiv:1007.1129, 2010. [CM09] Pierre-Emmanuel Caprace and Nicolas Monod. Isometry groups of non-positively curved spaces: structure theory. Journal of Topology, page jtp026, 2009. [CS11] Pierre-Emmanuel Caprace and Michah Sageev. Rank rigidity for CAT (0) cube complexes. Geometric and functional analysis, 21(4):851–891, 2011. [Dav83] Michael W Davis. Groups generated by reflections and aspherical manifolds not covered by Euclidean space. Annals of Mathematics, pages 293–324, 1983. [Day12] Matthew B. Day. Finiteness of outer automorphism groups of random right-angled Artin groups. Algebr. Geom. Topol., 12(3):1553–1583, 2012. [Dro87] Carl Droms. Isomorphisms of graph groups. Proceedings of the American Mathematical Society, 100(3):407–408, 1987. [Dun85] Martin J Dunwoody. The accessibility of finitely presented groups. Inventiones mathematicae, 81(3):449–457, 1985. 54 [EF97] [Esk98] [FH07] [Ger98] [Gro87] [Hag07] [Hag08] [Hag14] [Ham05] [HK14] [HK16] [Hua14] [Hua16] [HW08] [KK13a] [KK13b] [KK14] [KKL98] [KL97] [KL01] [Kob12a] [Kob12b] [Lau95] [Mos73] [MSW04] [PW02] [Sag95] [SDS89] JINGYIN HUANG Alex Eskin and Benson Farb. Quasi-flats and rigidity in higher rank symmetric spaces. Journal of the American Mathematical Society, 10(3):653–692, 1997. Alex Eskin. Quasi-isometric rigidity of nonuniform lattices in higher rank symmetric spaces. Journal of the American Mathematical Society, 11(2):321–361, 1998. Benson Farb and Michael Handel. Commensurations of Out(Fn ). Publications mathématiques, 105(1):1–48, 2007. V Gerasimov. Fixed-point-free actions on cubings. Siberian Advances in Mathematics, 8(3):36–58, 1998. M. Gromov. Hyperbolic groups. In Essays in group theory, volume 8 of Math. Sci. Res. Inst. Publ., pages 75–263. Springer, New York, 1987. Frédéric Haglund. Isometries of CAT (0) cube complexes are semi-simple. arXiv preprint arXiv:0705.3386, 2007. Frédéric Haglund. Finite index subgroups of graph products. Geometriae Dedicata, 135(1):167–209, 2008. Mark F Hagen. Weak hyperbolicity of cube complexes and quasi-arboreal groups. Journal of Topology, 7(2):385–418, 2014. Ursula Hamenstaedt. Geometry of the mapping class groups III: Quasi-isometric rigidity. arXiv preprint math/0512429, 2005. Mark F Hagen and Thomas Koberda. Personal communication. July 2014. Jingyin Huang and Bruce Kleiner. Groups quasi-isometric to raag’s. arXiv preprint arXiv:1601.00946, 2016. Jingyin Huang. Top dimensional quasiflats in cat(0) cube complexes. arXiv preprint arXiv:1410.8195, 2014. Jingyin Huang. Quasi-isometry classification of right-angled artin groups ii: several infinite out cases. arXiv preprint arXiv:1603.02372, 2016. Frédéric Haglund and Daniel T. Wise. Special cube complexes. Geom. Funct. Anal., 17(5):1551–1620, 2008. Sang-hyun Kim and Thomas Koberda. Anti-trees and right-angled Artin subgroups of braid groups. arXiv preprint arXiv:1312.6465, 2013. Sang-hyun Kim and Thomas Koberda. Embedability between right-angled Artin groups. Geometry & Topology, 17(1):493–530, 2013. Sang-Hyun Kim and Thomas Koberda. The geometry of the curve graph of a rightangled Artin group. International Journal of Algebra and Computation, 24(02):121– 169, 2014. Michael Kapovich, Bruce Kleiner, and Bernhard Leeb. Quasi-isometries and the de Rham decomposition. Topology, 37(6):1193–1211, 1998. Bruce Kleiner and Bernhard Leeb. Rigidity of quasi-isometries for symmetric spaces and Euclidean buildings. Comptes Rendus de l’Académie des Sciences-Series IMathematics, 324(6):639–643, 1997. Bruce Kleiner and Bernhard Leeb. Groups quasi-isometric to symmetric spaces. Communications in analysis and geometry, 9(2):239–260, 2001. Thomas Koberda. Ping-pong lemmas with applications to geometry and topology. Geometry, Topology and Dynamics of Character Varieties, 23:139, 2012. Thomas Koberda. Right-angled Artin groups and a generalized isomorphism problem for finitely generated subgroups of mapping class groups. Geometric and Functional Analysis, 22(6):1541–1590, 2012. Michael R Laurence. A generating set for the automorphism group of a graph group. Journal of the London Mathematical Society, 52(2):318–334, 1995. George D Mostow. Strong rigidity of locally symmetric spaces, volume 78. Princeton University Press, 1973. Lee Mosher, Michah Sageev, and Kevin Whyte. Quasi-actions on trees II: Finite depth Bass-Serre trees. arXiv preprint math/0405237, 2004. Panos Papasoglu and Kevin Whyte. Quasi-isometries between groups with infinitely many ends. Commentarii Mathematici Helvetici, 77(1):133–144, 2002. Michah Sageev. Ends of group pairs and non-positively curved cube complexes. Proc. London Math. Soc. (3), 71(3):585–617, 1995. Herman Servatius, Carl Droms, and Brigitte Servatius. Surface subgroups of graph groups. Proceedings of the American Mathematical Society, 106(3):573–578, 1989. QUASI-ISOMETRIC CLASSIFICATION OF RIGHT-ANGLED ARTIN GROUPS I [Ser89] [Tay13] [Wis09] 55 Herman Servatius. Automorphisms of graph groups. Journal of Algebra, 126(1):34–60, 1989. Samuel J Taylor. Right-angled Artin groups and Out(Fn ) I: quasi-isometric embeddings. arXiv preprint arXiv:1303.6889, 2013. Daniel T Wise. Research announcement: the structure of groups with a quasiconvex hierarchy. Electron. Res. Announc. Math. Sci, 16:44–55, 2009. Courant Institute of Mathematical Science, New York University, 251 Mercer Street, New York, NY, USA. E-mail address: [email protected]
4math.GR
(This is a shortened workshop version of the paper at https://arxiv.org/abs/1608.04428). arXiv:1612.00817v1 [cs.LG] 2 Dec 2016 T ERPRE T: A Probabilistic Programming Language for Program Induction Alexander L. Gaunt1 , Marc Brockschmidt1 , Rishabh Singh1 , Nate Kushman1 , Pushmeet Kohli1 , Jonathan Taylor2∗, Daniel Tarlow1 1 2 Microsoft Research perceptiveIO {t-algaun, mabrocks, risin, nkushman, pkohli, dtartlow}@microsoft.com [email protected] Abstract We study machine learning formulations of inductive program synthesis; that is, given input-output examples, synthesize source code that maps inputs to corresponding outputs. Our key contribution is T ERPRE T, a domain-specific language for expressing program synthesis problems. A T ERPRE T model is composed of a specification of a program representation and an interpreter that describes how programs map inputs to outputs. The inference task is to observe a set of inputoutput examples and infer the underlying program. From a T ERPRE T model we automatically perform inference using four different back-ends: gradient descent (thus each T ERPRE T model can be seen as defining a differentiable interpreter), linear program (LP) relaxations for graphical models, discrete satisfiability solving, and the S KETCH program synthesis system. T ERPRE T has two main benefits. First, it enables rapid exploration of a range of domains, program representations, and interpreter models. Second, it separates the model specification from the inference algorithm, allowing proper comparisons between different approaches to inference. We illustrate the value of T ERPRE T by developing several interpreter models and performing an extensive empirical comparison between alternative inference algorithms on a variety of program models. To our knowledge, this is the first work to compare gradient-based search over program space to traditional search-based alternatives. Our key empirical finding is that constraint solvers dominate the gradient descent and LP-based formulations. 1 Introduction Learning computer programs from input-output examples, or Inductive Program Synthesis (IPS), is a fundamental problem in computer science, dating back at least to Summers [1977] and Biermann [1978]. The field has produced many successes, with perhaps the most visible example being the FlashFill system in Microsoft Excel [Gulwani, 2011, Gulwani et al., 2012]. There has also been significant recent interest in neural network-based models with components that resemble computer programs [Giles et al., 1989, Joulin and Mikolov, 2015, Grefenstette et al., 2015, Graves et al., 2014, Weston et al., 2014, Kaiser and Sutskever, 2016, Reed and de Freitas, 2016, Neelakantan et al., 2016, Kurach et al., 2015, Andrychowicz and Kurach, 2016]. These models combine neural networks with external memory, external computational primitives, and/or built-in structure that reflects a desired algorithmic structure in their execution. However, none produce programs as output. Instead, the program is hidden inside “controllers” composed of neural networks that decide which operations to perform, and the learned program can only be understood in terms of the executions that it produces on specific inputs. ∗ Work done while author was at Microsoft Research. 1st Workshop on Neural Abstract Machines & Program Induction (NAMPI), @NIPS 2016, Barcelona, Spain. (a) (b) (c) Outputs Outputs Execution Outputs Observed element Execution TERPRET interpreter model Interpreter TERPRET interpreter model Inference Source Code Inputs Params Params Inputs Unobserved element Inputs Figure 1: A high level view of the program synthesis task. (a) Forward execution of a traditional interpreter. (b) Forward execution of a T ERPRE T model. (c) Inference in T ERPRE T model. Technique name Optimizer/Solver Description FMGD (Forward marginals, gradient descent) (I)LP ((Integer) linear programming) SMT TensorFlow A gradient descent based approach which generalizes the approach used by Kurach et al. [2015]. Gurobi A novel linear program relaxation that supports Gates [Minka and Winn, 2009]. Z3 Translation of the problem into a first-order logical formula with existential constraints. Cast the T ERPRE T model as a partial program (the interpreter) containing holes (the source code) to be inferred from a specification (input-output examples). S KETCH [Solar-Lezama, 2008] S KETCH Table 1: T ERPRE T back-end inference algorithms. In this work we focus on models that represent programs as simple, natural source code [Hindle et al., 2012], i.e., the kind of source code that people write. There are two main advantages to representing programs as source code rather than weights of a neural network controller. First, source code is interpretable; the resulting models can be inspected by a human and debugged and modified. Second, programming languages are designed to make it easy to express the algorithms that people want to write. By using these languages as our model representation, we inherit inductive biases that can lead to strong generalization (i.e., generalizing successfully to test data that systematically differs from training). Of course, natural source code is likely not the best representation in all cases. For example, programming languages are not designed for writing programs that classify images, and there is no reason to expect that natural source code would impart a favorable inductive bias in this case. Optimization over program space is known to be a difficult problem. However, recent progress in neural networks showing that it is possible to learn models with differentiable computer architectures, along with the success of gradient descent-based optimization, raises the question of whether gradient descent could be a powerful new technique for searching over program space. These issues motivate the main questions in this work. We ask (a) whether new models can be designed specifically to synthesize interpretable source code that may contain looping and branching structures, and (b) how searching over program space using gradient descent compares to the combinatorial search methods from traditional IPS. To address the first question we develop models inspired by intermediate representations used in compilers like LLVM [Lattner and Adve, 2004] that can be trained by gradient descent. These models interact with external storage, handle non-trivial control flow with explicit if statements and loops, and, when appropriately discretized, a learned model can be expressed as interpretable source code. We note two concurrent works, Adaptive Neural Compilation [Bunel et al., 2016] and Differentiable Forth [Riedel et al., 2016], which implement similar models. To address the second question, concerning the efficacy of gradient descent, we need a way of specifying many IPS problems such that the gradient based approach can be compared to alternative approaches in a like-for-like manner across a variety of domains. The alternatives originate from rich histories of IPS in the programming languages and inference in discrete graphical models. To our knowledge, no such comparison has previously been performed. Both of the above benefit from being formulated in the context of T ERPRE T. T ERPRE T provides a means for describing an execution model (e.g., a Turing Machine, an assembly language, etc.) by defining a a program representation and an interpreter that maps inputs to outputs using the 2 T = 5 # ################################################ # Source code parametrisation # # ################################################ ruleTable = Param (2)[2 , 2] 1 2 3 4 5 tape[1] [0] 0 0 copy 1 6 # ################################################ # Interpreter model # # ################################################ tape = Var (2)[T] initial_tape = Input (2)[2] final_tape = Output (2) tape [0]. set_to ( initial_tape [0]) tape [1]. set_to ( initial_tape [1]) 7 8 9 10 11 12 13 14 15 for t in range (1, T − 1): with tape[t] as x1: with tape[t − 1] as x0: tape[t + 1]. set_to ( ruleTable [x0 , x1 ]) 16 17 18 19 20 0 ruleTable [0,0] 1 tape[2] [0,1] [1,0] 0 [1,1] 0 0 1 1 1 0 0 copy 1 1 0 1 final_tape . set_to (tape[T − 1]) 21 1 tape[T - 1] Figure 2: Illustrative example of a T ERPRE T model and corresponding factor graph which describe a toy automaton that updates a binary tape according to the previous two entries and a rule (refer to long version for definition of graphical symbols). parametrized program. The T ERPRE T description is independent of any particular inference algorithm. The IPS task is to infer the execution model parameters (the program) given an execution model and pairs of inputs and outputs. An overview of the synthesis task appears in Fig. 1. To perform inference, T ERPRE T is automatically compiled into an intermediate representation which can be fed to a particular inference algorithm. Table 1 describes the inference algorithms currently supported by T ERPRE T. Interpretable source code can be obtained directly from the inferred model parameters. The driving design principle for T ERPRE T is to strike a subtle balance between the breadth of expression needed to precisely capture a range of execution models, and the restriction of expression needed to ensure that automatic compilation to a range of different back-ends is tractable. 2 T ERPRE T Language Due to space, we give just a simple example of how T ERPRE T models are written. For a full grammar of the language and several longer examples, see the long version Gaunt et al. [2016b]. T ER PRE T obeys Python syntax, and we use the Python ast library to parse and compile T ERPRE T models. The model is composed of Param variables that define the program, Var variables that represent the intermediate state of computation, and Inputs and Outputs. Currently, all variables must be discrete with constant sizes. T ERPRE T supports loops with ranges defined by constants2 , if statements, arrays, array indexing, and user-defined functions that map a discrete set of inputs to a discrete output. In total, the constraints imply that a model can be converted into a gated factor graph [Minka and Winn, 2009]. The details of how this works are in the longer version. A very simple T ERPRE T model appears in Fig. 2. In this model, there is a binary tape that the program writes to. The program is a rule table that specifies which state to write at the current position of a tape, conditional on the pattern that appeared on the two previous tape locations. The first two tape positions are initialized as Inputs, and the final tape position is the program output. We have used T ERPRE T to build much more complicated models, including a Turing Machine, boolean circuits, a Basic Block model that is similar to the intermediate representation used by LLVM, and an assembly-like model. 2 These constants define maximum quantities, like the maximum number of timesteps that a program can execute for, or the maximum number of instructions that can be in a program. Variable-length behavior can be achieved by defining an absorbing end-state, by allowing a no-op instruction, etc. 3 Turing machine code state read write 0 Head 0110_ Tape 1 move new state 0 ?? ?? ?? 1 ?? ?? ?? _ ?? ?? ?? 0 ?? ?? ?? 1 ?? ?? ?? … *T wire 1 ?? wire 3 ?? ?? wire 4 … ?? Logic gate wire 2 regout ?? Current Block regin1 regin2 instr ( = ?? ?? >0 ?? , ?? ) regcond if then ??blockthen else Current Line instr if ?? regin1 is JZ: if instr elif ?? == 0 : goto regin1 is JNZ: if regout else: ?? ?? instr ?? != 0 : goto regin1 regin2 = ?? ( ?? , goto next Next Line ?? ) ??blockelse TURING MACHINE Description Invert Prepend zero Binary decrement Perfom bitwise inversion of a binary string on the tape. Right shift all symbols and insert a “0" in the first cell. Decrement a binary representation on the tape by 1. BOOLEAN CIRCUITS Description 2-bit controlled shift register full adder 2-bit adder Swap bits on wires 2 & 3 iff wire 1 is on. Perform binary addition of two bits including carries. Perform binary addition on two-bit numbers. BASIC BLOCK Description Access Decrement List-K Access the k th element of a contiguous array. Decrement all elements in a contiguous array. Access the k th element of a linked list. ASSEMBLY Description branchAddr ?? branchAddr Access Decrement List-K As above. Table 2: Overview of benchmark problems, grouped by execution model. We illustrate the basic structure of each model, with parameters of the model to be inferred denoted by ??. 3 Experimental Results Table 2 gives an overview of the benchmark programs which we attempt to synthesize. We created T ERPRE T descriptions for each execution model, we designed three synthesis tasks per model which are specified by up to 16 input-output examples. We measure the time taken by the inference techniques listed in Table 1 to synthesize a program for each task. Results are summarized in Table 3. With the exception of the FMGD algorithm, we perform a single run with a timeout of 4 hours for each task. For the FMGD algorithm we run both a Vanilla form and an Optimized form with additional heuristics such as gradient clipping, gradient noise and an entropy bonus (Kurach et al. [2015]) to aid convergence. Even with these heuristics we observe that several random initializations of the FMGD algorithm stall in an uninterpretable local optimum rather than finding an interpretable discrete program in a global optimum. In the Vanilla case we report the fraction of 20 different random initializations which lead to any globally optimal solution consistent with the input-output specification and also the wall clock time for 1000 epochs of the gradient descent algorithm (the typical number required to reach convergence on a successful run). In the Optimized FMGD case, we randomly draw 120 sets of hyperparameters from a manually chosen distribution and run the learning with 20 different random initializations for each setting. We then report the success rate for the best hyperparameters found and also for the average across all runs in the random search. Our results show that traditional techniques employing constraint solvers (SMT and Sketch) outperform other methods (FMGD and ILP), with S KETCH being the only system able to solve all of these benchmarks before timeout3 . Furthermore, Table 3 highlights that the precise formulation of the interpreter model can affect the speed of synthesis. Both the Basic Block and Assembly models are equally expressive, but the Assembly model is biased towards producing straight line code with minimal branching. In cases where synthesis was successful the Assembly representation is seen to outperform the Basic Block model in terms of synthesis time. In addition, we performed a separate experiment to investigate the local optima arising in the FMGD formulation. Using T ERPRE T we describe the task of inferring the values of a bit string of length K from observation of the parity of neighboring variables. It is possible to show analytically that the number of local optima grow exponentially with K, and Table 4 provides empirical evidence that these minima are encountered in practice and they hinder the convergence of the FMGD algorithm. 3 Additional (pre)processing performed by S KETCH makes it slower than a raw SMT solver on the smaller tasks but allows it to succeed on the larger tasks 4 4 Conclusion We presented T ERPRE T, a probabilistic programming language for specifying IPS problems. The flexibility of the T ERPRE T language in combination with the four inference backends allows likefor-like comparison between gradient-based and constraint-based techniques for inductive program synthesis. The primary take-away from the experiments is that constraint solvers outperform other approaches in all cases studied. However, our work is (intentionally) only measuring the ability to efficiently search over program space. We remain optimistic about extensions to the T ERPRE T framework which allow differentiable interpreters to handle problems involving perceptual data [Gaunt et al., 2016a], and about using machine learning techniques to guide search-based techniques [Balog et al., 2016]. References Marcin Andrychowicz and Karol Kurach. Learning efficient algorithms with hierarchical attentive memory. arXiv preprint arXiv:1602.03218, 2016. Matej Balog, Alexander L Gaunt, Marc Brockschmidt, Sebastian Nowozin, and Daniel Tarlow. Deepcoder: Learning to write programs. arXiv preprint arXiv:1611.01989, 2016. Alan W Biermann. The inference of regular lisp programs from examples. IEEE transactions on Systems, Man, and Cybernetics, 8(8):585–600, 1978. Rudy Bunel, Alban Desmaison, Pushmeet Kohli, Philip H. S. Torr, and M. Pawan Kumar. Adaptive neural compilation. CoRR, abs/1605.07969, 2016. URL http://arxiv.org/abs/1605.07969. Alexander L Gaunt, Marc Brockschmidt, Nate Kushman, and Daniel Tarlow. Lifelong perceptual programming by example. arXiv preprint arXiv:1611.02109, 2016a. Alexander L Gaunt, Marc Brockschmidt, Rishabh Singh, Nate Kushman, Pushmeet Kohli, Jonathan Taylor, and Daniel Tarlow. Terpret: A probabilistic programming language for program induction. arXiv preprint arXiv:1608.04428, 2016b. C. Lee Giles, Guo-Zheng Sun, Hsing-Hen Chen, Yee-Chun Lee, and Dong Chen. Higher order recurrent networks and grammatical inference. In Advances in Neural Information Processing Systems 2, [NIPS Conference, Denver, Colorado, USA, November 27-30, 1989], pages 380–387, 1989. Alex Graves, Greg Wayne, and Ivo Danihelka. Neural turing machines. CoRR, abs/1410.5401, 2014. URL http://arxiv.org/abs/1410.5401. Edward Grefenstette, Karl Moritz Hermann, Mustafa Suleyman, and Phil Blunsom. Learning to transduce with unbounded memory. In Advances in Neural Information Processing Systems, pages 1828–1836, 2015. Sumit Gulwani. Automating string processing in spreadsheets using input-output examples. In ACM SIGPLAN Notices, volume 46, pages 317–330. ACM, 2011. Sumit Gulwani, William Harris, and Rishabh Singh. Spreadsheet data manipulation using examples. Communications of the ACM, Aug 2012. Abram Hindle, Earl T Barr, Zhendong Su, Mark Gabel, and Premkumar Devanbu. On the naturalness of software. In 2012 34th International Conference on Software Engineering (ICSE), pages 837– 847. IEEE, 2012. Armand Joulin and Tomas Mikolov. Inferring algorithmic patterns with stack-augmented recurrent nets. In Advances in Neural Information Processing Systems 2, [NIPS Conference, Denver, Colorado, USA, November 27-30, 1989], pages 190–198, 2015. Łukasz Kaiser and Ilya Sutskever. Neural gpus learn algorithms. In Proceedings of the 4th International Conference on Learning Representations., 2016. Karol Kurach, Marcin Andrychowicz, and Ilya Sutskever. Neural random-access machines. In Proceedings of the 4th International Conference on Learning Representations 2016, 2015. URL http://arxiv.org/abs/1511.06392. 5 log10 (D) T N Time Vanilla FMGD Best Hypers Average Hypers ILP Time SMT Time S KETCH Time Invert Prepend zero Binary decrement BOOLEAN CIRCUITS 4 9 9 6 6 9 5 5 5 76.5 98 163 100% 60% 5% 100% 100% 25% 51% 37% 2% 0.6 17.0 191.9 0.7 0.9 1.6 3.1 2.6 3.3 2-bit controlled shift register Full adder 2-bit adder BASIC BLOCK 10 13 22 4 5 8 8 8 16 - - - - 2.5 38 13076.5 0.7 1.9 174.4 2.7 3.5 355.4 Access Decrement List-K ASSEMBLY 14 19 33 5 18 11 5 5 5 173.8 811.7 - 15% - 50% 5% - 1.1% 0.04% - 98.0 - 14.4 - 4.3 559.1 5493.0 Access Decrement List-K 13 20 29 5 27 16 5 5 5 134.6 - 20% - 90% - 16% - 3.6 - 10.5 - 3.8 69.4 16.8 TURING MACHINE 6 Table 3: Benchmark results. For FMGD we present the time in seconds for 1000 epochs and the success rate out of {20, 20, 2400} random restarts in the {Vanilla, Best Hypers and Average Hypers} columns respectively. For other back-ends we present the time in seconds to produce a synthesized program. The symbol indicates timeout (> 4h) or failure of any random restart to converge. N is the number of provided input-output examples used to specify the task in each case. Vanilla FMGD Best Hypers Average Hypers K=4 K=8 K = 16 K = 32 K = 64 K = 128 100% 100% 84% 53% 100% 42% 14% 100% 21% 0% 70% 4% 0% 80% 1% 0% 0% 0% Table 4: Percentage of runs that converge to the global optimum for FMGD on the Parity Chain example of length K. Chris Lattner and Vikram Adve. Llvm: A compilation framework for lifelong program analysis & transformation. In Code Generation and Optimization, 2004. CGO 2004. International Symposium on, pages 75–86. IEEE, 2004. Tom Minka and John Winn. Gates. In Advances in Neural Information Processing Systems, pages 1073–1080, 2009. Arvind Neelakantan, Quoc V. Le, and Ilya Sutskever. Neural programmer: Inducing latent programs with gradient descent. In Proceedings of the 4th International Conference on Learning Representations 2016, 2016. Scott E. Reed and Nando de Freitas. Neural programmer-interpreters. In Proceedings of the 4th International Conference on Learning Representations 2016, 2016. Sebastian Riedel, Matko Bosnjak, and Tim Rocktäschel. Programming with a differentiable forth interpreter. CoRR, abs/1605.06640, 2016. URL http://arxiv.org/abs/1605.06640. Armando Solar-Lezama. Program Synthesis By Sketching. PhD thesis, EECS Dept., UC Berkeley, 2008. Phillip D Summers. A methodology for lisp program construction from examples. Journal of the ACM (JACM), 24(1):161–175, 1977. Jason Weston, Sumit Chopra, and Antoine Bordes. Memory networks. In Proceedings of the 3rd International Conference on Learning Representations 2015, 2014. URL http://arxiv.org/ abs/1410.3916. 7
9cs.NE
Multi-Label Classification of Patient Notes: Case Study on ICD Code Assignment Tal Baumel arXiv:1709.09587v3 [cs.CL] 20 Nov 2017 Ben-Gurion University Beer-Sheva, Israel Jumana Nassour-Kassis Raphael Cohen Michael Elhadad Noémie Elhadad Chorus.ai San Francisco, CA Ben-Gurion University Beer-Sheva, Israel Columbia University New York, NY Ben-Gurion University Beer-Sheva, Israel Abstract The automatic coding of clinical documentation according to diagnosis codes is a useful task in the Electronic Health Record, but a challenging one due to the large number of codes and the length of patient notes. We investigate four models for assigning multiple ICD codes to discharge summaries, and experiment with data from the MIMIC II and III clinical datasets. We present Hierarchical Attentionbidirectional Gated Recurrent Unit (HA-GRU), a hierarchical approach to tag a document by identifying the sentences relevant for each label. HA-GRU achieves state-of-the art results. Furthermore, the learned sentence-level attention layer highlights the model decision process, allows for easier error analysis, and suggests future directions for improvement. Introduction In Electronic Health Records (EHRs), there is often a need to assign multiple labels to a patient record, choosing from a large number of potential labels. Diagnosis code assignment is such a task, with a massive amount of labels to chose from (14,000 ICD9 codes and 68,000 ICD10 codes). Largescale multiple phenotyping assignment, problem list identification, or even intermediate patient representation can all be cast as a multi-label classification over a large label set. More recently, in the context of predictive modeling, approaches to predict multiple future healthcare outcomes, such as future diagnosis codes or medication orders have been proposed in the literature. There again, the same setup occurs where patient-record data is fed to a multi-label classification over a large label set. In this paper, we investigate how to leverage the unstructured portion of the EHR, the patient notes, along a novel application of neural architectures. We focus on three characteristics: (i) a very large label set (6,500 unique ICD9 codes and 1,047 3-digit unique ICD9 codes); (ii) a multi-label setting (up to 20 labels per instance); (iii) instances are long documents (discharge summaries on average 1,900-word long); and (iv) furthermore, because we work on long documents, one critical aspect of the multi-label classification is transparency—to highlight the elements in the documents that explain and support the predicted labels. While there has been much work on each of these characteristics, there Copyright c 2018, Association for the Advancement of Artificial Intelligence (www.aaai.org). All rights reserved. has been limited work to tackle all at once, particularly in the clinical domain. We experiment with four approaches to classification: an SVM-based one-vs-all model, a continuous bag-of-words (CBOW) model, a convolutional neural network (CNN) model, and a bidirectional Gated Recurrent Unit model with a Hierarchical Attention mechanism (HA-GRU). Among them, the attention mechanism of the HA-GRU model provides full transparency for classification decisions. We rely on the publicly available MIMIC datasets to validate our experiments. A characteristic of the healthcare domain is long documents with a large number of technical words and typos/misspellings. We experiment with simple yet effective preprocessing of the input texts. Our results show that careful tokenization of the input texts, and hierarchical segmentation of the original document allow our Hierarchical Attention GRU architecture to yield the most promising results, over the SVM, CBOW, and CNN models, while preserving the full input text and providing effective transparency. Previous Work We review previous work in the healthcare domain as well as recent approaches to extreme multi-label classification, which take place in a range of domains and tasks. Multi-label Patient Classifications Approaches to classification of patient records against multiple labels fall into three types of tasks: diagnosis code assignment, patient record labeling, and predictive modeling. Diagnosis Code Assignment. Automated ICD coding is a well established task, with several methods proposed in the literature, ranging from rule based (Crammer et al. 2007; Farkas and Szarvas 2008) to machine learning such as support vector machines, Bayesian ridge regression, and Knearest neighbor (Larkey and Croft 1995; Lita et al. 2008). Some methods exploit the hierarchical structure of the ICD taxonomy (Perotte et al. 2011; Perotte et al. 2014), while others incorporated explicit co-occurrence relations between codes (Kavuluru, Rios, and Lu 2015). In many cases, to handle the sheer amount of labels, the different approaches focus on rolled-up ICD codes (i.e., 3-digit version of the codes and their descendants in the ICD taxonomy) or on a subset of the codes, like in the shared community task for radiology code assignment (Pestian et al. 2007). It is difficult to compare the different methods proposed, since each relies on different (and usually not publicly available) datasets. We experiment with the MIMIC dataset, since it is publicly available to the research community. Methodswise, our approach departs from previous work in two important ways: we experiment with both massively large and very large label sets (all ICD9 code and rolled-up ICD9 codes), and we experiment with transparent models that highlight portions of the input text that support the assigned codes. Patient Record Labeling. Other than automated diagnosis coding, most multi-label patient record classifiers fall in the tasks of phenotyping across multiple conditions at once. For instance, the UPhenome model takes a probabilistic generative approach to assign 750 latent variables (Pivovarov et al. 2015). More recently, in the context of multi-task learning, Harutyunyan and colleagues experimented with phenotyping over 25 critical care conditions (Harutyunyan et al. 2017). Predictive Modeling. Previous work in EHR multi-label classification has mostly focused on predictive scenarios. The size of the label set varies from one approach to another, and most limit the label set size however: DeepPatient (Miotto et al. 2016) predicts over a set of 78 condition codes. (Lipton et al. 2015) leverage an LSTM model to predict over a vocabulary of 128 diagnosis codes. DoctorAI (Choi, Bahadori, and Sun 2015) predicts over a set of 1,183 3-digit ICD codes and 595 medication groups. The Survival Filter (Ranganath et al. 2015) predicts a series of future ICD codes across approximately 8,000 ICD codes. Inputs to Multi-Label Classifications. Most work in multi-label classification takes structured input. For instance, the Survival Filter expects ICD codes as input to predict the future ICD codes. DoctorAI takes as input medication orders, ICD codes, problem list, and procedure orders at a given visit. Deep Patient does take the content of notes as input, but the content is heavily preprocessed into a structured input to their neural network, by tagging all texts with medical named entities. In contrast, our approach is to leverage the entire content of the input texts. Our work contributes to clinical natural language processing (Demner Fushman and Elhadad 2016), which only recently investigated neural representations and architectures for traditional tasks such as named entity recognition (Jagannatha and Yu 2016). Multi-label Extreme Classification In extreme multi-label learning, the objective is to annotate each data point with the most relevant subset of labels from an extremely large label set. Much work has been carried outside of the healthcare domain on tasks such as image classification (Tsoumakas and Katakis 2006; Weston, Bengio, and Usunier 2011), question answering (Choi et al. 2016), and advertising (Jain, Prabhu, and Varma 2016). In (Weston, Bengio, and Usunier 2011), the task of annotating a very large dataset of images (> 10M ) with a very large label set (> 100K) was first addressed. The authors introduced the WSABIE method which relies on two main features: (i) records (images) and labels are embedded in a shared lowdimension vector space; and (ii) the multi-label classification task is modeled as a ranking problem, evaluated with a Hamming Loss on a P@k metric. The proposed online approximate WARP loss allowed the algorithm to perform fast enough on the scale of the dataset. We found that in our case, the standard Micro-F measure is more appropriate as we do not tolerate approximate annotations to the same extent as in the image annotation task. The SLEEC method (Bhatia et al. 2015) also relies on learning an embedding transformation to map label vectors into a low-dimensional representation. SLEEC learns an ensemble of local distance preserving embeddings to accurately predict infrequently occurring labels. This approach attempts to exploit the similarity among labels to improve classification, and learns different representations for clusters of similar labels. Other approaches attempt to reduce the cost of training over very large datasets by considering only part of the labels for each classification decision (Yen et al. 2016). SLEEC was later improved in (Jain, Prabhu, and Varma 2016) with the PfastreXML method which also adopted P@k loss functions aiming at predicting tail labels. In (Joulin et al. 2016), the FastText method was introduced as a simple and scalable neural bag of words approach for assigning multiple labels to text. We test a similar model (CBOW) in our experiments as one of our baselines. Dataset and Preprocessing We use the publicly available de-identified MIMIC dataset of ICU stays from Beth Israel Deaconess Medical Center (Saeed et al. 2011; Johnson et al. 2016). MIMIC Datasets To test the impact of training size, we relied on both the MIMIC II (v2.6) and MIMIC III (v1.4) datasets. MIMIC III comprises records collected between 2001 and 2012, and can be described as an expansion of MIMIC II (which comprises records collected between 2001 and 2008), along with some edits to the dataset (including de-identification procedures). To compare our experiments to previous work in ICD coding, we used the publicly available split of MIMIC II from (Perotte et al. 2014). It contains 22,815 discharge summaries divided into a training set (20,533 summaries) and a testset of unseen patients (2,282 summaries). We thus kept the same train and the test-set from MIMIC II, and constructed an additional training set from MIMIC III. We made sure that the test-set patients remained unseen in this training set as well. Overall, we have two training sets, which we refer to as MIMIC II and MIMIC III, and a common test-set comprising summaries of unseen patients. While there is a large overlap between MIMIC II and MIMIC III, there are also marked differences. We found Nb of records Nb of unique tokens Avg nb of tokens / record Avg nb of sentences / record Nb of full labels Nb of rolled-up labels Label Cardinality Label Density % labels with 50+ records MIMIC II MIMIC III Test Set 20,533 69,248 1,529 90 4,847 948 9.24 0.0019 11.33% 49,857 119,171 1,947 112 6,527 1,047 11.48 0.0018 18.19% 2,282 33,958 1,893 104 2,451 684 11.42 0.0047 4.08% Table 1: Datasets descriptive statistics. many cases where discharge summaries from 2001-2008 are found in one dataset but not in the other. In addition, MIMIC III contains addenda to the discharge summaries that were not part of MIMIC II. After examining the summaries and their addenda, we noticed that the addenda contain vital information for ICD coding that is missing from the main discharge summaries; therefore, we decided to concatenate the summaries with their addenda. Table 1 reports some descriptives statistics regarding the datasets. Overall, MIMIC III is larger than MIMIC II from all standpoints, including amounts of training data, vocabulary size, and overall number of labels. ICD9 Codes Our label set comes from the ICD9 taxonomy. The International Classification of Diseases (ICD) is a repository maintained by the World Health Organization (WHO) to provide a standardized system of diagnostic codes for classifying diseases. It has a hierarchical structure, connecting specific diagnostic codes through is-a relations. The hierarchy has eight levels, from less specific to more specific. ICD codes contain both diagnosis and procedure codes. In this paper, we focus on diagnosis codes only. ICD9 codes are conveyed as 5 digits, with 3 primary digits and 2 secondary ones. Table 1 provides the ICD9 label cardinality and density as defined by (Tsoumakas and Katakis 2006). Cardinality is the average number of codes assigned to records in the dataset. Density is the cardinality divided by the total number of codes. For both training sets, the number of labels is of the same order as the number of records, and the label density is extremely low. This confirms that the task of code assignment belongs to the family of extreme multi-label classification. We did not filter any ICD code based on their frequency. We note, however that there are approximately 1,000 frequent labels (defined as assigned to at least 50 records) (Table 1). We experimented with two versions of the label set: one with all the labels (i.e., 5-digit), and one with the labels rolled up to their 3-digit equivalent. Input Texts Tokenization. Preprocessing of the input records comprised the following steps: (i) tokenize all input texts us- ing spaCy library 1 ; (ii) convert all non-alphabetical characters to pseudo-tokens (e.g., “11/2/1986” was mapped to “dd/d/dddd”); (iii) build the vocabulary as tokens that appear at least 5 times in the training set; and (iv) map any out-ofvocabulary word to its nearest word in the vocabulary (using the edit distance). This step is simple, yet particularly useful in reducing the number of misspellings of medical terms. These preprocessing steps has a strong impact on the vocabulary. For instance, there were 1,005,489 unique tokens in MIMIC III and test set before preprocessing, and only 121,595 remaining in the vocabulary after preprocessing (an 88% drop). This step improved F-measure performance by ˜0.5% when tested on the CBOW and CNN methods (not reported). Hierarchical Segmentation. Besides tokenization of the input texts, we carried one more level of segmentation, at the sentence level (using the spaCy library as well). There are two reasons for preprocessing the input texts with sentence segmentation. First, because we deal with long documents, it is impossible and ineffective to train a sequence model like an GRU on such long sequences. In previous approaches in document classification, this problem was resolved by truncating the input documents. In the case of discharge summaries, however, this is not an acceptable solution: we want to preserve the entire document for transparency. Second, we are inspired by the moving windows of (Johnson and Zhang 2014) and posit that sentences form linguistically inspired windows of word sequences. Beyond tokens and sentences, discharge summaries exhibit strong discourse-level structure (e.g., history of present illness and past medical history, followed by hospital course, and discharge plans) (Li, Lipsky Gorman, and Elhadad 2010). This presents an exciting opportunity for future work to exploit discourse segments as an additional representation layer of input texts. Methods We describe the four models we experimented with. ICD coding has been evaluated in the literature according to different metrics: Micro-F, Macro-F, a variant of Macro-F that takes into account the hierarchy of the codes (Perotte et al. 2014), Hamming and ranking loss (Wang et al. 2016), and a modified version of mean reciprocal rank (MRR) (Subotin and Davis 2014). We evaluate performance using the MicroF metric, since it is the most commonly used metric. SVM. We used Scikit Learn (Pedregosa et al. 2011) to implement a one-vs-all, multi-label binary SVM classifier. Features were bag of words, with tf*idf weights (determined from the corpus of release notes) for each label. Stop words were removed using Scikit Learn default English stop-word list. The model fits a binary SVM classifier for each label (ICD code) against the rest of the labels. We also experimented with χ2 feature filtering to select the top-N words 1 https://spacy.io/ Binary Cross-Entropy Loss Binary Cross-Entropy Loss Fully Connected (Sigmoid Activation) Fully Connected (Sigmoid Activation) Max Pooling Average Convolution Layer Embedding Embedding 𝑤" 𝑤# 𝑤$ … 𝑤% 𝑤" 𝑤# 𝑤$ … 𝑤% diagnoses that share lexical words will not be distinguished by the model. CNN. To address the problems of the CBOW model, the next model we investigate is a convolutional neural network (CNN). A one dimensional convolution applied on list of embedded words could be considered as a type of n-gram model, where n is the convolution filter size. The architecture of this model is very similar to the CBOW model, but instead of averaging the embedded words we apply a one dimensional convolution layer with filter f , followed by a max pooling layer. On the output of the max pool layered a fully connected layer was applied, like in the CBOW model. We also experimented with deeper convolution networks and inception module (LeCun 2015), but they did not yield improved results. Embedding = E · [w1 , w2 , ..., wn ] Figure 1: CBOW architecture on the left and CNN model architecture on the right. according to their mutual information with each label, but this did not improve performance. CBOW. The continuous-bag-of-words (CBOW) model is inspired by the word2vec CBOW model (Mikolov et al. 2013) and FastText (Joulin et al. 2016). Both methods use a simple neural-network to create a dense representation of words and use the average of this representation for prediction. The word2vec CBOW tries to predict a word from the words that appear around it, while our CBOW model for ICD classification predicts ICD9 codes from the words of its input discharge summary. The model architecture consists of an embedding layer applied to all the words in a given input text [w1 , w2 , ..., wn ], where wi is a one-hot encoding vector of the vocabulary. E is the embedding matrix with dimension nemb × V , where V is the size of the vocabulary and nemb is the embedding size (set to 100). The embedded words are averaged into a fixed-size vector and are fed to a fully connected layer with a matrix W and bias b, where the output dimension is the number of labels. We use a sigmoid activation on the output layer so all values are in the range of [0 − 1] and use a fixed threshold (0.5) to determine whether to assign a particular label. To train the model, we used binary cross-entropy loss (loss(target, output) = −(target · log(output) + (1 − target) · log(1 − output)). Embedding = E · [w1 , w2 , ..., wn ] Averaged = 1/nΣe∈Embedding (e) P rob = sigmoid(W · Averaged + b) While the model is extremely lightweight and fast it suffers from known bag-of-words issues: (i) it ignores word order; i.e., if negation will appear before a diagnosis mention, the model would not be able to learn this; (ii) multi-wordexpressions cannot be identified by the model, so different Conved = max i∈channels (Embedding ∗ f ) P rob = sigmoid(W · Conved + b) In our experiments, we used the same embedding parameter as in the CBOW model. In addition, we set the number of channels to 300, and the filter size to 3. HA-GRU. We now introduce the Hierarchical Attentionbidirectional Gated Recurrent Unit model (HA-GRU) an adaptation of a Hierarchical Attention Networks (Yang et al. 2016) to be able to handle multi-label classification. A Gated Recurrent Unit (GRU) is a type of Recurrent Neural Network. Since the documents are long (see Table 1 ad up to 13,590 tokens in the MIMIC III training set), a regular GRU applied over the entire document is too slow as it requires number layers of the document length. Instead we apply a hierarchal model with two levels of bidirectional GRU encoding. The first bidirectional GRU operates over tokens and encodes sentences. The second bidirectional GRU encodes the document , applied over all the encoded sentences. In this architecture, each GRU is applied to a much shorter sequence compared with a single GRU. To take advantage of the property that each label is invoked from different parts of the text, we use an attention mechanism over the second GRU with different weights for each label. This allows the model to focus on the relevant sentences for each label (Choi et al. 2016). To allow clarity into what the model learns and enable error analysis attention is also applied over the first GRU with the same weights for all the labels. Each sentence in the input text is encoded to a fixed length vector (64) by applying an embedding layer over all the inputs, applying a bidirectional GRU layer on the embedded words, and using a neural attention mechanism to encode the bidirectional GRU outputs (size of 128). After the sentences are encoded into a fixed length vector, we apply a second bidirectional GRU layer over the sentences using different attention layers to generate an encoding specified to each class (128 × #labels). Finally we applied a fully connected layer with softmax for each classifier to determine if the label should be assigned to the document. Training is ICD9 codes MIMIC II MIMIC III Classifiers Classifiers Classifiers SVM CBOW CNN HA-GRU Document GRU Layer Sentence Encoder Sentence Encoder Sentence Encoder 𝑤","𝑤",$ 𝑤",% … 𝑤",&' … 𝑤$,"𝑤$,$ 𝑤$,% … 𝑤$,&) 𝑤*," 𝑤*,$𝑤*,%… 𝑤*,&+ 28.13% 30.60% 33.25% 36.60% 22.25% 30.02% 40.72% 40.52% Rolled-up ICD9 codes MIMIC II MIMIC III 32.50% 42.06% 46.40% 53.86% 53.02% 43.30% 52.64% 55.86% Table 2: Micro-F on two settings (full and rolled-up ICDs) and for the four models when trained on MIMIC II or MIMIC III datasets. Figure 2: HA-GRU model architecture overview. Results achieved by using categorical cross-entropyP on every classifier separately (loss(target, output) = − x ouput(x) · log(target(x))) AttW eight(ini , v, w) = v · tanh(w · (ini )) AttW eight(ini , v, w) = eAttW eight(ini ,v,w) e P j AttW eightj (v,w) Attend(in, v, w) = sum(ini · AttW eight(ini , v, w)) Embedding = E · [w1 , w2 , ..., wn ] EncSentsj = Attend(GRU words(Embedding), vwords , wwords ) EncDoclabel = Attend(GRUsents (EncSents, vlabel , wlabel ), ) P roblabel = sof tmax(pwlabel · EncDoclabel + pblabel ) Where wi is a one-hot encoding vector of the vocabulary size V , E is an embedding matrix size of nemb × V , GRUwords is a GRU layer with state size hstate , wwords is a square matrix (hstate × hstate ) and vwords is a vector (hstate ) for the sentence level attention. GRUsents is a GRU layer with state size of hstate . wlabel is a square matrix (hstate × hstate ) and vlabel is a vector (hstate ) for the document level attention for each class, pwlabel is a matrix (hstate × 2) and pblabel is a bias vector with a size of 2 for each label. We implemented the model using DyNet (Neubig et al. 2017)2 . 𝑐" 𝑠" 𝑤" ,$ 𝑤" ,% 𝑤" ,& … 𝑤" ,'( Softmax Fully Connected Layer Classifier Embedding Sentence Encoder Sentence GRU Layer To evaluate the proposed methods on the MIMIC datasets, we conducted the following experiments. In the first setting we considered all ICD9 codes as our label set. We trained the SVM, CBOW, and CNN on the MIMIC II and on the MIMIC III training sets separately. All models were evaluated on the same test set according to Micro-F. In the second setting, we only considered the rolled-up ICD9 codes to their 3-digit codes. There (Table 2). HA-GRU gives the best results in the rolled-up ICD9 setting, with a 7.4% and 3.2% improvement over the CNN and SVM, the second best methods, in MIMIC II and MIMIC III respectively. In the full ICD-9 scenario, all methods yield better results when trained on MIMIC III rather than on MIMIC II. This is expected considering the larger size of MIMIC III over II. We note that our CNN yields the best Micro-F when trained on MIMIC III passing the HA-GRU by a small margin. In comparison to the previous work of (Perotte et al. 2014), our one-vs-all SVM yielded better results than their flat and hierarchy classifiers. This trend was confirmed when training on the new MIMIC III set, as well as when using the same evaluation metrics of (Perotte et al. 2014). We attribute these improved results both to the one-vs-all approach as well as our tokenization approach. Label Frequency Categorical CrossEntropy loss Weighted Average Sentence Attention Model Comparison Weighted Average Label Attention 𝑠$ 𝑠% 𝑠& … 𝑠' Figure 3: Zoom-in of the sentence encoder and classifier. We also tested the effect label frequency on the performance of the HA-GRU classifier. We recalculated precision and recall scores on subsets of labels. The subsets were created by sorting the labels by frequency they appear in MIMIC-III dataset and binning them to groups of 50 labels. As such, bin 1 comprises the 50 most frequent ICD9 codes in the training set (with an average 12% frequency over the records in the training set), codes in bin 2 had an average 1.9% frequency, codes in bin 3 appeared in 1.1% of the records, up to bin 8 which 0.2% of the records in the training set. The effect can be seen in Figure 5. We note that the recall score drops much more dramatically than the precision as the label frequency decreases. Model Explaining Power 2 Code available at https://github.com/talbaumel/ MIMIC. We discuss how the CNN and HA-GRU architectures can support model explaining power. Figure 4: Sample text of a patient note (one sentence per line). On the left, visualization for the with attention weights at the sentence and word levels associated with the ICD9 codes, on the left sentence level attention weights for ICD9 code “Heart failure”, on the the right for code “Traumatic pneumothorax and hemothorax”. find what word received the highest attention score. For example, in our experiments for label “428-Heart failure” we found that the sentence with the highest attention score was “d . congestive heart failure ( with an ejection fraction of dd % to dd % ) .”, while the token “failure” was found most relevant across all labels. Figure 4 provides additional examples. Note that the “d” and “dd” tokens are from the pre-procecssing step, which mapped all numbers to pseudotokens. Figure 5: Effect label frequency on HA-GRU performance when trained on MIMIC III. X-axis represents the bins of labels ranked by their frequency in the training set. CNN. To analyze the CNN prediction we can test which n-grams triggered the max-pooling layer. Given a sentence with n words we can feed it forward through the embedding layer and the convolution layer. The output of the convolution a list of vectors each the size of the number of channels of the convolution layer where vector corresponds to an n-gram. We can identify what triggered the max pooling layer by finding the maximum value of each channel. Thus, for predicted labels, one of the activated n-grams does include information relevant for that label (whether correct for true positive labels or incorrect for false positive labels). For example in our experiments, for the label: “682.6-Cellulitis and abscess of leg, except foot” one of the activated n-gram detected was “extremity cellulitis prior”. This transparency process can also be useful for error analysis while building a model, as it can highlight True Positive and False Positive labels. However, it is difficult in the CNN to trace back the decisions for False Negatives predictions. HA-GRU For the HA-GRU model we can use attention weights to better understand what sentences and what words in that sentence contributed the most to each decision. We can find which sentence had the highest attention score for each label, and given the most important sentence, we can Like in the CNN, we can use this process for error analysis. In fact, the HA-GRU model explains prediction with greater precision, at the sentence level. For instance, we could explore the following False Positive prediction: the model assigned the label “331-Other cerebral degenerations” to the sentence:“alzheimer ’s dementia .”. We can see that the condition was relevant to the medical note, but was mentioned under the patient’s past medical history (and not a current problem). In fact, many of the False Positive labels under the HA-GRU model were due to mentions belonging to the past medical history section. This suggests that the coding task would benefit from a deeper architecture, with attention to discourse-level structure. In contrast to the CNN, the HA-GRU model can also help analyze False Negative label assignments. When we explored the False Negative labels, we found that in many cases the model found a relevant sentence, but failed to classify correctly. This suggests the document-level attention mechanism is successful. For instance, for the False Negative “682-Other cellulitis and abscess”, the most attended sentence was “... for right lower extremity cellulitis prior to admission ...”. The false positive codes for this sentence included “250-Diabetes mellitus” and “414-Other forms of chronic ischemic heart disease”. We note that in the case of cellulitis, it is reasonable that the classifier preferred other, more frequent codes, as it is a common comorbid condition in the ICU.3 3 Full visualizations of sample discharge summaries are provided at https://www.cs.bgu.ac.il/˜talbau/ mimicdemo Conclusion We investigate four modern models for the task of extreme multi-label classification on the MIMIC datasets. Unlike previous work, we evaluate our models on all ICD9 codes thus making sure our models could be used for real world ICD9 tagging. The tokenization step, mapping rare variants using edit distance, improved results for CBOW and CNN models by ˜0.5%, highlighting the importance of preprocessing data noise problems in real-world settings. The HA-GRU model not only achieves the best performance on the task of rolled-up codes (55.86% F 1 on MIMIC III, ˜2.8% absolute improvement on the best SVM baseline) but is able to provide insight on the task for future work such as using discourse-level structure available in medical notes yet never used before. The ability to highlight the decision process of the model is important for adoption of such models by medical experts. On the sub-task of MIMIC II, which includes a smaller training dataset, HA-GRU achieved ˜7% absolute F 1 improvement, suggesting it requires less training data to achieve top performance, which is important for domain adaptation efforts when applying such models to patient records from other sources (such as different hospitals). Acknowledgements This work is supported by National Institute of General Medical Sciences Grant R01GM114355 (NE) and Frankel Center for Computer Science . References [Bhatia et al. 2015] Bhatia, K.; Jain, H.; Kar, P.; Varma, M.; and Jain, P. 2015. Sparse local embeddings for extreme multi-label classification. In Advances in Neural Information Processing Systems (NIPS), 730–738. [Choi, Bahadori, and Sun 2015] Choi, E.; Bahadori, M. T.; and Sun, J. 2015. Doctor AI: Predicting clinical events via recurrent neural networks. arXiv preprint arXiv:1511.05942. [Choi et al. 2016] Choi, E.; Hewlett, D.; Lacoste, A.; Polosukhin, I.; Uszkoreit, J.; and Berant, J. 2016. Hierarchical question answering for long documents. arXiv preprint arXiv:1611.01839. [Crammer et al. 2007] Crammer, K.; Dredze, M.; Ganchev, K.; Talukdar, P. P.; and Carroll, S. 2007. Automatic code assignment to medical text. In Proceedings of the ACL Workshop on BioNLP 2007: Biological, Translational, and Clinical Language Processing, 129–136. [Demner Fushman and Elhadad 2016] Demner Fushman, D., and Elhadad, N. 2016. Aspiring to unintended consequences of natural language processing: A review of recent developments in clinical and consumer-generated text processing. Yearbook of Medical Informatics 10(1):224–233. [Farkas and Szarvas 2008] Farkas, R., and Szarvas, G. 2008. Automatic construction of rule-based ICD-9-CM coding systems. BMC bioinformatics 9(3):S10. [Harutyunyan et al. 2017] Harutyunyan, H.; Khachatrian, H.; Kale, D. C.; and Galstyan, A. 2017. Multitask learn- ing and benchmarking with clinical time series data. arXiv preprint arXiv:1703.07771. [Jagannatha and Yu 2016] Jagannatha, A. N., and Yu, H. 2016. Structured prediction models for RNN based sequence labeling in clinical text. In Proceedings of the Conference on Empirical Methods in Natural Language Processing (EMNLP), 856. [Jain, Prabhu, and Varma 2016] Jain, H.; Prabhu, Y.; and Varma, M. 2016. Extreme multi-label loss functions for recommendation, tagging, ranking & other missing label applications. In Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, 935–944. [Johnson and Zhang 2014] Johnson, R., and Zhang, T. 2014. Effective use of word order for text categorization with convolutional neural networks. arXiv preprint arXiv:1412.1058. [Johnson et al. 2016] Johnson, A. E.; Pollard, T. J.; Shen, L.; Lehman, L.-w. H.; Feng, M.; Ghassemi, M.; Moody, B.; Szolovits, P.; Celi, L. A.; and Mark, R. G. 2016. MIMIC-III, a freely accessible critical care database. Scientific Data 3. [Joulin et al. 2016] Joulin, A.; Grave, E.; Bojanowski, P.; Douze, M.; Jégou, H.; and Mikolov, T. 2016. Fasttext.zip: Compressing text classification models. arXiv preprint arXiv:1612.03651. [Kavuluru, Rios, and Lu 2015] Kavuluru, R.; Rios, A.; and Lu, Y. 2015. An empirical evaluation of supervised learning approaches in assigning diagnosis codes to electronic medical records. Artificial Intelligence in Medicine 65(2):155– 166. [Larkey and Croft 1995] Larkey, L. S., and Croft, W. B. 1995. Automatic assignment of ICD9 codes to discharge summaries. Technical report, University of Massachusetts at Amherst, Amherst, MA. [LeCun 2015] LeCun, Y. 2015. LeNet-5, convolutional neural networks. http://yann.lecun.com/exdb/ lenet. [Li, Lipsky Gorman, and Elhadad 2010] Li, Y.; Lipsky Gorman, S.; and Elhadad, N. 2010. Section classification in clinical notes using supervised hidden Markov model. In Proceedings of the 1st ACM International Health Informatics Symposium, 744–750. ACM. [Lipton et al. 2015] Lipton, Z. C.; Kale, D. C.; Elkan, C.; and Wetzell, R. 2015. Learning to diagnose with LSTM recurrent neural networks. arXiv preprint arXiv:1511.03677. [Lita et al. 2008] Lita, L. V.; Yu, S.; Niculescu, R. S.; and Bi, J. 2008. Large scale diagnostic code classification for medical patient records. In Proceedings of the International Joint Conference on Natural Language Processing (IJCNLP), 877–882. [Mikolov et al. 2013] Mikolov, T.; Chen, K.; Corrado, G.; and Dean, J. 2013. Efficient estimation of word representations in vector space. arXiv preprint arXiv:1301.3781. [Miotto et al. 2016] Miotto, R.; Li, L.; Kidd, B. A.; and Dudley, J. T. 2016. Deep Patient: An unsupervised represen- tation to predict the future of patients from the electronic health records. Scientific Reports 6. [Neubig et al. 2017] Neubig, G.; Dyer, C.; Goldberg, Y.; Matthews, A.; Ammar, W.; Anastasopoulos, A.; Ballesteros, M.; Chiang, D.; Clothiaux, D.; Cohn, T.; et al. 2017. Dynet: The dynamic neural network toolkit. arXiv preprint arXiv:1701.03980. [Pedregosa et al. 2011] Pedregosa, F.; Varoquaux, G.; Gramfort, A.; Michel, V.; Thirion, B.; Grisel, O.; Blondel, M.; Prettenhofer, P.; Weiss, R.; Dubourg, V.; et al. 2011. Scikitlearn: Machine learning in python. Journal of Machine Learning Research 12(Oct):2825–2830. [Perotte et al. 2011] Perotte, A. J.; Wood, F.; Elhadad, N.; and Bartlett, N. 2011. Hierarchically supervised latent dirichlet allocation. In Advances in Neural Information Processing Systems (NIPS), 2609–2617. [Perotte et al. 2014] Perotte, A.; Pivovarov, R.; Natarajan, K.; Weiskopf, N.; Wood, F.; and Elhadad, N. 2014. Diagnosis code assignment: models and evaluation metrics. Journal of the American Medical Informatics Association 21(2):231–237. [Pestian et al. 2007] Pestian, J. P.; Brew, C.; Matykiewicz, P.; Hovermale, D. J.; Johnson, N.; Cohen, K. B.; and Duch, W. 2007. A shared task involving multi-label classification of clinical free text. In Proceedings of the ACL Workshop on BioNLP: Biological, Translational, and Clinical Language Processing, 97–104. [Pivovarov et al. 2015] Pivovarov, R.; Perotte, A. J.; Grave, E.; Angiolillo, J.; Wiggins, C. H.; and Elhadad, N. 2015. Learning probabilistic phenotypes from heterogeneous EHR data. Journal of Biomedical Informatics 58:156–165. [Ranganath et al. 2015] Ranganath, R.; Perotte, A. J.; Elhadad, N.; and Blei, D. M. 2015. The Survival Filter: joint survival analysis with a latent time series. In UAI, 742–751. [Saeed et al. 2011] Saeed, M.; Villarroel, M.; Reisner, A. T.; Clifford, G.; Lehman, L.-W.; Moody, G.; Heldt, T.; Kyaw, T. H.; Moody, B.; and Mark, R. G. 2011. Multiparameter intelligent monitoring in intensive care II (MIMIC-II): a public-access intensive care unit database. Critical Care Medicine 39(5):952. [Subotin and Davis 2014] Subotin, M., and Davis, A. R. 2014. A system for predicting ICD-10-PCS codes from electronic health records. In Proceedings of the ACL Workshop on Biomedical Natural Language Processing (BioNLP), 59– 67. Citeseer. [Tsoumakas and Katakis 2006] Tsoumakas, G., and Katakis, I. 2006. Multi-label classification: An overview. International Journal of Data Warehousing and Mining 3(3). [Wang et al. 2016] Wang, S.; Chang, X.; Li, X.; Long, G.; Yao, L.; and Sheng, Q. Z. 2016. Diagnosis code assignment using sparsity-based disease correlation embedding. IEEE Transactions on Knowledge and Data Engineering 28(12):3191–3202. [Weston, Bengio, and Usunier 2011] Weston, J.; Bengio, S.; and Usunier, N. 2011. WSABIE: Scaling up to large vocabulary image annotation. In Proceedings of the Interna- tional Joint Conference on Artificial Intelligence (IJCAI), volume 11, 2764–2770. [Yang et al. 2016] Yang, Z.; Yang, D.; Dyer, C.; He, X.; Smola, A.; and Hovy, E. 2016. Hierarchical attention networks for document classification. In Proceedings of NAACL-HLT, 1480–1489. [Yen et al. 2016] Yen, I. E.; Huang, X.; Zhong, K.; Ravikumar, P.; and Dhillon, I. S. 2016. PD-Sparse: A primal and dual sparse approach to extreme multiclass and multilabel classification. In Proceedings of the International Conference on Machine Learning (ICML).
2cs.AI
Submitted to the Brazilian Journal of Probability and Statistics arXiv: arXiv:1308.6626 Searching for the core variables in principal components analysis arXiv:1308.6626v4 [math.ST] 30 Jan 2017 Yanina Gimeneza , and Guido Giussania a Universidad de San Andrés and CONICET Abstract. In this article, we introduce a procedure for selecting variables in principal components analysis. It is developed to identify a small subset of the original variables that best explain the principal components through nonparametric relationships. There are usually some noisy uninformative variables in a dataset, and some variables that are strongly related to one another because of their general dependence. The procedure is designed to be used following the satisfactory initial principal components analysis with all variables, and its aim is to help to interpret the underlying structures. We analyze the asymptotic behavior of the method and provide some examples. 1 Introduction Principal components analysis (PCA) is the best known dimensional reduction procedure for multivariate data. An important drawback of PCA is that it sometimes provides poor quality interpretation of data for practical problems, because the final output is a linear combination of the original variables. The aim of the present study is to identify a small subset of the original variables in a dataset, whilst retaining most of the information related to the first k principal components. There is a large body of literature that focuses on trying to interpret principal components. Jolliffe (1995) has introduced rotation techniques. Vines (2000) proposed to restrict the value of the loadings for PCA to a small set of allowable integers such as {-1, 0, 1}. McCabe (1984) presented a different strategy that aims to select a subset of the original variables with a similar criterion to PCA. A few years later a whole literature of variable selection appeared, inspired by the LASSO (least absolute shrinkage and selection operator). This technique was introduced by Tibshirani (1996). The way the LASSO works was described thus: “ It shrinks some coefficients and sets others to 0, and hence tries to retain the good features of both subset selection and ridge Primary 62H25; secondary 62G08 Keywords and phrases. Informative Variables, Multivariate Analysis, Principal Components, Selection of Variables 1 2 Gimenez and Giussani regression... The ‘LASSO’ minimizes the residual sum of squares subject to the sum of the absolute value of the coefficients being less than a constant. Because of the nature of this constraint it tends to produce some coefficients that are exactly 0 and hence gives interpretable models.” Jolliffe et al. (2003) proposed SCoTLASS that imposes a bound on the sum of the absolute values of the loadings in the component, using a similar idea to the one that LASSO used in regression. Zou et al. (2006) presented SPCA (sparse PCA) that extends the “elastic net” of Zou & Hastie (2005) that was a generalization of the LASSO. As they mentioned “SPCA is built on the fact that PCA can be written as a regression-type optimization problem, with quadratic penalty; the LASSO penalty (via the elastic net) can then be directly integrated into the regression criterion, leading to a modified PCA with sparse loadings.” Luss & d’Aspremont (2010) studied the application of sparse PCA to clustering and problems of feature selection. Sparse PCA seeks sparse factors, or linear combinations of variables in the dataset, to explain as much variance in the data as possible while limiting the number of nonzero coefficients as far as possible. The authors applied their results to some classic biological clustering and feature selection problems. Recently, Witten & Tibshirani (2008) introduced the notion of Lassoed principal components for identifying differentially-expressed genes, and considered the problem of testing the significance of features in high dimensional data. Our approach is rather different and is designed to be used after satisfactory PCA has been achieved rather than, as in other methods, to produce principal components with particular characteristics (e.g., some coefficients that are zero) so that only interpretable principal components are produced. We first perform classical PCA and then look for a small subset of the original variables that contain almost all the relevant information to explain the principal components. However, our method can also be used after performing any sparse PCA method as those described previously. To develop our method, we borrowed some ideas for selecting variables from Fraiman et al. (2008), who introduced two procedures for selecting variables in cluster analysis, and classification rules. Both of these procedures are based on the idea of “blinding” unnecessary variables. To cancel the effect of a variable, they substituted all its values with the marginal mean (in the first procedure) or with the conditional mean (in the second). The marginal mean approach was mainly intended to identify “noisy” uninformative variables, but the conditional mean approach could also deal with dependence. We adapted the idea behind the second procedure to PCA. Searching for the core variables in principal components analysis 3 In Section 2, we introduce the main definitions, a population version of our proposed method, and the empirical version; we also present our main results. In Section 3, a simulation study is conducted, where the results are compared with other well-known PCA variable selection procedures. Finally, in Section 4, we study a real data example. Proofs are given in the Appendix. 2 Our method: Definitions and properties We begin by defining our notation and stating the problem in terms of the underlying distribution of the random vector X. Then we give our estimates based on the sample data, via the empirical distribution. 2.1 Population version We define X ∈ Rp as a random vector with distribution P. The coordinates of the vector X are defined as X[i], i = 1, . . . , p. The covariance matrix of X is denoted Σ. For a given random vector X̃, we say that it satisfy the Assumption H1 if: i) E(kX̃k2 ) < ∞; ii) The covariance matrix of X̃ is positive definite. iii) All the eigenvalues of the covariance matrix are different. Throughout the manuscript, X fulfills Assumption H1. As is well known, the first principal component associated with the vector X is defined as  α1 (P) := α1 = arg max V ar α0 X kαk=1 = arg max α0 Σα, kαk=1 and the next principal components are defined as αk (P) := αk = arg max V ar α0 X  kαk=1, α⊥[α1 ,...,αk−1 ] = arg max kαk=1, α0 Σα ∀ 2 ≤ k ≤ p, α⊥[α1 ,...,αk−1 ] where [α1 , . . . , αk−1 ] is the subspace generated by the vectors {α1 , . . . , αk−1 }. From the spectral theorem, it follows that, if λ1 > λ2 > . . . > λp are the Σ eigenvalues, the solutions to the PCA are the corresponding eigenvectors, αk , k = 1, . . . , p. 4 Gimenez and Giussani Given a subset of indices I ⊂ {1, . . . , p} with cardinality d ≤ p, we define X[I] as the subset of random variables {X[i], i ∈ I}. With a slight abuse of notation, if I = {i1 < . . . < id }, we can also denote X[I] to the vector (X[i1 ], . . . , X[id ]), and define the vector YI := (Y I [1], . . . , Y I [p]), where  X[i] if i ∈ I I Y [i] = E(X[i]|X[I]) if i ∈ / I. YI ∈ Rp depends only on the {X[i], i ∈ I} variables and then the principal components associated with the vector YI depend only on the variables in X[I]. The distribution of YI is denoted PYI , the covariance matrix is ΣYI and g i (z) = E(X[i]|X[I] = z) for i ∈ / I is the regression function. In what follows we assume that YI fulfills the Assumption H1. Remark: This assumptions will not hold if there is a variable X[i] such that g i (z) is a linear combination of the variables in I. For instance, if X is gaussian or X[i] is independent of the variables in I. In practice we will see how this problem can be tackled in the example 2 of section 3. We are looking for a subset I of small cardinality that minimizes the distance between the original principal components and the principal components that are function of the variables in the subset I. This can be done following two different approaches. Local approach We define the objective function h1 (I) as h1 (I, P, PYI ) := h1 (I, P) := h1 (I) = kα1 (P) − α1 (PYI )k2 , (2.1) which measures the squared distance between the first original principal component and the first principal component that is a function of the variables in the subset I. Given a fixed integer d, 1 ≤ d << p, Id is the family of all subsets of {1, . . . , p} with cardinality d and I1,0 ⊂ Id is the family of subsets in which the minimum h1 (I) is attained for I ∈ Id , i.e., I1,0 = argminI∈Id h1 (I), or, equivalently, h1 (I1 ) = minI∈Id h1 (I) for all I1 ∈ I1,0 . (2.2) Analogously, we define hk (I, P, PYI ) := hk (I, P) := hk (I) = kαk (P) − αk (PYI )k2 , (2.3) Searching for the core variables in principal components analysis 5 and Ik,0 = argminI∈Id hk (I), for k = 2, . . . , p. For k = 1, . . . , p (2.3) measures the squared distance between the k-th original principal component and the k-th principal component that is a function of the variables in the subset I. Principal components may, in some cases, be rather difficult to interpret, which is an important issue in practice. If we can find a small cardinal subset I, for which the objective function (2.3) is small enough, then the k-th principal component will be well explained by a subset of the original variables. Global approach In this case, the objective function is h(I) := q X pk hk (I), (2.4) k=1 Pq with pk ≥ 0, k=1 pk = 1, 2 ≤ q < p, and we define Ĩq,0 = argminI∈Id h(I). This time the objective function (2.4) deals with finding a unique subset I to explain the first q principal components at once. If we think that the q components are equally important then we choose pk = 1q . Otherwise, if some components are more important than others then we can put different weights. As a default we suggest choosing weights proportional to the P variance that each component is explaining, i.e. pk = λk / qk=1 λk . On the Local approach, we consider a different subset for each principal component, using the objective function (2.3) for each k. On the Global approach, we seek a unique subset for all the first q principal components using (2.4). In practice, we can choose q, so that the first q principal components explain a high percent of the total variance and consider a subset for this principal components. These subsets tell us which are the original variables that “best explain” the first q principal components. In what follows we refer to this method as the Blinding Procedure (BP). An important issue is how to choose d, the cardinality of the set I. On the one hand we have that the objective function (2.3) decreases when d 6 Gimenez and Giussani increases for every k. On the other hand we look for a subset I with small cardinality, so we have a constant tug of war. Since the components have unitary norms there is a direct relationship between (2.3) and the angle between the two vectors. It is clear that the smaller the angle is the closer the components are. Hence, for the k-th component we propose to fix an angle, γ, and choose d as the smallest value for which Ik,0 (d) makes the angle between the blinding and the original component smaller than γ. If we want “to explain” the first q principal components at once, we propose to fix an angle, γ, and choose d as the smallest value for which Ĩq,0 (d) makes the largest of the q angles smaller than γ. In both cases, the angle γ must be chosen by the user. As default, we propose to fix an angle not larger than 25 degrees. 2.2 Empirical version. Consistent estimates of the optimal subset We aimed to consistently estimate the sets I1 , . . . , Iq from a sample X1 , . . . , Xn of i.i.d. random vectors with distribution P. Given a subset I ∈ Id , the first step is to build a sample Y1I , . . . , YnI of random vectors in Rp , which only depends on X[I], using nonparametric estimates of the conditional expectation (the regression function). Below, we assume that Assumption H2 For all i ∈ / I, gni (z) is a strongly consistent estimate of g i (z) uniformly in z. Conditions under which H2 holds can be found in Hansen (2008). First, we define the empirical version of the blinded observations. As an example, we consider the nearest neighbours estimator. We therefore set an integer value r (the number of nearest neighbours that we are going to use) with respect to an appropriate metric (typically Euclidean or Mahalanobis distance), only considering the coordinates on I. More precisely, for each j ∈ {1, . . . , n}, we find the set of indices Cj =: Cj (Xj [I]) of the r-nearest neighbours of Xj [I] among {X1 [I], . . . , Xn [I]}, where Xj [I] = {Xj [i], i ∈ I}. Next, we define the random vectors YjI , 1 ≤ j ≤ n, verifying: YjI [i]  = 1 r P Xj [i] m∈Cj Xm [i] if i ∈ I otherwise, where Xj [i] stands for the ith-coordinate of the vector Xj . (2.5) 7 Searching for the core variables in principal components analysis This corresponds to use for i ∈ / I the nonparametric estimate gni (z) = gni (z[I]) = 1 r X Xm [i], m∈Cj (z[I]) since gni (z) is a strongly consistent estimate of g i (z), where g i (z) = E(X[i]|X[I] = z). Moreover, observe that the notation z[I] is to emphasize that the function depends on the coordinates indicated by the subset I. Pn stands for the empirical distribution associated with {Xj , 1 ≤ j ≤ n} and Pn,YI stands for the empirical distribution of {YjI , 1 ≤ j ≤ n}. In our examples to consistently estimate the optimal number of nearest neighbours we use the generalized cross validation procedure proposed by Li & Gong (1987), i.e. 2 1 Pn j=1 (Xj [i] − Yj [i]) n rbopt (i, I) = arg min , i∈ / I.  2 r 1 − 1r When d is large, nonparametric estimators perform poorly due to the curse of dimensionality. In this case, a semi-parametric approach should be used like that proposed by He & Shi (1996). Also a recent proposal by Biau et al. (2013) called COBRA can be used to avoid the curse of dimensionality. The consistency result given in the following theorem will still be valid as long as the semi-parametric estimates verify the consistency assumptions required for the purely nonparametric estimates. We will be mainly interested in cases where d is small. In our experience a good idea is to start the search with some genetic algorithm which provides an initial solution with a few variables (d small) and then improve the result working with card(I) ≤ d. Also a forward-backward algorithm as the one proposed in Fraiman et al. (2008) can be used. Finally, we define, for each I ∈ Id , the corresponding empirical versions α̂nk (I) := αk (Pn,YI ), ĥkn (I) = hk (I, Pn , Pn,YI ), Iˆkn = argminI∈Id ĥkn (I) (2.6) and ĥn (I) = q X k=1 respectively. pk ĥkn (I), Iˆn = argminI∈Id ĥn (I) (2.7) 8 Gimenez and Giussani Let us observe that α̂nk (I) corresponds to the principal component associated with the sample {YjI , 1 ≤ j ≤ n}. ĥkn (I) corresponds to the objective function of the k-th principal component, it measures the square distance between the k-th original principal component and the k-th principal component that is a function of the variables in the subset I. The function ĥkn (I) determines which are the variables that retain most of the information related to the k-th principal component. The variables we are choosing are the ones that minimize the function ĥkn (I). The subset Iˆkn indicates which this variables are. In case we are looking for a unique subset I to explain the first q principal components, we consider the function ĥn (I). A robust version can be obtained using robust principal components (see for instance Maronna et al. (2006)) and replacing in (2.5) the local mean by local median. Theorem 2.1. Under assumptions H1 for X and YI and H2 we have that Iˆkn ∈ Ik,0 ultimately for k = 1, . . . , q, i.e., Iˆkn = Ik with Ik ∈ Ik,0 ∀n > n0 (ω), with probability one. We also have that Iˆn ∈ Ĩq,0 ultimately. Proof. The proof is given in the Appendix. 3 Some simulated examples In this section we consider two simulated experiments to analyze the behavior of our method and compare it with other methods proposed in the literature. 3.1 Example 1 To better understand the heart of our procedure we start with a simple simulation example in dimension four. There are two “hidden” factors: V1 ∼ N (0, 1.252 ), V2 ∼ N (0, 0.552 ), where V1 , V2 are independent. Searching for the core variables in principal components analysis 9 We construct the 4 observable variables as follows: X1 = V1 + 1 , (3.1) X2 = |V1 | + 2 , X3 = V2 + 3 , X4 = V1 V2 + 4 , where εj , 1 ≤ j ≤ 4 are i.i.d. N (0, σ 2 ), with σ = 0.01 (Case 1), σ = 0.1 (Case 2) and σ = 0.25 (Case 3). When we perform the variable selection it is clear that two variables containing the information given by V1 and V2 should be kept. This means that {X1 , X3 }, {X1 , X4 } or {X3 , X4 } would be “good” choices while {X1 , X2 } is clearly a “bad” choice since only retains information of V1 . Additionally, {X2 , X3 } (respec. {X2 , X4 }) is not a “good” choice since can not recover all the information of V1 (respec. V1 and V2 ). In this example, in all the cases, we compare our procedure with other proposals: algorithms B2 and B4 (Jolliffe (2002)), a variable selection approach proposed by McCabe (1984) and sparce PCA introduced by Zou et al. (2006). To retain q variables, algorithm B2 associates one of the original variables to each of the p−q last PCA vectors and deletes those variables, while B4 associates one of the original variables to each of the first q PCA vectors and retains those variables. For each case, we perform 500 replicates and on each of them we generate samples of size 100 from model (3.1) and compute the covariance matrix. • Case 1: The first two principal components explain between 70 and 85 percent of the total variance. For the BP 85% of the times the maximum angle conformed by the first two principal components is smaller than 25 degrees, hence we keep two variables. The results exhibitted in Table 1 on page 9 show that 78% of the times the BP makes a “good” choice of variables, B2 only does it 27% of the times, while the other methods fail in more than 75% of the replications. • Case 2: The first two principal components explain between 69 and 85 percent of the total variance. For the BP more than 78% of the times the maximum angle conformed by the first two principal components is smaller than 25 degrees, hence we keep two variables. The results exhibitted in Table 2 on page 10 show that that 75% of the times the BP makes a “good” choice of variables, B2 only does it 29% of the times, B4 and SPCA 27%, while McCabe fails in more than 75% of the replications. 10 Gimenez and Giussani Table 1 Proportion of times where each method selects each pair of variables.(Case 1) X1 , X2 X1 , X3 X1 , X4 X2 , X3 X2 , X4 X3 , X4 BP 0.22 0.37 0.366 0 0 0.044 B2 0.732 0.004 0.264 0 0 0 B4 0.76 0.002 0.238 0 0 0 McCabe 0.782 0.002 0.216 0 0 0 SPCA 0.76 0.002 0.238 0 0 0 Table 2 Proportion of times where each method selects each pair of variables.(Case 2) X1 , X2 X1 , X3 X1 , X4 X2 , X3 X2 , X4 X3 , X4 BP 0.248 0.354 0.368 0 0 0.03 B2 0.714 0.002 0.284 0 0 0 B4 0.728 0.002 0.27 0 0 0 McCabe 0.752 0.002 0.246 0 0 0 SPCA 0.728 0.002 0.27 0 0 0 • Case 3: The first two principal components explain between 67 and 82 percent of the total variance. For the BP, 69% of the times the maximum angle conformed by the first two principal components is smaller than 25 degrees, hence we keep two variables. The results exhibitted in Table 3 on page 10 show that 74% of the times the BP makes a “good” choice of variables, B2 does it 51% of the times, B4 and SPCA 48%, while McCabe 46%. Table 3 Proportion of times where each method selects each pair of variables.(Case 3) X1 , X2 X1 , X3 X1 , X4 X2 , X3 X2 , X4 X3 , X4 BP 0.264 0.192 0.54 0 0 0.004 B2 0.488 0.002 0.51 0 0 0 B4 0.516 0 0.484 0 0 0 McCabe 0.536 0 0.464 0 0 0 SPCA 0.516 0 0.484 0 0 0 From the definition of X1 and X2 we have that X2 is a function of X1 plus an error. We can see from Table 1 on page 9, Table 2 on page 10 and Table 3 on page 10 that our procedure selects X1 and X2 only between 0.22 and 0.264 proportion of the times, when the other procedures select it in around a 0.5 proportion of the times or more. In most of the cases our procedure detects that X2 is a “function” of X1 . That is, if X1 is selected to be one of the two explanatory variables, for the other one, the BP, select between Searching for the core variables in principal components analysis 11 X3 and X4 . This way, the BP gains information about V2 instead of getting redundant information by choosing X2 . Note that {X3 , X4 } is also a “good” choice. To make the problem a bit more challenging we enlarge the dimension of the dataset repeating the same variables plus noisy noninformative errors and also add some i.i.d. noisy variables. More precisely we consider the following model:  V1 + ε j ,      |V1 | + εj , V 2 + εj , Xj =   V V + εj ,    1 2 εj , if 1 ≤ j ≤ 5, if 6 ≤ j ≤ 10, if 11 ≤ j ≤ 15, if 16 ≤ j ≤ 20, if 21 ≤ j ≤ 23, where εj , 1 ≤ j ≤ 23 are i.i.d. N (0, σ 2 ), with σ = 0.01 (Case 1), σ = 0.1 (Case 2) and σ = 0.25 (Case 3). We keep the first and second principal component because on 98% of the 500 replicates they explain between 70% and 85% of the total variance in Case 1, between 70% and 83% in Case 2 and between 65% and 78% in Case 3. Again we require all the methods to select two variables. In the three cases, at least 93% of the times the largest angle is smaller than 25 degrees, hence we consider it is a good decision to look for two variables. There are five groups of variables A1 , . . . , A5 . Within each group all the variables only differ on a noisy noninformative error. More precisely, the first four groups are Aj = {Xk , k = 5j − i, i = 0, . . . , 4} (j = 1, . . . , 4) and the last one is A5 = {Xk , k = 21, 22, 23}. Clearly {{Aj , Aj }, j = 1, . . . 5}, {A1 , A2 } and {{Aj , A5 }, j = 1, . . . 4} are “bad” choices and also {A2 , A3 } and {A2 , A4 } are not good choices either. Table 4 on page 11, Table 5 on page 12, and Table 6 on page 12 exhibit the proportion of replicates where each method selects one variable per group of variables. In the three cases the BP achieves the desired results more than 90% of the times, while the other methods fail more than 73% of the times. 3.2 Example 2 Zou et al. (2006) introduced the following simulation example. They have two “hidden” factors: V1 ∼ N (0, 290), V2 ∼ N (0, 300), 12 Gimenez and Giussani Table 4 Proportion of replicates where each method selects one variable per group of variables.(Case1) A1 , A1 A1 , A2 A1 , A3 A1 , A4 A1 , A5 A2 , A2 A2 , A3 A2 , A4 A2 , A5 A3 , A3 A3 , A4 A3 , A5 A4 , A4 A4 , A5 A5 , A5 BP 0.012 0.026 0.214 0.57 0.028 0 0 0 0 0 0.124 0 0 0 0.026 B2 0.184 0.202 0.08 0.114 0.086 0.076 0.048 0.058 0.032 0.016 0.02 0.016 0.036 0.026 0.006 B4 0 0.744 0.004 0.252 0 0 0 0 0 0 0 0 0 0 0 McCabe 0 0.784 0 0.216 0 0 0 0 0 0 0 0 0 0 0 SPCA 0 0.744 0.004 0.252 0 0 0 0 0 0 0 0 0 0 0 Table 5 Proportion of replicates where each method selects one variable per group of variables.(Case2) A1 , A1 A1 , A2 A1 , A3 A1 , A4 A1 , A5 A2 , A2 A2 , A3 A2 , A4 A2 , A5 A3 , A3 A3 , A4 A3 , A5 A4 , A4 A4 , A5 A5 , A5 BP 0.006 0.024 0.254 0.598 0.026 0 0 0 0 0 0.092 0 0 0 0 B2 0.188 0.218 0.07 0.114 0.076 0.074 0.044 0.072 0.03 0.014 0.026 0.012 0.034 0.022 0.006 B4 0 0.744 0.006 0.25 0 0 0 0 0 0 0 0 0 0 0 McCabe 0 0.79 0 0.21 0 0 0 0 0 0 0 0 0 0 0 SPCA 0 0.74 0.006 0.25 0 0 0 0 0 0 0 0 0 0 0 and a lineal combination of them, V3 = −0.3V1 + 0.925V2 + ε where V1 , V2 and ε are independent, ε ∼ N (0, 1). Then 10 observable variables are constructed as follows: Searching for the core variables in principal components analysis 13 Table 6 Proportion of replicates where each method selects one variable per group of variables.(Case3) A1 , A1 A1 , A2 A1 , A3 A1 , A4 A1 , A5 A2 , A2 A2 , A3 A2 , A4 A2 , A5 A3 , A3 A3 , A4 A3 , A5 A4 , A4 A4 , A5 A5 , A5 BP 0.028 0.004 0.292 0.604 0.026 0 0 0 0 0 0.046 0 0 0 0 B2 0.17 0.234 0.094 0.104 0.084 0.072 0.032 0.07 0.03 0.022 0.024 0.012 0.04 0.006 0.006   V1 + εj , V2 + εj , Xj =  V3 + εj , B4 0 0.736 0.008 0.256 0 0 0 0 0 0 0 0 0 0 0 McCabe 0 0.762 0.004 0.234 0 0 0 0 0 0 0 0 0 0 0 SPCA 0 0.728 0.008 0.256 0 0 0 0 0 0 0 0 0 0 0 if 1 ≤ j ≤ 4, if 5 ≤ j ≤ 8, if j = 9, 10, where εj , 1 ≤ j ≤ 10 are i.i.d. N (0, 1). Zou et al. (2006) used the true covariance matrix of (X1 , . . . , X10 ) to perform PCA, SPCA and Simple Thresholding. There are three groups of variables that share the same information. The first group, which we denote by A1 corresponds to the variables X1 to X4 , the second one, A2 , to the variables X5 to X8 , and the third group, A3 , to the variables X9 and X10 . By definition V3 is also a function of V1 and V2 , up to a noisy noninformative error. Zou et al. (2006) show that SPCA correctly identifies the sets of important variables, the first SPCA identifies the group of the variables A2 and the second SPCA the group of the variables A1 . Simple Thresholding incorrectly mixes two variables of A2 with two of A3 . We first consider the population version, using the true covariance matrix, where the first two principal components explain 99.6% of the total variance. This example is outside of the theoretical framework stated in section 2 but this will not be a problem for the implemetation of our procedure. Clearly it is not adecuate to keep one variable because when the cardinality of I is 1, ΣYI has only one positive eigenvalue and then we can not 14 Gimenez and Giussani recover two principal components. If we choose a subset I of cardinal 2, then ΣYI has two positive eigenvalues of multiplicity one and then, we can recover two principal components. If we select one variable of each of the three groups will be a “good” solution. A “bad” solution should be to choose the 2 variables within the same group. Table 7 Theoretical objective’s value h(I) when two variables are chosen (one of each group). A1 , A1 A1 , A2 A1 , A3 A2 , A2 A2 , A3 A3 , A3 h(I) 1.656 2.257 × 10−6 2.536 × 10−5 1.028 0.001 1 In Table 7 on page 14 we can see that h(I) takes large values (larger than one) for the “bad” choices and small values (smaller than 0.001) for the “good” choices. Moreover, for the “good” choices, the largest angle between the original and the blinded components is less than two dergees in all cases. Then, the BP is going to select a “good” choice. So our method performs perfectly well when the cardinal of I is 2. Next, we consider a more realistic situation and perform a small simulation, where we estimate the covariance matrix generating a sample of size 50 which we iterate 500 times. We perform the analysis considering the two first principal components, which explain more than the 99% of the variance. We apply our procedure to select two variables for the first two principal components and in only 4.8% of the cases the larger angle was above 15 degrees and in 2.2% of the cases larger than 20 degrees. In Table 8 on page 14 we can see that 99.2% of the times the BP makes a “good” choice. In addition McCabe and SPCA always make a “good” choice, B4 on 99% of the times and B2 only makes a “good” choice in 76.6% of the times. 4 A real data example We consider a dataset obtained from the University of California, Irvine repository (Frank & Asuncion (2010)) as an example. This dataset contains the values of six bio-mechanical characteristic that were used to classify orthopaedic patients into three classes (normal, disc hernia and spondylolisthesis groups), and includes data for one hundred normal patients, sixty Searching for the core variables in principal components analysis 15 Table 8 Proportion of times where each method selects one variable per group of variables. BP B2 B4 McCabe SPCA A1 , A1 0 0.134 0.01 0 0 A1 , A2 0.426 0.57 0.562 1 0.736 A1 , A3 0.222 0.108 0.428 0 0.264 A2 , A2 0 0.096 0 0 0 A2 , A3 0.344 0.088 0 0 0 A3 , A3 0.008 0.004 0 0 0 patients with a disc hernia, and one hundred and fifty patients with spondylolisthesis. Each patient is represented in the dataset in terms of the six bio-mechanical attributes associated with the shape and orientation of the pelvis and the lumbar spine, namely (a) pelvic incidence, (b) pelvic tilt, (c) lumbar lordosis angle, (d) sacral slope, (e) pelvic radius and (f) grade of spondylolisthesis. We use our procedure to select one variable for the first two principal components, which explain 85% of the variance. We give the same weight to all components, that is pk = 1/2 in equation (2.4), and the “grade of spondylolisthesis”, variable (f) is selected. In this case the largest angle is 7.5 degrees, hence we decide to keep one variable. Cross-validation finds 55 nearest neighbours for variables (a) and (b), 70 for variable (c), 102 for variable (d) and 39 for variable (e), while the empirical objective function (2.7) attains the value 0.017. We use the Euclidean distance in our procedure, but with the Mahalanobis distance we get the same results. 50 Second component Second component 50 0 −50 −100 0 −50 −100 −150 −100 First component −50 0 −150 −100 −50 0 First component Figure 1 Left: Map of the projection of the data on the original principal components. Right: Map of the projection of the data on the blinded based principal components. Blue: Disk Hernia patients. Black: Normal patients. Green: Spondylolisthesis patients. 16 Gimenez and Giussani −100 −120 −140 −80 Second component −80 Second component Second component −80 −100 −120 −140 −140 −120 −100 −80 −60 First component −40 −20 0 −100 −120 −140 −140 −120 −100 −80 −60 First component −40 −20 0 −140 −120 −100 −80 −60 −40 −20 0 First component Figure 2 Left: Map of the projection of the data on the original principal components. Middle: Map of the projection of the data on the blinded based principal components using Euclidean distance. Right: Map of the projection of the data on the blinded based principal components using Mahalanobis distance. Blue: Disk Hernia patients. Black: Normal patients. The plot on the first two principal components for the example data looks very similar to the plot on the principal components calculated using our procedure (Figure 1). It also shows that the patients with spondylolisthesis are separated from the rest of the patients, but the normal patients and the patients with disc hernias are mixed up together. Next, we calculate the two principal components using the traditional method and our procedure for the subset of normal and disc hernia patients, using now two variables. The first two principal components explain 75% of the variance then we decide to keep them. We discard to select one variable because in that case the largest angle is close to 78 degrees. For two variables the largest angle is close to 21 degrees and for three variables the angle does not decrease very much (19 degrees), so we decide to keep two variables. We consider both, the Euclidean and the Mahalanobis distance, and in both cases the variables selected are “lumbar lordosis angle” and “pelvic radius”. The value of the objective function (2.7) with the Euclidean distance is 0.125, while with the Mahalanobis distance is 0.141. Figure 2 shows that the plots for the principal components produced by these procedures look very similar. 5 Conclusions In this paper we introduce a new variable selection procedure for PCA that aim to gain interpretation in principal components. On one hand we consider a local approach where we deals with finding a subset of variables that best explains each principal component, and on the other hand we analyzed a global approach when the objective is to find a Searching for the core variables in principal components analysis 17 unique subset to explain the first q principal components at once. We explained how through the conditional expectation we can choose the variables. Under wide regular conditions in the conditional expectation estimates and on the covariance matrix, strong consistency results are studied and numerical aspects have also been analysed. The performance of the procedure has been compared with several wellknown variable selection techniques using real and simulated data sets, showing the strengths of the method. Appendix: Proof of Theorem 2.1. First we are going to proof the following Proposition: Proposition. For k ∈ {1, ..., p}, if ĥkn (I) → hk (I) a.s. for all I ∈ Id , (5.1) then it converges uniformly, and arg min ĥkn (I) → arg min hk (I) a.s. I∈Id I∈Id Proof. Since Id is a discrete and finite space , the convergence of (5.1) is uniform. For the sake of simplicity, let k = 1 (the proof is analogue for k ∈ {2, ..., p}). For all δ > 0 there exists n0 (ω) such that for every n ≥ n0 (ω), with probability one ĥ1n (I) − h1 (I) < δ for all I ∈ Id , then, h1 (I) − δ < ĥ1n (I) < h1 (I) + δ for all I ∈ Id (5.2) ĥ1n (I) − δ < h1 (I) < ĥ1n (I) + δ for all I ∈ Id . (5.3) and From (2.2), we know that exists δ0 > 0 such that 18 Gimenez and Giussani h1 (I1 ) < h1 (I) − δ0 for all I ∈ / I1,0 , for all I1 ∈ I1,0 . By choosing in (5.2) δ = ĥ1n (I1 ) < h1 (I1 ) + δ0 2 we obtain δ0 δ0 δ0 < h1 (I) − δ0 + = h1 (I) − < ĥ1n (I) 2 2 2 for all I ∈ / I1,0 , for all I1 ∈ I1,0 , if n ≥ n0 (ω) with probability one. That means, that there exists n0 (ω) such that, if n ≥ n0 (ω), with probability one, if we choose I1 ∈ I1,0 , then I1 minimizes ĥ1n (I). Moreover, from (2.6), we have that for each n fix, exists δ1 > 0, such that ĥ1n (I 1 ) < ĥ1n (I) − δ1 for all I ∈ / Iˆ1n , for all I 1 ∈ Iˆ1n . Let δ = δ1 2 in (5.3) and n ≥ n1 (ω), h1 (I 1 ) < ĥ1n (I 1 ) + δ1 δ1 δ1 < ĥ1n (I) − δ1 + = ĥ1n (I) − < h1 (I) 2 2 2 for all I ∈ / Iˆ1n , and for all I 1 ∈ Iˆ1n with probability one. That means, that exists n1 (ω) such that, if n ≥ n1 (ω) for all I 1 ∈ Iˆ1n , I 1 minimizes h1 (I) with probability one. In conclusion, if n > max{n0 , n1 }, for all I1 ∈ I1,0 , I1 minimizes ĥ1n (I) and for all I 1 ∈ Iˆ1n , I 1 minimizes h1 (I) with probability one. As the proof is analogue for k ∈ {2, ..., p}, Ik,0 = argminI∈Id hk (I), and Iˆkn = argminI∈Id ĥkn (I) this implies, arg min ĥkn (I) → arg min hk (I) a.s. for k ∈ {1, ..., p}. I∈Id I∈Id Searching for the core variables in principal components analysis 19 Proof. (of Theorem) To prove the Theorem 2.1 then it is enough to see that for each I the empirical objective function (2.6) converges a.s. to the theoretical objective function (2.3). To prove it, let us see that α̂nk (Pn ) − α̂nk (Pn,YI ) → αk (P) − αk (PYI ) a.s. for all k. Dauxois et al. (1982) proved that under H1, if   = max Σ̂n − Σ (u) → 0 a.s., Σ̂n − Σ ∞ kuk=1 then α̂nk (Pn ) − αk (P) → 0 a.s. for all 1 ≤ k ≤ p, where α̂nk (Pn ) (respec. αk (P)) are the eigenvectors of Σ̂n , that denotes the empirical covariance matrix associated with Pn (respec. Σ denotes the covariance matrix associated with P). So, if we prove that   max Σ̂n (I) − Σ(I) (u) → 0 a.s. kuk=1 then kα̂nk (Pn,YI ) − αk (PYI )k → 0 a.s. ∀1 ≤ k ≤ p, where α̂nk (Pn,YI ) (respec. αk (PYI )) are the eigenvectors of Σ̂n (I), that denotes the empirical covariance matrix associated with Pn,YI (respec. Σ(I) denotes the covariance matrix associated with PYI ). Note, that I = {1, . . . , p} is the classic case. We will show that this also holds for any I ⊆ {1, . . . , p}, that is   max Σ̂n (I) − Σ(I) (u) → 0 a.s. kuk=1 To simplify the notation, we can assume (without losing generality) that I = {1, . . . , d}, then  t Yj = Xj [1], . . . , Xj [d], gn1 (Xj [I]), . . . , gnp−d (Xj [I]) , where gni (z) is a uniformly consistent nonparametric estimate of g i (z). Specifically, gni will fulfil the following assumption, gnl (Xj [I]) → g l (Xj [I]) a.s. for any l, for all j, uniformly. 20 Gimenez and Giussani We define a non observable auxiliary vector,  t Zj = Xj [1], . . . , Xj [d], g 1 (Xj [I]), . . . , g p−d (Xj [I]) , where g i (z) = E(X[d + i]|X[I] = z). The proof will be complete if we show that max k(ΣZ − Σ(I)) (u)k → 0 a.s., (5.4) max k(ΣY − ΣZ ) (u)k → 0 a.s., (5.5) kuk=1 and that kuk=1 where ΣY = Σ̂n (I). Considering, X[i] = n 1X Xj [i], n j=1 gnl (X[I]) = n 1X l gn (Xj [I]), n j=1 g l (X[I]) = n 1X l g (Xj [I]) n j=1 the three matrices are (Σ(I))ii0 (ΣY )ii0 =            (ΣZ )ii0 =          cov(X[i], X[i0 ]) if 1 ≤ i, i0 ≤ d, cov(X[i], E(X[i0 ]|X[I])) if 1 ≤ i ≤ d < i0 ≤ p, = cov(E(X[i]|X[I]), X[i0 ]) if 1 ≤ i0 ≤ d < i ≤ p,    cov(E(X[i]|X[I]), E(X[i0 ]|X[I])) if d + 1 ≤ i, i0 ≤ p,     1 n Pn j=1 (Xj [i] − X[i])(Xj [i0 ] − X[i0 ]) if 1 ≤ i, i0 ≤ d, 0 i0 −d 1 (Xj [I]) − gni −d (X[I])) if 1 ≤ i ≤ d < i0 ≤ p, j=1 (Xj [i] − X[i])(gn n Pn i−d 0 0 i−d 1 0 j=1 (gn (Xj [I]) − gn (X[I]))(Xj [i ] − X[i ]) if 1 ≤ i ≤ d < i ≤ p, n P 0 0 n i−d i −d i−d 1 (Xj [I]) − gni −d (X[I])) if d + 1 ≤ i, i0 j=1 (gn (Xj [I]) − gn (X[I]))(gn n Pn Pn 0 0 0 j=1 (Xj [i] − X[i])(Xj [i ] − X[i ]) if 1 ≤ i, i ≤ d, Pn 0 i0 −d 1 (Xj [i] − X[i])(g (Xj [I]) − g i −d (X[I])) if 1 ≤ i ≤ d < i0 ≤ p, n Pj=1 n i−d 1 (Xj [I]) − g i−d (X[I]))(Xj [i0 ] − X[i0 ]) if 1 ≤ i0 ≤ d < i ≤ p, j=1 (g n P 0 n i−d 1 (Xj [I]) − g i−d (X[I]))(g i −d (Xj [I]) − g i0 −d (X[I])) if d + 1 ≤ i, i0 j=1 (g n 1 n ≤ p, We will now prove the convergence in (5.4) and (5.5). First, we show that max k(ΣZ − Σ(I)) (u)k → 0 a.s. kuk=1 ≤ p. 21 Searching for the core variables in principal components analysis It is sufficient to prove that each of the coordinates of the matrix ΣZ −Σ(I) converge to zero. Set 1 ≤ i, i0 ≤ p, then (ΣZ )ii0 → (Σ(I))ii0 a.s. and then (ΣZ − Σ(I))ii0 → 0 a.s. ∀i, i0 = 1, ..., p. Because we are using a finite dimensional space, and each of the coordinates converge to zero, it holds that max k(ΣZ − Σ(I)) (u)k → 0 a.s. kuk=1 Now, we show that max k(ΣY − ΣZ ) (u)k → 0 a.s. kuk=1 As before, we are going to prove that each of the coordinates of the matrix ΣY − ΣZ converge to zero. For better understanding, we define G(l, j, n) = gnl (Xj [I]) − gnl (X[I]) − g l (Xj [I]) + g l (X[I]). • If 1 ≤ i, i0 ≤ d, (ΣY )ii0 = (ΣZ )ii0 then (ΣY − ΣZ )ii0 = 0. • If 1 ≤ i ≤ d, d + 1 ≤ i0 ≤ p, n (ΣY − ΣZ )ii0 = = 1X 0 0 0 (Xj [i] − X[i])(gni −d (Xj [I]) − gni −d (X[I]) − g i −d (Xj [I]) + g i0 −d (X[I])) n 1 n j=1 n X (Xj [i] − X[i])G(i0 − d, j, n). j=1 From the Cauchy-Schwarz inequality, we have that  1  1 2 2 n n n X X 1X 1 1 0 2 0 2 (Xj [i] − X[i])G(i − d, j, n) ≤  (Xj [i] − X[i])   (G(i − d, j, n))  n n n j=1 j=1 j=1 On the other hand, n 1X (Xj [i] − X[i])2 → V ar(X[i]) a.s. n j=1 (5.6) 22 Gimenez and Giussani In addition, since gnl (Xj [I]) → g l (Xj [I]) a.s. uniformly, for any l, for all j, then for any l, n gnl (X[I]) − g l (X[I]) 1X l = gn (Xj [I]) − g l (Xj [I]) ≤ max {gnl (Xj [I]) − g l (Xj [I])} → 0 a.s. 1≤j≤n n j=1 and therefore, G(l, j, n) → 0 a.s. for any l, for all j. This implies n 1X (G(l, j, n))2 → 0 a.s. for any l. n (5.7) j=1 Thus, by (5.6) and (5.7) we have n 1X (Xj [i] − X[i])G(i0 − d, j, n) → 0 a.s. n (5.8) j=1 which is what we required for our proof. • If d + 1 ≤ i ≤ p, 1 ≤ i0 ≤ d, from the simetry of the matrices and (5.8), we have that (ΣY − ΣZ )ii0 → 0 a.s. • If d + 1 ≤ i ≤ p, d + 1 ≤ i0 ≤ p, (ΣY − ΣZ )ii0 = n i 1 X h i−d 0 0 (gn (Xj [I]) − gni−d (X[I]))(gni −d (Xj [I]) − gni −d (X[I])) − n j=1 h i 0 (g i−d (Xj [I]) − g i−d (X[I]))(g i −d (Xj [I]) − g i0 −d (X[I])) . 0 0 If we add and subtract (g i−d (Xj [I])−g i−d (X[I]))(gni −d (Xj [I])−gni −d (X[I])), and rearrange, we get that (ΣY − ΣZ )ii0 is the sum of n 1 X i0 −d 0 (gn (Xj [I]) − gni −d (X[I]))G(i − d, j, n) n j=1 (5.9) 23 Searching for the core variables in principal components analysis and n 1 X i−d (g (Xj [I]) − g i−d (X[I]))G(i0 − d, j, n) n j=1 were (5.9) can be rewrited as n 1X 0 [G(i0 − d, j, n) + (g i −d (Xj [I]) − g i0 −d (X[I]))]G(i − d, j, n) n j=1 or n n j=1 j=1 1 X i0 −d 1X G(i0 − d, j, n)G(i − d, j, n) + (g (Xj [I]) − g i0 −d (X[I]))G(i − d, j, n). n n Then we have that n (ΣY − ΣZ )ii0 = 1X G(i0 − d, j, n)G(i − d, j, n) n j=1 n X + 1 n + n 1 X i−d (g (Xj [I]) − g i−d (X[I]))G(i0 − d, j, n). n 0 (g i −d (Xj [I]) − g i0 −d (X[I]))G(i − d, j, n) j=1 j=1 From triangular and Cauchy-Schwarz inequality,  1/2  1/2 n n X X 1 1 |(ΣY − ΣZ )ii0 | ≤  (G(i0 − d, j, n))2   (G(i − d, j, n))2  n n j=1 j=1 1/2  1/2 n n X X 1 1 0 +  (g i −d (Xj [I]) − g i0 −d (X[I]))2   (G(i − d, j, n))2  n n  j=1  n j=1 1 X i−d (g (Xj [I]) − g i−d (X[I]))2  +  n j=1 1/2 n X 1  (G(i0 − d, j, n))2  n 1/2  j=1 On the other hand, we have that n 1X l (g (Xj [I]) − g l (X[I]))2 → V ar(g l (X[I])) a.s. for any l. n j=1 24 Gimenez and Giussani If V ar(g l (X[I])) < ∞ for any l and I, (5.7) entails |(ΣY − ΣZ )ii0 | → 0. As V ar(X[l]) < ∞, then for any l and any I, V ar(X[l]) = E(V ar(X[l]|X[I]))+V ar(E(X[l]|X[I])) = E(V ar(X[l]|X[I]))+V ar(g l (X[I])) We now that E(V ar(X[l]|X[I])) > 0, so we conclude that V ar(g l (X[I])) < ∞ We have proved that all the coordinates of the matrix ΣY − ΣZ converge to zero, so sup k(ΣY − ΣZ ) (u)k → 0 a.s. kuk=1 Now we are ready to complete the proof of Theorem 2.1. From (5.4) and (5.5) we are able to use the result from Dauxois et al. (1982) to derive that, ĥkn (I) = kα̂nk (Pn )− α̂nk (Pn,YI )k2 → kαk (P)−αk (PYI )k2 = hk (I) a.s. (5.10) Indeed, we have that kα̂nk (Pn ) − α̂nk (Pn,YI )k − kαk (P) − αk (PYI )k ≤ kα̂nk (Pn ) − αk (P)k + kαk (P) − αk (PYI )k + kαk (PYI ) − α̂nk (Pn,YI )k − kαk (P) − αk (PYI )k = kα̂nk (Pn ) − αk (P)k + kαk (PYI ) − α̂nk (Pn,YI )k → 0 a.s. and kαk (P) − αk (PYI )k − kα̂nk (Pn ) − α̂nk (Pn,YI )k ≤ kαk (P) − α̂nk (Pn )k + kα̂nk (Pn ) − α̂nk (Pn,YI )k + kα̂nk (Pn,YI ) − αk (PYI )k − kα̂nk (Pn ) − α̂nk (Pn,YI )k = kαk (P) − α̂nk (Pn )k + kα̂nk (Pn,YI ) − αk (PYI )k → 0 a.s. which entails (5.10). Finally, (5.10) and the Proposition implies arg min ĥkn (I) → arg min hk (I) a.s. I∈Id I∈Id Searching for the core variables in principal components analysis 25 which concludes the proof. Acknowledgements This work has been partially supported by Grant pict 2008-0921 from ANPCyT (Agencia Nacional de Promoción Cientı́fica y Tecnológica), Argentina. We are very grateful to Dr. Ricardo Fraiman for his invaluable assistance and Dra. Marcela Svarc for her helpful suggestions. The authors would like to thank the referees for their constructive comments which improve significantly this work. References Biau, G., Fischer, A., Guedj, B. and Malley, J.D. (2013), “COBRA: A collective regression strategy”, arxiv.org/pdf/1303.2236. Dauxois, J., Pousse, A. and Romain, Y., (1982),“Asymptotic theory for the principal component analysis of a vector random function: some applications to statistical inference”, Journal of Multivariate Analysis 12, 136–154. Fraiman, R., Justel, A. and Svarc, M., (2008), “Selection of variables for cluster analysis and classification rules”, Journal of the American Statistical Association. 103(483), 1294–1303. Frank, A. and Asuncion, A., (2010), UCI Machine Learning Repository [http://archive.ics.uci.edu/ml], Irvine, CA: University of California, School of Information and Computer Science. Hansen, B.E. (2008), “Uniform convergence rates for kernel estimation with dependent data”, Econometric Theory. 24, 726–748. He, X. and Shi, P., (1996), “Bivariate Tensor-Product B-Splines in Partly Linear Models”, Journal of Multivariate Analysis. 58, 162–181. Jolliffe, I., (1995), “ Rotation of principal components: choise of normalization constraints”, Journal of Applied Statistics.22, 29–35. Jolliffe, I. (2002), “Principal Components Analysis. Second Edition”, Ed. Springer. Jolliffe, I., Trendafilov, N. and Uddin, M. (2003), “ A modified principal component technique based on the LASSO”, Journal of Computational and Graphical Statistics. 12, 531–547. Li, R. and Gong, G. (1987), “K-nn Nonparametric Estimation Of Regression Functions In the Presence of Irrelevant Variables”, Econometrics Journal, 00, 1-12. Luss, R. and d’Aspremont, A., (2010), “Clustering and feature selection using sparse principal component analysis”, Optimization and Engineering. 11(1), 145–157. Maronna, R. A., Martin, R. D. and Yohai, V. J., (2006), “Robust Statistics: Theory and Methods”, Wiley, London. McCabe, G. P. (1984), “Principal Variables”, Technometrics. 26, 137–144. 26 Gimenez and Giussani Tibshirani, R., (1996), “Regression shrinkage and selection via the LASSO”, Journal of the Royal statistical society. Series B 58(1), 267–288. Vines,S., (2000), “Simple principal components”, Applied Statistics. 49, 441–451. Witten, D.M. and Tibshirani, R., (2008), “Testing significance of features by lassoed principal components”, Annals of Applied Statistics. 2(3), 986–1012. Zou, H. and Hastie, T., (2005), “‘Regularizations and variable selection via the elastic net”, Journal of the Royal Statistical Society. Series B, 67, 301–320. Zou, H., Hastie, T. and Tibshirani, R. (2006), “Sparse principal component analysis”, Journal of Computational and Graphical Statistics, 15, 265–286. Universidad de San Andrés, Vito Dumas 284, 1644 Victoria, Buenos Aires, Argentina and CONICET E-mail: [email protected]; [email protected]
10math.ST
A Pyramidal Evolutionary Algorithm with Different Inter-Agent Partnering Strategies for Scheduling Problems in GECCO 2001: Proceedings of the Genetic and Evolutionary Computation Conference, latebreaking papers volume, pp 1-8, San Francisco, USA, 2001. Uwe Aickelin School of Computer Science University of Nottingham NG8 1BB UK [email protected] Abstract This paper combines the idea of a hierarchical distributed genetic algorithm with different interagent partnering strategies. Cascading clusters of sub-populations are built from bottom up, with higher-level sub-populations optimising larger parts of the problem. Hence higher-level subpopulations search a larger search space with a lower resolution whilst lower-level subpopulations search a smaller search space with a higher resolution. The effects of different partner selection schemes amongst the agents on solution quality are examined for two multiplechoice optimisation problems. It is shown that partnering strategies that exploit problemspecific knowledge are superior and can counter inappropriate (sub-) fitness measurements. 1 INTRODUCTION When hierarchically distributed evolutionary algorithms are combined with multi-agent structures a number of new questions become apparent. One of these questions is addressed in this paper: the issue of intelligently selecting mating partners from another population for an agent. This paper will look at seven different partnering strategies when combined with a genetic algorithm that uses a co-operative sub-population structure. We will evaluate the different strategies according to their optimisation performance of two scheduling problems. Genetic algorithms are generally attributed to Holland [1976] and his students in the 1970s, although evolutionary computation dates back further (refer to Fogel [1998] for an extensive review of early approaches). Genetic algorithms are stochastic metaheuristics that mimic some features of natural evolution. Canonical genetic algorithms were not intended for function optimisation, as discussed by De Jong [1993]. However, slightly modified versions proved very successful. For an introduction to genetic algorithms for function optimisation, see Deb [1996]. The twist when applying our type of distributed genetic algorithm lies in its special hierarchical structure. All subpopulations follow different (sub-) fitness functions, so in effect only searching specific parts of the solution space. Following special crossover-operators these parts are then gradually merged to full solutions. The advantage of such a divide and conquer approach is reduced epistasis within the lower-level sub-populations which makes the optimisation task easier for the genetic algorithm. The paper is arranged as follows: the following section describes the nurse scheduling and tenant selection problems. Pyramidal genetic algorithms and their application to these two problems are detailed in section 3. Section 4 explains the seven partnering strategies examined in the paper and section 5 describes their use and computational results. The final section discusses all findings and draws conclusions. 2 THE NURSE SCHEDULING AND TENANT SELECTION PROBLEMS Two optimisation problems are considered in this paper, the nurse scheduling problem and the tenant selection problem. Both have a number of characteristics that make them an ideal testbed for the enhanced genetic algorithm using partnering strategies. Firstly, they are both in the class of NP-complete problems [Johnson 1998, Martello & Toth 1990], hence they are challenging problems. Secondly, they have proved resilient to optimisation by a standard genetic algorithm, with good solutions only found by using a novel strategy of indirectly optimising the problem with a decoder based genetic algorithm [Aickelin & Dowsland 2001]. Finally, both problems are similar multiple-choice allocation problems. For the nurse scheduling, the choice is to allocate a shift-pattern to each nurse, whilst for the tenant selection it is to allocate an area of the mall to a shop. However, as the following more detailed explanation of the two will show, the two problems also have some very distinct characteristics making them different yet similar enough for an interesting comparison of results. The nurse-scheduling problem is that of creating weekly schedules for wards of up to 30 nurses at a major UK hospital. These schedules have to satisfy working contracts and meet the demand for given numbers of nurses of different grades on each shift, whilst at the same time being seen to be fair by the staff concerned. The latter objective is achieved by meeting as many of the nurses’ requests as possible and by considering historical information to ensure that unsatisfied requests and unpopular shifts are evenly distributed. Due to various hospital policies, a nurse can normally only work a subset of the in total 411 theoretically possible shift-patterns. For instance, a nurse should work either days or nights in a given week, but not both. The interested reader is directed to Aickelin & Dowsland [2000] and Dowsland [1998] for further details of this problem. For our purposes, the problem can be modelled as follows. Nurses are scheduled weekly on a ward basis such that they work a feasible pattern with regards to their contract and that the demand for all days and nights and for all qualification levels is covered. In total three qualification levels with corresponding demand exists. It is hospital policy that more qualified nurses are allowed to cover for less qualified one. Infeasible solutions with respect to cover are not acceptable. A solution to the problem would be a string, with the number of elements equal to the number of nurses. Each element would then indicate the shift-pattern worked by a particular nurse. Depending on the nurses’ preferences, the recent history of patterns worked, and the overall attractiveness of the pattern, a penalty cost is then allocated to each nurseshift-pattern pair. These values were set in close consultation with the hospital and range from 0 (perfect) to 100 (unacceptable), with a bias to lower values. The sum of these values gives the quality of the schedule. 52 data sets are available, with an average problem size of 30 nurses per ward and up to 411 possible shift-patterns per nurse. For comparison, all data sets were solved using a standard IP package [Fuller 1998]. However, some remained unsolved after each being allowed 15 hours run-time on a Pentium II 200. Experiments with a number of descent methods using different neighbourhoods, and a standard simulated annealing implementation, were even less successful and frequently failed to find feasible solutions. The most successful approach to date is based on Tabu Search [Dowsland 1998]. However, the quality of solutions relies heavily on data-specific chains of moves that work well because of the way in which the different factors affecting the quality of a schedule are combined. A straightforward genetic algorithm approach failed to solve the problem [Aickelin & Dowsland 2000]. The best evolutionary results to date have been achieved with an indirect genetic approach employing a decoder function [Aickelin & Dowsland 2001]. However, we believe that there is further leverage in direct evolutionary approaches to this problem. Hence we propose to use an enhanced pyramidal genetic algorithm in this paper. The second problem is a mall layout and tenant selection problem; in future mall problem for short. The mall problem arises both in the planning phase of a new shopping centre and on completion when the type and number of shops occupying the mall has to be decided. To maximise revenue a good mixture of shops that is both heterogeneous and homogeneous has to be achieved. Due to the difficulty of obtaining real-life data because of confidentiality, the problem and data used in this research are constructed artificially, but closely modelled after the actual real-life problem as described for instance in Bean et al. [1988]. In the following, we will briefly outline our model. The objective of the mall problem is to maximise the rent revenue of the mall. Although there is a small fixed rent per shop, a large part of a shop’s rent depends on the sales revenue generated by it. Therefore, it is important to select the right number, size and type of tenants and to place them into the right locations to maximise revenue. As outlined in Bean et al. [1988], the rent of a shop depends on the following factors: • The attractiveness of the area in which the shop is located. • The total number of shops of the same type in the mall. • The size of the shop. • Possible synergy effects with neighbouring similar shops, i.e. shops in the same group (not used by Bean et al.). • A fixed amount of rent based on the type of the shop and the area in which it is located. This problem can be modelled as follows: Before placing shops, the mall is divided into a discrete number of locations, each big enough to hold the smallest shop size. Larger sizes can be created by placing a shop of the same type in adjacent locations. Hence, the problem is that of placing i shop-types (e.g. menswear) into j locations, where each shop-type can belong to one or more of l groups (e.g. clothes shops) and each location is situated in one of k areas. For each type of shop there will be a minimum, ideal and maximum number allowed in the mall, as consumers are drawn to a mall by a balance of variety and homogeneity of shops. The size of shops is determined by how many locations they occupy within the same area. For the purpose of this study, shops are grouped into three size classes, namely small, medium, and large, occupying one, two, and three locations in one area of the mall respectively. For instance, if there are two locations to be filled with the same shop-type within one area, then this will be a shop of medium size. If there are five locations with the same shop-type assigned in the same area, then they will form one large and one medium shop etc. Usually, there will also be a maximum total number of small, medium and large shops allowed in the mall. To test the robustness and performance of our algorithms thoroughly on this problem, 50 problem instances were created. All problem instances have 100 locations grouped into five areas. However, the sets differ in the number of shop-types available (between 50 and 20) and in the tightness of the constraints regarding the minimum and maximum number of shops of a certain type or size. Full details on how the data was created, its dimensions, the differences between the sets can be found in [Aickelin 1999]. 3 PYRAMIDAL GENETIC ALGORITHMS Both problems failed to be optimised with a standard genetic algorithm [Aickelin & Dowsland 2000 and 2001]. Our previous research showed that the difficulties were attributable to epistasis created by the constrained nature of the optimisation. Briefly, epistasis refers to the ‘nonlinearity’ of the solution string [Davidor 1991], i.e. individual variable values which were good in their own right, e.g. a particular shift / location for a particular nurse / shop formed low quality solutions once combined. This effect was created by those constraints that could only be incorporated into the genetic algorithm via a penalty function approach. For instance, most nurses preferred working days; thus partial solutions with many ‘day’ shift-patterns have a higher fitness. However, combining these shift-patterns leads to shortages at night and therefore infeasible solutions. The situation for the mall problem is similar yet more complex, as two types of constraints have to be dealt with: size constraints and number constraints. In Aickelin & Dowsland [2000] we presented a simple and on its own unsuccessful pyramidal genetic algorithm for the nurse-scheduling problem. A pyramidal approach can best be described as a hierarchical distributed genetic algorithm where cascading clusters of sub-populations are built from bottom up, with higher-level sub-populations optimising larger parts of the problem. Thus, the hierarchy is not within one string but rather between subpopulations which optimise different string-portions. Hence, higher-level sub-populations search a larger search space with a lower resolution whilst lower-level sub-populations search a smaller search space with a higher resolution. This can be applied to the nursescheduling problem in the following way: • Agents in sub-populations 1, 2 and 3 have their fitness based on cover and requests only for grade 1, 2 and 3 respectively. • Agents in sub-populations 4, 5 and 6 have their fitness based on cover and requests for grades (1+2), (2+3), (3+1). • Agents in sub-population 7 optimise cover and requests for (1+2+3). • Agents in sub-population 8 solve the original (all) problem. The full structure is illustrated in figure 1. Sub-solution strings from lower populations are cascaded upwards using suitable crossover and selection mechanisms. For instance, fixed crossover points are used such that an agent from sub-population (1) combined with one from (2+3) forms a full solution. Although the full problem is as epistatic as before, the sub-problems are less so as the interaction between nurse grades is (partially) ignored. Compatibility problems of combining the parts are reduced by the pyramidal structure with its hierarchical and gradual combining. Using this approach improved solution quality in comparison to a standard genetic algorithm was recorded. However, the quality of solutions was still short of those produced by Tabu Search. So far roulette wheel selection based on fitness rank had been used to choose parents. The fitness of each sub-string is calculated using a substitute fitness measure based on the requests and cover as detailed above, i.e. the possibility of more qualified nurses covering for less-qualified ones is partially ignored. Unsatisfied constraints are included via a penalty function. This paper will investigate various partnering strategies between the agents of the sub-populations to improve upon these results. population and pastes them together to form a full solution. all 1+2+3 1+2 1 2+3 2 3+1 all 3 1 Figure 1: Nurse Problem Pyramidal Structure. Similar to the nurse problem, a solution to the mall problem can be represented by a string with as many elements as locations in the mall. Each element then indicates what shop-type is to be located there. The mall is geographically split into different regions, for instance north, east, south, west and central. Some of the objectives are regional; e.g. the size of a shop, the synergy effects, the attractiveness of an area to a shop-type, whereas others are global, e.g. the total number of shops of a certain type or size. The application of the pyramidal structure to the mall problem follows along similar lines to that of the nurse problem. In line with splitting the string into partitions with nurses of the same grade, the string is now split into the areas of the mall. Thus, we will have sub-strings with all the shops in one area in them. These can then be combined to create larger ‘parts’ of the mall and finally full solutions. However, the question arises how to calculate the substitute fitness measure of the partial strings. The solution chosen here will be a pseudo measure based on area dependant components only, i.e. global aspects are not taken into account when a substitute fitness for a partial string is calculated. Thus, sub-fitness will be a measure of the rent revenue created by parts of the mall, taking into account those constraints that are area based. All other constraints are ignored. A penalty function is used to account for unsatisfied constraints. Due to the complexity of the fitness calculations and the limited overall population size, we refrained from using several levels in the hierarchical design as we did with the nurse scheduling. Instead a simpler two level hierarchy is used as shown in figure 2: Five sub-populations optimising the five areas separately (1,2,3,4, 5) and one main population optimising the original problem (all). A special crossover then selects one solution from each sub- 2 3 4 5 Figure 2: Mall Problem Pyramidal Structure. The remainder of this paper will investigate ways to try to improve on previously found poor results by suggesting ways of combining partial strings more intelligently. An alternative, particularly for the mall problem, would be a more gradual build-up of sub-populations. Without increasing the overall population size, this would lead to more and hence smaller sub-populations. However, this more gradual approach might have enabled the algorithm to find good feasible solutions by more slowly joining together promising building blocks. This is in contrast to the relatively harsh two-level and three-level design where building blocks had to ‘succeed’ immediately. Exploring the exact benefits of a gradual build-up of subsolutions would make for another challenging area of possible future research. 4 PARTNERING STRATEGIES The problem of how to pick crossover partners has been noted in both competitive and co-operative coevolutionary algorithms. Many strategies have been presented in the literature as summarised for instance by Bull [1997]. In this paper seven such strategies are compared for their effectiveness in fighting epistasis in the pyramidal genetic algorithm optimising the nurse scheduling and the mall problems. Rank-Selection (S): This is the method used so far in our algorithms. Agents are assigned a sub-fitness score based as closely as possible on the contribution of their partial string to full solutions. All agents are then ranked within each sub-population and selection follows a roulette wheel scheme based on the ranks [e.g. Aickelin & Dowsland 2000]. Random (R): Agents choose their mating partners randomly from amongst all those in the sub-population their sub-population is paired with [e.g. Bull & Fogarty 1993]. Best (B): In this strategy each agent is paired with the currently best agent of the other sub-population(s). In case of a tie, the agent with the lower population index is chosen [e.g. Potter & De Jong 1994]. Distributed (D): The idea behind this approach is to match agents with similar ones to those paired with previously [e.g. Ackely & Littman 1994]. To achieve this each subpopulation is spaced out evenly across a single toroidal grid. Subsequently, agents are paired with others on the same grid location in the appropriate other subpopulations. Children created by this are inserted in an adjacent grid location. This is said to be beneficial to the search process because a consistent co-evolutionary pressure emerges since all offspring appear in their parents’ neighbourhoods [Husbands 1994]. In our algorithms we use local mating with the neighbourhood set to the eight agents surrounding the chosen location. Joined (J): In nature, some species carry others internally with the relationship propagated from generation to generation [e.g. Iba 1996]. Thus, each agent represents a complete solution; i.e. all the parts have been joined together. In our case, this results in all sub-populations solving the original problem, i.e. we have a traditional parallel genetic algorithm. This means that all subpopulations use the full fitness function for evaluation and rank-proportional selection. Attractiveness (A): The five strategies described so far are general and do not make use of problem specific knowledge. However, there is a growing body of research [e.g. Stanley et al. 1994, Wolpert & Macready 1995], as well as our own previous work, which suggests that approaches that exploit problem specific knowledge achieve better results. Here pairing is done as for the rank-selection strategy (S). However, the pair is only accepted with a probability proportional to their fitness or substitute fitness once combined. The probabilities are scaled such that if the (substitute) fitness fcomb is equal or greater to the best-known fitness fbest the pairing is automatically accepted. Otherwise the probability is fcomb / fbest for the mall problem and the inverse for the nurse scheduling. Partner Choice (C): This approach again exploits problem specific knowledge and was inspired by an idea presented by Ronald [1995]. He solves Royal Roads and multiobjective optimisation problems using a genetic algorithm where the first parent is chosen following standard rules, i.e. proportional to its fitness. However, the second parent is not chosen according to its fitness, but depending on its ‘attractiveness’ to the first parent, which is measured on a different scale. Our approach will be slightly different. The first parent is still chosen according to its rank. But rather than picking one agent from the appropriate subpopulation as the second parent, ten candidates are chosen at random. The second parent will then be chosen as the one that creates the fittest children with the first parent. 5 5.1 EXPERIMENTAL RESULTS THE MODEL To allow for fair comparison, the parameters and strategies used for both problems are kept as similar as possible. Both have a total population of 1000 agents. These are split into sub-populations of size 100 for the lower-levels and a main population of size 300 for the nurse scheduling and respectively of size 500 for the mall problem. In principle, two types of crossover take place: within sub-populations a two-parent-two-children parameterised uniform crossover with p=0.66 for genes coming from one parent takes place. Between sub-populations a fixed-point crossover is used such that appropriate parts are assembled. For instance, in the nurse problem agents of sub-population 1 and 2 would parent a new child for sub-population 1+2. All in all 50% of children are created via the uniform and the remainder with the fixed-point crossover. For some of the fixed point cases a choice exists, e.g. in the nurse problem new agents of sub-population 1+2+3 can be created in four different ways, either (1+2) + (3), (2+3) +(1), (3+1)+(2) or (1)+(2)+(3). In these situations there is an equal probability for each child to be created in either way. Parent selection followed the seven strategies outlined above. Each new solution created undergoes mutation with a 1% bit mutation probability, where a mutation would reinitialise the bit in the feasible range. The algorithm is run in generational mode to accommodate the sub-population structure better. In every generation the worst 90% of parents of all sub-populations are replaced. For all fitness and sub-fitness function calculations a fitness score as described before is used. Constraint violations are penalised with a dynamic penalty parameter, which adjusts itself depending on the (sub)-fitness difference between the best and the best feasible agent in each (sub-) population. Full details on this type of weight and how it was calculated can be found in Smith & Tate [1993] and Aickelin & Dowsland [2000]. The stopping criterion is the top sub-population showing no improvement for 50 generations. To obtain statistically sound results all experiments were conducted as 20 runs over all problem instances. All experiments were started with the same set of random seeds, i.e. with the same initial populations. The results are presented in feasibility and cost respectively rent format. Feasibility denotes the probability of finding a feasible solution averaged over all problem instances. Cost / Rent refer to the objective function value of the best feasible solution for each problem instance averaged over the number of instances for which at least one feasible solution was found. Should the algorithm fail to find a single feasible solution for all 20 runs on one problem instance, a censored observation of one hundred in the nurse case and zero for the mall problem is made instead. As we are minimising the cost for the nurses and maximising the rent of the mall, this is equivalent to a very poor solution. For the nurse-scheduling problem, the cost represents the sum of unfulfilled nurses’ requests and unfavourable shiftpatterns worked. For the mall, the values for the rent are in thousands of pounds per year. 5.2 RESULTS Table 1 shows the results found by our algorithms for the two problems (N = Nurse problem, M = Mall problem) using the seven different partnering strategies in combination with the pyramidal structure. The results are compared to those found by the standard genetic algorithm (SGA) [Aickelin & Dowsland 2000 and 2001] and the Tabu Search results [Dowsland 1998] for the nurse problem and theoretical bounds for the mall problem (both referred to as ‘bound’). A number of interesting observations can be made. In the nurse scheduling case, the SGA approach failed to find good or even feasible solutions for many data sets. This can be explained by the high degree of epistasis present and the inability of the unmodified genetic algorithm to deal with it. Once the pyramidal structure with rank-based selection (S) is introduced, results improve significantly, however they are still below those found by Tabu Search. For the mall problem, the situation is different. Results found by the SGA are fairly good with high feasibility. This indicates the higher number of feasible solutions for this problem. Solution quality seems reasonably good, too. However, the addition of the pyramidal structure (S) results in a marked deterioration of results. How can these different results be explained? With the nurse scheduling, the objective function value of a partial solution was obtained by summing the cost values of the nurses and shift-patterns involved. Furthermore, we were able to define relatively meaningful sub-fitness scores by exploiting the ‘cumulative’ nature of the covering constraints due to the grade structure. Hence the substitute fitness scores calculated allowed for an effective recombination of partial solutions for the nursescheduling problem. Thus, there is a good correlation between the sub-fitness of an agent (and hence its rank and its chance of being selected) and the likelihood that it will form part of a good solution. This also explains why the random (R) scheme produces worse results. The best (B) strategy although giving better results than the random selection fails to solve many problems. However, closer observation of experiments showed that it solved some single data sets well. This indicates that genetic variety is as important as fitness in the evolution of good solutions. Both the distributed (D) and joint (J) strategies again fail to provide better solutions than the rank-based selection. The distributed strategy is similar to the random strategy as it too ignores fitness scores for selection. Choosing from a fixed pool does have some benefits as the results are better than for complete random choice. The joint strategy works almost as well as the rank-selection. This shows that the principle of the ‘dividing and conquering’ works well with the nurse problem split along the grade boundaries. The slightly poorer results can be explained by the ‘full’ evaluation of all sub-strings although only ‘parts’ are passed on. Thus, some of the correlation described above is lost. The two best strategies both outperforming (S) are partner selection based on attractiveness (A) and choice (C). Again this further confirms that the partial sub-fitness scores are a good criterion of selection for the pyramidal algorithm. Overall, (C) is better than (A) which corresponds to (C) having a higher selection pressure than (A), which in turn has a higher selection pressure than (S). To conclude, it seems that for this problem a good correlation between agents’ sub-fitness, the pyramidal structure and good full solutions exist. Hence, the scheme with the highest selection pressure using most problem specific information scores best. However, the results also show that even this scheme cannot compete with the Tabu Search results, something we will discuss in the concluding section. With the Mall Problem, the situation is more complicated since unlike for the nurse problem a large part of the objective function is a source of epistasis, which the proposed partitioning of the string will not eliminate fully. The constraints are a second source for epistasis. In contrast to the objective function, these depend largely on the whole string, as for instance the total number of shops of a particular size allowed. Only after adding up the shops and sizes for all areas is it known if a solution is feasible or not. So unsurprisingly, a combination of these partial solutions is often unsuccessful because it usually violates the overall constraints. On their own, solutions of the sub-populations are extremely unlikely to be feasible for the overall problem, as they covered only one fifth of the string. It is equally unlikely for those solutions in the main population, which are formed from the five sub-populations, to be feasible. Although these solutions are of high rent, because the sub-populations ignore the main constraints, their combination is unlikely to produce an overall feasible solution. The situation is only slightly better with those solutions formed by an agent of the sub-populations and an agent of the main population. Usually, even if the agent of the main population is feasible, the children were not. Again, even though the partial string from the sub-population agent was of high rent, it was usually incompatible with the rest of the string, resulting in too many or too few shops of some types. Thus, in contrast to the nursescheduling problem, their sub-fitness scores are a far poorer predictor for the compatibility of the parts to form complete solutions. This is confirmed by the above average performance of the random strategy (R) and the extremely poor results found by the best strategy (B). Similarly to before, the distributed strategy (D) performs well again giving credit to the idea of even selection pressure without relying on fitness scores, whereas the joint strategy (J) performs poorly suffering both from the unsuitable sub-fitness scores and the now hindering pyramidal structure. Overall, the real winners are again the more complex strategies of choice (C) and attraction (A). At first this seems contradictory as these rely heavily upon the subfitness scores. However, apart from the rank-based initial selection of the first parent, subsequent fitness calculations are made after combining the agents. Since the mall pyramid only has two layers, these combinations are always full solution and hence the full fitness score is used. Thus, the direct link between high fitness and good solutions is re-established. Of the two, (A) performs better than (C). This seems to show that a certain amount of randomness is still important here, which again might be an indication for the lower predictive quality of the subfitness scores. N Cost N Feas M Rent M Feas Bound 8.8 100% 2640 100% SGA 54.2 33% 1850 94% S 17.6 75% 1540 78% R 37.4 54% 1790 86% B 27.1 57% 1490 70% D 26.5 61% 1770 84% J 19.9 71% 1590 78% A 12.2 83% 1950 98% C 11.1 87% 1910 94% Table 1: Experimental Results (N = Nurse, M = Mall). 6 CONCLUSIONS This paper has shown the effect different partner strategies have on a pyramidal genetic algorithm solving two different optimisation problems from the area of multiple-choice scheduling. The result for the five simple strategies (S, R, B, D and J) differ for both problems. This is a reflection of the accurateness of the sub-fitness measure in the sense of its predictive power for subsolutions to form full solutions following the pyramidal recombination strategies. Therefore, in the case of the nurse problem with a good match between sub-fitness and usefulness for recombination the simple strategies worked well, whereas for the mall problem with its poorer correlation between the two it did not. For both problems the distributed partnering strategy (D) gives consistent results. This leads to the question whether some form of fitness sharing might have been beneficial to some or all of the partnering strategies. We are taking up this idea in our ongoing research into pyramidal genetic algorithms. The two more advanced strategies (A) and (C) use most problem specific knowledge and work well for both problems. They worked well for the nurse problem because the sub-fitness scores are meaningful. They also worked well for the mall problem because the partners are chosen based on a fitness score after recombination, which in this case equals the full original fitness score. Thus, choosing parents ‘post-birth’ after evaluating possible children can overcome possible shortcomings in the sub-fitness measure. It has to be noted that overall none of the partnering schemes managed to outperform the Tabu Search algorithm or come as close to the bounds as we had hoped. However, one has to remember that the Tabu Search uses highly problem-specific hill-climbing routines, some of which also relied heavily on certain criteria present in the actual data used. For different or more random data this would probably no longer hold. Therefore, without adding a more specific hill-climbing component it would not be possible to reach this level of solution quality. It is our conclusion that pyramidal genetic algorithms (with or without hill-climbing) benefit greatly from the right choice of partnering strategy as this improves solution quality and negates possible shortcoming of the chosen sub-fitness scores. References Ackley D H & Littman M L (1994), “Altruism in the Evolution of Communication”, in R Brooks & P Maes (eds.) Artificial Life IV, MIT Press, Mass., pp40-48. Aickelin U (1999). “Genetic Algorithms for MultipleChoice Optimisation Problems.” PhD Dissertation, University of Wales, Swansea, United Kingdom. Aickelin U and Dowsland K (2000). “Exploiting problem structure in a genetic algorithm approach to a nurse rostering problem.” Journal of Scheduling 3, 139-153. Aickelin U and Dowsland K (2001). “An indirect genetic algorithm approach to a nurse scheduling problem.” Under review by the Journal of Computing and Operational Research. Bean J, Noon C, Ryan S, Salton G (1988), “Selecting Tenants in a Shopping Mall,” Interfaces 18, 1-9. Bull, L. (1997) Evolutionary Computing in Multi-Agent Environments: Partners. In T.Baeck (ed.) Proceedings of the Seventh International Conference on Genetic Algorithms. Morgan Kaufmann, pp370-377.Bull L & Fogarty T C (1993), “Coevolving Communicating Classifier Systems for Tracking”, in R F Albrecht, C R Reeves & N C Steele (eds.) Artificial Neural Networks and Genetic Algorithms, Springer-Verlag, New York, pp522-527. Davidor Y. (1991), Epistasis Variance: A Viewpoint on GA-Hardness, Foundations of Genetic Algorithms 1, 2335, G Rawlins (Ed), Morgan Kaufmann, 1991. De Jong K. Genetic Algorithms are NOT Function Optimisers. In Whitley D. Editor. Foundations of Genetic Algorithms 2. San Mateo: Morgan Kaufmann Publishers, 1993:5-17. Deb K. Genetic Algorithms for Function Optimisation. Genetic Algorithms and Soft Computing 1996:4-31. Dowsland K.A., Nurse Scheduling with Tabu Search and Strategic Oscillation, European Journal of Operational Research 106, 393-407 (1998). Fogel D. Evolutionary Computation: The Fossil Record. IEEE Press, 1998. Fuller E. Tackling Scheduling Problems Using Integer Programming. Master Thesis, University of Wales Swansea, United Kingdom, 1998. Holland J. Adaptation in Natural and Artificial Systems. Ann Arbor: University of Michigan Press, 1976. Husbands P (1994), “Distributed Coevolutionary Genetic Algorithms for Multi-Criteria and Multi-Constraint Optimisation”, in T C Fogarty (ed.) Evolutionary Computing, Springer-Verlag, pp150-165. Iba H (1996), “Emergent Co-operation for Multiple Agents Using Genetic Programming”, in H-M Voigt, W Ebeling, I Rechenberg & H-P Schwefel (eds.) Parallel Problem Solving from Nature - PPSN IV, Springer, Berlin, pp32-41. Johnson D.S. private communication 1998. Martello S. and Toth P., Knapsack Problems, Wiley, Chichester, 1990 Potter M. & De Jong K. (1994), “A Co-operative Coevolutionary Approach to Function Optimisation”, in Y Davidor, H-P Schwefel & R Manner (eds.) Parallel Problem Solving From Nature - PPSN III, SpringerVerlag, Berlin, pp249-259. Ronald E (1995), When Selection Meets Seduction, pp 167-173 in Eshelman L, Proceedings of the International Conference on Genetic Algorithms, Morgan Kaufmann Publishers, San Francisco, 1995. Smith A. and Tate D. (1993), Genetic Optimisation Using a Penalty Function, Proceedings ICGA 5, 499-505, Forrest S (ed.), Morgan Kaufmann, 1993. Stanley A E, Ashlock D, Testatsion L (1994), “Iterated Prisoner’s Dilemma with Choice and Refusal of Partners”, in C G Langton (ed.) Artificial Life III, Addison-Wesley, Redwood City, pp131-146. Wolpert D & Macready W (1995), No Free Lunch Theorem for Search, SFI-TR-95-02-010, The Santa Fe Institute, Santa Fe, pp 1-38, 1995.
5cs.CE
arXiv:1512.05695v1 [math.AC] 17 Dec 2015 EXAMPLES OF LOCAL COHOMOLOGY MODULES FOR RAMIFIED REGULAR LOCAL RINGS HAVING FINITE SET OF ASSOCIATED PRIMES RAJSEKHAR BHATTACHARYYA Abstract. Lyubeznik’s conjecture, ([Ly1], Remark 3.7) asserts the finiteness of the set ssociated primes of local cohomology modules for regular rings. But, in the case of ramified regular local ring, it is open. Recently, in Theorem 1.2 of [Nu], it is proved that in any Noetherian regular local ring S and for a fixed ideal J ⊂ S, associated primes of local cohomology HJi (S) for i ≥ 0 is finite, if it does not contain p. In this paper, we use this result to construct examples of local cohomology modules for ramified regular local ring so that they have finitely many associated primes. 1. introduction Consider a Noetherian ring R and an R-module M . For an ideal I ⊂ R and for some integer i ≥ 0, let HIi (M ) be i-th local cohomology module with support in the ideal I. In the fourth problem of [Hu], it is asked that whether local cohomology modules of Noetherian rings have finitely many associated prime ideals. There are several important examples where we have the finiteness of associated primes of local cohomology modules: (1) For regular rings of prime characteristic [HS], (2) for regular local and affine rings of characteristic zero [Ly1], (3) for unramified regular local rings of mixed characteristic [Ly2] and (4) for smooth algebra over Z and ZpZ [BBLSZ]. All these results support Lyubeznik’s conjecture, ([Ly1], Remark 3.7): Conjecture. Let R be a regular ring and I ⊂ R be its ideal, then for each i ≥ 0, i-th local cohomology module HIi (R) has finitely many associated prime ideals. Recently, in [Pu], it is shown that for excellent regular ring R of dimension d, containing a field of characteristic zero, for an ideal I ⊂ R, Ass R HId−1 (R) is finite. Lyubeznik’s conjecture is open for the ramified regular local ring, but recently, there is a significant progress (see [Nu]). In fact, in Theorem 1.2 of [Nu], it is proved that in a Noetherian regular local ring S and for a fixed ideal J ⊂ S, associated primes of local cohomology HJi (S) for i ≥ 0 is finite, if it does not contain p. In this paper, we use this result to construct examples of local cohomology modules of ramified regular local ring so that they have finitely many associated primes. In section 2, we review some of the basic results which we need in proving our main results. In section 3, we prove our main results. At first, in Proposition 3.1, we prove a new variant of the result of Theorem 2.1 of [Bh]. Using Proposition 3.1, in Theorem 3.2, we prove our first main result: Consider a ramified regular local ring S of mixed characteristic p > 0 of dimension d and choose a regular system 2010 Mathematics Subject Classification. 13D45. Key words and phrases. Local Cohomology. 1 2 of parameters such that p is not in the ideal generated by any d − 1 of them. Let J be an ideal generated by monomials formed out of d − 1 such a regular system of parameters. Consider an ideal β in a polynomial rings in d − 1 indeterminates over the prime field, generated by similar monomials but now formed out of d − 1 indeterminates. If β is perfect, then Ass S HJi (S) is finite for every i ≥ 0 except i = ht J +1, ht J +2. It is important to note that, here the monomials are generated by regular system of parameters, which is obviously a system of parameter, but it does not contain p as one of the parameter. As a consequence of Theorem 3.2, in Corollary 1, we have our next important result which can be stated as follows: Consider ramified regular local ring S of dimension d and let there be positive integers m and n such that d − 1 = mn. Consider a set of regular system of parameters where p is not in the ideal generated by any d − 1 of them. If J is an ideal, generated by size t minors of m × n matrix formed by d − 1 such regular system of parameters, then for every i ≥ 0, except i = ht J + 1, ht J + 2, Ass S HJi (S) is finite. In Theorem 3.3, we present our third main result. There, we construct examples of ramified regular local rings, so that for a countable set of ideals, there are countable set of local cohomology modules with supports in those ideals, having finite set of associated primes. 2. basic results In this section, we discuss two basic results which we need to prove the results in the next section. For local cohomology modules we have the following well known result, regarding the behaviour of associated primes of local cohomology modules under faithfully flat extension. Lemma 2.1. Let S be faithfully flat over R. Then, for the local cohomology modules i of an arbitrary R-module M , for every ideal I ⊂ R and for i ≥ 0, Ass S HIS (M ⊗R S) i is a finite set if and only if Ass R HI (M ) is a finite set. Next, we state the following known result (see Theorem 1.2 of [Nu]). We need it to prove Proposition 3.1 in the next section. Theorem 2.2. Let S be a regular commutative Noetherian local ring of mixed characteristic p > 0. Then, the set of associated primes of HJi (S) that do not contain p is finite for every i ∈ N and every ideal J ⊂ S. 3. main results We begin the section with the following proposition which is a new variant of the result of Theorem 2.1 of [Bh] to prove the next theorem. The part of the proof this proposition is similar to that of Theorem 2.1 of [Bh]. Proposition 3.1. Let S be a ramified regular local ring of mixed characteristic p > 0 and let J ⊂ S be an ideal. Suppose there exists an unramified regular local ring R with the following properties: (1) S is an Eisenstein extension of R by Eisenstein polynomial f (X) ∈ R[X]. (2) I ⊂ R[X] is an ideal such that IS = J and multiplication by p on HIi (R[X]) is an isomorphism. (3) p ∈ / Ass Z HIi+1 (R[X]) Then p ∈ / Ass S HJi (S) and Ass S HJi (S) is finite. 3 Proof. Here p is an R[X]-regular element. So, for short exact sequence p 0 → R[X] → R[X] → R[X]/pR[X] → 0 we get the following long exact sequence of local cohomologies p δ .. → HIi−1 (R[X]/pR[X]) → HIi (R[X]) → HIi (R[X]) → HIi (R[X]/pR[X]) → .. Since p is a non zero divisor of both HIi (R[X]) and HIi+1 (R[X]), from above long exact sequence we get that, HIi (R[X]/pR[X]) = HIi (R[X])/pHIi (R[X]). Moreover, since multiplication by p on HIi (R[X]) is an isomorphism, HIi (R[X]/pR[X]) = HIi (R[X])/pHIi (R[X]) = 0. Here S = R[X]/f (X) where (R, m) is an unramified regular local ring and Eisenstein polynomial f (X) is of the form f (X) = X n + a1 X n−1 + . . . + an with ai ∈ m for every i ≥ 0 and an ∈ / m2 . At first, we claim that(p, f (X)) is an R[X]-regular sequence. To see this, let 0 6= g(X) = r0 + r1 X + . . . + rt X t ∈ (R/p)[X] with rt 6= 0. Now f (X)g(X) = f (X)g(X) = 0 implies rt X t+n = 0. Thus rt = 0 and we have a contradiction. Thus (p, f (X)) is a R[X]-regular sequence. Using (b) of (12.2) Discussion of [Ho] we can see that (f (X), p) is also R[X]-regular sequences. Set R[X] = R′ and f (X) = f . Consider the following diagram of short exact sequences where every row and column is exact. 0   y f 0 −−−−→ R′   py −−−−→ 0 −−−−→ R′   y −−−−→ f f 0   y 0   y R′  p y −−−−→ R′ /f R′  p y −−−−→ 0 R′   y −−−−→ R′ /f R′   y −−−−→ 0 0 −−−−→ R′ /pR′ −−−−→ R/pR′ −−−−→ R′ /(p, f )R′ −−−−→ 0       y y y 0 0 0 This above diagram yields the following diagram of long exact sequences where all rows and columns are exact. 4   y HIi−1 (R′ )   πi−1 y   y f −−−−→ HIi−1 (R′ )   πi−1 y f ψi−1 −−−−→ φi−1   y HIi−1 (R′ /f R′ )   αi−1 y HIi (R′ )   py   y −−−−→ HIi (R′ )   πi y f −−−−→ f HIi (R′ )   πi y HIi−1 (R′ /pR′ ) −−−−→ HIi−1 (R′ /pR′ ) −−−−→ HIi−1 ((R′ /(p, f )R′ ) −−−−→ HIi (R′ /pR′ ) −−−−→ HIi (R′ /pR′ )         y y y y f HIi (R′ )   py −−−−→ HIi (R′ )   y −−−−→ f HIi (R′ )   py −−−−→ HIi (R′ /f R′ )   py −−−−→ HIi+1 (R′ )   py HIi (R′ )   y −−−−→ HIi (R′ /f R′ )   y −−−−→ HIi+1 (R′ )   y From first paragraph of the proof, we already have HIi (R′ /pR′ ) = 0. Thus in the p above diagram φi−1 is surjective. Let x be in Ker (HIi (R′ /f R′ ) → HIi (R′ /f R′ )). Then there exists some y ∈ HIi−1 (R′ /(p, f )R′ ) such that x is the image of y under the map HIi−1 (R′ /(p, f )R′ ) → HIi (R′ /f R′ ). Since φi−1 is surjective, y = φi−1 (z) for some z ∈ HIi−1 (R′ /pR′ ). Now, if we come down to HIi (R′ ) via the map HIi−1 (R′ /pR′ ) → HIi (R′ ), due to injectivity of the multiplication map by p, the image of z in HIi (R′ ) is zero. Since every square in the diagram is commutative, we i (R[X]/f R[X]) = get that x = 0. So, p is a nonzero divisor of HIi (R′ /f R′ ) = HIR[X] i i HI(R[X]/f R[X]) (R[X]/f R[X]) = HJ (S). Now using Theorem 1.2 of [Nu] we conclude.  Now, we state our first main result. Theorem 3.2. Let S be a ramified regular local ring of dimension d of mixed characteristic p > 0 and consider a set of regular system of parameters where p is not in the ideal generated by any d − 1 of them. Let J ⊂ S be an ideal generated by monomials formed out of d − 1 such regular system of parameters. Assume that, for a polynomial ring in d − 1 indeterminates over the prime field of characteristic p, monomials similar to J which are now formed out of d−1 indeterminates, generates a perfect ideal. Then for every i ≥ 0 except i = ht J + 1, ht J + 2, Ass S HJi (S) is finite. Proof. Since completion is a faithfully flat extension, using Lemma 2.1, it is sufficient to prove the theorem for complete ramified regular local ring. So, we can assume that S is complete. Fix a regular system of parameters x1 , x2 , . . . , xd in S. Let J be an ideal generated by d − 1 number of these regular system of parameters x2 , . . . , xd . Let R0 be its coefficient ring. From hypothesis, we can get a system of parameters p, x2 , . . . , xd in S. It turns out that R0 [[x2 , . . . , xd ]] is an unramified regular local ring where x2 , . . . , xd are algebraically independent on R0 , i.e. we can think R0 [[x2 , . . . , xd ]] as power series ring in d − 1 variables (see part of the proof 5 of (iii) of Theorem 29.4 and (ii) of Theorem 29.8 of [Ma]). Set R = R0 [[x2 , . . . , xd ]] and there exists Eisenstein polynomial f (X), (which is actually minimal polynomial of x1 over R) such that S = R[X]/f (X) (see proof of (ii) of Theorem 29.8 of [Ma]). Set I = J ∩ R[X]. At first we would like to show that ht I − ht J = 1 and for that we can proceed as follows: Since S = R[X]/f (X), there exists a maximal ideal m ∈ R[X] such that S = R[X]/f (X) = R[X]m /f (X)R[X]m . Since I = J ∩ R[X], we get R[X]/I ∼ = S/J. This gives R[X]/I is local and I ⊂ m. Moreover we have f (X) ∈ I. Since S is regular local ring, dim S = ht J + dim S/J. In the similar way, dim R[X]m = ht IR[X]m + dim R[X]m /IR[X]m . Now every minimal primes over I is inside m, otherwise R[X]/I should have more than one maximal ideal. This gives ht IR[X]m = ht I and our last equation becomes dim R[X]m = ht I + dim R[X]/I. On the other hand dim R[X]m = ht f (X)R[X]m + dim R[X]m /f (X)R[X]m . Since R[X]m is a domain, ht f (X)R[X]m = 1. Also we get dim S = dim R[X]/f (X) = dim R[X]m /f (X)R[X]m = dim R[X]m − ht f (X)R[X]m . Combining above results we get, dim R[X]m − dim S = ht I − ht J = 1. Set R0 [x2 , . . . , xd ] = T . Consider the ideal α ⊂ T such that α is generated by monomials similar to those which generates J. Since p is an T -regular element, for short exact sequence p 0 → T → T → T /pT → 0 we get the following long exact sequence of local cohomologies δ p ..Hαi−1 (T /pT ) → Hαi (T ) → Hαi (T ) → Hαi (T /pT ) → .. It is to be noted that, we have the natural map T = R0 [x2 , . . . , xd ] → R0 [[x2 , . . . , xd ]][X] = R[X] → S, such that αS = J where αR[X] ⊂ I. Consider polynomial ring (Z/pZ)[x2 , . . . , xd ] of d − 1 variables over prime field Z/pZ and let β be the ideal generated by monomials similar to those which generates J. From assumption, β is perfect. Set K = R0 /pR0 . Clearly (Z/pZ)[x2 , . . . , xd ] → (R0 /pR0 )[x2 , . . . , xd ] = T /pT is faithfully flat extension where (α)(T /pT ) = (β)(T /pT ). It is easy to see that due to flatness (β)(T /pT ) i.e. (α)(T /pT ) is perfect ideal in T /pT . Now From Proposition 19 of [HE], we get T /(p + α)T is Cohen-Macaulay. From Proposition 4.1 of section III of [PS], we get Hαi (T /pT ) = 0 for every i ≥ 0, except i = ht α. This gives that multiplication by p on Hαi (T ) is an isomorphism for every i ≥ 0 except i = ht α, ht α + 1. Next, we observe the following: For faithfully flat extension of Noetherian rings A → B, let α be an ideal of A. Then grade (α, A) = grade (αB, B). Let a1 , . . . , an be the maximal length of A-regular sequence which is inside α. It is easy to observe grade (α, A) ≤ grade (αB, B). Let there be an element an+1 b ∈ αB such that a1 , . . . , an , an+1 b is a B-regular sequence in αB. Let an+1 a ∈ (a1 , . . . , an ). This implies an+1 ba ∈ (a1 , . . . , an )B. This gives a ∈ (a1 , . . . , an )B ∩ A = (a1 , . . . , an ). Moreover A/(a1 , . . . , an+1 )A 6= 0. Thus a1 , . . . , an+1 be the maximal length of Aregular sequence which is inside α, but this is a contradiction. Thus grade (α, A) = grade (αB, B). Now, T → R[X] is faithfully flat extension. So tensoring with last long exact sequence of homology with R[X] we get, δ p i−1 i i i (R[X]/pR[X]) → .. (R[X]) → HαR[X] (R[X]) → HαR[X] ..HαR[X] (R[X]/pR[X]) → HαR[X] 6 Moreover using results of above paragraph we get grade (α, T ) = grade (αR[X], R[X]). Since we are in Cohen-Macaulay ring, height and grade of any ideal coincides. Thus i we get, HαR[X] (R[X]/pR[X]) = 0 for every i ≥ 0, except i = ht αR[X]. Moreover i this gives that multiplication by p on HαR[X] (R[X]) is an isomorphism every i ≥ 0 except i = ht αR[X], ht αR[X] + 1. Here αR[X] ⊂ R[X] such that (αR[X])S = J. From above paragraph of the i proof we have that multiplication by p on HαR[X] (R[X]) is an isomorphism every i ≥ 0 except i = ht αR[X], ht αR[X] + 1. Moreover from long exact sei+1 quence we get p is a nonzero divisor of HαR[X] (R[X]) for every i ≥ 0 except i = ht αR[X], ht αR[X] + 1. Thus from Proposition 3.1 we get that, for every i ≥ 0 except i = ht αR[X], ht αR[X] + 1, Ass S HJi (S) is finite. To finish the proof, we need to show that grade (αR[X], R[X]) = grade (I, R[X]). We argue in the following way: Here R[X]/f (X) is local, so there exists only one maximal ideal m which contains f (X) and every primes which contains f (X). Same is true for I. Thus grade (αR[X], R[X]) = grade (αR[X]m , R[X]m ) and similar is true for I. So we can pass to local ring R[X]m . Let grade (αR[X]m , R[X]m ) = s and grade (IR[X]m , R[X]m ) = r. Assume there exist two sets of sequences of maximal R[X]m -regular elements {z1 , z2 , . . . , zs } and {f (X), y2 , . . . , yr } in ideals αR[X]m and IR[X]m respectively. We can change the regular sequence {z1 , z2 , . . . , zs } to {f (X), z2, . . . , zs } where f (X) may not be inside αR[X]m . Passing to the ring S = R[X]m /f (X)R[X]m we find that, αR[X]m S = IR[X]m S = J and we get two sets of R[X]m /f (X)R[X]m -regular sequences {z¯2 , . . . , z¯s } and {y¯2 , . . . , y¯r } in J. We claim that both are maximal. To prove this claim, let there be yr+1 ∈ IR[X]m ⊂ R[X]m such that yr+1 ¯ is S/(y¯2 , . . . , y¯r )S-regular element. For z ∈ R[X]m , let yr+1 z ∈ (f (X), y2 , . . . , yr )R[X]m . This gives yr+1 ¯ z̄ ∈ (y¯2 , . . . , y¯r )S which in turn implies that z ∈ (f (X), y2 , . . . , yr )R[X]m . This contradicts the fact that {f (X), y2, . . . , yr } is a maximal R[X]m -regular sequence in IR[X]m . To see that {z¯2 , . . . , z¯s } is a maximal S-regular sequence, let there exists zs+1 = a + bf (X) with a ∈ αR[X] and b ∈ / f (X)R[X], such that zs+1 ¯ is S/(z¯2 , . . . , z¯s )S-regular sequence. At first, we observe that a can not be zero. Otherwise, f (X) and bf (X) becomes part of regular sequence and bf (X).1 ∈ f (X)R[X]m but 1 ∈ / f (X)R[X]m . For some z ∈ R[X]m , assume az ∈ (f (X), z2 , . . . , zs )R[X]m . This gives (a + bf (X))z ∈ (f (X), z2 , . . . , zs ). Thus passing to the ring S, we get z̄ ∈ (z¯2 , . . . , z¯s )S. Thus z ∈ (f (X), z2 , . . . , zs )R[X]m . Thus f (X), z2 , . . . , zs , a forms R[X]m -regular sequence. Again replacing f (X) by z1 , we get (z1 , z2 , . . . , zs , a)R[X] ⊂ αR[X] forms R[X]-regular sequence which contradicts the maximality of R[X]-regular sequence z1 , z2 , . . . , zs in αR[X]m . Thus both the sets of R/f (X)-regular sequences z¯2 , . . . , z¯s and y¯2 , . . . , y¯r in J are maximal and r = s. Thus ht αR[X] = ht I. From the second paragraph of the proof, we notice that ht I = ht J + 1. Thus for every i ≥ 0, except i = ht J +1, ht J +2, Ass S HJi (S) is finite. Thus we conclude.  We observe our next important result as an application of above theorem in the following corollary. Corollary 1. Consider ramified regular local ring S of dimension d of mixed characteristic p > 0 and let there be positive integers m and n such that d − 1 = mn. Consider a set of regular system of parameters where p is not in the ideal generated by any d − 1 of them. If J is an ideal, generated by size t minors of m × n matrix 7 formed by d − 1 such regular system of parameters, then for every i ≥ 0, except i = ht J + 1, ht J + 2, Ass S HJi (S) is finite. Proof. Consider polynomial ring K[{Xij : m ≥ i ≥ 1, m ≥ i ≥ 1}] = K[Xij ] (for brevity) over field K, in matrix of indeterminates and let It (X)K[Xij ] is an ideal generated by size t minor of matrix (Xij ). From [HE], we get that for It (X)K[Xij ] is perfect and result is then immediate from above theorem.  Remark 1. In Theorem 3.2 above, it is to be noted that minimal polynomial f (X) of x1 in the ring R[X], is not even inside the radical of αR[X]. Let f (X) = X n + b1 X n−1 + . . . + bn . Raising to a power of integer t, we get (f (X))t = X nt + · · · + btn . If (f (X))t ∈ αR[X] then 1 ∈ α, which is a contradiction. Example 3.1. Here, we give examples of local cohomology modules such that p is a nonzero divisor of it, or more generally, multiplication by p on local cohomology modules, is an isomorphism. (a) In section 4 of [Bh], there are examples of local cohomology modules such that p is a nonzero divisor of it. (b) In the proof of Theorem 3.2, we have already seen certain examples of ideals, so that multiplication by p, on the local cohomology modules with support in those ideals, is an isomorphism. (c) Here we present another source of examples such that upon multiplication by p, on the local cohomology modules, is an isomorphism: Consider an ideal J ⊂ pS. Since p is an S-regular element, for short exact sequence p 0 → S → S → S/pS → 0 we get the following long exact sequence of local cohomologies p δ .. → HJi−1 (S/pS) → HJi (S) → HJi (S) → HJi (S/pS) → .. Since expansion of J in S/pS is a zero ideal, for every i ≥ 1, HJi (S/pS) = 0. Thus, above long exact sequence reduces to p δ p 0 → HJ0 (S) → HJ0 (S) → HJ0 (S/pS) → HJ1 (S) → HJ1 (S) → 0 and p 0 → HJi (S) → HJi (S) → 0 for every i ≥ 2. Now we present our third main result of this paper in the following theorem. It proves that, there always exists a ramified regular local ring, with a countable collection of ideals, such that we get a countable collection of local cohomology modules with support in those ideals, having finite set of associated primes. Theorem 3.3. Let {Iλ } be a countable collection of ideals of an unramified regular local ring R in mixed characteristic p > 0, such that for every λ, p is a non zero divisor of HIiλ (R) and HIi+1 (R), for every i ∈ Cλ ⊂ N and for every Iλ , where Cλ is λ a countable subset of N. Then, there exists a ramified regular local ring S of mixed characteristic p > 0, which is a homomorphic image of R, so that for expanded ideal Jλ = Iλ S of S, and for corresponding Cλ ⊂ N, Ass S HJi λ (S) is finite for every i ∈ Cλ and this is true for every λ. 8 Proof. At first we observe that, we can always include Iλ = 0 in the countable collection of ideals as stated in the hypothesis along with corresponding Cλ = N. Let (R, m) be an unramified regular local ring in mixed characteristic p > 0. Since p is an R-regular element, for short exact sequence p 0 → R → R → R/pR → 0 we get the following long exact sequence of local cohomologies p δ .. → HIi−1 (R/pR) → HIiλ (R) → HIiλ (R) → HIiλ (R/pR) → .. λ Since p be a non zero divisor of HIiλ (R) and HIi+1 (R) for every i ∈ Cλ and for every λ Iλ , from above long exact sequence, we get HIiλ (R/pR) = HIiλ (R)/pHIiλ (R). We can assume R to be a complete regular local ring. From [Pu], we know that for every ideal Iλ of R, and for every i ≥ 0, the set Ass R HIiλ (R) is countable. Since p is regular, same is true for Ass R HIiλ (R)/pHIiλ (R). For any RS module M , set Ass R M = Ass R M − {m}. Now A = λ (∪i∈Cλ Ass R HIiλ (R)) ∪ (∪i∈Cλ Ass R HIiλ (R)/pHIiλ (R)) is countable. From [Bu] we get that there exists an element g ∈ m such that g does not belong to any element of A. From construction, (p, h) is a HIiλ (R)-regular sequence. Set h = g 2 and thus (p, h) also becomes a HIiλ (R)-regular sequence where h ∈ m2 . Now consider the sequence (p, h−p). Let (h−p)x = py for x, y ∈ HIiλ (R) for some i ∈ Cλ and for some ideal Iλ . Then hx = p(x + y) and since (p, h) is an HIiλ (R)regular sequence we get that (p, h − p) is also an HIiλ (R)-regular sequence. In fact, for Iλ = 0, we get Ass R H00 (R/pR) = Ass R R/pR. Thus, from second paragraph of the proof we get that (p, h) as well as (p, h − p) are R-regular sequence. Set h − p = f . Since h ∈ m2 , we find f ∈ m − m2 . Thus, it is part of a regular system of parameters. So, R/f R is again a regular local ring such that p ∈ m2 . Moreover, h ∈ / pR, otherwise, h = h.1 = pr implies 1 ∈ pR since (p, h) are regular sequence. Thus, it is a contradiction. This shows p is not a multiple of h − p. So, R/f R is a ramified regular local ring of mixed characteristic p ≥ 0. Moreover, each of h and f are also nonzero divisor in R. Thus using (b) of (12.2) Discussion of [Ho], we find (h, p) as well as (f, p) are also a R-regular sequence. So, we can consider the following diagram of short exact sequences where every row and column is exact. 0   y f 0 −−−−→ R   py −−−−→ 0 −−−−→ R   y −−−−→ f f 0   y 0   y R  p y −−−−→ R/f R  p y −−−−→ 0 R   y −−−−→ R/f R   y −−−−→ 0 0 −−−−→ R/pR −−−−→ R/pR −−−−→ R/(p, f )R −−−−→ 0       y y y 0 0 0 9 This above diagram yields the following diagram of long exact sequences where every rows and columns are exact.   y HIi−1 (R) λ   πi−1 y   y f −−−−→ HIi−1 (R) λ   πi−1 y f ψi−1 −−−−→ φi−1   y HIi−1 (R/f R) λ  αi−1  y HIiλ (R)   py   y −−−−→ HIiλ (R)   πi y f −−−−→ f HIiλ (R)   πi y ((R/(p, f )R) −−−−→ HIiλ (R/pR) −−−−→ HIiλ (R/pR) HIi−1 (R/pR) −−−−→ HIi−1 (R/pR) −−−−→ HIi−1 λ λ λ         y y y y f HIiλ (R)   py −−−−→ HIiλ (R)   y −−−−→ f HIiλ (R)   py −−−−→ HIiλ (R/f R)   py −−−−→ HIi+1 (R) λ   py HIiλ (R)   y −−−−→ HIiλ (R/f R)   y −−−−→ HIi+1 (R) λ   y In the above diagram, φi−1 is surjective since f is HIiλ (R/pR) = HIiλ (R)/pHIiλ (R)p regular. Let x be in Ker (HIiλ (R/f R) → HIiλ (R/f R)). Then there exists some y ∈ i−1 HIλ (R/(p, f )R) such that x is the image of y under the map HIi−1 (R/(p, f )R) → λ i−1 i HIλ (R/f R). Since φi−1 is surjective, y = φi−1 (z) for some z ∈ HIλ (R/pR). Now, if we come down to HIiλ (R) via the map HIi−1 (R/pR) → HIiλ (R), due to injectivity λ of the multiplication map by p, the image of z in HIiλ (R) is zero. Since every square in the diagram is commutative, we get that x = 0. So, p is a nonzero divisor of HIiλ (R/f R). For ramified regular local ring R/f R, set S = R/f R. Then, using Theorem 1.2 of [Nu], we get Ass S HJi λ (S) is finite.  References [BBLSZ] B. Bhatt, M. Blickle, G. Lyubeznik, A. Singh and W. Zhang, Local Cohomology Modules of a Smooth Z-Algebra have Finitely Many Associated Primes, Inventiones Mathematicae, 197 (2014) 509-519, arXiv: 1304.4692v2 [math.AC]. [Bh] R. Bhatacharyya, A Note on Associated Primes and Bockstein Homomorphisms of Local Cohomologies for Ramified Regular Local Rings, Communicated. [Bu] L. Burch, Codimension and analytic spread, Proc. Cambridge Philos. Soc. 72. (1972), 369373. [Ho] M. Hochster, Solid Closure In: Commutative algebra: syzygies, multiplicities, and birational algebra, Contemp. Math., vol. 159, pp. 103-172. [HE] M. Hochster and J. Eagon, Cohen-Macaulay rings, invariant theory and the generic perfection of determinantal loci, Amer. J. of Math. 93, 1020-1058, 1971. [HS] Huneke and Sharp, Bass Numbers of Local Cohomology Modules, Transaction of American Mathematical Society, Vol. 339, No. 2, 765-779, 1993. [Hu] C. Huneke, Problems on local cohomology, in: Free resolutions in commutative algebra and algebraic geometry (Sundance, Utah, 1990), 93-108, Res. Notes Math. 2, Jones and Bartlett, Boston, MA, 1992. [Ly1] G. Lyubeznik, Finiteness Properties of Local Cohomology modules (an application of Dmodules to commutative algebra), Invent. Math. 113, 41-55, 1993. 10 [Ly2] G. Lyubeznik, F-modules: applications to local cohomology and D-modules in characteristic p ¿ 0, J. Reine Angew. Math. 491 (1997), 65-130. [Ma] H. Matsumara, Commutative Ring Theory, Cambridge University Press, 1990. [Nu] L. Nunez-Betancourt On certain rings of differentiable type and finiteness properties of local cohomology, Journal of Algebra, Volume 379, April 2013, Pages 1-10, arXiv: 1202.3597 [math.AC]. [PS] C. Peskine and L. Szpiro, Dimensionprojective finie et cohomology locale, I.H.E.S. 42, 47-119, 1973. [Pu] T. J. Puthenpurakal, Associated primes of local cohomology modules over regular rings, arXiv: 1411.2734. Dinabandhu Andrews College, Garia, Kolkata 700084, India E-mail address: [email protected]
0math.AC
arXiv:1409.3605v2 [math.RA] 5 Jan 2016 STABLE HOMOLOGY OVER ASSOCIATIVE RINGS OLGUR CELIKBAS, LARS WINTHER CHRISTENSEN, LI LIANG, AND GREG PIEPMEYER Abstract. We analyze stable homology over associative rings and obtain results over Artin algebras and commutative noetherian rings. Our study develops similarly for these classes; for simplicity we only discuss the latter here. Stable homology is a broad generalization of Tate homology. Vanishing of stable homology detects classes of rings—among them Gorenstein rings, the original domain of Tate homology. Closely related to gorensteinness of rings is Auslander’s G-dimension for modules. We show that vanishing of stable homology detects modules of finite G-dimension. This is the first characterization of such modules in terms of vanishing of (co)homology alone. Stable homology, like absolute homology, Tor, is a theory in two variables. It can be computed from a flat resolution of one module together with an injective resolution of the other. This betrays that stable homology is not balanced in the way Tor is balanced. In fact, we prove that a ring is Gorenstein if and only if stable homology is balanced. Introduction The homology theory studied in this paper was introduced by P. Vogel in the 1980s. Vogel did not publish his work, but the theory appeared in print in a 1992 paper by Goichot [18], who called it Tate–Vogel homology. As the name suggests, the theory is a generalization of Tate homology for modules over finite group rings. Vogel and Goichot also considered a generalization of Tate cohomology, which was studied in detail by Avramov and Veliche [5]. In that paper, the theory was called stable cohomology, to emphasize a relation to stabilization of module categories. To align terminology, we henceforth refer to the homology theory as stable homology. For modules M and N over a ring R, stable homology is a Z-indexed family of g R (M, N ). These fit into an exact sequence abelian groups Tor i (†) R R gR gR · · · → Tor i (M, N ) → Tori (M, N ) → Tori (M, N ) → Tori−1 (M, N ) → · · · R where the groups TorR i (M, N ) and Tori (M, N ) form, respectively, the unbounded homology and the standard absolute homology of M and N . We are thus led to study stable and unbounded homology simultaneously. Our investigation takes cues from the studies of stable cohomology [5] and absolute homology, but our results look quite different. This comes down to an inherent asymmetry in the definition Date: 29 December 2015. 2010 Mathematics Subject Classification. 16E05, 16E30, 16E10, 13H10. Key words and phrases. Stable homology, Tate homology, Gorenstein ring, G-dimension. This research was partly supported by a Simons Foundation Collaboration Grant for Mathematicians, award no. 281886 (L.W.C.), NSA grant H98230-14-0140 (L.W.C.) and NSFC grant 11301240 (L.L.). Part of the work was done during L.L.’s stay at Texas Tech University with support from the China Scholarship Council; he thanks the Department of Mathematics and Statistics at Texas Tech for its kind hospitality. 2 O. CELIKBAS, L. W. CHRISTENSEN, L. LIANG, AND G. PIEPMEYER of stable homology that is not present in either of these precursors. It manifests itself in different ways, but it is apparent in most of our results. ∗ ∗ ∗ g R (M, N ), the ring acts on M from the right When we consider stable homology Tor and on N from the left. In this paper an R-module is a left R-module; to distinguish right R-modules, we speak of modules over the opposite ring R◦ . We study stable homology over associative rings and obtain conclusive results for Artin algebras and commutative noetherian rings. In the following overview, R denotes an Artin algebra or a commutative noetherian local ring. The results we discuss are special cases of results obtained within the paper; internal references are given in parentheses. One expects a homology theory to detect finiteness of homological dimensions. Our first two results reflect the asymmetry in the definition of stable homology. Right vanishing (3.1, 3.2). For a finitely generated R◦ -module M , the following conditions are equivalent. (i) M has finite projective dimension. g R (M, −) = 0 for all i ∈ Z. (ii) Tor i g R (M, −) = 0. (iii) There is an i > 0 with Tor i Left vanishing (5.1, 5.12). For a finitely generated R-module N , the following conditions are equivalent. (i) N has finite injective dimension. g R (−, N ) = 0 for all i ∈ Z. (ii) Tor i g R (−, N ) = 0. (iii) There is an i 6 0 with Tor i These two vanishing results reveal that stable homology cannot be balanced in the way absolute homology, Tor, is balanced. Balancedness (4.5, 4.6, 4.7). The following conditions on R are equivalent. (i) R has finite injective dimension over R and over R◦ . (ii) For all finitely generated R◦ -modules M , all finitely generated R-modules N , g R◦ (N, M ). g R (M, N ) ∼ and all i ∈ Z there are isomorphisms Tor = Tor i i (iii) For all R◦ -modules M , all R-modules N , and all i ∈ Z there are isomorphisms g R◦ (N, M ). g R (M, N ) ∼ Tor = Tor i i Another way to phrase part (i) above is to say that R is Iwanaga-Gorenstein. On that topic: a commutative noetherian ring A is Gorenstein (regular or Cohen– Macaulay) if the local ring Ap is Iwanaga-Gorenstein (regular or Cohen–Macaulay) for every prime ideal p in A. It follows that a commutative noetherian ring of finite self-injective dimension is Gorenstein, but a Gorenstein ring need not have finite self-injective dimension; consider, for example, Nagata’s regular ring of infinite Krull dimension [28, appn. exa. 1]. It came as a surprise to us that balancedness of stable homology detects gorensteinness outside of the local situation (4.6): A commutative noetherian ring A is g A (N, M ) are isomorphic for all finitely g A (M, N ) and Tor Gorenstein if and only if Tor i i generated A-modules M and N and all i ∈ Z. This turns out to be only one of several ways in which stable homology captures global properties of rings. Indeed, STABLE HOMOLOGY OVER ASSOCIATIVE RINGS 3 vanishing of stable homology detects if a commutative noetherian (not necessarily local) ring is regular (3.3), Gorenstein (3.12), or Cohen–Macaulay (5.11). For finitely generated modules over a noetherian ring, Auslander and Bridger [1] introduced a homological invariant called the G-dimension. A noetherian ring is Iwanaga-Gorenstein if and only if there is an integer d such that every finitely generated left or right module has G-dimension at most d; see Avramov and Martsinkovsky [4, 3.2]. In [18, sec. 3] Tate homology was defined for modules over Iwanaga-Gorenstein rings and shown to agree with stable homology. Iacob [24] generalized Tate homology further to a setting that includes the case where M is a finitely generated R◦ -module of finite G-dimension. We prove: Tate homology (6.4). Let M be a finitely generated R◦ -module of finite Gg R (M, −) is isomorphic dimension. For every i ∈ Z the stable homology functor Tor i d R (M, −). to the Tate homology functor Tor i There are two primary generalizations of G-dimension to modules that are not finitely generated: Gorenstein projective dimension and Gorenstein flat dimension. They are defined in terms of resolutions by Gorenstein projective (flat) modules, notions which were introduced by Enochs, Jenda, and collaborators; see Holm [21]1. In general, it is not known if Gorenstein projective modules are Gorenstein flat. d R (M, −) is for R◦ -modules M of finite Iacob’s definition of Tate homology Tor Gorenstein projective dimension. We show (6.7) that Tate homology agrees with g R (M, −) for all such R◦ -modules if and only if every Gorenstein stable homology Tor ◦ projective R -module is Gorenstein flat. Here is an example to illustrate how widely the various homology theories differ. Example. Let (R, m) be a commutative artinian local ring with m2 = 0, and assume that R is not Gorenstein. If k denotes a field, then k[x, y]/(x2 , xy, y 2 ) is an example of such a ring. Let E be the injective hull of the residue field R/m. Then: (a) Absolute homology TorR i (E, E) is non-zero for every i ≥ 2. R g (b) Stable homology Tori (E, E) is zero for every i. R (c) Unstable homology TorR i (E, E) agrees with Tori (E, E) for every i. d R (E, E)” is not defined. (d) Tate homology “Tor Since R is not Gorenstein, E has infinite G-dimension; see [22, thm. 3.2]. That explains (d); see 6.1 and 6.2. It also explains (a), as the first syzygy of E is a k-vector space, whence vanishing of TorR i (E, E) for some i > 2 would imply that E has finite projective dimension and hence finite G-dimension; see [4, thm. 4.9]. Left vanishing, see p. 2, yields (b), and then the exact sequence (†) on p. 1 gives (c). Finally we return to the topic of vanishing. A much studied question in Gorenstein homological algebra is how to detect finiteness of G-dimension. A finitely generated module G over a commutative noetherian ring A has G-dimension zero if it satisfies ExtiA (G, A) = 0 = ExtiA (HomA (G, A), A) for all i > 0 and the canonical map G → HomA (HomA (G, A), A) is an isomorphism. This is the original definition [1], and the last requirement cannot be dispensed with, as shown by Jorgensen 1 Enochs and Jenda consolidated their work in [16, chaps. 10–12], which deal almost exclusively with Gorenstein rings. In [21] Holm does Gorenstein homological algebra over associative rings, so that is our standard reference for this topic. Basic definitions are recalled in 6.6. 4 O. CELIKBAS, L. W. CHRISTENSEN, L. LIANG, AND G. PIEPMEYER and Şega [26]. There are other characterizations of modules of finite G-dimension in the literature, but none that can be expressed solely in terms of vanishing of (co)homology functors. Hence, we were excited to discover: G-dimension (3.11). Let A be a commutative noetherian ring. A finitely generg A (M, A) = 0 holds for ated A-module M has finite G-dimension if and only if Tor i all i ∈ Z. 1. Tensor products of complexes All rings in this paper are assumed to be associative algebras over a commutative ring k, where k = Z is always possible, and k = R works when R is commutative. For an Artin algebra R, one can take k to be an artinian ring such that R is finitely generated as a k-module. We recall that in this situation the functor D(−) = Homk (−, E), where E is the injective hull of k/Jac(k), yields a duality between the categories of finitely generated R-modules and finitely generated R◦ -modules. By M(R) we denote the category of R-modules. We work with complexes, index these homologically, and follow standard notation (see the appendix in [9] for what is not covered below). 1.1. For a complex X with differential ∂ X and an integer n ∈ Z the symbol Cn (X) X , and Hn (X) denotes the homology of X in degree n, denotes the cokernel of ∂n+1 X X i.e., Ker ∂n /Im ∂n+1 . A complex with H(X) = 0 is called acyclic, and a morphism of complexes X → Y that induces an isomorphism H(X) → H(Y ) is called a quasiisomorphism. The symbol ≃ is used to decorate quasi-isomorphisms; it is also used for isomorphisms in derived categories. 1.2. For an R◦ -complex X and an R-complex Y `, the tensor product X ⊗R Y is the k-complex with degree n term (X ⊗R Y )n = i∈Z (Xi ⊗R Yn−i ) and differential Y given by ∂(x ⊗ y) = ∂iX (x) ⊗ y + (−1)i x ⊗ ∂n−i (y) for x ∈ Xi and y ∈ Yn−i . Contrast the standard tensor product complex in 1.2 with the construction in 1.3, which first appeared in [18]. Similar constructions for Hom were also treated in [18] and in great detail by Avramov and Veliche [5]. We recall the Hom constructions in the Appendix, where we also study their interactions with the one below. 1.3 Definition. For an R◦ -complex X and an R-complex Y , consider the graded k-module X ⊗R Y with degree n component Y (X ⊗R Y )n = Xi ⊗R Yn−i . i∈Z Endowed with the degree −1 homomorphism ∂ defined on elementary tensors as in 1.2, it becomes a complex called the unbounded tensor product. It contains the tensor product, X ⊗R Y , as a subcomplex. The quotient complex (X ⊗R Y )/(X ⊗R Y ) e R Y , and it is called the stable tensor product. is denoted X ⊗ 1.4. The definition above yields an exact sequence of k-complexes, e R Y −→ 0 . (1.4.1) 0 −→ X ⊗R Y −→ X ⊗R Y −→ X ⊗ Notice that if X or Y is bounded, or if both complexes are bounded on the same side (above or below), then the unbounded tensor product coincides with the usual e R Y is zero. tensor product, and the stable tensor product X ⊗ STABLE HOMOLOGY OVER ASSOCIATIVE RINGS 5 Note that the unbounded tensor product X ⊗R Y is the product totalization of the double complex (Xi ⊗R Yj ). 1.5. We collect some basic results about the unbounded and stable tensor products. For the unbounded tensor product the proofs mimic the proofs for the tensor product, and one obtains the results for the stable tensor product via (1.4.1). As above X is an R◦ -complex and Y is an R-complex. (a) There are isomorphisms of k-complexes eR Y ∼ e R◦ X . and X⊗ X ⊗R Y ∼ = Y ⊗ = Y ⊗R◦ X (b) (c) (d) (e) e R − are additive and right exact. The functors X ⊗R − and X ⊗ e R − preserve degree-wise split exact sequences. The functors X ⊗R − and X ⊗ e R − preserve homotopy. The functors X ⊗R − and X ⊗ ′ A morphism α : Y → Y of R-complexes yields isomorphisms of k-complexes e R α) ∼ e R Cone α . Cone(X ⊗R α) ∼ = X ⊗R Cone α and Cone(X ⊗ = X⊗ It follows that X ⊗R α is a quasi-isomorphism if and only if X ⊗R Cone α is e R α. acyclic, and similarly for X ⊗ 1.6 Lemma. Let D = (Di,j ) be a double k-complex. Let z be a cycle in the product totalization of D. Assume z contains a component zm,n that satisfies zm,n = ∂ h (x′ ) + ∂ v (x′′ ) for some x′ ∈ Dm+1,n and x′′ ∈ Dm,n+1 . If both (1) Hhm+k (D∗,n−k ) = 0 for every k > 0 and (2) Hvn+k (Dm−k,∗ ) = 0 for every k > 0, then z is a boundary in the product totalization of D. Proof. The goal is to prove the existence of a sequence (xi ) with xm+1 = x′ and xm = x′′ such that zm+k,n−k = ∂ h (xm+k+1 ) + ∂ v (xm+k ) holds for all k ∈ Z; i.e., one has z = ∂(x) in the product totalization of D. Assume k is positive and that xm , . . . , xm+k have been constructed. Then zm+k−1,n−k+1 = ∂ h (xm+k ) + ∂ v (xm+k−1 ) holds. As z is a cycle in the product totalization of D, one has 0 = ∂ h (zm+k,n−k ) + ∂ v (zm+k−1,n−k+1 ) = ∂ h (zm+k,n−k ) + ∂ v (∂ h (xm+k ) + ∂ v (xm+k−1 )) = ∂ h (zm+k,n−k ) − ∂ h (∂ v (xm+k )) . Thus, zm+k,n−k − ∂ v (xm+k ) is a horizontal cycle, and hence by (1) it is a horizontal boundary. There exists, therefore, an element xm+k+1 with ∂ h (xm+k+1 ) + ∂ v (xm+k ) = zm+k,m−k . By induction, this argument yields the elements xm+k for k > 1; a symmetric argument using (2) yields xm+k for k < 0.  1.7 Proposition. Let X be an R◦ -complex and let Y be an R-complex. (a) If X is bounded above and Xi ⊗R Y is acyclic for all i, then X ⊗R Y is acyclic. (b) If Y is bounded below and Xi ⊗R Y is acyclic for all i, then X ⊗R Y is acyclic. 6 O. CELIKBAS, L. W. CHRISTENSEN, L. LIANG, AND G. PIEPMEYER Proof. The product totalization of the double complex (Xi ⊗ Yj ) is X ⊗R Y . (a) Let m be an upper bound for X, let n be an integer, and let z = (zm+k,n−k )k be a cycle in X ⊗R Y of degree m + n. The component zm,n is a cycle in Xm ⊗R Y and hence a boundary as Xm ⊗R Y is assumed to be acyclic. Moreover, the assumption that Xi ⊗R Y is acyclic for every i ensures that condition (2) in Lemma 1.6 is met. Condition (1) is satisfied due to the boundedness of X; thus z is a boundary in X ⊗R Y . As n is arbitrary, it follows that X ⊗R Y is acyclic. (b) A similar argument with the roles of m and n exchanged handles this case.  2. Homology Now we consider the homology of unbounded and stable tensor product complexes. Our notation differs slightly from the one employed by Goichot [18]. ≃ 2.1 Definition. Let M be an R◦ -module and N be an R-module. Let P −−→ M be ≃ a projective resolution and let N −−→ I be an injective resolution. The k-modules TorR i (M, N ) = Hi (P ⊗R I) are the unbounded homology modules of M and N over R, and the stable homology modules of M and N over R are gR e Tor i (M, N ) = Hi+1 (P ⊗R I) . 2.2. As any two projective resolutions of M , and similarly any two injective resolutions of N , are homotopy equivalent, it follows from 1.5(d) that the definitions in 2.1 are independent of the choices of resolutions. 2.3. Notice from 1.4 that if M has finite projective dimension, or if N has finite R injective dimension, then for every i ∈ Z one has TorR i (M, N ) = Tori (M, N ) and g R (M, N ) = 0. hence Tor i 2.4. The standard liftings of module homomorphisms to morphisms of resolutions gR imply that the definitions of TorR i (M, N ) and Tori (M, N ) are functorial in either argument; that is, for every i ∈ Z there are functors ◦ gR TorR i (−, −), Tori (−, −) : M(R ) × M(R) −→ M(k) . These functors are homological in the sense that every short exact sequence of R◦ modules 0 → M ′ → M → M ′′ → 0 and every R-module N give rise to a connected exact sequence of stable homology modules (2.4.1) g R (M ′′ , N ) → Tor g R (M ′ , N ) → Tor g R (M, N ) → Tor g R (M ′′ , N ) → · · · , · · · → Tor i+1 i i i and to an analogous sequence of Tor modules. Similarly, every short exact sequence 0 → N ′ → N → N ′′ → 0 of R-modules and every R◦ -module M give rise to a connected exact sequence, (2.4.2) ′′ ′ ′′ gR gR gR gR · · · → Tor i+1 (M, N ) → Tori (M, N ) → Tori (M, N ) → Tori (M, N ) → · · · , and an analogous sequence of Tor modules. For details see [18, sec. 1]. Stable and unbounded homology entwine with absolute homology. STABLE HOMOLOGY OVER ASSOCIATIVE RINGS 7 2.5. For every R◦ -module M and every R-module N the exact sequence of complexes (1.4.1) yields an exact sequence of homology modules: g R (M, N ) → · · · g R (M, N ) − → Tor (2.5.1) · · · → Tor → TorR → TorR i (M, N ) − i−1 i i (M, N ) − Flat resolutions. Just like absolute homology, unbounded and stable homology can be computed using flat resolutions in place of projective resolutions. ≃ 2.6 Proposition. Let M be an R◦ -module and N be an R-module. If F −−→ M is ≃ a flat resolution and N −−→ I is an injective resolution, then there are isomorphisms, ∼ TorR i (M, N ) = Hi (F ⊗R I) g R (M, N ) ∼ e R I) and Tor = Hi+1 (F ⊗ i for every i ∈ Z, and they are natural in either argument. ≃ Proof. Let P −−→ M be a projective resolution, then there is a quasi-isomorphism α : P → F . For every R-complex E the complex Cone(α) ⊗R E is acyclic by [11, cor. 7.5]. In particular, Cone(α) ⊗R I is acyclic, and it follows from Proposition 1.7 e R I is acyclic in view of (1.4.1). Thus, that Cone(α) ⊗R I is acyclic; now Cone(α) ⊗ e the morphisms α ⊗R I and α ⊗R I are quasi-isomorphisms by 1.5(e), and the desired isomorphisms follow from 2.1; it is standard to verify that they are natural.  In view of 1.4 the next result is now immediate. g R (M, −) = 0 2.7 Corollary. For every R◦ -module M of finite flat dimension, Tor i holds for every i ∈ Z.  2.8 Remark. If every flat R◦ -module has finite projective dimension, then Corollary 2.7 is covered by 2.3. There are wide classes of rings over which flat modules have finite projective dimension: Iwanaga-Gorenstein rings, see [16, thm. 9.1.10], and more generally rings of finite finitistic projective dimension, see Jensen [25, prop. 6]; in a different direction, rings of cardinality at most ℵn for some n ∈ N, see Gruson and Jensen [20, thm. 7.10]. On the other hand, recall that any product of fields is a von Neumann regular ring, i.e., every module over such a ring is flat. Osofsky [29, 3.1] shows that a sufficiently large product of fields has infinite global dimension and hence must have flat modules of infinite projective dimension. The next result is an analogue for stable homology of [5, thm. 2.2]. 2.9 Proposition. Let M be an R◦ -module and let n ∈ Z. The following conditions are equivalent. g R (M, −) → TorR (M, −) is an isomorphism for (i) The connecting morphism Tor i i every i > n. (ii) TorR i (M, E) = 0 for every injective R-module E and every i > n. (iii) TorR i (M, −) = 0 for every i > n. g R (M, E) = 0 Proof. For every injective R-module E and for every i ∈ Z one has Tor i by 2.3. Thus (i) implies (ii). In the following we use the notation (−)⊃s for the soft truncation below at s. ≃ (ii) =⇒ (iii): Let N be an R-module and N −−→ I be an injective resolution. Let ≃ + P −−→ M be a projective resolution and let P denote its mapping cone. Let E be an injective R-module; by assumption one has TorR i (M, E) = 0 for all i > n. By 8 O. CELIKBAS, L. W. CHRISTENSEN, L. LIANG, AND G. PIEPMEYER right exactness of the tensor product, P⊃+n−2 ⊗R E is acyclic and hence P⊃+n−2 ⊗R I is acyclic by 1.5(a) and Proposition 1.7. Thus, for every i > n one has + TorR i (M, N ) = Hi (P ⊗R I) = Hi (P⊃n−2 ⊗R I) = 0. (Notice that for all n 6 0 one has P⊃+n−2 = P + .) (iii) =⇒ (i): This is immediate from the exact sequence (2.5.1).  TorR ≫0 (M, −) As vanishing of detects finite flat dimension of M , the next result is an immediate consequence of Proposition 2.9. In the parlance of [15] it says that g R (M, −) = 0. the flat and copure flat dimensions agree for R◦ -modules M with Tor g R (M, −) = 0 for all i ∈ Z, then 2.10 Corollary. Let M be an R◦ -module. If Tor i fdR◦ M = sup{i ∈ Z | TorR i (M, E) 6= 0 for some injective R-module E } .  Dimension shifting is a useful tool in computations with stable homology. 2.11. For a module X, we denote by Ωm X the mth syzygy in a projective resolution of X and by Ωm X the mth cosyzygy in an injective resolution of X. By Schanuel’s lemma a syzygy/cosyzygy is uniquely determined up to a projective/injective summand. In view of 2.3 and the exact sequences in 2.4 one gets ∼ gR gR Tor i (M, N ) = Tori−m (Ωm M, N ) for m > 0 (2.11.1) (2.11.2) ≃ gR Tor i (M, N ) ∼ = m gR Tor i+m (M, Ω N ) and for m > 0 . Moreover, if F −−→ M is a flat resolution of M , then there are isomorphisms, g R (M, N ) ∼ g R (Cm (F ), N ) for m > 0 ; Tor = Tor i i−m (2.11.3) this follows from (2.4.1) and Corollary 2.7. 2.12. Suppose R is commutative and S is a flat R-algebra. For every S ◦ -module ≃ M , a projective resolution P −−→ M over S ◦ is a flat resolution of M as an Rg R (M, −) module. Thus, it follows from Proposition 2.6 that stable homology Tor i ≃ ◦ is a functor from M(R) to M(S ). Similarly, an injective resolution N −−→ I of an g R (−, N ) S-module is also an injective resolution of N as an R-module, whence Tor i is a functor from M(R) to M(S). g 3. Vanishing of stable homology Tor(M, −) We open with a partial converse to Corollary 2.7; recall, for example from [16, prop. 3.2.12], that a finitely presented module is flat if and only if it is projective. 3.1 Theorem. Let M be an R◦ -module that has a degree-wise finitely generated projective resolution. The following conditions are equivalent. (i) pdR◦ M is finite. g R (M, −) = 0 for all i ∈ Z. (ii) Tor i g R (M, −) = 0 for some i > 0. (iii) Tor i g R (M, Homk (M, E)) = 0 for some faithfully injective k-module E. (iv ) Tor 0 Moreover, if R is left noetherian with idR R finite, then (i)–(iv ) are equivalent to g R (M, −) = 0 for some i ∈ Z. (iii’ ) Tor i STABLE HOMOLOGY OVER ASSOCIATIVE RINGS 9 Proof. The implications (i) =⇒ (ii) =⇒ (iii) =⇒ (iii’ ) are clear; see 2.3. Part (iv ) follows from (iii) by dimension shifting (2.11.2). For (iv ) =⇒ (i) use Theorem A.8 to get ∼ gR g0 0 = Tor 0 (M, Homk (M, E)) = Homk (ExtR◦ (M, M ), E) . g 0 ◦ (M, M ) is zero, hence M has finite projective dimension by [5, prop. 2.2]. Thus Ext R Finally, assume that R is left noetherian with idR R finite. Let E be a faithfully injective k-module; in view of what has already been proved, it is sufficient to show g R (M, −) = 0 for some i > 0 implies Tor g R (M, Homk (M, E)) = 0. It follows that Tor 0 −i from the assumptions on R that every free R-module has finite injective dimension. Thus every projective R-module P has finite injective dimension, and 2.3 yields g R (−, P ) = 0 for all i ∈ Z. From the exact sequence (2.4.2) it follows that there Tor i g R (M, Homk (M, E)) ∼ g R (M, Ωi Homk (M, E)) for i > 0, are isomorphisms Tor = Tor 0 −i R R g (M, Homk (M, E)) = 0. g (M, −) implies Tor  so vanishing of Tor 0 −i 3.2 Corollary. Let R be an Artin algebra with duality functor D(−). For a finitely generated R◦ -module M the following conditions are equivalent. (i) pdR◦ M is finite. g R (M, N ) = 0 for all finitely generated R-modules N . (ii) There is an i > 0 with Tor i g R (M, D(M )) = 0. (iii) Tor 0 Proof. Part (ii) follows from (i) in view of 2.3. Part (iii) follows from (ii) by dimension shifting (2.11.2) in a degree-wise finitely generated injective resolution of D(M ). Finally, one has D(M ) = Homk (M, E), see the first paragraph in Section 1, so (i) follows from (iii) by Theorem 3.1, as the injective hull E of k/Jac(k) is faithfully injective.  By a result of Bass and Murthy [6, lem. 4.5], a commutative noetherian ring is regular if and only if every finitely generated module has finite projective dimension. 3.3 Corollary. For a commutative noetherian ring R, the following are equivalent: (i) R is regular. g R (M, −) = 0 for all finitely generated R-modules M and all i ∈ Z. (ii) Tor i g R (M, −) = 0 for all finitely generated R-modules M . (iii) There is an i ∈ Z with Tor i Proof. The implications (i) =⇒ (ii) =⇒ (iii) are clear; see 2.3. (iii) =⇒ (i): If i > 0, then every finitely generated R-module has finite projective dimension by Theorem 3.1; i.e., R is regular. If i < 0, then for any finitely generated ∼ gR gR R-module M one has Tor 0 (M, −) = Tori (Ω−i M, −) = 0 by dimension shifting (2.11.1), and as above it follows that R is regular.  Tate flat resolutions. We show that under extra assumptions on M one can g R (M, N ) without resolving the second argument. compute Tor ≃ 3.4. Let N be an R-module; choose an injective resolution N −−→ I and a projective ≃ resolution P −−→ N . The composite P → N → I is a quasi-isomorphism, so the N complex CP I = Cone(P → N → I) is acyclic, and up to homotopy equivalence it is independent of the choice of resolutions. This construction is functorial in N . 10 O. CELIKBAS, L. W. CHRISTENSEN, L. LIANG, AND G. PIEPMEYER 3.5 Lemma. Let F be a bounded below complex of flat R◦ -modules; let N be an ≃ ≃ R-module with a projective resolution P −−→ N and an injective resolution N −−→ I. N e R I ≃ F ⊗R CP I in the derived category D(k), and it There is an isomorphism F ⊗ is functorial in the second argument; cf. 3.4. Proof. There is by 1.5(c) a short exact sequences of k-complexes 0 −→ F ⊗R I −→ F ⊗R CN P I −→ F ⊗R Σ P −→ 0 . With (1.4.1) it forms a commutative diagram whose rows are triangles in D(k), F ⊗R P / F ⊗R I / F ⊗R CN PI ≃  F ⊗R I / Σ(F ⊗R P ) ≃ / F ⊗R I /F⊗ eR I  / Σ(F ⊗R I) , where the top triangle is rotated back once. The isomorphism is induced by the composite quasi-isomorphism P → N → I, as one has F ⊗R P = F ⊗R P ; cf. 1.4. Completion of the morphism of triangles yields the desired isomorphism via the Triangulated Five Lemma; see [23, prop. 4.3]. Functoriality in the second argument is straightforward to verify.  ≃ 3.6 Lemma. Let N be an R-module with a projective resolution P −−→ N and ≃ an injective resolution N −−→ I. Let T be a complex of flat R◦ -modules such that T ⊗R E is acyclic for every injective R-module E. There is then an isomorphism T ⊗ R CN P I ≃ Σ(T ⊗R N ) in D(k) which is functorial in the second argument; cf. 3.4. Proof. By the assumptions and Proposition 1.7(a) the complex T ⊗R I is acyclic, so application of T ⊗R − to the exact sequence 0 → I → CN P I → Σ P → 0 yields → T ⊗ Σ P ; cf. 1.5(c). Now, let P + denote the a quasi-isomorphism T ⊗R CN R PI mapping cone of the quasi-isomorphism P → N . The complex T ⊗R P + is acyclic by Proposition 1.7(b), so application of T ⊗R − to the mapping cone sequence 0 → N → P + → Σ P → 0 yields an isomorphism T ⊗R Σ P ≃ Σ(T ⊗R N ) in D(k), and the desired isomorphism follows as N is a module; cf. 1.4. Functoriality in the second argument is straightforward to verify; cf. 3.4.  3.7 Remark. The quasi-isomorphisms in Lemmas 3.5 and 3.6 hold with CN P I re≃ N placed by CF I where F −−→ N is a flat resolution. The objects discussed in the next paragraph appear in the literature under a variety of names; here we stick with the terminology from [27]. 3.8. An acyclic complex T of flat R◦ -modules is called totally acyclic if T ⊗R E is acyclic for every injective R-module E. A Tate flat resolution of an R◦ -module M is ≃ a pair (T, F ), where F −−→ M is a flat resolution and T is a totally acyclic complex ◦ of flat R -modules with T>n ∼ = F>n for some n > 0. Tate’s name is invoked here because these resolutions can be used to compute Tate homology; see [27, thm. A]. 3.9. Over a left coherent ring R, an R◦ -module M has a Tate flat resolution if and only if it has finite Gorenstein flat dimension; see [27, prop. 3.4]. If R is noetherian, then every finitely generated R◦ -module M of finite Gdimension has a Tate flat resolution. Here is a direct argument: By [4, thm. 3.1] ≃ there exists a pair (T, P ) where P −−→ M is a projective resolution and T is an STABLE HOMOLOGY OVER ASSOCIATIVE RINGS 11 acyclic complex of finitely generated projective R◦ -modules with the following properties: the complex HomR◦ (T, R) is acyclic, and there is an n > 0 with T>n ∼ = P>n . For every injective R-module E one now has ∼ T ⊗R HomR (R, E) = ∼ HomR (HomR◦ (T, R), E) (3.9.1) T ⊗R E = where the last isomorphism holds because T is degree-wise finitely generated; see [7, prop. VI.5.2]. Thus T is a totally acyclic complex of flat R◦ -modules and (T, P ) is a Tate flat resolution of M . The next result shows that stable homology can be computed via Tate flat resolutions. We apply it in Section 6 to compare stable homology to Tate homology, but before that it is used in the proofs of Theorems 3.11 and 4.2. 3.10 Theorem. Let M be an R◦ -module that has a Tate flat resolution (T, F ). For every R-module N and every i ∈ Z there is an isomorphism, g R (M, N ) ∼ Tor = Hi (T ⊗R N ) , i and it is functorial in the second argument. Proof. Choose n > 0 such that T>n and F>n are isomorphic, and consider the degree-wise split exact sequence 0 −→ T6n−1 −→ T −→ F>n −→ 0 . ≃ ≃ Let P −−→ N be a projective resolution and N −−→ I be an injective resolution; set C = CN P I ; cf. 3.4. There is, by 1.5(c), an exact sequence of k-complexes, 0 −→ T6n−1 ⊗R C −→ T ⊗R C −→ F>n ⊗R C −→ 0 . As C is acyclic, it follows from Proposition 1.7(a) that T6n−1 ⊗R C is acyclic, whence the surjective morphism above is a quasi-isomorphism. Since T is a totally acyclic complex of flat modules, there is by Lemma 3.6 an isomorphism T ⊗R C ≃ Σ(T ⊗R N ) in D(k). Moreover, Lemma 3.5 yields an isomorphism e R I in D(k). e R I in D(k). Thus one has Σ(T ⊗R N ) ≃ F>n ⊗ F>n ⊗R C ≃ F>n ⊗ This explains the second isomorphism in the next computation. g R (M, N ) ∼ g R (Cn (F ), N ) Tor = Tor i i−n e R I) = Hi−n+1 ((Σ−n F>n ) ⊗ e R I) = Hi+1 (F>n ⊗ ∼ = Hi+1 (Σ(T ⊗R N )) = Hi (T ⊗R N ) The first isomorphism holds by (2.11.3); the first equality follows from Proposition 2.6 as the canonical surjection Σ−n F>n → Cn (F ) is a flat resolution.  As discussed in the introduction, the G-dimension is a homological invariant for finitely generated modules over noetherian rings. Characterizations of modules of finite G-dimension have traditionally involved both vanishing of (co)homology and invertibility of a certain morphism; see for example [9, (2.1.6), (2.2.3), (3.1.5), and (3.1.11)]. More recently, Avramov, Iyengar, and Lipman [3] showed that a finitely generated module M over a commutative noetherian ring R has finite G-dimension if and only M is isomorphic to the complex RHomR (RHomR (M, R), R) in the 12 O. CELIKBAS, L. W. CHRISTENSEN, L. LIANG, AND G. PIEPMEYER derive category D(R). The crucial step in our proof of the next theorem is to show g R (M, R) implies such an isomorphism. that vanishing of stable homology Tor 3.11 Theorem. Let R be a commutative noetherian ring. For a finitely generated R-module M , the following conditions are equivalent. (i) G-dimR M < ∞. g R (M, N ) = 0 for every R-module N of finite flat dimension and all i ∈ Z. (ii) Tor i R g (iii) Tor (M, R) = 0 for all i ∈ Z. i Proof. The implication (ii) =⇒ (iii) is trivial. (i) =⇒ (ii): By 3.9 the R◦ module M has a Tate flat resolution (T, F ). Theog R (M, −) ∼ rem 3.10 yields isomorphisms Tor = Hi (T ⊗R −) for all i ∈ Z. It follows i by induction on the flat dimension of N that T ⊗R N is acyclic; cf. [10, lem. 2.3]. ≃ (iii) =⇒ (i): Let P −−→ M be a degree-wise finitely generated projective reso≃ lution, and let R −−→ I be an injective resolution. By assumption, the complex e R I is acyclic, which explains the third ≃ below: P⊗ M ≃ P ⊗R R ≃ P ⊗R I ≃ P ⊗R I ∼ = P ⊗R HomR (R, I) ∼ = HomR (HomR (P, R), I). The last isomorphism holds by Proposition A.6 as HomR (P, R) equals HomR (P, R). Now it follows from [3, thm. 2] and [9, thm. (2.2.3)] that G-dimR M is finite.  3.12 Corollary. For a commutative noetherian ring R the following are equivalent. (i) R is Gorenstein. g R (M, R) = 0 for all finitely generated R-modules M and all i ∈ Z. (ii) Tor i R g (iii) Tori (M, R) = 0 for all finitely generated R-modules M and all i < 0. Proof. By a result of Goto, R is Gorenstein if and only if every finitely generated R-module has finite G-dimension [19, cor. 2]. Combining this with Theorem 3.11 one gets the the equivalence of (i) and (ii). The implication (ii) =⇒ (iii) is clear. Finally, (ii) follows from (iii) by dimension shifting (2.11.1).  4. Balancedness of stable homology Absolute homology is balanced over any ring: there are always isomorphisms ◦ TorR (M, N ) ∼ = TorR (N, M ). It follows already from Corollary 3.2 that stable homology can be balanced only over special rings. Indeed, if R is an Artin algebra and stable homology is balanced over R, then the dual module of R has finite projective dimension over both R and R◦ , whence R is Iwanaga-Gorenstein. The converse is part of Corollary 4.5. We open this section with a technical lemma; it is similar to a result of Enochs, Estrada, and Iacob [14, thm. 3.6]. Recall the notation Cm (−) from 1.1. 4.1 Lemma. Let T and T ′ be acyclic complexes of flat R◦ -modules and flat Rmodules, respectively. For all integers m and n there are isomorphisms in D(k), T6n−1 ⊗R Cm (T ′ ) ≃ Σn−m (Cn (T ) ⊗R T6′ m−1 ) T>n ⊗R Cm (T ′ ) ≃ Σn−m (Cn (T ) ⊗R T>′ m ) T ⊗R Cm (T ′ ) ≃ Σn−m (Cn (T ) ⊗R T ′ ) . STABLE HOMOLOGY OVER ASSOCIATIVE RINGS 13 Proof. Because the complexes T and T ′ are acyclic, there are quasi-isomorphisms Cn (T ) → Σ1−n T6n−1 and Cm (T ′ ) → Σ1−m T6′ m−1 . Hence [10, prop. 2.14(b)] yields T6n−1 ⊗R Cm (T ′ ) ≃ T6n−1 ⊗R Σ1−m T6′ m−1 ≃ Σn−m (Σ1−n T6n−1 ⊗R T6′ m−1 ) ≃ Σn−m (Cn (T ) ⊗R T6′ m−1 ) . This demonstrates the first isomorphism in the statement, and the second is proved similarly. Finally, these two isomorphisms connect the exact sequences 0 → T6n−1 ⊗R Cm (T ′ ) → T ⊗R Cm (T ′ ) → T>n ⊗R Cm (T ′ ) → 0 and 0 → Cn (T ) ⊗R T6′ m−1 → Cn (T ) ⊗R T ′ → Cn (T ) ⊗R T>′ m → 0 , and one obtains the last isomorphism via the Triangulated Five Lemma in D(k); see [23, prop. 4.3].  4.2 Theorem. Let M be an R◦ -module and N be an R-module. If they both have Tate flat resolutions, then for each i ∈ Z there is an isomorphism ∼ g R◦ gR Tor i (M, N ) = Tori (N, M ) . Proof. Let (T, F ) and (T ′ , F ′ ) be Tate flat resolutions of M and N , respectively. Choose n ∈ Z such that there are isomorphisms T>n ∼ = F>′ n . For = F>n and T>′ n ∼ every i ∈ Z one has ∼ gR Tor i (M, N ) = Hi (T ⊗R N ) ∼ = Hi−n (T ⊗R Cn (T ′ )) ∼ = Hi−n (Cn (T ) ⊗R T ′ ) ∼ = Hi (M ⊗R T ′ ) ◦ ∼ gR = Tor i (N, M ) , where the first and the last isomorphisms follow from Theorem 3.10, the second and fourth isomorphisms follow by dimension shifting, and the third isomorphism holds by the last isomorphism in Lemma 4.1.  4.3 Definition. Let M be an R◦ -module and N be an R-module. Stable homology g R (M, N ) ∼ g R◦ (N, M ) for all i ∈ Z. is balanced for M and N if one has Tor = Tor i i 4.4. Theorem 4.2 says that stable homology is balanced for all (pairs of) R◦ - and Rmodules that have Tate flat resolutions. If R is Iwanaga–Gorenstein, then every R◦ module and every R-module has a Tate flat resolution, see 3.9 and [16, thm. 12.3.1], so stable homology is balanced for all (pairs of) R◦ - and R-modules. 4.5 Corollary. For an Artin algebra R the following conditions are equivalent. (i) R is Iwanaga-Gorenstein. (ii) Stable homology is balanced for all R◦ - and R-modules. (iii) Stable homology is balanced for all finitely generated R◦ - and R-modules. 14 O. CELIKBAS, L. W. CHRISTENSEN, L. LIANG, AND G. PIEPMEYER Proof. Per 4.4, part (i) implies (ii), which clearly implies (iii). Let E = D(R) be the dual module of R; it is injective and finitely generated over R◦ and over R. Thus, if stable homology is balanced for finitely generated R◦ - and R modules, then it follows from 2.3 and Corollary 3.2 that pdR E as well as pdR◦ E is finite. By duality, both idR R and idR◦ R are then finite.  4.6 Corollary. A commutative noetherian ring R is Gorenstein if and only if stable homology is balanced for all finitely generated R-modules. Proof. Over a Gorenstein ring, the G-dimension of every finitely generated module is finite by [19, cor. 2], so every finitely generated module has a Tate flat resolution; see 3.9. Thus, balancedness of stable homology follows from Theorem 4.2. Cong R (M, R) = 0 for every finitely versely, balancedness of stable homology implies Tor i generated R-module M and all i ∈ Z, so R is Gorenstein by Corollary 3.12.  4.7 Corollary. A commutative noetherian ring R of finite Krull dimension is Gorenstein if and only if stable homology is balanced over R. Proof. If R is Gorenstein of finite Krull dimension, then it is Iwanaga-Gorenstein. Therefore, stable homology is balanced over R per 4.4. The converse holds by Corollary 4.6.  g 5. Vanishing of stable homology Tor(−, N) g R (−, N ) over an Artin algebra can by duality be Vanishing of stable homology Tor i g R (M, −). understood via vanishing of Tor i 5.1 Proposition. Let R be an Artin algebra with duality functor D(−). For a finitely generated R-module N the following conditions are equivalent. (i) idR N is finite. g R (−, N ) = 0 for all i ∈ Z. (ii) Tor i g R (M, N ) = 0 for all finitely generated (iii) There is an integer i 6 0 with Tor i ◦ R -modules M . g R (D(N ), N ) = 0. (iv ) Tor 0 Proof. The implications (i) =⇒ (ii) =⇒ (iii) are clear; see 2.3. Part (iv ) follows from (iii) by dimension shifting (2.11.1), as D(N ) is finitely generated. Finally, ∼ gR gR vanishing of Tor 0 (D(N ), N ) = Tor0 (D(N ), D(D(N ))) implies by Corollary 3.2 that pdR◦ D(N ) is finite, whence idR N is finite, and so (i) follows from (iv ).  g R (−, N ) over commuLocal rings. To analyze vanishing of stable homology Tor i tative noetherian rings, we start locally. 5.2. Let R be a commutative noetherian local ring with residue field k. For an R-module M , the depth invariant can be defined as depthR M = inf{i ∈ Z | ExtiR (k, M ) 6= 0} , and if M is finitely generated, then its injective dimension can be computed as idR M = sup{i ∈ Z | ExtiR (k, M ) 6= 0} . STABLE HOMOLOGY OVER ASSOCIATIVE RINGS 15 The depth is finite for M 6= 0. The ring R is Cohen–Macaulay if there exists a finitely generated module M 6= 0 of finite injective dimension; this is a consequence of the New Intersection Theorem due to Peskine and Szpiro [30] and Roberts [32]. The following is an analogue of [5, thm. 6.1]. 5.3 Lemma. Let R be a commutative noetherian local ring with residue field k. For every finitely generated R-module N and for every i ∈ Z there is an isomorphism Y j−i ∼ TorR Homk (ExtjR (k, R), ExtR (k, N )) i (k, N ) = j∈Z of R-modules, and in particular, TorR i (k, N ) is a k-vector space. ≃ Proof. Let P −−→ k be a degree-wise finitely generated projective resolution and ≃ ≃ let N −−→ I and R −−→ J be injective resolutions. By definition TorR i (k, N ) is the ith homology of the complex P ⊗R I which we compute using Proposition A.6 as follows P ⊗R I ∼ = P ⊗R HomR (R, I) ∼ = HomR (HomR (P, R), I). Next we simplify using quasi-isomorphisms and Hom-tensor adjointness: HomR (HomR (P, R), I) ≃ HomR (HomR (P, J), I) ≃ HomR (HomR (k, J), I) ∼ = HomR (HomR (k, J) ⊗k k, I) ∼ = Homk (HomR (k, J), HomR (k, I)) . Finally, pass to homology.  g R (k, N ) may be a k5.4 Remark. Lemma 5.3 suggests that stable homology Tor i vector space, and indeed it is. If R is a ring and if x annihilates the R◦ -module M , or the R-module N , then there are two homotopic lifts—zero and multiplication by x—to the projective resolution in the case of M or to the injective resolution in the case of N ; see Definition 2.1 and [34, 22.6 and 2.3.7]. Hence multiplication by x is zero on unbounded and on stable homology of M against N . In particular, stable g R (k, N ) is a k-vector space. homology Tor i 5.5 Proposition. Let R be a commutative noetherian local ring with residue field k and let N be a finitely generated R-module. If for some i ∈ Z the k-vector space g R (k, N ) has finite rank, then N has finite injective dimension, or R is Gorenstein. Tor i R Proof. Each k-vector space TorR j (k, N ) has finite rank, so Tori+1 (k, N ) has finite rank by the assumption and the exact sequence (2.5.1). For a finitely generated R-module M 6= 0 the vector spaces ExtjR (k, M ) are non-zero for all j between depthR M < ∞ and idR M ; see Roberts [31, thm. 2]. When TorR i+1 (k, N ) has finite rank, it follows from Lemma 5.3 that R or N has finite injective dimension.  Compared to the characterization of globally Gorenstein rings in Corollary 3.12, condition (iii) below is sharper. 5.6 Theorem. Let R be a commutative noetherian local ring with residue field k. The following conditions are equivalent. (i) R is Gorenstein. g R (−, R) = 0 for all i ∈ Z. (ii) Tor i 16 O. CELIKBAS, L. W. CHRISTENSEN, L. LIANG, AND G. PIEPMEYER g R (k, R) has finite rank for some i ∈ Z. (iii) Tor i g R (k, M ) has finite (iv ) There exists a finitely generated R-module M such that Tor i g R (M, R) = 0 holds for all i ∈ Z. rank for some i ∈ Z and Tor i Proof. The implications (i) =⇒ (ii) =⇒ (iii) =⇒ (iv ) are clear; see 2.3. Let M be a module as specified in (iv ); Theorem 3.11 yields G-dimR M < ∞. By a result of Holm [22, thm. 3.2], R is Gorenstein if idR M is also finite. Now it follows from Proposition 5.5 that R is Gorenstein.  5.7 Remark. Let R be a commutative noetherian local ring with residue field k, and let E denote the injective hull of k; it is a faithfully injective R-module. g R (k, k) and A computation based on Theorem A.8 shows that the ranks of Tor i i g (k, k) are simultaneously finite: Ext R g R (k, HomR (k, E)) g R (k, k) = rankk Tor rankk Tor i i g iR (k, k), E) = rankk HomR (Ext g iR (k, k) . = rankk Ext Combined with this equality of ranks, [5, thm. 6.4, 6.5, and 6.7] yield characterizations of regular, complete intersection, and Gorenstein local rings in terms of the g R (k, k). For example, R is regular if and only size of the stable homology spaces Tor i g R (k, k) = 0 holds for some (equivalently, all) i ∈ Z, and R is Gorenstein if if Tor i g R (k, k) has finite rank for some (equivalently, all) i ∈ Z. and only if Tor i Commutative rings. If R is commutative and p is a prime ideal in R, then the local ring Rp is a flat R-algebra, and for an Rp -module M it follows from 2.12 that g R (M, N ) are Rp -modules. the stable homology modules Tor i 5.8 Lemma. Let R be a commutative noetherian ring and let N be an R-module; let p be a prime ideal in R and let M be an Rp -module. For every i ∈ Z there is a natural isomorphism of Rp -modules, g R (M, N ) ∼ g Rp (M, Np ) . Tor = Tor i i g R (−, N ) = 0 implies Tor g Rp (−, Np ) = 0 for all prime ideals p in R. Hence, Tor i i ≃ ≃ Proof. Let N −−→ I be an injective resolution. Let P −−→ M be a projective resolution over Rp ; it is a flat resolution of M as an R-module. The second isomorphism below follows from Proposition A.4. ∼ (P ⊗R Rp ) ⊗R I P ⊗R I = p ∼ = P ⊗Rp (Rp ⊗R I) ∼ = P ⊗Rp (Rp ⊗R I) The computation gives P ⊗R I ∼ = P ⊗Rp Ip . = P ⊗Rp Ip ; similarly one gets P ⊗R I ∼ eR I ∼ e Rp Ip , and the desired isoNow (1.4.1) and the Five Lemma yield P ⊗ =P⊗ morphisms follow as Np → Ip is an injective resolution by Matlis Theory.  The proof of the next result is similar. Compared to Lemma 5.8 the noetherian hypothesis on R has been dropped, as it was only used to invoke Matlis Theory. STABLE HOMOLOGY OVER ASSOCIATIVE RINGS 17 5.9 Lemma. Let R be a commutative ring and let M be an R-module; let p be a prime ideal in R and let N be an Rp -module. For every i ∈ Z there is a natural isomorphism of Rp -modules, ∼ g Rp gR Tor i (M, N ) = Tori (Mp , N ) . g R (M, −) = 0 implies Tor g Rp (Mp , −) = 0 for all prime ideals p in R. Hence, Tor i i  5.10 Theorem. Let R be a commutative noetherian ring and let N be a finitely g R (−, N ) = 0 holds for some i ∈ Z, then idRp Np is generated R-module. If Tor i finite for every prime ideal p in R. R g p (−, Np ) = 0. It follows Proof. From the hypotheses and Lemma 5.8 one has Tor i from Proposition 5.5 that the local ring Rp is Gorenstein, or idRp Np is finite. g Rp (−, Np ) = 0 implies that However, if Rp is Gorenstein, then vanishing of Tor i pdRp Np is finite by Corollary 4.7 and Theorem 3.1, and then idRp Np is finite.  The next corollary is now immediate per the remarks in 5.2. 5.11 Corollary. A commutative noetherian ring R is Cohen–Macaulay if there is g R (−, N ) = 0 for some i ∈ Z.  a finitely generated R-module N 6= 0 with Tor i 5.12 Corollary. Let R be a commutative noetherian ring of finite Krull dimension. For a finitely generated R-module N , the following conditions are equivalent. (i) idR N is finite. g R (−, N ) = 0 for all i ∈ Z. (ii) Tor i g R (−, N ) = 0 for some i ∈ Z. (iii) Tor i Proof. The implications (i) =⇒ (ii) =⇒ (iii) are clear; see 2.3. Part (i) follows  from (iii) as idR N equals sup{idRp Np | p is a prime ideal in R} 6 dim R. 5.13 Remark. We do not know if the assumption of finite Krull dimension in g R (−, N ) implies that Corollary 5.12 is necessary. By Theorem 5.10, vanishing of Tor N is locally of finite injective dimension, but that does not imply finite injective dimension over R: Just consider a Gorenstein ring R of infinite Krull dimension. g R (−, R) vanishes for such a ring. On the other hand, we do not know if Tor 6. Comparison to Tate homology In this section we compare stable homology to Tate homology. We parallel some of the findings of Avramov and Veliche [5]. First we recall a few definitions. 6.1. An acyclic complex T of projective R◦ -modules is called totally acyclic if HomR◦ (T, P ) is acyclic for every projective R◦ -module P ; cf. 3.8. A complete ̟ ≃ projective resolution of an R◦ -module M is a diagram T −−→ P −−→ M , where ≃ ◦ T is a totally acyclic complex of projective R -modules, P −−→ M is a projective resolution, and ̟i is an isomorphism for i ≫ 0; see [33, sec. 2]. Let M be an R◦ -module with a complete projective resolution T → P → M . For an R-module N , the Tate homology of M and N over R are the k-modules d R (M, N ) = Hi (T ⊗R N ) for i ∈ Z; see Iacob [24, sec. 2]. Tor i 18 O. CELIKBAS, L. W. CHRISTENSEN, L. LIANG, AND G. PIEPMEYER 6.2. An R◦ -module has a complete projective resolution if and only if it has finite Gorenstein projective dimension; see [33, thm. 3.4]. If R is noetherian and M is a finitely generated R◦ -module with a complete projective resolution, then M has finite G-dimension and it has a complete projective resolution T → P → M with T and P degree-wise finitely generated and T → P surjective; see [33, 2.4.1] and [4, thm. 3.1]. 6.3 Lemma. Let M be an R◦ -module that has a complete projective resolution T → P → M . The following conditions are equivalent. (i) T ⊗R E is acyclic for every injective R-module E. d R (M, −) for all i ∈ Z. g R (M, −) ∼ (ii) There are isomorphisms of functors Tor = Tor i i Proof. Assume that T ⊗R E is acyclic for every injective R-module E. The pair (T, P ) is then a Tate flat resolution of M , see 3.8, and it follows from Theorem 3.10 d R (M, −) are isomorphic for all i ∈ Z. For g R (M, −) and Tor that the functors Tor i i the converse, let E be an injective R-module. By 2.3 one then has ∼ dR gR 0 = Tor i (M, E) = Tori (M, E) for all i ∈ Z, and hence H(T ⊗R E) = 0.  6.4 Theorem. Let R be noetherian, and let M be a finitely generated R◦ -module that has a complete projective resolution. There are isomorphisms of functors g R (M, −) ∼ d R (M, −) for all i ∈ Z . Tor = Tor i i Proof. The module M has a complete projective resolution T → P → M with T and P degree-wise finitely generated; see 6.2. The isomorphisms (3.9.1) show that the complex T ⊗R E is acyclic for every injective R-module E, and Lemma 6.3 finishes the argument.  6.5 Remark. The isomorphisms of homology modules in Theorem 6.4 actually follow from one isomorphism in D(k), but this is unapparent in the proof, which rests on Theorem 3.10. The finitely generated module M has a complete projective resolution T → L → M with T and L degree-wise finitely generated and T → L surjective; see 6.2. Thus the kernel K = Ker(T → L) is a bounded above complex of projective modules. Given a module N , let C be the cone as one would construct in 3.4. By Proposition 1.7(a) the complex K ⊗R C is acyclic, so that Lemma 3.5 and e R I) ≃ Σ−1 (L ⊗R C) ≃ Σ−1 (T ⊗R C). As in the proof above, 1.5(c) yield Σ−1 (L ⊗ T ⊗R E is acyclic, so Lemma 3.6 gives Σ−1 (T ⊗R C) ≃ T ⊗R N , and combining these isomorphisms in D(k) gives the desired one. Without extra assumptions on the ring, we do not know if stable homology agrees with Tate homology whenever the latter is defined. In general, the relation between stable homology and Tate homology is tied to an unresolved problem in Gorenstein homological algebra. Theorem 6.7 explains how. 6.6. An R◦ -module G is called Gorenstein projective if there exists a totally acyclic complex T of projective R◦ -modules with C0 (T ) ∼ = G; see 6.1. Similarly, an R◦ module G is called Gorenstein flat if there exists a totally acyclic complex T of flat R◦ -modules with C0 (T ) ∼ = G; see 3.8. STABLE HOMOLOGY OVER ASSOCIATIVE RINGS 19 6.7 Theorem. The following conditions on R are equivalent. (i) Every Gorenstein projective R◦ -module is Gorenstein flat. (ii) For every R◦ -module M that has a complete projective resolution there are g R (M, −) ∼ d R (M, −) for all i ∈ Z. isomorphisms of functors Tor = Tor i i Proof. Assume that every Gorenstein projective R◦ -module is Gorenstein flat. Let T → P → M be a complete projective resolution. It follows that T is a totally acyclic complex of flat modules; see Emmanouil [13, thm. 2.2]. Thus stable homology and Tate homology coincide by Lemma 6.3. For the converse, let M be a Gorenstein projective R◦ -module and let T be a totally acyclic complex of projective R◦ -modules with M ∼ = C0 (T ). Since there are R R ∼ g d isomorphisms of functors Tori (M, −) = Tori (M, −) for all i ∈ Z, it follows from 2.3 that T ⊗R E is acyclic for every injective R-module E. Thus T is a totally acyclic complex of flat R◦ -modules, and so M is Gorenstein flat.  6.8 Remark. As Holm notes [21, prop. 3.4], the obvious way to achieve that every Gorenstein projective R◦ -module is Gorenstein flat is to ensure that (1) the Pontryagin dual of every injective R-module is flat, and (2) that every flat R◦ -module has finite projective dimension. The first condition is satisfied if R is left coherent, and the second is discussed in Remark 2.8. A description of the rings over which Gorenstein projective modules are Gorenstein flat seems elusive; see [13, sec. 2]. Complete homology . In his thesis, Triulzi considers the J-completion of the homological functor TorR (M, −) = {TorR i (M, −) | i ∈ Z}. His construction is similar to Mislin’s P-completion of covariant Ext and Nucinkis’ I-completion of contravariant Ext. The resulting homology theory is called complete homology. Like stable homology, it is a generalization of Tate homology. We compare these two generalizations in [8]. From the point of view of stable homology, it is interesting to know when it agrees with complete homology, because the latter has a universal property. In this direction the main results in [8] are that these two homology theories agree over Iwanaga-Gorenstein rings, and for finitely generated modules over Artin algebras and complete commutative local rings. Moreover, the two theories agree with Tate homology, whenever it is defined, under the exact same condition; that is, if and only if every Gorenstein projective module is Gorenstein flat; see Theorem 6.7. Appendix We start by recalling the definition of stable cohomology. A.1. Let X and Y be R-complexes, following [5, 18] we denote by HomR (X, Y ) the subcomplex of HomR (X, Y ) with degree n term a HomR (X, Y )n = HomR (Xi , Yi+n ) . i∈Z It is called the bounded Hom complex, and the quotient complex ] R (X, Y ) = HomR (X, Y )/HomR (X, Y ) Hom is called the stable Hom complex. ≃ ≃ For R-modules M and N with projective resolutions PM −−→ M and PN −−→ N , the k-modules ExtiR (M, N ) = H−i (HomR (PM , PN )) , 20 O. CELIKBAS, L. W. CHRISTENSEN, L. LIANG, AND G. PIEPMEYER are called the bounded cohomology of M and N over R, and the stable cohomology modules of M and N over R are g i (M, N ) = H−i (Hom ] R (PM , PN )) . Ext R d i (M, N ) for the stable cohomolAvramov and Veliche [5] use the notation Ext R ogy; this notation is standard for Tate cohomology, which coincides with stable cohomology whenever the former is defined; see [5, cor. 2.4]. A.2 Proposition. Let X and Y be R-complexes. (a) If X or Y is bounded above, and HomR (Xi , Y ) is acyclic for all i, then the complex HomR (X, Y ) is acyclic. (b) If X or Y is bounded below, and HomR (X, Yi ) is acyclic for all i, then the complex HomR (X, Y ) is acyclic. Proof. Similar to the proof of Proposition 1.7.  Standard isomorphisms. We study composites of the functors Hom and ⊗. To the extent possible, we establish analogs of the standard isomorphisms for composites of Hom and ⊗; see [7, sec. II.5 and VI.5]. There seems to be no analog of Hom-tensor adjunction [7, prop. II.5.2]. The setup is the same for Propositions A.4–A.6; namely: A.3. Let X be a complex of R◦ -modules, let Y be a complex of (R, S ◦ )-bimodules, and let Z be a complex of S-modules. Under finiteness conditions, the unbounded tensor product is associative. A.4 Proposition. For complexes as in A.3, under either of the following conditions • X and Z are complexes of finitely presented modules • Y is a bounded complex there is an isomorphism of k-complexes, (X ⊗R Y ) ⊗S Z −→ X ⊗R (Y ⊗S Z) , and it is functorial in X, Y , and Z. Proof. For every n ∈ Z one has, ((X ⊗R Y ) ⊗S Z)n = Y Q j∈Z  Xj ⊗R Yi−j ⊗S Zn−i i∈Z and (X ⊗R (Y ⊗S Z))n = Y j∈Z Xj ⊗ R Q i∈Z  Yi−j ⊗S Zn−i , and from each of these modules there is a canonical homomorphism to YY YY (Xj ⊗R Yi−j ) ⊗S Zn−i ∼ Xj ⊗R (Yi−j ⊗S Zn−i ) . = i∈Z j∈Z j∈Z i∈Z If Y is bounded, then these homomorphisms are isomorphisms as the inner most products are finite. Recall, e.g. from [16, thm. 3.2.22], that the functor M ⊗R − commutes with products if M is finitely presented. Thus, the canonical homomorphisms are isomorphisms when X and Z are complexes of finitely presented modules. It is straightforward to verify that these isomorphisms commute with the differentials and form an isomorphism of complexes.  STABLE HOMOLOGY OVER ASSOCIATIVE RINGS 21 The model for the following swap isomorphism is [7, ex. II.4]. The proof is similar to the proof of Proposition A.4 and uses that the functor HomR (M, −) commutes with coproducts if M is a finitely generated R-module. A.5 Proposition. For complexes as in A.3, under either of the following conditions • X and Z are complexes of finitely generated modules • Y is a bounded complex there is an isomorphism of k-complexes, HomR◦ (X, HomS (Z, Y )) −→ HomS (Z, HomR◦ (X, Y )) , and it is functorial in X, Y , and Z.  The next result is an analog of [7, prop. VI.5.2 and VI.5.3]; it is used below to establish a duality between stable homology and stable cohomology. A.6 Proposition. Let X, Y , and Z be as in A.3, and assume further that X is a complex of finitely presented R◦ -modules. There is a morphism of k-complexes, X ⊗R HomS (Y, Z) −→ HomS (HomR◦ (X, Y ), Z) , and it is functorial in X, Y , and Z. Furthermore, it is an isomorphism if X is a complex of projective modules or Z is a complex of injective modules. Proof. For every n ∈ Z one can compute as follows, Y (Xi ⊗R HomS (Y, Z)n−i ) (X ⊗R HomS (Y, Z))n = i∈Z = Y Q (Xi ⊗R ∼ = HomS (Yj , Zn−i+j )) j∈Z i∈Z YY (Xi ⊗R HomS (Yj , Zn−i+j )) , i∈Z j∈Z where the isomorphism holds as the module Xi is finitely presented for every i ∈ Z; see [16, thm. 3.2.22]. On the other hand, for every n ∈ Z one has Y HomS (HomR◦ (X, Y ), Z)n = HomS (HomR◦ (X, Y )h , Zn+h ) h∈Z = Y HomS ( h∈Z ∼ = ` HomR◦ (Xi , Yi+h ), Zn+h ) i∈Z YY HomS (HomR◦ (Xi , Yi+h ), Zn+h ) YY HomS (HomR◦ (Xi , Yj ), Zn−i+j ) . h∈Z i∈Z = i∈Z j∈Z Now set (θXY Z )n = Q i∈Z Q i(n−j) θXi Yj Zn−i+j , j∈Z (−1) where θXi Yj Zn−i+j : Xi ⊗R HomS (Yj , Zn−i+j ) −→ HomS (HomR◦ (Xi , Yj ), Zn−i+j ) is the homomorphism of k-modules given by θXi Yj Zn−i+j (x ⊗ ψ)(φ) = ψφ(x). It is straightforward to verify that θXY Z is a morphism of k-complexes and functorial in X, Y , and Z. 22 O. CELIKBAS, L. W. CHRISTENSEN, L. LIANG, AND G. PIEPMEYER Finally, if each module Xi is projective or each module Zn−i+j is injective, then it follows from [7, prop. VI.5.2 and VI.5.3] that θXi Yj Zn−i+j is invertible for all i, j, n ∈ Z, and so the morphism θXY Z is invertible.  A.7 Lemma. Let P be a bounded below complex of finitely generated projective R◦ -modules and let X be a complex of R◦ -modules with H(X) bounded. For every injective k-module E, there is an isomorphism in the derived category D(k): ] R◦ (P, X), E) , e R Homk (X, E) −→ Σ Homk (Hom P⊗ and it is functorial in P , X, and E. Proof. Set (−)∨ = Homk (−, E). In the commutative square of k-complexes P ⊗R X ∨ τ / P ⊗R X ∨ ∼ = α θ  HomR◦ (P, X)∨ ϑ∨  / HomR◦ (P, X)∨ each horizontal morphism is (the dual of) a canonical embedding. The vertical map α is the isomorphism from Proposition A.6. The morphism θ is the standard evaluation map; it is a quasi-isomorphism by [2, 4.4(I)]. The square induces a morphism of triangles in the homotopy category: τ P ⊗R X ∨ / P ⊗R X ∨ γ ≃ θ ∼ = α  HomR◦ (P, X)∨  / HomR◦ (P, X)∨ ∨ ϑ / Σ(P ⊗R X ∨ ) / Cone τ ≃ Σθ  / Σ HomR◦ (P, X)∨  / Cone ϑ∨ The construction of γ is functorial in all three arguments, and it is a quasi-isomorphism because α and θ are quasi-isomorphisms. Recall, say from [17, III.3.4–5], that there are natural quasi-isomorphisms ∨ Cone ϑ eR X∨ Cone τ ≃ Coker τ = P ⊗ ∼ = Σ(Cone ϑ) ∨ ∨ ≃ Σ(Coker ϑ) and ] R◦ (P, X)∨ . = Σ Hom They yield the desired isomorphism in the derived category ] R◦ (P, X), E) . e R Homk (X, E) −→ Σ Homk (Hom P⊗ With regard to functoriality of γ, notice that a morphism between arguments, P → P1 say, induces the solid commutative square in the following diagram. ❴ ❴ ❴ ❴ ❴ ❴ ❴ ❴ ❴ ❴ ❴ ❴ ❴ ❴ ❴/ Coker τ1 Coker ✤ e❑τ❑ 8 ✤ ❑❑ rrr ✤ ✤ ❑❑ r r r ≃ ❑❑❑ ✤ ✤ rrr ≃ / ✤ ✤ Cone τ Cone τ1 ✤ ✤ γ γ1 ✤ ✤   ✤ ✤ ∨ ∨ / Cone(ϑ1 ) Cone ϑ ✤ ✤ ▲▲▲ tt ✤ ✤ ≃ tt ▲▲≃ t ▲▲▲ tt ✤ ✤ t ▲ %   zt ∨ ❴ ❴ ❴ ❴ ❴ ❴ ❴ ❴ ❴ ❴ ❴ ❴/ Σ(Coker ϑ) Σ(Coker ϑ1 )∨ STABLE HOMOLOGY OVER ASSOCIATIVE RINGS 23 Commutativity in the derived category of the dashed square is now a consequence. Functoriality in the other arguments is handles similarly.  The Lemma immediately yields a useful duality. A.8 Theorem. Let M and N be R◦ -modules and assume that M has a degreewise finitely generated projective resolution. For every injective k-module E and for every i ∈ Z there is an isomorphism of k-modules, g i ◦ (M, N ), E) ∼ g R (M, Homk (N, E)) , Homk (Ext = Tor R i and it is functorial in M , N , and E.  To prove the next two results one proceeds as in the proof of Proposition A.6. A.9 Proposition. Let X be a complex of finitely generated R-modules and let Y and Z be as in A.3. There is a morphism of k-complexes HomR (X, Y ) ⊗S Z −→ HomR (X, Y ⊗S Z) , and it is functorial in X, Y , and Z. Furthermore, it is an isomorphism under each of the following conditions • Z is a complex of finitely generated projective modules • X is a complex of finitely presented modules and Z is a complex of flat modules • X is a complex of projective modules  A.10 Proposition. Let X be a complex of R-modules, let Y be a complex of (R, S ◦ )-bimodules, and let Z be a complex of finitely presented S-modules. There is a morphism of k-complexes, HomR (X, Y ) ⊗S Z −→ HomR (X, Y ⊗S Z) , and it is functorial in X, Y , and Z. Furthermore, it is an isomorphism if X or Z is a complex of projective modules.  Pinched tensor products. Christensen and Jorgensen devised in [12] a pinched tensor product, − ⊗✶ R −, to compute Tate homology. In view of Theorem 3.10 their proof of [12, thm. 3.5] applies verbatim to yield the next result; we refer the reader to [12] for the definition of the pinched tensor product. A.11 Theorem. Let M be an R◦ -module that has a Tate flat resolution (T, F ), let A be an acyclic complex of R-modules and set N = C0 (A). For every i ∈ Z, there is an isomorphism of k-modules ✶ ∼ gR Tor i (M, N ) = Hi (T ⊗R A) .  The next corollary is an analogue of [12, Corollary 4.10]. A.12 Corollary. Let R be commutative and let M and N be Gorenstein flat Rmodules with corresponding totally acyclic complexes of flat modules T and T ′ , g R (M, N ) = 0 holds for all i ∈ Z, then T ⊗✶ T ′ is an acyclic respectively. If Tor i R complex of flat R-modules, and the following statements are equivalent: ′ (i) T ⊗✶ R T is a totally acyclic complex of flat R-modules. g R (M, N ⊗R E) = 0 holds for every injective R-module E and all i ∈ Z. (ii) Tor i 24 O. CELIKBAS, L. W. CHRISTENSEN, L. LIANG, AND G. PIEPMEYER ′ When these conditions hold, M ⊗R N is a Gorenstein flat R-module and T ⊗✶ RT is a corresponding totally acyclic complex of flat R-modules. ′ Proof. It follows from the definition of pinched tensor products that T ⊗✶ RT R g is a complex of flat R-modules, and if Tori (M, N ) = 0 holds for all i ∈ Z, then the complex is acyclic by Theorem A.11. It is totally acyclic if and only ′ ✶ ∼ if (T ⊗✶ R T ) ⊗R E = T ⊗R (T ⊗R E) is acyclic for every injective R-module E; g R (M, N ⊗R E) = 0 holds for every injective R-module E that is, if and only if Tor i and all i ∈ Z. Finally, it follows from the definition of pinched tensor products that ′ there is an isomorphism M ⊗R N ∼  = C0 (T ⊗✶ R T ). References [1] Maurice Auslander and Mark Bridger, Stable module theory, Memoirs of the American Mathematical Society, No. 94, American Mathematical Society, Providence, R.I., 1969. MR0269685 [2] Luchezar L. Avramov and Hans-Bjørn Foxby, Homological dimensions of unbounded complexes, J. Pure Appl. Algebra 71 (1991), no. 2-3, 129–155. MR1117631 [3] Luchezar L. Avramov, Srikanth B. Iyengar, and Joseph Lipman, Reflexivity and rigidity for complexes. I. Commutative rings, Algebra Number Theory 4 (2010), no. 1, 47–86. MR2592013 [4] Luchezar L. Avramov and Alex Martsinkovsky, Absolute, relative, and Tate cohomology of modules of finite Gorenstein dimension, Proc. London Math. Soc. (3) 85 (2002), no. 2, 393– 440. MR1912056 [5] Luchezar L. Avramov and Oana Veliche, Stable cohomology over local rings, Adv. Math. 213 (2007), no. 1, 93–139. MR2331239 [6] Hyman Bass and M. Pavaman Murthy, Grothendieck groups and Picard groups of abelian group rings, Ann. of Math. (2) 86 (1967), 16–73. MR0219592 [7] Henri Cartan and Samuel Eilenberg, Homological algebra, Princeton Landmarks in Mathematics, Princeton University Press, Princeton, NJ, 1999, With an appendix by David A. Buchsbaum, Reprint of the 1956 original. MR1731415 [8] Olgur Celikbas, Lars Winther Christensen, Li Liang, and Greg Piepmeyer, Complete homology over associative rings, Israel J. Math, to appear. Preprint arXiv:1501.00297 [math.RA]. [9] Lars Winther Christensen, Gorenstein dimensions, Lecture Notes in Mathematics, vol. 1747, Springer-Verlag, Berlin, 2000. MR1799866 [10] Lars Winther Christensen, Anders Frankild, and Henrik Holm, On Gorenstein projective, injective and flat dimensions—A functorial description with applications, J. Algebra 302 (2006), no. 1, 231–279. MR2236602 [11] Lars Winther Christensen and Henrik Holm, The direct limit closure of perfect complexes, J. Pure Appl. Algebra 219 (2015), no. 3, 449–463. MR3279365 [12] Lars Winther Christensen and David A. Jorgensen, Tate (co)homology via pinched complexes, Trans. Amer. Math. Soc. 366 (2014), no. 2, 667–689. MR3130313 [13] Ioannis Emmanouil, On the finiteness of Gorenstein homological dimensions, J. Algebra 372 (2012), 376–396. MR2990016 [14] Edgar E. Enochs, Sergio Estrada, and Alina C. Iacob, Balance with unbounded complexes, Bull. Lond. Math. Soc. 44 (2012), no. 3, 439–442. MR2966988 [15] Edgar E. Enochs and Overtoun M. G. Jenda, Copure injective resolutions, flat resolvents and dimensions, Comment. Math. Univ. Carolin. 34 (1993), no. 2, 203–211. MR1241728 [16] Edgar E. Enochs and Overtoun M. G. Jenda, Relative homological algebra, de Gruyter Expositions in Mathematics, vol. 30, Walter de Gruyter & Co., Berlin, 2000. MR1753146 [17] Sergei I. Gelfand and Yuri I. Manin, Methods of homological algebra, second ed., Springer Monographs in Mathematics, Springer-Verlag, Berlin, 2003. MR1950475 [18] François Goichot, Homologie de Tate-Vogel équivariante, J. Pure Appl. Algebra 82 (1992), no. 1, 39–64. MR1181092 [19] Shiro Goto, Vanishing of ExtiA (M, A), J. Math. Kyoto Univ. 22 (1982/83), no. 3, 481–484. MR0674605 [20] Laurent Gruson and Christian U. Jensen, Dimensions cohomologiques reliées aux foncteurs lim(i) , Paul Dubreil and Marie-Paule Malliavin Algebra Seminar, 33rd Year (Paris, 1980), ←− Lecture Notes in Math., vol. 867, Springer, Berlin, 1981, pp. 234–294. MR0633523 STABLE HOMOLOGY OVER ASSOCIATIVE RINGS 25 [21] Henrik Holm, Gorenstein homological dimensions, J. Pure Appl. Algebra 189 (2004), no. 1-3, 167–193. MR2038564 [22] Henrik Holm, Rings with finite Gorenstein injective dimension, Proc. Amer. Math. Soc. 132 (2004), no. 5, 1279–1283. MR2053331 [23] Thorsten Holm and Peter Jørgensen, Triangulated categories: definitions, properties, and examples, Triangulated categories, London Math. Soc. Lecture Note Ser., vol. 375, Cambridge Univ. Press, Cambridge, 2010, pp. 1–51. MR2681706 [24] Alina Iacob, Absolute, Gorenstein, and Tate torsion modules, Comm. Algebra 35 (2007), no. 5, 1589–1606. MR2317632 [25] Christian U. Jensen, On the vanishing of lim(i) , J. Algebra 15 (1970), 151–166. MR0260839 ←− [26] David A. Jorgensen and Liana M. Şega, Independence of the total reflexivity conditions for modules, Algebr. Represent. Theory 9 (2006), no. 2, 217–226. MR2238367 [27] Li Liang, Tate homology of modules of finite Gorenstein flat dimension, Algebr. Represent. Theory 16 (2013), no. 6, 1541–1560. MR3127346 [28] Masayoshi Nagata, Local rings, Interscience Tracts in Pure and Applied Mathematics, No. 13, Interscience Publishers a division of John Wiley & Sons New York-London, 1962. MR0155856 [29] Barbara L. Osofsky, Homological dimension and cardinality, Trans. Amer. Math. Soc. 151 (1970), 641–649. MR0265411 [30] Christian Peskine and Lucien Szpiro, Dimension projective finie et cohomologie locale. Applications à la démonstration de conjectures de M. Auslander, H. Bass et A. Grothendieck, Inst. Hautes Études Sci. Publ. Math. (1973), no. 42, 47–119. MR0374130 [31] Paul Roberts, Two applications of dualizing complexes over local rings, Ann. Sci. École Norm. Sup. (4) 9 (1976), no. 1, 103–106. MR0399075 [32] Paul Roberts, Le théorème d’intersection, C. R. Acad. Sci. Paris Sér. I Math. 304 (1987), no. 7, 177–180. MR0880574 [33] Oana Veliche, Gorenstein projective dimension for complexes, Trans. Amer. Math. Soc. 358 (2006), no. 3, 1257–1283. MR2187653 [34] Charles A. Weibel, An introduction to homological algebra, Cambridge Studies in Advanced Mathematics, vol. 38, Cambridge University Press, Cambridge, 1994. MR1269324 University of Missouri, Columbia, MO 65211, U.S.A. Current address: University of Connecticut, Storrs, CT 06269, U.S.A E-mail address: [email protected] Texas Tech University, Lubbock, TX 79409, U.S.A. E-mail address: [email protected] URL: http://www.math.ttu.edu/~ lchriste Lanzhou Jiaotong University, Lanzhou 730070, China E-mail address: [email protected] Columbia Basin College, Pasco, WA 99301, U.S.A. E-mail address: [email protected]
0math.AC
Journal of Machine Learning Research 1 (2015) 1-48 Submitted 1/15; Published 1/15 Inferring and Learning from Neuronal Correspondences Ashish Kapoor [email protected] Microsoft Research One Microsoft Way Redmond, WA 98052, USA arXiv:1501.05973v2 [q-bio.NC] 27 Jan 2015 E. Paxon Frady [email protected] Department of Neurobiology University of California San Diego, CA 92093, USA Stefanie Jegelka [email protected] Department of Electrical Engineering and Computer Science Massachusetts Institute of Technology Cambridge, MA 02139, USA William B. Kristan [email protected] Department of Neurobiology University of California San Diego, CA 92093, USA Eric Horvitz [email protected] Microsoft Research One Microsoft Way Redmond, WA 98052, USA Editor: TBD Abstract We introduce and study methods for inferring and learning from correspondences among neurons. The approach enables alignment of data from distinct multiunit studies of nervous systems. We show that the methods for inferring correspondences combine data effectively from cross-animal studies to make joint inferences about behavioral decision making that are not possible with the data from a single animal. We focus on data collection, machine learning, and prediction in the representative and long-studied invertebrate nervous system of the European medicinal leech. Acknowledging the computational intractability of the general problem of identifying correspondences among neurons, we introduce efficient computational procedures for matching neurons across animals. The methods include techniques that adjust for missing cells or additional cells in the different data sets that may reflect biological or experimental variation. The methods highlight the value harnessing inference and learning in new kinds of computational microscopes for multiunit neurobiological studies. Keywords: PCA Neurobiology, Metric Learning, Correspondence Matching, Probabilistic c 2015 Ashish Kapoor, Paxon Frady, Stefanie Jegelka, William B. Kristan and Eric Horvitz. Kapoor, Frady, Jegelka, Kristand and Horvitz 1. Introduction Neurobiologists have long pursued an understanding of the emergent phenomena of nervous systems, such as the neuronal basis for choice and behavior. Much research on neuronal systems grapples with the complex dynamics of interactions among multiple neurons. New techniques, such as calcium imaging, voltage-sensitive dye (VSD) imaging (Cacciatore et al., 1999; Gonzalez and Tsien, 1995) and multi-unit electrode recordings, enable larger views of nervous systems. However, for many experimental preparations, the amount of data that can be collected via tedious experiments is limited. As an example, data from voltagesensitive dyes are time-limited because of bleaching of the dyes and also neuronal damage caused by phototoxicity. We have developed methods for combining the data from multiple experiments to pool data on neural function. The approach allows us to make inferences from data sets that are impossible to obtain from individual preparations. Coalescing the data from multiple experiments is an intrinsically difficult problem because of the difficulty in matching cells and their roles across animals. Variation is observed in nervous systems of individual animals based on developmental differences as well as artifacts introduced in the preparation and execution of experiments. Developing a means for identifying correspondences in cells across animals would allow data to be pooled from multiple animals supporting deeper inferences about neuronal circuits and behaviors. We focus specifically on experimental studies of neurons composing the ganglia of H. verbana (Briggman et al., 2005). The leech has a stereotypical nervous system consisting of repeating packets of about 400 neurons. About a third of these neurons have been identified, and these neurons can be found reliably in different animals. The remaining twothirds of neurons have yet to be identified, but are believed to maintain similar properties and functional roles across animals. The general problem of correspondence matching of the cells of two different animals is illustrated in Figure 1. We seek to identify neurons that are equivalent across ganglia obtained from different animals. For example, the red cell in animal a has several candidate correspondences in animal b, but with varying degrees of similarity (indicated by shades of red). Ideally, we will find a one-to-one match via jointly considering multiple similarities. With only two animals, this problem can be mapped to a bipartite graph-matching task and can be solved optimally (Munkres, 1957). However, we want to jointly solve the matching task for larger numbers of animals. Such matching across multiple graphs defined by the individual nervous systems is an intractable problem in the NP-hard class (Papadimitriou and Steiglitz, 1982). In addition, the problem is even more difficult because such matching must also take into account variations in the numbers and properties of neurons observed in different animals. These variations can be due to both developmental differences (e.g., some neurons may be missing or duplicated) and experimental artifacts (e.g., some neurons may be out of the plane of focus or destroyed in the delicate dissection). A key challenge in this endeavor is the formulation of a similarity measure that takes into account physical parameters of cells, such as their size and location, as well as their functional properties. 2 Inferring and Learning from Neuronal Correspondences Figure 1: Challenge of identifying correspondence among neurons in ganglia from different animals. Given compatibility constraints, a correspondence algorithm seeks a oneto-one mapping between neurons in two H. verbana preparations. The goal is to find out correspondences between cells in each of the animals. The color coding illustrates compatibility constraints: Feasible matches for the highlighted red, green, and blue cells in animal 1 (c) are found in animal 2 (d), as indicated with matched colors. The degree of feasibility of the matches is depicted via shading of cells in animal b, where the most compatible cell for each source neuron in animal a is highlighted with a white border. Although the figure shows only two animals, such compatibility constraints occur 3 across all pairs of the 6 animals used. Kapoor, Frady, Jegelka, Kristand and Horvitz Table 1: The proposed algorithmic framework Step 1: Learn Compatibility Measure Step 2: Recover Correspondence Map Step 3: Infer Missing Data Given training data with pairs of match and non-match cells, estimate the parameter matrix A that defines the compatibility function f ab (i, j), between any ith and j th neurons for all animal pairs. Start with an initialized empty match set S0 . Iteratively determine the next best match Mt by solving equation 3 and update St = St−1 ∪ Mt . End when all the cells are matched. Construct the matrix Y that aggregates data from all the animals, where each row corresponds to cells and are permuted according to the matching. Use Probabilistic PCA on Y to infer the missing data. 2. Machine Learning Framework We use a set of neuronal data collected in Briggman et al. (2005), which consists of optical VSD recordings from populations of 123-148 neurons in a mid-body segmental ganglion from six different leeches. Earlier research on this data identified neurons involved in decisionmaking. In particular, the study aimed at understanding the roles of neuronal populations in decisions to swim or to crawl following stimulation. Sensory neurons (DP nerve) were stimulated in such a way that would elicit, with equal (0.5) likelihood, swimming or crawling. This previous study considered single cell activations and joint analysis of neurons using dimensionally reduction techniques of PCA and LDA. However, these techniques were limited to one animal at a time. In the current study, we propose a framework that analyzes data across-animals to increase the power of the analysis. Rather than using a handcrafted measure, we have employed a machine-learning framework that relies on supervised training data. This algorithm estimates an appropriate similarity function between neurons in different animals based on a training set of highconfidence correspondences. These correspondences are readily identified neurons in the nervous systems of H. verbana (Muller et al., 1981). An important capability of the algorithm is to take into account the probabilistic nature of inferred correspondences. The algorithm begins by learning a weighting function of relevant features that maximizes the likelihood of matches within the training set. The next step of the approach is to jointly solve the correspondence matching problem for neurons across animals, while considering potential missing or extra cells in each animal. The final step is to consider correspondences with functions that fill in missing data. As we will demonstrate below, pooling neurophysiological data from multiple studies in a principled manner leads to larger effective data with greater statistical power than the individual studies. 4 Inferring and Learning from Neuronal Correspondences Specifically, the pipeline for the methodology includes three steps (detailed in Table 1): (1) Determining a similarity score across pairs of cells, (2) recovering correspondences that are consistent with the similarity measure, and (3) estimating missing data. We describe these steps in detail below: 2.1 Learning Similarity Measure for Cells The goal in Step 1 is to learn a similarity function f ab (i, j) indicating the feasibility of a match between the ith cell in animal a and the j th cell in animal b. The most desirable characteristic for such a function is a high positive value for likely matches and diminishing values for poor matches. Such a characteristic is captured by the exponentiation of a negative distance measure among sets of features that represent multiple properties of cells. Formally: f ab (i, j) = e−[φ(i,a)−φ(j,b)] T A[φ(i,a)−φ(j,b)] (1) Here, φ(·) are d dimensional feature representations for the individual cells for each animal and summarizes physical (e.g., size, location etc.) and functional (e.g., optical recordings) properties. A is a d × d parameter matrix with positive entries that are learned from data. Intuitively, the negative log of the similarity function is a distance function between the feature representations: a zero distance between two feature vectors result in highest similarity measure of 1, whereas representations at further distance away in the feature space have a diminishing value. The matrix A parameterizes this distance measure. Given training data consisting of several probable pairs of matched neurons, we use A to solve an optimization problem. We describe the details below. The following list of features were used in our work: • Structural features: Absolute position of the cell with respect to the entire observed frame, relative position of cell in relation to the entire ganglion, absolute size of the cell in pixels, indicator vector specifying packet the neuron is located in (among Central, Left Anterior, Left Posterior, Right Anterior, Right Posterior or Central Posterior packet), and relative position coordinate of the neuron in its respective packet. • Functional features: Coherence of electrophysiological observations with swim oscillations and single cell discrimination time (see Briggman et al. (2005)) that distinguishes from swim versus the crawl behavior. Intuitively, the optimization problem finds the parameter A that minimizes the distance between pairs of cells that were tagged as matches, while maximizing the distance among other pairs. Formally, parameter A of the compatibility measure is estimated by minimizing the objective: X X X A∗ = arg min [−2 log f ab (i, j) + log f ab (i, j 0 ) + log f ab (i0 , j)] (2) A i,j j 0 ∈b,j 0 6=j i0 ∈a,i0 6=i subject to the constraint that all entries of A are positive. The sum is over all the labeled training pairs (i, j) tagged as likely matches. Intuitively the first term −2 log f ab (i, j) in the objective prefers solutions that would collapse the distance between matched pairs to 5 Kapoor, Frady, Jegelka, Kristand and Horvitz zero, while the rest of the terms prefer a solution where the distance between the rest of the cells are maximized. The optimization is straightforward and a simple gradient descent will always find a locally optimal solution. Note that a more appropriate constraint is positive semi-definite condition on A, however we suggest using a non-negativity constraint due to simplicity in optimization with almost no reduction in performance of the pipeline. 2.2 Correspondence Matching In a second step, we calculate the correspondence matches across all the animals. Instead of calculating all the matches simultaneously, the framework follows an iterative procedure: future matches are made not only by using the similarity function, but also by comparing the geometric and structural relationship of the candidates to the past matches. Besides considering the distances induced by the similarity function (i.e. − log f ab (i, j)), and unlike past work on graph matching (Williams et al., 1997; Bunke, 2000), the proposed method utilizes knowledge of landmarks by inducing constraints that impose topological and geometric invariants. This match-making algorithm considers the iteration t and denotes the set of already determined matches by St . The algorithm then determines Mt+1 , the next set of neurons from all the animals to be matched by solving the following optimization task: X Mt+1 = arg min − log f ab (i, j) + λDLM (i, j, St ) (3) M all pairs(i,j)∈M Here λ is the trade-off parameter that balances the compatibility measure with landmark distances DLM (·) from the matches recovered in all the prior iterations. The landmark distance computation provides important structural and topological constraints for solving the correspondence tasks. Given anchor points, the landmark distances attempt to capture structural and locational relationship with respect to the available landmarks. There are several options such as commute distance (McKay, 1981; Lovasz, 1993) on a nearest-neighbor graph, or Euclidean distance computed by considering either the locations or the feature representation of the neurons. In our experiments, we compute landmark distances between neuron i in animal a and neuron j in animal b with respect to a set of anchor points S as: X X DLM (i, j, S) = log f aa (i, i0 ) − log f bb (j, j 0 ). (4) i0 ∈S j 0 ∈S The optimization problem in the above equation is solved using off-the-shelf energy minimization procedures (Boykov et al., 2001; Minka, 2005). The set of the newly discovered matches are then included and the process is repeated until all matches stay the same (settle). Essentially, the goal is to find a set of matched neurons across all the animals such that objective function is minimized. We start with a reasonable initialization of solution (for example by solving for consecutive pairs of animals). This solution is iteratively refined by considering data drawn from one study at a time and searching for a replacement neuron which would lower the total energy. Such replacements continue until no further minimization is observed. Utilizing landmarks are appropriate as an informative signal for matching neurons in the leech, because there is a typified geometric structure. Although soma positions do vary from animal to animal, often certain somas remain arranged with particular geometrical 6 Inferring and Learning from Neuronal Correspondences Figure 2: Cell correspondences inferred across six H. verbana. Graphics show results of the correspondence matching procedure across six animals. Color coding indicates the correspondences, where matched cells across different animals share the same color. We highlight two cells (depicted as 1 and 2) and show the matches as lines linking neurons across the animals. Several cells remain unmatched and are depicted using the dashed lines (unfilled interior). The algorithm is capable of handling partial matches where cells are not present in all the six animals due to true structural differences or losses either in their preparation or in their sensing. relationships. For instance the Nut and AE cells typically form a box-like pattern, the N and T sensory neurons usually will be arranged in a hemi-circle along the packet edge, which often will wrap around the AP cell. These types of arrangements are useful for identification of cells by eye, and we extend our algorithm to utilize these relationships. The framework is extended to handle poor matches and missing cells by considering a sink cell in every animal. The sink cell has a fixed cost of matching, denoted as c, and acts as a threshold such that neuron matches with costs greater than c are disallowed. The sink cells are a soft representation of the probability that a particular neuron was not visible during a given preparation. 2.3 Pooling Across Animals Finally in the third step, the framework reconstructs data corresponding to cells that are missing and remain unobserved in some animals. In particular, if we consider the elec7 Kapoor, Frady, Jegelka, Kristand and Horvitz Figure 3: Computed canonical ganglion for H. verbana derived from the correspondence matching algorithm. We used the results of the correspondence matching algorithm to generate an average or canonical ganglion by computing mean location and size for each cell that was matched across at least three different animals. The shades of neurons are colored according to the weight determined by an LDA projection that would distinguish between swim and crawl models (brighter color mean higher weight; the colors used were arbitrary). trophysiological activity for unobserved cells as latent random variables, then we can infer those latent variables by exploiting the fact that they were observed in other animals. Once we have correspondence information across animals, we can fill in missing electrophysiological data. Formally, we invoke data completion via Probabilistic Principle Component Analysis (PPCA) (Roweis, 1998; Tipping and Bishop, 1999). To apply PPCA, we construct a matrix Y, where each row corresponds to a neuron and each column corresponds to the fluorescence intensity in a short time interval. Further, since the correspondences between all the animals are calculated, we can stack the data from all the animals in Y such that the rows are arranged according to the discovered correspondences. (we use -1 to denote absence of data due to missing cells in an animal). The PPCA algorithm recovers the low dimensional structure in the data, and inserts missing data via Expectation Maximization 8 Inferring and Learning from Neuronal Correspondences (Dempster et al., 1977). The PPCA algorithm starts with an initialized low-dimensional projection and alternates between the E-step and the M-step. The E-step is where the missing data is estimated by considering statistical relationships in the data. The M-step is where the estimates of the low-dimensional projection are further refined. Consider the matrix Y (dimensions c × n), which consists of neuronal activity recordings of c cells from all the animals, is constructed using the methodology described in text above. We then first scale all the values in the matrix Y between 0 and 1. Lets denote the lowdimensional representation of the data as matrix X (dimensions k × n, where k < c) and the principal components as C (dimensions c × k). The PPCA algorithm first initializes the matrices X and C randomly and then alternates between the following two steps: E-step: Estimate Ŷ = CX T T M-step: Refine Xnew = (C T C)−1 C T and Cnew = Ŷ Xnew (Xnew Xnew )−1 The algorithm converges when the maximum change in any of individual dimensions of estimates Y is less than 0.001. PPCA is guaranteed to converge so that it produces data completion even for neurons that are not observed in some animals. In our implementation, optimization for Step 1 (see Table 1) is performed via Limited Memory BFGS (Liu and Nocedal, 1989) routine and energy minimization for the above Equation is performed via iterative variational inference (Beal, 2003). There are three parameters that need to be specified in the framework: c the upper limit on cost of allowed matches, the trade-off parameter between compatibility and relative locality measure, and k the dimensionality of the low dimensional projection in PPCA. These parameters are determined via a cross-validation methodology. The cross validation is performed out by considering the aggregated matrix Y , randomly reducing 10% of the observed data, and considering the reconstruction error using an L2 norm on the removed data. This process is repeated 10 times and parameters with minimum average reconstruction error are chosen. The search space for parameters c and λ lie in log-scale (i.e. c and λ ∈ [10−5 , 10−4 , .., 105 ]), while for k we try in a linear range (i.e. k ∈ [1, .., 25]). 3. Experiments Training data for learning the parameter A was collected by an experimentalist (EPF) who hand-annotated 815 different match pairs across all the animals. Fig. 1 shows the resulting compatibility measure for these data. Note how the physical properties (such as size, relative location, packet membership) of the most likely matches (highlighted by a white outline) illustrate the quality of the learned function. The matching procedure results in a correspondence map (Fig 2.) matching neurons across the 6 different animals. Once the correspondence map was calculated, it was used to generate a prototypic model of animal by averaging physical as well as functional properties (Fig. 3). Because the resulting correspondence map was computed simultaneously across all the animals, it provides a simple way to analyze the quality of the recovered solution. In addition to the physical properties, the functional characteristics of any two matched neurons across different animals are similar across animals (Figure 4). We observed that a simple estimator 9 Kapoor, Frady, Jegelka, Kristand and Horvitz Figure 4: Activity of neurons in a leech ganglion from prior study (Briggman et al., 2005), showing how their neuronal activity can be used to identify homologous neurons across animals. Voltage-sensitive dye traces from two different neurons that were considered to be matches by the correspondence matching algorithm. The traces highlight that the algorithm has the capability of recovering correspondence across cell that are functionally similar. based on average activity of neurons in five animals predicted the activity of the sixth one (Figure 5). Here we estimated the entire time series of activity for a given cell in an animal by considering the activity for the corresponding cell across the rest of the five animals. Two different models for swim and crawl mode are computed where the prediction is performed by computing an average across all the observed time-series. For all six animals, lower differences between the observed electrophysiological activity and predictions made by a model learned from rest of the animals confirm that the framework had recovered correct correspondences between the neurons across animals. Although the matching algorithm performs quite well, it is likely that the algorithm is far from perfect. Many of the matched cells may not be correct. Since the functional responses of the cells are a factor for the matching, cells with little functional signal will be harder to match than those with big signals. Cells lacking functional signal, however, are not providing a lot of information for predicting behavioral outcome. Thus, these cells likely have poor matches, but are also likely the cells which are non-relevant to the swim-crawl decision circuit. It is also possible that many cells are effectively the same given this data set, but the matches do not truly reflect homologous pairs. We expect many cells to be functionally the same and mismatching these similar cells may not hurt our analysis. The correspondence matching algorithm enables pooling of the data across animals, which allows exploration that was not feasible previously. For example, Figure 6 shows 10 Inferring and Learning from Neuronal Correspondences Figure 5: Bar graphs that highlight the results to test the recovered correspondence using a leave-one-animal-out analysis. The plots were generated by first considering a candidate test animal and then building a predictive model for each cell (from when the animal swam or crawled) using the remaining five animals. The bar-chart compares mean-squared error between predicted and observed electrophysiological activity when matching using the proposed framework with random selection. The differences across all of the six leave-one-animal-out test cases are significant. a 3-dimensional projection recovered by applying ISOMAP (Tenenbaum et al., 2000), a non-linear dimensionality reduction method that is an extension to linear methods such as PCA. Because the algorithm was applied to the entire pooled data, the recovered dimensions are consistent across all the animals, and thus can be visualized and analyzed within the same reference frames. Previously application of such techniques (such as PCA and LDA in (Briggman et al., 2005)) was limited to a single animal at a time resulting in dimensions which were incomparable across animals. The pooling of data enabled by methodology proved to be valuable in predictive models of decision making. Figure 7 shows that pooling the data across animals enable earlier predictions of one of the two behaviors (swimming or crawling) following stimulation than data from a single animal. Specifically, PCA was performed on pooled data and earliest discrimination time between swim and crawl was determined according the procedure described in (Briggman et al., 2005). In Figure 3, we highlight cells in the composed canonical ganglion that play an important role in the behavioral decisions of the animal. Combining data across multiple animals enables transfer and overlay of information, allowing aggregation of important statistical parameters and more robust empirical models. Figure 8 shows ganglion maps for six animals highlighting cells that contribute most towards discrimination amongst the swim and the crawl trials. Note that the highly discriminative cells (towards the red spectrum) are consistent in physical properties such as location and size across the different animals. We also note that these cells are significantly different from cell 208 that was identified in earlier studies (Briggman et al., 2005). 11 Kapoor, Frady, Jegelka, Kristand and Horvitz Figure 6: Using correspondences to predict behavior from neuronal activity. Identification of corresponding neurons across animals enables larger data sets to be constructed by pooling observations from multiple preparations, which in turn enable deeper and more accurate data analysis to address questions of interest. This figure shows Non-linear projections generated by applying the ISOMAP algorithm. The blue and red dots correspond to swim and crawl mode and depict the trajectory that the voltage-sensitive dye trajectories take for each animal. Note that ISOMAP applied for an individual animal might result in projections that are inconsistent across the different animals. However, using the discovered correspondences of neurons across animals, we combine the data from all six animals, and recover projections that are consistent for all of the animals. 4. Related Work The work described in this paper builds upon many different sub-areas of machine learning. In particular, the key ingredients include metric learning, correspondence matching and probabilistic dimensionality reduction (Roweis, 1998; Tipping and Bishop, 1999). Distance metric learning is a fairly active research area. Most of the work in distance metric learning focus on K-Nearest Neighbor (k-NN) classification scenario (Duda et al., 2001) and often aim to learn a Mahalanobis metric that is consistent with the training data (Frome et al., 2007; Bar-Hillel et al.; Weinberger et al., 2006; Davis et al., 2006). The distance metric learning method employed in this paper is closest to the work of Goldberger et al. (2005) and Globerson and Roweis (2006), but modified to just consider the sets of similar cells given by the user. 12 Inferring and Learning from Neuronal Correspondences Figure 7: Bar graphs showing that pooled data allows us to discriminate between swim and crawl significantly earlier than what was reported earlier using a PCA analysis on data from a single animal (Briggman et al., 2005). Correspondence problems are employed in a multitude of applications. Computer vision is particularly closer to our scenario. Among the simplest are transformations of rigid bodies, where geometry can be exploited (Goodrich and Mitchell, 1999; McAuley et al., 2008), while correspondences among non-rigid objects, and between non-identical objects, can pose significant challenges. Algorithms applied to more general correspondence problems largely combine the compatibility of points by features with the local geometric compatibility of matches. Such models can be formulated as graphical models (McAuley et al., 2008; Torresani et al., 2008; Starck and Hilton, 2007) or as selecting nodes in an association graph (Cho et al., 2010; Cour et al., 2006), and have been extended to higher-order criteria (Duchenne et al., 2009; Zass and Shashua, 2008; Lee et al., 2011). Other methods consider the Laplacian constructed from a neighborhood graph (Umeyama, 1988; Escolano et al., 2011; Mateus et al., 2008), and some models are learned from full training examples (Torresani et al., 2008). Closest to the idea of using reference points are approaches based on seed points (Sharma et al., 2011), landmarks (Jegelka et al., 2014), coarse-to-fine strategies (Starck and Hilton, 2007), and on guessing points that help orient the remaining points in a rigid body (McAuley and Caetano, 2012). 13 Kapoor, Frady, Jegelka, Kristand and Horvitz 5. Conclusion and Future Work The proposed methodology is likely to be even more useful in combination with other data-centric analyses. For example, the model learned from past data can be employed to guide future experimentation. By computing correspondences between the model and and data from an ongoing experiment in real-time, we can then use the model to guide information extraction strategies. The methodology can also be extended to perform withinleech analysis, such as discovering bilateral pairs of neurons. In addition, this methodology can readily be used to analyze the simultaneous activity of multiple neurons in other animals. We foresee valuable uses of the approach in overlaying data from larger nervous systems and, moving beyond cells, to higher-level abstractions of nervous system organization, such as components of retina or columns in vertebrate nervous systems. Given its simplicity and the appeal of potentially pooling large quantities of data, the correspondence methodology may find wide use in many areas of neuroscience. Acknowledgments We acknowledge the assistance of Johnson Apacible, Erick Chastain and Paul Koch. References A. Bar-Hillel, T. Hertz, N. Shental, and D. Weinshall. Learning a mahalanobis metric from equivalence constraints. Journal of Machine Learning Research. M. J. Beal. Variational algorithms for approximate bayesian inference. University College London, 2003. Y. Boykov, O. Veksler, and R. Zabih. Fast approximate energy minimization via graph cuts. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2001. K. L. Briggman, H. D. I. Abarbanel, and W. B. Kristan. Optical imaging of neuronal populations during decision-making. Science, 11, 2005. H. Bunke. Recent developments in graph matching. 2000. T. W. Cacciatore, P. D. Brodfuehrer, J. E. Gonzalez, T. Jiang, S. R. Adams, R. Y. Tsien, W. B. Kristan Jr., and D. Kleinfeld. Identification of neural circuits by imaging coherent electrical activity with fret-based dyes. Neuron, 23, 1999. Y. Cho, J. Lee, and K. M. Lee. Reweighted random walks for graph matching. In European Conference on Computer Vision, 2010. T. Cour, P. Srinivasan, and J. Shi. Balanced graph matching. In Advances in Neural Information Processing Systems, 2006. J. Davis, B. Kulis, P. Jain, S. Sra, and I. Dhillon. Information-theoretic metric learning. In International Conference on Machine Learning, 2006. 14 Inferring and Learning from Neuronal Correspondences A. Dempster, N. Laird, and D. Rubin. Maximum-likelihood from incomplete data via the em algorithm. Journal of Royal Statistical Society Series B, 39, 1977. O. Duchenne, F. Bach, I. Kweon, and J. Ponce. A tensor-based algorithm for high-order graph matching. In Computer Vision and Pattern Recognition, 2009. R. O. Duda, P. E. Hart, and D. G. Stork. Pattern Classification. John Wiley and Sons, 2001. F. Escolano, E. Hancock, and M. Lozano. Graph matching through entropic manifold alignment. In Computer Vision and Pattern Recognition, 2011. A. Frome, Y. Singer, and J. Malik. Image retrieval and classification using local distance functions. In Advances in Neural Information Processing Systems, 2007. A. Globerson and S. Roweis. Metric learning by collapsing classes. In Advances in Neural Information Processing Systems, 2006. J. Goldberger, S. Roweis, G. Hinton, and R. Salakhutdinov. Neighbourhood components analysis. In Advances in Neural Information Processing Systems, 2005. J. E. Gonzalez and R. Y. Tsien. Voltage sensing by fluorescence resonance energy transfer in single cells. Biophysical Journal, 1995. M.T. Goodrich and J.S.B. Mitchell. Approximate geometric pattern matching under rigid motions. IEEE Transactions on Pattern Analysis and Machine Intelligence, 21(4):371– 379, 1999. S. Jegelka, A. Kapoor, and E. Horvitz. An interactive approach to solving correspondence problems. International Journal of Computer Vision, 108, 2014. J. Lee, M. Cho, and K. M. Lee. Hyper-graph matching via reweighted random walks. In Computer Vision and Pattern Recognition, 2011. D. C. Liu and J. Nocedal. On the limited memory method for large scale optimization. Mathematical Programming B, 1989. L. Lovasz. Random walks on graphs: a survey. Combinatorics: Paul Erdos is Eighty, 2, 1993. D. Mateus, R. Horaud, D. Knossow, F. Cuzzolin, and E. Boyer. Articulated shape matching using laplacian eigenfunctions and unsupervised point registration. In Computer Vision and Pattern Recognition, 2008. J. McAuley and T. Caetano. Fast matching of large point sets under occlusion. Pattern recognition, 45, 2012. J.J. McAuley, T.S. Caetano, and M. S. Barbosa. Graph rigidity, cyclic belief propagation and point pattern matching. IEEE Transactions on Pattern Analysis and Machine Intelligence, 30(11):20472054, 2008. 15 Kapoor, Frady, Jegelka, Kristand and Horvitz B. D. McKay. Practical graph isomorphism. Congressus Numerantium, 1981. T. P. Minka. Divergence measures and message passing. Microsoft Research Technical Report, 2005. J. Munkres. Algorithms for the assignment and transportation problems. Journal of the Society for Industrial and Applied Mathematics, 5, 1957. C. Papadimitriou and K. Steiglitz. Combinatorial optimization: Algorithms and complexity. Prentice Hall, Englewood Cliffs, NJ, 1982. S. Roweis. Em algorithms for pca and spca. 1998. A. Sharma, R. P. Horaud, J. Cech, and E. Boyer. Topologically-robust 3d shape matching based on diffusion geometry and seed growing. In Computer Vision and Pattern Recognition, 2011. J. Starck and A. Hilton. Correspondence labelling for wide-timeframe free-form surface matching. In International Conference on Computer Vision, 2007. J. B. Tenenbaum, V. de Silva, and J. C. Langford. A global geometric framework for nonlinear dimensionality reduction. Science, 2, 2000. M. E. Tipping and C. M. Bishop. Journal of the Royal Statistical Society, 61, 1999. L. Torresani, V. Kolmogorov, and C. Rother. Feature correspondence via graph matching: Models and global optimization. In European Conference on Computer Vision, 2008. S. Umeyama. An eigendecomposition approach to weighted graph matching problems. IEEE Transactions on Pattern Analysis and Machine Intelligence, 10(5), 1988. K. Weinberger, J. Blitzer, , and L. Saul. Distance metric learning for large margin nearest neighbor classification. In Advances in Neural Information Processing Systems, 2006. M. L. Williams, R. C. Wilson, and E. R. Hancock. Multiple graph matching with bayesian inference. Pattern Recognition Letters, 18, 1997. R. Zass and A. Shashua. Probabilistic graph and hypergraph matching. In Computer Vision and Pattern Recognition, 2008. 16 Inferring and Learning from Neuronal Correspondences Figure 8: Determining influential cells using linear discriminant analysis. The ganglion maps from 6 experiments are shown. The maps are from the same experiments as in Fig. 4. Cells are color-coded based on the magnitude of the contribution to the linear discriminant direction. Red and yellow represent large magnitude contributions, blue represents small contributions. We can see that there are at 17 do not include cell 208 (marked using white least 3 cells that are influential and arrow).
5cs.CE
Strongly verbally closed groups Andrey M. Mazhuga arXiv:1707.02464v2 [math.GR] 18 Jul 2017 Faculty of Mechanics and Mathematics Moscow State University Moscow 119991, Leninskie gory, MSU [email protected] Abstract It was recently proven that all free and many virtually free verbally closed subgroups are algebraically closed in any group. We establish sufficient conditions for a group that is an extension of a free non-abelian group by a group satisfying a non-trivial law to be algebraically closed in any group in which it is verbally closed. We apply these conditions to prove that the fundamental groups of all closed surfaces, except the Klein bottle, and almost all free products of groups satisfying a non-trivial law are algebraically closed in any group in which they are verbally closed. 1 Introduction A subgroup H of a group G is called verbally closed (in G) [8] (see also [10], [11], [4], [7]) if any equation of the form w(x1 , . . . , xn ) = h, where w(x1 , . . . , xn ) ∈ Fn (x1 , . . . , xn ) and h ∈ H, having a solution in G has a solution in H too. A subgroup H of a group G is called algebraically closed (in G) if any system of equations of the form {w1 (x1 , . . . , xn , H) = 1, . . . , wm (x1 , . . . , xn , H) = 1}, where wi (x1 , . . . , xn , H) ∈ Fn (x1 , . . . , xn ) ∗ H, having a solution in G has a solution in H too. A subgroup H of a group G is called retract (of G) if G is a semidirect product of a normal subgroup N and H (i.e. G = N ⋊ H). It is easy to see that any retract is an algebraically closed subgroup and any algebraically closed subgroup is a verbally closed subgroup. Thus, the question naturally arises: under what conditions on a subgroup H and a group G the revers implications hold. It is known (see, e.g., [4]) that both of these reverse implications do not hold in general. The following was established in [8] R1) if G is finitely presented and H is a finitely generated algebraically closed subgroup in G, then H is a retract of G; R2) if G is finitely generated over H † and H is a equationally Noetherian‡ algebraically closed subgroup in G, then H is a retract of G. The work of the author was supported by the Russian Foundation for Basic Research, project no. 15-01-05823. A group G is finitely generated over H if G = hH, Xi for some finite subset X ⊆ G. ‡ A group H is equationally Noetherian if any system of equations with coefficients from H and finitely many unknowns is equal to its finite subsystem. † 1 For the class of verbally closed subgroups, no similar structural descriptions in known. However, in finitely generated free groups (see [8]) and finitely generated free nilpotent groups (see [11]) the situation is rather simple: verbally closed subgroups, algebraically closed subgroups and retracts are the same things. In article [4], the following theorem was established Theorem [4]. Let G be any group and let H be its verbally closed virtually free infinite non-dihedral† subgroup containing no infinite abelian noncyclic subgroups. Then 1) H is algebraically closed in G; 2) if G is finitely generated over H, then H is a retract of G. We call H a strongly verbally closed group if H is an algebraically closed subgroup in any group containing H as a verbally closed subgroup. Notice, that the first assertion of the given above theorem describes a certain class of strongly verbally closed groups (in particular, all non-trivial free groups belong to this class). Abelian groups is another class of strongly verbally closed groups (see Corollary 4). In this article we establish sufficient conditions for a group H that is an extension of a free nonabelian group by a group satisfying a non-trivial law‡ to be strongly verbally closed. These conditions can be used to establish strong verbal closedness of rather wide class of groups. For instance, is Section 2 we apply them to prove the following C1) the fundamental groups of all closed surfaces, except the Klein bottle, are strongly verbally closed; C2) if Hi , i = 1, . . . , n, n ≥ 2 are non-trivial groups satisfying a non-trivial law and H = H1 ∗· · ·∗Hn 6≃ D∞ , then H is strongly verbally closed. Notice, that any fundamental group H of a closed surface is linear because it admits faithful representation in PSL2 (R) (see, e.g., [2]), and it is well-known that PSL2 (R) is linear. Therefore, H is equationally Noetherian [1]. Thus, from C1) and R2) we have Theorem. If H is the fundamental group of a closed surface, which is not the Klein bottle, then H is a retract of any finitely generated over H group containing H as a verbally closed subgroup. Before proceeding to the formulation of the main result, we introduce some notation. The symbol hxi∞ means an infinite cyclic group generated by x. The symbols IA (H) and IA (hxi∞ ) mean the verbal subgroups of H and hxi∞ generated by a word IA †† , respectively. The symbol IA (H)hxi∞ ∗IA (H) means the normal closure of IA (H) in hxi∞ ∗ IA (H). The symbols Z(H) and H ′ mean the center and the derived subgroup of H, respectively. Main Theorem. If a group H such that there exists T1) a short exact sequence of groups 1 → F → H → A → 1 such that F is a free non-abelian group and A is a group satisfying a non-trivial law IA ; T2) a divisible subgroup Q of H such that Q ⊆ Z(H) and Q ∩ H ′ = {1}; † for an infinite group, non-dihedral means non-isomorphic to the free product of two groups of order two. Let I(x1 , . . . , xr ) be an element of the free group Fr (x1 , . . . , xr ) with a basis x1 , . . . , xr , then we say that a group G satisfies the law I if I(g1 , . . . , gr ) = 1 in G for all g1 , . . . , gr ∈ G. †† Let I(x1 , . . . , xr ) be an element of the free group Fr (x1 , . . . , xr ) with a basis x1 , . . . , xr , then the verbal subgroup of a group G determined by I, I(G), is I(G) = hI(g1 , . . . , gr )| g1 , . . . , gr ∈ Gi . ‡ 2 T3) a generation set U = U −1 of H such that for any u ∈ U there are elements Eu,k (x, IA (H)) ∈ IA (hxi∞ ) · IA (H)hxi∞ ∗IA (H) , k = 1, . . . , nu such that the system of equations {Eu,k (x, IA (H)) = Eu,k (u, IA (H)) | k = 1, . . . , nu } has a unique solution in H/Q, then H is strongly verbally closed. Hence, to use this theorem one has to choose at one’s discretion: 1) a generating set U = U −1 of H, 2) a non-trivial law, IA , in A, 3) a central divisible subgroup Q of H such that Q ∩ H ′ = {1} (it can be shown that in this case Q is a direct factor of H, however, we will neither need or use this fact), 4) a set of words {Eu,k (x, IA (H)) | k = 1, . . . , nu } ⊂ IA (hxi∞ ) · IA (H)hxi∞ ∗IA (H) for each u ∈ U (note that these sets may differ for the different elements u ∈ U ). Now we want to draw the reader’s attention to the fact that at the definition of a strongly verbally closed group H verbal closedness of H (in some group G) is given as the assumption. We do not consider the question in which groups a given group H can be verbally closed, and we restrict ourselves to the following remark. It follows from Example 2 that any free group is strongly verbally closed. On the other hand Observation 1. If a group G has a generating set consisting of finite-order elements, then G does not have a verbally closed non-trivial free subgroup. Proof. Let Fr be a verbally closed free subgroup of G of rank r ≥ 1 and let S be a generating set of G consisting of finite-order elements. If r = 1, then Fr = hf i∞ for some f ∈ G \ {1}. Let s1 s2 · · · sm be a decomposition of f into the elements si ∈ S. Then, there is a natural number p ≥ 2 which is relatively prime to the orders, ordG (si ), of all the elements si of this decomposition. Consider the equation: xp1 xp2 · · · xpm = f. i This equation has a solution in G (it is easy to see that xi = sm i , where pmi ≡ 1 (mod ordG (si )) is a solution of the equation), but it has no solution in hf i∞ (since the element f is not a proper power in hf i∞ ). Thus, this contradicts the verbal closedness of H in G. If r ≥ 2, then Fr = hf i∞ ∗Fr−1 , for some f ∈ G\{1} and a free subgroup Fr−1 of G. The subgroup hf i∞ is verbally closed in Fr (since hf i∞ is a free factor of Fr , and a free factor is a retract), therefore (by the transitivity of verbal closedness), it is verbally closed in G and we again get a contradiction.  In Section 2 we discuss examples and corollaries showing how the Main Theorem can be applied. Section 3 contains the proof of the Main Theorem. Our argument is a refined and more sophisticated version of the proof of the Main Theorem of [4], but it also based on the use of Lee words [5]. Let us fix the notations. If k ∈ Z, x and y are elements of a group, then xy , xky , x−y and x−ky denote y −1 xy, y −1 xk y, y −1 x−1 y and y −1 x−k y, respectively. The derived subgroup and the center of a group G are denoted by G′ and Z(G), respectively. The commutator, [x, y], of two elements, x and y, of a group we define as x−1 y −1 xy. If X is a subset of a group G, then |X|, hXi and CG (X) mean the cardinality of X, the subgroup generated by X and the centralizer of X in G, respectively. Notations hxin , n ∈ N and hxi∞ mean a cyclic group of order n and an infinite cyclic group generated by an element x, respectively. The index of a subgroup H of a group G is denoted by (G : H). If A and B are subgroups of a group G, then A · B = hab|a ∈ A, b ∈ Bi. The symbol AB means the normal closure 3 of a subgroup A in a group B. The symbols A ∗ B, A ∗ B, A ⋊ B и A × B mean the free product of C groups A and B, a free product of groups A and B with the amalgamated subgroup C, a semidirect product of groups A and B and the direct product of groups A and B, respectively. Fn (x1 , . . . , xn ) or Fn is the free group of rank n (with a basis x1 , . . . , xn ). Sometimes instead of a notation x1 , . . . , xn we use an abridged notation x rewriting, for example, w(x1 , . . . , xn ) as w(x) or Fn (x1 , . . . , xn ) as F (x). 2 Examples and Corollaries The following example has no particular theoretical interest and was included to demonstrate how the Main Theorem can be applied to a concrete group. Example 1. The group H = F2 (b, c) ⋊ hai2 , where F2 (b, c) is the free group freely generated by b, c and ba = b−1 , ca = c is strongly verbally closed. Proof. Consider the following short exact sequence of groups 1 → F2 (b, c) → F2 (b, c) ⋊ hai2 → hai2 → 1  and choose: 1) the generating set U = U −1 = (b, a), (c, a), (c−1 , a), (1, a) , 2) the law IA = t2 and 3) the group Q = {1}. Next, we choose for each u ∈ U the words Eu,k and verify that the conditions of the Main Theorem hold.   For (b, a) we consider the following words: E(b,a),1 = x2 , E(b,a),2 = x, (b2 , 1) , E(b,a),3 =   x, (c2 , 1) ∈ IA (hxi∞ ) · IA (H)hxi∞ ∗IA (H) and show that the system  2           x = (b, a)2 = (1, 1), x, (b2 , 1) = (b, a), (b2 , 1) = (b4 , 1), x, (c2 , 1) = (b, a), (c2 , 1) = ( b, c2 , 1) has the unique solution, x = (b, a), in H/Q = H. It is straightforward to verify that the solutions of the equation x2 = (1, 1) in H are either of the form x = (w1 bk w2 , a), where k ∈ Z and w1a = w2−1 or x = (1, 1). It is clear that x = (1, 1) is not a solution of the second equation. Substituting x = (w1 bk w2 , a)   −1 −k −1 in x, (b2 , 1) = (b4 , 1) we have w1 bk w2 b2 w2−1 b−k w1−1 b2 = b4 in F2 (b, c), that is b2w2 b w1 = b2 in F (b, c), whence w1 bk w2 = bm for some m ∈ Z. Since we can assume that the word w1 bk w2 is reduced and that the last letter of w1 and the first letter of w2 is not b, the last equality means that w1 = w2 = 1 (and k = m). Thus, the solutions of the first two equations of the system are of the form x = (bk , a),     k ∈ Z. Substituting x = (bk , a) in the third equation we obtain the equality bk , c2 = b, c2 in F2 (b, c), from which it follows that k = 1. A similar verification shows that one can choose the words E(c,a),1 = E(c−1 ,a),1 = x2 , E(c,a),2 =     E(c−1 ,a),2 = x, (b2 , 1) for (c, a) and (c−1 , a), and the words E(1,a),1 = x2 , E(1,a),2 = x, (b2 , 1) ,   E(1,a),3 = x, (c2 , 1) for (1, a).  The following two examples are the special cases of assertion 1) of the stated above theorem of [4]. Example 2. A free group is strongly verbally closed. Proof. Let H be a free group. If H is abelian, then H is strongly verbally closed in accordance with Corollary 4. Let H be a non-abelian free group. Consider the following short exact sequence of groups 1→H →H →1→1 and choose U = H, IA = t, Q = {1} and Eu,1 = x ∈ IA (hxi∞ ) · IA (H)hxi∞ ∗IA (H) for each u ∈ U . Now, the verification of the conditions of the Main Theorem is trivial.  4 Example 3. Virtually free non-virtually cyclic group with the unique extraction of roots of infinite-order elements† is strongly verbally closed. Proof. If H is a virtually free non-virtually cyclic group, then it is clear that there exists a short exact sequens of groups of the form 1 → F → H → A → 1, where F is a non-abelian free group, and A is a finite group. Let U be the set of all infinite-order elements of H, IA = t|A| , Q = {1}, and Eu,1 = x|A| ∈ IA (hxi∞ ) · IA (H)hxi∞ ∗IA (H) for each u ∈ U . In [4], the following was established in a virtually free group which is not virtually cyclic, any element decomposes into a product of two infinite-order elements. It follows immediately from this statement that U is a generating set of H. The uniqueness of a solution of an equation x|A| = u|A| , u ∈ U in H/Q = H is assumed in the hypothesis of the example. The verification of the remaining conditions of the Main Theorem is trivial.  Corollary 1. Let 1 → F → H → A → 1 be a short exact sequence of groups such that F is a non-abelian free group, and A is a group satisfying a non-trivial law IA . If Z(H) is a divisible group, Z(H)∩H ′ = {1} and there exist elements f1 , . . . , fm ∈ IA (H) such that CH (f1 , . . . , fm ) = Z (H), then H is strongly verbally closed. Proof. Let us put U = H, Q = Z(H) and Eu,k = [fk , x] ∈ IA (hxi∞ ) · IA (H)hxi∞ ∗IA (H) , k = 1, . . . , m for each u ∈ U . To verify the conditions of the Main Theorem we only need to check that for u ∈ U the system {[fk , x] = [fk , u] | k = 1, . . . , m} has a unique solution in H/Q. It is clear that the system has a solution, x = uQ, in H/Q. Let x bQ ′ be a solution of this system in H/Q, then (since Q = Z(H), and Z(H) ∩ H = {1}) for all k we have T bu−1 ∈ CH (fk ), k = 1, . . . , m. That is, x bu−1 ∈ m b−1 fk x b = fk−1 u−1 fk u in H, thus x fk−1 x k=1 CH (fk ) = CH (f1 , . . . , fm ) = Q, therefore x bQ = uQ in H/Q.  Further we will need the following technical lemma. Lemma 1. Let 1 → F → H → A → 1 be a short exact sequence of groups such that F is a non-abelian free group, and A is a group satisfying a non-trivial law IA . Then IA (H) is a non-abelian free subgroup of H. Proof. The group IA (H) is free as a subgroup of a free group F . Subgroup IA (F ) in normal (even fully invariant) in F as a verbal subgroup and IA (F ) 6= {1} since IA is a non-trivial word. Therefore, if IA (H) is abelian, then IA (F ) ≃ Z. It can be easily deduce from the Nielsen-Schreier Theorem that a non-abelian free group cannot have a normal infinite cyclic subgroup. Thus, IA (H) is a non-abelian free group.  † that is, if h1 , h2 are the infinite-order elements and hk1 = hk2 , k ∈ N, then h1 = h2 . 5 Corollary 2. Let H = H1 ∗ · · · ∗ Hn 6≃ D∞ , n ≥ 2 be a free product of non-trivial groups Hi satisfying a non-trivial law, then H is strongly verbally closed. Proof. Consider the following short exact sequence of groups: 1 → F → H → A → 1, where A = H1 × · · · × Hn and F is the kernel of the natural epimorphism H1 ∗ · · · ∗ Hn ։ A (that is, F is the cartesian subgroup). It is well-known that the cartesian subgroup is a free group (and it is clear that if H 6≃ D∞ and n ≥ 2, then F is non-abelian free). Let [x1 , x2 , . . . , xn−1 , xn ] = [[[. . . [[x1 , x2 ] , x3 ] , . . . ] , xn−1 ] , xn ] be the left-normed commutator of x1 , x2 , . . . , xn−1 , xn , and let Wi be a non-trivial law in Hi (we assume that for the different indices the words Wi do not contain the same letters). It is easy to see that in this case A satisfies the non-trivial law IA = [W1 , W2 , . . . , Wn−1 , Wn ]. We shall verify the conditions of Corollary 1. The group B = IA (H) is non-abelian free by Lemma 1. Therefore, there exist elements f1 , f2 ∈ B such that [f1 , f2 ] 6= 1. It is well-known that the cartesian subgroup trivially intersects the free factors Hi , therefore (since B is a subgroup of the cartesian subgroup F ), the elements f1 , f2 cannot belong to a subgroup of the form Hig , g ∈ H. If CH (f1 ) ∩ CH (f2 ) 6= {1}, then the center of the group hf1 , f2 , zi, where z ∈ CH (f1 ) ∩ CH (f2 ) \ {1} is non-trivial, therefore the group hf1 , f2 , zi does not decompose as a proper free product. But by the Kuros̆ Subgroup Theorem (see. e.g., [9]) this would imply that hf1 , f2 , zi is a subgroup of Hig , g ∈ H. Thus, CH (f1 ) ∩ CH (f2 ) = CH (f1 , f2 ) = 1.  Sice the fundamental group of a connected non-closed surface is free (see, e.g., [12])), by Example 2, it is strongly verbally closed. It is well-known (see, e.g., [6]) that the fundamental group of a closed surface does not decompose as a proper free product, nevertheless Corollary 3. The fundamental group of a closed surface, except the Klein bottle, is strongly verbally closed. Further in the text of the article a surface means a closed (i.e. connected, compact, without boundary) surface. It is well-known that the fundamental group of an orientable surface of genus g ≥ 0 (we denote such a surface as Sg+ ) is of the type: π1 (Sg+ ) = hx1 , y1 , . . . , xg , yg | [x1 , y1 ] · · · [xg , yg ]i , and that the fundamental group of a non-orientable surface of genus g ≥ 1 (we denote such a surface as Sg− ) is of the type: π1 (Sg− ) = x1 , . . . , xg | x21 · · · x2g . The following technical lemma is rather well-known. Lemma 2. Let π1 (S) be the fundamental group of a surface S whose Euler characteristic† is χ(S). S1) If χ(S) < 0 and elements g1 , g2 ∈ π1 (S) \{1} commute, then hg1 , g2 i ≃ Z. S2) If χ(S) < 0, then π1 (S)′ is a non-abelian free group. † The Euler characteristic, χ(Sg+ ), of Sg+ is χ(Sg+ ) = 2 − 2g and the Euler characteristic, χ(Sg− ), of Sg− is χ(Sg− ) = 2 − g. 6 Proof. For a proof of S1) see, for example, [3]. It is well-known (see, e.g., [3]) that π1 (S)′ is a free group. If χ(S) < 0, then g ≥ 2 for Sg+ and g ≥ 3 for Sg− . Therefore, the following epimorphisms are naturally defined π1 (Sg+ ) = hx1 , y1 , . . . , xg , yg | [x1 , y1 ] · · · [xg , yg ]i ։ hx1 , y1 , x2 , y2 | [x1 , y1 ][x2 , y2 ]i ≃ F2 ∗ F2 ; Z π1 (Sg− ) = x1 , . . . , xg | x21 · · · x2g ։ x1 , x2 , x3 | x21 , x22 , x23 ≃ Z2 ∗ Z2 ∗ Z2 . Since the commutator subgroups of the images of these epimorphisms are non-abelian groups, it follows  that the commutator subgroups, π1 (Sg+ )′ , g ≥ 2 and π1 (Sg− )′ , g ≥ 3, are also non-abelian. Proof. It is clear that the groups π1 (S0+ ), π1 (S1+ ) and π1 (S1− ) are abelian, therefore, by Corollary 4, these groups are strongly verbally closed. The group π1 (S2− ) is excluded by the hypothesis of the corollary. Thus, it remains to consider the surfaces whose Euler characteristic is negative. For H = π1 (S), χ(S) < 0 consider the following short exact sequence of groups 1 → H ′ → H → A → 1, where A = H/H ′ . By assertion S2) of Lemma 2, H ′ is a non-abelian free group. Assuming that IA = [t1 , t2 ], we verify the conditions of Corollary 1. By Lemma 1, B = IA (H) is a non-abelian free subgroup of H and, therefore, there are elements f1 , f2 ∈ B such that [f1 , f2 ] 6= 1. Suppose that there exists an element, say z, such that z ∈ CH (f1 ) ∩ CH (f2 ) \ {1}. Then, by assertion S1) of Lemma 2, there are elements u1 , u2 ∈ H such 1 2 that f1 = uk11 , z = um and f2 = uk22 , z = um for some k1 , k2 , m1 , m2 ∈ Z \ {0}. Therefore, we 1 2 k2 m1 k1 k2 m1 k k m k m k k 1 2 2 1 2 have f1 = u1 = z 1 2 = u2 = f2 . Since f1 and f2 are elements of a free group, k2 m1 k1 m2 the equality f1 = f2 means that f1 and f2 commute, but this contradicts our choice. Whence, CH (f1 , f2 ) = CH (f1 ) ∩ CH (f2 ) = {1}.  3 Proof of the Main Theorem The following lemma is well known. Lemma 3. If a subgroup H of a group G is such that any finite system of equations of the form {wi (x1 , . . . , xn ) = hi | i = 1, . . . , m} , (1) where wi (x1 , . . . , xn ) ∈ Fn (x1 , . . . , xn ), hi ∈ H, having a solution in G has a solution in H too, then H is algebraically closed. Proof. Just denote the coefficients by new letters and interpret them as variables. For example, the solvability of the equation xyh1 [x2018 , h2 ]y −1 = 1 is equivalent to the solvability of the system {xyz[x2018 , t]y −1 = 1, z = h1 , t = h2 }.  Now, recall that any integer matrix can be reduced to a diagonal matrix by integer elementary transformations. This means that any finite system of equations of the form (1) can be reduced to a system of the form i {xm i ui (x1 , . . . , xn ) = hi , uj (x1 , . . . , xn ) = hj | i = 1, . . . , l, j = l + 1, . . . , m} , 7 (2) where ui (x1 , . . . , xn ), uj (x1 , . . . , xn ) ∈ F (x1 , . . . , xn )′ , mi > 0, 0 ≤ l ≤ n, hi , hj ∈ H, by means of a finite sequence of transformations of the form wi → wi wj±1 and xi → xi x±1 j . It follows from the form of these transformations that system (1) has a solution in a group G (containing H as a subgroup) if and only if system (2) has a solution in G. Therefore, the following lemma holds. Lemma 4. If a subgroup H of a group G is such that any finite system of the form (2) having a solution in G has a solution in H too, then H in algebraically closed. Corollary 4. An abelian group is strongly verbally closed. Proof. Let H be a verbally closed abelian subgroup in a group G. Suppose that a system of the form (2) has a solution in G. Since H is a verbally closed subgroup in G, each equation of this system has a solution in H. For each i = 1, . . . , l let a tuple (ai,1 , ai,2 , . . . , ai,n ) be a solution of the equation ′ i xm i ui (x1 , . . . , xn ) = hi in H. Since ui (x1 , . . . , xn ), uj (x1 , . . . , xn ) ∈ F (x1 , . . . , xn ) and H is abelian, we have ui (g1 , . . . , gn ) = 1, uj (g1 , . . . , gn ) = 1 for any g1 , . . . , gn ∈ H, thus hj = 1, j = l + 1, . . . , m. Now it is easy to see that xi = ai,i , i = 1, . . . , l and xi = 1, i = l + 1, . . . , m is a solution of (2) in H.  Recall that a Lee word in m variables for the free group of rank r is an element Lm (z1 , . . . , zm ) of the free group of rank m such that ′ ) 6= 1 in F , then v ′ ∈ F are obtained from v ∈ F by L1) if Lm (v1 , . . . , vm ) = Lm (v1′ , . . . , vm r r i r i simultaneous conjugation, i.e., there exists s ∈ Fr such that vi′ = vis for all i = 1, . . . , m; L2) Lm (v1 , . . . , vm ) = 1 if and only if the elements v1 , . . . , vm of Fr generate a cyclic subgroup. In [5], such words were constructed for all integers r, m ≥ 2. Actually, it is easy to see that Lee’s result implies the existence of a universal Lee word in m variables. Lemma [4]. For any positive integer m, there exists an element Lm (z1 , . . . , zm ) ∈ Fm such that properties L1) and L2) hold in all free groups Fr and even in F∞ . Proof. This assertion follows immediately from Lee’s result and the following simple fact: F∞ embeds into F2 as a malnormal subgroup, i.e. a subgroup S ⊂ F2 such that S f ∩ S = {1} for all f ∈ F2 \ S. This fact follows, e.g., from a result of [13]: in a free group, any set satisfying small-cancellation condition C(5) freely generates a malnormal subgroup. Thus, a Lee word for F2 is universal, i.e. it is suitable also for F∞ .  The proof of the following lemma is based on the use of universal Lee words. Lemma 5. Let I(H) and I (F (x)) be the verbal subgroups of H and F (x) generated by a word I, respectively. If I(H) is a non-abelian free group and H is a verbally closed subgroup in a group G, then any finite system of equations of the form {wi (x, I(H)) = 1| i = 1, . . . , m} , where wi (x, I(H)) ∈ I (F (x)) · I(H)F (x)∗I(H) , having a solution in G has a solution in H too. Proof. Let S be a system of the form (3), having a solution in G. 8 (3) By the hypothesis of the lemma, the left-hand sides, wi (x, I(H)), of the equations of S have decompositions of the form mi Y c bi,ji,j , (4) wi (x, I(H)) = ai j=1 where ai ∈ I (F (x)), bi,j ∈ I(H) and ci,j ∈ F (x) ∗ I(H). We fix such a decomposition for the left-hand side of each equation of S. Let Mi,j be the set of all the elements of I(H) which are present in the normal form (for F (x) ∗ I(H)) of the element ci,j . We define the set M as the union of all the sets Mi,j and all the elements bi,j . Since I(H) is a non-abelian free group, there exist elements h′ , h′′ ∈ I(H) such that hM, h′ , h′′ i 6≃ Z. If hM i ≃ Z or M = ∅, we add the elements h′ , h′′ to the set M . Since M ⊂ I(H), for each hβ ∈ M there is a word, tβ (y β ) ∈ I(F (y β )), such that tβ (g β ) = hβ for some elements g β of H (we assume that for the different indices the tuples y β do not contain the same letters). For each element hβ ∈ M we add to the system S the equation tβ (y β ) = hβ , and each occurrence of the constant hβ in the fixed above decompositions (4) of the left-hand sides of the equations of the system S we replace with the word tβ (y β ). We denote this new system by S 1 . Note that the left-hand sides of the equations of S 1 do not contain constants from H; their right-hand sides are the constants from I(H); the system S 1 has a solution in G if and only if the system S has a solution in G. Let us denote the equations of the system S 1 by uα (x, y) = fα , where y is a concatenation of all the tuples y β † . That is  S 1 = uα (x, y) = fα | α = 1, . . . , N , where N = m + |M |. Let LN (z1 , . . . , zN ) be a universal Lee word in N variables. Consider the equation LN (u1 (x, y), . . . , uN (x, y)) = LN (f1 , . . . , fN ). This equation has a solution in G by construction (just take the following: a solution of S as x and g β as y β ). Thus, since H is a verbally closed subgroup in G and LN (f1 , . . . , fN ) ∈ I(H) ⊆ H, the equation has a solution, say x̂, ŷ, in H. By construction a word uα (x, y) is either of the form wi (x, y) ∈ I (F (x)) · I(F (y))F (x)∗I(F (y)) (5) tβ (y β ) ∈ I(F (y)). (6) or of the form It is clear from (5) and (6) that for any values of x, y in H the value of uα (x, y) is an element of the free group I(H). Since I(H) is a free group, fα , uα (x̂, ŷ) ∈ I(H) for all α = 1, . . . , N and hf1 , . . . , fN i 6≃ Z (indeed, by construction M ⊆ {f1 , . . . , fN } and hM i 6≃ Z), Property L2) of Lee words implies that LN (f1 , . . . , fN ) 6= 1. Then, according to Property L1) of Lee words, there exists s ∈ I(H) such that  Ŝ 1 = uα (x̂, ŷ) = fαs | α = 1, . . . , N . −1 −1 That is, x̂s , ŷ s is a solution to the system S 1 in H. Recall how the system S 1 was obtained from the system S. Now we carry out the inverse transformation, but with the set of equalities Ŝ 1 . More precisely, using the equalities of the form tβ (ŷ β ) = hsβ of Ŝ 1 , in the left-hand sides of all the equalities of the form wi (x̂, ŷ) = 1s of Ŝ 1 we replace (according to the fixed above decompositions (4) of the left-hand sides of † if e.g., (y1 , y2 ) and (y3 , y4 ) are tuples, then we call the tuples of the form (y1 , y2 , y3 , y4 ) or (y3 , y4 , y1 , y2 ) their concatenation. 9 the equations of S) all the elements tβ (ŷ β ) with the elements hsβ . This leads us to the following set of equalities Ŝ = {wi (x̂, I(H)s ) = 1| i = 1, . . . , m} . Whence, x̂s −1 is a solution to the system S in H as required.  Now we are ready to prove the Main Theorem. Proof of the Main Theorem. Let H be a verbally closed subgroup in a group G, then (by Lemma 4) it suffices to show that a system S of the form (2) having a solution in G has a solution in H too. To each equation wi (x) = hi of the system S we associate the system n o −1 −1 Si = wi (x) yi,t , · · · y = u , y = u , . . . , y = u i,0 i,1 i,1 i,t i,t i i i,1 i (7) where hi = ui,0 ui,1 . . . ui,ti , ui,j ∈ U and yi,j are the new unknowns. Consider the system S 1 = {Si | i = 1, . . . , m} , consisting of all the equations of all the systems Si . It is clear that the system S 1 has a solution in G if and only if the system S has a solution in G. Using the elements Eui,j ,k (x, IA (H)), k = 1, . . . , nui,j from Condition T3) of the Main Theorem,    −1 −1 = yi,j , j = x, · · · y and w y to each equation wi,j x, y = ui,j (where wi,0 x, y = wi (x) yi,t i,j i,1 i 1, . . . , ti ) of the system S 1 we associate the system    Si,j = Eui,j ,k wi,j x, y , IA (H) = Eui,j ,k (ui,j , IA (H)) | k = 1, . . . , nui,j . Next, consider the system S 2 = {Si,j | i = 1, . . . , m, j = 0, . . . , ti } , consisting of all the equations of all the systems Si,j . It is clear that if the system S 1 has a solution in G, then the system S 2 has a solution in G too.   Since IA (H) is a non-abelian free group (by Lemma 1), Eui,j ,k wi,j x, y , IA (H) ∈ IA (F (x, y)) · IA (H)F (x,y)∗IA (H) and Eui,j ,k (ui,j , IA (H)) ∈ IA (H), it is clear that the system S 2 is of the form (3). Therefore, by Lemma 5, this system has a solution, say x̂, ŷ, in H. In turn, in accordance with Condition T3) of the Main Theorem, this implies that the following equalities hold in H/Q   wi,j x̂, ŷ Q = ui,j Q| i = 1, . . . , m, j = 0, . . . , ti . Therefore, for some elements qi,j ∈ Q we have the following set of equalities (in H) o n −1 −1 · · · ŷ = u q , ŷ = u q , . . . , ŷ = u q | i = 1, . . . , m . Ŝ 1 = wi (x̂)ŷi,t i,0 i,0 i,1 i,1 i,1 i,ti i,ti i,ti i,1 i Whence, since Q is central, there exist the elements qi ∈ Q such that the following equalities hold Ŝ = {wi (x̂) = ui,0 ui,1 · · · ui,ti qi = hi qi | i = 1, . . . , m} . (8) This means that x̂ is a solution to S in H up to some elements qi ∈ Q. In accordance with (2), the equality wi (x̂) = hi qi from (8) can be either of the form i ui (x̂1 , . . . , x̂n ) = hi qi or of the form x̂m i ui (x̂1 , . . . , x̂n ) = hi qi , mi > 0. i Suppose that x̂m i ui (x̂1 , . . . , x̂n ) = hi qi , mi > 0. Then (since Q is a divisible group) there is ri ∈ Q such that rimi = qi . If we replace the element x̂i of the tuple x̂ with the element ri−1 x̂i (and leave the 10 other elements unchanged), then (since Q is a cental subgroup of H and ui (x1 , . . . , xn ) ∈ F (x1 , . . . , xn )′ ) we have ri−1 x̂i mi −1 i ui (x̂1 , . . . , ri−1 x̂i , . . . , x̂n ) = ri−mi x̂m i ui (x̂1 , . . . , ri x̂i , . . . , x̂n ) i = qi−1 x̂m i ui (x̂1 , . . . , x̂i , . . . , x̂n ) = qi−1 hi qi = hi , while the other equalities of Ŝ remain unchanged. Suppose that ui (x̂1 , . . . , x̂n ) = hi qi . The equation ui (x1 , . . . , xn ) = hi has a solution in H (indeed, this equation has a solution in G since the system S does, and H is a verbally closed subgroup in G). ′ It means (since ui (x1 , . . . , xn ) ∈ F (x1 , . . . , xn )′ ) that hi ∈ H ′ , thus qi = h−1 i ui (x̂1 , . . . , x̂n ) ∈ H . But by Condition T2) of the Main Theorem we have Q ∩ H ′ = {1}, therefore qi = 1. Thus, the tuple (r1−1 x̂1 , . . . , rl−1 x̂l , x̂l+1 , . . . , x̂n ) is a solution to the system S in H as required.  4 Acknowledgments The author thanks A. A. Klyachko for many useful conversations and many useful remarks. References [1] G. Baumslag, A. Myasnikov, V. Remeslennikov, Algebraic geometry over groups I. Algebraic sets and ideal theory. J. Algebra. 219 (1999), 16-79. [2] C. M. Campbell, M. R. Quick, E. F. Robertson, G. C. Smith, Groups St Andrews 2005 Volume 1. Cambridge University Press, 2007. [3] W. Jaco, On certain Subgroups of the fundamental group of a closed surface. Mathematical Proceedings of the Cambridge Philosophical Society. Vol. 67, Issue 01, (1970), 17-18. [4] A. A. Klyachko, A. M. Mazhuga, Verbally closed virtually free subgroups, Sb. Math. (to appear). See also arXiv: 1702.07761 [5] D. Lee, On certain C-test words for free groups. J. Algebra. 247 (2002), 509-540. [6] R. C. Lyndon, P. E. Schupp, Combinatorial Group Theory. Springer-Verlag, New York, 1977. [7] A. M. Mazhuga, On free decompositions of verbally closed subgroups of free products of finite groups, Journal of Group Theory (to appear). See also arXiv:1605.01766 [8] A. Myasnikov, V. Roman’kov, Verbally closed subgroups of free groups, Journal of Group Theory 17 (2014), 29-40. See also arXiv:1201.0497. [9] D. J. S. Robinson, A Course in the Theory of Groups. Springer, 1995. [10] V. A. Roman’kov, Equations over groups, Groups Complexity Cryptology 4:2 (2012), 191-239. [11] V. A. Roman’kov, N. G. Khisamiev, Verbally and existentially closed subgroups of free nilpotent groups. Algebra and Logic 52 (2013), 336-351. 11 [12] J. Stillwell, Classical Topology and Combinatorial Group Theory. Springer, 1995. [13] D. T. Wise, The residual finiteness of positive one-relator groups, Comment. Math. Helv 76 (2001), 314-338. 12
4math.GR
An Improved Algorithm for Diameter-Optimally Augmenting Paths in a Metric Space Haitao Wang Department of Computer Science, Utah State University, Logan, UT 84322, USA. [email protected] Abstract arXiv:1608.04456v1 [cs.DS] 16 Aug 2016 Let P be a path graph of n vertices embedded in a metric space. We consider the problem of adding a new edge to P such that the diameter of the resulting graph is minimized. Previously (in ICALP 2015) the problem was solved in O(n log3 n) time. In this paper, based on new observations and different algorithmic techniques, we present an O(n log n) time algorithm. Keywords and phrases diameter, path graphs, augmenting paths, minimizing diameter, metric space 1 Introduction Let P be a path graph of n vertices embedded in a metric space. We consider the problem of adding a new edge to P such that the diameter of the resulting graph is minimized. The problem is formally defined as follows. Let G be a graph and each edge has a non-negative length. The length of any path of G is the total length of all edges of the path. For any two vertices u and v of G, we use dG (u, v) to denote the length of the shortest path from u to v in G. The diameter of G is defined as maxu,v∈G dG (u, v). Let P be a path graph of n vertices v1 , v2 , . . . , vn and there is an edge e(vi−1 , vi ) connecting vi−1 and vi for each 1 ≤ i ≤ n−1. Let V be the vertex set of P . We assume (V, |·|) is a metric space and |vi vj | is the distance of any two vertices vi and vj of V . Specifically, the following properties hold: (1) the triangle inequality: |vi vk | + |vk vj | ≥ |vi vj |; (2) |vi vj | = |vj vi | ≥ 0; (3) |vi vj | = 0 if i = j. In particular, for each edge e(vi−1 , vi ) of P , its length is equal to |vi−1 vi |. We assume that given any two vertices vi and vj of P , the distance |vi vj | can be obtained in O(1) time. Our goal is to find a new edge e connecting two vertices of P and add e to P , such that the diameter of the resulting graph P ∪ {e} is minimized. The problem has been studied before. Große et al. [10] solved the problem in O(n log3 n) time. In this paper, we present a new algorithm that runs in O(n log n) time. Our algorithm is based on new observations on the structures of the optimal solution and different algorithmic techniques. Following the previous work [10], we refer to the problem as the diameteroptimally augmenting path problem, or DOAP for short. 1.1 Related Work If the path P is in the Euclidean space Rd for a constant d, then Große et al. [10] also gave an O(n + 1/3 ) time algorithm that can find a (1 + )-approximation solution for the problem DOAP, for any  > 0. If P is in the Euclidean plane R2 , De Carulfel et al. [4] gave a linear time algorithm for adding a new edge to P to minimize the continuous diameter (i.e., the diameter is defined with respect to all points of P , not only vertices). The more general problem and many variations have also been studied before, e.g., see [1, 3, 5, 6, 9, 12, 13, 15] and the references therein. Consider a general graph G in which edges © Haitao Wang; licensed under Creative Commons License CC-BY Leibniz International Proceedings in Informatics Schloss Dagstuhl – Leibniz-Zentrum für Informatik, Dagstuhl Publishing, Germany 2 Diameter-Optimally Augmenting Paths have non-negative lengths. For an integer k, the goal of the general problem is to compute a set F of k new edges and add them to G such that the resulting graph has the minimum diameter. The problem is NP-hard [15] and some other variants are even W[2]-hard [6, 9]. Approximation results have been given for the general problem and many of its variations, e.g., see [3, 6, 13]. The upper bounds and lower bounds on the values of the diameters of the augmented graphs have also been investigated, e.g. see [1, 12]. Since diameter is an important metric of network performance, which measures the worst-case cost between any two nodes of the network, as discussed in [3, 5], the problem of augmenting graphs for minimizing the diameter and its variations have many practical applications, such as in data networks, telephone networks, transportation networks, scheduling problems, etc. As an application of our problem DOAP, consider the following scenario in transportation networks. Suppose there is a highway that connects several cities. In order to reduce the transportation time, we want to build a new highway connecting two cities such that the distance between the farthest two cities using both highways is minimized. Clearly, this is a problem instance of DOAP. 1.2 Our Approaches To tackle the problem, Große et al. [10] first gave an O(n log n) time algorithm for the decision version of the problem: Given any value λ, determine whether it is possible to add a new edge e into P such that the diameter of the resulting graph is at most λ. Then, by implementing the above decision algorithm in a parallel fashion and applying Megiddo’s parametric search [14], they solved the original problem DOAP in O(n log3 n) time [10]. For differentiation, we referred to the original problem DOAP as the optimization problem. Our improvement over the previous work [10] is twofold. First, we solve the decision problem in O(n) time. Our algorithm is based on the O(n log n) time algorithm in the previous work [10]. However, by discovering new observations on the problem structure and with the help of the range-minima data structure [2, 11], we avoid certain expensive operations and eventually achieve the O(n) time complexity. Second, comparing with the decision problem, our algorithm for the optimization problem is completely different from the previous work [10]. Let λ∗ be the diameter of the resulting graph in an optimal solution. Instead of using the parametric search, we identify a set S of candidate values such that λ∗ is in S and then we search λ∗ in S using our algorithm for the decision problem. However, computational difficulties arise for this approach due to that the set S is too large (|S| = Ω(n2 )) and computing certain values of S is time-consuming (e.g., for certain values of S, computing each of them takes O(n) time). To circumvent these difficulties, our algorithm has several steps. In each step, we shrink S significantly such that λ∗ always remains in S. More importantly, each step will obtain certain formation, based on which the next step can further reduce S. After several steps, the size of S is reduced to O(n) and all the remaining values of S can be computed in O(n log n) time. At this point we can use our decision algorithm to find λ∗ from S in additional O(n log n) time. Equipped with our linear time algorithm for the decision problem and utilizing several other algorithmic techniques such as the sorted-matrix searching techniques [7, 8] and range-minima data structure [2, 11], we eventually solve the optimization problem in O(n log n) time. The rest of the paper is organized as follows. In Section 2, we introduce some notation and observations. In Section 3, we present our algorithm for the decision problem. The optimization problem is solved in Section 4. H. Wang 3 vi v1 vn vk vj vl Figure 1 Illustrating the resulting graph after a new edge e(vi , vj ) is added. 2 Preliminaries In this section, we introduce some notation and observations, some of which are from Große et al. [10]. For any two vertices vi and vj of P , we use e(vi , vj ) to denote the edge connecting vi and vj in the metric space. Hence, e(vi , vj ) is in P if and only if |i − j| = 1. The length of e(vi , vj ) is |vi vj |. For any i and j with 1 ≤ i ≤ j ≤ n, we use G(i, j) to denote the resulting graph by adding the edge e(vi , vj ) into P . If i = j, G(i, j) is essentially P . Let D(i, j) denote the diameter of G(i, j). Our goal for the optimization problem DOAP is to find a pair of indices (i, j) with 1 ≤ i ≤ j ≤ n such that D(i, j) is minimized. Let λ∗ = min1≤i≤j≤n D(i, j), i.e., λ∗ is the diameter in an optimal solution. Given any value λ, the decision problem is to determine whether λ ≥ λ∗ , or in other words, determine whether there exist a pair (i, j) with 1 ≤ i ≤ j ≤ n such that D(i, j) ≤ λ. If yes, we say that λ is a feasible value. Recall that for any graph G, dG (u, v) refers to the length of the shortest path between two vertices u and v in G. Consider any pair of indices (i, j) with 1 ≤ i ≤ j ≤ n. We define α(i, j), β(i, j), γ(i, j), and δ(i, j) as follows (refer to Fig. 1). I Definition 1. 1. Define α(i, j) to be the largest shortest path length in G(i, j) from v1 to all vertices vk with k ∈ [i, j], i.e., α(i, j) = maxi≤k≤j dG(i,j) (v1 , vk ). 2. Define β(i, j) to be the largest shortest path length in G(i, j) from vn to all vertices vk with k ∈ [i, j], i.e., β(i, j) = maxi≤k≤j dG(i,j) (vk , vn ). 3. Define γ(i, j) to be the largest shortest path length in G(i, j) from vk to vl for any k and l with i ≤ k ≤ l ≤ j, i.e., γ(i, j) = maxi≤k≤l≤j dG(i,j) (vk , vl ). 4. Define δ(i, j) to be the shortest path length in G(i, j) from v1 to vn , i.e., δ(i, j) = dG(i,j) (v1 , vn ). It can be verified (also shown in [10]) that the following observation holds. I Observation 2. ([10]) D(i, j) = max{α(i, j), β(i, j), γ(i, j), δ(i, j)}. Further, due to the triangle inequality of the metric space, the following monotonicity properties hold. I Observation 3. ([10]) 1. For any 1 ≤ i ≤ j ≤ n − 1, α(i, j) ≤ α(i, j + 1), β(i, j) ≥ β(i, j + 1), γ(i, j) ≤ γ(i, j + 1), and δ(i, j) ≥ δ(i, j + 1). 2. For any 1 ≤ i < j ≤ n, α(i, j) ≤ α(i + 1, j), β(i, j) ≥ β(i + 1, j), γ(i, j) ≥ γ(i + 1, j), and δ(i, j) ≤ δ(i + 1, j). 4 Diameter-Optimally Augmenting Paths For any pair (i, j) with 1 ≤ i ≤ j ≤ n, let P (i, j) denote the subpath of P between vi and P vj . Hence, dP (vi , vj ) is the length of P (i, j), i.e., dP (vi , vj ) = i≤k≤j−1 |vk vk+1 | if i < j and dP (vi , vj ) = 0 if i = j. In our algorithms, we will need to compute f (i, j) for each f ∈ {α, β, γ, δ}. The next observation gives an algorithm. The result was also given by Große et al. [10] and we present the proof here for completeness of this paper. I Lemma 4. ([10]) With O(n) time preprocessing, given any pair (i, j) with 1 ≤ i ≤ j ≤ n, we can compute dP (i, j) and δ(i, j) in O(1) time, and compute α(i, j) and β(i, j) in O(log n) time. Proof. As preprocessing, we compute the prefix sum array A[1 · · · n] such that A[k] = P 1≤l≤k−1 |vl vl+1 | for each k ∈ [2, n] and A[1] = 0. This can be done in O(n) time. This finishes our preprocessing. Consider any pair (i, j) with 1 ≤ i ≤ j ≤ n. Note that dP (vi , vj ) = A[j] − A[i], which can be computed in constant time. For δ(i, j), it is easy to see that δ(i, j) = min{dP (1, n), dP (1, i) + |vi vj | + dP (j, n)}. Hence, δ(i, j) can be computed in constant time. For α(i, j), if we consider dG(i,j) (v1 , vk ) as a function of k ∈ [i, j], then dG(i,j) (v1 , vk ) is a unimodal function. More specifically, as k changes from i to j, dG(i,j) (v1 , vk ) first increases and then decreases. Hence, α(i, j) can be computed in O(log n) time by binary search on the sequence vi , vi+1 , . . . , vj . Computing β(i, j) can be also done in O(log n) time in a similar way to α(i, j). We omit the details. J For computing γ(i, j), although one may be able to do so in O(n) time, it is not clear to us how to make it in O(log n) time even with O(n log n) time preprocessing. As will be seen later, this is the major difficulty for solving the problem DOAP efficiently. We refer to it as the γ-computation difficulty. Our main effort will be to circumvent the difficulty by providing alternative and efficient solutions. For any pair (i, j) with 1 ≤ i ≤ j ≤ n, we use C(i, j) to denote the cycle P (i, j) ∪ e(vi , vj ). Consider dG(i,j) (vk , vl ) for any k and l with i ≤ k ≤ l ≤ j. Notice that the shortest path from vk to vl in C(i, j) is also a shortest path in G(i, j). Hence, dG(i,j) (vk , vl ) = dC(i,j) (vk , vl ). There are two paths in C(i, j) from vk to vl : one is P (k, l) and the other uses the edge e(vi , vj ). We use d1C(i,j) (vk , vl ) to denote the length of the above second path, i.e., d1C(i,j) (vk , vl ) = dP (vi , vk ) + |vi vj | + dP (vl , vj ). With these notation, we have dC(i,j) (vk , vl ) = min{dP (vk , vl ), d1C(i,j) (vk , vl )}. According to the definition of γ(i, j), we summarize our discussion in the following observation. I Observation 5. For any pair (i, j) with 1 ≤ i ≤ j ≤ n, γ(i, j) = maxi≤k≤l≤j dC(i,j) (vk , vl ), with dC(i,j) (vk , vl ) = min{dP (vk , vl ), d1C(i,j) (vk , vl )} and d1C(i,j) (vk , vl ) = dP (vi , vk ) + |vi vj | + dP (vl , vj ). In the following, to simplify the notation, when the context is clear, we use index i to refer to vertex vi . For example, dP (i, j) refers to dP (vi , vj ) and e(i, j) refers to e(vi , vj ). 3 The Decision Problem In this section, we present our O(n) time algorithm for solving the decision problem. For any value λ, our goal is to determine whether λ is feasible, i.e. whether λ ≥ λ∗ , or equivalently, H. Wang 5 α γ λ β δ Ii (δ) Ii (β) Ii (α) Ii (γ) Figure 2 Illustrating f (i, j) as j changes in [i, n] and Ii (f ) for f ∈ {α, β, γ, δ}. whether there is a pair (i, j) with 1 ≤ i ≤ j ≤ n such that D(i, j) ≤ λ. If yes, our algorithm can also find such a feasible edge e(i, j). By Observation 2, D(i, j) ≤ λ holds if and only if f (i, j) ≤ λ for each f ∈ {α, β, γ, δ}. To determine whether λ is feasible, our algorithm will determine for each i ∈ [1, n], whether there exists j ∈ [i, n] such that f (i, j) ≤ λ for each f ∈ {α, β, γ, δ}. For any fixed i ∈ [1, n], we consider α(i, j), β(i, j), γ(i, j), and δ(i, j) as functions of j ∈ [i, n]. In light of Observation 3, α(i, j) and γ(i, j) are monotonically increasing and β(i, j) and δ(i, j) are monotonically decreasing (e.g., see Fig. 2). We define four indices Ii (f ) for f ∈ {α, β, γ, δ} as follows. Refer to Fig. 2. I Definition 6. Define Ii (α) to be the largest index j ∈ [i, n] such that α(i, j) ≤ λ. We define Ii (γ) similarly to Ii (α). If β(i, n) ≤ λ, then define Ii (β) to be the smallest index j ∈ [i, n] such that β(i, j) ≤ λ; otherwise, let Ii (β) = ∞. We define Ii (δ) similarly to Ii (β). As discussed in [10], λ is feasible if and only if [1, Ii (α)]∩[Ii (β), n]∩[1, Ii (γ)]∩[Ii (δ), n] 6= ∅ for some i ∈ [1, n]. By Observation 3, we have the following lemma. I Lemma 7. For any i ∈ [1, n − 1], Ii (α) ≥ Ii+1 (α), Ii (β) ≥ Ii+1 (β), Ii (γ) ≤ Ii+1 (γ), and Ii (δ) ≤ Ii+1 (δ) (e.g., see Fig. 3). Proof. According to Observation 3, α(i, j) ≤ α(i + 1, j). This implies that Ii (α) ≥ Ii+1 (α) by the their definitions (e.g., see Fig. 3). The other three cases for β, γ, and δ are similar. J β(i, j) β(i + 1, j) γ(i, j) γ(i + 1, j) δ(i, j) λ λ Ii+1 (β) Ii (β) δ(i + 1, j) α(i + 1, j) α(i, j) Ii+1 (α)Ii (α) Ii (δ) Ii+1 (δ) Ii (γ) Ii+1 (γ) Figure 3 Illustrating f (i, j) and f (i + 1, j) as j changes and Ii (f ) and Ii+1 (f ) for f ∈ {α, β, γ, δ}. 3.1 Computing Ii (α), Ii (β), and Ii (δ) for all i ∈ [1, n] In light of Lemma 7, for each f ∈ {α, β, δ}, we compute Ii (f ) for all i = 1, 2, . . . , n in O(n) time, as follows. We discuss the case for δ first. According to Lemma 4, δ(i, j) can be computed in constant time for any pair (i, j) with 1 ≤ i ≤ n. We can compute Ii (δ) for all i ∈ [1, n] in O(n) time by the following simple algorithm. We first compute I1 (δ), which is done by computing δ(1, j) from j = 1 incrementally until the first time δ(1, j) ≤ λ. Then, to compute I2 (δ), 6 Diameter-Optimally Augmenting Paths vi v1 vn vk−1 vk vj Figure 4 Illustrating the path (the dotted curve) from vn to vk−1 using the edge e(i, j). we compute δ(2, j) from j = I1 (δ) incrementally until the first time δ(2, j) ≤ λ. Next, we compute Ii (δ) for i = 3, 4, . . . , n in the same way. The total time is O(n). The correctness is based on the monotonicity property of Ii (δ) in Lemma 7. To compute Ii (α) or Ii (β) for i = 1, 2, . . . , n, using a similar approach as above, we can only have an O(n log n) time algorithm since computing each α(i, j) or β(i, j) takes O(log n) time by Lemma 4. In the following Lemma 8, we give another approach that only needs O(n) time. I Lemma 8. Ii (α) and Ii (β) for all i = 1, 2, . . . , n can be computed in O(n) time. Proof. We only discuss the case for β since the other case for α is analogous. The key idea is that for each pair (i, j), instead of computing the exact value of β(i, j), it is sufficient to determine whether β(i, j) ≤ λ. In what follows, we show that with O(n) time preprocessing, we can determine whether β(i, j) ≤ λ in O(1) time for any index pair (i, j) with 1 ≤ i ≤ j ≤ n. Let k be the smallest index in [1, n] such that dP (k, n) ≤ λ. This implies that dP (k−1, n) > λ if k > 1. As preprocessing, we compute the index k, which can be easily done in O(n) time (or even in O(log n) time by binary search). Consider any pair (i, j) for 1 ≤ i ≤ j ≤ n. Our goal is to determine whether β(i, j) ≤ λ. 1. If k ≤ i, then it is vacuously true that β(i, j) ≤ λ. 2. If k > j, then β(i, j) > λ. 3. If i < k ≤ j, a crucial observation is that β(i, j) ≤ λ if and only if the length of the path from vn to vk−1 using the new edge e(i, j), i.e., dP (i, k − 1) + |vi vj | + dP (j, n), is less than or equal to λ. See Fig. 4. Clearly, the above path length can be computed in constant time, and thus, we can determine whether β(i, j) ≤ λ in constant time. Therefore, we can determine whether β(i, j) ≤ λ in constant time for any pair (i, j) with 1 ≤ i ≤ j ≤ n. With this result, we can use a similar algorithm as the above for computing Ii (δ) to compute Ii (β) for all i ∈ [1, n] in O(n) time. The lemma thus follows. J Due to the γ-computation difficulty mentioned in Section 2, it is not clear whether it possible to compute Ii (γ) for all i = 1, . . . , n in O(n log n) time. Recall that λ is feasible if and only if there exists an i ∈ [1, n] such that [1, Ii (α)] ∩ [Ii (β), n] ∩ [1, Ii (γ)] ∩ [Ii (δ), n] 6= ∅. Now that Ii (f ) for all i = 1, 2, . . . , n and f ∈ {α, β, δ} have been computed but the Ii (γ)’s are not known, in the following we will use an “indirect” approach to determine whether the intersection of the above four intervals is empty for every i ∈ [1, n]. 3.2 Determining the Feasibility of λ For each i ∈ [1, n], define Qi = [1, Ii (α)] ∩ [Ii (β), n] ∩ [1, Ii (γ)] ∩ [Ii (δ), n]. Our goal is to determine whether Qi is empty for each i = 1, 2, . . . , n. H. Wang 7 i j ai gj + 1 gj Figure 5 Illustrating the graph G(i, ai ) with gj + 1 ≤ ai . Consider any i ∈ [1, n]. Since Ii (f ) for each f ∈ {α, β, δ} is known, we can determine the intersection [1, Ii (α)] ∩ [Ii (β), n] ∩ [Ii (δ), n] in constant time. If the intersection is empty, then we know that Qi = ∅. In the following, we assume the intersection is not empty. Let ai be the smallest index in the above intersection. As in [10], an easy observation is that Qi 6= ∅ if and only if ai ∈ [1, Ii (γ)]. If ai ≤ i (note that ai ≤ i actually implies ai = i since ai ≥ Ii (β) ≥ i), it is obviously true that ai ∈ [1, Ii (γ)] since i ≤ Ii (γ). Otherwise (i.e., i < ai ), according to the definition of Ii (γ), ai ∈ [1, Ii (γ)] if and only if γ(i, ai ) ≤ λ. Große et al. [10] gave an approach that can determine whether γ(i, ai ) ≤ λ in O(log n) time after O(n log n) time preprocessing. In the following, by new observations and with the help of the range minima data structure [2, 11], we show that whether γ(i, ai ) ≤ λ can be determined in constant time after O(n) time preprocessing. For each j ∈ [1, n], define gj as the largest index k in [j, n] such that dP (j, k) ≤ λ. Observe that g1 ≤ g2 ≤ · · · ≤ gn . Consider any i and the corresponding ai with i < ai . Our goal is to determine whether γ(i, ai ) ≤ λ. Since we are talking about γ(i, ai ), we are essentially considering the graph G(i, ai ). Recall that C(i, ai ) is the cycle P (i, ai ) ∪ e(i, ai ). By Observation 5, γ(i, ai ) = maxi≤k≤l≤ai dC(i,ai ) (k, l), and further, dC(i,j) (k, l) = min{dP (k, l), d1C(i,ai ) (k, l)} and d1C(i,ai ) (k, l) = dP (i, k) + |vi vai | + dP (l, ai ). For any j ∈ [i, ai − 1], if gj ≤ ai − 1, then vertex gj + 1 is in the cycle C(i, ai ). Note that 1 dC(i,ai ) (j, gj + 1) = dP (i, j) + |vi vai | + dP (gj + 1, ai ). See Fig. 5. We have the following lemma. I Lemma 9. γ(i, ai ) ≤ λ if and only if for each j ∈ [i, ai −1], either gj ≥ ai or d1C(i,ai ) (j, gj + 1) ≤ λ. Proof. Suppose γ(i, ai ) ≤ λ. Consider any j ∈ [i, ai − 1] such that gj ≤ ai − 1. Below we prove d1C(i,ai ) (j, gj + 1) ≤ λ must hold. By the definition of gj , it holds that dP (j, gj +1) > λ. Since γ(i, ai ) ≤ λ and dC(i,ai ) (j, gj + 1) ≤ γ(i, ai ), we obtain dC(i,ai ) (j, gj +1) ≤ λ. Note that dC(i,ai ) (j, gj +1) = min{dP (j, gj + 1), d1C(i,ai ) (j, gj + 1)}. Hence, it must hold that d1C(i,ai ) (j, gj + 1) ≤ λ. This proves one direction of the lemma. Suppose it is true that for each j ∈ [i, ai − 1], either gj ≥ ai or d1C(i,ai ) (j, gj + 1) ≤ λ. We prove γ(i, ai ) ≤ λ below. Consider any pair of indices (k, l) with i ≤ k ≤ l ≤ ai . To prove γ(i, ai ) ≤ λ, it is sufficient to show that dC(i,ai ) (k, l) ≤ λ. If k = l, then dC(i,ai ) (k, l) = 0 and thus dC(i,ai ) (k, l) ≤ λ obviously holds. In the following we assume k < l. This implies that k ≤ ai − 1. Hence, either gk ≥ ai or d1C(i,ai ) (k, gk + 1) ≤ λ. Recall that dC(i,ai ) (k, l) = min{dP (k, l), d1C(i,ai ) (k, l)}. If gk ≥ ai , then l ≤ ai ≤ gk , and thus, dP (k, l) ≤ λ by the definition of gk . Hence, we obtain dC(i,ai ) (k, l) ≤ λ. 8 Diameter-Optimally Augmenting Paths Otherwise, we have d1C(i,ai ) (k, gk + 1) ≤ λ. If l ≤ gk , we again have dP (k, l) ≤ λ and thus dC(i,ai ) (k, l) ≤ λ. If l ≥ gk + 1, then dP (l, ai ) ≤ dP (gk + 1, ai ). Hence, d1C(i,ai ) (k, l) = dP (i, k) + |vi vai | + dP (l, ai ) ≤ dP (i, k) + |vi vai | + dP (gk + 1, ai ) = d1C(i,ai ) (k, gk + 1) ≤ λ. Consequently, we again obtain dC(i,ai ) (k, l) ≤ λ. This proves the other direction of the lemma. J Recall that g1 ≤ g2 ≤ · · · ≤ gn . For each k ∈ [1, n], define hk to be the smallest index j in [1, k] with gj ≥ k. Observe that h1 ≤ h2 ≤ · · · ≤ hn . Note that if i < hai , then for each j ∈ [i, hai − 1], gj < ai and gj + 1 ≤ ai . Due to the preceding lemma, we further have the following lemma. I Lemma 10. γ(i, ai ) ≤ λ if and only if either hai ≤ i or d1C(i,ai ) (j, gj + 1) ≤ λ holds for each j ∈ [i, hai − 1]. Proof. Suppose γ(i, ai ) ≤ λ. If hai ≤ i, then we do not need to prove anything. In the following, we assume hai > i. Consider any j ∈ [i, hai − 1]. Our goal is to show that d1C(i,ai ) (j, gj + 1) ≤ λ holds. Indeed, since γ(i, ai ) ≤ λ, by Lemma 9, we have either gj ≥ ai or d1C(i,ai ) (j, gj + 1) ≤ λ. Since j ∈ [i, hai − 1], gj < ai . Hence, it must be that d1C(i,ai ) (j, gj + 1) ≤ λ. This proves one direction of the lemma. Suppose either hai ≤ i or d1C(i,ai ) (j, gj + 1) ≤ λ holds for each j ∈ [i, hai − 1]. Our goal is to show that γ(i, ai ) ≤ λ. Consider any k ∈ [i, ai − 1]. By Lemma 9, it is sufficient to show that either gk ≥ ai or d1C(i,ai ) (k, gk + 1) ≤ λ. If hai ≤ i, then since k ≥ i, we obtain gk ≥ ai by the definition of hai . Otherwise, d1C(i,ai ) (j, gj + 1) ≤ λ holds for each j ∈ [i, hai − 1]. If k ≥ hai , then we still have gk ≥ ai . Otherwise, k is in [i, hai − 1], and thus it holds that d1C(i,ai ) (k, gk + 1) ≤ λ. This proves the other direction of the lemma. J Let |C(i, ai )| denote the total length of the cycle C(i, ai ), i.e., |C(i, ai )| = dP (i, ai ) + |vi vai |. The following observation is crucial because it immediately leads to our algorithm in Lemma 12. I Observation 11. γ(i, ai ) ≤ λ if and only if either hai ≤ i or minj∈[i,hai −1] {dP (j, gj +1)} ≥ |C(i, ai )| − λ. Proof. Suppose hai > i. Then, for each j ∈ [i, hai − 1], gj < ai and gj + 1 ≤ ai . Note that d1C(i,ai ) (j, gj + 1) = |C(i, ai )| − dP (i, gj + 1). Hence, d1C(i,ai ) (j, gj + 1) ≤ λ is equivalent to dP (j, gj + 1) ≥ |C(i, ai )| − λ. Therefore, d1C(i,ai ) (j, gj + 1) ≤ λ holds for each j ∈ [i, hai − 1] if and only if minj∈[i,hai −1] {dP (j, gj + 1)} ≥ |C(i, ai )| − λ. By Lemma 10, the observation follows. J I Lemma 12. With O(n) time preprocessing, given any i ∈ [1, n] and the corresponding ai with i < ai , whether γ(i, ai ) ≤ λ can be determined in constant time. Proof. As preprocessing, we first compute gj for all j = 1, 2, . . . , n, which can be done in O(n) time due to the monotonicity property g1 ≤ g2 ≤ . . . ≤ gn . Then, we compute hk for all k = 1, 2, . . . , n, which can also be done in O(n) time due to the monotonicity property h1 ≤ h2 ≤ . . . ≤ hn . Next, we compute an array B[1, . . . , n] with B[j] = dP (j, gj + 1) for each j ∈ [1, n] (let dP (j, gj + 1) = ∞ if gj + 1 > n). We build a range-minima data structure H. Wang on B [2, 11]. The range minima data structure can be built in O(n) time such that given any pair (i, j) with 1 ≤ i ≤ j ≤ n, the minimum value of the subarray B[i · · · j] can be returned in constant time [2, 11]. This finishes the preprocessing step, which takes O(n) time in total. Consider any i and the corresponding ai with i < ai . Our goal is to determine whether γ(i, ai ) ≤ λ, which can be done in O(1) time as follows. By Observation 11, γ(i, ai ) ≤ λ if and only if either hai ≤ i or minj∈[i,hai −1] {dP (j, gj + 1)} ≥ |C(i, ai )| − λ. Since hai has been computed in the preprocessing, we check whether hai ≤ i is true. If yes, then we are done with the assertion that γ(i, ai ) ≤ λ. Otherwise, we need to determine whether minj∈[i,hai −1] {dP (j, gj + 1)} ≥ |C(i, ai )| − λ holds. To this end, we first compute minj∈[i,hai −1] {dP (j, gj + 1)} in constant time by querying the range-minima data structure on B with (i, hai − 1). Note that |C(i, ai )| can be computed in constant time. Therefore, we can determine whether γ(i, ai ) ≤ λ in O(1) time. This proves the lemma. J With Lemma 12, the decision problem can be solved in O(n) time. The proof of the following theorem summarizes our algorithm. I Theorem 13. Given any λ, we can determine whether λ is feasible in O(n) time, and further, if λ is feasible, a feasible edge can be found in O(n) time. Proof. First, we do the preprocessing in Lemma 4 in O(n) time. Then, for each f ∈ {α, β, δ}, we compute Ii (f ) for all i = 1, 2, . . . , n, in O(n) time. We also do the preprocessing in Lemma 12. Next, for each i ∈ [1, n], we do the following. Compute the intersection [1, Ii (α)] ∩ [Ii (β), n] ∩ [Ii (δ), n] in constant time. If the intersection is empty, then we are done for this i. Otherwise, obtain the smallest index ai in the above intersection. If ai ≤ i, then we stop the algorithm with the assertion that λ is feasible and report e(i, ai ) as a feasible edge. Otherwise, we use Lemma 12 to determine whether γ(i, ai ) ≤ λ in constant time. If yes, we stop the algorithm with the assertion that λ is feasible and report e(i, ai ) as a feasible edge. Otherwise, we proceed on i + 1. If the algorithm does not stop after we check all i ∈ [1, n], then we stop the algorithm with the assertion that λ is not feasible. Clearly, we spend O(1) time on each i, and thus, the total time of the algorithm is O(n). J 4 The Optimization Problem In this section, we present our algorithm that solves the optimization problem in O(n log n) time, by making use of our algorithm for the decision problem given in Section 3 (we will refer to it as the decision algorithm). It is sufficient to compute λ∗ , after which we can use our decision algorithm to find an optimal new edge in additional O(n) time. We start with an easy observation that λ∗ must be equal to the diameter D(i, j) of G(i, j) for some pair (i, j) with 1 ≤ i ≤ j ≤ n. Further, by Observation 2, λ∗ is equal to f (i, j) for some f ∈ {α, β, γ, δ} and some pair (i, j) with 1 ≤ i ≤ j ≤ n. For each f ∈ {α, β, γ, δ}, define Sf = {f (i, j) | 1 ≤ i ≤ j ≤ n}. Let S = ∪f ∈{α,β,γ,δ} Sf . According to our discussion above, λ∗ is in S. Further, note that λ∗ is the smallest feasible value of S. We will not compute the entire set S since |S| = Ω(n2 ). For each f ∈ {α, β, γ, δ}, let λf be the smallest feasible value in Sf . Hence, we have λ∗ = min{λα , λβ , λγ , λδ }. In the following, we first compute λα , λβ , λδ in O(n log n) time by using our decision algorithm and the sorted-matrix searching techniques [7, 8]. 9 10 Diameter-Optimally Augmenting Paths 4.1 Computing λα , λβ , and λδ For convenience, we begin with computing λβ . We define an n × n matrix M [1 · · · n; 1 · · · n]: For each 1 ≤ i ≤ n and 1 ≤ j ≤ n, define M [i, j] = β(i, j) if j ≥ i and M [i, j] = β(i, i) otherwise. By Observation 3, the following lemma shows that M is a sorted matrix in the sense that each row is sorted in descending order from left to right and each column is sorted in descending order from top to bottom. I Lemma 14. For each 1 ≤ i ≤ n, M [i, j] ≥ M [i, j + 1] for any j ∈ [1, n − 1]; for each 1 ≤ j ≤ n, M [i, j] ≥ M [i + 1, j] for any i ∈ [1, n − 1]. Proof. Consider any two adjacent matrix elements M [i, j] and M [i, j + 1] in the same row. If j ≥ i, then M [i, j] = β(i, j) and M [i, j + 1] = β(i, j + 1). By Observation 3, M [i, j] ≥ M [i, j + 1]. If j < i, then M [i, j] = M [i, j + 1] = β(i, i). Hence, in either case, M [i, j] ≥ M [i, j + 1] holds. Consider any two adjacent matrix elements M [i, j] and M [i + 1, j] in the same column. If j ≥ i + 1, then M [i, j] = β(i, j) and M [i + 1, j] = β(i + 1, j). By Observation 3, we obtain M [i, j] ≥ M [i, j + 1]. If j < i + 1, then M [i, j] = β(j, j) and M [i, j + 1] = β(j + 1, j + 1). Note that β(j, j) is essentially equal to dP (j, n) and β(j + 1, j + 1) is equal to dP (j + 1, n). Clearly, dP (j, n) ≥ dP (j + 1, n). Hence, in either case, M [i, j] ≥ M [i, j + 1]. J Note that each element of Sβ is in M and vice versa. Since λβ is the smallest feasible value of Sβ , λβ is also the smallest feasible value of M . We do not construct M explicitly. Rather, given any i and j, we can “evaluate” M [i, j] in O(log n) time since β(i, j) can be computed in O(log n) time if i ≤ j by Lemma 4. Using the sorted-matrix searching techniques [7, 8], we can find λβ in M by calling our decision algorithm O(log n) times and evaluating O(n) elements of M . The total time on calling the decision algorithm is O(n log n) and the total time on evaluating matrix elements is also O(n log n). Hence, we can compute λβ in O(n log n) time. Computing λα and λδ can done similarly in O(n log n) time, although the corresponding sorted matrices may be defined slightly differently. We omit the details. However, we cannot compute λγ in O(n log n) time in the above way, and again this is due to the λ-computation difficulty mentioned in Section 2. Note that having λα , λβ , and λδ essentially reduces our search space for λ∗ from S to Sγ ∪ {λα , λβ , λδ }. We compute λ1 = min{λα , λβ , λδ }. Thus, λ∗ = min{λ1 , λγ }. Hence, if λγ ≥ λ1 , then ∗ λ = λ1 and we are done for computing λ∗ . Otherwise (i.e., λγ < λ1 ), it must be that λ∗ = λγ and we need to compute λγ . To compute λγ , again we cannot use the similar way as the above for computing λβ . Instead, we use the following approach. We should point out that the success of the approach relies on the information implied by λγ < λ1 . 4.2 Computing λ∗ in the Case λγ < λ1 We assume λγ < λ1 . Hence, λ∗ = λγ . Let e(i∗ , j ∗ ) be the new edge added to P in an optimal solution. We also call e(i∗ , j ∗ ) an optimal edge. Since λ∗ = λγ < λ1 , we have the following observation. I Observation 15. If λγ < λ1 and e(i∗ , j ∗ ) is an optimal edge, then λ∗ = γ(i∗ , j ∗ ). Proof. Assume to the contrary that λ∗ = 6 γ(i∗ , j ∗ ). Then, by Observation 2, λ∗ is equal to one of α(i∗ , j ∗ ), β(i∗ , j ∗ ), and δ(i∗ , j ∗ ). Without loss of generality, assume λ∗ = α(i∗ , j ∗ ). H. Wang 11 γ λ1 α β δ ai ∗ − 1 ai ∗ ai∗ + 1 Figure 6 Illustrating f (i∗ , j) as j changes for f ∈ {α, β, γ, δ}. The three indices ai∗ − 1, ai∗ , and a i∗ + 1 are shown. Since α(i∗ , j ∗ ) is in Sα , λ∗ must be the smallest feasible value of Sα , i.e., λ∗ = λα . However, this contradicts with that λ∗ = λγ < λ1 = min{λα , λβ , λγ } ≤ λα . J For any i ∈ [1, n], for each f ∈ {α, β, γ, δ}, with respect to λ1 , we define Ii0 (f ) in a similar way to Ii (f ) defined in Section 3 with respect to λ except that we change “≤ λ” to “< λ1 ”. Specifically, define Ii0 (α) to be the largest index j ∈ [i, n] such that α(i, j) < λ1 . I 0 (γ) is defined similarly to Ii0 (α). If β(i, n) < λ1 , then define Ii0 (β) to be the smallest index j ∈ [i, n] such that β(i, j) < λ1 ; otherwise Ii0 (β) = ∞. Ii0 (δ) is defined similarly to Ii0 (β). Note that similar monotonicity properties for Ii0 (f ) with f ∈ {α, β, γ, δ} to those in Lemma 7 also hold. Recall that e(i∗ , j ∗ ) is an optimal edge. An easy observation is that since λ1 is strictly larger than λ∗ , the intersection [1, Ii0∗ (α)] ∩ [Ii0∗ (β), n] ∩ [Ii0∗ (δ), n] cannot be empty. Let ai∗ be the smallest index in the above intersection. Note that i∗ ≤ ai∗ since i∗ ≤ Ii0∗ (β) ≤ ai∗ . The following lemma shows that e(i∗ , ai∗ ) is actually an optimal edge. I Lemma 16. If λγ < λ1 and e(i∗ , j ∗ ) is an optimal edge, then j ∗ = ai∗ . Proof. For any pair (i, j) with 1 ≤ i ≤ j ≤ n, let η(i, j) = max{α(i, j), β(i, j), δ(i, j)}. By Observation 2, D(i, j) = max{γ(i, j), η(i, j)}. We first prove the following claim: If γ(i∗ , ai∗ ) ≥ η(i∗ , ai∗ ), then j ∗ = ai∗ (e.g., see Fig. 6). On the one hand, consider any j ∈ [i∗ , ai∗ − 1]. By the definition of ai∗ , η(i∗ , j) ≥ λ1 . Since λ1 > λγ = λ∗ , η(i∗ , j) > λ∗ . By Observation 2, D(i∗ , j) ≥ η(i∗ , j) > λ∗ . Hence, j cannot be j ∗ since otherwise D(i∗ , j) would be equal to λ∗ , incurring contradiction. On the other hand, consider any j ∈ [a∗ + 1, n]. By Observation 2, D(i∗ , j) ≥ γ(i∗ , j). By Observation 3, γ(i∗ , j) ≥ γ(i∗ , ai∗ ). Hence, D(i∗ , j) ≥ γ(i∗ , ai∗ ). Further, since γ(i∗ , ai∗ ) ≥ η(i∗ , ai∗ ) (the claim hypothesis), we have D(i∗ , ai∗ ) = max{γ(i∗ , ai∗ ), η(i∗ , ai∗ )} = γ(i∗ , ai∗ ). Therefore, we obtain D(i∗ , ai∗ ) ≤ D(i∗ , j). This implies that j ∗ = ai∗ . Hence, the claim follows. We proceed to prove the lemma. Based on the above claim, it is sufficient to show that ∗ γ(i , ai∗ ) ≥ η(i∗ , ai∗ ), as follows. Assume to the contrary that γ(i∗ , ai∗ ) < η(i∗ , ai∗ ). Then, D(i∗ , ai∗ ) = η(i∗ , ai∗ ). According to the definition of ai∗ , η(i∗ , ai∗ ) < λ1 . Hence, D(i∗ , ai∗ ) < λ1 . Let λ0 = D(i∗ , ai∗ ). Since λ0 = η(i∗ , ai∗ ), λ0 is a value in Sα ∪ Sβ ∪ Sδ . Since λ0 = D(i∗ , ai∗ ), λ0 is a feasible value (i.e., λ0 ≥ λ∗ ). Recall that λ1 is the smallest feasible value of Sα ∪ Sβ ∪ Sδ . Thus, we obtain contradiction since λ0 < λ1 . Therefore, γ(i∗ , ai∗ ) ≥ η(i∗ , ai∗ ) holds. The lemma thus follows. J Lemma 16 is crucial because it immediately suggests the following algorithm. We first compute the indices Ii0 (α), Ii0 (β), Ii0 (δ) for i = 1, . . . , n. This can be done in O(n) time using the similar algorithms as those for computing Ii (α), Ii (β), Ii (δ) in Section 3.1. In 12 Diameter-Optimally Augmenting Paths fact, here we can even afford O(n log n) time to compute these indices. Hence, for simplicity, we can use the similar algorithm as that for computing Ii (δ) in Section 3.1 instead of the one in Lemma 8. The total time is O(n log n). Next, for each i ∈ [1, n], if [1, Ii0 (α)] ∩ [Ii0 (β), n] ∩ [Ii0 (δ), n] 6= ∅, then we compute ai , i.e., the smallest index in the above intersection. Let I be the set of index i such that the above interval intersection for i is not empty. Lemma 16 leads to the following observation. I Observation 17. If λγ < λ1 , then λ∗ is the smallest feasible value of the set {γ(i, ai ) | i ∈ I}. Proof. By Lemma 16, one of the edges of {e(i, ai ) | i ∈ I} is an optimal edge. By Observation 15, λ∗ is in {γ(i, ai ) | i ∈ I}. Thus, λ∗ is the smallest feasible value in {γ(i, ai ) | i ∈ I}. J We can further obtain the following “stronger” result, although Observation 17 is sufficient for our algorithm. I Lemma 18. If λγ < λ1 , then λ∗ = mini∈I γ(i, ai ). Proof. For any pair (i, j) with 1 ≤ i ≤ j ≤ n, let η(i, j) = max{α(i, j), β(i, j), δ(i, j)}. By Observation 2, D(i, j) = max{γ(i, j), η(i, j)}. We first prove the following claim: For any i ∈ I, η(i, ai ) < γ(i, ai ). Indeed, assume to the contrary that η(i, ai ) ≥ γ(i, ai ) for some i ∈ I. Then, D(i, ai ) = η(i, ai ). By the definition of ai , η(i, ai ) < λ1 . Hence, D(i, ai ) < λ1 . Let λ0 = D(i, ai ). Note that λ0 is a feasible value that is in Sα ∪ Sβ ∪ Sδ . However, λ0 < λ1 contradicts with that λ1 is the smallest feasible value in Sα ∪ Sβ ∪ Sδ . Next, we prove the lemma by using the above claim. For each i ∈ I, by the above clam, D(i, ai ) = γ(i, ai ), and thus, γ(i, ai ) is a feasible value. By Lemma 16, we know that λ∗ is in {γ(i, ai ) | i ∈ I}. Therefore, λ∗ is the smallest value in {γ(i, ai ) | i ∈ I}. The lemma thus follows. J Observation 17 essentially reduces the search space for λ∗ to {γ(i, ai ) | i ∈ I}, which has at most O(n) values. It is tempting to first explicitly compute the set and then find λ∗ from the set. However, again, due to the γ-computation difficulty, we are not able to compute the set in O(n log n) time. Alternatively, we use the following approach to compute λ∗ . 4.3 Finding λ∗ in the Set {γ(i, ai ) | i ∈ I} Recall that according to Observation 5, γ(i, j) = maxi≤k≤l≤j dC(i,j) (k, l), with dC(i,j) (k, l) = min{dP (k, l), d1C(i,j) (k, l)} and d1C(i,j) (k, l) = dP (i, k) + |vi vj | + dP (l, j). Hence, γ(i, j) is equal to dP (k, l) or d1C(i,j) (k, l) for some k ≤ l. Therefore, by Observation 17, there exists i ∈ I such that λ∗ is equal to dP (k, l) or d1C(i,j) (k, l) for some k and l with i ≤ k ≤ l ≤ ai . Let Sp = {dP (k, l) | 1 ≤ k ≤ l ≤ n} and Sc = {d1C(i,j) (k, l) | i ≤ k ≤ l ≤ ai , i ∈ I}. Based on our above discussion, λ∗ is in Sp ∪ Sc . Further, λ∗ is the smallest feasible value in Sp ∪ Sc . Let λp be the smallest feasible value of Sp and let λc be the smallest feasible value of Sc . Hence, λ∗ = min{λp , λc }. By using the technique of searching sorted-matrices [7, 8], the following lemma computes λp in O(n log n) time. I Lemma 19. λp can be computed in O(n log n) time. H. Wang 13 i k h′ai gk′ ai l l−1 Figure 7 Illustrating the graph G(i, ai ) whose diameter is λ∗ and λ∗ = dC(i,ai ) (k, l). Proof. We define an n × n matrix M [1 · · · n; 1 · · · n]: For each 1 ≤ i ≤ n and 1 ≤ j ≤ n, define M [i, j] = dP (i, j) if j ≥ i and M [i, j] = 0 otherwise. It is easy to verify that each row of M is sorted in ascending order from the left to right and each column is sorted in ascending order from bottom to top. Consequently, by using the sorted-matrix searching technique [7, 8], λp can be found by calling our decision algorithm O(log n) times and evaluating O(n) elements of M . Clearly, given any i and j, we can evaluate M [i, j] in constant time. Hence, λp can be computed in O(n log n) time. J Recall that λ∗ = min{λp , λc }. In the case λp ≤ λc , λ∗ = λp and we are done with computing λ∗ . In the following, we assume λp > λc . Thus, λ∗ = λc . With the help of the information implied by λp > λc , we will compute λ∗ in O(n log n) time. The details are given below. For any j ∈ [1, n], let gj0 denote the largest index k ∈ [j, n] such that the subpath length dP (j, k) is strictly smaller than λp . Note that the definition of gj0 is similar to gj defined in Section 4.3 except that we change “≤ λ” to “< λp ”. For each k ∈ [1, n], let h0k denote the smallest index j ∈ [1, k] with gj0 ≥ k. Let I 0 be the subset of i ∈ I 0 such that i ≤ h0ai − 1. Hence, for each i ∈ I 0 and each j ∈ [i, h0ai − 1], gj0 < ai and thus gj0 + 1 ≤ ai . For each i ∈ I 0 , define d1max (i, ai ) = maxj∈[i,h0a −1] d1C(i,j) (j, gj0 + 1). The following lemma i gives a way to determine λ∗ . I Lemma 20. If λγ < λ1 and λc < λp , then λ∗ = d1max (i, ai ) for some i ∈ I 0 . Proof. Since λγ < λ1 and λc < λp , by our above discussions, λ∗ = λc . By Observation 17, λ∗ is the diameter of the graph G(i, ai ) for some i ∈ I and λ∗ is equal to the length of the shortest path of two vertices vk and vl in C(i, ai ) for i ≤ k ≤ l ≤ ai , i.e., λ∗ = dC(i,ai ) (k, l) = min{dP (k, l), d1C(i,j) (k, l)}. See Fig. 7. Since λ∗ = λc , we further know that λ∗ = d1C(i,j) (k, l) and d1C(i,j) (k, l) ≤ dP (k, l). In fact, d1C(i,j) (k, l) < dP (k, l), since otherwise if d1C(i,j) (k, l) = dP (k, l), then λ∗ = dP (k, l) would be in the set Sp , contradicting with that λp is the smallest feasible value in Sp and λ∗ < λp . For simplicity of discussion, we assume |vl vl−1 | > 0 (since otherwise we can keep updating l to l − 1 until we find |vl vl−1 | > 0; note that such an l will eventually be found before we reach k since 0 ≤ λ∗ = d1C(i,j) (k, l) < dP (k, l)). We prove the following claim: dP (k, l − 1) < λp ≤ dP (k, l). On the one hand, since λ∗ = d1C(i,ai ) (k, l) and |vl vl−1 | > 0, we obtain that λ∗ < d1C(i,ai ) (k, l − 1). Since λ∗ is the diameter in the graph G(i, ai ), dG(i,ai ) (k, l − 1) = dC(i,ai ) (k, l − 1) ≤ λ∗ . Further, because dC(i,ai ) (k, l − 1) = min{dP (k, l − 1), d1C(i,ai ) (k, l − 1)} and λ∗ < d1C(i,ai ) (k, l − 1), we obtain dP (k, l − 1) ≤ λ∗ . As λ∗ = λc < λp , it follows that dP (k, l − 1) < λp . 14 Diameter-Optimally Augmenting Paths On the other hand, assume to the contrary that λp > dP (k, l). Then, since dP (k, l) > d1C(i,ai ) (k, l) = λ∗ , dP (k, l) is a feasible value. Clearly, dP (k, l) is in the set Sp . However, λp > dP (k, l) contradicts with that λp is the smallest feasible value in Sp . This proves the claim. With the claim, we show below that λ∗ = d1max (i, ai ), which will prove the lemma. We first show that i is in I 0 , i.e., i ≤ h0ai − 1. Indeed, since λp ≤ dP (k, l) (by the claim), based on the definition of gk0 , it holds that gk0 < l (e.g., see Fig. 7). Since l ≤ ai , we obtain gk0 ≤ ai − 1. This implies that k < h0ai and thus k ≤ h0ai − 1. Since i ≤ k, i ≤ h0ai − 1. It remains to prove λ∗ = d1max (i, ai ). Indeed, recall that λ∗ = d1C(i,ai ) (k, l). Note that the above claim in fact implies that gk0 = l − 1, and thus, gk0 + 1 = l. Hence, we have λ∗ = d1C(i,ai ) (k, l) = d1C(i,ai ) (k, gk0 + 1). Note that k is in [i, h0ai − 1]. Consider any j ∈ [i, h0ai − 1]. To prove λ∗ = d1max (i, ai ), it is now sufficient to prove λ∗ ≥ d1C(i,ai ) (j, gj0 + 1), as follows. Recall that gj0 + 1 = l ≤ ai . Since λ∗ is the diameter of G(i, ai ), dG(i,ai ) (j, gj0 + 1) = dC(i,ai ) (j, gj0 + 1) ≤ λ∗ . Recall that dC(i,ai ) (j, gj0 + 1) = min{dP (j, gj0 + 1), d1C(i,ai ) (j, gj0 + 1)}. By the definition of gj0 , we know that dP (j, gj0 + 1) ≥ λp . Since λp > λ∗ , dP (j, gj0 + 1) > λ∗ . Hence, it must be that λ∗ ≥ d1C(i,ai ) (j, gj0 + 1). This proves that λ∗ = d1max (i, ai ). The lemma thus follows. J In light of Lemma 20, in the case of λc < λp , λ∗ = λc is the smallest feasible value of for all i ∈ I 0 . Note that the number of such values d1max (i, ai ) is O(n). Hence, if we can compute d1max (i, ai ) for all i ∈ I 0 , then λ∗ can be easily found in additional O(n log n) time using our decision algorithm, e.g., by first sorting these values and then doing binary search. The next lemma gives an algorithm that can compute d1max (i, ai ) for all i ∈ I 0 in O(n) time, with the help of the range-minima data structure [2, 11]. d1max (i, ai ) I Lemma 21. d1max (i, ai ) for all i ∈ I 0 can be computed in O(n) time. Proof. Consider any i ∈ I 0 . For any j ∈ [i, h0ai −1 ], it is easy to see that d1C(i,ai ) (j, gj + 1) = |C(i, ai )| − dP (j, gj + 1), where |C(i, ai )| is the length of the cycle C(i, ai ). Hence, we can obtain the following, d1max (i, ai ) = max j∈[i,h0a −1] i d1C(i,j) (j, gj0 + 1) = max j∈[i,h0a −1] {|C(i, ai )| − dP (j, gj0 + 1)} i = |C(i, ai )| − min j∈[i,h0a −1] dP (j, gj0 + 1). i minj∈[i,h0a −1] dP (j, gj0 i Define dmin (i, ai ) = + 1). By the above discussions we have = |C(i, ai )| − dmin (i, ai ). Therefore, computing d1max (i, ai ) boils down to computing dmin (i, ai ). In the following, we compute dmin (i, ai ) for all i ∈ I 0 in O(n) time, after which d1max (i, ai ) for all i ∈ I 0 can be computed in additional O(n) time. First of all, we compute gj0 and h0j for all j = 1, 2, . . . , n. This can be easily done in O(n) time due to the monotonicity properties: g10 ≤ g20 ≤ · · · ≤ gn0 and h01 ≤ h02 ≤ · · · ≤ h0n . Recall that for each i ∈ I, ai has already been computed. Then, we can compute I 0 in O(n) time by checking whether i ≤ h0ai − 1 for each i ∈ I. Next we compute an array B[1 · · · n] such that B[j] = dP (j, gj0 + 1) for each j ∈ [1, n]. Clearly, the array B can be computed in O(n) time. Then, we build a range-minima data structure on B [2, 11]. The range-minima data structure can be built in O(n) time such that given any pair (i, j) with 1 ≤ i ≤ j ≤ n, the minimum value of the subarray B[i · · · j] can be computed in constant time. d1max (i, ai ) H. Wang Finally, for each i ∈ I 0 , we can compute dmin (i, ai ) in constant time by querying the range-minima data structure on B with (i, h0ai − 1). Therefore, we can compute dmin (i, ai ) for all i ∈ I 0 , and thus compute d1max (i, ai ) for all i ∈ I 0 in O(n) time. J In summary, we can compute λ∗ in O(n log n) time in the case λγ < λ1 and λc < λp . Our overall algorithm for computing an optimal solution is summarized in the proof of Theorem 22. I Theorem 22. An optimal solution for the optimization problem can be found in O(n log n) time. Proof. First, we compute λα , λβ , and λδ , in O(n log n) time by using our decision algorithm and the sorted-matrix searching techniques. Then, we compute λ1 = min{λα , λβ , λδ }. Second, by using λ1 , we compute the indices Ii0 (α), Ii0 (β), and Ii0 (δ) for all i = 1, 2, . . . , n. This can be done in O(n) time. For each i ∈ [1, n], if [1, Ii0 (α)] ∩ [Ii0 (β), n] ∩ [Ii0 (δ), n] 6= ∅, we compute ai (i.e., the smallest index in the above intersection) and add i to the set I (initially I = ∅). Hence, all such ai ’s and I can be computed in O(n) time. If I = ∅, then we return λ1 as λ∗ . If I 6= ∅, then we compute λp in O(n log n) time by Lemma 19. We proceed to compute d1max (i, ai ) for all i ∈ I 0 by Lemma 21, and then find the smallest feasible value λ0 in the set {d1max (i, ai ) | i ∈ I 0 } in O(n log n) time. Finally, we return min{λ1 , λp , λ0 } as λ∗ . The above computes λ∗ in O(n log n) time. Applying λ = λ∗ on our decision algorithm can eventually find an optimal edge in additional O(n) time. J References 1 2 3 4 5 6 7 8 9 10 N. Alon, A. Gyárfás, and M. Ruszinkó. Decreasing the diameter of bounded degree graphs. Journal of Graph Theory, 35:161–172, 2000. M. Bender and M. Farach-Colton. The LCA problem revisited. In Proc. of the 4th Latin American Symposium on Theoretical Informatics, pages 88–94, 2000. D. Bilò, Luciano Gualà, and Guido Proietti. Improved approximability and nonapproximability results for graph diameter decreasing problems. Theoretical Computer Science, 417:12–22, 2012. J.-L. De Carufel, C. Grimm, A. Maheshwari, and M. Smid. Minimizing the continuous diameter when augmenting paths and cycles with shortcuts. In Proc. of the 15th Scandinavian Workshop on Algorithm Theory (SWAT), pages 27:1–27:14, 2016. E.D. Demaine and M. Zadimoghaddam. Minimizing the diameter of a network using shortcut edges. In Proc. of the 12th Scandinavian conference on Algorithm Theory (SWAT), pages 420–431, 2010. F. Frati, S. Gaspers, J. Gudmundsson, and L. Mathieson. Augmenting graphs to minimize the diameter. Algorithmica, 72:995–1010, 2015. G. Frederickson and D. Johnson. Generalized selection and ranking: Sorted matrices. SIAM Journal on Computing, 13(1):14–30, 1984. G.N. Frederickson and D.B. Johnson. Finding kth paths and p-centers by generating and searching good data structures. Journal of Algorithms, 4(1):61–80, 1983. Y. Gao, D.R. Hare, and J. Nastos. The parametric complexity of graph diameter augmentation. Discrete Applied Mathematics, 161:1626–1631, 2013. U. Große, J. Gudmundsson, C. Knauer, M. Smid, and F. Stehn. Fast algorithms for diameter-optimally augmenting paths. In Proc. of the 42nd International Colloquium on Automata, Languages and Programming (ICALP), pages 678–688, 2015. 15 16 Diameter-Optimally Augmenting Paths 11 12 13 14 15 D. Harel and R.E. Tarjan. Fast algorithms for finding nearest common ancestors. SIAM Journal on Computing, 13:338–355, 1984. T. Ishii. Augmenting outerplanar graphs to meet diameter requirements. Journal of Graph Theory, 74:392–416, 2013. C.-L. Li, S.T. McCormick, and D. Simchi-Levi. On the minimum-cardinality-boundeddiameter and the bounded-cardinality-minimum-diameter edge addition problems. Operations Research Letters, 11:303–308, 1992. N. Megiddo. Applying parallel computation algorithms in the design of serial algorithms. Journal of the ACM, 30(4):852–865, 1983. A.A. Schoone, H.L. Bodlaender, and J. Van Leeuwen. Diameter increase caused by edge deletion. Journal of Graph Theory, 11:409–427, 1997.
8cs.DS
Distributed Event-Triggered Control for Asymptotic Synchronization of Dynamical Networks ⋆ Tao Liu aMing Cao bClaudio De Persis bJulien M. Hendrickx c arXiv:1508.04606v3 [cs.SY] 6 Jan 2018 a Department of Electrical and Electronic Engineering The University of Hong Kong, Hong Kong S.A.R., China b Faculty of Science and Engineering University of Groningen, 9747 AG, Groningen, The Netherlands c ICTEAM Institute, Université catholique de Louvain, Louvain-la-Neuve, Belgium Abstract This paper studies synchronization of dynamical networks with event-based communication. Firstly, two estimators are introduced into each node, one to estimate its own state, and the other to estimate the average state of its neighbours. Then, with these two estimators, a distributed event-triggering rule (ETR) with a dwell time is designed such that the network achieves synchronization asymptotically with no Zeno behaviours. The designed ETR only depends on the information that each node can obtain, and thus can be implemented in a decentralized way. Key words: distributed event-triggered control, asymptotic synchronization, dynamical networks. 1 Introduction Synchronization of dynamical networks, and its related problem—consensus of multi-agent systems, have attracted a lot of attention due to their extensive applications in various fields (see Arenas et al. (2008); Olfati-Saber et al. (2007); Ren et al. (2007); Wu (2007) for details). Motivated by the fact that connected nodes in some real-world networks share information over a digital platform, these problems have recently been investigated under the circumstance that nodes communicate to their neighbours only at certain discrete-time instants. To use the limited communication network resources effectively, event-triggered control (ETC) (see Heemels et al. (2012) and reference therein) introduced in networked control systems has been extensively used to synchronize networks. Under such a circumstance, each node can only get limited information, and the main issue becomes how to use these limited information to design an ETR for each node such that the network achieves synchronization asymptotically and ⋆ The material in this paper was not presented at any conference. Email addresses: [email protected] (Tao Liu), [email protected] (Ming Cao), [email protected] (Claudio De Persis), [email protected] (Julien M. Hendrickx). Preprint submitted to Automatica meanwhile to prevent Zeno behaviours that are caused by the continuous/discrete-time hybrid nature of ETC, and undesirable in practice (Tabuada (2007)). Early works in ETC focused on dynamical networks with simple node dynamics such as single-integrators and double-integrators. In Dimarogonas and Johansson (2009), distributed ETC was used to achieve consensus. To prevent Zeno behaviour, a decentralized ETR with a time-varying threshold was introduced to achieve consensus in Seyboth et al. (2013). Self-triggered strategies were proposed in De Persis and Frasca (2013) and shown to be robust to skews of the local clocks, delays, and limited precision in the communication. Most recently, attention has been increasingly paid to networks with generalized linear node dynamics. Different types of ETC have been developed to achieve either bounded or asymptotic synchronization for such networks (e.g., Demir and Lunze (2012); Zhu et al. (2014); Liu et al. (2013); Meng and Chen (2013); Xiao et al. (2015); Garcia et al. (2015); Yang et al. (2016); Hu et al. (2016)). In order to achieve asymptotic synchronization as well as to prevent Zeno behaviours, two main methods are developed in the literature. One uses bidirectional communication, i.e., at each event time, a node sends its sampled state to its neighbours and meanwhile asks for its neighbours’ current states to update the 9 January 2018 We consider a dynamical network described by control signal (e.g., Meng and Chen (2013); Xiao et al. (2015); Hu et al. (2016)). The other uses unidirectional communication, i.e., a node only sends its sampled information to its neighbours but does not require information from its neighbours (e.g., Liu et al. (2013); Garcia et al. (2015); Yang et al. (2016)). However, the latter needs di + 1 ≥ 2 estimators in each node and uses an exponential term in the ERT in oder to prevent Zeno behaviours. ẋi (t) = Hxi (t) + Bui (t), ∀i ∈ V where xi = (xi1 , xi2 , . . . , xin )⊤ ∈ Rn is the state of node i. H ∈ Rn×n , B ∈ Rn , and ui ∈ R are the node dynamics matrix, input matrix, and control input, respectively. Generally, continuous communication between neighbouring nodes is assumed, i.e., P ui (t) = K N j=1 aij (xj (t) − xi (t)). This yields the following network In this paper, we study asymptotic synchronization of networks with generalized linear node dynamics by using the unidirectional communication method. The main differences from the existing results are as follows. Firstly, a new sampling mechanism is used with which two estimators are introduced into each node, whereas most existing results need every node to estimate the states of all its neighbours. Secondly, inspired by the method proposed in Tallapragada and Chopra (2014), we replace the exponential term extensively used in the literature by a dwell time that was originally introduced in switched systems (Cao and Morse (2010)), which can simplify the implementation of the designed ETR. Thirdly, a distributed ETR for each node is designed based on the two estimators and dwell time, whereas most of the existing results use decentralized ETRs that only consist of local information of the node itself, i.e., the state error between the node and its own estimator and the time-dependent exponential term (e.g., Garcia et al. (2015); Yang et al. (2016)). By introducing an estimation of the synchronization errors between neighbours using the neighbours’ sampled information, the proposed ETR method can reduce the number of sampling times for each node significantly. 2 (1) ẋi (t) = Hxi + BK XN j=1 aij (xj (t) − xi (t)). (2) In this paper, we assume that connections in (1) are realized via discrete communication, i.e., each node only obtains information from its neighbours at certain discretetime instants. We will present an event-triggered version of network (2), and study how to design an ETR for each node to achieve asymptotic synchronization. We suppose that the topological structure of the network is fixed, undirected and connected. We introduce two estimators Oi and OVi into each node i, where Oi is used to estimate its own state, and OVi is used to estimate the average state of its neighbours. We adopt the following control input ui (t) = K (x̂Vi (t) − lii x̂i (t)) (3) where K ∈ R1×n is the control gain to be designed, x̂i ∈ Rn and x̂Vi ∈ Rn are states of Oi and OVi , respectively. The state equations of Oi and OVi are given by Oi : Network Model and Preliminaries Notation: Denote the set of real numbers, non-negative real numbers, and non-negative integers by R, R+ , and Z+ ; the set of n-dimensional real vectors and n × m real matrices by Rn and Rn×m . In , 1n and 1n×m are the n-dimensional identity matrix, n-dimensional vector and n × m matrix with all entries being 1, respectively. k · k represents the Euclidean norm for vectors and also the induced norm for matrices. The superscript (·)⊤ is the transpose of vectors or matrices. ⊗ is the Kronecker product of matrices. For a single ω : R+ → Rn , ω(t− ) = lims↑t ω(s). Let G be an undirected graph consisting of a node set V = {1, 2, . . . , N } and a link set E = {ē1 , ē2 , . . . , ēM }. If there is a link ēk between nodes i and j, then we say node j is a neighbour of node i and vice versa. Let A = (aij ) ∈ RN ×N be the adjacency matrix of G, where aii = 0 and aij = aji > 0, i 6= j, if node i and node j are neighbours, otherwise aij = aji = 0. The Laplacian matrix L = (lij ) ∈ RN ×N is defined by PN lij = −aij , if j 6= i and lii = j=1 aij . OVi : x̂˙ i (t) = H x̂i (t), t ∈ [tki , tki +1 ) x̂i (t) = xi (t), t = tki x̂˙ Vi (t) = H x̂Vi (t), − x̂Vi (t) = x̂Vi (t ) − P j∈Ji t ∈ [tk̄i , tk̄i +1 ) ej (t− ), t = tk̄i . (4) (5) The increasing time sequences {tki } and {tk̄i }, ki , k̄i ∈ Z+ represent time instants that node i sends updates to its neighbours and that it receives updates from one or more of its neighbours, respectively. We assume that: there is no time delay for computation and execution, i.e., tki represents both the ki th sampling time and the ki th time when node i broadcasts updates; and the communication network is under an ideal circumstance, i.e., there are no time delays or data dropouts in communication. Therefore, the set Ji = Ji (tk̄i ) = j | tkj = tk̄i , j ∈ Vi is a subset of Vi , from which node i receives updated information at t = tk̄i , and Vi = {j | aij > 0, j ∈ V} is the index set of the neighbours for node i. The vector ei (t) = x̂i (t)−xi (t) represents the deviation between the state of estimator Oi and its own, and which node i can easily compute. 2 In network (7), ẑi in ETR (10) contains information of x̂j , j ∈ Vi which are not available for node i as node i only has estimator (7b). Therefore, one estimator for each node is insufficient to implement ETR (10) in practice. To overcome this difficulty, we introduce another estimator (5) into each node. It is shown that network (7) is theoretically equivalent to network (1) with the two estimators Oi , OVi , and ETR (10) is equivalent to ETR (6) which can be implemented in practice. The time sequence {tki } is decided by the ETR tki +1 = inf {t > tki | ri (t, xi , x̂i , x̂Vi ) > 0} (6) where ri (·, ·, ·, ·) : R+ × Rn × Rn × Rn → R is the eventtriggering function to be designed. For t > tki , if ri > 0 − − at t = t− ki +1 , then node i samples xi (tki +1 ), x̂i (tki +1 ), − − calculates ei (tki +1 ), sends ei (tki +1 ) to its neighbours, and reinitialize the estimator Oi at t = tki +1 by xi (tki +1 ). In addition, node i will reinitialize P the estima− ) − tor OVi by x̂Vi (tk̄i +1 ) = x̂Vi (t− j∈Ji ej (tk̄i +1 ) k̄i +1 each time when it receives updates from its neighbours. We further assume the network is well initialized at t = t0 , i.e., x̂i (t0 ) = 0 and each node samples and sends ei (t0 ) to its neighbours. Therefore, we have P x̂i (t0 ) = xi (t0 ), x̂Vi (t0 ) = j∈Vi xj (t0 ) and Ji (t0 ) = Vi for all i ∈ V. Then, the problem is with the given network topology, to design a proper ETR (6) such that network (1) achieves synchronization asymptotically without Zeno behaviours. Remark 1 It is shown in Liu et al. (2013) that under the same assumptions, a network with di + 1 estimators for each node (di is the number of neighbours of node i) is also theoretically equivalent to network (7), and thus equivalent to network (1) with two estimators Oi and OVi . On the other hand, the error ei (t) = x̂i (t) − xi (t) is extensively used in the literature to design ETR, where each node sends its sampled state to its neighbours. By having each node sending ei (tki ) instead of xi (tki ), it turns out that we can reduce the number of estimators. The implementation of this new sampling mechanism needs no more information than that used in the literature. Further, instead of calculating di +1 ≥ 2 estimators x̂j , our method only calculates x̂i and x̂Vi for each node i, and hence, our method has implementation advantages, in particular for networks with large di and limited embedded computing resources in each node. Like most of the existing results in the literature of ETC, in our method each node needs to send ei (t) (or xi (t)) to its neighbours rather than the relative state information (xj (t) − xi (t)) that is extensively used in network (2) with continuously interconnected nodes. Of course, it is important to study network (7) by only using the relative state information for the design purposes which should be studied in the future. To simplify the analysis, we will show that network (1) with controller (3) and estimators (4), (5) is equivalent to the following system where each node maintains an estimator of the state of each of its neighbours. ẋi (t) = Hxi (t) − BK Oi : XN j=1 lij x̂j (t), ∀i ∈ V (7a) x̂˙ i (t) = H x̂i (t), t ∈ [tki , tki +1 ) x̂i (t) = xi (t), (7b) t = tki . P P ˙ ˙ Defining z̄i = j∈Vi x̂j gives z̄i (t) = j∈Vi x̂j (t) = H z̄i (t), t ∈ [tk̄i , tk̄i +1 ), which has the same dynamics as x̂Vi defined in (5). Moreover, at t = tk̄i , we have z̄i (t) = X x̂j (t− ) + X j∈Vi /Ji (t) = x̂Vi (t). xj (t) j∈Ji (t) j∈Vi /Ji (t) = X This paper will use model (7) and ETR (10) for the analysis. But the obtained results can be implemented by using controller (3) with the two estimators Oi , OVi and ETR (6). Based on network (7), we give the definition of asymptotic synchronisation. x̂j (t− ) + X j∈Ji (t)  x̂j (t− ) − ej (t− ) ⊤ ⊤ ⊤ ∈ Definition 1 Let x(t) = x⊤ 1 (t), x2 (t), . . . , xN (t)  ⊤ ⊤ ⊤ nN (t), . . . , x̂ (t) ∈ R be (t), x̂ RnN and x̂(t) = x̂⊤ 2 1 N a solution of network (7) with initial condition x0 = ⊤ ⊤ ⊤ (x⊤ 10 , x20 , . . . , xN 0 ) and xi0 = xi (t0 ). Then, the network is said to achieve synchronization asymptotically, if for every x0 ∈ RnN the following condition is satisfied (8) Thus, we have z̄i (t) = x̂Vi (t) for all t ≥ t0 . Then, controller (3) becomes ui = K (z̄i − lii x̂i ) = K (x̂Vi − lii x̂i ) . (9) lim kxi (t) − xj (t)k = 0, ∀ i, j ∈ V. t→∞ Substituting (9) into (1) gives that network (1) with (3), (4), and (5) is equivalent to (7). Remark 2 When the communication network is not ideal, model (1) with (3) and Oi , OVi cannot be simplified to (7). A more complicated model is needed to describe the network dynamics. Time delays and packet loss will influence the synchronization performance. However, due to the robust property of asymptotic synchronization, bounded synchronization can be guaranteed where P Moreover, let ẑi = j∈Vi (x̂j − x̂i ). We have x̂Vi = z̄i = ẑi + lii x̂i . Then, ETR (6) can be reformulated as tki +1 = inf {t > tki | ri (t, xi , x̂i , ẑi ) > 0} . (11) (10) 3 It is shown in Trentelman et al. (2013) that a necessary and sufficient condition for asymptotic synchronization of network (2) with continuous interconnections is the existence of positive definite matrices Pi such that the final synchronization error may depend on the time delay magnitude and probability of packet loss. Another important problem for this case is under what conditions the network can still achieve synchronization asymptotically. These issues should be studied in the future. Hi⊤ Pi + Pi Hi = −2In , i = 2, 3, . . . , N. 3 Event-Triggered Control This condition requires all the linear systems with system matrices Hi = H − λi BK, i = 2, . . . , N are asymptotically stable simultaneously, which is stronger than that (H, B) is stabilizable. Another alternative is to find a common P > 0 for all Hi , i = 2, . . . , N (e.g., Wu et al. (2017)). From (14), network (7) with ETC can be regarded as network (2) with an external input (or a disturbance) Λ̄Φ̄⊤ e. According to input-to-state stability theory, a necessary condition for system (14) to be asymptotically stable is that the the corresponding system (also described by (14) but without the term Λ̄Φ̄⊤ e) is asymptotically stable. Hence, the existence of matrix solutions Pi to Lyapunov equations (16) is also a fundamental requirement for network (7) with ETC to achieve asymptotic synchronization. In this paper, we assume that such matrices Pi exist. ⊤ ⊤ ⊤ Denote e(t) = e⊤ with ei (t) = 1 (t), e2 (t), . . . , eN (t) x̂i (t) − xi (t). Network (7a) can be rewritten by ẋ = (IN ⊗ H − L ⊗ BK)x − (L ⊗ BK)e. (12) Since the topology of the network is undirected and connected, the Laplacian matrix L is irreducible, symmetric, and has only one zero eigenvalue. Further, there exists an orthogonal matrix Ψ = (ψ1 , ψ2 , . . . , ψN ) ∈ RN ×N with ψi = (ψi1 , ψi2 , . . . , ψiN )⊤ and Ψ⊤ Ψ = IN such that Ψ⊤ LΨ = Λ = diag(λ1 , λ2 , . . . , λN ) where √0 = λ1 < λ2 ≤ λ3 ≤ · · · ≤ λN . Choose ψ1 = 1/ N 1⊤ N for λ1 . Due to the zero row sum property of L, we PN have j=1 ψij = 0 for all i = 2, 3, . . . , N . Defining Φ = (ψ2 , ψ3 , . . . , ψN ) ∈ RN ×(N −1) gives Φ⊤ Φ = IN −1 , ΦΦ⊤ = IN − 1 1N ×N . N P P Let zi = j∈Vi (x̂j − x̂i ), j∈Vi (xj − xi ), ẑi = ⊤ ⊤ z = (z1⊤ , z2⊤ , . . . , zN ) = (−L ⊗ In )x, and ẑ = ⊤ ⊤ (ẑ1⊤ , ẑ2⊤ , . . . , ẑN ) = (−L ⊗ In )x̂. Next, we give a useful lemma which will be used to prove the main result. (13) Let Λ1 = Φ⊤ LΦ = diag{λ2 , λ3 , . . . , λN }, Φ̄ = Φ ⊗ In and Λ̄ = Λ1 ⊗ BK = diag {λ2 BK, λ3 BK, . . . , λN BK}. Defining y = Φ̄⊤ x gives ẏ(t) =Φ̄⊤ (IN ⊗ H)x − (L ⊗ BK)(IN n − Φ̄Φ̄⊤  +Φ̄Φ̄⊤ )(x + e) =(IN −1 ⊗ H − Λ1 ⊗ BK)y − Λ̄Φ̄⊤ e ⊤ Lemma 2 Consider network (7). The following two inequalities hold for any t ≥ t0 kẑk ≤ λN (kek + kyk) λ2 kyk ≤ λN kek + kẑk. (14) (17) (18) PROOF. Due to k(L ⊗ In )k = λN , we have ⊤ where we use properties Φ̄ (IN ⊗ H) = (IN −1 ⊗ H)Φ̄ and (L ⊗ BK)(IN n − Φ̄Φ̄⊤ ) = 0 for any BK, which are supported by facts L1N = 0 and (13). Denoting H̄ = (IN −1 ⊗ H) − (Λ1 ⊗ BK) = diag {H2 , H3 , . . . , HN } with Hi = H − λi BK, system (14) can be simplified to ẏ = H̄y − Λ̄Φ̄⊤ e. (16) kẑk = k(L ⊗ In )(x + e)k ≤ kzk + λN kek (19) kzk = k(L ⊗ In )(x̂ − e)k ≤ kẑk + λN kek. (20) ⊤ Let U = ΦΦ , then for any L, we have LU = U L, i.e., L and U are diagonalizable simultaneously. Further, we have Ψ⊤ LΨ = Λ and Ψ⊤ U Ψ = diag{λu1 , λu2 , . . . , λuN }, where λu1 = 0 and λui = 1, i = 2, 3, . . . , N are eigenvalues of U . Let λ̄i , i = 1, 2, . . . , N be eigenvalues of the matrix (λ2N U 2 − L2 ). Then with U 2 = U , we have λ̄1 = 0 and λ̄i = λ2N − λ2i ≥ 0, i = 2, 3, . . . , N , which gives L2 ≤ λ2N U 2 . Thus, we have (15) PN By defining x̄ = N1 i=1 xi , we have kyk2 = x⊤ Φ̄Φ̄⊤ x = PN 2 i=1 kxi − x̄k where the last equality follows from ⊤ Φ Φ = IN −1 and (Φ̄Φ̄⊤ )2 = Φ̄Φ̄⊤ . Therefore, if limt→∞ ky(t)k = 0, then xi (t), xj (t), and x̄(t) are asymptotically equal when t → ∞, i.e., network (7) achieves synchronization asymptotically. This result is summarized in the following lemma. kzk2 =x⊤ (L2 ⊗ In )x ≤ λ2N x⊤ (U 2 ⊗ In )x =λ2N kΦ̄⊤ xk2 = λ2N kyk2 . (21) Combining (19) with (21) gives inequality (17). Similar to (21), we have kyk2 = x⊤ (U 2 ⊗ In )x ≤ 1/λ22 x⊤ (L2 ⊗ In )x which with (20) gives (18). ✷ Lemma 1 If system (15) is asymptotically stable, i.e., limt→∞ ky(t)k = 0, then network (7) achieves synchronization asymptotically. 4 Let ρ = λN δ , 2N (α2 +δ 2 ) √ ρ1 = 1 √ δ λ2 ( 2(α2 +δ 2 ) Based on the comparison theory (Khalil (2002)), we have kel (t)k/ky(t)k ≤ φ(t − tkl ), whenever kel (tkl )k /ky(tkl )k ≤ φ(tkl ) where φ(t − tkl ) is the solution of the ordinary differential equation + 1), δ ∈ (0, 1), α = maxi=2,3,...,N {λi kPi BKk}, a = δ δ kHk + kH̄k  + λN α kBKk, b = λN kBKk(1 + α ), and τ∗ = 1 a ln aρ bρ1 + 1 > 0. We have the following result. φ̇ = aφ + b Theorem 1 Network (7) achieves synchronization asymptotically under the distributed ETR tki +1 = inf {t ≥ tki + τ ∗ | kei k > ρkẑi k} . with the initial condition φ(tkl ). At t = tkl , we have kel (tkl )k/ky(tkl )k = 0. Setting φ(tkl ) = 0 gives (22) kel (t)k ≤ φ(t − tkl ), ∀t ∈ [tkl , t∗ ). ky(t)k Moreover, no Zeno behaviour occurs in the network. kel (t)k kel (t)k ≤ ρ1 ≤ ρ1 φ(t − tkl ), ∀t ∈ [tkl , t∗ ). kẑ(t)k ky(t)k (23) Solving (29) with φ(tkl ) = 0 shows that it will take φ(t− tkl ) a positive time constant τ ∗ to change its values from 0 to ρ/ρ1 , so does kel (t)k/ky(t)k. Therefore, it requires at least τ ∗ to make kel (t)k move from 0 to ρkẑ(t)k. This is true at t = t0 , as we have kei (t0 )k = 0 and hence kei (t0 )k ≤ ρkẑ(t0 )k, ∀i ∈ V. Suppose to obtain a contradiction that (23) does not always hold, and let t∗ be the infimum of times at which it does not hold. Due to the finite number of nodes, there exists a node l such that kel k > ρkẑk for times arbitrarily close t∗ from above, i.e., ∀ǫ > 0, ∃t ∈ [t∗ , t∗ + ǫ] such that kel (t)k > ρkẑ(t)k. It follows from ETR (22) that t∗ must be in (tkl , tkl + τ ∗ ] for some kl ∈ Z+ . We now show that there cannot exist a t∗ in (tkl , tkl + τ ∗ ], which will establish (23). Since kei (t)k ≤ ρkẑ(t)k, ∀i ∈ V, ∀t < t∗ , which gives kek2 = N X i=1 kei k2 ≤ δ2 kẑk2 . 2 2λN (α2 + δ 2 ) Suppose, to obtain a contradiction, that t∗ < tkl + τ ∗ . In that case, kel (t)k/ky(t)k ≤ φ(t − tkl ) < φ(τ ∗ ) ≤ ρ/ρ1 , for all t ≤ t∗ . By continuity of kel k/kyk, this implies the existence of an ε > 0 such that kel (t)k/ky(t)k < φ(τ ∗ ) for all t ≤ t∗ + ε. Therefore, there holds then kel (t)k < ρkẑ(t)k for all t < t∗ + ε, in contradiction with t∗ being the infimum of times at which kel (t)k > ρkẑ(t)k. Now, select the Lyapunov function candidate V = y ⊤ P y with P = diag{P2 , P3 , . . . , PN }. Then, the derivative of V along system (15) satisfies (24) On the other hand, inequality (17) gives 2 kẑk ≤ 2λ2N (kek2 2 + kyk ). V̇ ≤ −2kyk2 + 2αkykkΦ̄⊤ek. (25) Calculating d kel k dt kyk δ ky(t)k, ∀t ∈ [t0 , t∗ ). α δ kyk. α (32) V̇ ≤ −2(1 − δ)kyk2 < 0, ∀kyk = 6 0. (33) kΦ̄⊤ ek ≤ kΦ̄⊤ kkek = kek ≤ (26) Substituting (32) into (31) gives for t ∈ [tkl , t∗ ) directly gives  kel k kΛ̄kkel kkek d kel k ≤ kHk + kH̄k + dt kyk kyk kyk2 kek + λN kBKk + λN k BKk (27) kyk Therefore, the equilibrium point y = 0 of system (15) is asymptotically stable. Based on Lemma 1, the network achieves synchronization asymptotically. ✷ where we use (17) in Lemma 2 to get (27). Substituting (26) into (27) gives kel k d kel k ≤a + b. dt kyk kyk (31) The inequality (23) holds, so does (26). Combining (26) with kΦ̄k = 1 yields Substituting (25) into (24) yields ke(t)k ≤ (30) Further, combining (18) with (24) gives kẑk ≥ kyk/ρ1 which with (30) leads to PROOF. Under ETR (22), the existence of τki = tki +1 − tki > 0 is guaranteed by the dwell time τ ∗ . To show asymptotic synchronization, we claim that the network with (22) satisfies kei k ≤ ρkẑk, ∀i ∈ V, ∀t ≥ t0 . (29) Remark 3 Like most results in synchronization of dynamical network with/without ETC (e.g., Trentelman et al. (2013); Guinaldo et al. (2013)), one usually needs some global parameters to guarantee asymptotic synchronization and exclude Zeno behaviours. These parameters can (28) 5 be estimated by using methods proposed in the related literature (e.g., Franceschelli et al. (2013)), and can be initialized to each node at the beginning. However, how to use local parameters rather than global ones (e.g., how to replace N by using local parameter such as the degree of the node di ) remains open, and deserves attention. 4 An Example To show the effectiveness of our method, consider a network with 10 nodes that have parameters as follows H= 0 −0.5 ! , B= 0 ! , K=   −0.5 1 . 1 0.5 0 Remark 4 Most of the existing results (e.g., Demir and Lunze (2012); Guinaldo et al. (2013); Seyboth et al. (2013); Zhu et al. (2014); Garcia et al. (2015); Yang et al. We adopt the two-nearest-neighbour graph to describe (2016) ) use decentralized ETRs which can be summathe topology, i.e., Vi = {j | j = i ± 1, i ± 2}, i = rized in the following compact from 1, 2, . . . , 10. If j ∈ Vi and j < 0 (j > 10), then j = j + 11 (j = j − 10). Since the matrix H has two eigenvalues on the imaginary axis of the complex plane, the network  will synchronize to a stable time-varying solution deter(34) tki +1 = inf t | kei k > c0 + c1 e−γt mined by the initial condition. By calculating, we get α = 2.9061. We select δ = 0.9. Figure 1 gives the simulation results of the network with the distributed ETR (22) (DDT), which shows the effectiveness of the prowhere c0 ≥ 0, c1 ≥ 0, γ > 0 are three design parameters. posed method. In the figure, we only give the sampling Obviously, ETR (34) only depends on local information time instants in the first 2 seconds for clarity. The thefrom node i itself, and asymptotic synchronization can oretical value of τ ∗ is 0.0013 s. The minimum and maxbe achieved only when c0 = 0. In our paper, we introduce imum sample periods (τmin /τmax ) for each node during kẑi k into the proposed ETR (22). The term kẑi k updated the simulation time are given in Table 1 which shows by xj (tkj ) estimates the synchronization errors between that the actual sample periods are much larger than τ ∗ . neighbours continuously, and thus provides each node useful information for determining its sampling times. Therefore, the proposed ETR can reduce the sampling We also compared our method with the decentralized times significantly, in particular for cases where kẑi k is ETR (34) (DET) proposed in Guinaldo et al. (2013). large (see the example in Section 4 for details). Further, According to Remark 4, only bounded synchronization it is shown in Liu et al. (2013) that a similar distributed can be guaranteed with c0 6= 0 in (34) (Seyboth et al. −γt ETR as (22) but with an exponential term c1 e can also (2013)). For this case, the advantage of our method is guarantee asymptotic synchronization. However, this paclear. So here, we only compare our method with the case per replaces the exponential term by a dwell time which c0 = 0 where asymptotic synchronization under (34) can can be implemented easily in practice. Such a τ ∗ gives an also be achieved. We select c1 = ρ and γ = 0.30579. Durupper bound for the designed ETR (22), and therefore, a ing the simulation period (0 – 18 s), the network with modified ETR with 0 < τi∗ ≤ τ ∗ can also synchronize the DDT samples 3432 times in total, whereas the network network without Zeno behaviours. with DET samples 212 times more (3644 times in total). Remark 5 To simplify notations, this paper only considers the case where ui is a scalar. However, the obtained results can extend to multiple-input case directly. It is pointed out in Heemels et al. (2013) that the joint design of the controller and event-triggering rule is a hard problem. However, we can select any control gain K to synchronizes the continuous-time network (2), i.e., to stabilize (H, λi B), i = 2, . . . , N simultaneously. It can be selected by solving a group of linear matrix inequalities. Moreover, a periodic ETC method was proposed to stabilize linear systems in Heemels et al. (2013) where the triggering condition was verified periodically. In the paper, we do not check the event-triggering condition in the time interval [tki , tki + τ ∗ ), but check the condition continuously during the period [tki + τ ∗ , tki +1 ). It is of great interest to study asymptotic synchronization by using periodic ETC and one-directional communications. Fig. 1. Simulation for the network with DDT. 6 Table 1. The minimum/maximum sample period 5 Node 1 Node 2 Node 3 Node 4 τmin 0.0153 0.0114 0.016 0.0214 0.0188 τmax 0.2651 0.5292 0.6336 0.0817 0.1851 Node 6 Node 7 Node 8 Node 9 Node 10 τmin 0.0046 0.0688 0.0116 0.0117 0.0117 τmax 0.3584 0.2841 1.4677 0.5347 0.5238 Demir, O., Lunze, J., 2012. Event-based synchronziation of multi-agent systems. In: IFAC Conf. on Analysis and Design of Hybrid Systems. Eindhoven, The Netherlands, pp. 1–6. Dimarogonas, D. V., Johansson, K. H., 2009. Eventbased control for multi-agent systems. In: IEEE Conference on Decison and Control. Shanghai, China, pp. 7131–7136. Franceschelli, M., Gasparri, A., Giua, A., Seatzu, C., 2013. Decentralized estimation of Laplacian eigenvalues in multi-agent systems. Automatica 49, 1031– 1036. Garcia, E., Cao, Y., Wang, X., Casbeer, D., 2015. Decentralized event-triggered consensus of linear multiagent systems under directed graphs. In: American Control Conference. Chicago, USA, pp. 5764–5769. Guinaldo, M., Dimarogonas, D., Johansson, K., Sanchez, J., Dormido, S., 2013. Distributed event-based control strategies for interconnected linear systems. IET Control Theory and Applications 7 (6), 877886. Heemels, W. P. M. H., Donkers, M. C. F., Teel, A. R., 2013. Periodic event-triggered control for linear systems. IEEE Trans. on Automatic Control 58 (4), 847– 861. Heemels, W. P. M. H., Johansson, K. H., Tabuada, P., 2012. An introduction to event-triggered and selftriggered control. In: IEEE Conference on Decison and Control. Maui, USA, pp. 3270–3285. Hu, W., Liu, L., Feng, G., 2016. Consensus of linear multi-agent systems by distributed event-triggered strategy. IEEE Trans. on Cybernetics 46 (1), 148–157. Khalil, H. K., 2002. Nonlinear Systems, 3rd Edition. Prentice Hall, New Jersey. Liu, T., Cao, M., De Persis, C., Hendrickx, J. M., 2013. Distributed event-triggered control for synchronization of dynamical networks with estimators. In: IFAC Workshop on Distributed Estimation and Control in Networked Systems. Koblenz, Germany, pp. 116–121. Meng, X., Chen, T., 2013. Event based agreement protocols for multi-agent networks. Automatica 49, 2125– 2132. Olfati-Saber, R., Fax, J. A., Murray, R. M., 2007. Consensus and cooperation in networked multi-agent systems. Proceedigs of the IEEE 95 (1), 215–233. Ren, W., Beard, R. W., Atkins, E., 2007. Informaiton consensus in multivechicle cooperative control: collective behavior through local interation. IEEE Control System Magazine 27 (2), 71–82. Seyboth, G. S., Dimarogonas, D. V., Johansson, K. H., 2013. Event-based broadcasting for multi-agent average consensus. Automatica 49, 245–252. Tabuada, P., 2007. Event-triggered real-time scheduling of stabilizing control tasks. IEEE Trans. on Automatic Control 52 (9), 1680–1685. Tallapragada, P., Chopra, N., 2014. Decentralized eventtriggering for control of nonlinear systems. IEEE Trans. on Automatic Control 59 (12), 3312–3324. Trentelman, H. L., Takaba, K., Monshizadeh, N., 2013. Robust synchronization of uncertain linear multi- Node 5 Conclusion This paper has studied asymptotic synchronization of networks by using distributed ETC. By using the introduced estimators, a distributed ETR for each node has been explored, which only relies on the state of the node and states of the estimators. It has been shown that the proposed ETC synchronizes the network asymptotically with no Zeno behaviours. It is worth pointing out that time-delay and data packet dropout are common phenomena which definitely affects the synchronization of networks with event-based communication. It appears that synchronization of such networks with imperfect communication is an important issue to pursue further for both theoretical interest and practical consideration. Acknowledgements Liu’s work was supported by The University of Hong Kong Research Committee Research Assistant Professor Scheme and a grant from the RGC of the Hong Kong S. A. R. under GRF through Project No. 17256516. Cao’s work was supported in part by the European Research Council (ERC-StG-307207) and the Netherlands Organization for Scientific Research (NWO-vidi-14134). De Persis’s work was partially supported by the Dutch Organization for Scientific Research (NWO) under the auspices of the project Quantized Information Control for formation Keeping (QUICK) and by the STW Perspectief program “Robust Design of Cyber-physical Systems” under the auspices of the project “Cooperative Networked Systems”. Hendrickx’s work was supported by the Belgian Network DYSCO (Dynamical Systems, Control, and Optimization), funded by the Interuniversity Attraction Poles Program, initiated by the Belgian Science Policy Office. References Arenas, A., Dı́az-Guilera, A., Kurths, J., Moreno, Y., Zhou, C., 2008. Synchronization in complex networks. Physics Reports 469, 93–153. Cao, M., Morse, A. S., 2010. Dwell-time switching. Sysstems & Control Letters 59 (1), 57–65. De Persis, C., Frasca, P., 2013. Robust self-triggered coordination with ternary controllers. IEEE Trans. on Automatic Control 58 (12), 3024–3038. 7 agent systems. IEEE Trans. on Automatic Control 58 (6), 1511–1523. Wu, C. W., 2007. Synchronization in complex networks of nonlinear dynamical systems. World Scientific, Singapore. Wu, Y., Meng, X., Xie, L., Lu, R., Su, H., Wu, Z., 2017. An input-based triggering approach to leaderfollowing problems. Automatica 75, 221–228. Xiao, F., Meng, X., Chen, T., 2015. Sampled-data consensus in switching networks of integrators based on edge events. International Journal of Control 88 (2), 391–402. Yang, D., Ren, W., Liu, X., Chen, W., 2016. Decentralized event-triggered consensus for linear multi-agent systems under general directed graphs. Automatica 69, 242–249. Zhu, W., Jiang, Z.-P., Feng, G., 2014. Event-based consensus of multi-agent systems with general linear models. Automatica 50, 552–558. 8
3cs.SY
Analyses of Aggregate Fluctuations of Firm Network Based on the Self-Organized Criticality Model∗ Hiroyasu Inoue† Graduate School of Simulation Studies, University of Hyogo Abstract arXiv:1512.05066v2 [q-fin.GN] 4 Apr 2016 This study examine the difference in the size of avalanches among industries triggered by demand shocks, which can be rephrased by control of the economy or fiscal policy, and by using the production-inventory model and observed data. We obtain the following results. (1) The size of avalanches follows power law. (2) The mean sizes of avalanches for industries are diverse but their standard deviations highly overlap. (3) We compare the simulation with an input-output table and with the actual policies. They are compatible. Keywords: Aggregate Fluctuation, Demand, Network, Firm, Production, Inventory, Control Theory ∗ This study is conducted as a part of the project “Price Network and Dynamics of Small and Medium Enterprises” undertaken at the Research Institute of Economy, Trade and Industry (RIETI). The authors thank the institute for various means of support. We thank Hiroshi Yoshikawa, Hideaki Aoyama, Hiroshi Iyetomi, Yuichi Ikeda, Yoshi Fujiwara, Wataru Soma, Yoshiyuki Arata, and members who attended the internal seminar of RIETI for their helpful comments. We gratefully acknowledge financial support from the Japan Society for the Promotion of Science (No. 15K01217). † Graduate School of Simulation Studies, University of Hyogo, 7-1-28 Minatojima-minamimachi, Chuo-ku, Kobe, Hyogo 650-0047, Japan 1 1 Introduction Giving stimulus to firms and prompting the spillover effect is a way for a government to affect its economy, which includes purchasing goods and services, giving grants to firms, and fine-tuning taxes. Governments consider fiscal policy as an important determinant of growth [1, 2]. Currently, analysis of input-output table is considered a strong tool to predict the spillover effect [3]. It enables us to obtain a single predicted value of the spillover effect caused by the stimulus. However, it is obvious that we cannot obtain the same result as that of the prediction, even if we use exactly the same volume as that used in the calculation. Nevertherless, we normally expect that the result should be substantially around the prediction. This concern, that, whether the expectation is correct is the main topic of this study. If the size of the spillover effect is around the average of the prediction, it should be true that the propagation is never amplified or reduced through firm networks. However, Gabaix showed that if the firm size distribution is fat-tailed, the hypothesis breaks down [4]. In addition, Acemoglu et al. pointed out that microeconomic shocks may lead to aggregate fluctuations in the presence of intersectoral input-output linkages [5]. These studies suggest that the stimulus and spillover effect do not result in the proximity of the prediction. In other words, normal distribution is usually assumed, but this assumption is doubtful. This study reveals how demand shocks from outside cause the spillover effect. We use a micro model invented by Bak et al. [6] and employ observed data. We clear up the following points: (1) the diversity of the spillover effect. (it must depend on industries in which shocks are given.) and (2) the extent of getting involved in the spillover effect. (it must also depend on industries.) The remainder of this paper is organized as follows. In Section 2, we introduce the dataset. Section 3 describes the methodologies that we utilize in analyses. Section 4 presents the results. Finally, Section 5 concludes. 2 Data We use datasets, TSR Company Information Database and TSR Company Linkage Database, collected by Tokyo Shoko Research (TSR), one of the major corporate research companies in Japan. The datasets are provided by the Research Institute of Economy, Trade and Industry (RIETI). In particular, we use the dataset collected in 2012. The TSR data contain a wide range of firm informa- 2 tion. As necessary information for our study, we use identification, capital, industry type, suppliers and clients. We construct an entire network of firms based on suppliers and clients. Note that there are up to 24 suppliers and up to 24 clients for each firm in the data. It may be considered that the constraint limits the number of links for each node. However, a node can be suppliers of other nodes without limitation, as long as those clients designate the node as a supplier, and vice versa. Therefore, the numbers of suppliers or clients are not limited to 24. The number of firms, that is, nodes, is 1,109,549. The number of supplier-client ties, that is, links, is 5,106,081. This network has direction and the direction is important in our study. We split firms based on industries. The industries are classified by the Japan Standard Industrial Classification [7]. We mainly use the division levels that have 20 classifications. However, we make alterations to the classification. Since the classifications “S: Government, except elsewhere classified” and “T: Industries unable to classify” are less important in our study, we omit them. In addition, we separate “I: Whole sale and retail trade” into wholesale and retail. The difference of the divisions is not negligible in our study because shocks from outside, such as fiscal policies, often occur in retail. Therefore, the division level in our study after alterations shows 19 industries. Moreover, we use three industries at the group level to compare the effects of some Japanese fiscal policies. The groups are “5911: New motor vehicle stores,” “5931: Electrical appliance stores, except secondhand goods,” and “6821: Real estate agents and brokers.” The difference between the division and group levels is clear in the later industries and there is no concern about confusing the two levels. We use an input-output table to compare the prediction of the spillover-effect size between a micro model and the table. As the closest table in time, we use the 2011 updated input-output table [8]. Figure 1 shows the degree distribution of the observed network. The red plots are the distribution of the observed network. An important point is that the distribution is fat-tailed, which means the distribution does not decay super-linearly. It seems that we can fit plots to a line P ∝ k −λ , where P is the cumulative probability, k is the degree, and λ is a positive constant. If the degree distribution is the normal distribution, the plot is shaped as the blue plots in Figure 1. Since normal distribution exponentially decays, we can observe the blue plots decrease super-linearly on the log-log plot. How to create the random network is explained in Section 4. The reason we should compare the observed network with the random network is that the random network creates aggregate fluctuation that 3 decays exponentially, as we show in Section 4. In other words, it tells us that if the random network is the network in the real economy, there is no fat-tailed aggregate fluctuation. However, the observed network is not the random network as we see here. [Figure 1 here] If a probability distribution or a cumulative probability distribution can be fitted to a line, it is said that the distribution is a power-law distribution. A network with a power-law distribution is often called a scale-free network. It has been pointed out that the power-law or scale-free nature of networks is a determinant of fat-tailed aggregate fluctuations [4]. Since the observed network is the scale-free network, we expect that the aggregate fluctuations of the network are fat-tailed. 3 Methodology We use a modified model [9] based on a production model [6]. The modified model enables us to conduct micro-level simulations and investigate the characteristics of aggregate fluctuations. The model of production and inventory was originally invented by Bak et al. [6]. The model assumes that firms connect with each other on supply chains. Each firm has some amount of inventory. When a firm receives orders from clients, it supplies intermediate goods or services to clients. If the firm does not have enough inventory, it sends orders to suppliers. Therefore, cascades of orders and production sometimes occur. The size of the cascades can be defined by the total extent of production due to activated firms. Bak et al. showed that the distribution of the cascade size follows the power law. This result underlies recent network-based studies related to aggregate fluctuations [4, 5]. That is, the cascade reaction can be understood as aggregate fluctuations. Here, for brevity, we call the cascade reaction an avalanche. The result obtained by Bak et al. strongly depends on the regularity of supply chain network. A node has two suppliers and two clients in the regular network, except the nodes in the top and bottom layers. As we have already shown that the real supply-chain network is not a regular network but a scale-free network, the assumption is too strong to apply the model to the real supply-chain network. To mitigate the limitation of the regular network, Iino and Iyetomi generalized the model so that a node has arbitrary numbers of in-degree or out-degree and analyzed the nature of the generalized production model [9]. We employ their generalized model with a minor modification. Here, we describe the model used in our analyses. For every time step t and every firm i, a new 4 amount of inventory is decided based on the following equation. zi (t + 1) = zi (t) − si (t) + yi (t), where zi (t) is the amount of inventory of firm i at time t, si (t) is the amount of orders received by firm i at time t, and yi (t) is the amount of production conducted by firm i at time t. The equation renews the inventory and is depicted in Figure 2(a). We assume that (1) the firm equally sends orders to its suppliers, (2) each firm produces one unit of production from one unit of material that it obtains, and (3) a firm produces the minimum goods necessary to meet requests from its consumers. Assumptions (1) and (2) simply result in a production feature in which yi (t) is a multiple of ni , where ni is the number of suppliers for the firm i. In addition, the assumption (3) results in zi (t) ≤ ni . Based on the inventory renewal equation and the assumptions, the amount of production yi (t) is given by    0       ni yi (t) = ..   .       a (t) · n i i (si (t) ≤ zi (t)) (zi (t) < si (t) ≤ zi (t) + ni ) .. . (1) (zi (t) + (ai (t) − 1)ni < si (t) ≤ zi (t) + ai (t)ni ), where ai (t) is the number of orders that firm i places with each supplier. ai (t) is calculated by a ceiling function ai (t) = & ' si (t) − zi (t) . ni Since the quantity of the received orders si (t) is the sum of orders to firm i, si (t) = X aj (t), j where j is one of clients of firm i. If a firm does not have a client and the firm needs to produce, the firm regarded as belonging to primary industry and is assumed able to produce an arbitrary amount of production. [Figure 2 here] The first orders are placed from outside. Depending on the analyses, a firm is selected from all firms or firms in a specific industry to place an order. The selection is uniformly random. Two firms may mutually supply or a long step of supply chains may form a cycle. It is possible 5 that firms on a loop indefinitely produce goods or services, although this never occurs in the real economy. Iino and Iyetomi assume that firms have randomly assigned potential values, which is an analogy of electrostatics. A firm with more potential than another can supply, which is similar to water flow. Although this assumption helps avoid a loop and is useful for analyzing the nature of randomly created networks, it is not particularly clear how to assign a value to each firm. Here, we make a simple assumption. A firm that has already supplied products, that is, a firm that is already in a propagation process, is ignored as a supplier. Figure 2(b) shows an example of a loop with three firms. Firm 3 ignores firm 1 when it needs production. More precisely, the supply link from firm 1 to firm 3 is tentatively ignored. Since the observed data include all industries, it may be considered that it is unnatural to contemplate inventory for service industries. This is because it is not understandable to consider inventory for intangible products, such as insurance or healthcare. However, service industries do have inventory. That is, if any service is ready to be used, it should be considered as inventory. For example, a vacant hotel room ready for use incurs cost. Therefore, we can discuss all industries that deal with tangible or intangible products in the same network. 4 Results In this section, we show the fat-tailed nature of avalanches and their diversity over industries. We start with the results of avalanches comparing a random network and the observed network. In a random network, every pair of nodes is connected  according  to constant probability p. The expected  N  number of links of the random network with p is   p , where N is the number of nodes. The 2 random network is created so that the network has the same number of nodes and the same number of links as the observed network. The observed network has 1,109,549 nodes and 5,106,081 links. Therefore, we set p as approximately 8.30 × 10−6 . As a result, we obtain a random network with 1,109,549 nodes and 5,366,223 links. This accordance is necessary to compare the two networks. The experiments proceed as follows for both networks. (1) At time t, a firm is randomly chosen from all the firms. (2) A chosen firm sells a unit of product. (3) An avalanche is calculated. (4) Repeat (1)–(3) for 1 billion times (t proceeds from 1 to 1 billion.) For an avalanche size, that is, aggregated production, we obtain Y (t) = X i 6 yi (t), for every time step t. Figure 3 shows the avalanche sizes for the two networks. The red plots are for the observed network and the blue plots are for the random network. The random network obviously decays fast and it seems that the distribution cannot be fitted to a line. On the other hand, the observed network has a part that can be fitted to a line. This result, that a scale-free network has a fat-tailed avalanche size, has already been shown analytically [9] and has been proved partly under some constraints [10]. [Figure 3 here] The results here tell us that uniformly random stimuli cause scale-free avalanche on the real network. That is, the average avalanche size is not a representative value of it. The input-output table analysis results in a single value of prediction, which means some representative value is used to predict the spillover effect. However, the power-law distribution does not have a typical scale. It seems that careful analyses are required by the input-output table. From the viewpoint of fiscal policy, it is important to know how stimulus received by different industries causes differences. We conduct the experiments with a few changes to the previous experiments. A firm is randomly chosen from an industry. The industry is fixed through an experiment. In every experiment, 1 billion instances of demand are given. The experiments are conducted for the 19 industry divisions. Figure 4 shows the distributions of avalanche sizes. While we had expected that the distributions of avalanche sizes would have different shapes, this turns out to be untrue. As can be observed, there is no apparent difference in shapes. [Figure 4 here] Figure 5 shows the mean sizes of avalanches. However, as mentioned in the last paragraph, the size distribution is fat-tailed and therefore, the average is not a representative of the avalanche size. The error bars in Figure 5 show standard deviations. Since we already observed that the avalanche size has the power law distribution in Figures 3 and 4, we know that standard deviations or variances are large. We do not conduct the statistical test for the difference of the average because the 1 billion samples cause small standard errors and always show significance of the difference. Therefore, the test is pointless. Instead, it is important that standard deviations are overlapping. It seems that we cannot strongly expect that the spillover effect started from a specific industry that is certainly superior or inferior to other industries. 7 [Figure 5 here] In Figure 5, the order of the industries that are aligned in the horizontal axis roughly shows the advancement from the primary industries. Since an advanced industry, such as manufacturing or services, is in the downstream of supply chains and has long chains from the primary industries, it may be considered that the distance to the primary industries has a positive correlation coefficient with the avalanche size of an industry. However, we do not observe such a relationship, which can be attributed to the network structure. Scale-free network is a small-world network [11]. A firm has a short path to a hub. Since the hub yields a large yi (t), the magnitude of avalanches seems to be dominated by this mechanism. It may be argued that the production model of this study is only a model and it is doubtful how much it can explain the actual economy. Therefore, we simply compare the size of avalanches and the inverse matrix of the input-output table [8]. The Pearson’s correlation coefficient is 0.28. If we consider that the production model does not include the data of trade volume at all, it can be said that the coefficient is surprisingly large. It should be noted that the production model can simulate the variances that cannot be obtained from the input-output table. We conduct further experiments that start from the group level of industries so that we can compare the effect of actual policies. The results of Figure 6 are based on the division level industries. Those industries are “5911: New motor vehicle stores” (CarSale), “5931: Electrical appliance stores, except secondhand goods” (ElectronicsSale), and “6821: Real estate agents and brokers” (HouseSale), which are at the group level. They correspond to the target industries of past Japanese fiscal policies: eco-vehicle tax breaks, eco-point system for housing system, and eco-point system for home electronics. The setup of experiments is the same as that for the previous experiments. [Figure 6 here] Since the government publishes the actual size of budgets and some institutes publish the estimated economic results, we can validate the predictability of the model. The government lost tax revenue corresponding to 241.0 billion Japanese yen (1.98 billion US dollars at an assumed exchange rate of 122 Japanese yen to 1 US dollar) in 2009 for the eco-vehicle tax breaks [12]. The economic result was estimated about 2,937.53 billion Japanese yen (24.08 billion US dollars) [13, 14]. However, this estimation does not include indirect effects of other industries. The leverage of the return to the investment is 12.18. The government spent 494.8 billion Japanese yen (4.06 billion US dollars) 8 for the eco-point system for housing in total. The economic result was estimated at about 414.0 billion Japanese yen (3.39 billion US dollars) [15]. The leverage is 0.84. The government spent 692.9 billion Japanese yen (5.68 billion US dollars) for the eco-point system for home electronics in total. The economic result was estimated at about 5 trillion Japanese yen (40.98 billion US dollars) [16]. The leverage is 72.16. Although the economic result and leverage are just estimations in the abovementioned studies, the eco-point system for housing is apparently small, as we find in our experiments. Three samples are small but we find no apparent contradiction in the results. We observe the distributions of avalanche sizes that are stated from specific industries in Figure 4 and the shapes of the tails are similar. This can be interpreted as a certain supply chain always being used in those large avalanches and the supply chain may lie on particular industries. To examine the hypothesis, we obtain a different measure from the first experiments. The measure is how often firms in an industry become involved in avalanches. Note that we examine the avalanche sizes that start from specific industries thus far and a firm is randomly selected from all firms. Surprisingly, as is observed in Figure 7, the extent to which a firm becomes involved in avalanches is sharply different. The sharpness is totally different from that observed in Figure 5. Wholesale and manufacturing are distinctly large and construction can be included in the largest group. This result means that firms in those industries are apparently always involved in large avalanches that start from any industry. [Figure 7 here] 5 Conclusion This paper analyzed the cause of the diversity of the spillover effect. We used observed data of transactions in Japan. For the data, we employed the production model. As a result, we confirmed the size of the spillover effect triggered by demand follows the power law. Therefore, the normal distribution, which is usually expected in analyses of input-output tables, cannot be a reliable assumption. Although we did not use the volume of trade, the results of the simulations show significant correlation coefficients. Moreover, the simulated avalanche sizes for the policies actually conducted correspond to the estimation given by the ex-post evaluations of the policies. In addition, industries have diverse potential to become involved in avalanches. 9 References [1] W. Easterly and S. Rebelo. Fiscal policy and economic growth. Journal of Monetary Economics, 32:417–458, 1993. [2] W. Romp and J. de Haan. Public Capital and Economic Growth: A Critical Survey. Perspektiven der Wirtschaftspolitik, 8(S1):6–52, 2007. [3] W.W. Leontief. Quantitative Input and Output Relations in the Economic Systems of the United States. The Review of Economics and Statistics, 18(3):105–125, 1936. [4] X. Gabaix. The Granular Origins of Aggregate Fluctuations. Econometrica, 79(3):733–772, 2011. [5] D. Acemoglu, V.M. Carvalho, A. Ozdaglar, and T. Alireza. The network origins of aggregate fluctuations. Econometrica, 80(5):1977–2016, 2012. [6] P. Bak, K. Chen, J. Scheinkman, and M. Woodford. Aggregate fluctuations from independent sectoral shocks: self-organized criticality in a model of production and inventory dynamics. Ricerche Economiche, 47(1):3–30, 1993. [7] Ministry of Internal Affairs and Communications. The Japan standard industrial classification (JSIC) summary of development of the JSIC and its eleventh revision, 2013. [8] Trade Ministry of Economy and Japan Industry. The 2011 updated Input-output table, 2011. [9] T. Iino and H. Iyetomi. Modeling of Relation between Transaction Network and Production Activity for Firms. Progress of Theoretical Physics Supplement, 179:134–144, 2009. [10] N. Zachariou, P. Expert, M. Takayasu, and K. Christensen. Generalised Sandpile Dynamics on Artificial and Real-World Directed Networks. Plos One, 10(11):e0142685, 2015. [11] D.J. Watts. Small Worlds: The Dynamics of Networks Between Order and Randomness. Princeton University Press, 1999. [12] Ministry of Internal Affairs and Communications. Policy evaluation pertaining to special taxation measures (In Japanese), 2015. [13] D. Shirai. The eco-vehicle tax breaks cut 0.1% of the total domestic CO2 emissions (In Japanese). Japan Center for Economic Resarch, 2010. 10 [14] Monthly report of new vehicle registration (In Japanese). http://www.jada.or.jp/. [15] Mizuho Research Institute. Evaluation of the eco-point system for housing (In Japanese), 2012. [16] Board of Audit Japan. Report of the eco-point system for home electronics (In Japanese), 2012. 11 Figure 1: Comparison of degree distributions between the random network and observed network: The horizontal axis shows degree and the vertical axis shows cumulative probability. The blue plots indicate the random network. The red ones indicate the observed network. 12 Figure 2: Generalized production and inventory model: (a) Scheme of the inventory renewal. Arrows show the flows of products. Therefore, orders of supplies are opposite. (b) Example of loop avoidance assumption. There are three firms 1, 2, and 3. Firm 1 asks firm 2 to supply products (given firm 1’s inventory is not enough for demand.) Firm 2 asks firm 3 to supply products. However, firm 3 does not take supply from firm 1 and the link is ignored. 13 Figure 3: Comparison of avalanche size distribution between the random network and the observed network: The horizontal axis shows sizes of avalanches caused by demand. The vertical axis shows the cumulative probability. The blue plots indicate the random network. The red ones indicate the observed network. Although there are size zero avalanches, we ignore them because the main aim of the figure is to show the shapes of the tails and zero cannot be included into log plots. 14 Figure 4: Comparison of avalanche size distribution between industries: The horizontal axis shows sizes of avalanches caused by demand. There is repeated demand for a firm that is chosen randomly from the industry. The vertical axis shows the cumulative probability. Although there are size zero avalanches, we omit them because the aim of the figure is to show the shapes of the tails and zero cannot be included in log plots. 15 Figure 5: Comparison of average avalanche size starting from specific industry: The horizontal axis lists the industries. There is repeated demand for a firm that is chosen randomly from the industry. The vertical axis shows the average of avalanches. The error bars show standard deviations. 16 Figure 6: Simulation for industries to compare fiscal policies: The horizontal axis lists the industries. They correspond to the target industries of past Japanese fiscal policies: eco-vehicle tax breaks, eco-point system for housing, and eco-point system for home electronics. The vertical axis shows the average of avalanches. There is demand for a firm in each industry. 17 Figure 7: Difference of expectations for being involved in avalanches: The horizontal axis lists the industries. The vertical axis shows the expectation to be involved in avalanches per instance of demand. The firm with demand is chosen randomly from all the firms. The expectation in each industry is averaged over the firms in each industry. 18
3cs.SY
Dynamic graph connectivity with improved worst case update time and sublinear space arXiv:1509.06464v1 [cs.DS] 22 Sep 2015 David Gibb ∗ Bruce Kapron Valerie King ∗ Nolan Thorn ∗ Abstract This paper considers fully dynamic graph algorithms with both faster worst case update time and sublinear space. The fully dynamic graph connectivity problem is the following: given a graph on a fixed set of n nodes, process an online sequence of edge insertions, edge deletions, and queries of the form “Is there a path between nodes a and b?” In 2013, the first data structure was presented with worst case time per operation which was polylogarithmic in n. In this paper, we shave off a factor of log n from that time, to O(log 4 n) per update. For sequences which are polynomial in length, our algorithm answers queries in O(log n/ log log n) time correctly with high probability and using O(n log2 n) words (of size log n). This matches the amount of space used by the most space-efficient graph connectivity streaming algorithm. We also show that 2-edge connectivity can be maintained using O(n log2 n) words with an amortized update time of O(log6 n). ∗ Department of Computer Science, University of Victoria, BC, Canada; [email protected], [email protected], [email protected], [email protected]. This research was supported by NSERC and a Google Faculty Research Grant 1 Introduction In the dynamic connectivity problem, we are given an undirected graph G = (V, E), where V is a fixed set of n nodes, and an online sequence of updates and queries of the following form: • Delete(e): Delete edge e from E. • Insert(e): Insert edge e into E. • Query(x, y): Is there a path between nodes x and y? The goal is to process graph updates and queries as efficiently as possible. Our data structure solves the dynamic connectivity problem using O(log4 ) worst case time per update operation and O(log n/ log log n) worst case time per query. In addition, if the sequence of updates is polynomial in length, our data structure needs only a sublinear amount of storage, namely O(n log2 n) words (of size O(log n)), to ensure that with high probability, all queries are answered correctly. By way of comparison, the dynamic graph stream problem is to process an online sequence of polynomial number of edge insertions and deletions so that when the stream ends, a spanning forest is output, where the goal is to minimize space. Our algorithm is the first sublinear space dynamic graph algorithm: it matches the space needed by the most space efficient dynamic graph stream algorithm by Ahn, Guha, and McGregor from 2012 [1], and it shaves a factor of O(log n) off the worst case time per update of the best previously known dynamic connectivity algorithm by Kapron, King, and Mountjoy from 2013 [6]. As an application, we show the first sublinear space dynamic 2-edge connectivity algorithm, which uses O(log6 n) amortized update time, O(log n/ log log n) query time, and O(n log2 n) words. This compares to the O(m + n log n) word algorithm with amortized update time O(log4 n) and O(log n/ log log n) query time by Holm, de Lichtenberg, and Thorup from 1998 [5]. The sublinear space algorithm has 2-sided error of 1/nc for any constant c. If we keep a list of edges with additional space O(m) then there is 1-sided error: if the answer to a query is “yes,” then the answer is always correct; if it is “no,” then it is correct with probability 1 − 1/nc for c any constant. In both cases, we assume the adversary knows the edges in the graph, but constructs the sequence of updates and queries with no knowledge of the random bits used by the algorithm, other than whether the queries have been answered correctly or not. The edges of the spanning forest used by the data structure are not revealed to the adversary. Several dynamic graph problems can easily be reduced to the problem of maintaining connectivity. See [4]. Thus our algorithm yields a dynamic graph algorithm for determining the weight of a minimum spanning tree in a graph with k different edge weights, where the cost of updates is increased by a factor of k. It also can be used to maintain the property of bipartiteness with only constant factor increase in cost. See [1],[4]. An Overview of Techniques: Nearly every dynamic connectivity data structure maintains a spanning forest F . Dealing with edge insertions is relatively easy. The challenge is to find a replacement edge when a tree edge is deleted, splitting a tree into two subtrees. A replacement edge is an edge reconnecting the two subtrees, or, in other words, in the cutset of the cut (T, V \ T ) where T is one of the subtrees. To simplify notation, where there is no confusion, we allow T to denote the set of nodes in the tree T . Otherwise we will use the notation v(T ). We compare the techniques of our paper to the 2013 dynamic graph connectivity [6] and the 2012 dynamic graph stream paper [1]. All three papers use random sampling to identify the 1 name of a edge which crosses a cut. The 2013 dynamic graph paper introduced the cutset data structure. It maintains a dynamic forest of disjoint trees which is a subgraph of a graph G and, for each tree, a “leaving” edge, i.e., an edge with exactly one endpoint in the tree. That paper uses O(m log n + n log2 n) words to implement the cutset data structure and ensures that edges leaving are identified with high probability. For each edge inserted, it flips fresh coins to determine which samples it appears in and records these outcomes in a table. The graph stream paper implicitly uses a restricted cutset data structure which accommodates a continuous stream of nontree edge insertions and deletions, with one final batch change of nontree edges to tree edges, at which point the leaving edge from a tree is determined with constant probability. The streaming paper uses O(n log n) words to implement this restrictive cutset data structure and O(n log2 n) words overall. It uses hash functions rather than independent random bits to determine whether an edge is in a sample, eliminating the need for a table to remember the sampling outcomes. It uses a well-studied technique known as L0 sampling and 1-sparse recovery to sample, find an edge with constant probability, and then verify with high probability it is an edge. Our cutset data structure also determines an edge leaving with constant probability using O(n log n) words. It can be seen as using L0 sampling and a novel, possibly more practical, method of 1-sparse recovery. All three papers use O(log n) tiers of cutset data structures to build a spanning forest, similar to the Borůvka’s parallel minimum spanning tree algorithm. Each tier contains a forest, and each forest is a subforest of the tier above it. In the cutset data structure on tier i, the leaving edges discovered there become tree edges in the forest on tier i + 1, and so on. The streaming paper needs to form these forests only once at the end of the stream. In worst case, a single insertion or deletion can cause a superpolylogarithmic number of changes to edges leaving on the various tiers. Thus maintaining the spanning forest for each update that the streaming algorithm would have produced if the stream had ended at that update, is too costly in terms of time. By using high probability to find edges leaving, the 2013 dynamic graph paper avoids this problem by finding an edge leaving every non-maximal tree in a tier at an extra cost of log n factor in time and space. Our algorithm avoids the cost of using high probability; it does not necessarily keep the same tree edges as the streaming algorithm, but it ensures that about the same number of trees are merged on the next tier. This induces a subtle change to the invariants, which are less restrictive. Related work: For other related work on dynamic connectivity, see [6] Organization: In Section 2 we define the cutset data structure. In Section 3, we show how it can be used to solve dynamic connectivity. In Section 4, we discuss the implementation of cutset data structures. In Section 5, we give a space efficient dynamic 2-edge connectivity algorithm. 2 Cutset data structure definition and results Consider a forest F of disjoint trees which are subtrees of a graph G. G and F are dynamic, that is, they are undergoing updates in the form of edge insertions and deletions. In addition, an edge in G which links two trees may be updated to become a tree edge which would then cause the two trees in F to be joined as one. Similarly a tree edge may be changed to a non-tree edge. The problem is to design a data structure with the goal of maintaining, for each tree T in F which is non-maximal, an edge in the cutset of (T, V \ T ). A successful Search(T ) returns this edge if the 2 cutset is non-empty and null otherwise. We assume that the graph updates are oblivious to the (randomized) outcomes of Search. I.e., we may consider the sequence of updates to be fixed in advance, but updates are revealed to the algorithm one at a time. The operations are: • Insert edge(x, y): Adds edge {x, y} to E. • Make tree edge(x, y): For {x, y} ∈ E but not in F , adds {x, y} to F . • Make nontree edge(x, y): Removes {x, y} from F . • Delete edge(x, y): Removes {x, y} from E. If {x, y} is an edge of F , removes it from F . • Search(T ): For T ∈ F , returns null if there are no edges of E in the cutset of (T, V \ T ); returns an edge in th cutset of (T, V \ T ) otherwise. Lemma 2.1. Let c > 0 be any constant. There is a cutset data structure for graph G with forest F with worst case update time O(log2 n) and space O(n log n) words, such that for any T ∈ F , where C is the cutset of (T, V \ T ), if C 6= ∅, then with constant probability p ≥ 1/8 − 1/nc , Search(T ) returns an edge in the cutset; with probability less than 1/nc it returns a non-edge or edge not in C; otherwise it returns null. If C = ∅, it always returns null. With an auxilliary list of O(m) words to keep track of the current edge set in the graph, Search(T ) returns an edge in C with probability 1/8 and always returns an edge in C, if it returns an edge. The implementation of the cutset data structure is discussed in Section 4. 3 Fully dynamic connectivity algorithm Theorem 3.1. For any constant c and any sequence of polynomially many updates, there is a dynamic connectivity algorithm which answers all queries correctly with high probability and uses O(log4 n) time per update and O(n log2 n) words. The error is 2-sided, i.e., ”yes” may be output when the correct answer is ”no” and vice versa, with probability less than 1/nc . If a list of current edges in the graph is maintained (with an additional O(m) words), any sequence of any length of updates may be processed so that with high probability any single query is correct. In this case, the error is 1-sided; if an answer to a query is “yes” the answer is always correct and if it is “no”, it may be incorrect with probability 1/nc . 3.1 Tiers and Invariants Recall Borůvka’s parallel algorithm for building a minimum spanning tree [2]. We may view that algorithm as constructing a sequence of forests we call tiers. On tier 0 are the set of nodes in the graph; on tier ℓ + 1 is a subforest of the minimum spanning forest formed when each ℓ − 1 tree picks a minimum cost edge linking it to another ℓ − 1 tree, Our algorithm has similar structure. For each tier ℓ = 0, 1, ..., top, where top = O(log n), we maintain a cutset data structure CDℓ for G with a forest Fℓ and refer to the collection as CD. Each cutset data structure in CD is generated using independent randomness. Because tier top is not used to form a forest on a higher tier, the data structure only consists of a forest Ftop , i.e., there is no randomness array on this tier. For each tier ℓ < top, Search(T, ℓ) refers to the Search(T ) operation in the cutset data structure CD ℓ where T ∈ Fℓ ; we similarly extend the definitions of other operations of a cutset data structure 3 for each tier ℓ. Since there is no randomness array on tier top, for Delete edge(e, top) we remove e from Ftop if it appears there but do nothing else. As the graph is updated, the cutset data structure for tier ℓ is used to find edges leaving nonmaximal trees (“fragments”) in that tier. Given an edge e, let ℓ be the minimum tier in which e first appears in Fℓ . We then refer to it as a tier ℓ edge. We maintain the following invariants of CD. Let G be the current graph. 1. F0 = V , the vertices of G; 2. For every tier ℓ, 0 ≤ ℓ ≤ top − 1, Fℓ ⊆ Fℓ+1 ⊆ G. 3. Let T be a node in tier ℓ < top. If Search(T, ℓ) is successful then v(T ) is properly contained in some v(T ′ ) for T ′ a node on tier ℓ + 1. Discussion: Note that these invariants do not necessarily preserve the property that every edge in the spanning tree Ftop is currently an edge leaving some fragment in some CD. Rather, Invariant 3 ensures that any fragment T in tier ℓ for which Search(T ) is successful has some edge leaving it in Fℓ+1 . Also, the invariants do not preclude there being a tree edge in Fℓ+1 which is incident to a fragment T in Fℓ when Search(T ) is not successful. The edges in the forests may be thought of as “historical” Search edges, edges which were once returned by Search. This gives us the flexibility to perform updates quickly. Markov’s inequality implies that with constant probability, a constant fraction of executions of Search on fragments are successful: Lemma 3.2. Let p be defined as in Lemma 2.1. In a cutset data structure with fnum fragments, with probability at least α = (1 − p)/(1 − p/2) the number of fragments T such that Search(T ) succeeds is at least (p/2)fnum . Proof. If there are fnum fragments in the cutset data structure, then the expected number of fragments for which search fails to succeed is no greater than µ = (1−p)f since each has probability at least p of finding a tree edge. By Markov’s Inequality, the probability that (1 − p/2)fnum fail to find a tree edge is no more than µ/(1 − p/2)fnum = (1 − p)/(1 − p/2). As any edge can leave at most two node-disjoint fragments, it is easy to see the following: Observation 1. Let F be a forest containing f fragments and E ′ be a set of edges leaving at least cf fragments T then the spanning forest of F ∪ E ′ has no more than (1 − c/2)f fragments. Lemma 3.3. For any graph G and any constant c, let a = ⌈log4/(4−p) n⌉ and top = max{2a/α, 8c ln n/α}, where α = (1 − p)/(1 − p/2). If the invariants hold then with probability 1 − 1/nc , Ftop is a spanning forest of G. Proof. Let p be the constant in Lemma 2.1. We call a tier with fnum fragments successful if the number of fragments T where Search(T ) is successful is at least (p/2)fnum . Let Xℓ = 1 if tier ℓ is successful and 0 otherwise. Then by Lemma 3.2, P r(Xℓ = 1) ≥ α. For any tier ℓ, if there are (p/2)fnum fragments with successful searches in a tier ℓ then by Invariant 3, each of these fragments is properly contained in Fℓ+1 , i.e., the set of tier ℓ + 1 edges includes an edge leaving for each of these. Then by Observation 1, the number of fragments in Fℓ+1 ≤ (1 − p/4)fnum . Since (1 − p/4)a n ≤ 1, a successful tiers suffice to bring the number of fragments to 0 (as there can’t be only 1). If we flip max{2a/α, 8c ln n/α} coins with probability of heads α, the expected 4 number of heads at µ = max{2a, 8c ln n}. The probability that the number of heads is less than 2 2 a = µ/2 is is less than e−(1/2) µ/2 = e−((1/2) (8c ln n)/2) = 1/nc , by a Chernoff bound. We note that the results for a fixed graph can be extended to hold for poly(n) arbitrary subgraphs, including those generated by a sequence of polynomially many updates: Corollary 3.4. Let Gu be the graph G after u updates, let c′ , d be any constants, and assume u ≤ nd . If top = max{2a/α, 8(c′ + d) ln n/α}, then in the cutset data structures CD u for each ′ u is a spanning forest of Gu . This holds even if there is Gu , with probability 1 − 1/nc every Ftop dependence in the randomness between any pair of CD u ’s. Proof. Consider a collection of nd graphs Gi . Set c = c′ + d in Lemma 3.3. By a union bound, the u fail to be a spanning forest of Gi is no greater than nd (1/nc ) = 1/nc′ . probability that some Ftop 3.2 Performing updates We say a fragment in a tier ℓ is isolated if it is equal to a fragment in tier ℓ+1. To efficiently maintain the invariants as edges are updated, we only check a cutset induced by a tree if the invariants could have become violated. The invariants are maintained from the bottom up. Changes to a tree may be needed because (1) a fragment becomes isolated when a tree edge is deleted; (2) for an isolated fragment T , Search(T ) may become successful, when before it wasn’t or (3) a fragment which is newly formed is isolated. Let T (x) denote the tree containing node x in a forest F . If edge {x, y} is inserted, we start at the lowest tier, checking on each tier ℓ as follows: if T (x) 6= T (y) this may affect Search(T (x), ℓ) and Search(T (y), ℓ). If T (x) is isolated and Search(T (x), ℓ) is successful, the edge returned by T (x) is added to Fℓ+1 . Once a tree edge is added it must be added in all higher tiers. If this forms a cycle, a highest tier edge in the cycle is made into a non-tree edge. This may in turn cause an isolated fragment T ′ on a higher tier ℓ′ , for which Search(T ′ , ℓ′ ) must be checked. If edge {x, y} is deleted, it does not affect the results of a search if both x and y are in the same fragment. If they are not, then calls to Search for both x and y are potentially affected. At this point we proceed as we do in the case of insertions. We now give the algorithms for handling updates and queries. The following procedure, which restores the invariants after an update involving an edge {x, y}, as described above, is used for both insertions and deletions. • Initialize: For each tier ℓ = 0, 1, 2, ..., top − 1, initialize a cutset data structure CDℓ where Fℓ contains n trees consisting of the single vertices in G. • Insert(e): For ℓ < top, call Insert edge(e, ℓ) to insert e into CD ℓ , and call Refresh(e). • Delete(e): For ℓ ≤ top, call Delete edge(e, ℓ) to delete e from CD ℓ , and call Refresh(e). • Query(x, y): If T (x) = T (y) in Ftop , return “yes”, else return “no”. A proof of the following is given in the Appendix. Lemma 3.5. Invariants (1), (2) and (3) are maintained by Initialize, Insert, and Delete. 5 Algorithm 1 Refresh({x, y}) 1: for ℓ = 0, . . . , top − 1 do 2: for u ∈ {x, y} do 3: if T (u) is isolated and Search(T (u), ℓ) returns an edge eu = {a, b} then 4: if a path between a and b exists on some tier > ℓ then 5: Let j be the lowest tier on which there is a path 6: Let e′ be an edge of maximum tier in the path on tier j 7: Call Insert edge(e′ , k) for each k ≥ j 8: Call Make tree edge(eu , ℓ′ ) for each ℓ′ , top ≥ ℓ′ > ℓ 9: end if 10: end if 11: end for 12: end for 3.3 Implementation details, running time and space analysis We briefly review basic data structures used. ET-trees are based on the observation that when a tree is linked with another tree, the sequence given by the Euler tour of the new tree can be obtained by a constant number of links and cuts to the sequences of the old trees. The sequence is stored in a balanced ordered binary tree. ET-tree properties: If each node in the graph has a value stored in x words of length O(log n) then the following hold. 1. A tree edge can be deleted or inserted in O(x log n) time. 2. The sum of the values stored in the nodes of a given tree can be returned in O(x) time. 3. A value at a node can be updated in O(x log n) time per word. 4. Given a node v, the name of the tree T (v) containing v can be returned in O(log n) time. 5. The name of the tree can be obtained more quickly if one keeps an ET-tree of degree O(log n) solely for this purpose. That is, it can be obtained in O(log n/ log log n) if one is willing to spend O(log2 n) time doing an insertion or deletion of a tree edge. ST-trees (aka link-cut trees) provide a means of finding the maximum weight edge on a path between two nodes in a dynamic forest, in O(log n) time per tree edge link, cut, and the find operation. ST-trees and ET-trees require only O(n ∗ |value|) space where |value| is the size of the vector or value stored at each node or edge. Implementation details: Ftop is stored as a degree-lg n ET-tree where no values are associated with a node, so that queries can be answered in time O(log n/ log log n). Ftop is also stored in an ST-tree where each tier ℓ tree edges has weight ℓ. An ST tree data structure allows us to find the cycle edge in O(log n) time. In the worstPcase, a new tree edge is found in every tier twice and these changes are filtered up, for a total of 2 ℓ top − ℓ tree edge insertions or deletions: Lemma 3.6. Let t(n) be the update time for a cutset data structure and s(n) be the space. Then the running time and space for the fully dynamic connectivity algorithm is O((top2 ∗t(n)+top∗logn) and the space needed is O(top ∗ s(n) + n). 6 Since top = O(log n), Lemma 3.6 and Lemma 2.1 imply Theorem 3.1. 4 Implementation of the Cutset Data Structure To illustrate the main idea of our data structure, we will first explain a simplified deterministic version which works when there is exactly one edge in each cutset. Let G = (V, E) be the current graph. Each edge {x, y} ∈ G, 0 ≤ x < y < n, has the name xb · yb where xb and yb are the ⌈lg n⌉ bit vectors containing the binary representations of nodes x and y respectively and xb · yb denotes the 2⌈lg n⌉ bit vector xb followed by yb . We say that edge {x, y} is given by xb · yb . Each node will maintain a vector equal to the bitwise XOR (i.e., sum mod 2) of the vectors assigned to each of its incident edges and we use summation notation to denote bitwise XOR of two or more vectors. For each tree T ∈ F , the ET-tree for T maintains the bitwise XOR of the vectors stored at T ’s nodes. We use “addition” or “subtraction” of vectors to refer to the bitwise XOR of the vectors. The operations are implemented as follows: • Insert edge(x, y): Add its name xb · yb to the vectors at nodes x and y. • Make tree edge(x, y): Insert {x, y} into F (by linking the ET-trees representing T (x) and T (y)). • Make nontree edge(x, y): Delete {x, y} from F by removing it from the ET-tree that contains it. • Delete edge(x, y): Subtract vector xb · yb from the vectors at the nodes x and y. If the edge is in F , remove it from F by calling Make nontree edge(x, y). • Search(T ): . Let z = z1 z2 ...z2⌈lg n⌉ be the sum of the vectors of nodes in T . If z 6= ~0 then return z. Lemma 4.1. For any tree T ∈ F , if there is exactly one edge in the cutset C of the cut (T, V \ T ), then Search(T ) is always successful. The amount of space used is O(n log n) bits. Proof. Every edge with two endpoints in a tree T is added to the vectors of two nodes in T and contributes twice to z, thus it appears not all in the sum z, while every edge with exactly one endpoint contributes exactly once to z. If the cutset has exactly one edge, z is the name of the edge. 4.1 Extension to cutsets with more than one edge We extend our data structure to handle the case of when the cutset of (T, V \ T ) has more than one edge. We may do this in sublinear space, but then we require the assumption that no edge is deleted unless it is currently in the graph and the number of updates is bounded by nd for some constant d. Alternatively, we can keep a list of edges currently in the graph. We maintain for each node x ∈ V an array indexed by levels i where 0 ≤ i < ⌈2 lg n⌉ = levelN um. Let si (x) denote the vector on level i for node x. When edge {x, y} is inserted into G, for each i = 0, 1, ..., levelN um − 1 with probability 1/2i we add xb · yb to both si (x) and si (y). The idea is that when the size of the cutset is ≈ 2i , with constant probability there is exactly one edge from P the cutset and a unique x in T , such that the name of the edge is added to si (x). In this case, zi = x∈T si (x) is the name of that one edge and Search(T ) is successful. 7 To decide which edges to included in the sums on the various levels without recording each coinflip, we use a 2-wise independent hash function h mapping edges into [2levelN um ], where for k ≥ 1, [k] denotes {1, . . . , k}. An edge e is sampled in level i, i = 0, ..., levelN um of the cutset data structure iff h(e) ≤ 2i . The following lemma is straightforward and has been observed previously. A proof is in the Appendix. Lemma 4.2. Let W be the cutset of (T, V \ T ). With probability 1/8, there is an integer j such that exactly one e ∈ W hashes to a value in [2j ]. To verify with high probability that zi is actually the name of one edge in the cut rather than the sum of several names, we make use of an odd hash function 1 We say that a random hash function f : [1, m] → {0, 1} is ǫ-odd, if for any given non-empty set S ⊆ [1, m], there are an odd number of elements in S which hash to 1 with probability ǫ, that is, # " X Pr f (x) = 1 mod 2 ≥ ǫ. (1) f x∈S We use the construction of [7] to create a (1/8)-odd hash function. Let m ≤ 2w , where w = 2⌈lg n⌉. We pick uniformly at random an odd multiplier k from [1, 2w ] and a threshold t ∈ [1, 2w ]. From these two components, we define f : [1, 2w ] → {0, 1} as follows: f (x) = 1 if (kx mod 2w ) ≤ t and x 6= 0 = 0 otherwise. The idea of the verification is as follows: we use a 2-wise independent function to randomly partition a set into two and test each part using using an odd hash function to determine if both parts have at least one element. Repeating this O(log n), if all tests fails, then with high probability there cannot be more than one element in a set.  n In particular, letting S = [ 2 ], the algorithm is initialized by choosing the following functions independently at random. • hj : S → {0, 1}, j = 1, 2, ..., c lg n. Each hj is a 2-wise independent hash function. • fj,b : S → {0, 1} for j = 1, 2, ..., c lg n, and b = 0, 1. Each fj,b is an independently random (1/8)-odd hash function. The fj,b ’s are used to determine a 2c lg n-bit tag of an edge at a particular level. For each node x, we maintain an auxilliary vector s′i,j,b (x). The tag of an edge is added (by bitwise exclusive-or) 1 We may view this verification problem as an instance of 1-sparse recovery and it is possible to apply known techniques for this problem in our setting. In particular [3] proposes an approach which uses polynomial evaluation modulo a prime p to verify uniqueness forPrecovered values (from a set of size t,) with success probability (1 − t/p). This method maintains sums of the form i∈S ai z i , where S ⊆ [t], ai is the weight of item i, and z ∈ Zp is randomly chosen. Using this approach for our purposes, in order for Search to maintain correct values with probability (1−1/nc ) over a sequence of nd edge updates, we must work over p = ω(nc+d+2 ). Adding an edge would require adding (mod p)  n i a term ±z , where 1 ≤ i ≤ 2 . To the best of our knowledge, this requires performing roughly 2 lg n multiplications of (c + d + 2) lg n-bit numbers, with reduction modulo p, or alternatively, c + d independent parallel repetitions of the technique with (c + d) primes of size > 4 lg n bits. In contrast, our approach may be done with (c + d) lg n multiplications of 2 lg n-bit random numbers, with reduction modulo a power of 2. 8 to the vector s′i,j,b (x) when the edge name is added to si (x). For each level i, the sums over the nodes in Pa tree of the auxillary vectors are maintained as well as the sums of the vectors. Let ′ = x∈T s′i,j,b (x). The specifics are described below. zi,j,b The operations Make tree edge(x, y) and Make nontree edge(x, y) are implemented as in the case where cutsets have size one. The remaining operations are implemented as follows: • Insert edge(x, y): For i = 0, 1, 2, . . . , levelN um − 1 If h(e) ≤ 2i then –{Add e to sample } add its name xb · yb to value si (x) and si (y) and For j = 1, ..., c′ lg n and b = 0, 1: –{Add tag for e:} If hj (e) = b and fj,b (e) = 1 then add 1 to s′i,j,b (x) and s′i,j,b(y). • Delete edge(x, y): For i = 0, 1, 2, .., levelN um − 1: If h(e) ≤ 2i then –subtract its name xb · yb to value si (x) and si (y) and –For j = 1, ..., c′ lg n and b = 0, 1: If hj (e) = b and fj,b (e) = 1 then subtract 1 from s′i,j,b(x) and s′i,j,b (y). If the edge is in F , call Make nontree edge(x, y) to remove it from the ET-tree containing it. • Search(T ): For i = 0, 1, 2, ..., levelN um − 1: While an edge in the cutset (T, V \ T ) has not been found, test zi as follows: Let {z 1 , z 2 } be the edge given by the minimum i such that zi 6= 0. ′ ′ If there is no pair j such that zi,j,0 = zi,j,1 = 1, then it is an edge in the cutset and returned. Else null is returned. Let zi be the sum of the level i vectors for a tree T , and i be the minimum level such that zi 6= 0̄. Then with constant probability p, zi is the name of an edge in the cut (T, V \ T ). If zi 6= 0 then if ′ ′ if zi is not the name of an edge in G, then with high probability, for some pair j, zi,j,0 = zi,j,1 = 1. If zi 6= 0 there is must be at least one edge in the cut, since otherwise h(e) = 0̄ for all edges e. If there is more than one edge in the cut, let e and e′ be two such edges. For b = 0, 1, let Sb = {e | hj (e) = b}. Since each hj is 2-wise independent then for any j, hj (e) 6= hj (e′ ) with probability 1/2, and therefore with probability 1/2, |S0 | > 0 and |S1 | > 0. Recall that hj , fj,0 and fj,1 are independently chosen random hash functions. Therefore, given that |S0 | > 0 and |S1 | > 0, ′ ′ zi,j,0 = zi,j,1 = 1 with probability (1/2)(1/8)2 = 1/128. The probability that this equality fails for all j = 1, 2, ..., c(128) lg n pairs is (1 − 1/128)c(128 lg n) which is less than 1/nc for sufficiently large n. Therefore w.h.p., when Search returns an edge it is an edge in the cut. The probability of correctness as stated in Lemma 2.1 then follows. Running time for the cutset data structure Each hash function requires a constant time to perform the hash. O(log n) hashes are performed to determine if an edge should be sampled for level i and for computing its tag. Each node in a tree in the forest of a cutset data structure has a vector of O(log n) words, since there are O(log n) levels for each level there are two O(log n) bit vectors, si (x) and s′i (x). Maintaining the sum of vectors of in 9 an ET-tree of O(log n) vectors of size O(log n) requires O(log2 n) time. Similarly, Make nontree edge or Make tree edge requires O(log2 n) time. Search(T ) involves finding the maximum level i with non-zero zi and checking its tag or determining if zi is on the current edge list and determining the name of the trees containing these endpoints all take no more than O(log n) time each. Hence we can conclude that the update time for edge insertion or deletion is O(log2 n) time while the search time is O(log n). This concludes the proof of Lemma 2.1. 5 2-edge-connectivity In this section, we treat the dynamic 2-edge connectivity algorithm [5] and two instances of the space efficient dynamic connectivity data structure presented previously as black boxes, which we denote by 2-EDGE, CONN1, and CONN2 respectively. All are generated using independent randomness. Using these black boxes, we will present an algorithm to solve dynamic 2-edge connectivity in O(n log2 n) words with the same query time and an update time which is within a O(log 2 n) factor of [5], i.e., O(log6 n) amortized update time and O(log n/ log log n) query time. The idea is to maintain a certificate for 2-edge connectivity using the dynamic connectivity method shown in the previous sections, and use that certificate as the input into 2-EDGE. In the algorithm below, We give some definitions: • G = (V, E): the dynamic graph • F1 : A maximal forest of G maintained by CONN1 • G1 = (V, E1 ): The graph with the forest edges removed. E1 = E \ F1 • F2 : A maximal forest of G1 maintained by CONN2 • Gc = (V, Ec ) The graph which is the input to 2-EDGE. • F : The 2-edge connected forest of Gc maintained by 2-EDGE We now present algorithms for handling updates and queries: Insert(e): 1. Insert e into E and E1 {Process updates to F1 } 2. For each edge e′ added to F1 , delete e′ from E1 3. For each edge e′ removed from F1 insert e′ into E1 {Process updates to F1 ∪ F2 } 4. For each edge e′ added to F1 ∪ F2 , insert e′ into Ec 5. For each edge e′ removed from F1 ∪ F2 , remove e′ from Ec Delete edge e = (u, v) is the same as Insert(e) except for the first step which is replaced by “Delete e from E and E1 ”. Query(u, v): Query 2EDGE to see if u and v are 2-edge connected. Theorem 5.1. W.h.p., fully dynamic 2-edge connectivity can be maintained in O(log6 n) amortized time per update and O(log n/ log log n) per query using space O(n log2 n) words, over a polynomial length sequence of updates. A proof is given in the Appendix. 10 References [1] Kook Jin Ahn, Sudipto Guha, and Andrew McGregor. Analyzing graph structure via linear measurements. In Yuval Rabani, editor, SODA, pages 459–467. SIAM, 2012. [2] Otakar Boru̇vka. O jistem problemu minimalnim (about a certain minimal problem) (in czech, german summary). Prace mor. pnrodoved., v(3):37–58, 1926. [3] Graham Cormode and Donatella Firmani. A unifying framework for ℓ 0-sampling algorithms. Distributed and Parallel Databases, 32(3):315–335, 2014. [4] Monika R. Henzinger and Valerie King. Randomized fully dynamic graph algorithms with polylogarithmic time per operation. J. ACM, 46(4):502–516, July 1999. [5] Jacob Holm, Kristian de Lichtenberg, and Mikkel Thorup. Poly-logarithmic deterministic fullydynamic algorithms for connectivity, minimum spanning tree, 2-edge, and biconnectivity. J. ACM, 48(4):723–760, 2001. [6] Bruce M. Kapron, Valerie King, and Ben Mountjoy. Dynamic graph connectivity in polylogarithmic worst case time. In Sanjeev Khanna, editor, Proceedings of the Twenty-Fourth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2013, New Orleans, Louisiana, USA, January 6-8, 2013, pages 1131–1142. SIAM, 2013. [7] Mikkel Thorup. Sample(x)=(a*x<=t) is a distinguisher with probability 1/8. abs/1411.4982, 2014. CoRR, Appendix Additional proofs Lemma 3.5. Invariants (1), (2) and (3) are maintained by Initialize, Insert, and Delete. Proof. It is clear that all invariants hold after a call to Initialize. We now consider update operations. Maintenance of Invariant (1) holds trivially because Refresh never makes an edge into a tree edge on tier 0. For Invariant (2), first note that Refresh checks for a cycle and removes an edge from a potential cycle before inserting an edge which causes a cycle in a tree, and so each Fℓ is a forest. For the inclusion property Fℓ ⊆ Fℓ+1 , first note that when handling deletions, the same edge is deleted from every tier, so this does not violate the invariant. For both insertions and deletions, line 8 of Refresh makes eu a tree edge on all tiers > ℓ, so inclusion is immediately maintained when no cycles are created. Now suppose edge eu would form a cycle if inserted. Let e′ be an edge of maximal tier j in this cycle. We first note that j > ℓ + 1, due to the fact that T (u) is isolated. So by the minimality of j and the maximality of the tier of e′ , it must be the case that e′ is not an edge in the forest on any tier < j. Therefore, e′ is removed from all forests containing it, and the inclusion property of Invariant 2 is maintained. Invariant (3) fails only if there is an isolated fragment T on some tier ℓ for which Search(T, ℓ) is successful. We call this a bad T . Initially, if we start with an empty graph, there is no bad T . We assume there is a first update during which a bad T is created and show a contradiction. A 11 bad T is created either if (1) T is newly formed by the update or (2) T pre-exists the update and Search(T, ℓ) is successful in the current graph G. In (2) there are two subcases: T wasn’t isolated before the update or T was isolated before the update but Search(T, ℓ) became successful after the update. Let {x, y} be the updated edge. We first show: Claim: Before the call to Refresh, the only bad fragment introduced on any tier has the form T (x) or T (y), and this remains the case during the execution of Refresh. Proof of Claim: Before the call to Refresh, there are two ways in which this update could create a bad fragment. The first, which may occur for both insertions and deletions, happens when there is a fragment T on a tier ℓ for which Search(T, ℓ) did not return an edge before the update, but now does. This can only be the case if the cut induced by T has changed, and this is only when exactly one of x or y is a node in T . The second can happen before a Refresh and only for deletions, in particular when {x, y} is removed. In this case, two new fragments T (x) and T (y) are created and no other cuts are changed. Hence the claim is proved for the bad fragments created before the call to Refresh. Now, we consider what happens during Refresh. During the execution of Refresh, a bad fragment may result when eu is made into a tree edge on some tier j > ℓ on Line 8, causing two fragments T and T ′ to be joined into one new fragment which may be bad. Since eu is the result of Search(T (x), ℓ) or Search(T (y), ℓ) for some ℓ, the new fragment contains x or y, and by Invariant 2, so does every tree on higher tiers created by inserting eu . Note that replacing one edge by another edge in a cycle does not affect any cut, so the replacement of e′ by eu does not cause the creation of a new bad fragment. This concludes the proof of the claim. Given the claim, we now show that after calling Refresh, Invariant (3) holds. The proof is by induction on the value of ℓ in the for-loop of Refresh. Assume ℓ < top. Suppose that before iteration ℓ, Invariant 3 holds on all tiers < ℓ or ℓ = 0. This will still be the case after iteration ℓ, since this iteration only makes changes on tiers > ℓ. Suppose that T (x) ∈ Fℓ is bad. This means that T (x) is isolated, and Search(T (x), ℓ) returns an edge eu . Since eu is inserted into Fℓ+1 , T (x) in tier ℓ is no longer bad, and Invariant (3) holds on all tiers ≤ ℓ. The same argument applies to T (y). Maintenance of Invariant (3) now holds by induction for all ℓ < top. Lemma 4.2 follows immediately from the following. Lemma 5.2. With probability 1/8, there is an integer j such that exactly one w ∈ W hashes to a value in [2j ].  Proof. Let ℓ = n2 . We prove the statement of the lemma for j = ℓ − ⌈lg |W | − 2⌉. Then 12 1/(4|W |) < 2j /2ℓ < 1/(2|W |). Pr[∃! w ∈ W : h(w) ∈ [2j ]] h X = Pr[h(w) ∈ [2j ] ∧ ∀w′ ∈ W \ {w} : h(w′ ) 6∈ [2j ]] w∈W h We evaluate the inside of the summation: = Pr[h(w) ∈ [2j ]] Pr[∀w′ ∈ W \ {w} : h(w′ ) 6∈ [2j ] | h(w) ∈ [2j ]] h h X ≥ Pr[h(w) ∈ [2j ]](1 − Pr[h(w′ ) ∈ [2j ] | h(w) ∈ [2j ]]) h h w ′ ∈W \{w} By 2-wise independence: = Pr[h(w) ∈ [2j ]](1 − h X Pr[h(w′ ) ∈ [2j ]]) w ′ ∈W \{w} h = (2j /2ℓ · (1 − [(|W | − 1)2j /2ℓ ]) > (1/(4|W |)(1 − [(|W | − 1)/(2|W |)] > 1/(4|W |)(1/2)] = 1/(8|W |) Then Pr[∃! w ∈ W : h(w) ∈ [2j ]] > 1/8. h Theorem 5.1. W.h.p., fully dynamic 2-edge connectivity can be maintained in O(log6 n) amortized time per update and O(log n/ log log n) per query using space O(n log2 n) words, over a polynomial length sequence of updates. Proof. First we prove correctness: Let F be a spanning forest of G and F ′ be a spanning forest of G \ F . Then F ∪ F ′ is a certificate of 2-edge connectivity, i.e., if G is 2-edge connected then so is F ∪ F ′ . The correctness then depends on whether F1 and F2 are correctly maintained as the spanning forests of G and G \ F1 respectively. By the proof of Theorem 3.1, F1 = Ftop maintained by CONN1 is the spanning forest of G w.h.p. Since CONN2 uses independent randomness from CONN1, the updates to F1 and therefore the updates of the input graph G \ F1 to CONN2 are independent of the randomness in CONN2, similarly F2 = Ftop maintained by CONN2 is a spanning forest of G \ F1 w.h.p. By a union bound, both forests are maintained correctly w.h.p. We note that 2EDGE is always correct. We observe from the proof of Theorem 3.1 that a single update to E results in O(log n) updates to Ftop in CONN1, which in turn result in O(log2 n) updates to EC . Each update to EC has amortized time O(log4 n) in 2EDGE. Hence the total time per update is O(log4 n) worst case time in CONN1 plus O(log5 ) worst case time in CONN2 plus O(log6 ) amortized time in 2EDGE, for a total amortized update time of O(log6 n). As the space used by 2EDGE is O(m + n log n) words and |Ec | < 2n, and the space used by CONN1 and CONN2 is O(n log2 n) words, the total space used is O(n log2 n) words. 13
8cs.DS
arXiv:1711.05900v1 [cs.AI] 16 Nov 2017 Using Noisy Extractions to Discover Causal Knowledge Dhanya Sridhar University of California Santa Cruz [email protected] Jay Pujara Information Sciences Institute [email protected] Lise Getoor University of California Santa Cruz [email protected] 1 Introduction Knowledge bases (KB) constructed through information extraction from text play an important role in query answering and reasoning. Since automatic extraction methods yield results of varying quality, typically, only high-confidence extractions are retained, which ensures precision at the expense of recall. Consequently, the noisy extractions are prone to propagating false negatives when used for further reasoning. However, in many problems, empirical observations of entities, or observational data, are readily available, potentially recovering information when fused with noisy extractions. For reasoning tasks where both empirical observations and extractions can be obtained, an open and critical problem is designing methods that exploit both modes of identification. In this work, we study a particular reasoning task, the problem of discovering causal relationships between entities, known as causal discovery. There are two contrasting types of approaches to discovering causal knowledge. One approach attempts to identify causal relationships from text using automatic extraction techniques, while the other approach infers causation from observational data. For example, prior extraction-based approaches have mined causal links such as regulatory relationships among genes directly from scientific text [9, 12]. However, the extracted links often miss complex and longer-range patterns that require observational data. On the other hand, given observations alone, extensive work has studied the problem of inferring a network of cause-and-effect relationships among variables [13, 2]. Observational data such as gene expression measurements are used to infer causal relationships such as gene regulation [7]. Prior approaches use constraints to find valid causal orientations from observational data [5, 6, 7, 13, 4]. Although the constraints offer attractive soundness guarantees, the need for observed measurements of variables remains costly and prohibitive when experimental data is unpublished. Extractions such as interactions between genes mined directly from text provide a coarse approximation of unseen observational data. Combining extractions mined from KBs with observed measurements where available to for causal discovery can alleviate the cost of obtaining experiment-based data. We propose an approach for fusing noisy extractions with observational data to discover causal knowledge. We introduce C AUS F USE, a probabilistic model over causal relationships that combines commonly used constraints over observational data with extractions obtained from a KB. C AUS F USE uses the probabilistic soft logic (PSL) modeling framework to express causal constraints in a natural logical syntax that flexibly incorporates both observational and KB modes of evidence. As our main contributions: 1. We introduce the novel problem of combining noisy extractions from a KB with observational data. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. 2. We propose a principled approach that uses well-studied causal discovery constraints to recover long-range patterns and consistent predictions, while cheaply acquired extractions provide a proxy for unseen observations. 3. We apply our method gene regulatory networks and show the promise of exploiting KB signals in causal discovery, suggesting a critical, new area of research. We compare C AUS F USE with a conventional logic-based approach that uses only observational data to perform causal discovery. We evaluate both methods on transcriptional regulatory networks of yeast. Our results validate two strengths of our approach: 1) C AUS F USE achieves comparable performance with the well-studied conventional method, suggesting that noisy extractions are useful approximations for unseen empirical evidence; and 2) global logical constraints over observational data enforce consistency across predictions and bolster C AUS F USE to perform on par with the competing method. The results suggest promising new directions for integrating knowledge bases in causal reasoning, potentially mitigating the need for expensive observational data. 2 Background on Logical Causal Discovery The inputs to traditional causal discovery methods are m independent observations of n variables V. The problem of causal discovery is to infer a directed acyclic graph (DAG) G ∗ = (V, E) such that each edge Eij ∈ E corresponds to Vi being a direct cause of Vj , where changing the value of Vi always changes the value of Vj . Since graphical model G ∗ encodes conditional independences among V, causal discovery algorithms exploit the mapping between observed independences in the data and paths in G ∗ to specify constraints on the output. The PC algorithm [13] is a canonical such method that performs independence tests on the observations to rule out invalid causal edges. Constraints over causal graph structure can also be encoded with logic [5, 6, 7]. In a logical causal discovery system, independence relations are represented as logical atoms. Logical atoms consist of a predicate symbol pi (·) with i variable or constant arguments and take boolean or continuous truth values. To avoid confusion with logical variables, for the remainder of this paper, we refer to V ∈ V as vertices. As inputs to logical causal discovery, we require the following predicates to represent the outcomes of independence tests among V: – D EP(A, B), I NDEP(A, B) refers to statistical (in)dependence between vertices VA and VB as measured by the independence test VA ⊥ ⊥ VB . The conditioning set is the empty set. – C OND D EP(A, B, S), C OND I NDEP(A, B, S) corresponds to statistical (in)dependence between vertices VA and VB when conditioned on set S ⊂ V \ {VA , VB }. The independence test VA ⊥ ⊥ VB |S is performed. The outputs are of a logical causal discovery system are represented by the following target predicates: – C AUSES (A, B) refers to the absence or presence of a causal edge between VA and VB , and is substituted with all pairs of vertices A, B ∈ V. Finding truth value assignments to these atoms is the goal of causal discovery. – A NCESTOR(A, B) corresponds to the absence or presence of an ancestral edge between all vertices VA and VB , where VA is an ancestor of VB if there is a directed causal path from VA to VB . We may additionally infer the truth values of ancestral atoms jointly with causal atoms. Given the independence tests over V as input, the goal of logical causal discovery is to find consistent assignments to the causal and ancestral output atoms. 3 Using Extractions in Causal Discovery In the problem of fusing noisy extractions with causal discovery, in addition to the observations, we are given a set of variables K = {K11 . . . Knn } of evidence from knowledge base (KB) K, where Kij is an affinity score of the interaction between Vi and Vj based on text extraction. 2 Extending previous logical causal discovery methods, we additionally represent K in the predicate set with T EXTA DJ(A, B). T EXTA DJ(A, B) corresponds to KAB and denotes the absence or presence of an undirected edge, or adjacency, between VA and VB as extracted from text. Evidence of adjacencies is critical to inference of C AUSES (A, B). However, adjacencies in standard causal discovery are inferred from statistical tests alone. In our approach, we replace statistical adjacencies with T EXTA DJ(A, B). The goal of fusing KB evidence in logical causal discovery is to find maximally satisfying assignments to the unknown causal atoms based on constraints over both independence and text-based signals. In section 4, we present a probabilistic logic approach defining constraints using statistical and KB evidence. 4 A Probabilistic Approach to Inferring Causal Knowledge Our approach uses probabilistic soft logic (PSL) [1] to encode constraints for causal discovery. A key advantage of PSL is exact and efficient MAP inference for finding most probable assignments. We first review PSL and then present our novel encoding constraints that combine statistical and KB information. 4.1 Probabilistic Soft Logic PSL is a probabilistic programming framework where random variables are represented as logical atoms and dependencies between them are encoded via rules in first-order logic. Logical atoms in PSL take continuous values and logical satisfaction of the rule is computed using the Lukasiewicz relaxation of Boolean logic. This relaxation into continuous space allows MAP inference to be formulated as a convex optimization problem that can be solved efficiently. Given continuous evidence variables X and unobserved variables Y, PSL defines the following Markov network, called a hinge-loss Markov random field (HL-MRF), over continuous assignments to Y: M  X  1 P (Y = y|X = x) = exp − wr φr (y, x) , (1) Z r=1 where Z is a normalization constant, and φr (y, x) = (max{lr (y, x), 0}) is an efficient-to-optimize hinge-loss feature function that scores configurations of assignments to X and Y as a linear function lr of the variable assignments. An HL-MRF is defined by PSL model M = {(R1 , w1 ) . . . (Rm , wm )}, a set of m weighted disjunctions, or rules, where wi is the weight of i-th rule. Rules consist of logical atoms and are called ground rules if only constants appear in the atoms. To obtain the HL-MRF, we first substitute logical variables appearing in M with constants from observations, producing M ground rules. We observe truth values ∈ [0, 1] for a subset of the ground atoms, X and infer values for the remaining unobserved ground atoms, Y. The ground rules and their corresponding weights map to φr and wr . To derive φr (y, x), the Lukasiewicz relaxation is applied to each ground rule to derive a hinge penalty function over y for violating the rule. Thus, MAP inference minimizes the weighted rule penalties to find the minimally violating joint assignment for all the unobserved variables: m X arg min n wr max{lr (y, x), 0} y∈[0,1] r=1 PSL uses the consensus based ADMM algorithm to perform exact MAP inference. 4.2 C AUS F USE C AUS F USE extends constraints introduced by the PC algorithm [13]. Whereas PC infers adjacencies from conditional independence tests, C AUS F USE uses text-based adjacency evidence in all causal constraints. The text-based adjacency evidence bridges domain-knowledge contained in KBs with statistical tests that propagate causal information. Figure 1 shows all the rules used in C AUS F USE. The first set of rules follow directly from the three constraints introduced by PC. We additionally introduce joint rules to induce dependencies between ancestral and causal structures to propagate consistent predictions. We describe below how C AUS F USE rules upgrade PC to combine KB and statistical signals for causal discovery. 3 Figure 1: PSL rules for combining statistical tests and KB evidence in causal discovery. Rule Type PC-inspired Rules Joint Rules Rules C1) ¬T EXTA DJ (A, B) → ¬C AUSES (A, B) C2) C AUSES (A, B) → ¬C AUSES (B, A) C3) T EXTA DJ (A, B) ∧ T EXTA DJ (C, B) ∧ ¬T EXTA DJ (A, C) ∧ C OND D EP (A, C, S) ∧ IN SET (B, S) → C AUSES (A, B) C4) T EXTA DJ (A, B) ∧ T EXTA DJ (C, B) ∧ ¬T EXTA DJ (A, C) ∧ C OND D EP (A, C, S) ∧ IN SET (B, S) → C AUSES (C, B) C5) C AUSES (A, B) ∧ D EP (A, C) ∧ C OND INDEP (A, C, S) ∧ IN SET (B, S) ∧ T EXTA DJ (B, C) → C AUSES (B, C) C6) C AUSES (A, B) ∧ C AUSES (B, C) ∧ T EXTA DJ (A, C) → C AUSES (A, C) J1) C AUSES (A, B) → A NC (A, B) J2) ¬A NC (A, B) → ¬C AUSES (A, B) J3) A NC (A, B) ∧ A NC (B, C) → A NC (A, C) J4) A NC (A, B) ∧ T EXTA DJ (A, B) → C AUSES (A, B) J5) T EXTA DJ (A, B) ∧ T EXTA DJ (B, C) ∧ D EP (A, C) ∧ C OND INDEP (A, C, S) ∧ IN SET (B, S) ∧ C AUSES (B, A) ∧ ¬A NC (C, A) → C AUSES (B, C) PC-inspired Rules PC uses conditional (in)dependence and adjacency to rule out violating causal orientations. However, in C AUS F USE, all adjacencies are directly mined from a KB. Rule C1 discourages causal edges between vertices that are not adjacent based on evidence in text. Rule C2 penalizes simple cycles between two vertices. Rules C3 and C4 capture the first PC rule and orient chain Vi − Vj − Vk as Vi → Vj ← Vk , a v-structure, based on independence criteria. Rule C5 orients path Vi → Vj − Vk as Vi → Vj → Vk to avoid orienting additional v-structures. Rule C6 maps to the third PC rule, and if Vi → Vj → Vk and Vi − Vk , orients Vi → Vk to avoid a cycle. PC applies these rules iteratively to fix edges whereas in C AUS F USE, the rules induce dependencies between causal edges to encourage parsimonious joint inferences. Joint Rules Joint rules encourage consistency across ancestral and causal predictions through constraints such as transitivity that follow from basic definitions. Rule J1 encodes that causal edges are also ancestral by definition and rule J2 is the contrapositive that penalizes causal edges to nondescendants. Rule J3 encodes transitivity of ancestral edges, encouraging consistency across predictions. Rule J4 infers causal edges between probable ancestral edges that are adjacent based on textual evidence. Rule J5 orients chain Vi − Vj − Vk as a diverging path Vi ← Vj → Vk when Vk is not likely an ancestor of Vi . Joint rules give preference to predicted structures that respect both ancestral and causal graphs. In our evaluation, we investigate the implications of using a noisy extraction-based proxy for adjacency and the benefits of joint modeling. 5 Experimental Evaluation Our experiments investigate the two main claims of our approach: 1. We study whether the noisy extractions are a suitable proxy for latent adjacencies and give similar performance to a conventional logic-based approach that impute adjacency values using only observations. 2. We understand the role of joint ancestral and causal rules over observational data in mitigating noise from the extraction-based evidence. We evaluate C AUS F USE on real-world gene regulatory networks in yeast. We compare against C AU S O BS , the PSL model variant that performs prototypical causal discovery using only observational data. C AUS O BS replaces T EXTA DJ with S TANDARDA DJ , adjacencies computed from conditional independence tests. 5.1 Data Our dataset for evaluation consists of a transcriptional regulatory network across 300 genes in yeast with simulated gene expression from the DREAM4 challenge [8, 10]. We snowball sample 10 smaller subnetworks of sizes 20 with low Jaccard overlap to perform cross validation. The data contains 210 gene expression measurements simulated from differential equation models of the system. 4 We perform independence tests on the real-valued measurements which are known to contribute numerous spurious correlations. In addition to the gene expression data, we model domain knowledge based on undirected protein-protein interaction (PPI) edges extracted from the Yeast Genome Database: A NC(A, B) ∧ L OCAL PPI (A, B) → C AUSES(A, B) We obtain text-based affinity scores of interaction between pairs of yeast genes from the STRING database. STRING finds mentions of gene or protein names across millions of scientific articles and computes the co-occurrence of mentions between genes. As an additional step, STRING extracts relations between genes and increases the affinity score if genes are connected by salient terms such as “binds to” or “phosphorylates.” 5.2 Results Model Variant F1 C AUS F USE C AUS O BS 0.19 ± 0.08 0.20 ± 0.05 C AUS F USES -PC C AUS O BS -PC 0.17 ± 0.07 0.19 ± 0.05 Table 1: C AUS F USE achieves comparable performance with C AUS O BS, suggesting that noisy extractions can approximate unseen adjacencies. Without joint rules, C AUS F USES -PC shows worse performance, pointing to the benefit of sophisticated joint modeling in mitigating noisy extractions. We evaluate C AUS F USE and C AUS O BS using 10-fold cross validation on DREAM4 networks. C AU S O BS uses the same rules as our approach but computes S TANDARDA DJ as ground D EP (A, B) atoms that never appear in groundings of C OND I NDEP(A, B, S), based on definition. To evaluate the additional benefit of joint rules, we compare sub-models of C AUS F USE and C AU S O BS run with causal orientation rules only, denoted C AUS F USES -PC and C AUS O BS -PC respectively. Table 1 shows average F1 scores of all model variants for the regulatory network prediction task on DREAM4. Noisy Extractions Maintain Performance First, we see comparable performance between C AUS F USE and C AUS O BS, answering our first experimental question on how closely noisy extractions approximate adjacencies. In table 1, there is no statistically significant difference between the F1 scores of C AUS F USE and C AUS O BS. The comparable performance between C AUS F USE and C AU S O BS suggests that the noisy extractions can substitute observational data computations without significantly degrading performance. Joint Rules Overcome Noise Our investigation into model variants sheds light on the second experimental question around how logical rules overcome the noise from extractions. When comparing PC-only variants of each method, C AUS O BS -PC gains over C AUS F USES -PC, suggesting that sophisticated joint rules are needed to mitigate the noise from KB extractions. The consistency across predictions encouraged by the joint rules bolsters the extraction-based adjacency signal. Extractions Yield Higher Precision, Lower Recall To further investigate the extraction evidence mined from STRING, we compare both S TANDARDA DJ and T EXTA DJ against gold-standard adjacencies, which we obtain from undirected regulatory links. Table 2 shows the average precision and Adjacency Precision Recall T EXTA DJ S TANDARDA DJ 0.32 0.27 0.11 0.3 Table 2: Extraction-based adjacencies achieve higher-precision but lower recall, further substantiating need for joint rules in recovering missing causal orientations. 5 recall of each adjacency evidence type across the DREAM4 subnetworks. Interestingly, T EXTA DJ achieves higher precision than its statistical counterpart. However, S TANDARDA DJ gains over T EX TA DJ in recall. The result further substantiates the benefit of joint modeling in recovering additional orientations under low-recall inputs. Nonetheless, the comparison points to the need for a deeper understanding of the role KBs play in causal reasoning. 5.3 Experiment Details To obtain marginal and conditional (in)dependence tests, we use linear and partial correlations with Fisher’s Z transformation. We condition on all sets up to size two. We set rule weights for both PSL models to 5.0 except for rule C2 which is set to 10.0, since it encodes a strong acyclicity constraint. Both models use an α threshold on the p-value to categorize independence tests as C OND D EP,D EP or C OND I NDEP,I NDEP. We select α with 10-fold cross validation. We hold out each subnetwork in turn and use the best average F1 score across the other subnetworks to pick α ∈ {0.1, 0.05} raised to powers {1, 2, 3, 4, 5}. C AUS O BS selects two different α values for binning independence tests and computing adjacencies, and C AUS F USE requires a single α for tests only. We also select rounding thresholds for both PSL models within the same cross-validation framework. √ Since α is typically small, we rescale truth values p for C OND I NDEP,I NDEP by 3 p to reduce rightskewness of values. We rescale all STRING affinity scores to be between 0 and 1. 6 Related Work Our work extends constraint-based methods to causal discovery, most notably the PC algorithm [13], which first infers adjacencies and maximally orients them using deterministic rules based on conditional independence. PC only supports external evidence in the form of fixed edges or nonedges. Our work is motivated by recent approaches that cast causal discovery as a SAT instance over conditional independence statements [6, 7, 5]. SAT-based approaches are based on logical representations that more readily admit additional constraints and relations from domain knowledge. However, so far, logical causal discovery methods use external evidence to identify probable edges. In a separate vein, prior work has extended text-mining to identify regulatory networks and genetic interactions only from scientific literature [11, 12, 9]. In contrast, our goal is to propose techniques that leverage both statistical test signals and text evidence. The work most similar to ours combines gene expression data with evidence mined from knowledge bases to infer gene regulatory networks [3]. However, the regulatory network inference orients edges using hard-coded knowledge of transcription factors instead of reasoning about causality. In our approach, we propose a principled causal discovery formulation as the basis of incorporating KB evidence. 7 Discussion and Future Work In this work, we present an initial approach for reasoning with noisy extraction-based evidence directly in a logical causal discovery system. We benefit from a flexible logical formulation that supports replacing conventional adjacencies computed from observational data with cheaply obtained extractions. Our evaluation suggests that the noisy KB-based proxy signal achieves comparable performance to conventional methods. The promising result points to future research in exploiting KBs for causal reasoning, greatly mitigating the need for costly observational data. We see many directions of future work, including better extraction strategies for mining scientific literature and finding text-based proxies for additional statistical test signals. KBs could provide ontological constraints or semantic information useful for causal reasoning. We additionally plan to study knowledge-based constraints for causal discovery. References [1] Stephen H. Bach, Matthias Broecheler, Bert Huang, and Lise Getoor. Hinge-loss markov random fields and probabilistic soft logic. Journal of Machine Learning Research (JMLR), 2017. To appear. [2] David Maxwell Chickering. Learning bayesian networks is np-complete. In Learning from data, pages 121–130. Springer, 1996. 6 [3] Panagiotis Chouvardas, George Kollias, and Christoforos Nikolaou. Inferring active regulatory networks from gene expression data using a combination of prior knowledge and enrichment analysis. BMC bioinformatics, 17(5):181, 2016. [4] Tom Claassen and Tom Heskes. A logical characterization of constraint-based causal discovery. In UAI, 2011. [5] Antti Hyttinen, Patrik O Hoyer, Frederick Eberhardt, and Matti Jarvisalo. Discovering cyclic causal models with latent variables: A general sat-based procedure. In UAI, 2013. [6] Antti Hyttinen, Frederick Eberhardt, and Matti Järvisalo. Constraint-based causal discovery: Conflict resolution with answer set programming. In UAI, 2014. [7] Sara Magliacane, Tom Claassen, and Joris M Mooij. Ancestral causal inference. In NIPS, 2016. [8] Daniel Marbach, Robert J Prill, Thomas Schaffter, Claudio Mattiussi, Dario Floreano, and Gustavo Stolovitzky. Revealing strengths and weaknesses of methods for gene network inference. Proceedings of the national academy of sciences, 107:6286–6291, 2010. [9] Hoifung Poon, Chris Quirk, Charlie DeZiel, and David Heckerman. Literome: Pubmed-scale genomic knowledge base in the cloud. Bioinformatics, 30(19):2840–2842, 2014. [10] Robert J Prill, Daniel Marbach, Julio Saez-Rodriguez, Peter K Sorger, Leonidas G Alexopoulos, Xiaowei Xue, Neil D Clarke, Gregoire Altan-Bonnet, and Gustavo Stolovitzky. Towards a rigorous assessment of systems biology models: the dream3 challenges. PloS one, 5:e9202, 2010. [11] Carlos Rodríguez-Penagos, Heladia Salgado, Irma Martínez-Flores, and Julio Collado-Vides. Automatic reconstruction of a bacterial regulatory network using natural language processing. BMC bioinformatics, 8(1):293, 2007. [12] Yong-Ling Song and Su-Shing Chen. Text mining biomedical literature for constructing gene regulatory networks. Interdisciplinary Sciences: Computational Life Sciences, 1(3):179–186, 2009. [13] Peter Spirtes and Clark Glymour. An algorithm for fast recovery of sparse causal graphs. Social science computer review, 9:62–72, 1991. [14] Damian Szklarczyk, John H Morris, Helen Cook, Michael Kuhn, Stefan Wyder, Milan Simonovic, Alberto Santos, Nadezhda T Doncheva, Alexander Roth, Peer Bork, et al. The string database in 2017: quality-controlled protein–protein association networks, made broadly accessible. Nucleic acids research, 45(D1):D362–D368, 2017. 7
2cs.AI
Beyond SIFT using Binary Features in Loop Closure Detection arXiv:1709.05833v1 [cs.CV] 18 Sep 2017 Lei Han1 , Guyue Zhou2 , Lan Xu1 , Lu Fang3 Abstract— In this paper a binary feature based Loop Closure Detection (LCD) method is proposed, which for the first time achieves higher precision-recall (PR) performance compared with state-of-the-art SIFT feature based approaches. The proposed system originates from our previous work Multi-Index hashing for Loop closure Detection (MILD), which employs Multi-Index Hashing (MIH) [1] for Approximate Nearest Neighbor (ANN) search of binary features. As the accuracy of MILD is limited by repeating textures and inaccurate image similarity measurement, burstiness handling is introduced to solve this problem and achieves considerable accuracy improvement. Additionally, a comprehensive theoretical analysis on MIH used in MILD is conducted to further explore the potentials of hashing methods for ANN search of binary features from probabilistic perspective. This analysis provides more freedom on best parameter choosing in MIH for different application scenarios. Experiments on popular public datasets show that the proposed approach achieved the highest accuracy compared with state-of-the-art while running at 30Hz for databases containing thousands of images. I. INTRODUCTION Loop closure detection serves as a key component for globally consistent visual SLAM systems [2]. Various approaches have been proposed to address this problem, but either suffer from low accuracy [3] and perform unstably under different scenarios, or from low efficiency [4] and take too many computational resources to find a loop closure candidate. Binary feature (ORB [5] or BRISK [6]) based methods [3], [7] benefit from their low computational complexity and efficient memory storage requirements, but also suffer from low precision and instability, showing a wide gap in accuracy compared with real-valued feature (SIFT [8] or SURF [9]) based approaches [4], [10]. Our previously work MILD [11] is the first binary feature based method that achieves comparable accuracy performance by employing MIH in ANN search for binary features instead of conventional methods that rely on a Bag-Of-Words (BOW) scheme. However, the accuracy of MILD is still inferior to state-of-the-art realvalued feature based approaches [4], [10]. It is worthwhile to doubt whether the ceiling of binary feature based LCD approaches has been reached and whether real-valued algorithms perform better than binary This work is supported in part by Natural Science Foundation of China (NSFC) under contract No. 61331015. 1 Lei Han and Lan Xu are with the Robotics Institute, Hong Kong University of Science and Technology, Clear Water Bay, Hong Kong {lhanaf,lxuan}@connect.ust.hk 2 Guyue Zhou is with the DJI-Innovations, Shenzhen, China [email protected] 3 Lu Fang is with the Dept. of Automation, Tsinghua University, Beijing, China [email protected] methods in terms of accuracy. [12] studied this problem in the context of 3D reconstruction, and argue that most of the popular binary features (ORB or BRISK) are inferior to SIFT based method in terms of reconstruction accuracy and completeness without a significant better computational performance. We would argue that binary or real-valued features have different characteristics and should be treated differently. To exploit the potential of binary features in LCD approaches, the procedure of MILD is re-examined. A binary feature (ORB) based LCD approach that achieves better accuracy than SIFT based methods [4], [10] is presented to support our idea. One big challenge of MILD in achieving high accuracy is the inaccurate image similarity measurement. E.g., the two images shown in Fig. 1 are taken at different places while sharing a high similarity score. The same elements (windows, wall tiles) existing in different places tend to cause confusion and decrease the accuracy. Tracing to its source, we find that binary features are less discriminative compared with real-valued features since binary features carry much less information. The burstiness phenomenon [13] is more severe for binary features, which leads to a high similarity score for images taken at different places. Inspired by [13], we propose burstiness handling procedure to overcome the misleading cases. No extra computational burden is introduced in this procedure by employing the specific features of MIH. While MIH is an important tool for ANN search of binary features in MILD, the analysis of MIH is incomplete as the search radius (r) in the substring hashing procedure is limited to 0 for the lack of immediate probabilistic conclusions. As shown in [15], multi-probe techniques may lead to better performance (considering both accuracy and efficiency) for Locality Sensitive Hashing (LSH) of SIFT features. However, no theoretical analysis on the performance gain has been provided for the case of binary features. We propose a more comprehensive analysis of MIH by allowing arbitrary positive integers r using the inclusion-exclusion-principle [16]. Based on this extension, the effect of Multi-Probe LSH for binary features is presented clearly as shown in Fig. 3. Even though MIH is very efficient in filtering out dissimilar features, a considerable part of the candidates selected using MIH would still be outliers for large datasets, a robust early termination strategy would reduce the frequency of memory access as well as Hamming distance calculation without loss of accuracy. In summary, contributions of this paper include: • A more comprehensive theoretical analysis of MIH in ANN search of binary features is presented by enlarging (a) The 199th image taken by left (b) The 199th image taken by right camera camera (c) The 300th image taken by left (d) The 300th image taken by right camera camera Fig. 1. Image [14] 199 and 300 are captured at different places, but shared a high similarity score. • • the search radius r in the substring hashing procedure. While in [11], r is limited to zero. The original MILD [11] is improved in both accuracy and efficiency. Higher accuracy is achieved due to the dealing with burstiness of similar features, while the higher efficiency is due to the use of early termination and omit features selectively, based on probabilistic analysis. And, more remarkable, the designed burstiness handling technique is coped with the MIH procedure so that no extra computational burden is introduced in this procedure. Sparse match is proposed for frame matching using binary features, which is 16 times faster than traverse search at an average precision of 97%, as shown in Sec. IV-B. II. RELATED WORKS Various approaches have been proposed for loop closure detection, either using global image signatures [17] or local image features [18], [14], [3], [7]. While global signatures are relatively compact and can measure the similarity of two images efficiently, it is computationally expensive to extract global signatures, thus unpractical for on-line visual SLAM applications. Recently, deep-learnt features [19], [20] have also shown potentials in LCD for the ability of extracting semantic information from images. In this paper, we will focus on the local feature based approaches aiming to provide an efficient and robust loop closure detector for visual SLAM applications, as local features such as ORB [5] or SIFT [8] are widely used in visual SLAM systems for frame registration [2], [21] and they have been proven to be accurate and robust for various scenarios. Local feature based LCD approaches mainly explore on two sub-problems: feature classification and image similarity measurement. Feature classification tries to cluster different features indicating the same place, while image similarity measurement reveals the possibility of two frames indicating the same place based on previous observations. Most of the previous methods rely on the Bag-of-words (BOW) scheme for efficiency considerations. In BOW, features are clustered into different centroids (visual words) using offline/online trained dictionaries. Frames are represented by the histogram of visual words, and the loop closure likelihood is calculated based on the difference of visual word histograms. However, at least two well-known problems exist in such methods: 1. Perceptual Aliasing as features clustered into the same visual word may indicate different locations, and 2. They have high complexity for real-valued features while low accuracy for binary features. Among these methods, RTAB-MAP [4] achieves the highest accuracy performance in terms of recall at 100% precision, but takes 700 ms per detection. [3] first tries binary features in the BOW scheme called bag of binary words, which is able to handle 20,000 images in 50 ms with a much lower accuracy. Both MILD [11] and [22] argue the inefficiency of BOW for binary features. Unlike MILD using MIH [1], [23] to replace BOW, [22] simply project binary features into real-valued space which is feasible for the BOW scheme. However, the transformation from Hamming distance to Euclidean distance is highly nonlinear and a training procedure is required for choosing projection functions, which limits the range of applications for their proposed system. Various methods have been proposed to improve the image similarity measurement including weak-geometriccheck (WGC) [24] and burstiness [13]. [24] improves image retrieval quality by employing the rotation and scale information of local features. [13] handles the burstiness phenomenon of visual elements by assigning weights for features based on their similarity with others. However, such procedure requires a complex preprocessing to remove repeating features in each image. In this paper, we will show that combining the characteristics of MIH, burstiness can be handled with barely any computational burden. III. LOOP CLOSURE DETECTION As noted in [11], our previous work MILD is proposed for LCD by employing MIH in ANN search of binary features, which achieves significantly better PR performance compared with other binary feature based LCD approaches [3], [7]. However, the accuracy of MILD is still limited to repeating textures which is a common phenomenon in artificial or natural sceneries. The exploration of MIH for ANN search of binary features in [11] is inadequate, as search radius r in substring hashing procedure is limited to 0. For completeness, we will provide a brief review of MILD firstly. Then, based on the framework of MILD, the theoretical analysis of MIH for ANN search of binary features is further explored and extended in Sec. III-B by long binary feature descriptor fin is divided into m disjoint substrings as shown in Fig. 2. Only features that fall into the same hash entry in at least 1 hash table are considered as nearest neighbor candidates of fin . Let Ωni denote the collection of nearest neighbor candidates of fin . Thus, image similarity measurement is approximated as: P|Fn | P φ(fin , fjk ) i=1 fjk ∈Ωn i 0 Φ (In , Ik ) = . (3) |Fn ||Fk | Fig. 2. Framework of MIH. Binary feature fin is divided into m disjoint substrings. k-th substring is the hash index of the kth hash table. Image index n and feature index i are stored in corresponding m entries as reference for feature fin . considering multi-probe MIH. Next, a more precise model for image similarity measurement is provided in Sec. IIIC to improve the accuracy of LCD. Finally, techniques on early termination are discussed in Sec. III-D to improve the efficiency of MILD. An assumption throughout this paper is that the Hamming errors of two feature descriptors are evenly distributed, which will be used for the efficiency-accuracy analysis for MIH. A. Review of MILD In MILD, LCD is divided into two stages: image similarity measurement and Bayesian inference. Image similarity is used to compute the likelihood of two frames as a loop closure while Bayesian inference employs temporal coherency to get a final probability of loop closure based on image similarity. In this paper, we focus on improving the image similarity measurement, which is calculated by binary features directly and hence is more accurate than conventional methods using BOW representation of images. For a query p image Ip , firstly binary features Fp = f1p , f2p , · · · , f|F are p| extracted. The image similarity measurement between Ip and Iq is denoted as Φ(Ip , Iq ): P|Fp | P|Fq | p q i=1 j=1 φ(fi , fj ) Φ(Ip , Iq ) = , (1) |Fp ||Fq | where φ(fip , fjq ) refers to the binary feature similarity, i.e., ( exp(−d2 /σ 2 ), d ≤ d0 , p q φ(fi , fj ) = (2) 0, d > d0 . here d denotes the Hamming distance between binary features fip and fjq , σ is the weighting parameter, and d0 is the pre-defined Hamming distance threshold. Φ(Ip , Iq ) evaluates the similarity of two images using a voting approach [24]. The intuition behind Eqn. (1) is that if two images can be registered using binary features in visual SLAM, they tend to have feature pairs with small Hamming distance which results in a high similarity score. Image similarities between Ip and all candidate images stored in the database are computed using MIH, where a [11] evaluates the performance of MIH from two aspects: Complexity E and Accuracy R. Complexity indicates the ratio between features counted in the candidate set and the total dataset. Accuracy is measured by the probability of two features representing the same location encountered in MIH. Lower E leads to a more efficient image similarity computation while higher R indicates the approximation is more accurate. The probability that a feature pair with Hamming distance d encountered in MIH is denoted as Precall , which is a function of d, m and r. m is the number of hash tables and r is the search radius in the substring hashing procedure. In [11] only the situations of r = 0 are analyzed. m!Θ(d, m) . (4) md Prior statistics of Hamming distance distribution for ORB features [5] are employed in computing E and R. For the ORB descriptor, the Hamming distance distribution for features of the same location (inliers) and different locations (outliers) are approximated as normal distribution Pi (d) ∈ N (32, 10) and Po (d) ∈ N (128, 20), respectively. Thus, the complexity and accuracy of MIH can be computed as: Precall (m, d) = 1 − R(m) E(m) = L P = d=0 L P [Precall (m, d) × Pi (d)], (5) [Precall (m, d) × Po (d)]. d=0 Best parameter of MIH (m) is chosen by considering both R and E. Only features with the same substring of fin are selected into Ωni in [11]. The performance of MIH when features with similar substrings fall into the candidate set will be discussed in Sec. III-B. B. Multi-Probe MIH So far, only a few approaches have addressed the problem of fast search for binary features using hashing technique, including MIH [23] for exact nearest neighbor search and LSH [25] for ANN search. While in [11] and this paper, the statistical information of MIH is employed for approximate nearest neighbor search. In LSH, multiple substrings are extracted from the original binary descriptor independently (e.g., binary elements are randomly selected from the original feature descriptor). To improve the search precision and maintain low complexity, multiple hash table and multi-probe hashing [15] strategies are employed. Although extensive experiments conducted in [25] show that the Hierarchical Clustering Tree (HCI) performs slightly better than LSH, HCI is not considered in our work. Because as a randomized algorithm, the performance of HCI may be unstable even on the same dataset. Beside this, for the problems of LCD, random selection of cluster centers is not possible as features are streamed into the database, it would be impractical to reorganize the tree structure every time a new feature enters. MIH resembles LSH methods for it divides long binary codes into m short substrings. Unlike LSH [25] tries to make each substring independent from each other, MIH takes the inherent correlations in the substrings into consideration. For MIH, feature pairs with a Hamming distance less than m will be discovered for sure. Multi-probe Hashing [15] has shown its ability to improve the search performance of LSH for real-valued features and is adopted in [25] for fast match of binary features by enlarging the substring search radius r. However, in [11], only the situations where r = 0 are analyzed as no off-theshelf mathematical tools can be found for r > 0. In this paper, we complete the analysis of MIH in ANN search of binary features by computing Precall (r, m, d) for arbitrary nonnegative integer r. The derivation is implemented in an iterative way, where the probability Precall (r, m, d) is computed from Precall (r − 1, m, d) following the inclusionexclusion-principle [16]. Precall (r, m, d) is equal to the probability that d independent balls are thrown into m bins randomly, at least one bin has at most r balls. The situations of r = 0 have been analyzed in [11]. Without loss of generality, r = 1 equals to the union of two independent events: 1) At least one bin has no ball. 2) S bins have one ball in each bin, for the rest of the bins, each bin has at least one ball. The probability of event 1 (P1 ) equals to Precall (0, m, d) computed in [11]. Event 2 is the union of Ak , k = 1, 2, · · · , m, where Ak indicates that the kth bin has one ball, and the rest of the bins have at least one ball. Based on combinatorial analysis, we have d(m − 1)d−1 (1 − precall (0, m − 1, d − 1)) . (6) md Following the inclusion-exclusion-principle, the probability of event 2 can be computed as: P (Ak ) = 1 2 3 P2 =CN P (A1 ) − CN P (A1 A2 ) + CN P (A1 A2 A3 )− N · · · ± CN P (A1 A2 · · · AN ). (7) Then, Precall (1, m, d) is given by P1 + P2 . Similarly, Precall (r, m, d) can be computed based on Precall (r − 1, m, d) when r is larger than 1. Given Precall (r, m, d), we can calculate the complexity and accuracy under different parameter configurations, R(r, m) and E(r, m), as shown in Fig. 3. It can be concluded that: • A larger m will lead to higher accuracy as well as higher complexity when r is fixed; • To achieve the same accuracy, it would be more efficient to use a smaller m and a larger r. Fig. 3. Complexity and Accuracy under different MIH parameters including search radius r and hashing table number m. Complexity and Accuracy grows monotonously with m when r is fixed. m starts with 4 for different r as shown in this figure. Additionally, there is a fixed overhead for MIH: the construction of the hash tables, which is denoted by Ef ixed . L Suppose there are m hash tables in MIH, each with 2 m hash entries (L indicates the feature descriptor length, e.g., L L = 256 for ORB features). Ef ixed = m2 m . From this analysis, given a required search precision, we can find the best parameter configurations for MIH to minimize the computational cost including both complexity E and overhead Ef ixed . E.g., in LCD problems, the minimum accuracy required is expected to be larger than 0.8, three parameter candidates for (m, r) include: (15, 0), (10, 1), (8, 2). For on-line loop closure detection problems, (15, 0) is more attractive as all the hash entries can be stored in memory. For applications when the hash tables can be built off-line, (8, 2) would be a better choice as the complexity of MIH is minimized and there is no need to consider Ef ixed . In our implementations for LCD, (16, 0) is chosen as all the substrings can be represented as a short data structure, which is more efficient for CPU operations. C. Burstiness Handling As discussed in [13], visual elements may appear more times in an image than a statistically independent model would predict, which is described as the burstiness phenomenon. Burstiness corrupts the visual similarity measure in the context of image search. Two types of burstiness exist: intra-image, when repeating texture exists in the scenery; and inter-image, when similar objects exist in many places. Various weighting strategies were proposed to handle the burstiness phenomenon in [13], while in this paper we combining the framework of MIH and handling burstiness without an increase of computational burden. For intra-image burstiness, typically it may take a timeconsuming preprocessing procedure to detect intra-image burstiness by a traversal of each feature extracted from the image [13]. Following the formulations in Sec. III-A, the probability of independent features falling into the same hash entry is the complexity E(r, m), which is approximated to 0. While for repeating features, the probability is the accuracy R(r, m), close to 100% under our configurations (r = 0, m = 16). By limiting the number of features falling into the same hash entry for each image, we can accomplish the detection of intra-image repeating features without extra preprocessing procedure. For inter-image burstiness, we weight the feature similarity based on the total similarity score of the feature with all candidates provided by MIH. Given a query feature fin , the feature similarity measurement is modified as φ(f n , fj ) , φ0 (fin , fj ) = log(N/Ni ) P i n fk ∈Ω φfi fk (8) N ) is the inverse document frequency term, N where log( N i represents the total number of candidate frames, and Ni is the number of frames that have a similar feature with fin . Repeating features may cause inefficiency as these features may have little contribution to the image similarity measurement, but may exist in the candidate set frequently. Such inefficiency can be solved by limiting the maximum number of buckets Nbuckets in each hash entry. The average number of features falling into each hash entry would be: N , where Nf eatures is the maximum Af eatures = f eatures 2ls number of features stored in the dataset and ls is the substring length. Nbuckets is set to be 50 × Af eatures by experiment. Entries that have more buckets than Nbuckets are discarded. D. Early Termination The computational complexity of MILD grows linearly with the number of images stored in the database. For large datasets, the most time-consuming part of MILD is the memory access of feature descriptors and Hamming distance calculation. Given the sparsity of repeating locations, we have found that a majority of features in the candidate set are outliers with large Hamming distances. Based on this observation, we adopt early termination to avoid unnecessary memory access and computational cost for outliers by exploiting partial information of the feature descriptor. For the feature fi and its nearest neighbor candidate fj , we only load the first 64 bits of fj to calculate the partial Hamming distance hp between fi and fj . If hp is larger than a threshold, fj is regarded as outliers directly instead of loading the rest bits of fj . Experiments show that early termination succeeds to reject around 50% of the outliers (Hamming distance is larger than 50). IV. EXPERIMENTS To evaluate the performance of our proposed approach, we conduct extensive experiments1 on different datasets2 . Two individual experiments are implemented: LCD and frame match. Experiments in LCD reveal the superior performance of our method on loop closure detection. Experiments in frame match verify the precision of our proposed fast match algorithm: sparse match. 1 Experiments are implemented on an Intel-core i7 @ 2.3 GHz processor with 8 GB RAM. Only one core is used to compare the computational efficiency of the proposed approach with other algorithms. For loop closure detection, up to 800 ORB features are extracted for each image using OpenCV. Feature descriptor length L is set to be 256. 2 NewCollege [14] contains 1073 images of size 1280 × 480. CityCentre [14] contains 1237 images of size 1280 × 480. Lip6Indoor [18] has 388 images of size 192 × 240. Lip6Outdoor [18] has 1063 images of size 192 × 240. BovisaOutdoor [26] contains 2277 images of size 320 × 240. Fig. 4. Computational complexity of the proposed method, in terms of running time (ms) for each frames for NewCollege dataset. Fig. 5. Precision-recall curve for each dataset. A. Loop Closure Detection Accuracy Evaluation: The precision-recall curves of all the datasets are provided in Fig. 5. The proposed approach achieves high accuracy on all the datasets provided, including indoor, outdoor, natural and artificial sceneries. In particular, we present the results on the NewCollege dataset to demonstrate the reliability of our proposed approach. As shown in Fig. 6. nearly all the ground truth closures are detected by the proposed method. Efficiency Evaluation: The runtime of LCD is composed by two main parts: tf for feature detection and extraction and tq for image similarity measurement. The other parts such as Bayesian inference can be completed efficiently within 1ms, thus can be omitted. tf is fixed given image resolution and the number of features selected from each image, while tq grows linearly with the number of frames stored in the database. For the NewCollege dataset with 1073 frames, the average runtime of each procedure is tf = 22.5 ms and tq = 13 ms for the original version of MILD. Based on the proposed early termination technique, tq can be reduced to 10 ms without influencing of accuracy. The speed up factor would be even greater for memory IO inefficient systems, such as embedded chips or FPGA implementations. The time cost of LCD for each frame is also presented in Fig. 4. Although the running time grows linearly with the number of candidate images, it can efficiently handle loop closures for datasets containing thousands of key frames as shown in the experiments, which is more than enough for visual SLAM designed for VR/AR applications or indoor navigation systems. Fig. 7. Accuracy distribution of approximate nearest neighbour search using LSH and SparseMatch. Three nearest neighbour search methods are used in image matching: SparseMatch, LSH and brute-force method. Accuracy is evaluated by the percentage of correctly matched feature pairs in all valid feature pairs (Hamming distance less than 50). Fig. 6. Detected closure VS ground truth closure. The coordinate of each pixel (i, j) represents the index for candidate image and query image respectively. Red indicates the detected closure by our approach, Yellow indicates the ground truth closure. Brown indicates the intersection of the detected closure and ground truth closure. All the red points are neighbors of the brown points and cannot be counted as false positives. RTABMAP [4] BOWP [10] DBOW [3] CNN Feature [20] IBuILD [7] To further verify the performance of proposed scheme, we compare our work with state of the art approaches, RTABMAP [4] and BOWP [10], which are based on SIFT/SURF features, as well as DBOW [3], IBuILD [7] and MILD [11] that use binary features, are used as references for comparison with the proposed system. The quantitative comparisons regarding accuracy (recall rate at 100% precision) and runtime of the whole system (including feature extraction and loop closure detection) are shown in Table IVA. Examining the results presented, the proposed approach achieves the highest recall rate on nearly all the datasets. The real-valued (SIFT or SURF) feature based approach RTABMAP [4] ranks as the second place, while being 20 times slower than our proposed approach. Note that for the BovisaOutdoor dataset, the proposed approach achieves much higher accuracy compared with the other approaches, because similar features (overexposure by the sun glare) exist in almost every frame, causing confusion in conventional LCD methods. Benefitting from the handling of burstiness, the repeating texture has negligible influence on the image similarity measurement. B. Frame Matching Benefit from our analysis on the efficiency-accuracy performance of MIH in ANN search of binary features, sparse match is proposed to find the corresponding features in images I1 and I2 . For frame matching applications, overhead of the database construction must be small and high precision of the matching results is required. Conventional methods based on KD-trees [25] are not suitable for such applications as they require a time-consuming overhead for initialization which can only work repeating usage situations. Sparse match is treated as a light version of LCD, where only I1 MILD [11] Proposed City Centre 81% 700ms 86% 441ms 30.6% 20ms 84.8% 155ms 38% 83% 36ms 89.6% 33ms New College 89% 700ms 77% 393ms 55.9% 20ms 82.4% 155ms 87.3% 35ms 91.8% 32ms Lip6 Indoor 98% 100ms 92% 69ms 41.9% 94.5% 8ms 97.8% 8ms Lip6 Outdoor 95% 400ms 94% 120ms 25.5% 93.4% 9ms 96.3% 9ms Bovisa Outdoor 52% 700ms 40% 209ms 6% 20ms 50% 30ms 85.6% 25ms Table 1. Comparisons with state-of-the-art algorithms in terms of accuracy (recall rate at 100% precision) and efficiency (average running time perframe). is stored in the database, and I2 is the query image. To minimize the overhead Ef ixed and maintain high precision R, the parameter of MIH used in sparse match is chosen as: m = 24, r = 0. Experiments on 1000 image pairs (consecutive images in the NewCollege dataset, 1200 ORB features are extracted from each image) are implemented to verify the performance of MILD in terms of both accuracy and efficiency. In the experiments, three image match methods are implemented: sparse match, LSH implemented in FLANN and bruteforce match. In LSH, we choose the same parameters as SparseMatch (24 hash tables, 10 bits for each key, multiprobe level equal to 0). As shown in Fig. 7, SparseMatch achieved higher accuracy than LSH. The average processing time of each image pair for sparse match is 3.3 ms including all overheads required, while 54.8 ms for brute-force search and 14.88 ms for LSH. The experiments are implemented on a lap-top computer and the number of available CPU cores is limited to 1 to compare the efficiency of different algorithms. V. CONCLUSIONS A binary feature based LCD approach is presented in this paper, which achieves the highest accuracy compared with state-of-the-art as shown in the experiments while running at 30Hz on a laptop. Higher accuracy is achieved based on the handling of burstiness, which reduces the confusion caused by the repeating features. The complexity is also reduced by filtering outliers based on the partial Hamming distance. The main bottleneck for efficiency of the proposed system lies in the extraction of binary features, which takes 70% of the processing time. Fortunately, such computation can be shared with binary feature based SLAM systems. We will keep on improving the performance of the proposed LCD system and maintain the open-source implementation for the community3 . Currently, the proposed approach is only suitable for datasets containing thousands of keyframes. For larger datasets, the superiority of effiency may decrease as the complexity of MILD increases linearly with the number of candidates in the dataset. Memory management schemes such as [4] can be further combined to enable the proposed algorithm running at constant time for large scale problems. A better data structure that is suitable for large hash tables may also be adopted to further improve the efficiency of the proposed LCD system. R EFERENCES [1] Dan Greene, Michal Parnas, and Frances Yao, “Multi-index hashing for information retrieval,” in Foundations of Computer Science, 1994 Proceedings., 35th Annual Symposium on. IEEE, 1994, pp. 722–731. [2] Raul Mur-Artal, Jose Maria Martinez Montiel, and Juan D Tardos, “Orb-slam: a versatile and accurate monocular slam system,” IEEE Transactions on Robotics, vol. 31, no. 5, pp. 1147–1163, 2015. [3] Dorian Gálvez-López and Juan D Tardos, “Bags of binary words for fast place recognition in image sequences,” IEEE Transactions on Robotics, vol. 28, no. 5, pp. 1188–1197, 2012. [4] Mathieu Labbe and Francois Michaud, “Appearance-based loop closure detection for online large-scale and long-term operation,” IEEE Transactions on Robotics, vol. 29, no. 3, pp. 734–745, 2013. [5] Ethan Rublee, Vincent Rabaud, Kurt Konolige, and Gary Bradski, “Orb: An efficient alternative to sift or surf,” in 2011 International conference on computer vision. IEEE, 2011, pp. 2564–2571. [6] Stefan Leutenegger, Margarita Chli, and Roland Y Siegwart, “Brisk: Binary robust invariant scalable keypoints,” in 2011 International conference on computer vision. IEEE, 2011, pp. 2548–2555. [7] Sheraz Khan and Dirk Wollherr, “Ibuild: Incremental bag of binary words for appearance based loop closure detection,” in 2015 IEEE International Conference on Robotics and Automation (ICRA). IEEE, 2015, pp. 5441–5447. [8] David G Lowe, “Distinctive image features from scale-invariant keypoints,” International journal of computer vision, vol. 60, no. 2, pp. 91–110, 2004. [9] Herbert Bay, Tinne Tuytelaars, and Luc Van Gool, “Surf: Speeded up robust features,” in European conference on computer vision. Springer, 2006, pp. 404–417. [10] Nishant Kejriwal, Swagat Kumar, and Tomohiro Shibata, “High performance loop closure detection using bag of word pairs,” Robotics and Autonomous Systems, vol. 77, pp. 55–65, 2016. [11] Lei Han and Lu Fang, “Mild: Multi-index hashing for loop closure detection,” arXiv preprint arXiv:1702.08780, accepted in Multimedia and Expo (ICME), 2017 IEEE International Conference on, 2017. [12] Bin Fan, Qingqun Kong, Wei Sui, Zhiheng Wang, Xinchao Wang, Shiming Xiang, Chunhong Pan, and Pascal Fua, “Do we need binary features for 3d reconstruction?,” in Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition Workshops, 2016, pp. 53–62. [13] Hervé Jégou, Matthijs Douze, and Cordelia Schmid, “On the burstiness of visual elements,” in Computer Vision and Pattern Recognition, 2009. CVPR 2009. IEEE Conference on. IEEE, 2009, pp. 1169–1176. [14] Mark Cummins and Paul Newman, “Fab-map: Probabilistic localization and mapping in the space of appearance,” The International Journal of Robotics Research, vol. 27, no. 6, pp. 647–665, 2008. 3 Code avaliable from: https://github.com/lhanaf/MILD [15] Qin Lv, William Josephson, Zhe Wang, Moses Charikar, and Kai Li, “Multi-probe lsh: efficient indexing for high-dimensional similarity search,” in Proceedings of the 33rd international conference on Very large data bases. VLDB Endowment, 2007, pp. 950–961. [16] Kiyosi Itô, An Introduction to Probability Theory, Cambridge University Press, 1984. [17] Relja Arandjelovic and Andrew Zisserman, “All about vlad,” in Proceedings of the IEEE conference on Computer Vision and Pattern Recognition, 2013, pp. 1578–1585. [18] Adrien Angeli, David Filliat, Stéphane Doncieux, and Jean-Arcady Meyer, “Fast and incremental method for loop-closure detection using bags of visual words,” IEEE Transactions on Robotics, vol. 24, no. 5, pp. 1027–1037, 2008. [19] Silvia Cascianelli, Gabriele Costante, Enrico Bellocchio, Paolo Valigi, Mario L Fravolini, and Thomas A Ciarfuglia, “Robust visual semisemantic loop closure detection by a covisibility graph and cnn features,” Robotics and Autonomous Systems, vol. 92, pp. 53–65, 2017. [20] Yi Hou, Hong Zhang, and Shilin Zhou, “Convolutional neural network-based image representation for visual loop closure detection,” in Information and Automation, 2015 IEEE International Conference on. IEEE, 2015, pp. 2238–2245. [21] Hauke Strasdat, Local accuracy and global consistency for efficient visual slam, Ph.D. thesis, Citeseer, 2012. [22] Simon Lynen, Michael Bosse, Paul Furgale, and Roland Siegwart, “Placeless place-recognition,” in 2014 2nd International Conference on 3D Vision. IEEE, 2014, vol. 1, pp. 303–310. [23] Mohammad Norouzi, Ali Punjani, and David J Fleet, “Fast exact search in hamming space with multi-index hashing,” IEEE transactions on pattern analysis and machine intelligence, vol. 36, no. 6, pp. 1107–1119, 2014. [24] Herve Jegou, Matthijs Douze, and Cordelia Schmid, “Hamming embedding and weak geometric consistency for large scale image search,” in European conference on computer vision. Springer, 2008, pp. 304–317. [25] Marius Muja and David G Lowe, “Fast matching of binary features,” in Computer and Robot Vision (CRV), 2012 Ninth Conference on. IEEE, 2012, pp. 404–410. [26] Simone Ceriani, Giulio Fontana, Alessandro Giusti, Daniele Marzorati, Matteo Matteucci, Davide Migliore, Davide Rizzi, Domenico G Sorrenti, and Pierluigi Taddei, “Rawseeds ground truth collection systems for indoor self-localization and mapping,” Autonomous Robots, vol. 27, no. 4, pp. 353, 2009.
1cs.CV
Parameterized and approximation complexity of the detection pair problem in graphs Florent Foucaud∗ Ralf Klasing† arXiv:1601.05003v2 [cs.DS] 30 Jan 2018 January 31, 2018 Abstract We study the complexity of the problem Detection Pair. A detection pair of a graph G is a pair (W, L) of sets of detectors with W ⊆ V (G), the watchers, and L ⊆ V (G), the listeners, such that for every pair u, v of vertices that are not dominated by a watcher of W , there is a listener of L whose distances to u and to v are different. The goal is to minimize |W | + |L|. This problem generalizes the two classic problems Dominating Set and Metric Dimension, that correspond to the restrictions L = ∅ and W = ∅, respectively. Detection Pair was recently introduced by Finbow, Hartnell and Young [A. S. Finbow, B. L. Hartnell and J. R. Young. The complexity of monitoring a network with both watchers and listeners. Networks, accepted], who proved it to be NP-complete on trees, a surprising result given that both Dominating Set and Metric Dimension are known to be linear-time solvable on trees. It follows from an existing reduction by Hartung and Nichterlein for Metric Dimension that even on bipartite subcubic graphs of arbitrarily large girth, Detection Pair is NP-hard to approximate within a sub-logarithmic factor and W[2]-hard (when parameterized by solution size). We show, using a reduction to Set Cover, that Detection Pair is approximable within a factor logarithmic in the number of vertices of the input graph. Our two main results are a linear-time 2-approximation algorithm and an FPT algorithm for Detection Pair on trees. Keywords: Graph theory, Detection pair, Metric dimension, Dominating set, Approximation algorithm, Parameterized complexity 1 Introduction In order to monitor faults in a network, one can place detectors on its nodes. One possibility is to use “local” devices that are able to detect the location of a fault within distance one (we call them watchers). Another kind of detectors, that are more far-reaching, are able to determine the exact distance of a fault to the device, but not its precise location (we call such detectors listeners). If we wish to monitor a network by using only watchers, we have the classic problem Dominating Set [14, GT2] (see the books [19, 20] for a survey of results on this problem). If, on the other hand, we want to use only listeners, we have the problem Metric Dimension [14, GT61] (see for example the papers [2, 4, 15, 17, 22, 24] and references therein). However, it can be useful to use both kinds of detectors: for example, one watcher is enough to monitor a complete graph of order n, while we would need n − 1 listeners to do so. On the other hand, one listener would suffice to monitor a path of order n, but for the same task we would need ⌈n/3⌉ watchers. Therefore, Finbow, Hartnell and Young [12] recently proposed the concept of a detection pair in a graph G, that is, a pair (W, L) where W ⊆ V (G) is a set of watchers and L ⊆ V (G) is a set of listeners that, together, monitor the graph G. More formally, we say that a vertex w dominates all the vertices in the closed neighbourhood N [w] of w (that is, N [w] is the set of neighbours of w together with w itself). Moreover, a vertex ∗ LIMOS - CNRS UMR 6158 - Université Blaise Pascal, Clermont-Ferrand (France). E-mail: [email protected] † LaBRI - CNRS UMR 5800 - Université de Bordeaux, F-33400 Talence (France). E-mail: [email protected] 1 l separates two vertices u and v if the distance d(u, l) is different from the distance d(v, l). Given a pair (W, L) of sets with W ⊆ V (G) (the watchers) and L ⊆ V (G) (the listeners), we say that a vertex u is distinguished by (W, L) either if u is dominated by a watcher of W , or if for every other vertex v, either v is dominated by a watcher of W , or u and v are separated by a listener of L. Then, (W, L) is a detection pair of G if every vertex of G is distinguished by (W, L). The size of (W, L) is the sum |W | + |L| and is denoted by ||(W, L)||. Note that we may have W ∩ L 6= ∅ if we choose to place both a listener and a watcher at the same position. We denote by DP (G) the minimum size of a detection pair of G. Any vertex of (W, L) is called a detector. If we have a detection pair (∅, L) in a graph G, then L is called a resolving set of G, and the smallest size of a resolving set of G is called its metric dimension, denoted M D(G). On the other hand, if we have a detection pair (W, ∅), then W is a dominating set of G, and the smallest size of a dominating set of G is its domination number, denoted γ(G). Clearly, we have DP (G) ≤ min{γ(G), M D(G)}, and the inequality can be strict [12]. It follows that for any graph G without isolated vertices, we have DP (G) ≤ γ(G) ≤ |V (G)|/2 [19]. The goal of this paper is to study the decision and optimization problems that are naturally associated to the notion of a detection pair (other computational problems that are mentioned in this paper are defined formally in Section 2). Detection Pair Instance: A graph G, a positive integer k. Question: Is there a detection pair (W, L) of G with ||(W, L)|| ≤ k? Opt-Detection Pair Instance: A graph G. Task: Compute an optimal detection pair of G. A c-approximation algorithm for a given optimization problem ΠO is an algorithm that returns a solution whose size is always at most c times the optimum. We refer to the book [1] for more details. For a decision problem Π and for some parameter p of the instance, an algorithm for Π is said to be fixed parameter tractable (FPT for short) if it runs in time f (p)nc , where f is a computable function, n is the input size, and c is a constant. In this paper we will always consider the solution size k as the parameter. We refer to the books [8, 23] for more details. Finbow, Hartnell and Young proved that Detection Pair is NP-complete on trees [12], while Opt-Detection Pair is linear-time solvable on trees containing no pair of leaves with a common neighbour. This hardness result is quite surprising since the related problems Opt-Dominating Set and Opt-Metric Dimension, while being NP-hard in general [14, GT2,GT61], can be solved in linear time on trees (see respectively [5] and [15, 24]). We note that Dominating Set is among the most classic and well-studied graph problems (see the books [19, 20]), and that Metric Dimension has enjoyed a lot of interest in the recent years: see the papers [3, 6, 9, 10, 11, 13, 17, 18]. In this paper, we continue the study of the complexity of Detection Pair and Opt-Detection Pair initiated in [12]. In Section 3, we describe a reduction to Opt-Set Cover that shows that Opt-Detection Pair can be solved within a factor logarithmic in the size of the input graph. On the other hand, we observe that a reduction of Hartung and Nichterlein [16, 17] for Opt-Metric Dimension can also be applied to Opt-Detection Pair. This implies that Opt-Detection Pair is NP-hard to approximate within a factor that is sublogarithmic in the input graph’s order, and that Detection Pair is W[2]-hard when parameterized by the solution size k. (These hardness results hold even for graphs that are bipartite, subcubic, and have arbitrarily large girth.) In Section 4, we prove that Opt-Detection Pair is 2-approximable in linear time on trees. In Section 5, we show that there is an algorithm for Detection Pair running in FPT time 2O(k log k) n2 on trees.1 We start the paper with some preliminary considerations in Section 2, and conclude in Section 6. 1 In this paper, “log” denotes the natural logarithm function. 2 2 Preliminaries We start with some preliminary considerations. 2.1 Definitions of used computational problems We now formally define a few auxiliary computational problems that are used or mentioned in this paper. Dominating Set [14, GT2] Instance: A graph G, a positive integer k. Question: Do we have γ(G) ≤ k, that is, is there a dominating set D of G with |D| ≤ k? Opt-Dominating Set Instance: A graph G. Task: Compute an optimal dominating set of G. Metric Dimension [14, GT61] Instance: A graph G, a positive integer k. Question: Do we have M D(G) ≤ k, that is, is there a resolving set R of G with |R| ≤ k? Opt-Metric Dimension Instance: A graph G. Task: Compute an optimal resolving set of G. Set Cover [14, SP5] Instance: A hypergraph H = (X, S), a positive integer k. Question: Is there a set cover C of H with |C| ≤ k (that is, C ⊆ S and each vertex of X belongs to some set of C)? Opt-Set Cover Instance: A hypergraph H. Task: Compute an optimal set cover of H. 2.2 Specific terminology In a graph G, a vertex of degree 1 is called a leaf. A vertex is called a branching point if its degree is at least 3. A branching point v is special if there is a path L starting at v and ending at a vertex of degree 1, and whose inner-vertices all have degree 2. Path L − v is called a leg of v, and we say that L is attached to v (note that vertex v does not belong to the leg). A special branching point with t leaves as neighbours is called a t-stem.2 Given a special branching point x of a tree T , we define the subtree L(x) of T as the tree containing x and all legs of T attached to x. 2.3 The classic algorithm for Opt-Metric Dimension on trees We will use the following results of Slater [24] about Opt-Metric Dimension on trees, that are classic in the literature about metric dimension. See also [15, 22] for similar considerations. Proposition 1 (Slater [24]). Let T be a tree and R be the set of vertices containing, for each special branching point x of T that has ℓ legs attached, the leaves of the ℓ − 1 longest of these legs. Then, R is an optimal resolving set of T . We have the following consequence of Proposition 1. Theorem 2 (Slater [24]). Opt-Metric Dimension can be solved optimally in linear time on trees. 2 The previous terminology is from [12] (branching points, stems) and [22] (legs). 3 2.4 Observations and lemmas about detection pairs The following easy observations and lemmas will be useful. Observation 3. Let G be a graph and B2+ the set of its special branching points with at least two legs attached. Then, we have DP (G) ≥ |B2+ |. Proof. Let (W, L) be a detection pair of G. We show that for each special branching point x of B2+ , there is at least one detector of (W, L) among x and the vertices belonging to a leg attached to x. Indeed, if not, then any two neighbours of x belonging to this set would neither be dominated by a watcher, nor separated by a listener, a contradiction. Lemma 4. Let x be a special branching point of a graph G with a set Sx of t leaf neighbours and a set Lx of ℓ legs of length at least 2 attached to x. Let (W, L) be a detection pair of G. If there is a watcher at x, at least ℓ − 1 of the legs in Lx contain a detector of (W, L). Otherwise, at least t + ℓ − 1 legs attached to x contain a detector. Proof. If there is a watcher at x, assume for a contradiction that two legs L1 and L2 of Lx contain no detector. Then, neither the listeners of (W, L) nor the watcher at x can distinguish the two vertices of L1 and L2 that are at distance 2 from x, a contradiction. A similar argument holds for vertices at distance 1 of x when x has no watcher. Lemma 5. Let G be a graph with a special branching point x having a leg attached, whose leaf is y. If G has a detection pair (W, L) with x ∈ L, then (W, L \ {x} ∪ {y}) is also a detection pair of G. Proof. Let Vx be the set of vertices containing x and the vertices of the leg attached to x whose leaf is y. Clearly, a pair u, v of vertices in V (G) \ Vx are separated by x if and only if they are separated by y. Moreover, all the vertices in the leg containing y are clearly distinguished, because each such vertex is the unique one with its distance to y. This completes the proof. 3 General approximability and non-approximability In this section, we discuss the general approximation complexity of Opt-Detection Pair. Theorem 6. Opt-Detection Pair can be approximated within a factor 2 log n + 1 on graphs of order n. Proof. Given a graph G, we build an instance (X, S) of Opt-Set Cover as follows. We let X be the set of vertex pairs of G. For each vertex v of G, we have a set Wv of S that contains an element {x, y} of X if v dominates at least one of x and y. We also have a set Lv that contains an element  {x, y} of X if we have d(v, x) 6= d(v, y). Therefore we have |X| = |V (G)| and |S| = 2|V (G)|. Now, 2 we claim that we have a one-to-one correspondance between the detection pairs of G and the set covers of (X, S). Indeed, for every vertex v of G, the set Wv of S corresponds to a watcher placed at vertex v, and the set Lv corresponds to a listener placed at vertex v. Moreover set Uv of S (with U ∈ {W, L}) covers exactly the elements of X that correspond to a pair that is separated by the according detector placed on v in G. Since Opt-Set Cover is approximable within a factor of log(|X|) + 1 in polynomial time [21], the result follows. Hartung and Nichterlein [17] provided a reduction from Dominating Set to Metric Dimension. This reduction was improved by Hartung in his PhD thesis [16] to get a reduction mapping any instance (G, k) to an instance (G′ , k + 4), where G′ is a bipartite graph of maximum degree 3 and has girth 4|V (G)| + 6. In fact, it is not difficult to see that for any detection pair P of G′ of size k ′ , there is a detection pair P ′ of G′ of size at most k ′ containing no watchers. In other words, we have DP (G′ ) = M D(G′ ), and therefore the aforementioned reduction is also a reduction to Detection Pair. Hence we have the following.3 3 Hartung and Nichterlein only state the hardness of approxmation for factors in o(log n), but a recent result on the inapproximability of Opt-Set Cover [7], that transfers to Opt-Dominating Set via standard reductions, implies our stronger statement. 4 Theorem 7 (Hartung and Nichterlein [16, 17]). Opt-Detection Pair is NP-hard to approximate within a factor of (1 − ǫ) log n (for any ǫ > 0) for instances of order n, and Detection Pair is W[2]-hard (parameterized by the solution size k). Let g ≥ 4 be an arbitrary integer. These results hold even for instances that are bipartite, have maximum degree 3, and girth at least g. 4 A 2-approximation algorithm on trees In this section, we prove the following approximability result. Theorem 8. There is a linear-time 2-approximation algorithm for Opt-Detection Pair on trees. Proof. Given an input tree T , we denote by S3+ , the set of vertices of T that are t-stems for some t ≥ 3. Moreover, we define T ′ as the tree obtained from T as follows. For each vertex v of S3+ (that is, v is a t-stem for some t ≥ 3), assuming that there are ℓ legs of length at least 2 attached to v in T , we remove from T : (i) t − 2 leaf neighbours of v if ℓ = 0, (ii) t − 1 leaf neighbours of v if ℓ = 1, and (iii) all t leaf neighbours of v if ℓ ≥ 2. Therefore, in T ′ , there are at least two legs attached to each vertex of S3+ . Let us describe our algorithm A. 1. Compute the set S3+ and build T ′ from T . 2. Compute an optimal resolving set R′ of T ′ . 3. Output A(T ) = (S3+ , R′ ). We first prove that A(T ) is a detection pair of T . Notice that the distances from listeners in R′ and vertices of V (T ′ ) are the same in T and T ′ . Therefore, all pairs of vertices of V (T ′ ) are distinguished in T by the listeners of A(T ). On the other hand, all vertices of V (T ) − V (T ′ ) are dominated by the watchers of S3+ . Therefore, A(T ) is a detection pair of T . Moreover, it is clear that S3+ and T ′ can be computed in linear time, and R′ can be computed in linear time using Slater’s algorithm (Theorem 2). Therefore A is a linear-time algorithm. It remains to prove that ||A(T )|| = |S3+ | + M D(T ′ ) ≤ 2 · DP (T ) for any tree T . Notice that A(T ) contains only vertices that are part of some subtree L(x), where x is a special branching point of T ; indeed, any vertex of S3+ is a special branching point of T , and any special branching point of T ′ is also a special branching point of T (by Proposition 1, any optimal resolving set of T ′ only contains vertices that belong to some subtree L(x) of T ′ ). Therefore, it suffices to prove that for any detection pair D = (W, L) of T , for any optimal resolving set R′ of T ′ and for every special branching point x of T , we have |S3+ ∩V (L(x))|+|R′ ∩V (L(x))| ≤ 2|W ∩V (L(x))|+2|L∩V (L(x))|. To this end, let us assume that x is a t-stem for some t ≥ 0, and that there are ℓ legs of length at least 2 attached to x. We distinguish the following cases. Case 1: ℓ ≤ 1. Then, L(x) contains at most two detectors of A(T ). Indeed, if t ≤ 2, it contains one or two listeners; if t ≥ 3, it contains one watcher and one listener. By Lemma 4, there is at least one detector in L(x), which completes the proof of this case. Case 2: ℓ ≥ 2. Then, by Lemma 4, any detection pair (W, L) of T has a detector in at least ℓ − 1 legs of length at least 2 of L(x). If t ≥ 3 (that is, x ∈ S3+ ), A(T ) has exactly ℓ − 1 listeners and one watcher in L(x). Therefore, for any detection pair (W, L) of T , we have 2|W ∩ V (L(x))| + 2|L ∩ V (L(x))| ≥ 2ℓ − 2 ≥ ℓ = |S3+ ∩ V (L(x))| + |R′ ∩ V (L(x))| (because ℓ ≥ 2), and we are done. Hence, assume that t ≤ 2. Then, L(x) contains only listeners of A(T ), that is, precisely t + ℓ − 1 leaves of L(x) that belong to R′ . If t ≤ 1, we have ℓ−1 ≥ t and then, for any detection pair (W, L) of T , we have 2|W ∩V (L(x))|+2|L∩V (L(x))| ≥ 2ℓ−2 ≥ t+ℓ−1 = |S3+ ∩V (L(x))|+|R′ ∩V (L(x))|, and we are done. If however, t = 2, by Lemma 4, there are at least ℓ detectors of (W, L) in L(x). Hence, we have 2|W ∩V (L(x))|+ 2|L ∩V (L(x))| ≥ 2ℓ ≥ t+ ℓ > t+ ℓ − 1 = |S3+ ∩V (L(x))|+ |R′ ∩V (L(x))|. This completes the proof. 5 There are two infinite families of trees that show that our algorithm has no better approximation ratio than 2. The first family consists of trees Tℓ1 (ℓ ≥ 1) that are built from ℓ disjoint stars with at least three leaves each, all whose centers are adjacent to an additional single vertex. We have ||A(Tℓ1 )|| = 2ℓ (this solution set contains one watcher and one listener for every star), while DP (Tℓ1 ) ≤ ℓ (simply let every center of a star be a watcher, and select no listener). Hence the approximation ratio of A on Tℓ1 is 2. A second family consists of trees Tℓ2 (ℓ ≥ 1) built from a path P of ℓ+2 vertices. For each of the two end-vertices of P , add two leaves that are adjacent to this end-vertex. For each degree 2-vertex v of P , build a star Sv with three leaves and subdivide one of its edges once. Moreover, the center of Sv is made adjacent to v. We have ||A(Tℓ2 )|| = 2ℓ + 2 (each star contains two listeners, and two additional listeners are selected among the four degree 1-vertices adjacent to end-vertices of P ), while DP (Tℓ2 ) ≤ ℓ + 2 (put a watcher on each center of a star, and add one neighbour of each 2 . endpoint of P as a listener). The approximation ratio of A on Tℓ2 is 2 − ℓ+2 5 A fixed parameter tractable algorithm on trees In this section, we provide an exact algorithm for Detection Pair that is FPT for the natural parameter k, the solution size. The idea of the algorithm is as follows. We first search for a solution with |L| ≤ 1. After this step, we may assume that |L| ≥ 2, which is a technical condition required for the subsequent steps of the algorithm. Then we proceed in three phases. In the first phase, we handle the solution around the special branching points of the tree. As we will see, there is only a fixed set of possibilities to try for each such branching point. Then, in the second phase, we determine the set of remaining listeners. Here, we are able to compute a set (whose size is bounded in terms of k) of possible vertices that may contain a listener in an optimal solution. Finally, in the third phase, we determine the set of remaining watchers, and again we are able to compute a set of vertices (whose size is bounded in terms of k) that may be used as a watcher. The algorithm then checks the validity of each possible choice of these placements. Theorem 9. Detection Pair can be solved in time 2O(k log k) n2 on trees of order n. 5.1 Preliminary lemmas Before describing the algorithm, we prove a series of lemmas that will be essential. The first lemma is useful to handle special branching points of the tree, by reducing the problem around these vertices to a fixed number of cases. Lemma 10. Let G be a graph with a special branching point x with at least two legs and (W, L) an optimal detection pair of G. Let Sx be the set of leaves adjacent to x, and let Lx be the set of legs of length at least 2 attached to x. Denote by V (Lx ) the vertices belonging to a leg in Lx , and let ℓ = |Lx | and t = |Sx | (so, x is a t-stem). Then, we can obtain from (W, L) another optimal detection pair of G by replacing all the detectors in Vx = {x} ∪ Sx ∪ V (Lx ) by one of the following sets of detectors: 1. If ℓ ≤ 1, we may use: (a) a single watcher at x; (b) a watcher at x, and a listener at the leaf of a longest leg attached to x; (c) if t + ℓ = 2, a single listener at the leaf of a longest leg attached to x. 2. If ℓ ≥ 2, we may use: (a) a watcher at x and ℓ listeners at all leaves of the legs of Lx ; (b) a watcher at x and ℓ − 1 listeners at all leaves of the legs of Lx but the shortest one; (c) if t ≤ 1, ℓ + t listeners at all leaves of the legs attached to x; 6 (d) if t ≤ 1, ℓ + t − 1 listeners at all leaves of the legs attached to x, except for a shortest such leg. Proof. Clearly, if there are any watchers among {x} ∪ Sx, we may replace them by a single watcher at x and obtain a valid detection pair. We now distinguish two cases. Case 1: ℓ ≤ 1. Then, we have t ≥ 1. If Vx contained a unique detector of (W, L) that is a watcher, then it must have dominated a leaf neighbour of x (since t ≥ 1, such a neighbour exists). Then as observed at the beginning of the proof, we may replace this detector by a watcher at x, and we are in Case 1(a). If Vx had a unique detector of (W, L) that is a listener, then by Lemma 4 we must have had t + ℓ = 1. Note that any listener in Vx seperates the same set of pairs of vertices from V (G) \ Vx . Hence we may replace the existing listener by a listener at the leaf of a longest leg attached to x, which separates at least as many vertices as any other listener in Vx . Then we are in Case 1(c) and we are done. Hence, we assume that Vx contained at least two detectors of (W, L). Then, using similar arguments one can check that the solution of Case 1(b) yields a valid detection pair of G that is not larger than (W, L). Case 2: ℓ ≥ 2. As observed before, we can replace all watchers in {x} ∪ Sx by a single watcher + at x. If x has a watcher, we let L+ x = Lx ; otherwise, we let Lx be the set of all legs attached to x. + + Let ℓ = |Lx |. By Lemma 4, at least ℓ+ − 1 ≥ 1 of the legs in L+ x contain a detector of (W, L). Assume first that (W, L) contained at least ℓ+ detectors of (W, L) on the legs of L+ x . Then, we replace all such detectors by a listener at the leaf of each leg of L+ . Then, any vertex of a leg Li of L+ x x is distinguished by its distance to the listener placed at the leaf of Li . Since any listener in Vx separates the same set of pairs in V (G) \ Vx , we have obtained a valid detection pair that is not larger than (W, L) and we are in Case 2(a) or 2(c). Suppose now that there are exactly ℓ+ − 1 detectors of (W, L) on the legs of L+ x . We replace these detectors by a listener at the leaf of each of the ℓ+ −1 longest legs of L+ . By similar arguments x as above, all vertices in Vx that do not belong to the unique leg L1 of L+ without a detector are x distinguished. Again, any listener in Vx separates the same set of pairs of V (G) \ Vx . Hence, if some vertex is not distinguished by the new detection pair, it must be a vertex u of L1 that is not separated from a vertex v of V (G) \ Vx . This implies that d(u, x) = d(v, x) (otherwise u and v would be separated by any of the listeners placed in Vx ). We know that u and v were separated by some detector of (W, L), which must have been a detector in the leg L1 (no detector in another leg of L+ x could possibly separate u and v since d(u, x) = d(v, x)). But we know that there was + one leg L2 of L+ x that contained no detector of (W, L). Since L1 is a shortest leg of Lx , there is ′ ′ ′ a vertex u in L2 with d(x, u) = d(x, u ). But then, u and v were not distinguished by (W, L), a contradiction. Hence we have a valid detection pair whose size is not greater than ||(W, L)|| and we are in Case 2(b) or 2(d), and we are done. The next two lemmas are used in our algorithm to choose the placement of the listeners. Lemma 11. Let G be a graph with two vertices u and v connected by a unique path P . Let V (P + ) be the set of vertices of P together with the vertices of each leg attached to an inner-vertex of degree 3 of P . Then, by placing listeners on u and on v, all vertices of V (P + ) are distinguished (by u and v). Proof. For every vertex x of G, we let δu,v (x) = d(u, x) − d(v, x). Note that if for two vertices x and y, δu,v (x) 6= δu,v (y), then x and y are separated by u and v. Clearly, u and v are distinguished. Let w be a vertex of V (P + ) \ {u, v}, and assume for a contradiction that there is some vertex z with d(u, w) = d(u, z) and d(v, w) = d(v, z). In particular, δu,v (w) = δu,v (z). Note that for every two vertices p, q of P , we have δu,v (p) 6= δu,v (q), therefore at most one of the vertices w and z can belong to P . We assume w.l.o.g. that z does not belong to P . The shortest paths from z to both u and v must go through an inner-vertex of P , say s. Then, we have δu,v (z) = δu,v (s) = δu,v (w), which implies that all shortest paths from w to u and v also go through s. But then, we have d(w, s) = d(z, s), a contradiction because by the structure of V (P + ) this implies that w = z. 7 Lemma 12. Let G be a graph with two vertices u and v connected by a unique path P , such that each inner-vertex of P has either degree 2 or a single leg attached. Moreover let V (P + ) be the set of inner-vertices of P together with the vertices of each leg attached to an inner-vertex of degree 3 of P . Then, for every detection pair (W, L) of G, one can obtain a valid detection pair of G by replacing all detectors of (W ∪ L) ∩ V (P + ) by two listeners at u and v. Proof. By Lemma 11, all vertices in V (P + ) are distinguished by u and v. Note that no watcher of V (P + ) could possibly distinguish any vertex outside of V (P + ) ∪ {u, v} (and u, v are clearly distinguished). Furthermore, since P is the unique path connecting u and v, for any listener l ∈ L in V (P + ), the set of pairs in V (G) \ V (P + ) separated by l is the same as the set of pairs separated by u (and by v). This completes the proof. The next lemma will be used in the algorithm to determine the placement of watchers in parts of the tree where there is no listener. Lemma 13. Let T be a tree with a vertex x and an optimal detection pair (W, L) of T with |L| ≥ 1. Let Tx be a subtree of T containing x and assume that (i) Tx contains no t-stems for any t ≥ 2, (ii) for each listener l of L and each vertex v of Tx , the shortest path from l to v goes through x (in particular Tx − x contains no listener) and (iii) Tx is maximal with respect to (i) and (ii). Then, there is a set X of size at most 63|W |2 with W ∩ V (Tx ) ⊆ X. Moreover, X can be determined in time linear in |V (Tx )|. Proof. We may view Tx as a rooted tree whose root is x. Consider the partition P of V (Tx ) into parts P0 , P1 , . . . , Pd where Pi contains the vertices of V (Tx ) that have distance i to x. Since |L| ≥ 1 and by (ii) all shortest paths from any listener of L to a vertex of Tx go through x, the set L of listeners separates a pair u, v of V (Tx ) if and only if u and v belong to different parts of P. Therefore, since (W, L) is a detection pair of G, for any two distinct vertices u and v from the same part Pi , at least one of u, v is dominated by a watcher of W . Let S2+ be the set of parts of P of size at least 2 (that is, those parts where at least one vertex fx be the forest induced by the set of vertices of Tx that must be dominated by a watcher). Let F fx ), and we shall belong to some part of S2+ , together with their neighbours in Tx . We let X = V (F prove that X satisfies the claim. First, we show that (W ∩ V (Tx )) ⊆ X. Assume by contradiction that this is not the case, and let w be a watcher of W that belongs to V (Tx ) \ X. By the optimality of (W, L), (W \ {w}, L) is not a detection pair of T . Therefore, there must be some vertex u dominated by w that is not separated by L from some other vertex v (and v is not dominated by a watcher of W \ {w}). In other words, for every listener l ∈ L, we have dT (u, l) = dT (v, l). Thus, since T is a tree, all shortest paths from l to both u and v have a common part (say from l until some vertex y) and then are disjoint. By (iii), Tx is maximal with respect to (i) and (ii), which implies that y = x and both u and v belong to Tx . However, observe that u belongs to a part of S2+ (otherwise w would belong to X). Therefore, u is uniquely determined (within Tx ) by its distance to x. Since |L| ≥ 1 and by (ii), this implies that u and v are in fact distinguished by L, a contradiction. Thus, we have shown that W ∩ V (Tx ) ⊆ X. It is moreover clear that X can be computed in time linear in |V (Tx )| by using the distances of the vertices of Tx to x. Therefore, it remains only to bound the size of X. fx contains vertices of at most 9|W | distinct parts of P. To each part Pi First, we show that F fx but that may of S2+ , we can associate the two parts Pi−1 and Pi+1 , that may have vertices in F f not be in S2+ . Hence, the total number of parts with a vertex in Fx is at most 3|S2+ |. Since a watcher may dominate vertices from at most three parts of S2+ and each part in S2+ has at least fx contains vertices of at most one vertex dominated by a watcher, we have |S2+ | ≤ 3|W |, hence F 9|W | distinct parts of P. fx has at most |W | + 2|S2+ | ≤ 7|W | leaves. Note that a leaf of F fx is Second, we prove that F either an actual leaf in T , or it is a vertex of a part Pi with |Pi | = 1 (or both). We claim that fx can contain at most |W | leaves of T belonging to a part of S2+ . Indeed, each such leaf must F be dominated by a watcher, but it can be dominated only by itself or by its parent in Tx . But since by (i) there are no t-stems for t ≥ 2 in Tx , no parent can dominate more than one leaf, which fx contains vertices from at most 2|S2+ | parts of P of size 1, proves the bound. Furthermore, F 8 fx that are not in a part of |S2+ | is at most 2|S2+ | ≤ 6|W | since hence the number of leaves of F fx . |S2+ | ≤ 3|W |. Hence in total, we have at most 7|W | leaves in F But any rooted forest with at most 9|W | levels and with at most 7|W | leaves may have at most fx ) has size at most 63|W |2 . This completes the proof. 63|W |2 vertices, hence X = V (F 5.2 The algorithm (proof of Theorem 9) We now describe the claimed FPT algorithm for Detection Pair on trees and prove its correctness and running time. Proof of Theorem 9. Let us describe the algorithm, that seeks to build a detection pair (W, L) with at most k detectors of an input tree T of order n. Preliminary phase: Searching for a solution with |L| ≤ 1. A first step of the algorithm is to check whether there is a solution with |L| ≤ 1. If we set L = ∅, the problem is equivalent to finding a dominating set of T of size at most k. This can be done in linear time [5]. If we set |L| = 1, one may try the n possibilities for the placement of the unique listener. For each possibility (say we have placed the listener at vertex v), we create a subtree Tv of T rooted at v as follows. First of all, let Tv = T . Then, for each t-stem x of T with t ≥ 2 (except if v is a leaf attached to x and x is a 2-stem), we may assume that x belongs to W (by a similar argument as in the proof of Lemma 10, Cases 1a and 2a.). Thus, we add x to W and we we remove from Tv all leaves but one that are attached to x (if v is one such leaf, we keep v in Tv ). Now Tv has no t-stems for t ≥ 2 and we can apply Lemma 13. Thus, there is a set X of at most 63k 2 vertices that may contain a watcher (X is computable in linear time). Then, it suffices to try all the possibilities of selecting k − |W | − 1  2 additional watchers from this set. There are at most 63k ∈ O 2O(k log k) such possibilities. For k each of them, we check in linear time whether we have a valid detection pair. In total this phase takes 2O(k log k) n2 time. If we find a valid solution in this phase, we return YES. Next, we assume that |L| ≥ 2 and proceed in three phases. Phase 1: Handling the special branching points. We now do a preprocessing step using Lemma 10. First compute (in linear time) the set of special branching points of T , and let B2+ be the set of those special branching points that have at least two legs attached. Note that by Observation 3, if |B2+ | > k we can return NO. Hence, assume that |B2+ | ≤ k. Now, for each special branching point x of B2+ , by Lemma 10 we can assume that there are at most four different choices for the set of detectors on x and the vertices belonging to a leg attached to x. Therefore, we may go through each of the possible combinations of these choices; there are at most 4k of them. Of course we discard the choices for which there are more than k detectors. For a combination Ci , Let (Wi , Li ) be the partial detection pair corresponding to Ci . In the remainder, we show how to decide whether there is a detection pair (W, L) of T with Wi ⊆ W , Li ⊆ L and ||(W, L)|| ≤ k. Phase 2: determining the set of listeners. Let Vi∗ be the set of vertices of T containing, for each pair u, v of listeners of Li , all the vertices of the path Puv connecting u and v, as well as all the vertices of each leg of T attached to a degree 3 inner-vertex of Puv . By Lemma 11, all the vertices in Vi∗ are distinguished by (Wi , Li ). Clearly, the subgraph Ti∗ = T [Vi∗ ] of T is a connected subtree. Let X = {x1 , . . . , xp } be the set of vertices in Vi∗ that have a neighbour in T − Ti∗ . For each vertex xj of X, we let Txj be the subtree of T formed by xj together with all trees of T − Ti∗ containing a neighbour of xj . Let F be the forest consisting of all trees Txj (1 ≤ j ≤ p) such that at least one vertex of Txj is not distinguished by (Wi , Li ). Next, we upper-bound the size of F . Claim 9.A. If there is a detection pair (W, L) of T with Wi ⊆ W , Li ⊆ L and ||(W, L)|| ≤ k, then |F | ≤ k. Proof of claim. We prove that each tree of F must contain a detector of (W, L). Assume for contradiction that there is a tree Txa of F such that no detector of (W, L) belongs to Txa . By definition, Txa contains a vertex w not distinguished by (Wi , Li ), hence there is a vertex w′ of T − Ti∗ (say, w′ ∈ Txb ) not separated by any listener of Li and none of w, w′ is dominated by a watcher of Wi . Then, w′ must belong to Txa (hence a = b), indeed by definition of Ti∗ there are two listeners u and v of Li whose path contains xa and xb . But then, if a 6= b, clearly u and v 9 would separate w and w′ , a contradiction. But since w and w′ both belong to Txa , no listener outside of Txa can separate them, and clearly no watcher outside of Txa can dominate them, which  proves the claim.  By Claim 9.A, if we have |F | > k, we can discard the combination Ci ; hence, we assume that |F | ≤ k. d Now, from each tree Txj of F , we build the subtree T xj of Txj as follows: (i) remove all legs in Txj whose closest special branching point has only one leg attached; (ii) remove each leaf of Txj d that is adjacent to a watcher of Wi . We also denote by Fb the forest containing each tree T xa with Txa ∈ F . We next claim the following. Claim 9.B. If there is a detection pair (W, L) of T with Wi ⊆ W , Li ⊆ L and ka detectors on d Txa , then T xa has at most 2ka leaves. d Proof of claim. Let us consider the legs of T xa containing no detector of (Wi , Li ). By (i) of the d construction of Txa , such a leg must be attached to a special branching point having at least two legs attached. (Note that operation (i) did not create any new special branching point.) Moreover, d by (ii), if this leg has length 1 in T xa , its unique vertex will not be dominated by a watcher, since the set of detectors on this leg and its special branching point are determined by the combination Ci . Note that in (ii), if we create a new leg, this leg contains a detector (a watcher). d d Let v be a special branching point of T xa and let Lv be the set of legs in Txa attached to v that do not contain any detector of (Wi , Li ). By the previous discussion, we have |Lv | ≥ 2. If some leg of Lv has length 1, as we observed there will be no watcher on v. Hence, in order to separate all the neighbours of v on the legs of Lv , we need a detector in at least |Lv | − 1 ≥ |Lv |/2 of these legs. Otherwise, we still need that many detectors in order to separate all the vertices at distance 2 of v d on the legs of Lv . Hence, at most half of the leaves of T xa belong to a leg with no detector, which  proves the claim.  By Claim 9.B, d Txj has at most 2kj leaves (where kj is the set of detectors placed on Txj ). Therefore, if the total number of leaves in the forest Fb is more than 2k, we can discard the current combination Ci . Hence, we can assume that the total number of leaves in Fb is at most 2k. Therefore, the total number of vertices of degree at least 3 in Fb is at most 2k. Let us consider the sets of maximal threads in Fb (that is, paths with inner-vertices of degree 2). The endpoints of such threads are vertices of degree 1 or at least 3 in Fb, and therefore the number of such threads is at most the number of these vertices, which is upper-bounded by 4k. b d Each such thread Puv between two vertices u and v of a tree T xj of F, corresponds (in Txj ) to a path whose inner-vertices either have a single leg attached, or contain a watcher of Wi with a set of leaves attached. Hence, we may assume that Puv contains at most two listeners: if it contained more than two, by Lemma 12, we could replace them with the two endpoints u and v of Puv . Moreover, if Puv contained exactly one listener, similarly we may assume it is placed on one of the endpoints of Puv . Indeed, since |L| ≥ 2, there will be another listener in the solution set. If this listener is closer to u, similarly as in Lemma 11, a listener on v would distinguish all + + ) contains all vertices of Puv and the vertices of legs attached to vertices on V (Puv ) (where V (Puv + ) separated by u and inner-vertices of Puv ). Moreover, the set of pairs of vertices outside of V (Puv by v are the same. Note that by Lemma 5, if we choose to place a listener on an endpoint u of d a path Puv that is a thread in T xj and this endpoint has a leg attached, instead of placing the listener on u we can instead place the listener on the leaf of this leg. d Therefore, for each thread Puv of T xa , there are four possibilities for the placement of the listeners: a listener on both u and v (or the leaf of a corresponding leg attached to u or v); a single listener at u; a single listener at v; no listener. There are therefore at most 44k possibilities to guess the placement of listeners on tree Txa . For each such placement Pj , we obtain a set Lj of listeners (of course, if ||(W, Li ∪ Lj )|| > k we do not consider this placement). Now, we can assume that L = Li ∪ Lj , that is, that there will be no more listeners in the sought solution (W, L). Hence, it remains to check whether we can obtain a valid solution of size k by only adding watchers. ∗ Phase 3: Determining the set of watchers. We compute a tree Ti,j similarly as Ti∗ but using ′ ∗ the new set Li ∪ Lj of listeners. Similarly as before, we define the set X of vertices of Ti,j having 10 ∗ a neighbour in T − Ti,j , and the set of trees Tx′ j . We also let F ′ be the forest containing those ′ trees Txj that have at least one vertex not distinguished by (Wi , Li ∪ Lj ). We know that for each tree Tx′ j of F ′ , we will use only watchers to distinguish the vertices not yet distinguished. For each ′ ′ g tree Tx′ j in F ′ , let T xj be the tree obtained from Txj by removing all leaves already dominated by a watcher of Wi . If this process has created a t-stem with t ≥ 2, then at least t − 1 leaf neighbours ′ g of this t-stem have a watcher of Wi ; simply remove them. Then, the obtained tree T xj has no ′ to satisfy g t-stems with t ≥ 2. Hence, we can apply Lemma 13 to g T ′ (if necessary, we augment T xj xj the maximality condition (iii) in Lemma 13). Thus, there is a set Xj of at most 63k 2 vertices of ′ g g Tx′ j that may possibly contain a watcher, and Xj can be computed in time linear in |V (T xj )|. As ′ before, there are at most k trees in F and hence in total the set X = ∪j Xj of possible placements for the remaining watchers has size at most 63k 3 (and is computable in linear time). Therefore, we  3 can check all the 63k ∈ O 2O(k log k) possibilities of placing the remaining watchers. If we find k a valid detection pair (W, L) with Wi ⊆ W , we return YES; otherwise, we discard the placement Pj and move on to the next possibility. It is clear, by the lemmas used in the description in the algorithm, that this algorithm is correct. The running time of the preliminary phase is 2O(k log k) n2 . The running time of Phases 1 to 3 is at most 4k 44k 2O(k log k) n which is 2O(k log k) n. This completes the proof. 6 Conclusion We have obtained a linear-time 2-approximation algorithm for Opt-Detection Pair on trees, but perhaps this algorithmic upper bound could be improved to a PTAS? It seems that the reduction of [12] does not show the inapproximability of Opt-Detection Pair for any constant greater than one. Therefore, it remains to settle the exact approximation complexity of Opt-Detection Pair on trees. As a second question, can the factor 2O(k log k) in our FPT algorithm for Detection Pair be improved to single-exponential FPT time 2O(k) (or even sub-exponential time 2o(k) )? For this, the bottleneck is our use of Lemma 13 in the preliminary phase and in Phase 3 of the algorithm, during which we search through all possible subsets of size k of some sets of size O(k 2 ) and O(k 3 ), respectively. Moreover, it is perhaps possible to obtain a linear running-time (in terms of n) by reducing the running-time of the preliminary phase. As an extension of our results, it would be of interest to determine whether, on further graph classes, Opt-Detection Pair is constant-factor approximable and whether Detection Pair is FPT. One natural research direction is to consider the class of planar graphs or its subclasses, the outerplanar graphs and the series-parallel graphs (that is, graphs of treewidth 2). These three classes contain all trees. Although both questions are settled in the affirmative for OptDominating Set and Dominating Set (see [20] and [8, 23]), as far as we know they also remain open for Opt-Metric Dimension and Metric Dimension (though, a polynomial-time algorithm exists for Opt-Metric Dimension on outerplanar graphs [6]). Acknowledgements. We thank the anonymous referees for their careful reading and valuable comments. We wish to thank Bert L. Hartnell for sharing the manuscript [12] with us. Moreover we acknowledge the financial support of the programme ”IdEx Bordeaux – CPU (ANR-10-IDEX03-02)”. References [1] G. Ausiello, P. Crescenzi, G. Gambosi, V. Kann, A. Marchetti-Spaccamela and M. Protasi. Complexity and approximation. Springer, 1999. [2] R. F. Bailey and P. J. Cameron. Base size, metric dimension and other invariants of groups and graphs. Bulletin of the London Mathematical Society 43:209–242, 2011. 11 [3] R. Belmonte, F. V. Fomin, P. A. Golovach and M. S. Ramanujan. Metric dimension of bounded width graphs. Proceedings of the 40th International Symposium on Mathematical Foundations of Computer Science, MFCS 2015, LNCS 9235:115–126, 2015. [4] G. Chartrand, L. Eroh, M. Johnson and O. Oellermann. Resolvability in graphs and the metric dimension of a graph. Discrete Applied Mathematics 105(1-3):99–113, 2000. [5] E. J. Cockayne, S. Goodman and S. T. Hedetniemi. A linear algorithm for the domination number of a tree. Information Processing Letters 4:41–44, 1975. [6] J. Diaz, O. Pottonen, M. Serna and E. J. van Leeuwen. On the complexity of metric dimension. Proceedings of the 20th European Symposium on Algorithms, ESA 2012, LNCS 7501:419–430, 2012. [7] I. Dinur and D. Steurer. Analytical approach to parallel repetition. Proceedings of the fortysixth annual ACM symposium on Theory of computing, STOC 2014 :624–633, 2014. [8] R. G. Downey and M. R. Fellows. Fundamentals of Parameterized Complexity. Springer, 2013. [9] D. Eppstein. Metric dimension parameterized by max leaf number. Journal of Graph Algorithms and Applications 19(1):313–323, 2015. [10] L. Epstein, A. Levin and G. J. Woeginger. The (weighted) metric dimension of graphs: hard and easy cases. Algorithmica 72(4):1130–1171, 2015. [11] H. Fernau, P. Heggernes, P. van’t Hof, D. Meister and R. Saei. Computing the metric dimension for chain graphs. Information Processing Letters 115:671–676, 2015. [12] A. S. Finbow, B. L. Hartnell and J. R. Young. The complexity of monitoring a network with both watchers and listeners. Networks, accepted. [13] F. Foucaud, G. B. Mertzios, R. Naserasr, A. Parreau and P. Valicov. Identification, locationdomination and metric dimension on interval and permutation graphs. II. Algorithms and complexity. Algorithmica, to appear. [14] M. R. Garey and D. S. Johnson. Computers and intractability: a guide to the theory of NPcompleteness, W. H. Freeman, 1979. [15] F. Harary and R. A. Melter. On the metric dimension of a graph. Ars Combinatoria 2:191–195, 1976. [16] S. Hartung. Exploring parameter spaces in coping with computational intractability. PhD Thesis, Technische Universität Berlin, Germany, 2014. https://opus4.kobv.de/opus4-tuberlin/frontdoor/index/index/docId/4644 [17] S. Hartung and A. Nichterlein. On the parameterized and approximation hardness of metric dimension. Proceedings of the IEEE Conference on Computational Complexity, CCC 2013 :266– 276, 2013. [18] M. Hauptmann, R. Schmied and C. Viehmann. Approximation complexity of metric dimension problem. Journal of Discrete Algorithms 14:214–222, 2012. [19] T. W. Haynes, S. T. Hedetniemi and P. J. Slater. Fundamentals of domination in graphs. Marcel Dekker, 1998. [20] T. W. Haynes, S. T. Hedetniemi and P. J. Slater, editors. Domination in graphs: advanced topics. Marcel Dekker, 1998. [21] D. S. Johnson, Approximation algorithms for combinatorial problems. Journal of Computer and System Sciences 9:256–278, 1974. [22] S. Khuller, B. Raghavachari and A. Rosenfeld. Landmarks in graphs. Discrete Applied Mathematics 70:217–229, 1996. 12 [23] R. Niedermeier. Invitation to fixed-parameter algorithms. Oxford University Press, 2006. [24] P. J. Slater. Leaves of trees. Congressus Numerantium 14:549–559, 1975. 13
8cs.DS
COHEN-MACAULAY CIRCULANT GRAPHS arXiv:1210.8351v1 [math.AC] 31 Oct 2012 KEVIN N. VANDER MEULEN, ADAM VAN TUYL, AND CATRIONA WATT Abstract. Let G be the circulant graph Cn (S) with S ⊆ {1, 2, . . . , ⌊ n2 ⌋}, and let I(G) denote its the edge ideal in the ring R = k[x1 , . . . , xn ]. We consider the problem of determining when G is Cohen-Macaulay, i.e, R/I(G) is a Cohen-Macaulay ring. Because a Cohen-Macaulay graph G must be well-covered, we focus on known families of wellcovered circulant graphs of the form Cn (1, 2, . . . , d). We also characterize which cubic circulant graphs are Cohen-Macaulay. We end with the observation that even though the well-covered property is preserved under lexicographical products of graphs, this is not true of the Cohen-Macaulay property. 1. Introduction Let G = (VG , EG ) denote a finite simple graph on the vertex set VG = {x1 , . . . , xn } with edge set EG . By identifying the vertices of G with the variables of the polynomial ring R = k[x1 , . . . , xn ] (here, k is any field), we can associate to G the quadratic square-free monomial ideal I(G) = hxi xj | {xi , xj } ∈ EG i ⊆ R called the edge ideal of G. Edge ideals were first introduced by Villarreal [17]. During the last couple of years, there has been an interest in determining which graphs G are Cohen-Macaulay, that is, determining when the ring R/I(G) is a Cohen-Macaulay ring solely from the properties of the graphs. Although this problem is probably intractable for arbitrary graphs, results are known for some families of graphs, e.g., chordal graphs [8] and bipartite graphs [7]. Readers may also be interested in the recent survey of Morey and Villarreal [11] and the textbook of Herzog and Hibi [6], especially Chapter 9. Our goal is to identify families of circulant graphs that are Cohen-Macaulay. Given an integer n ≥ 1 and a subset S ⊆ {1, 2, . . . , ⌊ n2 ⌋}, the circulant graph Cn (S) is the graph on n vertices {x1 , . . . , xn } such that {xi , xj } is an edge of Cn (S) if and only if min{|i−j|, n−|i− j|} ∈ S. See, for example, the graph C12 (1, 3, 4) in Figure 1. For convenience of notation, we suppress the set brackets for the set S = {1, 3, 4} in C12 (1, 3, 4). Circulant graphs belong to the family of Cayley graphs and are sometimes viewed as generalized cycles since Cn = Cn (1). The complete graph is also a circulant graph because Kn = Cn (1, 2, . . . , ⌊ n2 ⌋). In the literature, circulant graphs have appeared in a number of applications related to 2010 Mathematics Subject Classification. 13F55, 13H10, 05C75, 05E45. Key words and phrases. Cohen-Macaulay, circulant graph, well-covered graph, vertex decomposable, shellable. Last updated: January 7, 2018. Research of first two authors supported in part by NSERC Discovery Grants. Research of the third author supported by an NSERC USRA. 1 COHEN-MACAULAY CIRCULANT GRAPHS 2 Figure 1. The circulant graph C12 (1, 3, 4). networks [1], error-correcting codes [14], and even music [3], in part, because of their regular structure (see [4]). To classify families of Cohen-Macaulay circulant graphs we will use the fact that all Cohen-Macaulay graphs must be well-covered. A graph G is well-covered if all the maximal independent sets of G have the same cardinality, equivalently, every maximal independent set is a maximum independent set (see the survey of Plummer [12]). From an algebraic point-of-view, when a graph G is well-covered, the edge ideal is I(G) is unmixed, that is, all of its associated primes have the same height. Some families of well-covered circulant graphs were recently classified by Brown and Hoshino [4]. Our main results (see Theorems 3.4 and 5.2) refine the work of Brown and Hoshino by determining which of these well-covered circulant graphs are also Cohen-Macaulay. In particular we show in Theorem 3.4 that for n ≥ 2d ≥ 2, the circulant Cn (1, 2, . . . , d) is Cohen-Macaulay if and only if n ≤ 3d + 2 and n 6= 2d + 2. We also show that the Cohen-Macaulay graphs Cn (1, 2, . . . , d) are in fact vertex decomposable and shellable. Although the wellcovered circulant graphs C2d+2 (1, 2, . . . , d) and C4d+3 (1, 2, . . . , d) are not Cohen-Macaulay, we prove that these graphs are Buchsbaum (see Theorem 3.7). We also classify which cubic circulant graphs are Cohen-Macaulay (see Theorem 5.5). Our paper is structured as follows. In Section 2 we recall the relevant background regarding graph theory and simplicial complexes. In Section 3 we classify the CohenMacaulay graphs of the form Cn (1, 2, . . . , d) with n ≥ 2d. Section 4 contains the proof of a lemma needed to prove the main result of Section 3. In Section 5, we look at cubic circulant graphs, and classify those that are Cohen-Macaulay. Section 6 contains some concluding comments and open questions related to the lexicographical product of graphs. 2. Background Definitions and Results A simplicial complex ∆ on a vertex set V = {x1 , . . . , xn } is a set of subsets of V that satisfies: (i) if F ∈ ∆ and G ⊆ F , then G ∈ ∆, and (ii) for each i = 1, . . . , n, {xi } ∈ ∆. Note that condition (i) implies that ∅ ∈ ∆. The elements of ∆ are called its faces. The maximal elements of ∆, with respect to inclusion, are the facets of ∆. The dimension of a face F ∈ ∆ is given by dim F = |F | − 1; the dimension of a simplicial complex, denoted dim ∆, is the maximum dimension of all its faces. We call ∆ a pure simplicial complex if all its facets have the same dimension. Let fi be the number of faces of ∆ of dimension i, with the convention that f−1 = 1. If dim ∆ = D, then the f -vector of ∆ is the (D + 2)-tuple f (∆) = (f−1 , f0 , f1 , . . . , fD ). The h-vector of ∆ is the COHEN-MACAULAY CIRCULANT GRAPHS 3 (D + 2)-tuple h(∆) = (h0 , h1 , . . . , hD+1 ) with (see [18, Theorem 5.4.6])   k X k−i D + 1 − i fi−1 . hk = (−1) k − i i=0 Given any simplicial complex ∆ on V , we can associate to ∆ a monomial ideal I∆ in the polynomial ring R = k[x1 , . . . , xn ] (with k a field) as follows: I∆ = h{xj1 xj2 · · · xjr | {xj1 , . . . , xjr } 6∈ ∆}i. The ideal I∆ is commonly called the Stanley-Reisner ideal of ∆, and the quotient ring R/I∆ is the Stanley-Reisner ring of ∆. We say that ∆ is Cohen-Macaulay (over k) if its Stanley-Reisner ring R/I∆ is a CohenMacaulay ring, that is, K-dim(R/I∆ ) = depth(R/I∆ ). Here K-dim(R/I∆ ), the Krull dimension, is the length of the longest chain of prime ideals in R/I∆ with strict inclusions, and depth(R/I∆ ), the depth, is length of the longest sequence f1 , . . . , fj in hx1 , . . . , xn i that forms a regular sequence on R/I∆ . We review the required background on reduced homology; see [10] for complete details. To any simplicial complex ∆ with f (∆) = (f−1 , f0 , . . . , fD ) we can associate a reduced chain complex over k: ∂ ∂ ∂ ∂ 0 1 2 D C̃· (∆; k) : 0 ←− k f−1 ←− k f0 ←− k f1 ←− · · · ←− k fD ← 0. Here k fi is the vector space with basis elements ej0 ,j1 ,...,ji corresponding to the i-dimensional faces of ∆. We assume j0 < j1 < · · · < ji . The boundary maps ∂i are given by ∂i (ej0 ,j1 ,...,ji ) = eĵ0 ,j1 ,...,ji − ej0 ,ĵ1 ,...,ji + ej0 ,j1,ĵ2 ...,ji + · · · + (−1)i ej0 ,j1,...,ĵi where ˆ denotes an omitted term. The ith reduced simplicial homology of ∆ with coefficients in k is the k-vector space H̃i (∆; k) = ker(∂i )/ im(∂i+1 ). The dimensions of H̃i (∆; k) are related to f (∆) via the reduced Euler characteristic: (2.1) D X (−1)i dimk H̃i (∆; k) = i=−1 D X (−1)i fi . i=−1 We will find it convenient to use Reisner’s Criterion. Given a face F ∈ ∆, the link of F in ∆ is the subcomplex link∆ (F ) = {G ∈ ∆ | F ∩ G = ∅, F ∪ G ∈ ∆}. Theorem 2.1 (Reisner’s Criterion). Let ∆ be a simplicial complex on V . Then R/I∆ is Cohen-Macaulay over k if and only if for all F ∈ ∆, H̃i (link∆ (F ); k) = 0 for all i < dim link∆ (F ). For any vertex x ∈ V , the deletion of x in ∆ is the subcomplex del∆ ({x}) = {F ∈ ∆ | x 6∈ F }. The following combinatorial topology property was introduced by Provan and Billera [13]. COHEN-MACAULAY CIRCULANT GRAPHS 4 Definition 2.2. Let ∆ be a pure simplicial complex. Then ∆ is vertex decomposable if (i) ∆ is a simplex, i.e {x1 , . . . , xn } is the unique maximal facet, or (ii) there exists an x ∈ V such that link∆ ({x}) and del∆ ({x}) are vertex decomposable. We will also refer to the following family of simplicial complexes. Definition 2.3. Let ∆ be a pure simplicial complex with facets {F1 , . . . , Ft }. Then ∆ is shellable if there exists an ordering of F1 , . . . , Ft such that such that for all 1 ≤ j < i ≤ t, there is some x ∈ Fi \ Fj and some k ∈ {1, . . . , j − 1} such that {x} = Fi \ Fk . The following theorem summarizes a number of necessary and sufficient conditions of Cohen-Macaulay simplicial complexes that we require. Theorem 2.4. Let ∆ be a simplicial complex on the vertex set V = {x1 , . . . , xn }. (i) If ∆ is Cohen-Macaulay, then it is pure. (ii) If ∆ is Cohen-Macaulay, then h(∆) has only non-negative entries. (iii) If n−pdim(R/I∆ ) = K-dim(R/I∆ ), then ∆ is Cohen-Macaulay (here, pdim(R/I∆ ) denotes the projective dimension of R/I∆ , the length of a minimal free resolution of R/I∆ ). (iv) If ∆ is vertex decomposable, then ∆ is Cohen-Macaulay. (v) If dim ∆ = 0, then ∆ is vertex decomposable/shellable/Cohen-Macaulay. (vi) If dim ∆ = 1, then ∆ is vertex decomposable/shellable/Cohen-Macaulay if and only if ∆ is connected. Proof. Many of these results are standard. For (i) see [18, Theorem 5.3.12]; for (ii) see [18, Theorem 5.4.8]; (iii) follows from the Auslander-Buchsbaum Theorem; for (iv) see [13, Corollary 2.9] and the fact that shellable implies Cohen-Macaulay [18, Theorem 5.3.18]; (v) is [13, Proposition 3.1.1]; and (vi) is [13, Theorem 3.1.2].  In this paper, we will be interested in independence complexes of finite simple graphs G = (VG , EG ). We say that a set of vertices W ⊆ VG is an independent set if for all e ∈ EG , e 6⊆ W . The independence complex of G is the set of all independent sets: Ind(G) = {W | W is an independent set of VG }. The set Ind(G) is a simplicial complex. Following convention, G is Cohen-Macaulay (resp. shellable, vertex decomposable) if Ind(G) is Cohen-Macaulay (resp. shellable, vertex decomposable). The facets of Ind(G) correspond to the maximal independent sets of vertices of G. It is common to let α(G) denote the cardinality of a maximum independent set of vertices in G. A graph G is well-covered if every maximal independent set has cardinality α(G). Moreover, a direct translation of the definitions gives us: Lemma 2.5. If G is Cohen-Macaulay, then G is well-covered. COHEN-MACAULAY CIRCULANT GRAPHS 5 3. Characterization of Circulant graphs Cn (1, 2, . . . , d). In this section, we classify which circulant graphs of the form Cn (1, 2, . . . , d) are CohenMacaulay. Brown and Hoshino recently classified the well-covered graphs in this family: Theorem 3.1. ([4, Theorem 4.1]). Let n and d be integers with n ≥ 2d ≥ 2. Then Cn (1, 2, . . . , d) is well-covered if and only if n ≤ 3d + 2 or n = 4d + 3. Brown and Hoshino’s result is a key ingredient for our main result. We also need one additional result of [4] on the independence polynomial of Cn (1, 2, . . . , d), but translated into a statement about f -vectors. The independence polynomial of a graph G is given Pα(G) by I(G, x) = k=0 ik xk where ik is the number of independent sets of cardinality k (we take i0 = 1). Note that if ∆ = Ind(G) and f (∆) = (f−1 , f0 , . . . , fD ), then ik = fk−1 for each k. If we translate [4, Theorem 3.1] into the language of f -vectors and independence complexes, we get the following statement. Lemma 3.2. Let n and d be  integers with n ≥ 2d ≥ 2, G = Cn (1, 2, . . . , d), and D = n − 1 and f (∆) = (f−1 , f0 , . . . , fD ) where dim Ind(G). Then D = d+1   n n − dk fk−1 = for k = 0, . . . , (D + 1). k n − dk By Lemma 2.5, to characterize the Cohen-Macaulay circulant graphs of the form Cn (1, 2, . . . , d), it suffices to determine which of the well-covered graphs of Theorem 3.1 are also Cohen-Macaulay. Interestingly, proving that Cn (1, 2, . . . , d) is not Cohen-Macaulay when n = 4d + 3 is the most subtle part of this proof. To carry out this part of the proof, we need the following lemma, whose proof we postpone until the next section. Lemma 3.3. Fix an integer d ≥ 3, and let G = C4d+3 (1, 2, . . . , d). If ∆ = Ind(G), then   (4d + 3) d − 1 . dimk H̃2 (∆; k) ≥ 2 3 Assuming, for the moment, that Lemma 3.3 holds, we arrive at our main result: Theorem 3.4. Let n and d be integers with n ≥ 2d ≥ 2 and let G = Cn (1, 2, . . . , d). Then the following are equivalent: (i) (ii) (iii) (iv) G is Cohen-Macaulay. G is shellable. G is vertex decomposable. n ≤ 3d + 2 and n 6= 2d + 2. Proof. We always have (iii) ⇒ (ii) ⇒ (i). We now prove that (iv) ⇒ (iii). By Lemma 3.2, when n = 2d or n = 2d + 1, dim Ind(G) = 0. Now apply Theorem 2.4 (v). n When 2d + 2 ≤ n ≤ 3d + 2, dim Ind(G) = ⌊ d+1 ⌋ − 1 = 1. Let V = {x1 , . . . , xn }. If n = 2d+2, then Ind(G) is not connected, because the only edges of Ind(G) are {xi , xd+1+i } for i = 1, . . . , d + 1. On the other hand, when 2d + 3 ≤ n ≤ 3d + 2, Ind(G) is connected. COHEN-MACAULAY CIRCULANT GRAPHS 6 To see this, let n = 2d + c for 3 ≤ c ≤ d + 2. For each i = 1, 2, . . . , n, {xi , xi+d+2 } and {xi+1 , xi+d+2 } ∈ Ind(G), with subscript addition adjusted modulo n. Thus, for any xi , xj ∈ V with i < j, we can make the path xi , xi+d+2 , xi+1 , xi+d+3 , xi+2 , . . . , xj . So, Ind(G) is connected. Applying Theorem 2.4 (vi) then shows that (iv) ⇒ (iii). To complete the proof, we will show that if n ≥ 2d with n = 2d + 2 or n > 3d + 2, then G is not Cohen-Macaulay. In the proof that (iv) ⇒ (iii), we already showed that if n = 2d + 2, then Ind(G) is not connected and dim Ind(G) = 1. Again by Theorem 2.4 (vi) this implies G is not Cohen-Macaulay. If n > 3d + 2 and n 6= 4d + 3, then by Theorem 3.1, G is not well-covered, and consequently, by Lemma 2.5, G is not Cohen-Macaulay. It therefore remains to show that if n = 4d + 3, then G is not Cohen-Macaulay for all d ≥ 1. The remainder of this proof is dedicated to this case. By Lemma 3.2, dim Ind(G) = 2 and the f -vector of Ind(G) is given by   4d3 + 15d2 + 17d + 6 2 f (Ind(G)) = 1, 4d + 3, 4d + 7d + 3, . 6 When d = 1, then f (Ind(G)) = (1, 7, 14, 7) and hence h(Ind(G)) = (1, 4, 3, −1). When d = 2, then f (Ind(G)) = (1, 11, 33, 21) and hence h(Ind(G)) = (1, 8, 13, −1). In these two cases, Theorem 2.4 (ii) implies G is not Cohen-Macaulay. We can therefore assume that d ≥ 3. To show that Ind(G) is not Cohen-Macaulay, we will show that H̃1 (Ind(G); k) 6= 0. This suffices because Ind(G) = linkInd(G) (∅), so Reisner’s Criterion (Theorem 2.1) would imply that Ind(G) is not Cohen-Macaulay. Using the fact that dim Ind(G) = 2, the f -vector given above, and the reduced Euler characteristic (2.1) we know 2 X 4d3 + 15d2 + 17d + 6 (−1)i dimk H̃i (Ind(G); k). = −1 + (4d + 3) − (4d + 7d + 3) + 6 i=−1 2 Because Ind(G) is a non-empty connected simplicial complex, we have dimk H̃i (Ind(G); k) = 0, for i = −1, and 0. Simplifying both sides of the above equation and rearranging gives: d(4d2 − 9d − 1) dimk H̃1 (Ind(G); k) = dimk H̃2 (Ind(G); k) − . 6 By Lemma 3.3   4d + 3 d − 1 d(4d2 − 9d − 1) dimk H̃1 (Ind(G); k) ≥ − = 1. 2 3 6 So, H̃1 (Ind(G); k) 6= 0 as desired.  When we specialize the above theorem to the case d = 1, we recover the known classification of the Cohen-Macaulay cycles [18, Corollary 6.3.6]. Note that C2 (1) = K2 is also Cohen-Macaulay, but it is not a cycle. Corollary 3.5. Let n ≥ 3. Then Cn = Cn (1) is Cohen-Macaulay if and only if n = 3 or 5. COHEN-MACAULAY CIRCULANT GRAPHS 7 Even though C2d+2 (1, 2, . . . , d) and C4d+3 (1, 2, . . . , d) are not Cohen-Macaulay, they still have an interesting algebraic structure, as noted in Theorem 3.7 below. Definition 3.6. A pure simplicial complex ∆ is called Buchsbaum over a field k if for every non-empty face F ∈ ∆, H̃i (link∆ (F ); k) = 0 for all i < dim link∆ (F ). We say a graph G is Buchsbaum if the independence complex of G is Buchsbaum. Note that by Reisner’s Criterion (Theorem 2.1), if G is Cohen-Macaulay, then G is Buchsbaum. We can now classify all circulant graphs of the form Cn (1, . . . , d) which are Buchsbaum, but not Cohen-Macaulay. Theorem 3.7. Let n and d be integers with n ≥ 2d and d ≥ 1. Let G = Cn (1, 2, . . . , d). Then G is Buchsbaum, but not Cohen-Macaulay if and only if n = 2d + 2 or n = 4d + 3. Proof. (⇒) For G to be Buchsbaum, Ind(G) must be pure, that is G is well-covered. By Theorem 3.1, 2d ≤ n ≤ 3d + 2 or n = 4d + 3. Because G is not Cohen-Macaulay, Theorem 3.4 implies n = 2d + 2 or n = 4d + 3. (⇐) We first show that if n = 4d + 3, then G is Buchsbaum. Let ∆ = Ind(G). Since dim ∆ = 2, given any F ∈ ∆, |F | ∈ {0, 1, 2, 3}. We wish to show that if |F | = 1, 2, or 3, then H̃i (link∆ (F ); k) = 0 for all i < dim link∆ (F ). If |F | = 3, then link∆ (F ) = {∅}, and hence H̃i (link∆ (F ); k) = 0 for all i < dim link∆ (F ) = −1. When |F | = 2, then dim link∆ (F) = 0, and again, we have H̃i (link∆ (F ); k) = 0 for all i < dim link∆ (F ) = 0. It therefore suffices to show that when |F | = 1, then H̃i (link∆ (F ); k) = 0 for all i < dim link∆ (F ). Because of the symmetry of G, we can assume without a loss of generality that F = {x1 }. Because G is well-covered, any independent set containing x1 can be extended to a maximal independent set, and furthermore, this independent set has cardinality three. This, in turn, implies that dim link∆ (F ) = 1. For any i < 0, H̃i (link∆ (F ); k) = 0, so it suffices to prove that H̃0 (link∆ (F ); k) = 0. Proving this condition is equivalent to proving that link∆ (F ) is connected. We first note that none of the vertices x2 , x3 , . . . , xd+1 , x3d+4 , x3d+5 , . . . , x4d+3 appear in link∆ ({x1 }) because these vertices are all adjacent to x1 in G. On the other hand, the following elements are facets of ∆: {x1 , xd+2 , x2d+3 }, {x1 , xd+2 , x2d+4 }, . . . , {x1 , xd+2 , x3d+3 }, {x1 , xd+3 , x3d+3 }, {x1 , xd+4 , x3d+3 }, . . . , {x1 , x2d+2 , x3d+3 }. Consequently the following edges are in link∆ ({x1 }): {xd+2 , x2d+3 }, {xd+2 , x2d+4 }, . . . , {xd+2 , x3d+3 }, {xd+3 , x3d+3 }, {xd+4 , x3d+3 }, . . . , {x2d+2 , x3d+3 }. Thus link∆ ({x1 }) is connected, as desired. Now suppose n = 2d + 2. As shown in the proof of Theorem 3.4, Ind(G) consists of the disjoint edges {xi , xd+1+i } for i = 1, . . . , d + 1. If F ∈ Ind(G) and |F | = 2, then link∆ (F ) = {∅}. If F ∈ Ind(G) and |F | = 1, then link∆ (F ) = {{x}} for some variable x. Therefore G is Buchsbaum.  COHEN-MACAULAY CIRCULANT GRAPHS 8 4. Proof of Lemma 3.3 The purpose of this section is to prove Lemma 3.3. We will be interested in finding induced octahedrons in our independence complex. Lemma 4.1. Fix an integer d ≥ 3. Let G = C4d+3 (1, 2, . . . , d) and let ∆ = Ind(G) be the associated independence complex. Let W = {i1 , i2 , j1 , j2 , k1, k2 } ⊆ VG be six distinct vertices. Then the induced simplicial complex ∆|W = {F ∈ ∆ | F ⊆ W } is isomorphic to the labeled octahedron in Figure 2 if and only if the induced graph GW is the graph of three disjoint edges {i1 , i2 }, {j1 , j2 }, and {k1 , k2}. i1 k1 j2 j1 k2 i2 Figure 2. A labeled octahedron Proof. Suppose that ∆|W is isomorphic to the octahedron in Figure 2. It follows that {i1 , i2 }, {j1 , j2 } and {k1 , k2 }, which are not edges of the octahedron, are also not edges of ∆. Because ∆ is an independence complex, these means that each set is not an independent set, or in other words, e1 = {i1 , i2 }, e2 = {j1 , j2 }, and e3 = {k1 , k2 } are all edges of G. It suffices to show that GW consists only of these edges. If not, there is a vertex x ∈ ei and a vertex y ∈ ej with i 6= j, such that {x, y} is an edge of G. However, for any x ∈ ei and y ∈ ej , {x, y} is an edge of ∆|W , and consequently, {x, y} cannot be an edge of G, a contradiction. For the converse, we reverse the argument. If GW is the three disjoint edges {i1 , i2 }, {j1 , j2 } and {k1 , k2}, then it follows that {i1 , j1 , k1 }, {i1 , j1 , k2}, {i1 , j2 , k1 }, {i1 , j2 , k2 }, {i2 , j1 , k1 }, {i2 , j1 , k2 }, {i2 , j2 , k1 }, {i2 , j2 , k2 } are all independent sets of G, and thus belong to ∆, and consequently, ∆|W . Because {i1 , i2 }, {j1 , j2 }, and {k1 , k2 } are not faces of ∆, the facets of the complex ∆|W are these eight faces, whence ∆|W is an octahedron.  We now come to our desired proof. Proof. (of Lemma 3.3) We begin by first recalling some facts about ∆ = Ind(G). By Theorem 3.1 and Lemma 3.2, the simplicial complex ∆ is pure and two dimensional with f (∆) = (f−1 , f0 , f1 , f2 ). Therefore, the reduced chain complex of ∆ over k has the form ∂ ∂ ∂ 0 1 2 0 ←− k f−1 ←− k f0 ←− k f1 ←− k f2 ←− 0. It follows from this chain complex that dimk H̃2 (∆; k) = dimk ker ∂2 . COHEN-MACAULAY CIRCULANT GRAPHS 9 linearly independent elements in ker ∂2 . Our strategy, therefore, is to identify (4d+3) 3 2 Note that if W ⊆ V is a subset of the vertices such that the induced complex ∆|W is isomorphic to an octahedron, then this octahedron corresponds to an element of ker ∂2 . We make this more precise. Suppose that W = {i1 , i2 , j1 , j2 , k1 , k2 } ⊆ V and ∆|W is an octahedron, i.e, the simplicial complex with facets  d−1 ∆|W = h{i1 , j1 , k1 }, {i1 , j1 , k2 }, {i1 , j2 , k1 }, {i1 , j2 , k2 }, {i2 , j1 , k1 }, {i2 , j1 , k2 }, {i2 , j2 , k1 }, {i2 , j2 , k2}i. Note that each {ia , jb , kc } is a 2-dimensional face of ∆; we associate to ∆|W the following element of k f2 : OW = ei1 j1 k1 − ei1 j1 k2 − ei1 j2 k1 − ei2 j1 k1 + ei1 j2 k2 + ei2 j1 k2 + ei2 j2 k1 − ei2 j2 k2 . Here, we have assumed that the indices of each basis element have been written in increasing order. The boundary map ∂2 evaluated at OW gives ∂2 (OW ) = 0, i.e., OW ∈ ker ∂2 . To compute the lower bound on dimk H̃2 (∆; k), we will build a list L of octahedrons in ∆ and then order the elements of L using the lexicographical ordering so that each octahedron in the list L contains a face that has not appeared in any previous octahedron in L with respect to the ordering. By associating each octahedron to the corresponding element of k f2 , each octahedron will belong to ker ∂2 . Moreover, the fact that each octahedron in L has a face that has not appeared previously implies that the octahedron can not be written as a linear combination of our previous elements in ker ∂2 , thus giving us the required number of linearly independent elements. By Lemma 4.1, there is a one-to-one correspondence between the induced octahedrons of ∆ and the induced subgraphs of G consisting of three pairwise disjoint edges. So we can represent an octahedron by a tuple (i1 , i2 ; j1 , j2 ; k1, k2 ) where {i1 , i2 }, {j1 , j2 }, and {k1 , k2 } correspond to these edges. We begin by considering the octahedrons described by the following list: (1, 2; (1, 2; d + 3, d + 4; d + 3, d + 4; 2d + 5, 3d + 3) 2d + 6, 3d + 3) .. . (1, 2; (1, 2; (1, 2; d + 3, d + 4; d + 3, d + 5; d + 3, d + 5; 3d + 2, 3d + 3) 2d + 6, 3d + 3) 2d + 7, 3d + 3) .. . (1, 2; (1, 2; d + 3, d + 5; d + 3, d + 6; 3d + 2, 3d + 3) 2d + 7, 3d + 3) .. . (4.1) (1, 2; d + 3, 2d; 3d + 1, 3d + 3) (1, 2; d + 3, 2d; 3d + 2, 3d + 3) (1, 2; d + 3, 2d + 1; 3d + 2, 3d + 3) If we take our list of octahedrons in (4.1) and add one to each index, we will get a new list of octahedrons. In terms of the graph G = C4d+3 (1, 2, . . . , d), we are “rotating” our disjoint COHEN-MACAULAY CIRCULANT GRAPHS 10 edges to the right. We “rotate” these disjoint edges, or equivalently, we add one to each index, until k1 = 4d + 3. So, for example, the disjoint edges (1, 2; d + 3, d + 4; 2d + 5, 3d + 3) can be rotated to the right 2d − 2 times to give us 2d − 1 octahedrons (1, 2; (2, 3; (3, 4; .. . (2d − 1, 2d; d + 3, d + 4; d + 4, d + 5; d + 5, d + 6; .. . 3d + 1, 3d + 2; 2d + 5, 3d + 3) 2d + 6, 3d + 4) 2d + 7, 3d + 5) .. . 4d + 3, d − 2). On the other hand, the disjoint edges (1, 2; d + 3, 2d + 1; 3d + 2, 3d + 3) are only rotated d + 1 times to create d + 2 octahedrons (1, 2; (2, 3; (3, 4; .. . d + 3, 2d + 1; d + 4, 2d + 2; d + 5, 2d + 3; .. . 3d + 2, 3d + 3) 3d + 3, 3d + 4) 3d + 3, 3d + 5) .. . (d + 2, d + 3; 2d + 4, 3d + 2; 4d + 3, 1) . If we carry out this procedure, we end up with an expanded list L of octahedrons with   d−2 d−2 d−2 X X X 4d + 3 d − 1 2 . |L| = k(2d − k) = 2d k− k = 2 3 k=1 k=1 k=1 To see why, there is only one collection of disjoint edges with k1 = 2d + 5 which is rotated 2d − 1 times, there are two tuples of disjoint edges with k1 = 2d + 6 which are rotated 2d − 2 times, and so on, until we arrive at the d − 2 tuples which are constructed from all the tuples with k1 = 3d + 2 rotated d + 2 times. It now suffices to show that the corresponding elements of ker ∂2 are linearly independent. In (4.2), we have arranged the list L in lexicographical order from smallest to largest: (1, 2; d + 3, d + 4; .. . d + 3, 2d + 1; d + 4, d + 5; .. . d + 4, 2d + 2; .. . 2d + 5, 3d + 3) .. . 3d + 2, 3d + 3) 2d + 6, 3d + 4) .. . 3d + 3, 3d + 4) (2d − 2, 2d − 1; 3d, 3d + 1; (2d − 2, 2d − 1; 3d, 3d + 2; (2d − 1, 2d; 3d + 1, 3d + 2; 4d + 3, d − 3) 4d + 3, d − 3) 4d + 3, d − 2) (1, 2; (2, 3; (4.2) (2, 3; For each (i1 , i2 ; j1 , j2 ; k1, k2 ) in L, we consider the two-dimensional face {i2 , j2 , k1 } of the associated octahedron. We claim that as we progress down the list in (4.2), each face {i2 , j2 , k1 } has not appeared in a previous octahedron. COHEN-MACAULAY CIRCULANT GRAPHS 11 In particular, suppose that (i1 , i2 ; j1 , j2 ; k1 , k2 ) is the ℓ-th item in (4.2). We wish to show that the face {i2 , j2 , k1 } has not appeared in any of the first ℓ − 1 octahedrons in the lexicographically ordered list (4.2). Suppose, that (a1 , a2 ; b1 , b2 , c1 , c2 ) appears earlier in the list and contains the face {i2 , j2 , k1 }. For this face to appear, {a1 , a2 } must contain exactly one of i2 , j2 , k1 , {b1 , b2 } must contain exactly one of the remaining two vertices, and {c1 , c2 }, must contain the remaining vertex of the face. By the way we listed and constructed our octahedrons, i2 < j2 < k1 , i1 = i2 − 1, and j1 = i2 +d+1. Further, k2 = i2 +3d+1 if i2 +3d+1 ≤ (4d−3), and k2 = i2 +3d+1−(4d−3) if i2 + 3d + 1 > (4d − 3). Note that a1 6= i2 , j2 or k2 otherwise a1 > i1 , contradicting the lexicographical ordering. Also, if a2 = j2 , then a1 = j2 − 1 ≥ i2 > i1 , again a contradiction. The same problem arises if a2 = k1 . Thus {a1 , a2 } = {i2 − 1, i2 } = {i1 , i2 }, i.e., (a1 , a2 ; b1 , b2 ; c1 , c2 ) = (i1 , i2 , j1 , b2 , c1 , k2 ). Since j2 and k1 must also appear in this tuple, there are only two possibilities: (a1 , a2 ; b1 , b2 ; c1 , c2 ) = (i1 , i2 , j1 , k1 , j2 , k2 ) or (i1 , i2 , j1 , j2 , k1 , k2 ). But neither of these tuples appear strictly before (i1 , i2 , j1 , j2 , k1 , k2 ) with respect to our ordering, thus completing the proof.  5. Cohen-Macaulay Circulant Cubic Graphs Brown and Hoshino [4] classified which circulant cubic graphs are well-covered. Recall that a cubic graph is a graph in which each vertex has degree 3. Thus, if G is a circulant cubic graph, then G = C2n (a, n) for some 1 ≤ a < n. There are only a finite number of connected well-covered circulant cubic graphs: Theorem 5.1 ([4, Theorem 4.3]). Let G be a connected circulant cubic graph. Then G is well-covered if and only if it is isomorphic to one of the following graphs: C4 (1, 2), C6 (1, 3), C6 (2, 3), C8 (1, 4) or C10 (2, 5). Using a computer algebra system like Macaulay2 [9], one can simply check which of these graphs, displayed in Figure 3, are Cohen-Macaulay. Theorem 5.2. Let G be a connected circulant cubic graph. Then is Cohen-Macaulay if and only if it is isomorphic to C4 (1, 2) or C6 (2, 3). Proof. By Theorem 5.1, it suffices to check which of the graphs C4 (1, 2), C6 (1, 3), C6 (2, 3), C8 (1, 4) or C10 (2, 5), are also Cohen-Macaulay. Figure 3. The well-covered connected cubic circulant graphs. COHEN-MACAULAY CIRCULANT GRAPHS 12 For any graph G, dim R/I(G) = α(G). So, by Theorem 2.4 (iii), we simply need to check if α(G) = n − pdim(R/I(G)). We can compute α(G) for each of the graphs G in Figure 3 by inspection; on the other hand, we compute the projective dimension using a computer algebra system. The following table summarizes these calculations: G C4 (1, 2) C6 (1, 3) C6 (2, 3) C8 (1, 4) C10 (2, 5) n − pdim(R/I(G)) 1 1 2 2 2 α(G) 1 3 2 3 4 The conclusion now follows from the values in the table.  As in Brown and Hoshino [4], we will use the following result to extend Theorem 5.2 to all circulant cubic graphs. The following classification is due to Davis and Domke [5]. Theorem 5.3. Let G = C2n (a, n) with 1 ≤ a < n, and let t = gcd(a, 2n). (i) If (ii) If 2n t 2n t is even, then G is isomorphic to t copies of C 2n (1, nt ). t is odd, then G is isomorphic to 2t copies of C 4n (2, 2n ). t t We also use the following lemma in the next proof. Lemma 5.4 ([18, Proposition 6.2.8]). Suppose that the graph G = H ∪ K where H and K are disjoint components of G. Then G is Cohen-Macaulay if and only if H and K are Cohen-Macaulay. Theorem 5.5. Let G = C2n (a, n) with 1 ≤ a < n, that is, G is a cubic circulant graph. Let t = gcd(a, 2n). Then G is Cohen-Macaulay if and only if 2n = 3 or 4. t Proof. Suppose that 2n 6= 3 or 4. If 2n is even, then C 2n (1, nt ) is not Cohen-Macaulay by t t t 2n 4n (2, is odd, then C ) is also not Cohen-Macaulay by Theorem 5.2. Theorem 5.2 and if 2n t t t Thus by Lemma 5.4 G is not Cohen-Macaulay. Conversely, if 2n = 4, then by Theorem t 2n 5.3, G is isomorphic to t copies of C4 (1, 2) and if t = 3, then G is isomorphic to 2t copies of C6 (2, 3). In both cases, Theorem 5.2 and Lemma 5.4 imply G is Cohen-Macaulay.  6. Concluding Comments and Open Questions The question of classifying all Cohen-Macaulay circulant graphs Cn (S) is probably an intractable problem. Even the weaker question of determining whether or not a circulant graph Gn (S) is well-covered (equivalently, Ind(Cn (S)) is a pure simplicial complex) was shown by Brown and Hoshino to be co-NP-complete [4, Theorem 2.5]. At present, the best we can probably expect is to identify families of Cohen-Macaulay circulant graphs. Brown and Hoshino observed that circulant graphs behave well with respect to the lexicographical product. Recall this construction: Definition 6.1. Given two graphs G and H, the lexicographical product, denoted G[H], is graph with vertex set V (G) × V (H), where any two vertices (u, v) and (x, y) are adjacent in G[H] if and only if either {u, x} ∈ G or u = x and {v, y} ∈ H. COHEN-MACAULAY CIRCULANT GRAPHS 13 When G and H are both circulant graphs, then the lexicographical product G[H] is also circulant (see [4, Theorem 4.6]). The well-covered property is also preserved with respect to the lexicographical product (see [16]). Theorem 6.2. Let G and H be two non-empty graphs. Then G[H] is well-covered if and only if the graphs G and H are well-covered. As a consequence, the families of well-covered circulant graphs discovered in [4] can be combined into new well-covered circulant graphs using the lexicographical product. It is therefore natural to ask if the lexicographical product allows us to build new CohenMacaulay circulant graphs from known Cohen-Macaulay circulant graphs. In other words, can we replace “well-covered” in Theorem 6.2 by “Cohen-Macaulay”. This turns out not to always be the case, as the following example shows. Example 6.3. Let G and H be the Cohen-Macaulay circulant graphs G = C2 (1) and H = C5 (1). Then G[H] = C10 (1, 4, 5) and H[G] = C10 (1, 2, 3, 5) as seen in Figure 4. We can compute α(G) for the graphs in Figure 4 by inspection; on the other hand, Figure 4. Lexicographical products C2 [C5 ] and C5 [C2 ] we compute the projective dimension using Macaulay 2 [9]. We find that α(G[H]) = dim(R/I(G[H])) = 2 = n − pdim(R/I(G[H])), so G[H] is Cohen-Macaulay. However, α(H[G]) = dim(R/I(H[G])) = 2 > n − pdim(R/I(H[G])) = 1, so H[G] is not CohenMacaulay. In light of the above example, we can ask what conditions on G and H allow us to conclude that the lexicographical product G[H] is Cohen-Macaulay. We end with a question concerning Lemma 3.3. Using Macaulay 2 [9], we found that d−1 dimk H̃2 (∆; k) = 4d+3 for d = 1, . . . , 14. This suggests that the inequality of Lemma 3 2 3.3 is actually an equality. We wonder if this is indeed true. Acknowledgements. We thank Brydon Eastman for writing the LATEX code to produce circulant graphs, and Russ Woodroofe and Jennifer Biermann for useful discussions. References [1] J.-C. Bermond, F. Comellas, D.F. Hsu, Distributed loop computer networks: a survey. J. Parallel Distrib. Comput. 24 (1995), 2–10. [2] F. Boesch, R. Tindell, Circulants and their connectivities. J. Graph Theory 8 (1984), 487–499. [3] J. Brown, R. Hoshino, Independence polynomials of circulants with an application to music. Discrete Math. 309 (2009), 2292–2304. [4] J. Brown, R. Hoshino, Well-covered circulant graphs. Discrete Math. 311 (2011), 244–251. [5] G. Davis, G. Domke, 3-Circulant Graphs. J. Combin. Math. Combin. Comput. 40 (2002), 133–142. COHEN-MACAULAY CIRCULANT GRAPHS 14 [6] J. Herzog, T. Hibi, Monomial ideals. Graduate Texts in Mathematics 260, Springer-Verlag, 2011. [7] J. Herzog, T. Hibi, Distributive lattices, bipartite graphs and Alexander duality. J. Algebraic Combin. 22 (2005), 289–302. [8] J. Herzog, T. Hibi, X. Zheng, Cohen-Macaulay chordal graphs. J. Combin. Theory Ser. A 113 (2006), 911–916. [9] D. R. Grayson, M. E. Stillman, Macaulay 2, a software system for research in algebraic geometry. http://www.math.uiuc.edu/Macaulay2/. [10] E. Miller, B. Sturmfels, Combinatorial Commutative Algebra. Graduate Texts in Mathematics, 227, Springer, 2005. [11] S. Morey, R. Villarreal, Edge ideals: algebraic and combinatorial properties. In Progress in Commutative Algebra 1: Combinatorics and Homology, edited by Christopher Francisco, Lee C. Klingler, Sean Sather-Wagstaff, Janet C. Vassilev, (2012) de Gruyter, Berlin/Boston, 85–126. [12] M. Plummer, Well-covered graphs: a survey. Quaestiones Math. 16 (1993), 253–287. [13] J. Provan, L. Billera, Decompositions of simplicial complexes related to the diameters of convex polyhedra. Math. Oper. Res. 5 (1980), no. 4, 576–594. [14] V.N. Sachkov, V.E. Tarakanov, Combinatorics of Nonnegative Matrices. In: Translations of Mathematical Monographs, 213, American Mathematical Society, Providence, 2002. [15] R. Stanley, Combinatorics and Commutative Algebra, Second Edition. Birkhäuser, Boston (1983). [16] J. Topp, L. Volkmann, On the well-coveredness of products of graphs. Ars Combin. 33 (1992), 199–215. [17] R. H. Villarreal, Cohen-Macaulay graphs. Manuscripta Math. 66 (1990), 277–293. [18] R. H. Villarreal, Monomial algebras. Monographs and Textbooks in Pure and Applied Mathematics, 238. Marcel Dekker, Inc., New York, 2001. Department of Mathematics, Redeemer University College, Ancaster, ON, L9K 1J4, Canada E-mail address: [email protected] Department of Mathematical Sciences, Lakehead University, Thunder Bay, ON, P7B 5E1, Canada E-mail address: [email protected] Department of Mathematics, Redeemer University College, Ancaster, ON, L9K 1J4, Canada E-mail address: [email protected]
0math.AC
arXiv:1802.02474v1 [cs.MS] 12 Jan 2018 High-level python abstractions for optimal checkpointing in inversion problems Navjot Kukreja∗ Jan Hückelheim Michael Lange Imperial College London London, UK Imperial College London London, UK Imperial College London London, UK Mathias Louboutin Andrea Walther Simon W. Funke The University of British Columbia Vancouver, BC, Canada Universität Paderborn Paderborn, Germany Simula Research Laboratory Lysaker, Norway Gerard Gorman Imperial College London London, UK ABSTRACT 1 Inversion and PDE-constrained optimization problems often rely on solving the adjoint problem to calculate the gradient of the objective function. This requires storing large amounts of intermediate data, setting a limit to the largest problem that might be solved with a given amount of memory available. Checkpointing is an approach that can reduce the amount of memory required by redoing parts of the computation instead of storing intermediate results. The Revolve checkpointing algorithm offers an optimal schedule that trades computational cost for smaller memory footprints. Integrating Revolve into a modern python HPC code and combining it with code generation is not straightforward. We present an API that makes checkpointing accessible from a DSL-based code generation environment along with some initial performance figures with a focus on seismic applications. Seismic inversion is a computationally intensive technique that uses data from seismic wave propagation experiments to estimate physical parameters of the earth’s subsurface. A seismic inversion problem based on a wave equation can be viewed as an optimization problem and numerically solved using a gradient-based optimization [16]. Since the gradient is usually calculated using the adjoint-state method, the method requires that the forward and adjoint field are known for each time step of the simulation [9]. We discuss this in section 2. Previous work on similar inverse problems led to the Revolve algorithm [4] and the associated C++ tool which provides an optimal schedule at which to store checkpoints, i.e. states from which the forward simulation can be restored. A study of optimal checkpointing for seismic inversion was done in [14] but this was not accompanied by a high-level abstraction that made integration of other software easier with Revolve. The algorithm is further discussed in section 3. The Revolve tool and algorithm, however, only provide the schedule to be used for checkpointing. Although this eases some of the complexity of the application code using the algorithm, the glue code required to manage the forward and adjoint runs is still quite complex. This acts as a deterrent to the more widespread use of the algorithm in the community. In this paper, we describe how the Revolve algorithm can be combined with code generation to make checkpointing much more accessible. The software that can enable this is described in section 4. Although we use particular examples from seismic imaging, the abstraction and software proposed here are quite general in nature and can be used in any problem that requires checkpointing in combination with a variety of computational methods. In section 5 we provide some initial performance figures on which we judged the correctness and performance of the implementation. CCS CONCEPTS • Software and its engineering → Software design engineering; KEYWORDS HPC, Code generation, API, Checkpointing, Adjoint, Inverse Problems ACM Reference format: Navjot Kukreja, Jan Hückelheim, Michael Lange, Mathias Louboutin, Andrea Walther, Simon W. Funke, and Gerard Gorman. 2017. High-level python abstractions for optimal checkpointing in inversion problems. In Proceedings of SuperComputing, Denver, Colorado, USA, November 2017 (SC17), 8 pages. https://doi.org/10.475/123_4 ∗ Corresponding Author. Email: [email protected] 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). SC17, November 2017, Denver, Colorado, USA © 2017 Copyright held by the owner/author(s). ACM ISBN 123-4567-24-567/08/06. . . $15.00 https://doi.org/10.475/123_4 2 INTRODUCTION SEISMIC IMAGING AND DEVITO Seismic imaging techniques exploit the principle that a traveling wave carries information about the physical properties of the medium it travels through. While different techniques focus on SC17, November 2017, Denver, Colorado, USA Kukreja, N. et al where δ d = dsyn − dobs is the data residual, J is the Jacobian of the forward operator, u is the forward wavefield and vt t is the second-order time derivative of the adjoint wavefield. It can be seen that the evaluation of the gradient first requires the simulation of the forward and adjoint wavefields. This is achieved by modeling the wave equation using a discretization, usually finite difference. Various forms of the wave equation exist, e.g. acoustic isotropic, anisotropic - VTI/TTI and elastic. Each of these models the physics to different levels, with corresponding levels of complexity. Here, we focus on the acoustic equation although the analysis applies to all the forms of the equation mentioned. In the discrete form, the acoustic wave equation from [7] can be written as the following linear system: A(m)u = PTs q Figure 1: Graphical demonstration of a seismic experiment that produces the data used as input in a seismic imaging workflow (Source: Open University [1]) different kinds of information and objectives, we focus here on reverse-time migration (RTM, [3, 15]), an imaging method that relies on a good estimate of the velocity model to obtain an image of the reflectors in the subsurface. The algorithm relies on a datafitting procedure where synthetic data dsyn is computed with the current estimate of the physical model via a wave-equation solve and compared to the field measured data dobs . An example of a field data recording is illustrated in Figure 1. This problem is a leastsquare minimization. We introduce here the formulation of the problem solved and justify the implementation of optimal checkpointing. We previously introduced Devito [7], a finite-difference domain specific language (DSL) for time-dependent PDE solvers. Devito provides symbolic abstractions to define the forward and adjoint wavefields. We will not go through its implementation here but concentrate on the computation of the image of the subsurface. Seismic imaging, in our case reverse-time migration (RTM), provides an image of the subsurface reflectors from field recorded data and a cinematically correct smooth background velocity model. In practice, the recording is repeated with different source/receivers pair (called experiments) over the same physical region. An estimate of the physical parameters m is obtained from the recorded data with different methods such as full-waveform inversion (FWI, iterative RTM for low frequencies). Once m is estimated, RTM provides an image of the subsurface to be interpreted. As just stated, RTM is a single gradient of the FWI objective that can be written as [6, 9, 16]: minimize Φs (m) = m 1 2 dsyn − dobs 2 2 (1) The square slowness model m is a physical property of the medium through which the wave is propagating. The gradient of the objective function Φs (m) with respect to the square slowness m is given by: ∇Φs (m) = nt Õ t =1 u[t]vt t [t] = JT δ d (2) (3) where A is the discretized wave-equation and Ps is the sourcerestriction operator. The wavefield u is then given by: u = A−1 (m)PTs q (4) Although equation 4 can provide the value of u for the entire domain at every time step, explicitly formulating the entire matrix u is prohibitively expensive in terms of computer memory required and is avoided wherever possible. When doing forward-only simulations, of interest is the value of u at certain predetermined locations in the simulated domain that we call receivers. We record the progression of u at these locations through time. This is represented mathematically by applying the restriction operator Pr at the required receiver locations. The result of applying Pr to u, which we call the simulated data, is given by: dsyn = Pr A−1 (m)PTs q (5) We can now rewrite the objective function from equation 1 as: 2 1 Pr A−1 (m)PTs q − dobs (6) 2 2 In equation 2 we can define the Jacobian of the forward operator minimize Φs (m) = m as: dPr A−1 (m)PTs (7) dm While the u term in this equation can be calculated from equation 4, the v term can be calculated from its adjoint equation given as: J= AT (m)v = PTr δ d. 2.1 (8) Implementation As the forward wavefield is obtained as a time-marching procedure forward in time, the adjoint wavefield is then obtained similarly with a backward in time time-marching procedure. The procedure to derive an image with RTM can be summarized as: (1) Compute the synthetic data dsyn with a forward solve with equation (5). (2) Compute the adjoint wavefield from the data residual with equation (8). (3) Compute the gradient as the correlation of the forward and adjoint wavefield with equation (2). For the first step, we know from [8] that equation 4 can be modeled in Devito using the Operator defined in figure 2 High-level python abstractions for optimal checkpointing in inversion problems def forward(model, m, eta, src, rec, order=2): # Create the wavefield function u = TimeData(name='u', shape=model.shape, time_order=2, space_order=order) # Derive stencil from symbolic equation eqn = m * u.dt2 - u.laplace + eta * u.dt stencil = solve(eqn, u.forward)[0] update_u = [Eq(u.forward, stencil)] # Add source injection and receiver interpolation src_term = src.inject(field=u, expr=src * dt**2 / m) rec_term = rec.interpolate(expr=u) # Create operator with source and receiver terms return Operator(update_u + src_term + rec_term, subs={s: dt, h: model.spacing}) SC17, November 2017, Denver, Colorado, USA def gradient(model, m, eta, src, rec, order=2): # Create the adjoint wavefield function v = TimeData(name='v', shape=model.shape, time_order=2, space_order=order) gradient_update = Eq(grad, grad - u.dt2 * v) # The adjoint equation eqn = m * v.dt2 - v.laplace - eta * v.dt stencil = solve(eqn, v.backward)[0] eqn = Eq(v.backward, stencil) # Add expression for receiver injection ti = v.indices[0] receivers = rec.inject(field=v, expr=rec * dt * dt / m) return Operator([eqn] + [gradient_update] + receivers, subs={s:dt, h: model.get_spacing()}, time_axis=Backward) Figure 2: Devito code required for a forward operator The Operator thus created can be used to model a forward where the src_term contains the source to be injected into the field and rec_term will be extracting the receiver information from the simulation. Clearly, the third step requires the intermediate data from both the previous steps. Storing both the forward and adjoint wavefields in memory would be naive since two complete wavefields need to be stored. The first obvious optimization is to merge steps 2 and 3 as a single pass where step 3, the gradient calculation, can use the output from step 2 (the adjoint wavefield) as it is calculated, hence saving the need for storing the adjoint wavefield in memory. The Operator for the combined steps 2 and 3 can be created in Devito using the code given in figure 3. This still leaves the requirement of having the result of step 1 available. The most efficient, from a computational point of view, would be to store the full history of the forward wavefield during the first step. However, for realistically sized models, it would require TeraBytes of direct access memory. One solution would be to store the field on disk but would lead to slow access memory usage making it inefficient. This memory limit leads to checkpointing, storing only a subset of the time history, then recomputing it during the adjoint propagation. Revolve provides an optimal schedule for checkpointing to store for a given model size, number of time steps and available memory. The next section discusses how checkpointing is implemented. 3 REVOLVE As we have seen, the usage of adjoint methods allows the computation of gradient information within a time that is only a very small multiple of the time needed to evaluate the underlying function itself. However, for nonlinear processes like the one we saw in the previous section, the memory requirement to compute the adjoint information is in principle proportional to the operation count of Figure 3: Devito code required for an operator that calculates the adjoint and gradient in a single pass the underlying function, see, e.g., [5, Sec. 4.6]. In Chap. 12 of the same book, several checkpointing alternatives to reduce this high memory complexity are discussed. Checkpointing strategies use a small number of memory units (checkpoints) to store the system state at distinct times. Subsequently, the recomputation of information that is needed for the adjoint computation but not available is performed using these checkpoints in an appropriate way. Several checkpointing techniques have been developed, all of which seek an acceptable compromise between memory requirement and runtime increase. Here, the obvious question is where to place these checkpoints during the forward integration to minimize the overall amount of required recomputations. To develop corresponding optimal checkpointing strategies, one has to take into account the specific setting of the application. A fixed number of time steps to perform and a constant computational cost of all time steps to calculate is the simplest situation. It was shown in [4] that, for this case, a checkpointing scheme based on binomial coefficients yields, for a given number of checkpoints, the minimal number of time steps to be recomputed. An obvious extension of this approach would be to include flexibility with respect to the computational cost of the time steps. For example, if one uses an implicit time stepping method based on the solution of a nonlinear system, the number of iterations needed to solve the nonlinear system may vary from time step to time step, yielding non-uniform time step costs. In this situation, it is no longer possible to derive an optimal checkpointing strategy beforehand. Some heuristics were developed to tackle this situation [11]. However, extensive testing showed that, even in the case of nonuniform step costs, binomial checkpointing is quite competitive. Another very important extension is the coverage of adaptive time stepping. In SC17, November 2017, Denver, Colorado, USA r=new Revolve(steps,snaps) do whatodo = r->revolve() switch(whatodo) case advance: for r->oldcapo < i <= r->capo forward(x,u) case firsturn: eval_J(x,u) init(bu,bx) adjoint(bx,bu,x,u) case youturn: adjoint(bx,bu,x,u) case takeshot: store(x,xstore, r->check) case restore: restore(x,xstore, r->check) while(whatodo <> terminate) Figure 4: revolve algorithm with calls to the application interface this case, the number of time steps to be performed is not known beforehand. Therefore, so-called online checkpointing strategies were developed, see, e.g., [13, 18]. Finally, one has to take into account where the checkpoints are stored. Checkpoints stored in memory can be lost on failure. For the sake of resilience or because future supercomputers may be memory constrained, checkpoints may have to necessarily be stored to disk. Therefore, the access time to read or write a checkpoint is not negligible in contrast to the assumption frequently made for the development of checkpointing approaches. There are a few contributions to extend the available checkpointing techniques to a hierarchical checkpointing, see, e.g., [2, 10, 12]. The software revolve implements binomial checkpointing, online checkpointing as described in [13], and hierarchical, also called multi-stage, checkpointing derived in [12]. For this purpose, it provides a data structure r to steer the checkpointing process and the storage of all information required for the several checkpointing strategies. To illustrate the principle structure of an adjoint computation using checkpointing, Fig. 4 illustrates the kernel of revolve used for the binomial checkpointing. The two remaining checkpointing strategies are implemented in a similar fashion only taking the additional extensions into account. The forward integration as well as the corresponding adjoint computation is performed within a do-while-loop of the structure in Fig. 4, where steps and snaps denote the number nt of time steps of the forward simulation and the number c of checkpoints available for the adjoint computation, respectively. Hence, the routine revolve determines the next action to be performed which must by supported by the application being differentiated. These actions are • advance: Here, the user is supposed to perform a part of the forward integration based on the routine forward(x,u), where x represents the state of the system and u the control. The variable r–>oldcapo contains the current number of the state of the forward integration. That is, before starting the for-loop x holds the state at time t r–>oldcapo . The variable Kukreja, N. et al r–>oldcapo determines the targeted number of the state of the forward integration. Therefore, r–>capo − r–>oldcapo time steps have to be perform to propagate the state x from the time t r–>oldcapo to the time t r–>capo • firstrun: This action signals the start of the adjoint computation. Therefore, first the target function is evaluated. Then, the user has the possibility to initialize the adjoint variable bu and bx. Subsequently, the first adjoint step is performed. • youturn: The next adjoint step has to be performed. • takeshot: Here, the user is supposed to store the current state x in the checkpoint with the number r–>check. The array of checkpoints is here denoted by xstore but the specific organisation of the checkpoints is completely up to the user. During the adjoint computation r–>check selects the checkpoint number appropriately such that all states needed for the adjoint computation are available. Once the adjoint computation has started, states that were stored in the checkpoints are also overwritten to reuse memory. • restore: The content of the checkpoint with the number r–>check has to be copied into the state x to recompute the forward integration starting from this state. It is important to note that this checkpointing approach is completely independent from the method that is actually used to provide the adjoint information. As can be seen, once an adjoint computation is available the implementation can incorporate binomial checkpointing to reduce the memory requirement. We also have to stress that revolve provides a so-called serial checkpointing which means that only one forward time step or one adjoint step is performed at each stage of the adjoint computation. Nevertheless, the computation of the forward time step and/or the adjoint step may be performed heavily in parallel, i.e., may be evaluated on a large scale computer system. This is in contrast to so-called parallel checkpointing techniques where several forward time steps might be performed in parallel even in conjunction with one adjoint step. Corresponding optimal parallel checkpointing schedules were developed in [17]. However, so far no implementation to steer such a parallel checkpointing process is available. The revolve software also includes an adjust procedure that computes, for a given number of time steps, the number of checkpoints such that the increase in spatial complexity equals approximately the increase in temporal complexity. Using the computed number as the number of checkpoints minimises cost when assuming that the user pays computational resources per node and per time, e.g. the cost is proportional to the available memory and the runtime of the computation. 4 ABSTRACTIONS FOR CHECKPOINTING In this section, we will discuss the package pyRevolve , which has been developed during the course of this work to encapsulate Revolve checkpointing in a user-friendly, high level python library. This library is available online, along with its source 1 . We will first provide details of its implementation in Section 4.1. Afterwards, we will discuss the interplay of pyRevolve with the C++ checkpointing implementation that was previously discussed in Section 3. Finally, we will discuss the usage of pyRevolve in an application in 1 https://github.com/opesci/pyrevolve High-level python abstractions for optimal checkpointing in inversion problems Section 4.2 to RTM, as described in section 2, implemented in the Devito domain specific language. Although section 4.2 discusses the special case of devito, the interface of the pyRevolve library was designed to allow an easy integration into other python codes as well. SC17, November 2017, Denver, Colorado, USA Revolve Original C++ CRevolve 4.1 API, pyRevolve side The pyRevolve interface was designed as part of providing checkpointing to users of Devito with an accessible API. The design had the following goals: • Making checkpointing available to users of Devito without forcing them to get involved in implementation details like loops, callbacks, data storage mechanisms. The user should choose whether to use checkpointing in one place, but not be forced to do anything beyond this. • All knowledge of checkpointing, different strategies (online/offline checkpointing, multistage) shall be contained within one module of the python framework, while still benefiting all operations in the code. • The checkpointing itself should be contained in a separate library that allows others to use it easily, even if they are not interested in using Devito. This matured into pyRevolve . • Since the data movement requires intricate knowledge of the data structures used and their organization in memory, this is handled by the application code. To achieve these goals, pyRevolve was designed for the following overall workflow, which will be explained in more detail in the following sections. The term application here refers to the application using pyRevolve as a library (in this case Devito). To begin with, the application creates objects with an apply method to perform the actual forward and reverse computations, which are both instances of a concrete implementation of the abstract base classOperator. The application also creates an instance of a concrete implementation of the abstract base class Checkpoint that can deep-copy all time-dependent working data that the operators require into a specified memory location. Next, the application instantiates pyRevolve ’s Revolver object and passes the forward and reverse operators, and the checkpoint object. When required, the application starts the Revolver’s forward sweep, which will complete the forward computation and store checkpoints as necessary. After the forward sweep completes, the application can finalize any computation that is based on the forward data, such as evaluation of objective functions, or store the final result as necessary. This may be accompanied/followed by the initialization of the adjoint data structures. After this, the application calls the Revolver’s reverse sweep. This will compute the adjoint, possibly by performing partial forward sweeps and loading checkpoint data. The pyRevolve package contains crevolve, which is a thin C wrapper around a previously published C++ implementation2 . The C++ files in this package are slightly modified for compatibility with Python, but the original is available from the link in the footnote. The crevolve wrapper around the C++ library is taken from libadjoint3 . 2 http://www2.math.uni-paderborn.de/index.php?id=12067&L=1 3 https://bitbucket.org/dolfin-adjoint/libadjoint C wrapper pyRevolve Python wrapper Devito Application Figure 5: Packages overview. Devito and an example application that uses checkpointing are the subject of Section 2. Revolve has been described in Section 3. The packages pyRevolve and cRevolve and how they are used to create a high-level abstraction of checkpointing are explained in Section 4. One key design aspect is that pyRevolve is not responsible for performing the data copies, and therefore does not need to know about the properties or structure of the data that needs to be stored. For this purpose, pyRevolve provides the Checkpoint abstract base class that has a size attribute, and a load(ptr) and save(ptr) method. The user must provide a concrete implementation of such an object. The size attribute must contain the size of a single checkpoint in memory, this information is used by pyRevolve to allocate the correct amount of memory. The save method must deep-copy all working data to the memory region starting at the provided pointer, and the load method must restore the working data from the memory region starting at the pointer ptr, either by performing a deep-copy, or by pointing the computation to the existing data inside the checkpoint storage. The pyRevolve library provides to the user the class Revolver that must be instantiated with the following arguments: • Checkpoint object: This has to be an implementation of the abstract base class Checkpoint. • Forward operator: An object that provides a function apply() as specified in Section 4.2 that performs the forward computation. • Reverse operator: Similarly, an object that provides a function apply() that performs the reverse computation. • Number of checkpoints: This is optional, and specifies the number of checkpoints that can be stored in memory. If it is not given, a default value is computed using the adjust method explained in Section 3. SC17, November 2017, Denver, Colorado, USA Kukreja, N. et al ≪enum≫ Action Crevolve advance takeshot restore firstrun youturn error + capo : uint + oldcapo : uint + check : uint +revolve() : Action Figure 6: Crevolve classes. # Example time-varying field that needs checkpointing u = TimeData(...) # Some expression that generates the values for u fw = Operator(...) # Some expression that uses the values of u rev = Operator(...) cp = DevitoCheckpoint([u]) revolver = Revolver(cp, fw, rev, nt) # Forward sweep that will pause to take checkpoints revolver.apply_forward() # Could perform some additional steps here # Reverse sweep that uses the checkpoints revolver.apply_reverse() Checkpoint # size : int Figure 8: Devito code to utilize checkpointing based on pyRevolve # save(ptr : pointer) : void # load(ptr: pointer) : void 4.2 1 Storage - data : numpy_array + init(n_ckp : int, size_ckp : int) + get_item(i : uint) : pointer 1 Revolver - op_forward : Operator - op_reverse : Operator - store : Storage - cr : CRevolve :: Checkpointer - ckp : Checkpoint + init(ckp, op_forward, op_reverse, n_ckp, n_time) + apply_forward() : void + apply_reverse() : void Operator # apply() : void Figure 7: pyRevolve classes. The abstract classes Checkpoint and Operator are implemented by the client application • Number of time steps: This is also optional. If it is not given, an online checkpointing algorithm is used. Based on either the given or computed number of checkpoints, the constructor instantiates a storage object that allocates the necessary amount of memory (number of checkpoints × checkpointsize), and makes that memory accessible to the Revolver. API, Application side To introduce checkpointing using the pyRevolve library, an application must implement a particular interface. We use devito here as an example application, however, everything discussed here is fairly general and any application may implement checkpointing using pyRevolve using the approach discussed in this section. To begin with, a concrete implementation of pyRevolve ’s abstract base class Checkpoint, called DevitoCheckpoint was created. This class has three methods: • save(ptr): Save the contents of the working memory into the location ptr. • restore(ptr): Restore a previously stored checkpoint from location ptr into working memory. • size: Report the amount of memory required by a single checkpoint. This is used to decide the total amount of memory to be allocated and to calculate offsets. Along with this, we set up two Operator, one a ForwardOperator to carry out the forward computation and a GradientOperator that computes the image, as explained in section 2. These can be used to initialize a Revolver object as shown in figure 8. On initialization of the Revolver, object, the DevitoCheckpoint object is queried for the size of one checkpoint and pyRevolve allocates n_checkpoints*checkpoint.size bytes of memory for the storage of checkpoints. Calling revolver.apply_forward() carries out a forward run but broken down into chunks as specified by the checkpointing schedule provided by Revolve, each chunk being executed by calling fwd.apply() with arguments t_start and t_end corresponding to the timesteps to run the simulation for. Between these chunks, cp.save() is automatically called to save the state to a checkpoint. On calling revolver.apply_reverse(), the Revolver calls rev.apply() with the relevant t_start/t_end arguments for the sections where the result from the forward pass is available in a checkpoint. This will be loaded by a call to cp.load. For others, it will automatically call fwd.apply() to recompute and store in memory the results from a part of the forward operator so the reverse operator can be applied for that part. High-level python abstractions for optimal checkpointing in inversion problems SC17, November 2017, Denver, Colorado, USA DevitoCheckpoint + size : int + save(ptr : pointer) : void + load(ptr: pointer) : void ForwardOperator ReverseOperator - data - data + apply() : void + apply() : void Figure 10: Velocity model used for gradient test Figure 9: Devito operators, and the implementation of a Checkpoint class. Following this work, users of Devito can easily add optimal checkpointing to their adjoint computations by following the steps described above. 5 EXPERIMENT There are two possible ways of testing the numerical accuracy of an implementation - solving a problem whose solution has certain known mathematical properties and verifying these properties numerically, and comparing the results to a reference solution. Here we do both - we use the gradient test as described in [7] and also verify that the numerical results match those from a reference implementation. The test uses the Taylor property of the gradient to test whether the calculated gradient follows the expected convergence for small perturbations. The test can be written mathematically as: Figure 11: Timings for gradient test for different amounts of peak memory consumption ϵ0 =Φs (m0 + hdm) − Φs (mt ) ϵ1 =Φs (m0 + hdm) − Φs (m0 ) − h⟨∇Φs (m0 ), dm⟩. (9) where Φs is defined in equation 1. This test is carried out for a certain m, which we call here m0 . This is the smoothed version of a two layer model mt i.e. the true model has two horizontal sections, each with a different value of squared slowness. Figure ?? shows the true velocity model mt . The measured data required by the objective function is modeled on the true two-layer model and dm = m0 − mt . The constant h then varies between 10−1 and 10−4 to verify that ϵ0 = O(h) is a first order error and ϵ1 = O(h 2 ) is a second order error. The code used for this test can be found in the repository for devito 4 . The tests were carried out on a Intel(R) Xeon(R) CPU E5-2640 v3 @ 2.60GHz (Haswell) with 128GB RAM. We used a grid with 230 × 230 × 230 points. With the simulation running for 1615 timesteps, this required about 80 GB to store the full forward wavefield in memory. The first run was made with the regular gradient example that stores the entire forward wavefield in memory. This was then repeated with checkpointing, with varying number of checkpoints. It was verified that the results 4 https://github.com/opesci/devito from all versions matched each other exactly and also passed the gradient test mentioned previously. The peak memory usage was tracked for each such run, as well as the total time to solution. The memory consumption was measured using the memory_profiler python module and the time to solution by using the time python command before and after the function to be profiled. To eliminate variation in the results, the timings are the minimum value from three runs. As can be seen in figure 11, the reduction in runtime as more memory is available is not in line with the theoretical predictions from Griewank and Walther [4]. This is expected because the theoretical numbers do not take into account the cost of deep copies (implemented here using numpy) as well as the cost of repeatedly calling a C function from python vs doing the repetition inside the C function. Since the adjoint computation (as well as the associated forward computation) is carried out one time-step at a time, this significantly reduces the amount of work available inside a single Operator call. This might cause inefficiencies in load-balancing across cores using OpenMP. This effect is seen most clearly when comparing the reference implementation that stores the forward SC17, November 2017, Denver, Colorado, USA field in a contiguous block of memory with the checkpointed implementation that stores a checkpoint at every time step. In this case, although the memory consumption of the two implementations is the same, the checkpointed implementation runs slower because of the overheads previously mentioned. 6 CONCLUSIONS Through this work, we have shown that with high-level abstractions it is possible to greatly simplify the complexity of client code. We have also verified the correctness of our implementation using mathematical tests. This already enables the users of Devito to utilize Revolve based checkpointing in their applications to solve much bigger problems than previously possible. However, through the experiment in section 5, we have seen that the overhead introduced by checkpointing is non-trivial. For this reason, there is much more work to be done to implement more features that widen the applicability of pyRevolve . 7 FUTURE WORK This work carried out so far was a proof of concept of integration with Revolve using high level abstractions and, as such, is still a work-in-progress in terms of use for practical applications. The most important limitation in the current implementation is that it implements “serial checkpointing”, i.e. during the reverse computation, only one timestep can be advanced at a time and this severely limits the parallelizability of this code. The high-level interface would need to be extended to be able to manage parallelization strategies. Another important feature that might be required in pyRevolve before it is adopted in the community is multi-stage checkpointing. Here, some checkpoints may be transparently swapped to disk, further increasing the amount of memory available to applications without any change in the application code. For problems implemented with adaptive time-stepping, the number of time-steps is not known a-priori and that would require pyRevolve to implement online checkpointing, something that even Devito would require in future versions. ACKNOWLEDGMENTS The authors are very grateful to Fabio Luporini and Nicolas Barral. This work was carried out as part of the Intel Parallel Computing Centre at Imperial College, London. REFERENCES [1] 2017. (August 2017). http://www.open.edu/openlearn/science-maths-technology/ science/environmental-science/earths-physical-resources-petroleum/ content-section-3.2.1 [2] G. Aupy, J. Herrmann, P. Hovland, and Y. Robert. 2016. Optimal Multi-stage algorithm for Adjoint Computation. SIAM Journal on Scientific Computing 38, 3 (2016), C232–C255. [3] Edip Baysal, Dan D. Kosloff, and John W. C. Sherwood. 1983. Reverse time migration. Geophysics 48, 11 (1983), 1514–1524. https://doi.org/10.1190/1.1441434 arXiv:http://geophysics.geoscienceworld.org/content/48/11/1514.full.pdf [4] Andreas Griewank and Andrea Walther. 2000. Algorithm 799: revolve: an implementation of checkpointing for the reverse or adjoint mode of computational differentiation. ACM Transactions on Mathematical Software (TOMS) 26, 1 (2000), 19–45. [5] A. Griewank and A. Walther. 2008. Evaluating Derivatives: Principles and Techniques of Algorithmic Differentiation. SIAM. [6] Eldad Haber, Matthias Chung, and Felix J. Herrmann. 2012. An effective method for parameter estimation with PDE constraints with multiple right hand sides. SIAM Journal on Optimization 22, 3 (7 2012). http://dx.doi.org/10.1137/11081126X Kukreja, N. et al [7] Navjot Kukreja, Mathias Louboutin, Felippe Vieira, Fabio Luporini, Michael Lange, and Gerard Gorman. 2016. Devito: automated fast finite difference computation. In Domain-Specific Languages and High-Level Frameworks for High Performance Computing (WOLFHPC), 2016 Sixth International Workshop on. IEEE, 11–19. [8] Michael Lange, Navjot Kukreja, Fabio Luporini, Mathias Louboutin, Charles Yount, Jan Hückelheim, and Gerard J Gorman. 2017. Optimised finite difference computation from symbolic equations. arXiv preprint arXiv:1707.03776 (2017). [9] R-E Plessix. 2006. A review of the adjoint-state method for computing the gradient of a functional with geophysical applications. Geophysical Journal International 167, 2 (2006), 495–503. [10] M. Schanen, O. Marin, and H. Zhang amd M. Anitescu. 2015. Asynchronous TwoLevel Checkpointing Scheme for Large-Scale Adjoints in the Spectral-Element Solver Nek5000. Technical Report ANL/MCS-P5422-1015. Argonne National Laboratory. [11] Julia Sternberg and Michael Hinze. 2010. A memory-reduced implementation of the Newton-CG method in optimal control of nonlinear time-dependent PDEs. Optimization Methods & Software 25, 4 (2010), 553–571. [12] P. Stumm and A. Walther. 2009. Multi-stage Approaches for Optimal Offline Checkpointing. SIAM Journal of Scientific Computing 31, 3 (2009), 1946–1967. [13] Philipp Stumm and Andrea Walther. 2010. New algorithms for optimal online checkpointing. SIAM Journal on Scientific Computing 32, 2 (2010), 836–854. [14] William W. Symes. 2007. Reverse time migration with optimal checkpointing. GEOPHYSICS 72, 5 (2007), SM213–SM221. https://doi.org/10.1190/1.2742686 arXiv:https://doi.org/10.1190/1.2742686 [15] Albert Tarantola. 1984. Inversion of seismic reflection data in the acoustic approximation. GEOPHYSICS 49, 8 (1984), 1259–1266. https://doi.org/10.1190/1. 1441754 arXiv:https://doi.org/10.1190/1.1441754 [16] Jean Virieux and Stéphane Operto. 2009. An overview of full-waveform inversion in exploration geophysics. Geophysics 74, 6 (2009), WCC1–WCC26. [17] Andrea Walther. 2004. Bounding the number of processes and checkpoints needed in time-minimal parallel reversal schedules. Computing 731, 2 (2004), 135–154. [18] Qiqi Wang, Parviz Moin, and Gianluca Iaccarino. 2009. Minimal Repetition Dynamic Checkpointing Algorithm for Unsteady Adjoint Calculation. SIAM Journal on Scientific Computing 31, 4 (2015/05/03 2009), 2549–2567. https://doi. org/10.1137/080727890
5cs.CE
A Fast Parameterized Algorithm for Co-Path Set Blair D. Sullivan, Andrew van der Poel Department of Computer Science, North Carolina State University, Raleigh, NC 27695 arXiv:1603.04376v3 [cs.DS] 27 Jul 2016 {blair sullivan,ajvande4}@ncsu.edu January 4, 2018 Abstract The k-Co-Path Set problem asks, given a graph G and a positive integer k, whether one can delete k edges from G so that the remainder is a collection of disjoint paths. We give a linear-time fpt algorithm with complexity O∗ (1.588k ) for deciding k-Co-Path Set, significantly improving the previously best known O∗ (2.17k ) of Feng, Zhou, and Wang (2015). Our main tool is a new O∗ (4tw(G) ) algorithm for Co-Path Set using the Cut&Count framework, where tw(G) denotes treewidth. In general graphs, we combine this with a branching algorithm which refines a 6k-kernel into reduced instances, which we prove have bounded treewidth. 1 Introduction We study parameterized versions of Co-Path Set [3, 16], an NP-complete problem asking for the minimum number of edges whose deletion from a graph results in a collection of disjoint paths (the deleted edges being a co-path set – see Figure 1). Specifically, we are concerned with k-Co-Path Set, which uses the natural parameter of the number of edges deleted. k-Co-Path Set Input: A graph G = (V, E) and a non-negative integer k. Parameter: k Problem: Does there exist F ⊆ E of size exactly k such that G[E \ F ] is a set of disjoint paths? These problems are naturally motivated by determining the ordering of genetic markers in DNA using fragment data created by breaking chromosomes with gamma radiation (a technique known as radiation hybrid mapping) [4,13,15]. Unfortunately, human error in distinguishing markers often means the constraints implied by markers’ co-occurrence on fragments are incompatible with all possible linear orderings, necessitating an algorithm to find the “best” ordering (that violates the fewest constraints). Co-Path Set solves the special case where each DNA fragment contains exactly two genetic markers (corresponding to an edge in the graph); any linear ordering of the markers must correspond to some 1 Figure 1: Three co-path sets (dashed edges), including one of minimum size (rightmost). set of paths, and we minimize the number of unsatisfied constraints (edges in the co-path set). Recent algorithmic results related to Co-Path Set include a (10/7)-approximation algorithm [2], and two parameterized algorithms deciding k-Co-Path Set [6, 7], the faster of which [7] has time complexity1 O∗ (2.17k ). However, as written, both parameterized results [6,7] contain a flaw in their analysis which invalidates their probability of a correct solution in the given time2 . The best known bound prior to [6] is an O∗ (2.45k ) algorithm [16]. In this paper, we prove: Theorem 1. k-Co-Path Set is decidable in O∗ (1.588k ) linear-fpt time with probability at least 2/3. We note that standard amplification arguments apply, and Theorem 1 holds for any success probability less than 1. Further, if f is an increasing function with limn→∞ f (n) = 1, we can solve k-Co-Path Set with success probability at least f (n) in O(1.588k npolylog(n)). The remainder of this paper is organized as follows: after essential definitions and notation in Section 2, we start in Section 3 by giving a new O∗ (4tw(G) ) algorithm tw-copath for solving Co-Path Set parameterized by treewidth (tw) using the Cut&Count framework [5]. Finally, Section 4 describes the linear-fpt algorithm referenced in Theorem 1, which solves k-Co-Path Set on general graphs in O∗ (1.588k ) by applying tw-copath to a set of “reduced instances” generated via kernelization and a branching procedure3 deg-branch. 2 Preliminaries Let G(V, E) be the graph with vertex set V and edge set E. Unless otherwise noted, we assume |V | = n; we let N (v) denote the set of neighbors of a vertex v, and let deg(v) = |N (v)|. Given a graph G(V, E) and F ⊆ E, we write G[F ] for the graph G(V, F ). Our tw-copath algorithm in Section 3 uses dynamic programming over a tree decomposition, and its running time depends on the related measure of treewidth [14], which we denote tw(G). To simplify the dynamic programming, 1 Throughout this paper, we use the notation O ∗ (f (k)) for the fpt (fixed-parameter tractable) complexity O(f (k)nO(1) ); we say an algorithm is linear-fpt if the complexity is O(f (k)n). 2 Step 2.11 in both versions of Algorithm R-MCP checks if a candidate co-path set F has size ≤ k1 (as they are sweeping over all possible sizes of candidates and want to restrict the size accordingly). If F is too large, the algorithm discards it and continues to the next iteration. However, in order for their analysis to hold, the probability that the candidate is contained in a co-path set must be ≥ (1/2.17)k1 (or (1/2.29)k1 in [6]) for every iteration. Candidates which are too large may have significantly smaller probability of containment, yet are counted in the exponent of the analysis. 3 The properties of our reduced instances guarantee we can find a tree decomposition in poly(k) time. 2 we will use a variant of nice tree decompositions [5, 10] where each node in the tree has one of five specific types: leaf, introduce vertex, introduce edge, forget vertex, or join. The “introduce edge” nodes are labelled with an edge uv and have one child (with an identical bag); we require each edge in E is introduced exactly once. Additionally, we enforce that the root node is of type “forget vertex” (and thus has an empty bag). A tree decomposition can be transformed into a nice decomposition of the same width in time linear in the size of the input graph [5]. When describing the dynamic programming portion of the algorithm we use Iverson’s bracket notation: if p is a predicate we let JpK be 1 if p is true and 0 otherwise. We also use the shorthand f [x → y] to denote updating a function f so that f (x) = y and all other values are unchanged. Finally, we use fast subset convolution [1] to reduce the complexity of handling join nodes in the nice tree decomposition (Section 3). This technique maps functions of the vertices in a join bag to values in Zp = Z/pZ (where p is chosen based on the application). The key complexity result we rely on uses the Zp product, which is defined below. We write ZB p for the set of all vectors t of length |B| assigning a value t(b) ∈ Zp to each element of b ∈ B. Definition 1 (Zp product). Let p ≥ 2 be a fixed integer and let B be a finite set. For t1 , t2 , t ∈ ZB p we say that t1 + t2 = t if t1 (b) + t2 (b) = t(b) (in Zp ) for all p b ∈ B. For a ring R and functions f, g : ZB p → R, define the Zp product, ∗x as P (f ∗px g)(t) = f (t1 )g(t2 ). t1 +t2 =t Fast subset convolution guarantees that certain Zp products can be computed quickly. Lemma 1 (Cygan et al. [5]). Let R = Z or R = Zq for some constant q. The Z4 product of functions f, g : ZB 4 → R can be computed in time and ring operations 4|B| |B|O(1) . 3 An O∗ (4tw(G) ) Algorithm via Cut&Count We start by giving an fpt algorithm for Co-Path Set parameterized by treewidth. Our primary tool is the the Cut&Count framework, which enables ctw nO(1) onesided Monte Carlo algorithms for connectivity-type problems with constant probability of a false negative. Cut&Count has previously been used to improve the best-known bounds for several well-studied problems, including Connected Vertex Cover, Hamiltonian Cycle, and Feedback Vertex Set [5]. Pilipczuk showed that an O∗ (ctw ) algorithm for some constant c can be designed with the Cut&Count approach for Co-Path Set because the problem can be expressed in the specialized graph logic known as ECML+C [12]. However, since our end goal is to improve on existing algorithms for k-Co-Path Set in general graphs using a bounded treewidth kernel, we need to develop a specialized dynamic programming algorithm with a small value of c. We show: Theorem 2. There exists a one-sided fpt Monte Carlo algorithm tw-copath deciding k-Co-Path Set for all k in a graph G in O∗ (4tw(G) ) time with failure probability ≤ 1/3. 3 The Cut&Count technique has two main ingredients: an algebraic approach to counting which uses arithmetic in Z2 (enabling faster algorithms) alongside a guarantee that undesirable objects are seen an even number of times (so a non-zero result implies a desired solution has been seen), and the idea of defining the problem’s connectivity requirement through consistent cuts. In this context, a consistent cut is a partitioning (V1 , V2 ) of the vertices of a graph into two sets such that no edge uv has u ∈ V1 and v ∈ V2 and all vertices of degree 0 are in V1 . Since each connected component must lie completely on one side of any consistent cut, we see that a graph G has exactly 2cc(G)−nI (G) such cuts, where cc(G) is the number of connected components and nI (G) is the number of isolated vertices. In order to utilize parity with the number of consistent cuts, we introduce markers, which create even numbers of consistent cuts for graphs that are not collections of disjoint paths. Our counting algorithm tw-copath, which computes the parity of the size of the collection of subgraphs with consistent cuts which adhere to specific properties pertaining to Co-Path Set, employs dynamic programming over a nice tree decomposition. We further use weights and the Isolation Lemma to bound the probability of a false negative arising from multiple valid markings of a solution. We use fast subset convolution [1] to reduce the complexity required for handling join bags in the dynamic programming. In the remainder of this section, we present the specifics for applying these techniques to solve Co-Path Set. 3.1 Cutting We first provide formal definitions of markers and marked consistent cuts, which we use to ensure that sets of disjoint paths are counted exactly once in some entry of our dynamic programming table. Definition 2. A triple (V1 , V2 , M ) is a marked consistent cut of a graph G if (V1 , V2 ) is a consistent cut and M ⊆ E(G[V1 ]). We refer to the edges in M as the markers. A marker set is proper if it contains at least one edge in each non-isolate connected component of G. Note that if a marker set is proper, all vertices are on the V1 side of the cut. This is because by the definition of a consistent cut, all isolates are on the V1 side, and if every connected component contains a marker then all connected components must fall entirely on the V1 side as well. Therefore for any proper marker set there exists exactly one consistent cut, while all marker sets which are not proper will be paired with an even number of consistent cuts because unmarked components may lie in V1 or V2 . We use proper marker sets to distinguish desired subgraphs by assigning markers in such a way that when we prune the dynamic programming table for solutions (as described later in the section), the only subgraphs we consider which may have a proper marker set are collections of disjoint paths. We know because the marker set is proper that the subgraph has a unique consistent cut, and thus these collections of disjoint paths will only be counted once in some entry of the dynamic programming table, while all other subgraphs will be counted an even number of times. Note that we are not claiming that all collections of disjoint paths will have proper marker sets. We refer to the complement of a co-path set (the edges in the disjoint paths) as a cc-solution, and call it a marked-cc-solution when paired with a proper marker set of size exactly equal to its number of non-isolate connected components. While 4 cc-solutions can be viewed as solutions due to their complementary nature, being marked is crucial in our counting algorithm and thus subgraphs which are markedcc-solutions are what correspond to solutions in the dynamic programming table. We now describe our use of the Isolation Lemma, which P guarantees we are able to use parity to distinguish solutions. Let f (X) denote x∈X f (x). Isolation Lemma ([11]). Let F ⊆ 2U be a non-empty set family over universe U . A function ω : U → Z is said to isolate F if there is a unique S ∈ F with ω(S) = minF ∈F ω(F ). Assign weights ω : U → {1, 2, ..., N } uniformly at random. Then the probability that ω isolates F is at least 1 − |U |/N . Intuitively, if F is the set of solutions (or complements of solutions) to an instance of Co-Path Set and |F| is even, then tw-copath would return a false negative. This is because while each solution is counted an odd number of times in tw-copath, because there are an even number of solutions the total count of solutions is even, making the combined count of solutions and non-solutions even and the algorithm would incorrectly determine a solution does not exist (a false negative). The Isolation Lemma allows us to partition F based on the weight of each solution (as assigned by ω), and guarantees at least one of the partition’s blocks has odd size with constant probability. We let U contain two copies of every edge e ∈ E: one representing e as a marker and one as an edge in the cc-solution. Then 2U denotes all pairs of edge subsets (potential marked-cc-solutions), and we set N = 3|U | = 6E (selected to achieve success probability in Theorem 1). Each copy of an edge is assigned a weight in [1, N ] uniformly at random by ω and the probability of finding an isolating ω is thus 2/3. We denote the values assigned by ω to the set of marker copies by ωM , and likewise to the set of edge-in-cc-solution copies by ωE . 3.2 Counting A marked-cc-solution C of a graph G corresponds to a co-path set of size k when the number of edges and markers in C match specific values which depend on k and |E(G)|. These values are easily deduced because we know the deletion of a co-path set solution of size k will leave |E(G)| − k edges in a cc-solution. Furthermore, because a forest has n − m connected components, the number of markers in C needs to be at most |V (C)| − |E(G)| + k. All isolates from a forest can be removed and the resulting graph is still a forest, and thus the actual number of markers necessary in C is |V (C)| − nI (C) − |E(G)| + k. We now describe a dynamic programming (DP) algorithm over a nice tree decomposition which returns mod 2 the number of appropriately sized markedcc-solutions in the root’s subtree (for a fixed k). Since no-instances have no appropriately sized marked-cc-solutions, and yes-instances have at least one, odd parity for the number of marked-cc-solutions of size corresponding to k implies a solution to the k-Co-Path Set instance must exist. During the DP algorithm we actually count (for all values (m, e)) the number of cc-candidates, which are subgraphs G0 ⊆ G with maximum degree 2, exactly e edges, and a marked consistent cut with m markers. The following lemma justifies counting cc-candidates in place of marked-cc-solutions. Lemma 2. The parity of the number of marked-cc-solutions in G with e edges and weight w is the same as the parity of the number of cc-candidates G0 ⊆ G with e edges, |V (G0 )| − e − nI (G0 ) markers, and weight w. 5 Proof. Consider a subgraph G0 ⊆ G with maximum degree 2 and e edges. Let M 0 be a marking of G0 such that ωE (E(G0 )) + ωM (M 0 ) = w. Assume first that G0 is a collection of paths. We know that G0 has |V (G0 )| − e − nI (G0 ) non-isolate connected components. If M 0 is a proper marker set of G0 , then |M 0 | = |V (G0 )|−e−nI (G0 ) and (G0 , M 0 ) has exactly one consistent cut. Therefore (G0 , M 0 ) contributes one to both the number of marked-cc-solutions and the number of cc-candidates, respectively. If otherwise M 0 is not a proper marker set, then (G0 , M 0 ) contains an unmarked connected component and has an even number of consistent cuts, and therefore contributes an even number to the count of cc-candidates and zero to the number of marked-cc-solutions. Finally, if G0 contains at least one cycle then cc(G0 ) > |V (G0 )| − e − nI (G0 ). Therefore at least one connected component does not contain a marker, and the number of consistent cuts is even, so the contribution to the count of cc-candidates is again even and the contribution to the count of marked-cc-solutions is zero. We conclude that the parity of the number of marked-cc-solutions and the parity of the number of cc-candidates is the same. Our dynamic programming algorithm is a bottom-up approach over a nice tree decomposition. We build cc-candidates for all values of m and e (encoding the option to add/not add edges and select/not select edges as markers), and keep track of various parameters ensuring that when pruning the DP table we only consider cc-candidates which could be valid solutions to the k-Co-Path Set instance. We use the number of edges to ensure our solution is of the correct size, and the number of markers and non-isolate vertices to determine when a subgraph is acyclic. The weight parameter allows us to distinguish between solutions and decreases the likelihood of a false negative occurring via the Isolation Lemma. Finally, we need a parameter that encodes the degree information required to properly combine cc-candidates as we iterate up the tree. We call this parameter a degree-function and define on the vertices V of a bag as Variable a e m w Parameter Maximum value # of non-isolated vertices # of edges # of markers weight of edges and markers n n2 n2 4n4 Table 1: Dynamic programming table parameters and upper bounds. f : V → Σ = {0, 11 , 12 , 2}, where f (v) corresponds to v’s degree in the associated cc-candidates of the table entry — for vertices of degree 1, their value 1j denotes which side of the partition (V1 , V2 ) they are on. Vertices with degree 0 are on the V1 side of the cut by definition so we need not keep track of their side of the cut. Similarly degree 2 vertices cannot have additional incident edges, thus the side of the cut they fall on will not matter for selecting markers. In summary, we have table entries Ax (a, e, m, w, s) counting the number of cc-candidates at bag x with a non-isolated vertices, e edges, m markers, weight w, and degree-function s. In the following description of the dynamic programming algorithm over a nice tree decomposition T , we let z1 , z2 denote the children of a join node; 6 otherwise, the unique child is denoted y. Leaf : Ax (0, 0, 0, 0, ∅) = 1; Ax (a, e, m, w, s) = 0 for all other inputs. Introduce vertex v: Ax (a, e, m, w, s) = Js(v) = 0KAy (a, e, m, w, s). Introduce edge uv: Ax (a, e, m, w, s) = Ay (a, e, m, w, s) + X Jφ2 (αu , αv )KAy (a0 , e − 1, m, w0 , s0 ) αt ∈subs(s(t)) t∈{u,v} + X   Jφ1 (αu , αv )K Ay (a0 , e − 1, m, w0 , s0 ) + Ay (a0 , e − 1, m − 1, w00 , s0 ) , αt ∈subs(s(t)) t∈{u,v} where φj (αu , αv ) = (αu = 1j ∨ s(u) = 1j ) ∧ (αv = 1j ∨ s(v) = 1j ), a0 = a − (|{11 , 12 } ∩ {s(u), s(v)}|), w0 = w − ωE (uv), w00 = w − ωE (uv) − ωM (uv), s0 = s[u → αu , v → αv ], and the subs function returns all the values the degreefunction in child node y could have assigned to vertices u and v based on current degree-function s (summarized below). s(v) 0 11 12 2 subs(s(v)) ∅ 0 0 {11 , 12 } We now argue this formula’s correctness. The term Ay (a, e, m, w, s) handles the case when uv is excluded from the cc-solution. We handle the case when uv is added to the cc-solution by iterating over all possible subs values for each endpoint, only considering counts in child y’s entries where u and v have the appropriate subs values (preventing us from ever having a vertex with degree greater than 2). Note that we use the φj function to guarantee that if s labels u or v as an isolate, we do not use the introduced edge. We have a summation for both possible j values in order to consider uv falling on either side of the cut. The formulation of a0 assures that each endpoint of degree 1 is now included in the count of non-isolates (i.e. when u and/or v had degree 0 in y). We utilize the marker weight of uv to distinguish when we choose it as a marker (only if on V1 side of cut), and increment m accordingly. In either case, we update w appropriately (with w0 if no marker, w00 if marker introduced). Forget vertex h: X Ax (a, e, m, w, s) = Ay (a, e, m, w, s[h → α]). α∈{0,11 ,12 ,2} As a forgotten vertex can have degree 0, 1 or 2 in a cc-candidate, we must consider all possible values that s assigns to h in child bag y. Note that cccandidates in which h is both not an isolate and not a member of a connected component that contains a marker will cancel mod 2, as h can be on either side of the cut and all parameters will be identical. 7 Join: We compute Ax from Az1 and Az2 via fast subset convolution [1] taking care to only combine table entries whose degree-functions are compatible. Definition 3. At a join node x with children z1 and z2 , the degree-functions s1 from Az1 , s2 from Az2 , and s from Ax are compatible if one of the following holds for every vertex v in x: (i) si (v) = 0 and sl (v) = s(v), i 6= l or (ii) s1 (v) = s2 (v) = 1j and s(v) = 2 for i, j, l ∈ [1, 2]. In order to apply Lemma 1, we let B be the bag at x, and transform the values assigned by the degree function s to values in Z4 . Let φ : {0, 11 , 12 , 2} → Z4 and ρ : {0, 11 , 12 , 2} → Z be defined as in the table below, extending to vectors by component-wise application. φ ρ 0 11 12 2 0 0 1 1 3 1 2 2 We use φ to apply Lemma 1, while the function ρ (which corresponds to a vertex’s degree) is used in tandem to ensure the compatibility requirements are met: if φ(s1 ) + φ(s2 ) = φ(s), then necessarily ρ(s1 ) + ρ(s2 ) ≥ ρ(s). From the above table it is easy to verify that φ(s1 ) + φ(s2 ) = φ(s) and ρ(s1 ) + ρ(s2 ) = ρ(s) together imply that s1 , s2 and s are compatible. We sum over both functions when computing values for join nodes, to make sure that solutions from the children are combined only when there is compatibility. Assign P t1 = φ(s1 ), t2 = φ(s2 ), and t = φ(s) in accordance with Lemma 1. Let ρ(s) = v∈B ρ(s(v)); that is ρ(s) is the sum of the degrees of all the vertices in the join node, as assigned by degree-function s. By defining functions f and g as follows: f hd,a,e,m,wi (φ(s)) = Jρ(s) = dKAz1 (a, e, m, w, s), g hd,a,e,m,wi (φ(s)) = Jρ(s) = dKAz2 (a, e, m, w, s), and writing r~i for the vector hdi , ai , ei , mi , wi i, we can now compute X Ax (a, e, m, w, s) = (f r~1 ∗4x g r~2 )(φ(s)) r~1 +r~2 =hρ(s),a0 ,e,m,wi −1 where a0 = a + |s−1 1 {11 , 12 } ∩ s2 {11 , 12 }|. We point out that X (f r~1 ∗4x g r~2 )(φ(s)) = 1 r~1 +r~2 =hρ(s),a0 ,e,m,wi only if both φ(s1 ) + φ(s2 ) = φ(s) and ρ(s1 ) + ρ(s2 ) = ρ(s); that is, exactly when s1 , s2 and s are compatible. We conclude this section by describing how we search the DP table for marked-cc-solutions at the root node r. By Lemma 2, the parity of the number of marked-cc-solutions with |E| − k edges and weight w is the same as the parity of the number of cc-candidates G0 with |E| − k edges, |V (G0 )| − (|E| − k) − nI (G0 ) markers and weight w. These candidates are recorded in the table entries 8 Ar (a, |E| − k, a − |E| + k, w, ∅), where a is the number of non-isolates. Therefore, if there exists some a and w so that Ar (a, |E| − k, a − |E| + k, w, ∅) = 1, then we have a yes-instance of k-Co-Path Set. Note that the degree-function is ∅ in this entry because there are no vertices contained in the root node by definition. By Lemma 1, the time complexity of tw-copath for a join node B is O∗ (4|B| ), which is O∗ (4tw ). Note that for the other four types of bags, as we only consider one instance of s per table entry, the complexity for each is O∗ (4tw ). We point out that the size of the table is polynomial in n because there are a linear number of bags and a polynomial number of entries (combinations of parameters) for each bag. Since the nice tree decomposition has size linear in n, the bottomup dynamic programming runs in total time O∗ (4tw ). This complexity bound combined with the correctness of tw-copath discussed above proves Theorem 2. 4 Achieving O∗ (1.588k ) in General Graphs In order to use tw-copath to solve k-CoPath Set in graphs with unbounded treewidth, we combine kernelization and a branching procedure to generate a set of reduced instances – bounded treewidth subgraphs of the input graph G. Specifically, we begin by constructing a kernel of size at most 6k as described in [7]. Our reduced instances are bounded degree subgraphs of the kernel given by a branching technique. We prove that (1) at least one reduced instance is an equivalent instance; (2) we can bound the number of reduced instances; and (3) each reduced instance has bounded treewidth. Finally, we analyze the overall computational complexity of this process. 4.1 Kernelization and Branching We start by describing our branching procedure deg-branch (Algorithm 1), which uses a degree-bounding technique similar to that of Zhang et al. [16]. Our implementation takes an instance (G, k) of Co-Path Set and two non-negative integers ` and D, and returns a set of reduced instances {(Gi , k − `)} so that (1) each Gi is a subgraph of G with exactly |E| − ` edges and maximum degree at most D; and (2) at least one (Gi , k − `) is an equivalent instance to (G, k). The size of the output (and hence the running time) of deg-branch depends on both input parameters ` and D. We will select D to achieve the desired complexity in copath in Section 4.3. We also make use of a budget parameter b, which keeps track of how many more edges can be removed per the constraints of ` (b is initially set to `). Our branching procedure leverages the observation that if a co-path set S exists, then every vertex has at most two incident edges not in S. Specifically, for every vertex of degree greater than D, we branch on pairs of incident edges which could remain after removing a valid co-path set (calling each pair a candidate), creating a search tree of subgraphs. Algorithm 1 returns the set of reduced instances, the size of which is at most the number of leaves in the search tree of the branching process (inequality can result from the algorithm discarding branches in which the number of edits necessary to branch on a vertex exceeds the number of allowed deletions remaining). We now give an upper bound on the size of this set. 9 Algorithm 1: Generating reduced instances 1 2 3 4 5 6 7 8 Algorithm deg-branch(G, k, `, D, b) Let v be a vertex of maximum degree in G if deg(v) ≥ D + 1 and b ≥ D − 1 then Select vertices u1 , . . . uD+1 uniformly at random from N (v) R = ∅, Ev = {{v, ui }} for e1 , e2 ∈ Ev , e1 6= e2 do Ev0 = Ev \ {e1 , e2 } R = R ∪ deg-branch(G \ Ev0 , k, `, D, b − (D − 1)) 9 10 11 return R else if b = 0 and deg(v) ≤ D then return {(G, k − `)} else return ∅ // Discard G Lemma 3. Let T be a search tree formed by deg-branch(G, `, D, k, b). The `/(D−1) number of leaves of T is at most D+1 . 2  Proof of Lemma 3. The number of children of each interior node of T is D+1 , 2  D+1 depth(T ) resulting in at most leaves. The depth of T is limited by the 2 second condition of the if on line 3 of Algorithm 1. For each recursive call, b is decremented by (D − 1), until b ≤ D − 1. As b is initally set to `, this implies depth(T ) ≤ `/(D − 1), proving the claim. Finally, we argue that at least one member of the set of reduced instances returned by deg-branch is equivalent to the original. Consider a solution F to k-Co-Path Set in the original instance (G, k). Every vertex has at most two incident edges in G[E\F ], and since all candidates are considered at every high-degree vertex, at least one branch correctly keeps all of these edges. 4.2 Treewidth of Reduced Instances Our algorithm deg-branch produces reduced instances with bounded degree; in order to bound their treewidth, we make use of the following result, which originated from Lemma 1 in [8] and was extended in [9]. Lemma 4. For  > 0, there exists n ∈ Z+ s.t. for every graph G with n > n vertices, ! 17 X tw(G) ≤ ci ni + n≥18 + n, i=3 where ni is the number of vertices of degree i in G for i ∈ {3, . . . , 17}, n≥18 is the number of vertices of degree at least 18, and ci is given in Table 2. Moreover, a tree decomposition of the corresponding width can be constructed in polynomial time in n. Since the structure of k-Co-Path Set naturally provides some constraints on the degree sequence of yes-instances, we are able to apply Lemma 4 to our reduced instances to effectively bound treewidth. We first find an upper bound on the number of degree-3 vertices in any yes-instance of k-Co-Path Set. 10 d cd 3 4 5 6 7 8 9 10 0.1667 0.3334 0.4334 0.5112 0.5699 0.6163 0.6538 0.6847 d cd 11 12 13 14 15 16 17 0.7105 0.7325 0.7514 0.7678 0.7822 0.7949 0.8062 Table 2: Numerically obtained constants cd , 3 ≤ d ≤ 17, used in Lemma 4; originally given in Table 6.1 of [9]. Lemma 5. Let ni be the number of vertices of degree i in a graph G for any i ∈ Z+ , and ∆ be the maximum degree of G. If (G, k) is a yes-instance of P∆ k-Co-Path Set, then n3 ≤ 2k − ( i=4 (i − 2)ni ). Proof. Since (G, k) is a yes-instance, removing some set of at most k edges results in a graph of maximum degree 2. For a vertex of degree j ≥ 3, at least j − 2 incident edges must be removed. Thus, n3 + 2n4 + 3n5 + . . . + (∆ − 2)n∆ ≤ 2k (each removed edge counts twice – once for each endpoint). Lemma 6. Let (G, k) be an instance of k-Co-Path Set such that G has n vertices and max degree at most ∆ ∈ {3, . . . , 17}. Then the treewidth of G is bounded by k/3 + n + c, for some constant c and any  > 0. A tree decomposition of the corresponding width can be constructed in polynomial time in n. Proof. Let n be defined as in Lemma 4. Let G0 be the graph formed by adding N = n isolates to G. By Lemma 4, because G0 has maximum degree at most ∆, tw(G0 ) ≤ (1/6)n3 + (1/3)n4 + . . . + c∆ n∆ + (N + n). We can substitute the bound for n3 from Lemma 5, which yields: P∆ 2k − ( i=4 (i − 2)ni ) n4 + + . . . + c∆ n∆ + (N + n) tw(G ) ≤ 6 3 k ≤ + (n + N ). 3 0 Note P∆ that the inequality holds because we can pair the negative terms of ( i=4 (i − 2)ni )/6 with the corresponding terms of n4 /3 + . . . + c∆ n∆ and the value of cj nj − (j − 2)(nj )/6 is non-positive for all j ∈ [4, 17]. Since N = n is a constant, we have tw(G0 ) ≤ k/3 + n + c. Since G ⊆ G0 and treewidth is monotone under subgraph inclusion, this proves the claim. We point out that when applying Lemma 6 to reduced instances, computing the desired tree decomposition is polynomial in k (since they are subgraphs of a 6k-kernel). 4.3 The Algorithm copath This section describes how we combine the above techniques to prove Theorem 1. As shown in Algorithm 2, we start by applying 6k-kernel [7] to find G0 , a kernel of size at most 6k; this process deletes k − k 0 edges. We then guess the number of edges k1 ∈ [0, k 0 ] to remove during branching, and use deg-branch to create a set of reduced instances Qk1 , each of which have k 0 − k1 edges. Note that deg-branch considers all possible reduced instances, and thus if a (cc-)solution 11 exists, it is contained in at least one reduced instance. To ensure the complexity of finding the reduced instances does not dominate the running time, we set the degree bound D of the reduced instances to be 10 (any choice of 10 ≤ D ≤ 17 is valid). By considering all possible values of k1 , we are assured that if (G, k) is a yes-instance, some Qk1 contains a yes-instance. Each reduced instance is then passed to tw-copath, which correctly decides the problem with probability 2/3. Algorithm 2: Deciding k-Co-Path Set 1 2 3 4 5 6 7 Algorithm copath (G,k) (G0 , k 0 ) = 6k-kernel(G, k) for k1 ← 0 to k 0 do Qk1 = deg-branch(G0 , k 0 , k1 , 10, k1 ) foreach (Gi , k2 ) ∈ Qk1 do if tw-copath(Gi , k2 ) then return true return false Proof of Theorem 1. We now analyze the running time of copath, as given in Algorithm 2. By Lemma 3, the size of each Qk1 is O(1.561k1 ). For each reduced instance (Gi , k2 ) in Qk1 , we have tw(Gi ) ≤ k2 /3 + (6k) + c by Lemma 6. Applying Theorem 2, tw-copath runs in time O∗ (4k2 /3+6k ) for each reduced instance (Gi , k2 ) in Qk1 (with success probability at least 2/3). Each iteration of the outer for loop can then be completed in time O∗ (1.561k1 4k2 /3+6k ) = O∗ (4k/3+6k ) = O∗ (1.588k ), where we use that k1 + k2 = k 0 ≤ k, and choose  < 10−5 . Since this loop runs at most k + 1 times, this is also a bound on the overall computational complexity of copath. Additionally copath is linear-fpt, as the kernelization of [7] is O(n), and the kernel has size O(k), avoiding any additional poly(n) complexity from the tw-copath subroutine. Note that by Lemma 4 the tree decomposition can be found in polynomial time in the size of the reduced instance. Since reduced instances are subsets of 6k-kernels, the linearity is unaffected because the graph has size polynomial in k. 5 Conclusion This paper gives an O∗ (4tw ) fpt algorithm for Co-Path Set. By coupling this with kernelization and branching, we derive an O∗ (1.588k ) linear-fpt algorithm for deciding k-Co-Path, significantly improving the previous best-known result of O∗ (2.17k ). We believe that the idea of combining a branching algorithm which guarantees equivalent instances with bounds on the degree sequence from the problem’s constraints can be applied to other problems in order to obtain a bound on the treewidth (allowing treewidth-parameterized approaches to be extended to general graphs). One natural question is whether similar techniques extend to the generalization of Co-Path Set to k-uniform hypergraphs (as treated in Zhang et al. [16]). It is also open whether the combined parameterization asking for a co-path set of size k resulting in ` disjoint paths is solvable in sub-exponential fpt time. 12 Acknowledgements This work supported in part by the Gordon & Betty Moore Foundation under DDD Investigator Award GBMF4560 and the DARPA GRAPHS program under SPAWAR Grant N66001-14-14063. Any opinions, findings, and conclusions or recommendations expressed in this publication are those of the author(s) and do not necessarily reflect the views of DARPA, SSC Pacific, or the Moore Foundation. We thank two anonymous reviewers for providing a simplification of our previous branching algorithm and pointing out the result from [9] enabling us to branch on vertices with degree greater than 7. We also thank Felix Reidl for helpful suggestions on an earlier draft that significantly improved the presentation of the results. References [1] A. Björklund, T. Husfeldt, P. Kaski, and M. Koivisto. Fourier meets Möbius: fast subset convolution. In Proceedings of STOC, pages 67–74, 2007. [2] Z. Chen, G. Lin, and L. Wang. An approximation algorithm for the minimum co-path set problem. Algorithmica, 60(4):969–986, 2011. [3] Y. Cheng, Z. Cai, R. Goebel, G. Lin, and B. Zhu. The radiation hybrid map construction problem: recognition, hardness, and approximation algorithms. Unpublished Manuscript, 2008. [4] D. Cox, M. Burmeister, E. Price, S. Kim, and R. Myers. Radiation hybrid mapping: a somatic cell genetic method for constructing high-resolution maps of mammalian chromosomes. Science, 250:245–50, 1990. [5] M. Cygan, J. Nederlof, M. Pilipczuk, M. Pilipczuk, J. van Rooij, and J. Wojtaszczyk. Solving connectivity problems parameterized by treewidth in single exponential time. In FOCS, pages 150–159. IEEE, 2011. [6] Q. Feng, Q. Zhou, and S. Li. Randomized parameterized algorithms for co-path set problem. In FAW, pages 82–93. Springer, 2014. [7] Q. Feng, Q. Zhou, and J. Wang. Kernelization and randomized parameterized algorithms for co-path set problem. J. Comb. Optim., 2015. in press, DOI 10.1007/s10878-015-9901-y. [8] F. Fomin, S. Gaspers, S. Saurabh, and A. Stepanov. On two techniques of combining branching and treewidth. Algorithmica, 54(2):181–207, April 2009. [9] S. Gaspers. Exponential Time Algorithms - Structures, Measures, and Bounds. VDM, 2010. [10] T. Kloks. Treewidth, Computations and Approximations, volume 842 of LNCS. Springer, 1994. [11] K. Mulmuley, U. Vazirani, and V. Vazirani. Matching is as easy as matrix inversion. In Proceedings of STOC, pages 345–354. ACM, 1987. [12] M. Pilipczuk. Solving connectivity problems parameterized by treewidth in single exponential time. In MFCS, pages 520–531, 2011. [13] C. Richard III, D. Withers, T. Meeker, S. Maurer, G. Evans, R. Myers, and D. Cox. A radiation hybrid map of the proximal long arm of human chromosome 11 containing the multiple endocrine neoplasia type 1 (men-1) and bcl-1 disease loci. Am. J. Hum. Genet., 49(6):1189–1196, 1991. [14] N. Robertson and P. Seymour. Graph minors. II. Algorithmic aspects of tree-width. J. Algorithms, 7(3):309–322, 1986. [15] D. Slonim, L. Kruglyak, L. Stein, and E. Lander. Building human genome maps with radiation hybrids. J. Comp. Biol., 4(4):487–504, 1997. [16] C. Zhang, H. Jiang, and B. Zhu. Radiation hybrid map construction problem parameterized. Journal of Combinatorial Optimization, 27(1):3–13, 2014. 13
8cs.DS
A Partial-Order Approach to Array Content Analysis arXiv:1408.1754v1 [cs.PL] 8 Aug 2014 Graeme Gange1 , Jorge A. Navas2 , Peter Schachte1 , Harald Søndergaard1, and Peter J. Stuckey1 1 2 Department of Computing and Information Systems, The University of Melbourne, Victoria 3010, Australia {gkgange,schachte,harald,pstuckey}@unimelb.edu.au NASA Ames Research Center, Moffett Field, CA 94035, USA [email protected] Abstract. We present a parametric abstract domain for array content analysis. The method maintains invariants for contiguous regions of the array, similar to the methods of Gopan, Reps and Sagiv, and of Halbwachs and Péron. However, it introduces a novel concept of an array content graph, avoiding the need for an up-front factorial partitioning step. The resulting analysis can be used with arbitrary numeric relational abstract domains; we evaluate the domain on a range of array manipulating program fragments. 1 Introduction Most imperative programming languages offer mutable arrays. However, owing to the indirect relation between storage and retrieval, arrays are not particularly amenable to static analysis. While analysis of array bounds (e.g, [15,16,2]) is well studied, only recently has there been real progress in analyzing array content. Early approaches involved array smashing [1], where an entire array was treated as a single symbolic variable. This used the concept of weak updates: transfer functions for array assignment that can only weaken the previous abstract state. Weak updates generally lead to a rapid loss of precision when different segments of an array have different properties. A significant improvement was Gopan, Reps and Sagiv’s use of array partitioning [7] to split arrays into symbolic intervals, or segments. Partitioning is facilitated by an initial analysis of the array index expressions to determine the relative order of the indices they denote. A key idea is to distinguish segments that represent single array cells from those that represent multiple cells. This permits strong updates on the singleton segments. The array partitioning method selects a small set of partition variables, maintaining disjunctive information about properties which hold over all feasible total orderings of the partition variables. Halbwachs and Péron [9] extended the i1 := 0 ; . . . ; im := 0 approach to support relational content dox := ‹ mains and a limited form of quantified inwhile(i1 ă n ^ . . . ^ im ă n) variants. The resulting method is precise, p := ‹ but has its own drawbacks. First, it reif (p ă 0) quires an initial segmentation phase, where Ari1 s := x ` 1 the set of partition variables is identified; i1 := i1 ` 1 and as this phase is purely syntactic, it is else if (p ă 1) possible for variables to be omitted which Ari2 s := x ` 2 are critical to the invariant. Second, there i2 := i2 ` 1 are exponentially many possible total or... derings of the partition variables; if many else partition variables are identified, the analyArim s := x ` m sis may become prohibitively expensive. For im := im ` 1 example, on the init randm family of programs shown in Figure 1, the number of partitions at the loop head follows the progres- Fig. 1: The init randm family of sion r6, 30, 222, 2190, 27006s as m increases program fragments. from 1 to 5 (this is discussed in more detail in Appendix C). Finally, the analysis does not support arbitrary manipulation of index variables; indices may only be incremented and decremented. Cousot et al. [3] instead maintain a single partitioning of the array, selecting a consistent totally ordered subset from a scalar variable analysis. This does not require a separate segmentation phase, saving considerable overhead; however, as it considers only a single consistent ordering (and supports only value domains) the invariants it derives are quite weak. Consider init rand2 , with x fixed to 0—so each element in r0, nq will be assigned either 1 or 2. In this case, the relationship between i1 and i2 is not known, so we must select either 0 ď i1 ă n or 0 ď i2 ă n. In either case, the desired invariant at the loop exit is lost. An alternative approach to expressing array properties is to lift an abstract domain to quantified invariants [8]. This technique is quite general but there are two major limitations. First, it requires from the user the specification of templates to describe when quantifiers are introduced. Second, it is expensive, owing to the computation of under-approximations. For example, to join the formulas @U pG ñ eq and @U pG1 ñ e1 q, we must compute an under-approximation of G \ G1 , since G and G1 are in negative positions, and this is prohibitively expensive for many domains. Dillig et al. [6] replace strong and weak updates with fluid updates. Their method is a points-to and value analysis, so not relational in our sense. It builds a points-to graph where nodes represent abstract locations that include arrays qualified by index variables. Edges represent constraints on index variables that identify which concrete elements in the source location point to which concrete location in the target. A fluid update removes the dichotomy between strong and weak updates by computing first a constraint ϕ representing the elements that 2 are modified by the update. Then it adds a new points-to edge with ϕ (strong update) while adding the negation of ϕ to existing edges from the source (weak update). As ϕ is an over-approximation, its negation is an under-approximation and thus it would be unsound to add it directly to other edges. Instead the analysis produces bracketing constraints which are pairs of over- and underapproximations so that negation can be done in a sound manner. This analysis is very expressive, avoiding the large number of explicit partitions fixed a priori in [7,9]. However, the method can still be very expensive since whenever an array is accessed, the points-to edges must be modified by adding possibly disjunctive formulas. We propose a new approach to array content analysis. We extend any existing scalar domain by introducing a pseudo-variable to refer to segments of each array, selecting index expressions as nodes in a graph, and annotating the graph edges with the properties that hold in the segments of the arrays between those index expressions. These array content graphs offer greater flexibility than other approaches, as they allow us to reason about properties that hold over contiguous array segments without committing to a single total ordering on index expressions, while still taking advantage of available partial ordering information. The result is an array content analysis which is fully automatic, can be used with arbitrary domains, and does not incur the up-front factorial cost of previous methods [7,9]. In particular, it can be used for relational analyses, and accounts for the possibility of array elements being related to array indices. We base our presentation on a small control flow graph language. Instructions Array assignments Jumps Blocks Programs I A J B P Ñ Ñ Ñ Ñ Ñ v1 “ constant | v1 “ ˝ v2 | v1 “ v2 ˛ v3 | A v1 “ arrrv2 s | arrrv1 s “ v2 if pv1 ’ v2 q label 1 label 2 | br label | error | end label : I* J B` Each basic block is a (possibly empty) sequence of instructions, ending in a (possibly conditional) jump. Arithmetic unary and binary operators are denoted by ˝ and ˛ respectively, and comparison operators by ’. We assume that there is a fixed set of arrays tA1 , . . . , Ak u, which have global scope (and do not overlap in memory). The semantics is conventional and not discussed here. Figure 2 shows an example program in diagrammatic form. Our analysis assumes an abstract domain L “ xL, Ď, K, J, \, [y for analysis over the array-free fragment of the language (obtained by leaving out A) (scalar analysis). We use this parametric domain to construct the array content analysis. The remainder of this paper is structured as follows. Section 2 introduces the method and its underlying ideas. Section 3 discusses computational details and efficiency. The method has been evaluated experimentally; Section 4 gives a report and Section 5 concludes, suggesting further work. 3 2 A Graph-Based Array Content Domain We let V and A be sets of scalar and array variables, respectively. A state in the concrete domain is a pair xσ, ρy, where σ : V ÞÑ Z maps scalar variables to integer values, and ρ : A Ñ Z Ñ Z maps array cells to values.3 Let VA denote the set of variables, and CA the set of constants, which may act as segment bounds. We use an extended set of variables head : V 1 “ VA Y CA Y tv ` | v P VA Y CA u. The i“0 pseudo-variable v ` represents the value v ` 1. br guard This allows us to talk about properties that apply to single array cells. The constant vertices are often needed; because array properguard : ties often hold over ranges bounded by a conif pi ă N q body tail stant on one side, and array processing code often initializes a fixed set of indices before body : processing the rest of the array, it is not suffitail : v “ Aris cient to consider only those variables and conend Bris “ v stants used directly as indices. Consider the i“i`1 copy program shown in Figure 2. In this case br guard neither 0 nor N is ever used directly as an index, but both define boundary conditions of i, and are needed for the invariant of interest. Fig. 2: Copying array A to B In practice, however, VA is often considerably smaller than V . We wish to relate the value of elements in an array segment to variables in the scalar domain. A state in the abstract domain has the form xϕ, Ψ y, where ϕ expresses scalar properties and Ψ expresses array content properties. For each array A P A, we allocate a corresponding variable a, a segment variable, which occurs only in Ψ , never in ϕ. Relations between scalar and segment variables are captured in Ψ . We use U “ ta, b, . . .u to denote the set of segment variables. Sometimes, we may wish to relate the values in an array segment to the corresponding index, for example, to prove that Aris “ x ` i across a segment. To support this, we introduce a variable idx to represent the index of a given read. We use UI “ tidxu Y U to denote the augmented set of segment variables. The analyses of the scalar domain and array contents are based on the same lattice L. We represent the program state as a pair of the scalar properties ϕ and the |V 1 | ˆ |V 1 | matrix Ψ of array properties such that ψij denotes the properties which hold for all indices in the interval ri, jq. In a slight abuse of notation, we use ψpℓq to denote the formula ψ with each symbolic array variable a replaced with the corresponding array element Arℓs. That is: ψpℓq ” ψta ÞÑ Arℓs | A P Au 3 For simplicity we assume arrays elements are integers. The extension to arbitrary types (that may include integers) is not difficult, as the complexity of array elements acting as indices is present in what we consider. 4 J J ϕ“0ďiăN Ψ“ 0 i i` N 0 i i` Ka“b J K K a“v K K K K K K N J J J K a“b 0 a“v i J ` i N i` N J a“b 0 a“v i Fig. 3: Array content graph after assignment v “ Aris in Figure 2. Vertices and matrix entries corresponding to 0` and N ` are omitted. Then the reading of an edge pi, ψij , jq is: @ i ď ℓ ă j . ψij pℓq. Given some numeric abstract domain L, a set of arrays A and scalar variables V , the array content domain CL pA, V 1 q is a pair xϕ, Ψ y, where ϕ is a value in L, and Ψ is a |V 1 | ˆ |V 1 | matrix of L-values. Assume we have a function evalA which constructs a new state which treats the ℓth element of each array as a scalar variable: evalA pσ, ρ, ℓq “ σ Y ta ÞÑ ρpAqpℓq | A P Au The concretization function γ is then defined on the components in terms of the concretization function γL of the scalar domain L: γpxϕ, Ψ yq “ txσ, ρy | σ P γL pϕqu X γA pΨ q č γA pΨ q “ txσ, ρy | @σpiqďℓăσpjq evalA pσ, ρ, ℓq P γL pψij qu i,jPV 1 Notice that there are no constraints on ρ in the first equation; ρ can be any array variable assignment of type A Ñ Z Ñ Z. As any value in the content domain CL pA, V 1 q is the Cartesian product of a fixed set of elements of L, CL pA, V 1 q also forms a lattice, and possesses all the corresponding fixed point properties. For each edge ψij , we can assume the corresponding interval is non-empty; that is, rri ă jss P ψij . Note that the edge from i to i` has no such constraint, since i ă i`1 is always true. Since the interval ri`1, iq is clearly empty, ψi` i “ K. Given the state representation, we can take the join of two abstract states by a piecewise application of the join from L: fi » 1 2 1 2 + * . . . ψ1n \ ψ1n ψ11 \ ψ11 ffi . . 1 1 2 2 1 2 — . .. .. .. xϕ , Ψ y \xϕ , Ψ y “ ϕ \ ϕ , – fl 1 2 1 2 ψn1 \ ψn1 . . . ψnn \ ψnn We can compute the meet [ analogously. To see how the analysis works, consider again the program in Figure 2. Figure 3 shows the abstract state immediately after executing v “ Aris. The array content information is given by the matrix 5 Ψ of array properties. The array content graph shown upper right is really just a way of visualizing the matrix. Note that infeasible edges, those labelled K, are omitted. In fact, we shall usually show only the “transitive reduction” of the array content graph, so that an edge ik whose value is given by ψik “ Ű j pψij \ ψjk q is omitted. We depict edges representing J without a label. This leads to the shorthand graph in Figure 3’s lower right. 2.1 Normalization of Abstract States Given a set C of constraints of the form e P ri, jq ñ ψij , we wish to normalize the state by computing the strongest consequences of C, still in that form. The critical observation is this: @x, y . x ă y |ù @z.px ă zq _ pz ă yq. That is, any property that holds over both rx, zq and rz, yq must also hold over the range rx, yq. To compute the strongest consequences, then, we must compute the greatest fixed point of a rewrite system derived from the set of inequalities: @i, j, k . ψij Ď ψik \ ψkj . It is tempting to try to compute the fixed point using the obhead : vious rewrite system: x “ Ar0s i“1 br guard @i, j, k . ψij “ ψij [pψik \ ψkj q But, as we shall see, this formulation does not guarantee termination for all useful domains. Mohri [12] describes the algebraic shortest path problem, where the operations p[, \q form a semiring in the domain of edge weights. This is very close to what we need, as every distributive lattice forms a bounded semiring. But “numeric” domains used in static analysis generally fail to be distributive, so we cannot use Mohri’s framework directly. guard : if pi ă N q body tail body : v “ Aris if pv ą xq update step step : i“i`1 br guard update : x“v br step tail : end Fig. 4: Find maximum value in array A Example 1. Consider the array-maximum program from Figure 4. Figure 5(1) shows the program state just after v “ Aris is executed (scalar constraints on the left and array constraints on the right). On the branch with v ď x, we simply add the constraint to the scalar domain, resulting in (2a). If v ą x, we add the constraint to the scalar domain (2b), then update x with v, resulting in (2b1 ). Observe that, in both cases, we can only discover the relationship between a and x indirectly via v. If we do not push scalar relations into the edge properties, the underlined invariants are lost. The final result is shown at (3). If the statement x = v in update was instead replaced by x = Aris, we would first have to lift the invariant x “ v from the singleton property ψii` to the 6 (1) aďx 0ďiďN a“v 0 0ďiďN (2a) vďx (2b) (2b1 ) 0ďiďN xăv 0ďiďN x“v 0 i a ď x, a ă v 0 i` N i` N a“v i a ă v, a ă x a “ v, a “ x 0 i aďx i` N a “ v, a ď x 0 0ďiďN x“v N a “ v, a ď x aďx (3) 0 ď i ď N (2b: ) i` i i i` N a ă x, a ă v a “ v, a “ x 0 i i` N Fig. 5: Array maximum example scalar domain. We then push this property into the segment ψ0i , allowing us to derive a ă x. The state in Figure 5(2b: ) shows the program state if x “ v were to be replaced with x “ Aris. This illustrates that it is not sufficient to simply compute the transitive closure of Ψ ; we must also lift properties from Ψ out to the scalar domain. For a fully reduced state xϕ, Ψ y, the following properties must be satisfied for all i, j, k: 1. The graph of segments must be internally consistent: ψij Ď ψik \ ψkj 2. Segment properties are consistent with the scalar domain: ψij Ď ϕ [rri ă jss 3. For each non-empty segment, the scalar domain must be consistent with the scalar properties of that segment: ϕ |ù i ă j ñ ϕ Ď DUI . ψij Notice that we only propagate constraints to the scalar component from segments that are known to be non-empty. If we tried to propagate information from all segments, we would incorrectly derive K as soon as any segment was determined to be empty. One solution is to simply apply the three rules until a fixed point is reached. This is guaranteed to compute the fully reduced state. However, while this direct construction is conceptually clean, it suffers from some pragmatic issues relating to both termination and efficiency, as we shall see. 2.2 Termination The normalization process is not guaranteed to terminate for arbitrary lattices. Example 2. Assume the analysis uses convex polyhedra. Consider the state in Figure 6(a). Any fixed point will satisfy the properties A Ď B \ C and B Ď A \ C. 7 A 0 i A B C B j C (a) (b) Fig. 6: At a fixed point, we have A Ď B \ C and B Ď A \ C. The regions A and B will be progressively reduced, indefinitely. Let A, B and C be the gray regions shown in Figure 6(b)—the intention is that A shares a line segment with C, as does B. Assume we start by exploiting B Ď A \ C. We compute A \ C, yielding the polygon given by the topmost dashed line. This allows us to trim the top portion of B. We then compute B \ C, and trim the top-left region of A. However, now A has changed, so we re-compute A \ C and again reduce B. This process asymptotically approaches the greatest fixed point A “ A [ C, B “ B [ C. If we modify the equations in Example 2 slightly, to A ĎpA [ Bq \pA [ Cq (still a valid approximation of the concrete state), convergence is immediate. The fixed point process will clearly terminate for the interval domain, as the possible interval end-points are drawn from the initial set. We can also show that it is guaranteed to terminate for both octagons [11] and convex polyhedra [4]; proofs are given in Appendix A. Unfortunately, we do not yet have a more general characterisation of the lattices for which termination is (or is not) guaranteed. 2.3 Abstract Transfer Functions In this section, we describe the abstract transfer functions necessary to perform array content analysis on the language described in Section 1. Variable assignment. The effect of a scalar assignment x “ f on an abstract state follows the behaviour of the underlying domain L. We first project out the previous value of x (assuming x does not occur in f ) then introduce the new constraint into the scalar domain. However, when we project x from our scalar domain, we must also update all incoming and outgoing edges of x (and x` ). This becomes: xϕ, Ψ yrrx “ fss “ xϕrrx “ fss, Ψ 1 y where Ψ 1 is given by, for all p, q: " J if p P tx, x` u _ q P tx, x` u 1 ψpq “ Dx . ψpq otherwise The assumption that f is free of x is not always well founded; however, we can always transform the program so that it is the case: x “ f ñ xt “ x; x “ frx{xts. 8 0 (b) a“b“v a“b (a) i b i 0a “ b i` it a “ b “ v it 0a “ ` i` it a “ b “ v it N it a “ b “ v it ` b i` N it a “ b “ v it ` a“b (f) 0 N b b a“ i (e) N i (c) 0a “ N a“b“v b a“ 0a “ i` i` i (d) i i` N ` Fig. 7: Array content graph during analysis of the program given in Figure 2, while executing i “ i ` 1. The dashed edges indicate equality (in reality they represent two edges each labelled K). Example 3. Consider the array-copy program given in Figure 2, immediately before the assignment i “ i ` 1. The state is shown in Figure 7 (a). We must first introduce a new variable it to hold the prior value of i, transforming i “ i ` 1 to it “ i; i “ it ` 1. The normalized graph after the it “ i statement is shown in Figure 7 (b). To handle the i “ it ` 1 statement we must eliminate the annotations on edges corresponding to i and i` , resulting in state (c). Note that the edge ψ0it ` , omitted from the diagram, has annotation a “ b. State (d) completes the handling of the i “ it ` 1 statement, introducing the new value of i into the scalar domain. The scalar domain discovers that it ` “ i (the dashed edge). When normalizing state (d), ψit ` i “ K, so the rule ψ0i Ď ψ0it ` \ ψit ` i results in ψ0i becoming a “ b, the desired invariant (e), which after projecting out it and i` t gives (f). Array reads. An array read x “ Aris is relatively simple. As for standard variable assignment, we must existentially quantify the variable x. But instead of introducing a relation into the scalar domain, we add the constraint x “ a to the singleton segment ψii` . This transfer function may be formulated as xϕ, Ψ yrrx “ Arisss “ xDx.ϕ, Ψ 1 y where Ψ 1 is given by, for all p, q: " ψpq rra “ xss if p “ i, q “ i` 1 ψpq “ Dx . ψpq otherwise Normalization handles the consequences for the scalar part. Array writes. When we store a value into an array at index i, we update the corresponding edge property ψii` . However, this is not sufficient, as the singleton 9 a“ S a“0 0 ` a“ i i a“0 a“0 0 0 j N a“0 0 i i` j N 0 0 K a“ SrrAris “ 1ss 0 a“1 i ... 0 i` ... a“ 0 j N i K i` K j K N K a “ 0\a “ 1 0 i i` j N Ka“0a“0a“0 J K K a“0a“0 J K K K a“0 J K K K K J K K K K K ` ˛¨ j ˛N ¨ i a“0 a“0 a “ 0 ˝ \ ‚˝ \ ‚ J a “ 1 ¨a “ 1˛ a“0 K a “ 1 ˝ \ ‚J a“1 K K a“0 J K K K J K K K K i Fig. 8: In state S, we know that all elements between 0 and j have been initialized to 0. When we evaluate Aris “ 1, we update the edge ψii` . However, i may also be covered by the edge ψ0j . For these potentially overlapping edges, we must perform a weak update, taking the join of the previous value with the new. i may be covered by other edges. As with previous analyses, we distinguish between strong updates where all elements in a (generally, singleton) segment are updated with a given property, and weak updates [1] where some elements of a segment may be updated. An edge ψpq must be updated if p ď i ď q ^ p ă q is possible in the current state. This is possible if and only if the edges ψpi` and ψiq are both feasible. Consider the array state illustrated in Figure 8, where 0 ď i ď j ď N and the first j elements have been initialized to 0. When we store 1 at Aris, we update the singleton ψii` with the property a “ 1. However, there are other segments that may contain Aris. The segments ψ0i` , ψij and ψ0j are all consistent with index i. In this case, they must all be weakly updated (annotations on ψ0i` and ψij have been omitted; they are identical to the annotation on ψ0j ). We can formulate this as xϕ, Ψ yrrAris “ fss “ xϕ, Ψ 1 y, where Ψ 1 is given by, for all p, q: 1 ψpq $ & ψpq rra “ fss if p “ i, q “ i` ψpq if ϕ |ù pp ą i _ q ă i` q “ % ψpq \ ψpq rra “ fss otherwise Notice that if we have some other variable j such that ϕ |ù i “ j, we will initially perform only a weak update of the segment ψjj ` . However, the normalization procedure will then enforce consistency between ψii` and ψjj ` . 10 3 Improving Efficiency through Relaxation When computing the strongest matrix entries, we perform a substantial amount of redundant work. We include all constraints ϕ from the scalar domain in each matrix entry ψij , and these constraints will be processed during each step in the shortest-path computation. This is not ideal, as many are irrelevant to the content properties, and abstract domain operations are often proportional to the number of constraints. Hence we want to construct some relaxation ψ:ij of ψij that discards irrelevant scalar properties. We shall use d to denote this relaxation operation (that is, ψ:ij “ ϕ d ψij ). At a minimum, it must satisfy: ψij Ď ϕ [ ψ:ij “ ϕ [pϕ d ψij q We want to make ϕ [ ψ:ij as close to ψij as possible, while keeping the representation of ψ:ij concise. This is very similar to the process of constraint abduction [10]. However, even with a relaxation Ψ: such that ϕ [ ψ:ij ” ψij , we may still lose relevant information. Example 4. Consider a program state (using the domain of octagons) with scalar property ϕ “ rrx ă yss, and segment properties ψik “ ϕ [rri ă k ^ x ă ass, ψkj “ ϕ [rrk ă j ^ y “ ass. Computing the value of ψij gives the expected ψij “ ϕ [rri ă j ^ x ă ass. However, although the relaxations ψ:ik “ rri ă k ^ x ă ass and ψ:kj “ rrk ă j ^ y “ ass are exact, computing ψij as before yields: rri ă j ^ i ă k ^ x ă ass \rri ă j ^ k ă j ^ y “ ass “ rri ă jss We could avoid this loss of information by conjoining the scalar part during each step of the fixed point computation ψ:ij Ď ϕ d ppϕ [ ψ:ij [ ψ:ik q \pϕ [ ψ:ij [ ψ:kj qq but while this avoids the loss of information, it also defeats the original goal of reducing computation cost. Instead we define a more conservative d operation which maintains enough additional information to retain properties of interest. Example 5. Consider again the analysis that was performed in Example 4, but now with a modified d operation which gives us ψ:ik “ rri ă k ^ x ă ass and ψ:kj “ rrk ă j ^ y “ a ^ x ă ass. In this case, when we compute ψ:ij , we get: ψ:ij “ rri ă j ^i ă k ^x ă ass \rri ă j ^k ă j ^y “ a^x ă ass “ rri ă j ^x ă ass. This maintains the property of interest, without repeatedly conjoining with ϕ during the fixed point process. Another observation from Examples 4 and 5 is that while the boundary constraints for each edge (such as rri ă jss for ψij ) are not implied by ϕ, they are typically irrelevant to the segment properties, unless: 11 rri ă nss rri ă nss n i J i K i` rri ă n K nss i` Fig. 9: Solving this set of constraints, we strengthen ψii` and derive rri ă nss. If we use d, we have ψ:in “ J, so we fail to strengthen ψ:ii` . – ϕ [rri ă jss “ K, in which case the edge must be empty, or – the array content Arℓs is some function of the index ℓ – ψji` “ K (or j “ k ` for some k, and ψki “ K) This is particularly troublesome for domains that explicitly store the transitive closure of constraints, as we then expend substantial computation maintaining consequences of rri ă jss, which are largely irrelevant, and lost during the join. If we choose an operator d which discards the consequences of edge boundaries, we must take particular care not to lose information in the third case mentioned. Consider the state shown in Figure 9, where the edge from n to i` is infeasible. Computing the original fixed point, we obtain rri ă nss at ψii` , which is then lifted out to the scalar domain. However, rri ă nss is obviously implied by ϕ [rri ă nss, so will typically be discarded by d. The property rri ă nss is not obtained at ψii` , so is never lifted out to the scalar domain. We must, therefore, add the following case to the normalization rules given in Section 2.1: 4. ϕ Ďrri ě jss if ψi,j “ K This ensures that any scalar properties resulting from infeasible segments are included in the scalar domain. Further, since many elements of Ψ: may be J, the relaxation operator allows us to take advantage of sparse matrix representations. Unfortunately we are not aware of any existing, general operations suitable for computing Ψ: ; as they must consider both underlying lattice and the characteristics of the implementation. We complete this section by outlining suitable relaxation operators for difference-bound matrices (DBMs) [5] (and octagons). Relaxations for polyhedra can be found in the appendix, and it should not be particularly difficult to define analogous operators for alternative domains. A value in the DBM (or octagon) domain consists of a set of constraints rrvi ´ vj ď kss (or rr˘vi ˘ vj ď kss for octagon). We can construct a relaxation ‹ of ψij by computing the transitive closure ψij , and discarding any constraints implied by ϕ [rri ă jss: ‹ ϕ d ψij “ tc | c P ψij , ϕ [rri ă jss & cu If the abstract states are stored in closed form, we can simply collect the constraints of ψij not appearing in ϕ [rri ă jss. Or we can avoid performing many implication tests by instead collecting the constraints involving variables in U . 12 4 Experimental Evaluation We have implemented the analysis in sparcolyzer, a prototype array content analyser for the language described in Section 1. sparcolyzer is implemented in ocaml, using the Fixpoint library4 . For the underlying domain, we implemented the DBM domain in C++, customized for operating on sparse graphs. Experiments were performed on a 3.0GHz Core 2 Duo with 4Gb ram running Ubuntu Linux 12.04. The set VA of segment bounds were pre-computed using a simple data-flow analysis to collect all variables which may (possibly indirectly) be involved in the computation of an array index. We tested sparcolyzer on a number of array manipulation program fragments. Most of these were taken from Halbwachs and Péron [9]. We added several additional fragments that illustrate interesting properties of the analysis, including members of the init rand family discussed in Section 1 (Figure 1). Computation time for each instance is given in Table 1. For instances taken from [9], we include the original reported runtimes, although these are not directly comparable, as the experiments in [9] were performed on a slower machine (Core2 Duo 1.6 GHz, with 2MB of RAM) using the domain of difference bound matrices with disequalities (dDBM) [13].5 The implementation from [9] has not been available and we have not tried to reconstruct it. Table 1 compares the runtimes of two variants of our content domain to the approach of Halbwachs and Péron [9] (the hp08 column). The naive variant uses the direct implementation, where the matrix is represented as a |V 1 | ˆ |V 1 | array, and a copy of the scalar domain is stored in each matrix entry. The sparse variant stores, for each row and column, a set of non-J entries so that the normalization, \ and [ operations do not need to process entries that will definitely remain J, and computes the fixed point on the relaxed matrix Ψ: , rather than directly on Ψ . sparse uses the simple relaxation step of discarding all constraints not involving some array variable A P U . Note that sparse still iterates over all |V 1 | ˆ |V 1 | elements when changes to the scalar domain occur, as a change to the scalar domain may affect any matrix element. In cases where there are very few partitions—either because there are very few index variables, or they are highly constrained—we expect the partitionbased methods to be faster (as they do not need to compute closure over transitive edges). The performance of naive is comparable to that of [9] on instances with few partitions, and it improves substantially on more complex instances. sparse is faster yet, sometimes by several orders of magnitude, and still finds the desired invariant in all but two cases. It is interesting to compare the behaviour of sentinel and first nonnull. These programs superficially appear quite similar; in both cases, we set up an ‘end-of-array’ marker, then scan the array to find a particular element. However, the invariants necessary to prove the desired properties are quite different. In 4 5 http://pop-art.inrialpes.fr/people/bjeannet/bjeannet-forge/fixpoint/ Performance of the domains should be roughly equivalent, as in the absence of explicit disequalities, dDBM behaves identically to DBM. 13 program init init offset init rand2 init rand3 init rand4 init rand5 arraymax copy partition hoare partition hp08 sentinel first nonnull naive 0.11 0.28 2.48 9.59 31.14 80.58 0.13 0.13 1.51 3.50 0.14 0.60: sparse 0.02 0.07 0.14 0.64 1.98 4.96 ă0.01 ă0.01 0.06 0.14: ă0.01 0.01: hp08 [9] 0.05 0.10 0.02 22.87 0.21 2.25 Table 1: Analysis times in seconds. Instances where we were unable to prove the desired invariant are marked with :. x := Ar0s i := 1 j := n ´ 1 while(i ď j) if (Aris ă x) Ari ´ 1s := Aris i := i ` 1 else while(j ě i ^ Arjs ě x) j := j ´ 1 (‹) if (j ą i) Ari ´ 1s := Arjs Arjs := Aris i := i ` 1 j := j ´ 1 Ari ´ 1s := x x := Ar0s i := 0 j := n ´ 1 while(i ď j) while(Aris ď x ^ i ď j) i := i ` 1 while(Arjs ą x ^ i ď j) j := j ´ 1 if (i ď j) t := Arjs Arjs := Aris Aris := t (a) partition hp08 (b) partition hoare Fig. 10: Quicksort partitioning: (a) as done in [9]; and (b) a la Hoare the case of first nonnull, we require: ps “ n ^ @e P r0, nq . Ares ‰ 0q _ ps ă n ^ Arss “ 0 ^ @e P r0, sq . Ares ‰ 0q This can be expressed using the approaches of Gopan et al. and Halbwachs and Péron [7,9], as they store a separate invariant for each total ordering amongst the partition variables. Our approach, however, cannot handle such disjunctive reasoning, so the segment property quickly reaches J. Consider partition hp08 (the variant of the Quicksort partition step given in [9], shown in Figure 10(a)). As the imperative source language we use does 14 allow loads inside conditionals, such reads are hoisted outside the corresponding loops; for example, the loop marked p‹q is transformed as shown below. At the point marked p‹q, it is possible to determine that rrj ă iss ñ rrArjs ă xss. Thus it is easy to show that rrArjs ă xss holds at the loop exit. In ej := Arjs the hoisted version, naive method can prove the while(j ě i ^ ej ě x) invariant successfully, because the property rrj ă j := j ´ 1 iss ñ rrej ă xss is derived for the edge ψji . When ej := Arjs we exit the loop with rrj ă iss, this property gets extracted to the scalar domain, and we get rrej ă xss ^ rrej “ ass at ψjj 1 . When using the sparse method, however, the property on ψji is discarded, as it involves only scalar variables, so the invariant is lost. If we were to use the original version without hoisting, we would be unable to prove the invariant using either method, as we cannot express rrj ă iss ñ rrArjs ă xss directly. However, our method easily proves the standard version (partition hoare; Figure 10(b)) correct, whether or not the reads are hoisted. 5 Conclusion and Future Work We have described a new approach to automatic discovery of array properties, inspired by algebraic shortest-path algorithms. This approach retains much of the expressiveness of the partitioning methods of [7] and [9], but avoids the need for syntax dependence and an up-front factorial partitioning step. The method can successfully derive invariants for a range of interesting array program fragments, and is substantially faster than partitioning-based approaches with even modest numbers of index variables. Several improvements could be made to the performance of the analysis. The current implementation does not take advantage of liveness information, and maintains entries in the content graph for all variables in VA at each step. Clearly, performance could be improved by eliminating non-live variables from the matrix. Algorithms which maintain shortest path information can often be improved by storing only the transitive reduction of the graph. As our domains are not distributive, it is non-trivial to determine whether a given edge must occur in the transitive reduction; however, it would be worth investigating whether maintaining the transitive reduction would prove beneficial. References 1. B. Blanchet, P. Cousot, R. Cousot, J. Feret, L. Mauborgne, A. Miné, D. Monniaux, and X. Rival. Design and implementation of a special-purpose static program analyzer for safety-critical real-time embedded software. In T. Mogensen, D. Schmidt, and I. H. Sudborough, editors, The Essence of Computation: Complexity, Analysis, Transformation, volume 2566 of LNCS, pages 85–108. Springer, 2002. 15 2. R. Bodı́k, R. Gupta, and V. Sarkar. ABCD: Eliminating array bounds checks on demand. In ACM Symposium on Programming Language Design and Implementation (PLDI’00), pages 321–333. ACM Press, 2000. 3. P. Cousot, R. Cousot, and F. Logozzo. A parametric segmentation functor for fully automatic and scalable array content analysis. In Proceedings of the 38th ACM Symposium on Principles of Programming Languages, pages 105–118. ACM Press, 2011. 4. P. Cousot and N. Halbwachs. Automatic discovery of linear constraints among variables of a program. In Proceedings of the Fifth ACM Symposium on Principles of Programming Languages, pages 84–97. ACM Press, 1978. 5. D. L. Dill. Timing assumptions and verification of finite-state concurrent systems. In Automatic Verification Methods for Finite State Systems, volume 407 of LNCS, pages 179–212. Springer, 1989. 6. I. Dillig, T. Dillig, and A. Aiken. Fluid updates: Beyond strong vs. weak updates. In A. D. Gordon, editor, Proceedings of the 19th European Symposium on Programming, volume 6012 of LNCS, pages 246–266. Springer, 2010. 7. D. Gopan, T. Reps, and M. Sagiv. A framework for numeric analysis of array operations. In Proceedings of the 32nd ACM Symposium on Principles of Programming Languages, pages 338–350. ACM Press, 2005. 8. S. Gulwani, B. McCloskey, and A. Tiwari. Lifting abstract interpreters to quantified logical domains. In Proceedings of the 35th ACM Symposium on Principles of Programming Languages, pages 235–246. ACM Press, 2008. 9. N. Halbwachs and M. Péron. Discovering properties about arrays in simple programs. In ACM Symposium on Programming Language Design and Implementation (PLDI’08), pages 339–348. ACM Press, 2008. 10. M. J. Maher. Herbrand constraint abduction. In Proceedings of the 20th IEEE Symposium on Logic in Computer Science, pages 397–406. IEEE Comp. Soc., 2005. 11. A. Miné. The octagon abstract domain. Higher-Order and Symbolic Computation, 19(1):31–100, 2006. 12. M. Mohri. Semiring frameworks and algorithms for shortest-distance problems. Journal of Automata, Languages and Combinatorics, 7(3):321–350, 2002. 13. M. Péron and N. Halbwachs. An abstract domain extending difference-bound matrices with disequality constraints. In B. Cook and A. Podelski, editors, Verification, Model Checking and Abstract Interpretation, volume 4349 of LNCS, pages 268–282. Springer, 2007. 14. A. Schrijver. Theory of Linear and Integer Programming. Wiley, 1986. 15. N. Suzuki and K. Ishihata. Implementation of an array bound checker. In Proceedings of the Fourth ACM Symposium on Principles of Programming Languages, pages 132–143. ACM Press, 1977. 16. H. Xi and F. Pfenning. Eliminating array bound checking through dependent types. In ACM Symposium on Programming Language Design and Implementation (PLDI’98), pages 249–257. ACM Press, 1998. 16 Appendix A: Termination Proofs Theorem 1. The shortest-path computation terminates for the octagon domain. Proof. Consider an initial set of abstract states X “ rx1 , . . . , xn s, and a system of inequalities of the form xi Ďpxi [ xj q \pxi [ xk q. Let BPpxq denote the bounding hyperplanes of x. We then have: BPppx [ yq \px [ zqq Ď BPpx [ yq Y BPpx [ zq. Each time one Ű 1 is evaluated, each bounding hyperplane is an Ť of the equations BPp X q As the initial set of bounding hyperplanes is element of: 1 X ĎX finite, and each iteration must tighten at least one bounding plane, the tightening process must eventually Ť terminate; in fact, the number of descending steps is \ [ bounded by: |X| ˆ | xPX BPpxq| In the case of octagons, projection cannot introduce new bounding hyperplanes, so the addition of the propagation rules (ϕ Ď D UI . ϕii` and ϕij Ď ψ) does not affect termination. Theorem 2. The shortest-path computation terminates for the convex polyhedron domain. Proof. We can prove termination for convex polyhedra in a similar fashion as for octagons. Consider an initial set of abstract states X “ rx1 , . . . , xn s, and a system of inequalities of the form xi Ďpxi [ xj q \pxi [ xk q. By the polyhedron decomposition theorem (see, e.g. [14]), any polyhedron may be generated by a finite set of points P , and a set of rays R. Let RV denote the set of rays of unit length in the direction of variable v (that is, a vector with v th component 1 or ´1, and all other components 0), for each v P V . Given polyhedra x “ xPx , Rx y and y “ xPy , Ry y, the results of the operations of interest have the following properties: x [ y “ xP 1 , R1 y where R1 Ď Rx Y Ry x \ y “ xP 1 , R1 y where P 1 Ď Px Y Py , R1 Ď Rx Y Ry D V . x “ xP 1 , R1 y where P 1 Ď Px , R1 Ď Rx Y RV Ť None of these operations can introduce rays not in R “ RV Y xPX Rx . Additional extreme points can only be introduced during the application of [. During each fixed point iteration, exactly one of three cases must occur: 1. All abstract values in X remain the same. 2. The set of rays for some x P X changes. 3. All the sets of rays remain the same, and the set of extreme points for some x P X changes. In case 1, we terminate. As the set of rays is restricted to R, and each iteration is strictly descending, case 2 can only occur finitely many times. Assuming the set of Ť rays remains fixed,Şevery introduced extreme point must be some element of xPX 1 xu. As this set is finite, and each step is descending, X 1 ĎX tP | xP, Ry “ this can only occur finitely many times without case 2 occurring. As case 2 must always occur after a bounded number of steps, and can only occur finitely many times, the fixed point process must eventually terminate. \ [ 17 We conclude that this process will terminate on the most commonly used relational numeric domains. In the case of polyhedra, it is worth noting that Theorem 2 does not provide any bounds on the coefficients of hyperplanes in the resulting polyhedra. In some cases, the coefficients may grow quite large before converging, which can cause problems for domains implemented with fixed-precision machine arithmetic. Appendix B: Relaxation for polyhedra The relaxation algorithm for polyhedra follows the same intuition as that for octagons; we wish to collect the transitive closure of ψij , then discard anything implied separately by ϕ [rri ă jss. However, the polyhedra domain provides two difficulties: computing the transitive closure of a set of linear constraints is non-trivial (as the domain is typically stored as a minimal set of generators and hyperplanes [4]); and often is a bad idea in general: as the constraints do not have bounded arity, there may be exponentially more constraints in the transitive closure than in the original problem. Instead, we collect a set of constraints that is sufficient to reconstruct the constraints that, had we computed the transitive closure, would have been kept. Given constraints c1 “ rrk1⊺ x ě m1 ss and c2 “ rrk2⊺ x ě m2ss, we can construct a new constraint (that is not implied separately by either c1 or c2 ) by resolution if there is some matched pair of coefficients k1v , k2v , such that k1v ą 0 and k2v ă 0. 1v k2 q⊺ x ě m1 ` kk1v m2 ss, which We then construct a new constraint c1 “ rrpk1 ` kk2v 2v th has v coefficient 0. Example 6. Consider the constraints c1 “ rrx ` y ě 7ss, c2 “ rrz ´ 2y ě 2ss, and c3 “ rrw ` 2y ě 3ss. c1 and c2 may be resolved, as c1 contains the term y, and c2 contains ´2y. This yields c12 “ rrx ` z2 ě 8ss. We cannot, however, construct any new constraints by combining c1 with c3 . Rather than computing the transitive closure explicitly, given an initial set of interesting constraints C: and other constraints C, we find all those constraints that are resolvable with those in C: (taking into account the direction of previous : We then continue this process until no resolution steps), and add them to C. further resolvable constraints are found: $ trans‹ pR Y tpsignpkv1 q, v 1 qu, C: Y tcu, Cq ’ ’ & if D ps, vq P R, c “ rrk ⊺ x ě mss P C, v 1 P x : Cq “ trans‹ pR, C, s.t. v ‰ v 1 , kv s ă 0, ppsignpkv1 q, v 1 q R R _ c R C: ’ ’ %: C otherwise : Cq “ trans‹ ptsignpkv , vq | rrk ⊺ x ě mss P C, : v P xu, C, : Cq transpC, Given a set of linear constraints C defining a polyhedron, we can construct the initial set C: with the elements of C that are not implied by ϕ [rri ă jss, then 18 : C z Cq. : As with octagons, we can avoid compute the relaxation with transpC, performing implication tests by instead initializing C: with those constraints containing variables in VA . Example 7. Consider a constraint of interest c0 “ rra ´ y ě 0ss, with additional constraints C “ tc1 “ rry ´ z ě 0ss, c2 “ rrz ` w ě 0ss, c3 “ rrx´ y ě 0ssu. Initially, we have C: “ trra ´ y ě 0ssu, and R “ tp`, aq, p´, yqu. We can resolve with rry ´ z ě 0ss, since p´, yq P R, but p´, zq R R. During the second step, we include c2 , adding p´, wq to R. At this point, we have R “ tp`, aq, p´, yq, p´, zq, p`, wqu, : so we return and C: “ tc0 , c1 , c2 u, and we cannot add anything to either R or C; : the current value of C. Appendix C: Partitions for init randm The large number of partitions required for the init rand family is not necessarily obvious. Assuming n is non-negative, we must distinguish between the case where the array is empty (thus n “ 0) or non-empty (n ą 0). This gives us two base orderings: rt0, nus, and rt0u, tnus. In these descriptions, sets denote equivalence classes, and equivalence classes are listed in increasing order. If n “ 0, there is only one possible value for i1 : rt0, i, nu, ti`us. Otherwise, we must distinguish all the possible relations between 0, i and n. The resulting orderings are as follows: rt0u, ti1 , nuti` rt0, i1 , nu, ti` 1 us 1 us ` rt0, i1 u, ti1 , nus rt0u, ti1u, ti` , 1 nus ` rt0, i1u, ti` u, tnus rt0u, ti u, ti 1 1 1 u, tnus When we construct the partitions for m “ 2, we introduce i2 into all feasible locations in each of the partitions for m “ 1. In cases where we must explicitly distinguish the 0th element, this progression grows substantially faster, with m “ 1, . . . , 5 yielding r9, 45, 333, 3285, 40509s. 19
6cs.PL
STAR: Spatio-Temporal Altimeter Waveform Retracking using Sparse Representation and Conditional Random Fields Ribana Roscher, Bernd Uebbing, Jürgen Kusche arXiv:1709.07681v1 [physics.ao-ph] 22 Sep 2017 Institute of Geodesy and Geoinformation, University of Bonn, Nußallee 15+17, 53115 Bonn, Germany Abstract Satellite radar altimetry is one of the most powerful techniques for measuring sea surface height variations, with applications ranging from operational oceanography to climate research. Over open oceans, altimeter return waveforms generally correspond to the Brown model, and by inversion, estimated shape parameters provide mean surface height and wind speed. However, in coastal areas or over inland waters, the waveform shape is often distorted by land influence, resulting in peaks or fast decaying trailing edges. As a result, derived sea surface heights are then less accurate and waveforms need to be reprocessed by sophisticated algorithms. To this end, this work suggests a novel Spatio-Temporal Altimetry Retracking (STAR) technique. We show that STAR enables the derivation of sea surface heights over the open ocean as well as over coastal regions of at least the same quality as compared to existing retracking methods, but for a larger number of cycles and thus retaining more useful data. Novel elements of our method are (a) integrating information from spatially and temporally neighboring waveforms through a conditional random field approach, (b) sub-waveform detection, where relevant sub-waveforms are separated from corrupted or non-relevant parts through a sparse representation approach, and (c) identifying the final best set of sea surfaces heights from multiple likely heights using Dijkstra’s algorithm. We apply STAR to data from the Jason-1, Jason-2 and Envisat missions for study sites in the Gulf of Trieste, Italy and in the coastal region of the Ganges-Brahmaputra-Meghna estuary, Bangladesh. We compare to several established and recent retracking methods, as well as to tide gauge data. Our experiments suggest that the obtained sea surface heights are significantly less affected by outliers when compared to results obtained by other approaches. Keywords: coastal, oceans, altimetry, retracking, sea surface heights, conditional random fields, sparse representation 1. Introduction For several decades, radar altimetry is routinely being used for monitoring sea surface height (SSH) variations. Observed SSHs play a key role in several applications, ranging from operational oceanography (Chelton et al., 2001) and tidal modeling (Wang, 2004; Savcenko & Bosch, 2008) to gravity estimation (Hwang et al., 1998), and they serve as important indicators in climate research. Recently, radar altimetry in coastal zones (Gommenginger et al., 2011) and for inland water bodies (Birkett & Beckley, 2010) has become a topic of increasing interest. However, in both applications one needs to mitigate the potentially significant land influence on the altimeter return signal. The altimeter instrument on-board a satellite emits a spherically propagating, nadir-directed radar pulse, which is reflected at the surface. Range information can then be inferred from the two-way travel time (Fu & Cazenave, 2001). In addition, the returned signal energy is measured over time, forming an altimeter waveform. It can be shown that over an ideal surface, the return waveform corresponds to the theoretical Brown model (Brown, 1977) and the estimated shape parameters of this model provide information on mean SSH and significant wave height (SWH), while the amplitude strength of the reflected radar pulse can be used to derive wind speed. On board the satellite, the waveform signal is sampled at discrete epochs with a Preprint submitted to Remote Sensing of Environment September 25, 2017 spacing of about 3 ns of two-way travel time, which are generally referred to as range gates (Chelton et al., 1989). Altimeter measurements do not refer to an individual point directly below the satellite, but rather to a footprint with a diameter of several kilometers, depending on SWH and the altitude of the altimetry mission. As illustrated in Fig. 1, the return waveform over the open ocean consists of three main parts; first, before any return energy from the radar pulse is measured, the waveform contains only thermal noise which is present in all radar systems. As soon as the front of the radar pulse hits the wave crests, the altimeter footprint is defined by a single point and the measured return energy begins to rise. Afterwards, more of the pulse illuminates the surface around the initial point and the footprint becomes a growing circle, which corresponds to rapidly increasing signal energy in the measured altimeter waveform. The leading edge of the altimeter return waveform is defined between the first energy return from wave crests and the return energy after the radar pulse has reached the wave troughs (Fig. 1). At this point. the area of the footprint circle reaches its maximum, which is defined as the pulse–limited footprint (PLF, Chelton et al., 1989). Afterwards, the circle transforms into an annulus with increasing inner and outer radii, but with a fixed illuminated area. The corresponding signal energy measured outside of the PLF is referred to as trailing edge of the measured waveform (Fig. 1). The slope of the trailing edge can be utilized to derive information on the off-nadir attitude of the altimeter satellite. The 50%-point on the leading edge corresponds to the mean sea level between wave crests and wave troughs, and thus represents the reference point for the range measurement. An algorithm on board of the satellite tries to position this point inside a pre-defined range window at a fixed tracking range gate (31 for Jason-2, Quartly et al., 2001). This range window consists of a fixed number of range gates, covering about 50 m depending on the satellite mission, and it is positioned by the onboard tracker based on prior information on the range. However, positioning is not always perfect and the 50%-point is not located exactly at the tracking gate. Consequently, this requires a ground-based reprocessing of the altimeter waveforms transmitted back to Earth, a procedure which is called retracking. Over the open ocean, the shape of the waveform will be close to the theoretical Brown model with the 50%-point being only slightly shifted from the tracking gate position, and this can be easily corrected using an ocean model retracker (Brown, 1977; Hayne, 1980; Deng, 2003). For ice surfaces where the waveform signal often contains two leading edges due to the radar signal partly penetrating through the upper snow layer, specialized retracking algorithms have been developed (Martin et al., 1983). However, in coastal areas the waveform shape is typically disturbed by land influences in the altimeter footprint, resulting in peaks or fast decaying trailing edges. These deviations of coastal waveforms from the Brown model lead conventional ocean retrackers to generate diverging or strongly biased estimates of SSH, as land-induced peaks propagate along the trailing edge towards the leading edge while the altimeter ground track approaches the coast (Lee et al., 2010). In order to mitigate the land influences on the waveform shape, various tailored approaches have been proposed. As an example for methods that seek to model the entire waveform, (Halimi et al., 2013) combined a 3parameter Brown ocean model with a modeled asymmetric peak to account for land influences. A different approach for dealing with the influence of peaks on the retracked estimates is to first partition the waveform in a pre-processing step; i.e. to identify relevant parts of the waveform, such as the leading edge, but also possible peaks. For example, (Hwang et al., 2006) first identify relevant sub-waveforms and then apply a threshold retracking algorithm to each of the sub-waveforms, which leads to multiple equally likely SSH estimates at each location from which the final estimate is chosen based on comparison to a-priori height information. In this way, peaks that appear outside of the relevant sub-waveforms are ignored. Recently, for retracking SSHs over inland water bodies, (Uebbing et al., 2015) combined the sub-waveform approach from (Hwang et al., 2006) and the waveform model from (Halimi et al., 2013) to suppress land-induced peaks on the trailing edge, but also to account for possible peaks close to the leading edge of the waveform. This could be shown to lead to improved lake heights compared to conventional methods. In a different approach, (Passaro et al., 2014) suggested a two-step procedure, similar to a previously published approach by Sandwell & Smith (2005), where in the first step all 3 parameters (amplitude, range and SWH) are estimated. In the second iteration they fixed the SWH to a mean value derived from the first step and re-estimated the amplitude and range correction, since SWH estimations are strongly correlated to the range correction. This 2 leads to improved SSHs closer to the coast. Here, we introduce a novel method for the analysis of sea surface heights from altimetric waveforms, which will utilize spatial information from neighboring range gates within one waveform, as well as temporal information from neighboring waveforms along the altimeter track. This Spatio-Temporal Altimetry Retracker (STAR) can be applied to altimetry data over the open ocean, as well as in coastal areas. Our contributions are twofold: First, our analysis includes a novel sub-waveform detection scheme, which to our knowledge for the first time integrates spatial as well as temporal information. This differs from the conventional sub-waveform detection algorithm (Hwang et al., 2006) in that we partition the entire waveform into separate sub-waveforms, instead of identifying possible, disjointed leading edges. Second, in order to be largely independent of the choice of tuning (or ’hyper’) parameters within the sub-waveform detection scheme, we derive multiple sub-waveform partitionings by varying the weight w between unary and binary terms of the conditional random field. This leads to a range of partitionings of the entire waveform, and subsequently to a point cloud of equally likely SSHs at each measurement position, each of which is estimated using a 3-parameter ocean model (Halimi et al., 2013). We then employ Dijkstra algorithm (Dijkstra, 1959) to find reasonably smooth SSHs, without resorting to fitting. Our sub-waveform detection scheme uses a sparse representation (SR) approach, where the return power at all range gates within one particular sub-waveform is modeled by a weighted linear combination of a single common set of basis waveforms, which are derived from synthetic Brown waveforms. The concept of SR has been applied to many areas of signal analysis (Wright et al., 2010), but this study appears to be the first which uses it on radar altimetry. SSHs and other sea surface conditions such as wave height are neither independent along tracks, nor between neighboring tracks (Sandwell & Smith (1997)). Spatial information has been used in the analysis, for example, by Maus et al. (1998) through simultaneously processing of a sequence of waveforms for tracking of travel times, or Halimi et al. (2016) for a smooth estimation of altimetric parameters. This means, the integration of spatial information can be carried out in different parts of the analysis. The latter two approaches, for example, integrate spatial information about neighboring waveform to develop improved estimation algorithms for retracking. Here, we integrate spatio-temporal information by means of a conditional random field (CRF, Lafferty et al., 2001): to this end, we introduce spatial relations between the return power at range gates of temporally neighboring waveforms, i.e. neighboring waveforms within one pass and cycle, and relations between the range gate power within a single waveform. In this way, range gates which are relevant for SSH estimation can be distinguished from corrupted or non-relevant waveform parts, since they are represented through a different linear combination of basis sub-waveforms (see Fig. 1). In contrast to Halimi et al. (2016) where the conditional random field is used as part of an algorithm to enforce a smooth estimation of the retracking parameters, we propose to use the conditional random field at the sub-waveform detection step. Subsequently, any retracking method can be applied to the identified individual sub-waveforms for deriving the SSH, thus effectively ignoring disturbing signals outside the selected sub-waveform. This means, our approach could be transferred in future to the analysis of Delay-Doppler altimetry. This paper is organized as follows: First, we introduce the altimetry data that we used for validating our method, as well as our two study sites in Sec. 2. We describe the sub-waveform detection with SR and the integration of spatio-temporal knowledge by employing a CRF in Sec. 3. Moreover, the estimation of single SSHs and the determination of the best set of SSHs from multiple heights using Dijkstra’s algorithm is explained in Sec. 4. In Sec. 5, we compare the performance of our sub-waveform detection against an existing method and we evaluate the proposed analysis framework by means of analysing Jason-1, Jason-2 and Envisat waveforms in the coastal regions of the Gulf of Trieste, and in the northern Bay of Bengal in the coastal waters of Bangladesh. Sec. 6 concludes the paper. 3 Figure 1: Waveform with disturbing peak caused by land influences (colored in blue). The relevant part for sea surface height, determined by sub-waveform detection, is illustrated in green. A theoretical waveform model is depicted in orange. 2. Data and Study Sites 2.1. Data We apply our retracking method to Jason-2 Sensor Geophysical Data Records (SGDR) of the Jason-2 mission, as well as to SGDRs from the Jason-1 and European Environmental Satellite (Envisat) missions. The Ocean Surface Topography Mission (OSTM)/ Jason-2 was launched in mid of 2008 succeeding the Jason-1 mission on the same orbit. The satellite flies in a near circular ∼10 day repeat orbit with an altitude of 1336 km and inclination of 66 ◦ and a separation of the groundtracks equal to 315 km at the equator. The main instrument is the Poseidon-3 altimeter which emits radar pulses in the Ku-Band (13.575 GHz/2.21 cm) and C-Band (5.3 GHz/5.08 cm) (AVISO, 2015). Additional instruments are a microwave radiometer used to derive the wet troposphere correction, as well as GPS and DORIS systems for precise orbit determination (Rosmorduc et al., 2011). The Jason-2 SGDRs have been obtained from the Archiving, Validation and Interpretation of Satellite Oceanographic (AVISO) team which is part of Centre National d’Etudes Spatiales (CNES). The SGDRs are sorted by pass and cycle, including 254 passes per cycle or ∼10 day repeat orbit and we utilize data of passes 053 and 196 from the beginning of the mission in July 2008 (cycle 0) until the end of 2014 (cycle 239). The composition of the Jason-1 mission is very similar to Jason-2. It was launched in December, 2001 as a successor to the Topex/Poseidon mission. After the launch of Jason-2 in June, 2008 both satellites flew on the same orbit in close distance to allow intercalibration of the satellite missions. After 6 months, Jason-1 was moved to an interleaved orbit located in the middle between the nominal orbit to increase the spatial resolution of the combined Jason-1 and Jason-2 data until January, 2012. Afterwards the satellite was moved to a drifting geodetic orbit and passivated and decommissioned in July, 2013 after losing contact. We will use data from the interleaved period from February, 2009 (cycle 263) until January, 2012 (cycle 370). The Jason-1 SGDRs for the interleaved orbit are acquired from the Physical Oceanography Distributed Active Archive Center (PO.DAAC, ftp://podaac.jpl.nasa.gov/allData/coastal_alt/L2/ ALES/jason-2/) operated by the Jet Propulsion Laboratory (JPL) which is part of the National Aeronautics and Space Administration (NASA). The Envisat satellite was launched in March, 2002 succeeding the ERS-2 mission in the same orbit by the European Space Agency (ESA). The orbit is a 35-day repeat orbit with an altitude of 800 km, about 4 an inclination of 98.55 ◦ which allows the satellite to cover higher latitude regions compared to e.g. Jason-2 with a higher spatial resolution (80 km separation at the equator) at the cost of a longer repeat period of 35 days. The satellite carries a total of 10 instruments of which the DORIS positioning system, the microwave radiometer and the Radar Altimeter 2 (RA2) altimeter instrument are of most importance to us (Rosmorduc et al., 2011). The RA2 altimeter is a dual frequency altimeter emitting radar pulses in Ku-Band (13.575 GHz/2.21 cm) and S-Band (3.2 GHz/9.37 cm) (ESA, 2007). The Envisat SGDR data are provided by ESA (https://earth.esa.int/). We utilize data from June, 2002 (cycle 7) to September, 2010 (cycle 93). We extract the 20 Hz (18 Hz for Envisat) tracker range, altitude and waveforms which are needed during the retracking algorithm. Additionally, 1 Hz atmospheric model corrections for the dry and wet troposphere, as well as the ionosphere are extracted from the SGDR data and linearly interpolated to the high rate positions. For validation of the retracked coastal SSHs, tide gauge data with hourly resolution from the University of Hawaii Sea Level Center (UHSLC) are used. The hourly data are uncorrected with respect to tidal and inverse barometric effects and we do not apply these corrections to neither the altimetry data, nor the tide gauge data to remove the influence of these corrections on the validation. The tide gauge data for Trieste, Italy is available from June, 2009 to December 2015 and for the tide gauge station in Chittagong, Bangladesh we have data from July, 2007 til December 2015. Additionally, we utilize openly available GDR datasets for the Jason-2 (cycles 1 to 239) and Envisat (cycles 7 to 93) mission that include the ALES retracked ranges for comparison which are distributed by PO.DAAC, JPL. For the validation of significant wave height and wind speed, we utilize model data from the ERAInterim reanalysis (Dee et al., 2011) which is distributed by the European Centre for Medium-Range Weather Forecast (ECMWF) and interpolated to the altimetry track. 2.2. Study Sites For investigating the quality of our proposed STAR algorithm, we selected two study sites located in the Gulf of Triest and in the coastal regions of Bangladesh. The sites include varying conditions, including shallow coastal waters, open ocean areas, temporally submerged sand banks and transition zones between river estuaries and the ocean. (a) Triest TG at the Adriatic Sea and the groundtracks of Jason-2 pass 196, as well as Jason-1 interleaved orbit, pass 161. (b) Chittagong TG at the Bay of Bengal and the groundtracks of Jason-2 nominal orbit, pass 053, as well as Envisat, pass 0352. Figure 2: Location of the altimetry tracks and the tide gauges used for validation of the retracked SSHs. 5 2.2.1. Triest The first study site is located in the northern Adriatic Sea in the north-eastern part of the Gulf of Venice and includes the Gulf of Triest. The descending nominal orbit pass 196 of the Jason-2 mission crosses the study area from north-west to the south-east (Fig. 2(a)). It crosses from the Italian mainland to ocean close to the city of Marano Lagunare at approx 45.76 ◦ N and covers about 5.9 km of the Laguna di Marano before there is a short ocean-land-ocean transition over the Isola di Sant’ Andrea at ∼45.71 ◦ N. Then, the track covers about 45.5 km of open ocean in the Gulf of Venice before transitioning to the Croatian mainland at ∼45.36 ◦ N. For the last 5 km from ∼45.4 ◦ N until the track is over the Croatian mainland, it runs very close to the Croatian coast with a distance of less than 2 km. Furthermore, we utilize data from the ascending Jason-1 pass 161 of the interleaved orbit (Fig. 2(a)). It crosses our study area from the south-west to the north-east. The first 37 km are located over the open ocean and the groundtrack covers the Croatian mainland from ∼45.48 ◦ N to 45.50 ◦ N. Then the track covers open water until it reaches the Italian mainland at ∼ 45.71 ◦ N. At about 45.54 ◦ N the track is located less than 2 km away from the Slovenian mainland. The tide gauge station Triest is located at ∼ 13.75 ◦ E and 45.65 ◦ N in the harbor of the city of Triest in the Gulf of Triest. The distance of the tide gauge station to the Jason-2 groundtrack is about 31 km at the closest point. 2.2.2. Bangladesh The second study site is located in the northern Bay of Bengal in a region right off the coast of Bangladesh. The region is covered by the ascending Jason-2 nominal orbit pass 053 which crosses the study area from the south-west to the north-east (Fig. 2(b)). The track coverage starts over the open ocean parts of the Bay of Bengal and reaches Sandwip Island after ∼ 95 km at ∼ 22.41 ◦ N . From ∼ 22.53 ◦ N to 22.63 ◦ N the track again covers a strip of about 13 km of open water related to the estuary of the Ganges-Brahmaputra-Meghna Delta (GBMD) before it reaches the Bangladesh mainland. Between latitudes of ∼ 22.25 ◦ N and 22.35 ◦ N there are some sand banks located along the track which are submerged during high tide, but not during low tide. Additionally, the descending pass 0352 of the Envisat mission runs almost parallel to the Jason-2 track and crosses the study site from the north-east to the south-west. It first reaches open water related to the GBMD at ∼22.67 ◦ N and after about 14 km the track reaches Sandwip Island at ∼ 22.55 ◦ N. At 22.40 ◦ N, the track transitions back to open water and afterwards covers the remaining 104 km of open ocean in our study area. Again, the sandbanks mentioned above might influence the data acquisition during low tide. The Chittagong tide gauge station is located at ∼ 91.83 ◦ E and 22.25 ◦ N in the Chittagong harbor. The distance to the Jason-2 groundtrack is about 38 km at the closest point. 3. Sub-waveform Detection 3.1. Notation Let us consider L consecutive waveforms collected along a cycle, each of which contains return energy for G range gates. We arrange these waveforms in xl , l = 1, . . . , L. Each waveform can be represented through a set of overlapping windowed waveforms ξ l,g ∈ xl with windows centered at ξl,g and comprising Nξ neighboring range gates, as illustrated in Fig. 3 for a single echo. Within this framework, sub-waveform detection means identifying K sub-waveforms in each xl by deciding for each range gate on indices ŷ l,g , which define the best-fitting sparse representation (SR)-based models. The aim of the proposed approach is to optimally detect these sub-waveforms, where the number of models per waveform is unknown and needs to be determined during the detection process. 6 3.2. Detection Framework The schematic of our sub-waveform detection framework is illustrated in Fig. 3. The input of the framework are windowed waveforms ξ l,g and synthetic Brown waveforms. These Brown waveforms are the basis waveforms collected in a dictionary D, which is used for a sparse representation-based modelling of signals. Given the input, a conditional random field (CRF) is formulated, which consists of an unary, datadependent term computed by sparse representation, and a binary term enforcing a smooth partitioning of the entire waveform.  w  A variation of the weighting between these two terms yield various sets of optimal w indices Ŷ = ŷ l,g , resulting in different partitionings of the entire waveform. The framework is flexible regarding the chosen methods, e.g. the sparse representation can be replaced by other methods such as correlation or other similarity measures. In the following, detailed explanations to the framework will be provided. Figure 3: Detection Framework: The input is given by altimetric waveforms and synthetic Brown waveforms. Each range gate is represented by a windowed waveform, i.e., the range gate’s center point and neighboring range gates, as illustrated by blue, violet and orange areas. A conditional random field is formulated, which consists of an unary, data-dependent term computed by sparse representation and a binary term enforcing a smooth partitioning of the waveform. In the conditional random field, the graphical model is constructed by connecting temporally adjacent range gates as well as adjacent range gates within one waveform. A variation of hyperparameters in the conditional random field result in different partitionings of the entire waveform. 3.3. Conditional Random Field In order to perform sub-waveform detection while integrating information about neighboring range gates, we make use of a conditional random field (CRF). The range gates are represented in a graph, where each range gate is connected to spatially adjacent range gates within one waveform and to temporally adjacent range gates along the satellite’s ground track (see Fig. 3). The basic idea is the assignment of each range gate, represented as windowed waveform, to the best-fitting model, for which we use sparse representation in this framework. Neighbored range gates which are assigned to the same model are summarized to one sub-waveform. Therefore, all range gates in one sub-waveform follow the same underlying model. In our approach, the optimal sub-waveform partitioning minimizes the energy functional X X E(Y ) = U(ξ l,g , y l,g ) − w B(ξ l,g , ξ l,q , y l,g , y l,q ), (1) l,g l,g,q∈Q 7 where the unary term U, depending on the windowed waveforms ξ l,g , describes the agreement between the measured windowed waveform and a sparse representation model represented by y l,g . These models are   identified by so-called non-zero activation indices Y = y l,g , indicating which synthetic basis waveforms are used for signal reconstruction within each specific model. The binary term B depends on both the non-zero activation indices y l,g and y l,q , as well as the windowed waveforms with q ∈ Q indicating the set of direct neighbors of each range gate. The weight between both terms is a hyperparameter and is denoted by w. In our approach, we assume a sub-waveform to be a set of neighboring range gates which are modeled with the same non-zero activation indices, as explained in more detail in the next paragraphs. 3.3.1. Unary Term - Sparse Representation Generally, in terms of sparse coding (e.g., Olshausen & Field (1997)) a (G × 1)-dimensional waveform xl can be represented by a linear combination of a few basis waveforms, which are collected in a (G × V )dimensional dictionary D = [dv ], v = 1, . . . , V , such that xl = Dαl +  with kk being the reconstruction error. Solving this problem means finding the activation vector αl containing the optimal coefficients, whereas most of the elements are zero. During sub-waveform detection, instead of representing the whole waveform signal, only windowed waveforms will be sparsely represented by windowed basis waveforms. In this case, each range gate, represented by a windowed waveform, can be assigned to a specific sparse linear combination of windowed basis waveforms constituting the best approximation for it. In more detail, a windowed waveform ξ l,g is sparsely represented using activations αl,g and a sub-dictionary D g that contains certain rows of the underlying dictionary D (see identical colored entities in Fig. 3 and Fig. 4). Since the dictionary comprises synthetic Brown waveforms, sub-dictionaries contain specific parts of the synthetic waveforms. The indices of non-zero elements in αl,g , i.e., the dictionary elements participating in the reconstruction, are the non-zero activation indices y l,g used for defining the models (cmp. Sec. 3.3). It is important to note that D is fixed for L consecutive waveforms, such that sub-dictionaries used for temporally neighboring windowed waveforms are identical. Figure 4: Schematic illustration of sparse representation of windowed waveforms. Colors in xl indicate different windowed waveforms ξl,g , which are independently sparsely represented. Colors in the dictionary are indicating D g , i.e. the respective rows used for reconstructing the windowed waveform. For sub-waveform detection, neighbored range gates which are represented with the same dictionary elements are grouped to one sub-waveform. The optimal α̂l,g can be formulated as b l,g = argmin kD g αl,g − ξ l,g k2 α subject to kαl,g k0 ≤ M, (2) b l,g are given by the non-zero activation indices y l,g . For a set where the indices of M non-zero elements in α b l,g , the reconstruction error of windowed waveform ξ l,g will be of optimal activations α b l,g − ξ l,g k2 , rl,g = kD g α (3) and r l,g = [rl,g ] is the vector collecting the reconstruction errors for all possible sets of dictionary elements. 8 This optimization can be solved with orthogonal matching pursuit (OMP, Tropp et al. (2006)), which falls in the class of greedy algorithms. For this, the first dictionary element is chosen to be the one that maximizes the absolute value of the inner product between the dictionary element itself and the sample which is meant to be reconstructed; i.e. we maximize the collinearity. Each further dictionary element is chosen in the same way, however, using the current residual  instead of the sample until the number of the used dictionary elements exceeds M . The dictionary elements and samples are normalized. An alternative would be an exhaustive search through all combinations of non-zero activation indices, which however, would be computationally challenging. In more detail, the unary term in the energy functional penalizes the reconstruction error for a given set of non-zero activation indices and the difference of its activations’ sum to 1, both describing the agreement between data and a specific sparse representation model: ! X 1 1 b v,l,g , r l,g + abs 1 − α (4) U(ξ l,g , y l,g ) = Z1 Z2 v where the first term is the normalized reconstruction error obtained by the non-zero activation indices b l,g . Both unary y l,g , and the second term is the normalized difference to 1 of the estimated activations α terms are normalized P by the standard deviation ζ of the values for each range gate, given by Z1 = ζ(r l,g ) b v,l,g )), in order to ensure an equal treatment of all range gates. The sum-toand Z2 = ζ(abs (1 − v α one penalization serves as regularization to constrain the solution space to reasonable results, which can alternatively be directly incorporated in (2) in a more restrictive way by introducing an additional sum-toone constraint, as often used in remote sensing (Bioucas-Dias et al., 2012). A dictionary should have the following properties for our purpose: First, the elements should have a high approximation ability, and second the choice of used dictionary elements for reconstruction should be unique and stable. In order to build a suitable dictionary, a set of synthetically generated waveforms is sampled and relevant waveforms are selected to serve as dictionary elements. We choose the most relevant synthetic waveforms by selecting these ones which are most similar to the estimated waveforms and most dissimilar to each other. For simulating dictionary elements, the parameters of the Brown model (Brown, 1977), such as the waveform amplitude or the epoch, are sampled randomly, where the probability density functions are chosen to resemble empirical distributions of Brown model parameters from a large set of open-ocean echoes from the Envisat or Jason-1/-2 missions. In this way, the proposed algorithm will be as independent as possible of the chosen altimetry mission. 3.3.2. Binary Term The binary term in (1) serves to incorporate prior knowledge about the spatial relations between adjacent range gates within a single waveform and between temporally consecutive waveforms within one cycle. As mentioned before, we assume a sub-waveform to be a set of neighboring range gates which are sparsely represented by a common set of dictionary elements, i.e. they share the same non-zero activation indices y l,g , which is set to be the objective in (1). Therefore, we prefer neighboring range gates with similar characteristics to be reconstructed with a common set of dictionary elements. The binary term in (1) is given by   cos ξ l,g , ξ l,q , if y l,g = y l,q B(ξ l,g , ξ l,q , y l,g , y l,q ) = . (5) 0, if y l,g 6= y l,q  The similarity measure cos ξ l,g , ξ l,q relaxes the constraint of the representation of neighboring range gates, e.g., in order to consider possible adaptions of the range window by the satellite on-board tracker. 3.3.3. Sparse Representation-based Conditional Random Field As mentioned earlier, the evaluation of all possible sets of non-zero activation indices is computationally difficult. However, this information is needed in the CRF to find the best set of indices for all range gates. 9 To overcome this problem, we optimize the CRF in a greedy manner. In detail, the search for the optimal estimation of non-zero activation indices in iteration j = 1 for a windowed waveform is performed over j=1 Dl,g = {1, . . . , V } and fixed after the CRF application. Stopping after a single iteration is identical to the usage of a correlation similarity as unary term. For each further iteration j > 1, the optimal sets of non-zero j j−1 j−1 activation indices will be derived from Dl,g = {{y l,g , 1}, . . . , {y j−1 l,g , V }} with y l,g being the optimal set of non-zero activation indices from the previous iteration. The final CRF that is employed to find an optimal estimation of non-zero activation indices in each iteration is given by the minimizer of the energy !! X 1 X X 1 b v,l,g r l,g + abs 1 − E(Y ) = α −w B(ξ l,g , ξ l,q , y l,g , y l,q ) , (6) Z1 Z2 v l,g l,g,q∈Q where all entities correspond to the current iteration (index j is omitted for simplicity). The final optimal b w. set of non-zero activation indices given a specific weight w is denoted by Y 4. Sea Surface Height Estimation In this study, we consider only the effect of the hyperparameter w, i.e. the choice of the relative weight between the unary and binary terms in (1). As it turned out in our numerical experiments, no single choice of w provides optimal results for different cycles, different study sites or altimetry missions. Therefore, we define a range of possible sub-waveforms by varying w. A variation of the hyperparameter w in (1) leads to a variation in the number of detected sub-waveforms. Therefore, we choose a set of reasonable W = {w1 , . . . , wP } hyperparameters. In other words, we derive multiple sub-waveform partitionings, ranging from a very coarse partitioning which includes only a few sub-waveforms to a very fine one which also captures small peaks in separate sub-waveforms. For SSH estimation, we use all sub-waveforms which are sufficiently large enough and which can be used for retracking. We end up with several equally likely SSHs at each measurement location which could be thought to form a ’point cloud’. Finally, the Dijkstra algorithm is employed to choose the smoothest combination of these SSHs, such that finally a single SSH at each along-track location is provided. 4.1. Sea Surface Height In the context of this study, we define SSH e hSSH as given by e hSSH = a − (R + ∆dry + ∆wet + ∆iono + ∆retr ), (7) where a is the satellite’s altitude and R is the tracker range related to the fixed tracking gate and provided in the altimeter data records. The atmospheric model corrections ∆dry , ∆wet and ∆iono , extracted from the SGDR data, refer to the influence of the dry and wet part of the troposphere, as well as the ionospheric influence on the signal. The retracking range correction ∆retr is derived from the retracking procedure, described below, by converting the estimated epoch t0 from two-way travel time to range using ∆retr = 0.5ct0 , where c is the speed of light in vacuum. Additional tidal corrections are applied after the final heights have been selected, to reduce the impact of noise in the tidal corrections on the final height detection. In particular, ocean tide correction will introduce a large noise component in coastal areas which will corrupt the selection of final SSHs through Dijkstra’s algorithm. Furthermore, we validate our retracking results against tide gauge data with at least hourly temporal resolution without any tidal and barometric corrections applied to remove possible effects from the comparison. For this purpose we add relevant corrections hSSH = e hSSH − ∆ssb − ∆set − ∆lt − 0.468∆pt , 10 (8) where ∆ssb is the sea state bias correction which we compute as 5% of our retracked SWH. Additionally, ∆set is the solid earth tide correction, ∆lt is the loading tide and ∆pt is the pole tide correction. The factor 0.468 only applies the solid earth part of the pole tide correction, ignoring the part resulting from ocean tides (Fenoglio-Marc et al., 2015). In other words, we do not apply the ocean tide correction or the inverse barometric correction to render hSSH being directly comparable to the high rate tide gauge data. 4.2. Ocean model for Retracking For retracking we employ a weighted 3-parameter ocean model (Halimi et al., 2013) which is given by    t − t0 − ψσ 2 A √ 1 + erf xl (t) = 2 2σ (9)    ψσ 2 exp −ψ t − t0 − + NT , 2 for each two-way travel time t, centered on the tracking gate. Here, NT is the thermal noise which is pre-computed from the first few range gates. The three fitted model parameters represent the amplitude A, which is related to backscatter, the rise time of the leading edge σ which can be converted to SWH, as well as the epoch or retracking gate t0 which refers to the position of the mid point of the leading edge. Additionally, ψ is defined by ψ= 1 4c cos(2φ), γh 1 + a/Re sin2 (θ) , γ= ln 4 (10) where c is the speed of light in vacuum, Re is the radius of the Earth (Deng, 2003) and φ is the off-nadir pointing angle which is assumed to be zero in our application. The antenna beamwidth parameter γ is defined in (Brown, 1977, Eq. (4)) and can be computed from the beamwidth θ of the altimeter instrument. 4.3. Shortest-Path Algorithm for Finding the Best Set of Sea Surface Heights The problem that we discuss here can be viewed as an optimization problem with certain constraints. Given now a ’point-cloud’ of (equally) possible SSHs for each groundtrack-point, we need to realize a consistent SSH at each measurement position by finding the optimal SSH candidates. Before applying a shortest-path algorithm, we remove outliers from the ’point cloud’ through the RANdom SAmple Consensus (RANSAC) algorithm (Fischler & Bolles, 1981) while assuming a linear model of SSH change in along-track direction. Sea level change is not linear and thus, we apply the RANSAC algorithm with a threshold of 3 m to a moving window covering about 20 s of measured data. By selecting the moving window to cover 20 s we make sure that we always include a relatively large portion of water, especially at land-ocean transitions. All points that deviate too far from the linear model estimated by the RANSAC algorithm are discarded and the resulting set of accepted SSHs is then used to find the shortest path and estimating the optimal SSHs at each measurement location as illustrated in Fig. 5 and Fig. 6. Here, we chose Dijkstra algorithm (Dijkstra, 1959), but other shortest-path algorithms would also be possible. Dijkstra’s method requires one to choose edge weights between individual connected nodes. In our application, we chose the height differences between connected nodes as edge weights, thus, favoring smaller height changes over larger ones. For the start and end point of the Dijkstra graph we use the first and last sea surface height at the start and end position. 11 Figure 5: Schematic illustration of optimal sea surface height estimation employing Dijkstra algorithm. Dijkstra finds the optimal path (illustrated in blue) through equally likely successively arranged sea surface heights. where edge weights are derived from the difference between heights of 2 nodes. Figure 6: Exemplary SSH pointcloud from the Triest study site as part of our proposed STAR algorithm. The black points are selected by the RANSAC algorithm to estimate the linear model in order to discard outliers. Afterwards all points within range of the linear model are used in the Dijkstra algorithm to find the best (smoothest) set of SSHs (orange line). 5. Results 5.1. Setting We compare the STAR algorithm to existing retracking algorithms, such as the standard range derived from a MLE4 retracking method provided in the SGDR data, the 30%-threshold retracker (ICE1, Martin et al. (1983)) and the equally weighted 3-parameter ocean model (W3POM, see Eq. (9)). Furthermore, the specialized coastal algorithms, such as the Adaptive Leading Edge Subwaveform retracker (ALES, Passaro et al. (2014)) and the Improved Threshold Retracker (ITR, (Hwang et al., 2006)), the latter combined with a threshold of 50%, are considered. When implementing the STAR method as described above, we chose to set the neighborhood of the windowed waveforms ξ to Nξ = 5. For the number of non-zero elements in (2) we select M = 2. Values of M > 2 lead to significantly increased computation times while a larger combination of the limited number of dictionary elements might result in less clearly defined sub-waveforms from unique combinations of the basis elements. To avoid finding an optimal weighting parameter w for each measurement region, we run (1) for five different choices of w ∈ W = {0.1, 0.5, 1, 2, 100}. This will result in five partitionings of the total waveform into sub-waveforms, ranging from a very fine partitioning to a very coarse one. The parameters for the computation of our basis elements are generated based on the average estimated parameters from 12 an application of the 50%-threshold retracker to the current block of waveforms (20 waveforms per block in our framework). The mean epoch and amplitude serve as input into the basis element generation to produce 1000 waveforms by randomly varying the mean parameters: the amplitude is randomly varied by about 10% of its mean threshold-retracked value. The epoch is randomly sampled using a Gaussian weighted distribution with its maximum at the mean threshold-retracked value. The waveheight is randomly sampled from the range 0 m to 12 m, which is a most common range of waves. The cross-correlation coefficients between the obtained 1000 generated waveforms are computed and only the 15 waveforms which are most distinct from each other are kept and form the dictionary elements. In the following we utilize all the detected sub-waveforms to derive the results for STAR. Our STAR algorithm, ICE1, W3POM and ITR have been implemented in our in-house C++ altimetry toolbox. As ITR provides heights for each detected leading edge, we assumed the first detected leading edge to yield the correct retracking parameters, as we do not have any prior information on the heights. The SGDR SSHs are extracted from the GDR data and ALES retracked ranges are extracted from external GDR data. The SSHs from all retracking methods have been processed in the same way. 5.2. Sub-waveform Detection First, we compare the sub-waveforms detected by STAR resulting from five different weights w ∈ W in (1) to sub-waveforms from the method by Hwang et al. (2006) for an arbitrarily chosen waveform measured off the coast of Croatia (Fig. 7). The waveform parts that have not been detected as part of a leading edge by the method presented by Hwang et al. (2006) are indicated by the white background. In contrast, individual sub-waveforms are depicted in alternating shades of grey. For this waveform, five potential leading edges have been identified by the method of Hwang et al. (2006), each of which can be utilized to derive potential sea surface heights. When comparing the partitioning of the total waveform for the different weights w ∈ W by STAR, lower weights lead to a significantly increased number of identified sub-waveforms. In some cases single sub-waveforms contain only one range gate since the binary term in (1) is weighted significantly lower than the unary term. With increased weight w, the similarity constraint is enforced and the sub-waveform size increases. For a weight w = 100, the identified sub-waveform corresponds to the entire waveform, which leads to including the standard case of retracking the complete waveform in our derived point clouds. In a next step, we compare the resulting point clouds of STAR (orange points, Fig. 8) to the point cloud derived using Hwang et al. (2006) algorithm (black points, Fig. 8) for one exemplary cycle during low tide conditions at the Bangladesh site. A small bias over the open ocean can be identified between both methods, which is related to the chosen threshold of 50% used for ITR. For the sandbank near 22.325 ◦ N both point clouds agree well. However, prior to reaching the sandbank the points derived from ITR drop rapidly by about 10 m to a level of approximately -64 m (outside the plot boundaries), while the point cloud based on STAR becomes less dense but still preserves enough meaningful SSHs of about -55.5 m up to the beginning of the sandbank. Between Sandwip Island and Bangladesh mainland, STAR is able to derive SSHs from the detected sub-waveforms, while ITR is more influenced by land returns disturbing the retrieved waveform, which results in no meaningful SSHs that can be detected during the low tide conditions in this case. 5.3. Retracked SSHs For validation of the retracked SSHs, we compare STAR SSHs to retracked SSHs from various conventional and coastal methods. The top of Fig. 9 shows retracked SSHs derived for one arbitrarily selected cycle 165 at almost high tide at the Trieste study site. The bottom part of Fig. 9 shows the corresponding return waveforms at each measurement location. Over the open ocean between ∼45.46 ◦ N and 45.58 ◦ N, we find the waveforms corresponding well to the theoretical Brown model and the SSHs from all retracking algorithms agree well. However, ICE1 shows a small bias compared to the other retracking algorithms which is likely due to the 30%-threshold. At about 5-7 km off the nearest coast in the northern and southern part of the study site, the SSHs based on the W3POM and SGDR indicate a rapid drop in sea level. This drop is related to the influence from peaks, resulting from land influence from the Croatian and Italian mainlands. The coastal methods STAR, ALES 13 Figure 7: Sub-waveform partitioning using our method for weights from the set W = {0.1, 0.5, 1, 2, 100} inserted into (1). The waveform is an arbitrarily selected coastal waveform from Jason-2 pass 196, cycle 69. Grey shaded background depicts the individual sub-waveforms while a white background indicates no sub-waveform in that part of the total waveform. and ITR are not influenced by the peaks as they consider only parts of the total waveform that do not include the peaks at these measurement positions. In the southern coastal area (45.37 ◦ N to 45.46 ◦ N), the SSHs from W3POM, again, generally agree with the SSHs from ICE1 and STAR with the latter showing less noisy along-track variations and providing SSHs right up to the coast of the Croatian mainland (Fig. 9). Between 2 to 4 km off the Croatian coast the SSHs based on ALES and ITR show significant outliers which are related to the peak, due to the land influence of the Croatian mainland, being located very close to the leading edge resulting in biased estimations. Additionally, smaller peaks preceding the leading edge can be detected (Fig. 9, bottom) which are identified as potential leading edges by the ITR algorithm and, thus, result in outliers due to our assumption to utilize the first identified leading edge in the ITR algorithm. Similar behavior can be observed from the ICE1 algorithm, e.g. near ∼43.75 ◦ N, where the peaks preceding the leading edge lead to significant outliers. In the northern coastal area (45.64 ◦ N to 45.71 ◦ N), we find good agreement between the SSHs based on ALES, ITR and STAR, with a few significant outliers from ALES over the last two kilometers off the nearest coast. At about 3.5 km off the Isola di Sant’ Andrea, a drop in SSH can be detected from all three methods with ITR showing the strongest drop by several meters while the SSHs from STAR only drop less than 1 m (Fig. 9) due to relatively broad peaks located directly at the leading edge. Over the relatively shallow Laguna di Marano all methods, except for SGDR, provide a sea level similar to the open ocean level during high tide, despite of the waveforms consisting of strong specular peak shapes (Fig. 9, bottom). 14 Figure 8: Point cloud of SSHs resulting from STAR compared to ITR (Hwang et al., 2006). 5.4. Repeatability of the Retracked SSHs The STAR method utilizes a randomized dictionary for sub-waveform decomposition; therefore it makes sense to investigate whether this leads to an uncertainty in the final SSHs. To answer this question we conduct a Monte Carlo study: we ran the STAR algorithm 1000 times, utilizing the arbitrarily selected cycle 69 of pass 196 of the Jason-2 mission. Resulting SSHs are shown in Fig. 10 (top) with additional zoom-in regions for two coastal areas, as well as for the open ocean. The bottom part of the figure displays the corresponding root mean square difference (RMS) ranging from about 0 to 1 m, where the open ocean area is also given in an additional sub-plot for a range of 0 to 5 cm. Over the open ocean area, the variability along the groundtrack is in the range of about 15-20 cm (Fig. 10, top). Here, the repeatability of STAR is given by a RMS of less than 5 cm (Fig. 10, bottom). In the southern coastal area, the along-track variability is in the range of 60 cm revealing a slight increase in sea level towards the Croatian coast (Fig. 10, top). Due to the land influence on the shape of the waveform as is visible in the parabolas (Fig. 9, bottom), the retracking results are sensitive with respect to the size of the individual detected sub-waveforms. Nonetheless, we still find good repeatability in this region with RMS of less than 20 cm (Fig. 10, bottom), which is less compared to the along track variability and significantly less compared to the relatively large outliers produced by other retracking algorithms in this region (see Fig. 9, top). Part of the variability in our current state of the algorithm is due to the Dijkstra algorithm, which is employed to find the best SSHs in our point cloud. Single points at a measurement location can have significant influence on the chosen path since we only allow edge connections between neighboring locations. For example at ∼45.375 ◦ N, we find a standard deviation of almost zero (Fig. 10, bottom) and in the top plot of Fig. 10 it is possible to identify a single point where the SSH-tracks of all runs intersect. Since all paths obtained by Dijkstra algorithm include this point, preceding and succeeding SSHs are influenced and tend to be close to the SSH at this point. In the northern coastal region, the general along-track variability is about in the same range of 20 cm as compared to the open ocean area. The repeatability in the shallow waters off the Isola di Sant’ Andrea is similar to the Croatian coast in the south with a RMS of less than 20 cm. However, we find some significant outliers in some runs which are related to a weak leading edge and strong peaks close to the leading edge (e.g., Fig. 9, bottom). Over the Laguna di Marano a large variability can be detected (Fig. 10) due to strong specular peak waveforms. Small changes in the detected sub-waveforms will have a significant impact 15 Figure 9: (top) Comparison of SSH derived by various retrackers along the Jason-2 pass 196 in the Gulf of Trieste for an arbitrarily chosen cycle (cycle 165). The distance to the nearest coastline (DTC) is provided in light gray. (bottom) Radargram of the corresponding waveforms of inside the study area. The waveform return power is given color coded and has been capped at a power of 300 for visual reasons. Table 1: Median values of the different quality measures for the study site in Trieste. See also top plots in Figs. 12, 13 and 14. Here, ρ represents the correlation, N the percentage of retained cycles and σ the RMS. Retracker SGDR W3POM ICE1 ITR ALES STAR ρ [-] 0.62 0.53 0.90 0.86 0.86 0.90 Open Ocean N [%] σ [m] 85 0.43 85 0.53 99 0.15 99 0.17 97 0.16 99 0.15 Croatian Coast ρ [-] N [%] σ [m] 0.54 59 0.53 0.46 42 0.74 0.34 36 0.83 0.17 3 1.62 0.73 81 0.28 Italian Coast ρ [-] N [%] σ [m] 0.27 8 1.35 0.27 7 1.58 0.63 74 0.44 0.69 88 0.32 0.26 60 0.50 0.80 98 0.22 on the derived SSHs. 5.5. Comparison to Tide Gauge Data In this experiment we compare the SSH estimated using various retracking methods with tide gauge data for Trieste, Italy and Chittagong, Bangladesh. For comparison we utilize cycles 1 to 230 of Jason-2 data acquired over the described study sites (see Sec. 2.1), since for this period hourly tide gauge data as well as data obtained by ALES is available. The tide gauge data between July 2009 and December 2014 are interpolated to the times of crossing for each cycle. As the tide gauge data is not corrected for tidal or atmospheric pressure effects, we also do not apply these corrections to the altimetry data by employing (8). We then remove outliers from the altimetric SSHs (deviation > 3 m from mean SSH) and evaluate correlation and difference RMS with respect to tide gauge data. Due to the large number of available Jason-2 cycles, we set the minimum number of cycles that are required to derive reliable correlations and RMS to 50. The percentage of all cycles which meet the criteria above is shown in Fig. 11. The median results of the following sections are summarized in Tables 1 and 2. 16 Figure 10: Repeatability of STAR. (top) SSHs obtained from 1000 runs on cycle 69, pass 196 at our Trieste study site. Additionally, we show zoomed in sub-plots for coastal and open ocean regions. Colors are chosen randomly. (bottom) Corresponding root mean square difference (RMS) derived from 1000 runs where open ocean region is also provided in a zoomed in sub-plot. Table 2: Median values of the different quality measures for the study site at the coast of Bangladesh. See also bottom plots in Figs. 12, 13 and 14. Here, ρ represents the correlation, N the percentage of retained cycles and σ the RMS. Retracker SGDR W3POM ICE1 ITR ALES STAR ρ [-] 0.94 0.92 0.95 0.97 0.95 0.97 Open Ocean N [%] σ [m] 93 0.40 96 0.56 99 0.43 99 0.37 98 0.38 99 0.33 ρ [-] 0.64 0.31 0.50 0.63 0.14 0.88 Sandbank N [%] σ [m] 15 1.06 24 1.82 55 1.43 72 1.15 47 1.38 78 0.64 ρ [-] 0.29 0.22 0.40 0.46 0.88 Channel N [%] 28 29 34 27 68 σ [m] 1.33 1.34 1.33 1.36 0.72 5.5.1. Overall Correlation We investigate the overall correlation ρ with tide gauge data at each 20 Hz along-track position, using all available cycles (Fig. 11). The results for the Jason-2 mission are shown in Fig. 12 for the study site at the Gulf of Trieste (top) and the coast of Bangladesh (bottom). Over the open ocean area at the Trieste study site (Fig. 12, top), SSHs obtained by ICE1, ITR, ALES and STAR show correlations of more than 0.8 with the tide gauge time series. For W3POM and SGDR we find correlations between 0.3 and 0.7. Over the open ocean, southward of 22.2 ◦ N, in the Bangladesh study area (Fig. 12, bottom), the SSHs derived from the considered retracking methods agree well to each other. In the South, the coastal shelf transitions towards the deep ocean and the correlation begins to drop to about ρ = 0.6 at the border of the study site. Over the deep ocean, the correlation with tide gauge data from the Chittagong station drops rapidly, as already seen by Kusche et al. (2016). Over the central coastal shelf up to about 15 km off the coast, we find correlations of up to 100% between retracked SSHs and tide gauge data. In the immediate coastal areas of the Trieste and Bangladesh study sites, the MLE4 algorithm used to derive the standard ranges in the SGDR data did not converge and consequently no SGDR SSHs are available in these regions. Towards the Croatian coast, we find ρICE1 and ρITR to decline to a level of 0.3 to 0.5 (Fig. 12, top) which agrees to ρW3POM in this region, while ρALES shows a rapid decline to a level of 0 to 0.2 at about 3 km off the coast. ρSTAR also declines towards the coast to a level of 0.5 to 0.7. At the Italian coast, we again find a decline in overall correlation of the retracked SSHs with the tide gauge time series (Fig. 12, top). About 4 to 5 km off the Isola di Sant’ Andrea, ρICE1 and ρALES rapidly 17 Figure 11: Percentage of the total number of available Jason-2 cycles (227) after applying outlier detection and minimum number of cycles requirement. (top) Study site at the Gulf of Trieste. (bottom) Study site at the coast of Bangladesh. The distance to the nearest coastline (DTC) is provided in light gray. decline to a level of 0 to 0.2. While ρALES remains at this level, ρICE1 increases again to a level of 0.8 right at the coast, which agrees well to ρW3POM , ρITR and ρSTAR . Over the Laguna di Marano, we generally find a lower correlation level of 0 to 0.3 or even negative correlation in the southern part of the Laguna for all retracked SSHs. Starting about 15 km off the coast of Sandwip Island at the Bangladesh study site, the overall correlations for all retrackers decline (Fig. 12, bottom). Over the sandbank area, ρICE1 drops to a level of 0.3 to 0.4, ρITR shows a more moderate drop to a level of 0.5 to 0.7 and ρSTAR indicates only a small drop to 0.8, which is achieved due to automatically removing low tide conditions where the sandbank height does not fit to the conditions imposed by the RANSAC algorithm before applying Dijkstra’s algorithm (see Sec. 4.3). Over the strip of about 13 km of open water which is part of the estuary of the Ganges-Brahmaputra-Meghna Delta, we find ρW3POM and ρICE1 at nearly zero, while for ALES, ITR and STAR, ρALES ≈ 0.7, ρITR ≈ 0.8 to 0.9 and ρSTAR ≈ 0.9 are found in the central part of this region. Lower correlations of W3POM and ICE1 while showing similar number of retained cycles and RMS (Table 2) are related to the fact that both methods utilize the total waveform which mainly consists of a strong peak only. For W3POM this will often lead to divergence of the estimation. The heights from the ICE1 algorithm will be influenced by the signal shape of the waveform. This leads to varying parts of the waveform being used to derive the amplitudes and consequently to inconsistencies when deriving the range correction. 5.5.2. Number of Retained cycles We compare the number of cycles of SSH derived from each retracker which can be utilized at each measurement location by iteratively eliminating the largest difference to the tide gauge time series from the time series above until a correlation of at least 0.9 is achieved. This enables a more direct comparison of the individual retracking methods. For evaluation, the number of retained cycles N is plotted for each 20 Hz along-track position in both of our study areas (Fig. 13). Over the open ocean regions of our study sites in the Gulf of Trieste and off the coast of Bangladesh, 18 Figure 12: Correlation ρ of SSHs derived from several retracking algorithms, including our STAR method, with hourly tide gauge data. (top) Study site at the Gulf of Trieste. (bottom) Study site at the coast of Bangladesh. The distance to the nearest coastline (DTC) is provided in light gray. we find good agreement between NICE1 , NALES , NITR and NSTAR with 95 − 100% of retained cycles. For NW3POM and NSGDR we find a slightly lower level of about 90% of retainable cycles resulting from divergence of the parameter estimation. In addition, it is obvious that the time series of altimetry derived SSHs over the deep ocean parts of the Bay of Bengal does not agree well with time series obtained on the coastal shelf. In the Croatian coastal area, all retracking methods experience a small downward peak near 45.425 ◦ N. About 4 km off the coast, we find a rapid drop in NALES and NITR to a level of 0 − 10% retained cycles, with NITR rising back to about 65% of retained cycles 1 km off the coast. For NICE1 we also detect a drop to about 30%, followed by a rise to 80% at about 1 km off the coast. About 60 − 80% of the SSHs can be retained from applying the W3POM model in this coastal area. NSTAR declines from nearly 100% over the open ocean to 80% at about 1 km off the coast. At the Italian coast, we find nearly 100% of retainable cycles up to approximately 3-4 km off the coast for ICE1, ITR, ALES and STAR. For NICE1 , NITR , NALES and NSTAR a steep drop to less than 20% of retained cycles can be detected near 45.675 ◦ N resulting from land influences from the small islands that separate the Laguna di Marano from the Gulf of Trieste (see also Sec. 5.3). The median percentage of retainable cycles for SGDR and W3POM in this coastal area (Table 1) is quite low, indicating difficulties to reach convergence when the total waveform is used. The sub-waveform retrackers provide a larger number of retainable cycles as they are less affected by the land influences. Over the central part of the Laguna di Marano, generally we find a level of 10 − 20% of retained cycles for all retrackers, except STAR, which provides NSTAR ≈ 40%. At the Bangladesh study site, NW3POM and NSGDR start to decline near 22.15 ◦ N towards the coast of Sandwip Island and reach a minimum level of 0 − 15% at about 15 km off the coast. In addition, a decrease of NICE1 , NALES , NITR and NSTAR can be detected. The STAR algorithm is able to retain at least 85% of SSHs of the available cycles in this region. In the northern Bay of Bengal, the tidal amplitude can reach several meters which leads to significantly different land influences on the shape of the waveform between low and high tide. Consequently, this starts to affect the retrieved SSHs at about 15 km off the coast with NALES , NITR and NSTAR starting to decrease towards the coast. For NALES we find a strong drop to 10% 19 Figure 13: Percentage of cycles retained to achieve a correlation of at least 0.9 with hourly tide gauge data from a total number of 227 available cycles. (top) Study site at the Gulf of Trieste. (bottom) Study site at the coast of Bangladesh. The distance to the nearest coastline (DTC) is provided in light gray. in front of the Sandbank region mentioned before followed by an increase to a level of NALES ≈ 50% at the coast. NITR and NSTAR drop to a level of 70 − 80% over the sandbank area. Here, ITR and STAR perform similar, while the overall correlations suggest a lower correlation for ITR in this region compared to STAR, due to already removed SSHs from low tide cycles by the RANSAC algorithm as part of STAR. Over the strip of open water between Sandwip Island and the mainland of Bangladesh, NALES , NITR and NSTAR indicate that all three algorithms are able to retain about 85 − 95% of the available cycles in the central parts of this open water strip, while STAR is able to provide a larger number of cycles towards the coastlines. 5.5.3. Root Mean Square Difference The RMS between SSHs derived from the individual retracking methods and tide gauge data computed at each 20 Hz along-track position provides an additional quality measure (Fig. 14). We apply the same criteria for computation as introduced in Sec. 5.4. Over the open ocean, we generally find results similar to the analysis of the overall correlation with σICE1 , σITR , σALES and σSTAR agreeing well at a level of 0.15-0.2 m at the Trieste site and 0.2-1.0 m at the Bangladesh site and σW3POM and σSGDR being slightly larger compared to the other methods. Close to the Croatian coast, we find σICE1 , σITR and σALES to increase significantly with σALES reaching more than 1.5 m. The large RMS derived for ALES is probably related to the small peaks in front of the leading edge. Since ALES sub-waveforms are selected from the first range gate up to the end of the leading edge, small peaks in front of the leading edge will lead to difficulties during the parameter estimation. For STAR we find a smaller increase in RMS relative to the open ocean area to σSTAR ≈ 0.4 m. In the northern part of the Trieste site, ICE1, ITR, ALES and STAR keep their level of RMS from the open ocean area up to a distance of 4-5 km to the nearest coast. In the northern part of the Bay of Bengal (Fig. 14, bottom), the SSHs from all retracking methods become more noisy northward of about 22.0 ◦ N, with a minimum RMS level of about 0.25 m. Over the 20 Figure 14: Root mean square difference (RMS) derived for all along-track locations after applying the selection criteria mentioned above for all available cycles (Fig. 11) for both study sites. (top) Study site at the Gulf of Trieste. (bottom) Study site at the coast of Bangladesh. The distance to the nearest coastline (DTC) is provided in light gray. sandbank region, the RMS obtained from SGDR, W3POM, ICE1 and ALES show a rapid increase to at least 1 m, while the RMS based on STAR exhibits a relatively smaller increase to a level of about 70 cm up to the coast of Sandwip Island. The same level is found for σSTAR in the small strip of open water between Sandwip Island and the mainland of Bangladesh with σALES and σITR at a similar level in the center of this region. 5.6. Significant Wave Height and Sigma-Nought Besides range corrections, the use of the 3-parameter retracking model also allows to retrieve SWH and sigma-nought σ 0 . The SWHs and sigma-nought are selected based on the heights chosen by the shortestpath algorithm. Theoretically it would be possible to run the Dijkstra algorithm independently on the point-clouds of SWH and sigma-nought. However, we think that the values should be consistent with the selected heights. No independently measured time series of wave height or wind speed is available for our two study sites. Therefore, we compare temporal median, RMS and the number of retained cycles of good SWH and wind speed which were obtained by individual retracking algorithms. We further compare the obtained results to ERA-Interim model data. We will focus on the Bangladesh study site since no model data is available from the Gulf of Trieste area. 5.6.1. Significant Wave Height Fig. 15 shows the median SWH and RMS over all 239 cycles for the Bangladesh study site. Wave heights from SGDR and ALES agree well with the model data over the open ocean while STAR and W3POM are biased. At the same time, the median wave height values of all retrackers decline towards the coast, reaching a minimum over the sandbank area. On the contrary, the model data does not show this decline. Over open ocean, the RMS values from all retrackers agree well with ALES and STAR providing the lowest 21 Figure 15: SWH compared to ERA-Interim model data. Top: median over all cycles, Bottom: RMS over all cycles. RMS at a level of about 60 cm while the model data suggests a level of about 48 cm. At about 10 km off the coast the RMS values from all retrackers increase due to the sandbank’s influence during low tide cycles. The low agreement between the retracked SWH and the model data, especially closer to the coast, can be explained by the estimation of the retracking parameters. All utilized retrackers constrain the SWH parameter to positive values since wave heights below zero are not physically meaningful. This sometimes leads to forcing the wave height to be zero during the estimation for individual waveforms since the leading edge, necessary for SWH parameter estimation, is only represented by a limited amount of range gates during calm sea state conditions. For ALES method the problem appears less severe since it is a two stage procedure in which SWH is estimated and averaged along-track during the first stage and kept fixed during the second stage. For sub-waveform retrackers such as STAR the problem will occur more often in case the selected sub-waveform which contains the leading edge is relatively small. In case the zero wave heights are not utilized to derive the median and RMS value, SGDR, ALES and STAR agree well with the model data (Fig. 16, Table 3). Over the sandbank area and the channel between Sandwip Island and the main land, SGDR and W3POM quality decreases due to the low number of available cycles (Fig. 13, bottom). Zero wave heights occur for about 10-15 % of the cycles during calm sea state conditions at the Bangladesh study site, especially in coastal areas. Similar observations are made for the Trieste study site. In future, STAR may be extended to a two-step procedure similar to ALES in order to counter these effects. We also applied our method to reduced SAR (RDSAR) waveforms, which are conventional altimetry like waveforms that are derived from the SAR signal during post-processing. The RDSAR data from Cryosat-2 data showed that the problem does not occur when zero-padding is applied during the derivation of the reduced SAR waveforms due to doubling the number of range gates available which allows better estimation of SWH (not shown here). 5.6.2. Wind Speed Wind speed has been derived from the estimated amplitudes utilizing the 2-parameter model by Gourrion et al. (2002) as described in AVISO (2015). The model input consists of the retracked sigma-nought and SWH. Here, we utilized only non-zero SWH in order to keep the wind speed estimate unbiased from problems in SWH estimation. Similar to SWH, we display the median and RMS for each retracker and from the ERAInterim model data at each measurement position. Over the open ocean, median wind speed and RMS from SGDR, W3POM, ICE1, ITR and STAR agree well with the wind speed derived from ERA-Interim model data (Fig. 17, Table 4). However, SGDR 22 Figure 16: SWH compared to ERA-Interim model data. Top: median over all cycles, Bottom: RMS over all cycles. All zero-SWH removed. Table 3: Median values of SWH median and RMS over different regions along the track at the Bangladesh study site. All zero-SWH removed. M denotes the median and σ the RMS. Retracker SGDR W3POM ALES STAR ERA-I Open Ocean M [m] σ [m] 0.94 0.69 1.06 0.80 0.78 0.57 0.89 0.59 0.84 0.45 Sandbank M [m] σ [m] 0.59 0.80 1.13 1.20 0.66 0.86 0.62 0.68 0.63 0.38 Channel M [m] σ [m] 0.67 0.82 0.65 0.71 - and ICE1 are slightly biased above the model data, while W3POM, ITR and STAR are slightly biased below the model data. ALES shows a stronger bias with respect to the model data. From about 22.15◦ N towards the coast the waveforms start to get influenced by land returns leading to peaks moving along the trailing edge towards the leading edge. Retrackers that utilize the full waveform, such as SGDR, W3POM and ICE1, return amplitude estimates which are biased by the peak influence and thus do no longer provide reliable wind speed. Sub-waveform method, such as ITR, ALES and STAR also show a slight decline in wind speed, and over the sandbank area where one finds mostly specular peak waveforms, the derived wind speed, especially during low tide, is no longer meaningful. In the center of the channel between Sandwip Island and the Bangladesh main land only ALES and STAR are able to provide meaningful wind speed. The reason for the bias in wind speed between SGDR and W3POM and STAR is due to the chosen estimation model. For the SGDR data a MLE4 estimation method is employed utilizing a 4 parameter model (Amarouche et al., 2004). The fourth parameter is the off-nadir angle that can be derived from the slope of the trailing edge and which is assumed to be zero for the 3-parameter models. The off-nadir angle influences the estimation of the amplitude (Amarouche et al., 2004, Eq. 8) which will lead to a general bias in amplitude in case the off-nadir angle is different from zero. Here, the derived off-nadir angle is slightly positive which leads to a smaller amplitude and consequently higher estimated wind speed. Even small changes in sigma-nought have significant influence on the derived wind speed. However, for sub-waveform methods, such as STAR, it is not feasible to try and estimate the off-nadir angle since the sub-waveforms do not include enough range gates from the trailing edge for a reliable estimation. 23 Figure 17: Wind Speed compared to ERA-Interim model data. Top: median over all cycles, Bottom: RMS over all cycles. Table 4: Median values of wind speed median and RMS over different regions along the track at the Bangladesh study site. M denotes the median and σ the RMS. Retracker SGDR W3POM ICE1 ITR ALES STAR ERA-I Open Ocean M [m/s] σ [m/s] 4.57 2.30 3.85 1.89 4.85 2.33 4.06 2.02 3.35 1.72 3.86 1.91 4.60 2.12 Sandbank M [m/s] σ [m/s] 2.31 1.86 0.49 1.63 0.23 1.90 1.76 1.98 2.42 1.68 2.43 1.77 3.58 1.73 Channel M [m/s] σ [m/s] 0.10 0.50 -0.15 0.38 0.01 1.61 1.02 1.68 2.31 1.70 2.94 1.37 5.7. Application to Jason-1 and Envisat Data We investigate the application of STAR to altimetry data from the Jason-1 interleaved period to the Trieste site (Fig. 2(a)) and to Envisat data for the Banlgadesh site (Fig. 2(b)). However for Jason-1 interleaved, there is no ALES-data available for comparison. Here, we focus on the number of cycles retained to reach a correlation of > 0.9 (Fig. 18 and 19, top), as well as the RMS at each along-track position (Fig. 18 and 19, bottom). For Jason-1, we found 95 cycles that overlapped with the available time period for the tide gauge data at the Trieste station, while we found only 32 cycles of Envisat data that overlapped with the tide gauge period available for the Chittagong station. Utilizing data from the Jason-1 mission over the open ocean at the Trieste study site, ICE1, ITR and STAR show more retained cycles, as well as a significantly smaller RMS compared to SGDR- and W3POM-based SSHs. In the coastal area over about the last 5 km in front of the Croatian coast, STAR derived SSHs fit well to the tide gauge data (Fig. 18). After crossing parts of the Croatian mainland, the track transitions back to the ocean and we find ICE1, ITR and STAR retaining significantly more cycles compared to SGDR- and W3POM. The general level of retained cycles is lower due to signal losses that happened between the coasts of Croatia and Italy during nine of the Jason-1 interleaved cycles. At the Italian coast, all ITR, ICE1 and STAR are able to maintain a high quality of SSHs in the coastal area with which decreases only slightly over the last 1-2 km off the coast. Additionally, we have utilized Envisat track 416 for our experiments, which crosses our Trieste study site from the north-east to the south-west. However, the overlapping period with the available tide gauge 24 Figure 18: (top) Percentage of cycles retained to achieve a correlation of at least 0.9 with the hourly tide gauge data from a total number of 95 available cycles of the Jason-1 interleaved mission. (bottom) Root mean square difference (RMS) derived for all along-track locations. The distance to the nearest coastline (DTC) is provided in light gray. data was less than one year and deriving any correlations or RMS from this short period containing only 10 cycles of the 35-day Envisat repeat orbit would not be meaningful. Nonetheless, SSHs derived from these 10 cycles of Envisat data compared well to the available tide gauge data (not shown here). For the study site at the coast of Bangladesh, we found an overlap period of more than 3 years between 32 cycles (2007 - 2010) of Envisat data and the Chittagong tide gauge which allows to derive meaningful correlations and RMS differences. Over the open ocean area, the number of retained cycles and the RMS agree well between all the considered retracking methods with W3POM bases SSHs being slightly more noisy (Fig. 19). About 15 km before the Envisat track reaches Sandwip Island, the differences between the individual retracking methods become evident. Ratios of retained cycles for W3POM and SGDR show a rapid drop to less than 25% over the sandbank area and a gradual increase towards the coast of Sandwip Island to a level of 35% and 60%, respectively. This behavior is combined with a strong increase in RMS differences which increase to more than 1 m. Similar behavior can be observed for ICE1 and ITR, which both show a smaller drop in the number of retained cycles over the last 15 km towards the coast to a level of about 75%, but their corresponding RMS increases significantly to values greater than 1 m. For ALES there is no data available over the last 15 km in front of Sandwip Island. STAR shows the smallest drop in number of retained cycles and recovers back to a level of more than 90% close to Sandwip Island. Over the small strip of open water between Sandwip Island and the mainland of Bangladesh, the coastal retrackers ITR, ALES and STAR retain about 90% of the available cycles providing SSHs that fit well to the tide gauge data. SGDR, W3POM and ICE1 are not able to provide more than 0 − 25% of retained cycles and exhibit significantly higher RMSs in this region. 6. Conclusion A novel method for analyzing altimetric waveforms and deriving sea surface heights, SWH and sigmanought has been suggested. The proposed technique partitions the total waveform into individual sub25 Figure 19: (top) Percentage of cycles retained to achieve a correlation of at least 0.9 with the hourly tide gauge data from a total number of 32 available cycles of the Envisat mission. (bottom) Root mean square differences (RMS) derived for all along-track locations. The distance to the nearest coastline (DTC) is provided in light gray. waveforms which can be analyzed in combination with existing retracking models. The sea surface heights provided by STAR were found to be of at least the same quality or better compared to existing conventional and coastal retracking methods over the open ocean, as well as in coastal regions. In addition, correlations with tide gauge data revealed generally more usable cycles close to the coast in combination with lower root mean square differences compared to existing methods. Of course, depending on the retracking model that is combined with the derived sub-waveforms, it is possible to derive significant wave height and backscatter in the same way. Comparison of the derived sub-waveforms with the Hwang et al. (2006) method reveal good correspondence between identified parts of the waveform. We found the influence of the random component of STAR on the SSH results to be at a level of less than 5 cm over the open ocean and at about 20 cm in coastal regions. This is in range with modifications that can be applied to conventional retracking algorithms including biases between different retracking methods, different weighting schemes or varying estimators; these effects are considered to be in the order of a few centimeters. Sea surface heights derived from the STAR algorithm have been extensively validated for Jason-2 data and compared to five independent available retracking methods, as well as hourly in-situ tide gauge measurements. At the study sites in the Gulf of Trieste, Italy and off the coast of Bangladesh, we found varying surface conditions including (deep) open ocean and shallow coastal waters, temporally submerged sandbanks and transition zones between river estuaries and the ocean. Consequently, deriving five partitionings of the total waveform enabled the STAR algorithm to handle a larger variety of waveform shapes compared to existing coastal retracking algorithms. Examination of estimated SWH and wind speed revealed good agreement to other retracking algorithms as well as model data from ERA-Interim. Furthermore, we applied STAR to altimetry data from the Jason-1 interleaved period, as well as Envisat , which also resulted in significant improvements in the quality of coastal sea surface heights. We are confident that the STAR method will enable a wide range of further studies, including a more comprehensive validation of significant wave height and sigma-nought. In this context, we will also consider an improved selection of final retacking results by considering SWH, sigma-nought etc. instead of only utilizing the SSHs. In addition, the algorithm can be improved further by tuning the a-priori hyperparameters 26 that control, e.g., the resolution of the sub-waveform, as well as extending the Dijkstra algorithm to reduce the impact of potentially non-optimal sea surface heights of neighboring measurement locations. The derived sub-waveforms will be combined with different available waveform models in order to adapt and extend the concept to other regions, such as rivers and lakes. One might also consider a slightly different approach by using the partitioning into sub-waveform to derive weighting schemes for retracking of the whole waveform. Acknowledgements We acknowledge funding through the BanD-AID (KU 1207/19-1) project. We also thank the associate editor and three anonymous reviewers for their constructive comments which helped us to significantly improve the manuscript. References Amarouche, L., Thibaut, P., ZaZanife, O. Z., Dumont, J.-P., Vincent, P., & Steunou, N. (2004). Improving the Jason-1 Ground Retracking to Better Account for Attitude Effects. Marine Geodesy, 27 , 171–197. doi:10.1080/01490410490465210. AVISO (2015). OSTM / Jason-2 Products Handbook . CNES / NASA http://www.aviso.altimetry.fr. SALP-MU-M-OP15815-CN, Issue 1.9. Bioucas-Dias, J. M., Plaza, A., Dobigeon, N., Parente, M., Du, Q., Gader, P., & Chanussot, J. (2012). Hyperspectral unmixing overview: Geometrical, statistical, and sparse regression-based approaches. IEEE Journal of Selected Topics in Applied Earth Observations and Remote Sensing, 5 , 354–379. Birkett, C. M., & Beckley, B. (2010). Investigating the performance of the Jason-2/OSTM radar altimeter over lakes and reservoirs. Marine Geodesy, 33 , 204–238. Brown, G. S. (1977). The average impulse response of a rough surface and its applications. IEEE Trans. Antennas Propagat., 25 , 67–74. Chelton, D. B., Ries, J. C., Haines, B. J., Fu, L.-L., & Callahan, P. S. (2001). Satellite altimetry. In L.-L. Fu, & A. Cazenave (Eds.), Satellite Altimetry and Earth Sciences: A Handbook of Techniques and Applications chapter 1. (pp. 1–132). Academic Press. Chelton, D. B., Walsh, E. J., & MacArthur, J. L. (1989). Pulse compression and sea level tracking in satellite altimetry. J. Atmos. Oceanic Technol., 6 , 407–438. Dee, D. P., Uppala, S. M., Simmons, A. J., Berrisford, P., Poli, P., Kobayashi, S., Andrae, U., Balmaseda, M. A., Balsamo, G., Bauer, P., Bechtold, P., Beljaars, A. C. M., van de Berg, L., Bidlot, J., Bormann, N., Delsol, C., Dragani, R., Fuentes, M., Geer, A. J., Haimberger, L., Healy, S. B., Hersbach, H., Hólm, E. V., Isaksen, L., Kållberg, P., Köhler, M., Matricardi, M., McNally, A. P., Monge-Sanz, B. M., Morcrette, J.-J., Park, B.-K., Peubey, C., de Rosnay, P., Tavolato, C., Thépaut, J.-N., & Vitart, F. (2011). The era-interim reanalysis: configuration and performance of the data assimilation system. Quarterly Journal of the Royal Meteorological Society, 137 , 553–597. doi:http://dx.doi.org/10.1002/qj.828. Deng, X. (2003). Improvement of Geodetic Parameter Estimation in Coastal Regions from Satellite Radar Altimetry. Ph.D. thesis Curtin University of Technology. Dijkstra, E. W. (1959). A note on two problems in connexion with graphs. Numerische Mathematik , 1 , 269–271. ESA (2007). Envisat RA2/MWR Product Handbook . European Space Agency (ESA) https://earth.esa.int/handbooks/ ra2-mwr/. URL: https://earth.esa.int/handbooks/ra2-mwr issue 2.2. Fenoglio-Marc, L., Dinardo, S., Scharroo, R., A., R., M., D. S., B., L., Becker, M., Benveniste, J., & Weiss, R. (2015). The German Bight: A Validation of CryoSat-2 altimeter data in SAR mode. Advances in Space Research, 55 , 2641 – 2656. doi:10.1016/j.asr.2015.02.014. 27 Fischler, M. A., & Bolles, R. C. (1981). Random sample consensus: a paradigm for model fitting with applications to image analysis and automated cartography. Communications of the ACM , 24 , 381–395. Fu, L.-L., & Cazenave, A. (Eds.) (2001). Satellite Altimetry and Earth Sciences: A Handbook of Techniques and Applications. Academic Press. Gommenginger, C., Thibaut, P., Fengolio-Marc, L., Quartly, G. D., Deng, X., Gómez-Enri, J., Challenor, P., & Gao, Y. (2011). Retracking altimeter waveforms near the coasts: A review of retracking methods and some applications to coastal waveforms. In S. Vignudelli, A. G. Kostianoy, P. Cipollini, & J. Benveniste (Eds.), Coastal Altimetry. Springer-Verlag Berlin Heidelberg. Gourrion, J., Vandermark, D., Bailey, S., Chapron, B., Gommenginger, G. P., Challenor, P. G., & Srokosz, M. A. (2002). A two-parameter wind speed algorithm for Ku-Band altimeters. J. Atmos. Oceanic Technol., 19 , 2030–2048. Halimi, A., Mailhes, C., Tourneret, J.-Y., & Snoussi, H. (2016). Bayesian estimation of smooth altimetric parameters: Application to conventional and delay/doppler altimetry. IEEE Transactions on Geoscience and Remote Sensing, 54 , 2207–2219. Halimi, A., Mailhes, C., Tourneret, J.-Y., Thibaut, P., & Boy, F. (2013). Parameter estimation for peaky altimetric waveforms. IEEE Trans. Geosci. Remote Sensing, 51 , 1568–1577. Hayne, G. S. (1980). Radar altimeter mean return waveforms from near-normal-incidence ocean surface scattering. IEEE Trans. Antennas Propagat., 28 , 687–692. Hwang, C., Guo, J., Deng, X., Hsu, H.-Y., & Liu, Y. (2006). Coastal gravity anomalies from retracked geosat/gm altimetry: improvement, limitation and the role of airborne gravity data. Journal of Geodesy, 80 , 204–216. Hwang, C., Kao, E., & Parsons, B. (1998). Global derivation of marine gravity anomalies from SEASAT, GEOSAT, ERS-1 and Topex/Poseidon altimeter data. International Geophysical Journal, 134 , 449–459. Kusche, J., Uebbing, B., Rietbroek, R., Shum, C. K., & Khan, Z. H. (2016). Sea level budget in the bay of bengal (20022014) from grace and altimetry. Journal of Geophysical Research: Oceans, 122 . doi:10.1002/2015JC011471. Lafferty, J. D., McCallum, A., & Pereira, F. C. N. (2001). Conditional random fields: Probabilistic models for segmenting and labeling sequence data. In Proc. International Conference on Machine Learning (pp. 282–289). URL: http://dl.acm.org/ citation.cfm?id=645530.655813. Lee, H., Shum, C., Emery, W., Calmant, S., Deng, X., Kuo, C.-Y., Roesler, C., & Yi, Y. (2010). Validation of jason-2 altimeter data by waveform retracking over california coastal ocean. Marine Geodesy, 33 , 304–316. Martin, T. V., Zwally, H. J., Brenner, A. C., & Bindschadler, R. A. (1983). Analysis and retracking of continental ice sheet radar altimeter waveforms. Journal of Geophysical Research: Oceans (1978–2012), 88 , 1608–1616. Maus, S., Green, C. M., & Fairhead, J. D. (1998). Improved ocean-geoid resolution from retracked ERS-1 satellite altimeter waveforms. Geophysical Journal International, 134 , 243–253. Olshausen, B. A., & Field, D. J. (1997). Sparse coding with an overcomplete basis set: A strategy employed by v1? Vision Research, 37 , 3311 – 3325. URL: http://www.sciencedirect.com/science/article/pii/S0042698997001697. doi:http:// dx.doi.org/10.1016/S0042-6989(97)00169-7. Passaro, M., Cipollini, P., Vignudelli, S., Quartly, G. D., & Snaith, H. M. (2014). ALES: A multi-mission adaptive subwaveform retracker for coastal and open ocean altimetry. Remote Sensing of Environment, 145 , 173–189. Quartly, G. D., Srokosz, M. A., & McMillan, A. C. (2001). Analyzing altimeter artifacts: Statistical properties of ocean waveforms. Journal of Atmospheric and Oceanic Technology, 18 , 2074–2091. Rosmorduc, V., Benveniste, J., Bronner, E., Dinardo, S., Lauret, O., Maheu, C., Milagro, M., & Picot, N. (2011). Radar altimetry tutorial. http://www.altimetry.info/. URL: http://www.altimetry.info/ benveniste, J. (ESA) and Picot, N. (CNES) Ed. Sandwell, D. T., & Smith, W. H. F. (1997). Marine gravity anomaly from Geosat and ERS-1 satellite altimetry. Journal of Geophysical Research, 102 , 10,039–10,054. Sandwell, D. T., & Smith, W. H. F. (2005). Retracking ERS-1 altimeter waveforms for optimal gravity field recovery. Geo- 28 physical Journal International, 163 , 79–89. doi:10.1111/j.1365-246X.2005.02724.x. Savcenko, R., & Bosch, W. (2008). EOT08a empirical ocean tide model from multi-mission satellite altimetry. DGFI Report No. 81. Tropp, J. A., Gilbert, A. C., & Strauss, M. J. (2006). Algorithms for simultaneous sparse approximation. part i: Greedy pursuit. Signal Processing, 86 , 572–588. Uebbing, B., Kusche, J., & Forootan, E. (2015). Waveform retracking for improving level estimations from topex/poseidon, jason-1, and jason-2 altimetry observations over african lakes. IEEE Transactions on Geoscience and Remote Sensing, 53 , 2211–2224. Wang, Y. (2004). Ocean Tide Modeling in Southern Ocean. Technical Report 471 Department of Civil and Environmental Engineering and Geodetic Science, The Ohio State University, USA Columbus, Ohio 43210. Wright, J., Ma, Y., Mairal, J., Sapiro, G., Huang, T. S., & Yan, S. (2010). Sparse representation for computer vision and pattern recognition. Proceedings of the IEEE , 98 , 1031–1044. 29
1cs.CV
arXiv:1712.08328v1 [math.OC] 22 Dec 2017 A simple introduction to Karmarkar’s Algorithm for Linear Programming Sanjeev Saxena∗ Dept. of Computer Science and Engineering, Indian Institute of Technology, Kanpur, INDIA-208 016 December 21, 2017 Abstract An extremely simple, description of Karmarkar’s algorithm with very few technical terms is given. 1 Introduction A simple description of Karmarkar’s algorithm[5] together with analysis is given in this paper. Only knowledge of simple algebra, vector dot product and matrices is assumed. Even though the method is described in several books [8, 1, 2, 3, 7], analysis is either left out [8] or is fairly complicated. We show that the presentation of Roos, Terlaky and Vial[6] can be further simplified, (mainly) by using only essential notation. Allmost all results in this paper are from standard textbooks (see References). Let A be an m × n matrix of rank m and e is a vector of all ones. Karmarkar’s Problem is: min cT x subject to constraints Ax = 0, eT x = 1 and x ≥ 0. Further, it is assumed that optimal value of cT x is zero and all ones vector is feasible, i.e., Ae = 0. We have to either find a point of cost 0 or show that none exist We first scale the variables: x0 = xn, then the problem becomes min cT (x0 /n) or equivalently min cT (x0 ) subject to Ax0 = 0, eT x0 = n and x0 ≥ 0. We will drop the primes, and the problem is[6]: ∗ E-mail: [email protected] 1 min cT x subject to constraints Ax = 0, eT x = n and x ≥ 0. Remark: Problem is trivial if cT e = 0, hence we assume that cT e > 0. We will assume that all m + 1 equality constraints are linearly independent (else we eliminate redundant rows of A). We need few definitions. Standard simplex consists of points in n dimensions s.t. eT x = n, x ≥ 0. The centre of the simplex is e = (1, 1, . . ., 1). Let R be the radius of outer sphere, the smallest sphere containing the standard simplex (circumscribes standard simplex). R is the distance from e to one of the corner point (see Figure for an example in three dimensions) of the standard simplex (say, (0, 0, . . ., n)), thus R2 = (0p− 1)2 + . . . + (0 − 1)2 + (n − 1)2 = (n − 1)2 + (n − 1) = n(n − 1), or R = n(n − 1). Let r be the radius of another sphere— the largest sphere centred at e and completely inside the standard simplex (inscribed inside the standard simplex). This sphere will be tangent to each face. Each face will have one coordinate as 0. By symmetry, all other coordinates at the point of contact will be same (say w). As the point of contact is on the standard simplex S, 0 + w + w + . . . + w = n or (n − 1)w = n or w = n/(n − 1). Hence, r2 = (0−1)2 +(w−1)2 +. . .+(w−1)2 = 1+(n−1)(w−1)2 = 1+ Or r r= 1 n = n−1 n−1 n n−1 We take e = (1, 1, . . ., 1) as the starting point (which by assumption is feasible). Then, we minimise the objective function over a smaller sphere, which we will call the inner sphere, having same centre e, but radius αr, less than r (we will see in Section 5.2 that α can be chosen as 1/(r + 1)). Let us assume that the minimum occurs at point z. Then, in next iteration, we take the starting point as z. The problem of minimisation on sphere is 2 discussed in next section (Section 2). Finally, the point z is mapped to e and the process repeated; the details of mapping are in Section 4. In Section 3, it is shown that the objective value at next point z is a fraction of that at the initial point e. 2 Mathematical Preliminaries Let P be a point in (possible hyper) plane and n̂ a unit vector normal to it. If P0 is any point in plane, then the (vector) dot product will be zero, i.e., P P0 • n̂ = 0. Writing in full, n1 (x1 − x01 ) + n2 (x2 − x02 ) + . . . + nk (xk − x0k ) = 0 or equivalently, n1 x1 + n2 x2 + . . . + nk xk = n1 x01 + n2 x02 + . . . + nk x0k = C Thus, for a • x = b, normal will be in the direction of vector a. Equation of sphere with centre Q as β is: (x − β) • (x − β) = r2 Let P be any point in plane a • x = b, then we know that a • xP = b. If we want QP to be perpendicular to plane, then (xP − β) = (constant)a P Consider the problem [4]: min cT x subject to (x − a)2 ≤ ρ2 . There are two points on the sphere (see figure for an example in two dimensions), where planes parallel to given plane can be tangent— one corresponding to maxima and other minima. These are +n and −n. These points (say “P ”) are in direction ±n̂ (a unit vector in direction of c) with length |xP − β| = r. Thus, to minimise cT x over our sphere, we start at the centre β and take a step of length r in direction −cT Less informally, if c = 0, all points on the sphere are optimal. If c 6= 0, the solution is obtained by taking a step of length ρ (radius of sphere) from the centre a in the direction −c; this can be seen by considering “parallel” planes cT x =constant. The point at which minimum will be attained will be the point of contact on the sphere to a tangent plane. 3 Next [4] consider the problem: min cT x subject to Ax = b and (x − 2 a) ≤ ρ2 . If c = 0, all points common to (i.e., on the intersection of) sphere and the plane are optimal. If c 6= 0, let c̄ be the orthogonal projection of c onto the plane Ax = b. If c̄ = 0, then c is a linear combination of rows of A and the objective function (on the intersection of sphere and plane) is constant, and all “feasible” points are also optimal. If c̄ 6= 0, then the solution is obtained by taking a step of length equal to the radius of lowerdimensional sphere (intersection of our sphere and plane Ax = b) from the centre a in the direction −c̄. P 3 Solution on inner Sphere Let us consider the problem: min cT x subject to Ax = 0, i xi = n and P 2 2 2 i (xi − 1) < α r , i.e, we are minimising only over points of the inner sphere. As the inner sphere is completely inside the standard simplex, we can drop the constraint eT x = n (and also x ≥ 0), and the problem becomes P min cT x s.t. Ax = 0 and (xi − 1)2 < α2 r2 . As the point e is feasible, Ae = 0, e lies on the plane Ax = 0. Moreover, as e, the centre of inner sphere, lies on Ax = 0, the intersection of Ax = 0 and the inner sphere will be a “sphere” of the same radius αr but in lower dimension. (e.g., intersection of a sphere and a plane containing the centre is a circle with same radius and centre). The minimum value of a linear function on sphere will be at a point (lower one) where linear function touches the sphere. The radius vector at that point will be perpendicular to the plane. Let us assume that p̂ is a unit vector in that direction. Then the point at which minimum will be attained will be e − p̂(radius). Thus, for outer sphere it will be (say) zR = e − p̂R and for the inner sphere it will be zα = e − p̂αr. We will see how to determine p̂ later (see Section 4.2). As the outer sphere completely contains the solution space, the minimum value (of objective function cT x) will be smaller than (or equal to) the actual optimal value which is zero. Thus, (assuming minimum value is at zR ) P 0 ≥ cT zR = cT (e − p̂R) or cT p̂R ≥ cT e T Thus, cT p̂ ≥ cRe As the inner sphere is inside the simplex, value of the objective function can not be less than that on the simplex. But, as the optimal value on simplex is zero, optimal value on the inner sphere is non-negative. If the 4 minimum value occurs at zα on the inner sphere, then the value of objective function is: 0 ≤ cT zα = cT (e − p̂αr) or cT p̂αr ≤ cT e But as cT e R ≤ cT p̂, we get ! T T T T c zα = c e − c p̂αr ≤ c e − cT e αr αr = cT e 1 − R R   Thus, if we start with initial solution e, then zα (the next solution) is  αr an improvement (in value of objective function) by a factor of 1 − R over the initial solution. 4 Karmarkar Transform and Algorithm We will like to map the new point z again to e to repeat the process. Thus, for a = (a1 , a2 , . . ., an ) and x = (x1 , x2 , . . ., xn ), we define the transform y = Ta (x) with (for i = 1, . . ., n) ai xi yi = n P j aj xj If all ai s and xi s are non-negative (at least ai xi should be non-zero), each component of transform will be less than n and sum of all coordinates will be n, thus the range is again our standard simplex. Moreover, if b =  1 1 1 −1 a = a1 , a2 , . . ., an , then Tb will be the inverse transformation. Thus this transformation is one-to-one on our standard simplex. Remark: This can also be seen directly. If Ta (x) = Ta (y), then xy11 = P P x1 xn xi = yi = 1, we have r = 1. y2 = . . . = yn = r (say). But as Moreover, if λ is any number then if y 0 = Ta (λx) then nλai xi nλai xi nai xi yi0 = P = P =P = yi λaj xj λ aj xj aj xj Thus, Ta (λx) = Ta (x). 4.1 Modified Problem Assume that we are applying transform Ta (with ai = 1/zi ), then point z will be mapped to e. Let D be a diagonal matrix with diagonal entries: D = diag(a1 , . . ., an ). 5 If z is any feasible point, then for any positive x > 0 satisfying eT x = 1, we saw that there is a unique point ξ (which depends on x) s.t. x = Tz (ξ). P Remark: x = Tz (ξ) implies xi = zi ξi /( zi ξi ), thus ξi = ρ xzii where ρ is P such that ξi = 1. P P Then, equation Ax = 0 is equivalently to j Aij xj = 0 or j Aij ρxj = 0 P or equivalently, Aij ξj zj = 0 or Aξz = 0. P P The objective function cT x = ci xi = ρ1 ci ξi zi . As optimal value of cT x is zero, it follows that the optimal value of the transformed objective P function ci ξi zi is also 0. Replacing ξ by x0 and using Z = diag(z1 , . . ., zn ), the transformed problem is: min(Zc)T x0 subject to AZx0 = 0, eT x0 = n and x0 ≥ 0. Moreover, as z is a feasible point Az = 0 or equivalently AZe = 0, thus e is again feasible. We can thus repeat the previous method with Zc instead of c and AZ instead of A. In other words, we have to minimise the modified objective function over inscribed sphere of radius αr i.e., the “modified” problem is: min(Zc)T x subject to AZx = 0, eT x = n and ||x − e|| ≤ αr. 4.2 Result from Algebra– Projection Matrix Assume that A is m×n matrix, then rank of A is said to be m, with m < n iff all m rows of A are linearly independent, i.e., β1 A1 + β2 A2 + . . . + βm An = 0 (here 0 is a row vector of size n) has only one solution βi = 0. Thus, if v is any 1 × m matrix (a column vector of size m), then vA = 0 implies v = 0. We use the fact that the matrix AAT has rank m and is invertible1 . Let A be an m × n matrix, then Ax = b (hence Ax = 0) represents a set of m equations. Each equation will be a hyperplane in n dimensions. Let v be a vector of size n, we will like to “project” v onto the (lower dimension or intersection of) hyperplane Ax = b. If P = pv is the projection, then [9], we wish to write p = P v, as best as possible, as p = P v = α1 a1 + α2 a2 + . . . + αm am where a1 , . . ., am are rows of A. Projection p will again be a vector of size n. This can be written as p = AT α. 1 As A is m × n matrix, AT will be n × m matrix. The product AAT will be an m × m square matrix. Let y T be an m × 1 matrix (or y is a row-vector of size m). Consider the equation (AAT )y T = 0. Pre-multiplying by y we get yAAT y T = 0 or (yA)(yA)T = 0 or the dot product < yA, yA >= 0 which, for real vectors (matrices) means, that each term of yA is (individually) zero, or yA = 0, which implies y is identically zero. Thus, the matrix AAT has rank m and is invertible. 6 The error of projection (or rejection) E = v − p = v − P v will also be a vector of size n. Then as error E can not be in these hyperplane, i.e., it should be “perpendicular” to these hyperplanes, thus we want AE = 0. Or A(v − p) = 0, or A(v − AT α) = 0, thus Av = AAT α, or α = (AAT )−1 Av. T )−1 Av, or P = AT (AAT )−1 A. Hence, p = P v = AT α, or P v = AT (AA   Or, E = v − P v = v − AT (AAT )−1 Av = I − AT (AAT )−1 A v Thus, to summarise, projection matrix is P = AT (AAT )−1 A and Rejection matrix (to get the part perpendicular to the hyperplanes) is: I − AT (AAT )−1 A 4.3 Algorithm Start the algorithm with x = e and find z, the optimal value on the inscribed sphere of radius αr (we will see more details of this step later). In a typical iteration, we next apply a transformation Tz −1 to map z to e (we need a transformation Tb such that z gets mapped to e, then b = 1/z). Modify A and c and find a new z (say z 0 ), the optimal value on the inscribed sphere of radius αr. Remark: As we know that transformed value of z is e, transform Tz −1 is not actually applied, only the values of A and c are updated. 0 Then apply inverse transformation Tz−1 −1 (or Tz ) to map z to original 0 space, to get the value of x for next iteration. The formal algorithm is (value of α is fixed to 1/(r + 1) in Section 5.2): q n 1 Initialise: r = n−1 , α = r+1 , x = e = (1, . . ., 1) Main step: If cT x < , return current x as solution of desired accuracy. Let D = diag(x1 , . . ., xn ) AD I P = ! Let  cP = 1−P T  PP cP ||cP || z = e − αrp̂ nDy x = T e Dy p̂ = 7 T −1  P (cD)T 5 Analysis—Potential Function For analysis, we define a potential function: T Φ(x) = n log c x − n X log xi i=1 As eT x = n we have n1 xi = 1. But as Arithmetic mean is greater than or equal to geometric mean: P P P xi Q 1/n 1= or taking logs, n1 log xi ≤ 0, or log xi ≤ 0, or n ≥ ( xi ) Φ(x) ≤ n log cT x or cT x ≥ exp  Φ(x) n  Next observe that Φ(λx) = n log cT (λx) − n X log(λxi ) i=1 =   T log c x + log λ − n X log xi + = n log c x − n X ! log λ i=1 i=1 T n X log xi = Φ(x) i=1 Let x be a positive vector in our standard simplex and let y = Tx (z), then nxi zi yi = P , or Φ(y) = Φ(Tz (x)) = Φ(xz) x i zi Moreover, Φ(xz) = n log cT (xz) − P log zi Finally, Pn i=1 log xi zi = n log cT xz − P X log zi log xi − ∆Φ = Φ(x) − Φ(y) = Φ(x) − Φ(xz) = n log cT x − n X  log xi − n log cT xz − log xi − X  i=1 = n log cT x cT xz + X log zi T x But log ccT xz is the ratio of original and transformed problems, which we saw  r reduces by at least 1 − α R . Thus: 8 r ∆Φ ≥ −n log 1 − α R   + X log zi We will show that ∆ is more than a constant. But, before continuing with analysis, we need some more results from algebra. 5.1 Function Ψ In this section, all logs are to base e. Assume that |x| < 1. As log(1 + x) = 2 3 4 x − x2 + x3 − x4 + . . ., for −1 < y < 0, (let y = −x) we have 3 4 2 y − log(1 + y) = −x − log(1 − x) = x2 + x3 + x4 + . . . > 0 We define[6] Ψ(x) = x − log(1 + x). Observe that Ψ(0) = 0 Hence, 2 3 4 Ψ(x) = x2 − x3 + x4 − . . . And, Ψ(x) ≥ 0 for x > −1 Claim 1 If x > 0 and a2 = b2 + c2 , then if ax, bx, cx are greater than −1 (for log(1 + hx) to be defined), then Ψ(−|a|x) > Ψ(bx) + Ψ(cx) Proof: From a2 = b2 + c2 , we know that |a| ≥ |b| and |a| ≥ |c|. Without loss of generality, assume a < 0, then −|ax| = ax and we have 3 3 4 4 2 2 Ψ(ax) = a 2x − a 3x + a 4x − . . . 2 2 3 3 4 4 Ψ(bx) = b 2x − b 3x + b 4x − . . . 3 3 4 4 2 2 Ψ(cx) = c 2x − c 3x + c 4x − . . . As a2 = b2 + c2 , coefficients of x2 on both sides are equal. 3 3 3 3 3 We thus need to compare − a 3x with − (b +c3 )x . As a2 = b2 + c2 , a3 = ab2 + ac2 . Thus, we are comparing −x(ab2 + ac2 ) and −x(b3 + c3 ) or equivalently 0 and xb2 (a − b) + xc2 (a − c). As a < 0 and −a > |b| and −a > |c|, the expressions can be re-written as: 0 and −xb2 (b − a) − xc2 (c − a). Both terms inside brackets are positive, and as x > 0, right hand side will be negative. Claim 2 If a2 = b2 + c2 + . . . + s2 , then if ax, bx, cx, . . . are greater than −1 (for log(1 + hx) to be defined), then if x > 0, Ψ(−|a|x) > Ψ(bx) + Ψ(cx) + . . . + Ψ(sx) Proof (induction): Let v 2 = c2 + . . . + s2 . Then a2 = b2 + v 2 . Then from the above claim, Ψ(−|a|x) > Ψ(bx) + Ψ(−|v|x). By induction hypothesis, Ψ(−|v|x) > Ψ(cx)+. . .+Ψ(sx) Proof follows by adding the two inequalities. 9 5.2 Analysis Continued As − log(1 − x) = x + x2 2 + x3 3 + . . . > x, hence,  ∆Φ ≥ −n log 1 − α r R  + X log zi X r + log zi R X = αr2 + log zi = nα But z = e − αrp̂ or zi = 1 − αrpi And, log zi = log(1−αrpi ) = − (−αrpi − log(1 − αrpi ))−αrpi = −αrpi − Ψ(−αrpi ). P P P But p̂ is a unit vector, p2i = 1. As z is feasible zi = n, or pi = 0. Hence, − X log zi = X αrpi + X Ψ(−αrpi ) = X Ψ(−αrpi ) ≤ Ψ(−αr) The last inequality follows from Corollary 1 above. For Ψ(−αr) to be defined, αr < 1, we thus2 choose α = 1 r+1 , we have ∆Φ ≥ αr2 − Ψ(−αr) = αr2 − ((−αr) − log(1 − αr)) = αr2 + αr + log(1 − αr)   r r r2 + + log 1 − = 1+r 1+r r+1   r = r + log 1 − r+1 = r − log(1 + r) = Ψ(r) but as r = q n/n − 1 > 1 ≥ Ψ(1) = 1 − ln 2 ≈ 0.3 Hence, potential decreases by a fixed amount after each iteration. After k, iterations, Φ(e) − Φ(x) > kΨ(1). But as Ψ(e) = n log cT e, we get Φ(x) < n log cT e − kΨ(1). As x is inside the standard simplex, Φ(x) cT x ≤ exp n   n log cT e − kΨ(1) < exp n ! −r/R −αr Differentiating, f (α) = αr2 − Ψ(−αr) w.r.t. α, f 0 (α) = r2 − 1−αr + n 1−(αr/R) 1 1 1 , equating f 0 (α) to 0, we get 1 + r = 1−αr , or 1 − αr = 1+r or f 0 (α) = r2 + r + (−r) 1−αr 1 r 1 1 αr = 1 − 1+r = r+1 or α = 1+r . Thus, the maximum value is at α = 1+r . 2 10 If we stop as soon as error cT x ≤ , we get n log cT e − kΨ(1) exp n ! ≤  or n log cT e − kΨ(1) ≤ log  or n log cT e − kΨ(1) ≤ n log  or cT e n log k ≥ Ψ(1)  Thus, after at most x for which cT x ≤  n Ψ(1) T log c  e iterations, algorithm finds a feasible point Acknowledgments Many thanks to students of CS647A (2017-2018 batch) for their valuable feedback, questions and comments on an earlier version. References [1] Mokhtar S. Bazaraa, John J. Jarvis, Hanif D. Sherali, Linear Programming and Network Flows, 4th Edition, Wiley 2009 [2] Donald Goldfarb and Michael J.Todd, Linear programming, Chapter II in Optimization Edited by G.L. Nemhauser, A.H.G. Rinooy Kan and M.J. Todd, Handbooks in Operations Research and Management Science Volume 1, 1989, Pages 73-170, Elsevier [3] H.Karloff, Linear Programming, Birkhauser, 1991. [4] Katta G. Murty, chapter 11, pp 472-473 of “Linear Complementarity, Linear and Nonlinear Programming”, web book http://www-personal.umich.edu/~murty/books/linear_complementarity_webbook/kat11.p [5] Narendra Karmarkar, A New Polynomial Time Algorithm for Linear Programming, Combinatorica, Vol 4, nr. 4, pp. 373-395 (1984). [6] C.Roos,T Terlaky and J-P Vial, Interior Point Methods for Linear Optimization, 2nd Ed, 2006, Springer. [7] R.Saigal, Linear Programming, A Modern Integrated Analysis, Kluwer, 1995. 11 [8] Hamdy A. Taha, Operations Research: An Introduction, 7th Edition, Pearson, 2002. [9] Ling-Hsiao Lyu, Lecture notes on Linear Algebra Lecture 3 (Chap. 4), Projection and Projection Matrix, Institute of Space Science, National Central University, Chung-Li, Taiwan, R. O. C., 2012 Spring http://www.ss.ncu.edu.tw/~lyu/lecture_files_en/lyu_LA_Notes/Lyu_LA_2012/Lyu_LA_3_ 12
8cs.DS
arXiv:1710.10109v4 [math.GR] 27 Nov 2017 THE WORD AND ORDER PROBLEMS FOR SELF-SIMILAR AND AUTOMATA GROUPS LAURENT BARTHOLDI AND IVAN MITROFANOV Abstract. We prove that the word problem is undecidable in functionally recursive groups, and that the order problem is undecidable in automata groups, even under the assumption that they are contracting. 1. Introduction Let A be a finite set, and consider a group G acting faithfully and “self-similarly” on the set A˚ of words over A. This means that every g P G acts in the form (1.1) pa1 . . . an qg “ a11 pa2 . . . an qg 1 for some a11 P A and some g 1 P G depending only on a1 , g; we encode them as pg 1 , a11 q “ Φpa1 , gq for a map Φ : A ˆ G Ñ G ˆ A. If furthermore G is finitely generated (say by a finite set S, so G is a quotient FS ։ G of the free group on S), then its action may be described by finite data, namely a lift Φ : A ˆ S Ñ FS ˆ A of the restriction of Φ to the generators of G. A finitely generated group given in this manner is called functionally recursive [4, §3], or self-similar ; we call G the group presented by Φ, and write G “ xΦy. We call Φ an (asynchronous) transducer. Large classes of finitely generated groups can be presented as functionally recursive ones; notably, all the “iterated monodromy groups” of Nekrashevych [16], and the automata groups mentioned in §1.1 below. Even though the map Φ completely determines the action of G, and therefore G itself, it is unclear how much of G is known from Φ. Our first result is as negative as can be: Theorem A. There is no algorithm that, given Φ : A ˆ S Ñ FS ˆ A and s P S, determines whether s “ 1 in xΦy. 1.1. Automata groups. Assume now that G is a functionally recursive group, and that in the action (1.1) the elements g 1 have at most the length of g, in the generating set S. Then, up to replacing S by S Y S ´1 Y t1u, the map Φ takes the form Φ : A ˆ S Ñ S ˆ A; we call it a finite state transducer. The group G is called an automata group; these form a notorious class of groups, containing all finitely generated linear groups as well as infinite torsion groups such as the “Grigorchuk group” [7] and “Gupta-Sidki groups” [10]. The Grigorchuk group is also a group of intermediate word-growth, and was used to settle the Milnor problem on group growth [8]. The action of S, and of G itself, may be conveniently described by a finite labeled graph called its Moore diagram. Consider the directed graph Γ with vertex set S Date: October 25, 2017. This work is supported by the “@raction” grant ANR-14-ACHN-0018-01. 1 2 LAURENT BARTHOLDI AND IVAN MITROFANOV p1, 1q b p0, 0q p1, 1q p1, 1q d p0, 0q c a p0, 0q p0, 0q e p1, 1q p0, 1q, p1, 0q Figure 1. The transducer generating the Grigorchuk group. Here A “ t0, 1u and S “ ta, b, c, d, eu. and an edge from s to t labeled pa, bq whenever Φpa, sq “ pt, bq; then the action of s P S on A˚ is determined as follows: given a1 . . . an P A˚ , find the unique path in Γ starting at s and whose first label letters read a1 . . . an ; let b1 . . . bn be the second label letters; then pa1 . . . an qs “ b1 . . . bn . See Figure 1 for the graph Γ describing the Grigorchuk group. Every element of G (say represented by a word w of length n in S) admits a similar description, but now using a graph with vertex set S n . The word w represents the identity in G if and only if at every vertex reachable from w all the outgoing edges have labels in tpa, aq | a P Au. It follows that the word problem is decidable in G, and even belongs to LinSpace (and therefore to ExpTime); but that is about as much as is known. We consider the “order problem” (determine the order of an element), which was raised at the end of last century by Sidki and by Grigorchuk, Nekrashevych and Sushchansky [9, Problem 7.2.1(a)], to which Gillibert announced a solution in July 2017; his proof appears in [6]: Theorem B. There is no algorithm that, given Φ : A ˆ S Ñ S ˆ A and s P S, determines the order of s in xΦy, namely the cardinality of xsy. Worse than that, the action is uncomputable in the following sense: consider the natural extension of the action of xΦy to A8 . Then we have the following variants of Theorems A and B: Theorem A1 . There is no algorithm that, given Φ : A ˆ S Ñ FS ˆ A and a P A and s P S, determines whether a8 is fixed by s. Theorem B1 . There is no algorithm that, given Φ : A ˆ S Ñ S ˆ A and a P A and s P S, determines the cardinality of the orbit of a8 under xsy. Finally, the results in Theorems A and B can be made uniform as follows: Theorem A2 . There is a functionally recursive group xΦy with Φ : AˆS Ñ FS ˆA such that ts P FS | s “ 1 in xΦyu is not recursive. Theorem B2 . There is an automata group xΦy with Φ : A ˆ S Ñ S ˆ A, and two states s, t P S, such that the set tn P N | stn has finite orderu is not recursive. THE WORD AND ORDER PROBLEMS FOR SELF-SIMILAR AND AUTOMATA GROUPS 3 1.2. Contracting groups. Assume now that G is a functionally recursive group, and that in the action (1.1) the elements g 1 are shorter than g, in the generating set S, in the sense that there are constants λ ă 1 and C with |g 1 | ď λ|g|`C for all g P G. Then, up to replacing S by the set of all words of length ď C{p1 ´ λq, we also have |g 1 | ď |g|; we have thus defined a subclass of automata groups, called contracting automata groups (see §3.4 for a more precise definition). Their word problem is decidable in LogSpace (and therefore in PolyTime). We will see, however, that the order and orbit order problems remain unsolvable in that restricted class: Theorem C (= Theorem 3.4). The transducers constructed in Theorems B and B1 may be assumed to generate contracting groups. 1.3. Sketch of proofs. We encode Minsky machines in functionally recursive groups. Minsky machines (see [15]) are restricted Turing machines with two tapes, which may move the tapes and sense the tape’s end but may not write on them; equivalently, they are finite state automata equipped with two counters with values in N that may be incremented, decremented and tested for 0. In all cases, we encode the machine, in state s with counter values pm, nq, by m n the word sx2 y 2 in a functionally recursive group containing elements x, y and an element s for each state of the machine. The action of the group is so devised that if the machine evolves to state ps1 , m1 , n1 q then the recursive action is given m n n1 m1 by s1 x2 y 2 . The image of a prescribed ray under sx2 y 2 records the computational steps of the machine when started in ps, m, nq, and in particular whether the machine reached a final state. We construct an auxiliary element t that only acts m n m n on sequences containing a trace of this final state, and then psx2 y 2 qtpsx2 y 2 q´1 fixes the original ray if and only if the machine never reaches the final state. Taking the commutator of that last element acting only in the neighbourhood of the original ray yields an expression that is trivial if and only if the machine never reaches the final state. Inherently, sometimes the output of the transducer is longer than the input (e.g., if the machine increments the first counter, the transducer must replace x by x2 ). To obtain an automata group, we have the transducer consume a power of its input m n word sx2 y 2 ; e.g., the incrementation of the counter may be performed by erasing n m n every second s and every second block of y 2 ’s. The element sx2 y 2 then may be arranged to finite order if and only if the machine reaches the final state. 1.4. Tilings. Our results on functionally recursive groups and transducers may also be interpreted in terms of tilings. Let C be a finite set of colours, and T Ď C N,E,S,W be a set of Wang tiles. A valid tiling is a map t : Z2 Ñ T with tpx, yqN “ tpx, y `1qS and tpx, yqE “ tpx ` 1, yqW for all x, y P Z2 . Berger showed in [2] that it is undecidable to determine, given T , whether there exists a valid tiling by T . This has been improved: for λ, µ P tN, E, S, W u, call a set of tiles λµ-deterministic if for every c, d P C there exists at most one tile u P T with uλ “ c and uµ “ d, and λµ-complete if there exists precisely one tile u P T with these conditions. Lukkarila showed in [14] that the undecidability result holds even under the restriction that T is N E, N W, SE, SW -deterministic. Clearly a SW -complete tileset tiles uniquely the first quadrant for any choice of colours on the axes. Our result on the order problem has the following translation into tilings. We consider tilings of the upper half-plane tpx, yq | y ě 0u. Then the following problem is undecidable even for SE, SW -complete tilesets: “given c P C, is there an integer 4 LAURENT BARTHOLDI AND IVAN MITROFANOV n P N such that every tiling of the upper half-plane with c8 on the horizontal axis is horizontally n-periodic?”. Indeed, given Φ : A ˆ S Ñ S ˆ A, set C “ A \ S and whenever Φpa, sq “ ps1 , a1 q build a tile with N, E, S, W -labels s1 , a1 , s, a respectively; also build tiles with N, E, S, W -labels c, d, c, d for all pc, dq P C 2 zpS ˆ Aq. Then the above tiling problem is satisfied for c P S if and only if c has finite order in xΦy. The word problem may also be translated to a tiling problem, but now in hyperbolic space. The tileset is now T Ď C N,E,S1 ,S2 ,W . The lattice Z2 is now Λ :“ t2y pi` xq | x, y P Zu Ă H. A tiling is a map t : Λ Ñ T with tp2y pi`xqqE “ tp2y pi`x`1qqW and tp2y pi ` 2xqqN “ tp2y`1 pi ` xqqS1 and tp2y pi ` 2x ` 1qqN “ tp2y`1 pi ` xqqS2 for all x, y P Z. Tiles are visualized as pentagons assembling into a tiling of the hyperbolic plane, invariant under the transformations z ÞÑ z ` 1 and z ÞÑ 2z: The following problem is undecidable even for N E, N W -complete tilesets: “given c P C, does every tiling of tx ` iy P H | x P r0, 1s, y ď 1uwith c on the edge from i to i ` 1 have identical labels on the boundary half-lines tx “ 0u and tx “ 1u?”. Indeed by subdividing and inserting the empty state we may assume that the map Φ describing our functionally recursive group satisfies ΦpA ˆ Sq Ď S 2 ˆ A; then tiles are defined as above. 1.5. History. Links have been established since the beginning between undecidable problems in theoretical computer science — halting of Turing machines — and in algebra — decidability of properties of algebraic objects. Minsky machines, because of their simplicity, have been early recognized as useful tools in this correspondence, see e.g. Gurevich’s work [11] on identities in semigroups. Automata semigroups are defined quite similarly to automata groups; one merely drops the requirement that the action be by invertible maps. Decision problems have been extensively studied within the class of automata semigroups [1, 13]. Gillibert proved in [5] that the order problem is unsolvable in that class. His proof is based on the undecidability of Wang’s tiling problem [2], and harnesses Kari’s solution of the nilpotency problem for cellular automata [12]. There are usually serious difficulties in converting a solution in semigroups to one in groups. In particular, the tilings at the heart of Gillibert’s construction give fundamentally non-invertible transformations of A˚ . On the other hand, a direct approach to the order problem succeeded for the restricted class of “bounded automata” groups; Bondarenko, Sidki and Zapata prove in [3] that they have solvable order problem. Gillibert announced in [6] the undecidability of the order problem in automata groups; his work uses a simulation of arbitrary Turing machines by transducers via cellular automata. 2. Functionally recursive groups and Minsky machines All our theorems are proven by embedding Minsky machine computations into functionally recursive groups. Let us recall more precisely the definition of these machines: Definition 2.1. A Minsky machine is a computational device M equipped with two integer counters m, n and a finite amount of additional memory. It has a finite THE WORD AND ORDER PROBLEMS FOR SELF-SIMILAR AND AUTOMATA GROUPS 5 set S of states, an initial state s˚ P S, a final state s: P S, and for each state s ‰ s: an instruction, which can by any of the following kind: I: II: III: IV: V: VI: VII: VIII: IX: X: ps, m, nq ÞÑ ps1 , m ` 1, nq; ps, m, nq ÞÑ ps1 , m, n ` 1q; ps, m, nq ÞÑ ps1 , m ` 1, n ` 1q; ps, m, nq ÞÑ ps1 , m ´ 1, nq, only valid if m ą 0; ps, m, nq ÞÑ ps1 , m, n ´ 1q, only valid if n ą 0; ps, m, nq ÞÑ ps1 , n, mq; ps, m, nq ÞÑ pm “ 0 ? s1 : s2 , m, nq; ps, m, nq ÞÑ pn “ 0 ? s1 : s2 , m, nq; ps, m, nq ÞÑ m “ 0 ? ps1 , m, nq : ps2 , m ´ 1, nq; ps, m, nq ÞÑ n “ 0 ? ps1 , m, nq : ps2 , m, n ´ 1q. (We use the C style “?:” operator, with ‘a ? b : c’ meaning ‘if a then b else c’.) As M is turned on, its state and counters initialize at ps0 , m0 , n0 q “ ps˚ , 0, 0q, and then psi`1 , mi`1 , ni`1 q is determined from psi , mi , ni q using the prescribed rules. If at some moment si “ s: then M stops; otherwise it runs forever. △ We recall the main result on Mealy machines, namely that they are as powerful as Turing machines: Proposition 2.2 ([15]). (1) There is no algorithm that, given a Minksy machine M, determine whether it stops. (2) There is a “universal” Minsky machine M such that tn P N | M stops when turned on in state ps˚ , 0, nqu is not recursive.  We also note that only one of the instructions {I,II} and III is necessary, and that in the presence of VI only one of I,II, one of IV,V, one of VII,VIII and one of IX,X is necessary. Minimal sets of instructions are {III,IV,V,VII,VIII} and {I,IV,VI,VII} and {III,IX,X} and {I,VI,IX}. 2.1. Proof of Theorem A1 . Let M be a Minsky machine with stateset S0 . Without loss of generality, we assume that all instructions of M are of type I, VI, IX. We construct a functionally recursive group xΦM y presented by ΦM : A ˆ S Ñ FS ˆ A, for sets A, S given as follows: the generating set S consists of ‚ elements x, y, s: , t and u; ‚ for each state si P S0 of type I or IX, an element si ; ‚ for each state si P S0 of type VI, three elements si , ai , bi . The alphabet A consists of: ‚ ‚ ‚ ‚ four letters 0, for each state for each state for each state 1, :1 and :2 ; si P S0 of type I, a letter i1 ; si P S0 of type IX, two letters i1 and i2 ; si P S0 of type VI, five letters i1 , i2 , . . . , i5 . The map ΦM : A ˆ S Ñ FS ˆ A is given below, with ǫ denoting the empty word in FS . Whenever a value of ΦM is unspecified, we take it to mean ΦM pa, sq “ ps, aq. 6 LAURENT BARTHOLDI AND IVAN MITROFANOV ‚ for the states s: and t, u we put ΦM p0, s: q “ pǫ, :1 q; ΦM p:1 , xq “ pǫ, :1 q; ΦM p:1 , yq “ pǫ, :1 q; ΦM p:2 , xq “ pǫ, :2 q; ΦM p:2 , yq “ pǫ, :2 q; ΦM p:1 , tq “ pǫ, :2 q; ΦM p0, uq “ pu, 1q; ΦM p:2 , s: q “ pǫ, :2 q; ΦM p:2 , tq “ pǫ, :1 q ΦM p1, uq “ pu, 0q. ΦM p:1 , s: q “ pǫ, 0q; ‚ for all g P Sztuu we put ΦM p1, gq “ pǫ, 1q, and for all a P Azt0, 1u we put ΦM pa, uq “ pǫ, aq. ‚ for each instruction psi , m, nq ÞÑ psj , m ` 1, nq of type I we put ΦM pi1 , si q “ pǫ, 0q; ΦM pi1 , xq “ px2 , i1 q; ΦM p0, si q “ psj , i1 q; ΦM pi1 , yq “ py, i1 q. ‚ for each instruction psi , m, nq ÞÑ psj , n, mq of type VI, ΦM pa, sq is written at position pa, sq of the following table: element of S 0 x y si pai bi x, i1 q ai pai , i2 q bi input letter i2 i3 pǫ, i3 q px, i2 q py, i2 q i1 pxbi x , i1 q py x , i1 q pǫ, 0q i4 i5 px2 , i4 q py, i5 q py, i4 q px, i5 q pǫ, 0q pbi , i4 q pa´1 i sj , i 5 q pǫ, i2 q pǫ, i3 q ‚ for each instruction psi , m, nq ÞÑ pm “ 0 ? sj : sk , maxp0, m ´ 1q, nq of type IX we put ΦM pi1 , xq “ ps´1 k sj x, i2 q; ΦM p0, si q “ psk , i1 q; ΦM pi1 , si q “ pǫ, 0q; ΦM pi2 , xq “ ΦM pi1 , yq “ py, i1 q; px´1 s´1 j sk x, i1 q; ΦM pi2 , yq “ py, i2 q. Theorem A1 follows from the undecidability of the halting problem for the Minsky machines (Proposition 2.2) and the following Proposition 2.3. Consider the infinite sequence W “ 08 . Then the Minsky machine M does not halt if and only if the action of xΦM y satisfies W ps˚ xyqtps˚ xyq ´1 “ W. m n m n Proof. We encode the states of M by elements of FS . The word psi x2 y 2 qαpsi x2 y 2 q´1 corresponds to the state psi , m, nq. It is convenient to write ΦM pa, gq “ pg 1 , a1 q in the form a ¨ g “ g 1 ¨ a1 . In this manner, the computation of the functionally recursive action is given by a sequence of exchanges of letters with words in FS . We check the following equalities: If psi , m, nq Ñ psj , m ` 1, nq is an instruction of type I, then (2.1) m n m n m`1 0 ¨ psi x2 y 2 qtpsi x2 y 2 q´1 “ psj x2 m n m n n m`1 y 2 qtpsj x2 m`1 n y 2 q´1 ¨ 0. n Indeed 0 ¨ si x2 y 2 “ sj ¨ i1 ¨ x2 y 2 “ sj x2 y 2 ¨ i1 ; the claim follows from m n m`1 n i1 ¨ t “ t ¨ i1 and the reverse i1 ¨ psi x2 y 2 q´1 “ psj x2 y 2 q´1 ¨ 0. If psi , m, nq Ñ psj , n, mq is an instruction of type VI, then (2.2) m n m n n m n m 0m`2 ¨ psi x2 y 2 qtpsi x2 y 2 q´1 “ psj x2 y 2 qtpsj x2 y 2 q´1 ¨ 0m`2 . m n m n m n Indeed we first check 0 ¨ si x2 y 2 “ ai bi xpxbi x q2 py x q2 ¨ i1 “ ai x2 bi y 2 x ¨ i1 . THE WORD AND ORDER PROBLEMS FOR SELF-SIMILAR AND AUTOMATA GROUPS m 7 0 We obtained a word with two “blocks” of x: the blocks x2 and x2 . Each time a ‘0’ letter is multiplied on the left of that word, the size of the first block will halve and the size of the second one will double: for m, n, p P N, we have 0 ¨ ai x2m bi y n xp “ ai xm bi y n x2p ¨ i4 m n n m so 0m`1 ¨ si x2 y 2 “ ai xbi y 2 x2 ¨ pi4 qm i1 . Then n m n m 2 2 0 ¨ ai xbi y 2 x2 “ ai pa´1 ¨ i5 , i sj qx y m n n m so 0m`2 ¨ si x2 y 2 “ sj x2 y 2 ¨ i5 pi4 qm i1 . Recalling that we have a ¨ t “ t ¨ a for all a “ i1 , . . . , i5 , the claim is proven. If ps, m, nq Ñ pm “ 0 ? sj : sk , maxpm ´ 1, 0q, nq is an instruction of type IX, then if m “ 0 we have (2.3) m n m n m n m n n m n m´1 y 2 qtpsk x2 0 ¨ psi x2 y 2 qtpsi x2 y 2 q´1 “ psj x2 y 2 qtpsj x2 y 2 q´1 ¨ 0 while if m ą 0 we have (2.4) m 0 ¨ psi x2 y 2 qtpsi x2 y 2 q´1 “ psk x2 n m´1 n y 2 q´1 ¨ 0. Indeed in the first case we have n n 2 0 ¨ si xy 2 “ sk ps´1 ¨ i2 , k sj xqy while in the second case we have m n m´1 ´1 ´1 0 ¨ si x2 y 2 “ sk ps´1 sk sj xq2 j sk x ¨ x n m´1 y 2 ¨ i1 “ sk x2 n y 2 ¨ i1 . Recalling that we have a ¨ t “ t ¨ a for all a “ i1 , i2 , the claim is proven. From (2.1)–(2.4) it follows that if M does not halt then W ps˚ xyqtps˚ xyq Conversely, if M halts then there exist k, m, n P N such that m n m ´1 “ W. n 0k ¨ ps˚ xyqtps˚ xyq´1 “ ps: x2 y 2 qtps: x2 y 2 q´1 ¨ 0k . Then m n m n m n m n 0 ¨ s: x2 y 2 tps: x2 y 2 q´1 “ :1 ¨ tps: x2 y 2 q´1 “ :2 ¨ ps: x2 y 2 q´1 “ :2 . In that case, we have W ps˚ xyqtps˚ xyq ´1 “ 0 k :2 0 8 ‰ W .  The computations are best carried on ΦM ’s dual Moore diagram ∆, see Figure 2 : this is the directed labeled graph with vertex set A and with for all a P A, s P S an edge from a to b labeled ps, tq whenever ΦM pa, sq “ pt, bq. One checks an equality ‘ΦM pa, sq “ pt, bq’ by finding in ∆ a path starting at a with input label s; the endpoint of the path is b, and the output label is t. 2.2. Proof of Theorem A. We have not yet used the letter 1 and the state u of ΦM . Theorem A follows now from the following Proposition 2.4. The Minsky machine M halts if and only if rps˚ xyqtps˚ xyq´1 , us ‰ 1 in xΦM y. Proof. The element u acts on Aω as follows: it scans X P Aω for its longest prefix in t0, 1u˚ , and exchanges all 0 and 1 in that prefix. Write g “ ps˚ xyqtps˚ xyq´1 ; from Proposition 2.3 we know that g fixes 08 if and only if M does not halt. Assume first that M does not halt; then g in fact also fixes t0, 1u8 , so the supports of g and u are disjoint and rg, us “ 1 in xΦM y. 8 LAURENT BARTHOLDI AND IVAN MITROFANOV pg, ǫq@g py, yq px, x2 q px, yq py, ǫqpx, ǫq :1 1 i4 pt, tq px, ǫq pu, uq pbi , bi q pt, tq i2 px, xq 0 pai , ai q ps: , ǫq ps: , ǫq px, x2 q i3 psi , sj q i1 pt, tq py, y x q pt, tq Type I py, yq Type VI px, ǫqpsi , ai bi xq pbi , a´1 i sj q :2 pt, ǫq py, xq i5 py, ǫq pt, tq i1 py, yq px, xbi x q psi , sk q Type IX px, s´1 k sj xq i1 i2 ´1 ´1 px, x sj sk xq pt, tq py, yq Figure 2. The dual Moore diagram of ΦM , used in the proof of Theorem A Assume next that M does halt; without loss of generality, we may assume M does not stop immediately, so there is k ě 1 such that p0k`1 qg “ 0k :2 . Since p0k`1 qu “ 1k`1 and p0k :2 qu “ 1k :2 and p1k`1 qg “ 1k`1 and p1k :2 qg “ 1k :2 , the commutator rg, us acts as a 2-2-cycle p0k`1 , 0k :2 qp1k`1 , 1k :2 q and in particular rg, us ‰ 1 in xΦM y: g 1k`1 u 0k`1 g 0 k :2 u 1 k :2 g  2.3. Proof of Theorem A2 . Consider a universal Minsky machine Mu , namely one that emulates arbitrary Turing machines encoded in an integer n, when started in state ps˚ , 0, nq. The set of 2n such that Mu halts when started in state ps˚ , 0, nq is not recursive, see Proposition 2.2. Therefore, Theorem A2 follows by considering n n in the group xΦMu y the elements rps˚ xy 2 qtps˚ xy 2 q´1 , us; this set of words is recursive, but the subset of those that equal 1 in xΦMu y is not recursive. 3. Automata groups and Minsky machines 3.1. Proof of Theorem B. Let M by a Minsky machine with stateset S0 . Without loss of generality, we assume that all instructions of M are of type III,IV,V,VII,VIII, as defined in the beginning of Section 2, S0 “ SIII \ SIV \ SV \ SVII \ SVIII \ ts: u We consider the transducer with stateset S :“ S0˘1 \ tǫ, x, x´1 , y, y ´1 u and alphabet A “ tIIIi , IVi , Vi , VIIj , VIIIj | i “ 1, 2, 1, 2; j “ 1, . . . , 4, 1, . . . , 4u. THE WORD AND ORDER PROBLEMS FOR SELF-SIMILAR AND AUTOMATA GROUPS 9 in state The structure of the transducer is given by its map ΦM : A ˆ S Ñ S ˆ A, first described as a table, with ΦM pa, sq at position pa, sq. The state ǫ is the identity, and ΦM pa, ǫq “ pǫ, aq for all a P A. For all instructions ps, m, nq ÞÑ ps1 , m ` 1, n ` 1q of type III and for all t P S0 zSIII we have input letter III2 III1 III2 III1 ´1 ´1 x px, III1 q px, III2 q px , III1 q px , III2 q py ´1 , III1 q y py, III1 q py, III2 q py ´1 , III1 q 1 s ps , III2 q pǫ, III1 q pǫ, III2 q pps1 q´1 , III1 q pǫ, III1 q pǫ, III2 q t pǫ, III1 q pǫ, III2 q in state in state For all instructions ps, m, nq ÞÑ ps1 , m ´ 1, nq of type IV and for all t P S0 zSIV , we have input letter IV2 IV1 IV2 IV1 x px, IV2 q pǫ, IV1 q pǫ, IV2 q px´1 , IV1 q py ´1 , IV2 q y py, IV1 q py, IV2 q py ´1 , IV1 q 1 1 1 ´1 s ps , IV1 q ps , IV2 q pps q , IV1 q pps1 q´1 , IV2 q pǫ, IV1 q pǫ, IV2 q t pǫ, IV1 q pǫ, IV2 q The same applies for an instruction of type V, with the roles of x, y switched. For an instruction ps, m, nq ÞÑ pm “ 0 ? s1 : s2 , m, nq of type VII and for all t P S0 zSVII , we have x y s t VII1 VII2 px, VII4 q pǫ, VII3 q py, VII1 q pǫ, VII2 q pǫ, VII2 q ps2 , VII1 q pǫ, VII1 q pǫ, VII2 q input letter VII3 VII4 VII1 pǫ, VII2 q px, VII1 q px´1 , VII4 q pǫ, VII3 q py, VII4 q py ´1 , VII1 q 1 ps , VII4 q pǫ, VII4 q pps2 q´1 , VII2 q pǫ, VII1 q pǫ, VII3 q pǫ, VII4 q VII2 pǫ, VII3 q pǫ, VII2 q pǫ, VII1 q pǫ, VII2 q VII3 VII4 pǫ, VII2 q px´1 , VII1 q pǫ, VII3 q py ´1 , VII4 q pǫ, VII3 q pps1 q´1 , VII3 q pǫ, VII3 q pǫ, VII4 q The same applies for an instruction of type VIII, with the roles of x, y switched. Note that s: is treated as a state t in all tables above. Theorem B follows from the undecidability of the halting problem for Minsky machines, and the following Proposition 3.1. The Minsky machine M constructed above halts if and only if the element s˚ xy has finite order in xΦM y. Proof. Set G “ xΦM y. For g P G, denote by Cpgq its symmetric conjugacy class: Cpgq :“ tg ˘x | x P Gu. Given a symmetric conjugacy class C, choose a representative g in it, let A “ A1 \ ¨ ¨ ¨ \ Aℓ be the decomposition of A into cycles for the action of g, and choose representatives ai P Ai . We have ΦM pai , g #Ai q “ phi , ai q for some hi P G, and it is easy to see that the collection of symmetric conjugacy class tCphi q | i “ 1, . . . , ℓu is independent of the choice of g and the ai . We construct an integer-labeled, directed graph1 whose vertices are symmetric conjugacy classes in G; for a conjugacy class C as above, there are ℓ edges starting at C, ending respectively at Cph1 q, . . . , Cphℓ q with labels #A1 , . . . , #Aℓ . 1This graph essentially appears in the solution of [3] to the order problem in bounded automata. 10 LAURENT BARTHOLDI AND IVAN MITROFANOV Lemma 3.2. For g P G, its order (in N Y t8u) is the least common multiple, along all paths starting at Cpgq, of the product of the labels along the path. Proof. Consider a path starting at Cpgq, with labels n1 , . . . , ns , and going through vertices Cpg1 q, . . . , Cpgs q. Then g has an orbit of length n1 on A, so the order of g is a multiple of n1 . Furthermore, g n1 fixes that orbit, and acts as g1 on sequences that start by that orbit. Recursively, the order of g1 is a multiple of n2 ¨ ¨ ¨ ns , so the order of g is a multiple of n1 ¨ ¨ ¨ ns . In particular, if there are paths with arbitrarily large product of labels then g has infinite order. Conversely, if g has infinite order then there are arbitrarily long orbits of g on A˚ , so there are paths with arbitrarily large product of labels; and if m be the least common multiple of all path labels then all edges on paths starting at Cpg m q are labeled 1 so g m fixes every sequence and therefore g m “ 1.  Let us compute the subgraph spanned by Cps˚ xyq. For the computations, it is helpful to picture the operation of the transducer ΦM by means of its dual Moore diagram ∆, see Figure 3. Given g P G, we compute all primitive cycles in ∆ whose input label is a power of g, and read the corresponding output label; these are the hi in the map on symmetric conjugacy classes Cpgq tCphi qu. We first note, by direct inspection, that x and y commute in G. This follows by tracing the path x´1 y ´1 xy in the graphs above, and noting that they always induce the trivial permutation of A with output either trivial or conjugate to px´1 y ´1 xyq˘1 . We now claim that, if ps, m, nq Ñ ps1 , m1 , n1 q is a transition of the machine M, n1 m n m1 then the conjugacy class Cpsx2 y 2 q has at least one arrow to Cps1 x2 y 2 q, and possibly other arrows, all of them to Cp1q. We also claim that if s is not of type n1 m1 IV or V, then arrows to Cps1 x2 y 2 q are with labels ą 1; and all arrows from m n Cps: x2 y 2 q are arrows to Cp1q. We see that if the machine halts then every path starting at Cps˚ xyq has only a finite number of labels ą 1, and this shows that the order of s˚ xy is finite. On the other hand, if the machine does not halt then there is an path with infinitely many labels ą 1 (because no Minsky machine can decrease its counters infinitely many times in a row) so s˚ xy has infinite order. Note that our transducer has the property ΦM pLi , gq “ ΦM pLi , g ´1 q, for all g P S and all L P tIII, IV, V, VII, VIIIu. Also note that ΦM pLi , tq “ ΦM pLi , t´1 q “ pǫ, Li q whenever t is any instruction not of type L. Using this, we can prove that if t is not of type L, then tgn gn´1 ¨ ¨ ¨ g1 tg1 g2 ¨ ¨ ¨ gn fixes the orbit tLi u with output ǫ. Indeed, tgn gn´1 ¨ ¨ ¨ g1 tg1 g2 ¨ ¨ ¨ gn “ pgn tgn t´1 ¨ tgn´1 gn´2 ¨ ¨ ¨ g1 tg1 g2 ¨ ¨ ¨ gn´1 qgn , and we use induction on n. It follows that ptxm y n q2 fixes Li with outputs ǫ, i.e., there is an arrow from Cptxm y n q to Cp1q with label 2. Let us first restrict to the orbit tIIIi u of G on A. We consider g :“ sxm y n with s an instruction of type III. It acts as a product of two cycles pIII1 , III2 qpIII1 , III2 q; the output label of g 2 on the first cycle, starting at III1 , is s1 xm y n ǫxm y n “ s1 x2m y 2n , and the output of g 2 starting on the second cycle at III1 is ǫx´m y ´n ps1 q´1 x´m y ´n P m n m`1 n`1 Cps1 x2m y 2n q. There are therefore two arrows from Cpsx2 y 2 q to Cps1 x2 y 2 q, as required. We do not consider g :“ txm y n with t an instruction of different type or s: , because it was considered above (there are some arrows to Cp1q with labels 2). THE WORD AND ORDER PROBLEMS FOR SELF-SIMILAR AND AUTOMATA GROUPS 11 ps, s1 q III1 ps, ǫq III2 px, xq pt, ǫq py, yq ´1 III1 px, x q ps, ǫq py, yq pt, ǫq IV1 px, ǫq px, x´1 q III2 py, yq px, xq IV2 IV1 px, x´1 q pt, ǫq ps, ps1 q´1 q px, xq ps, ps1 q´1 q ps, s1 q ps, s1 q py, y ´1 q IV2 pt, ǫq py, y ´1 q px, ǫq py, y ´1 q py, yq py, y ´1 q ps, ps1 q´1 q pt, ǫq py, yq py, yq VII1 ps, s2 q py, ǫq px, xq ps, ǫq VII2 px, ǫq VII4 ps, s1 q pt, ǫq ps, ǫq py, y ´1 q VII4 ps, ps1 q´1 q VII3 py, ǫq ps, ǫq pt, ǫq VII3 px, x´1 q ps, ps2 q´1 q ps, ǫq px, ǫq py, y ´1 q VII1 VII2 py, ǫq py, ǫq pt, ǫq Figure 3. The dual Moore diagram of ΦM , used in the proof of Theorem B We restrict next to the orbit tIVi u of G and consider the case g “ sx2m y n . (We do not need to consider cases g “ sx2m`1 y n or g “ txm y n , for the first because we suppose that if m “ 0 then M does not perform an instruction of type IV, and for the second because it was already considered above.) An element g “ sx2m y n fixes IV1 , IV2 , IV1 and IV2 , its outputs are respectively 1 s pxǫqm y n “ s1 xm y n , s1 xm y n , ps1 q´1 x´m y ´n and ps1 q´1 x´m y ´n . Hence there are m n m´1 n 4 arrows from Cpsx2 y 2 q to Cps1 x2 y 2 q, all with labels 1. We restrict next to the orbit tVIIi u of G and perform the same computations, the result is in the following table: gPG sx2m y n sx2m`1 y n cycles of g pVII1 , VII2 q pVII3 , VII4 , VII4 , VII3 q pVII1 , VII2 q pVII1 , VII3 q pVII2 , VII4 , VII1 , VII3 q pVII2 , VII4 q output, starting at first element of the cycle ǫs2 x2m y n s1 x2m y n ǫx´2m y ´n ps1 q´1 ǫ “ 1 ps2 q´1 ǫx´2m y ´n ǫs1 x2m`1 y n s2 x2m`1 y n ǫx´2m´1 y ´n ps2 q´1 ǫ “ 1 ǫx´2m´1 y ´n ps1 q´1 ǫ 12 LAURENT BARTHOLDI AND IVAN MITROFANOV m n m n If m ą 0 then there are therefore two arrows from Cpsx2 y 2 q to Cps2 x2 y 2 q with labels 2 and an arrow to Cp1q with label 4; if m “ 0 then there are two arrows m n m n from Cpsx2 y 2 q to Cps2 x2 y 2 q with label 4 and an arrow to Cp1q with label 4. The orbits tVi u and tVIIIi u are investigated in the same way as tIVi u and tVIIi u respectively.  3.2. Proof of Theorem B2 . Consider a universal Minsky machine Mu , namely one that emulates arbitrary Turing machines encoded in an integer n, when started in state ps˚ , 0, nq. The set of 2n such that Mu halts when started in state ps˚ , 0, nq is not recursive, see Proposition 2.2. Therefore, Theorem B2 follows by considering in the group xΦMu y the elements s “ s˚ x and t “ y. 3.3. Proof of Theorem B1 . Let M be a Minsky machine with stateset S0 . Without loss of generality, we assume that all instructions are of type III,IX,X. We associate to it the transducer with stateset Q :“ S0 \ tǫ, x, yu and alphabet A “ t0, IIIi , IXj , Xj | i “ 1, 2; j “ 1, . . . , 4u. in state The structure of the transducer is given by its map ΦM : A ˆ Q Ñ Q ˆ A. The state ǫ is the identity, and ΦM pa, ǫq “ pǫ, aq for all a P A. ‚ for all instructions psi , m, nq ÞÑ ps1i , m ` 1, n ` 1q of type III we have input letter 0 III1 III2 x pǫ, 0q px, III1 q px, III2 q y pǫ, 0q py, III1 q py, III2 q si ps1i , III1 q pǫ, III2 q pǫ, 0q in state and every instruction t of another type acts as ΦM pt, IIIℓ q “ pIIIℓ , tq. ‚ for all instructions psj , m, nq ÞÑ m “ 0 ? ps1j , m, nq : ps2j , m ´ 1, nq of type IX we have input letter 0 IX1 IX2 IX3 IX4 x pǫ, 0q pǫ, IX2 q pǫ, IX1 q px, IX4 q pǫ, IX3 q y pǫ, 0q pǫ, IX1 q pǫ, IX2 q py, IX3 q py, IX4 q sj pǫ, IX1 q ps2j , IX4 q ps1j , IX3 q ps1j , IX2 q pǫ, 0q and every instruction t of another type acts as ΦM pIXℓ , tq “ pt, IXℓ q. ‚ The same applies for every instruction psk , m, nq ÞÑ n “ 0 ? ps1k , m, nq : ps2k , m, n ´ 1q of type X, with the roles of x and y switched. ‚ for all a P A we have ΦM pa, s: q “ pǫ, aq. We claim that the orbit of 08 under s˚ xy is finite if and only if the machine M stops. Set G “ xΦM y. We construct an integer-labeled, directed graph whose vertices are elements of G. For g P G consider its action on A and the minimal pg such that g pg fixes 0, i.e., 0 ¨ g pg “ g 1 ¨ 0. In our graph we put an edge g Ñ g 1 with label pg on it. The size of the the orbit of 08 under s˚ xy is a finite number or 8 and it is equal to product of the labels along the path starting at s˚ xy. We claim that for any instruction ps, m, nq Ñ ps1 , m1 , n1 q there is an edge from m n m1 n1 m n sx2 y 2 to s1 x2 y 2 with label 3, and an edge from s: x2 y 2 to 1. This is checked on the dual Moore diagram of ΦM , see Figure 4: THE WORD AND ORDER PROBLEMS FOR SELF-SIMILAR AND AUTOMATA GROUPS 13 py, ǫq IX2 px, ǫq py, ǫq px, ǫq IX1 X1 px, ǫq py, ǫq X2 psk , ǫq ps: , ǫq IX4 si1q III1 px, xq X3 px, xq py, yq px, xq ǫq psi , py, yq py, yq py, ǫq X4 , ps i px, ǫq psk , s1k q 0 psj , ǫq psk , s2k q px, xq IX3 py, yq psj , s2j q psj , s1j q psj , ǫq px, ǫqpy, ǫq psk , ǫq psi , ǫq III2 py, yq px, xq Figure 4. The dual Moore diagram of ΦM , used in the proof of Theorem B1 We first note that x and y commute in G. If g “ si xm y n and si is an instruction of type III, then the orbit of 0 under the action of g is p0, III1 , III2 q. There is an edge labeled 3 from g to s1i xm y n ǫxm y n “ s1i x2m y 2n . Consider next sj an instruction of type IX. There are two cases. if g “ sj xy n then the orbit of 0 is p0, IX2 , IX4 q and the output is ǫs1j xy n ǫ; if g “ sj x2m y n then the orbit of 0 is p0, IX1 , IX4 q and the output is ǫs2j xm y n ǫ. m n This means that if m “ 0 then there is an edge labeled 3 from sj x2 y 2 to m´1 n m n m n y2 . s1j x2 y 2 , and if m ą 0 then there is an edge labeled 3 from sj x2 y 2 to s2j x2 The same naturally applies to instructions of type IX. Finally, for all m, n P N the element s: xm y n fixes 0, and there is an edge labeled 1 from s: xm y n to 1. 3.4. Contracting automata: proof of Theorem C. We finally explain how to make the transducers ΦM of the previous subsections contracting. We expand the definition from the introduction: Definition 3.3 ([16, Definition 2.11.1]). Let G “ xΦy be a self-automata group with Φ : A ˆ S Ñ S ˆ A and Φ : A ˆ G Ñ G ˆ A. For g P G and u P A˚ , the state g@u is the unique element of G such that puvqg “ ug v g@u ; namely, the action of g on tails of sequences starting with u. The group G is contracting if there exists a finite subset N Ď G such that, for all g P G, there exists npgq P N such that g@u P N whenever |u| ě npgq. △ The minimal subset N satisfying the definition is called the nucleus. In particular, one has n@a P N for all pa, nq P A ˆ N , so Φ induces an automaton still written r :“ An for n Φ : A ˆ N Ñ N ˆ A. Up to replacing S by Sr :“ S Y N and A by A larger than maxgPSr2 npgq, thus making the transducer process n letters at a time, 14 LAURENT BARTHOLDI AND IVAN MITROFANOV one may also assume r ˆ Sr2 q Ď Sr ˆ A. r ΦpA A transducer Φ with this extra property is called nuclear. Note that is is probably undecidable whether a self-similar group xΦy is contracting; but it is easy to decide whether a transducer Φ : A ˆ S Ñ S ˆ A is nuclear: by minimizing the composite transducer A ˆ S 3 Ñ S ˆ A ˆ S 2 Ñ S 2 ˆ A ˆ S Ñ S 3 ˆ A, find the set R of all words s1 s2 s3 P S 3 that equal 1 in G. Then Φ is nuclear if and only if for all a P A, s1 , s2 P S there exists s3 P S such that if Φpa, s1 q “ ps11 , bq and Φpb, s2 q “ ps12 , cq then s11 s12 s´1 3 P R. The more precise form of Theorem C is: Theorem 3.4. There is no algorithm that, given a nuclear transducer Φ : A ˆ S Ñ S ˆ A and a P A and s P S, determines the cardinality of the orbit of a8 under xsy. There is no algorithm that, given a nuclear transducer Φ : A ˆ S Ñ S ˆ A and s P S, determines the order of s in xΦy. Note that the group is not changed by these operations of replacing S by N and A by An . If Φ is nuclear, then xΦy is contracting in the sense of the introduction, since |g 1 | ď p|g|`1q{2 in the word metric defined by N . Conversely, if |g 1 | ď λ|g|`C then one may take N “ tg P G | C{p1 ´ λq ě |g|u to see that G is contracting in the sense of Definition 3.3. Lemma 3.5. Let Φ : A ˆ S Ñ S ˆ A be a transducer. If there is a constant N P N such that every reduced path of length ě N in the dual Moore diagram of Φ contains an ǫ letter along its output, then xΦy is contracting. Proof. Consider g P xΦy, and represent it by a word w P S ˚ of length ℓ “ |g|. Factor w “ w1 . . . wt with |wi | “ N for all i “ 1, . . . , t ´ 1 and |wt | ă N . Then every g 1 as in (1.1) is computed by following, in the dual Moore diagram, the path starting at a1 with label w on its input. The output label along that path is g 1 , and by hypothesis each time a segment wi is read, for i ă t, an ǫ letter is produced for g 1 ; so |g 1 | ď ℓ ´ t ` 1. Now t “ rℓ{N s, so |g 1 | ď ℓ ´ rℓ{N s ` 1 ď p1 ´ 1{N q|g| ` 1.  We shall modify the transducers ΦM by composing them with appropriate machines. We recall the general definition: let Φ : AˆS Ñ SˆA and Ψ : BˆS Ñ SˆB be transducers with same stateset S. Their composition is the transducer Φ ˝ Ψ with alphabet A ˆ B, given by AˆΨ ΦˆB Φ˝Ψ : pAˆBqˆS “ AˆpBˆSq ÝÑ AˆpSˆBq “ pAˆSqˆB ÝÑ pSˆAqˆB “ SˆpAˆBq. We are given a transducer Φ with stateset S “ ts1 , . . . , sℓ , x, yu and alphabet A. We write G “ xΦy, and freely identify words in S ˚ with their value in G. We require that x, y commute. For every i P t1, . . . , ℓu, consider the transducer Φi with alphabet Ai “ t0, 1u and transitions Φi pa, qq “ pa “ 0 ? q : ǫ, q “ si ? 1 ´ a : aq. Note (by drawing the dual Moore diagram and deleting the transitions with ǫ output) that the only paths with input and output of same length are of the form b s´a i wsi for some a, b P t0, 1u and w a word not involving si . Note also that for a word w of form sj xm y n (1) if i “ j then Φi p0, w2 q “ pw, 0q and Φi p1, w2 q “ pw1 , 1q with w1 conjugate to w; THE WORD AND ORDER PROBLEMS FOR SELF-SIMILAR AND AUTOMATA GROUPS 15 (2) if i ‰ j then Φi p0, wq “ pw, 0q and Φi p1, wq “ pǫ, 1q. Consider also a transducer Φ0 with alphabet A0 “ t0, 1u3 and transitions Φ0 ppa, b, cq, si q “ pc “ 0 ? si : ǫ, pa, b, 1 ´ cqq for all i; Φ0 ppa, b, cq, xq “ pa “ 0 ? x : ǫ, p1 ´ a, b, cqq; Φ0 ppa, b, cq, yq “ pb “ 0 ? y : ǫ, pa, 1 ´ b, cqq. Note that, in the dual Moore diagram of Φ0 , all paths with input label of the form m n b s´a i x y sj have shorter output label as soon as |m| ` |n| ě 3. Note also that if w is a word of the form si xm y n then for all pa, b, cq P A0 we have Φ0 ppa, b, cq, w2 q “ pw1 , pa, b, cqq for some permutation w1 of w; so in particular w1 is conjugate to w. Furthermore, for pa, b, cq “ p0, 0, 0q we get w1 “ w in G. Proposition 3.6. Under the hypotheses above, the transducer Φ1 :“ Φ ˝ Φ0 ˝ Φ1 ˝ ¨ ¨ ¨ ˝ Φℓ generates a contracting group, and whenever we have Φpa, psi xm y n qt q “ 1 1 ps1i xm y n , aq in the original transducer we have for all j P t0, 1uℓ`3 the relation 1 1 Φ1 ppj, aq, psi xm y n q4t q “ pw, pj, aqq, with w either equal to 1 or conjugate to s1i xm y n . 1 1 Furthermore, if j “ 0ℓ`3 then w “ s1i xm y n . Proof. After applying the transducers Φ1 , . . . , Φℓ , the only words that don’t get b shortened are of the form s´a i wpx, yqsj for some i, j P t1, . . . , ℓu and some a, b P t0, 1u. These get shortened by Φ0 as soon as |w| ě 3, using the fact that x and y commute. It follows that xΦ1 y is contracting. Consider the transitions of psi xm y n q4 in transducer Φ1 ˝ ¨ ¨ ¨ ˝ Φℓ . On input letter ℓ 0 it produces psi xm y n q2 , on input letter 0 ¨ ¨ ¨ 1 ¨ ¨ ¨ 0 with the ‘1’ in position i it produces a conjugate of psi xm y n q2 and on all other input letters it produces ǫ. Feed then psi xm y n q2 to transducer Φ0 ; on input letter 000 it produces si xm y n and on all other input letters it produces a conjugate of si xm y n . Feed finally si xm y n to Φ to conclude the proof.  We are ready to finish the proof of Theorem 3.4. We constructed an integerlabeled graph for a transducer Φ, whose vertices are elements of G for Theorem B1 or symmetric conjugacy classes for Theorem B. By Proposition 3.6, the transducer Φ1 is contracting. Let us check that the order problems for xΦy and for xΦ1 y are equivalent. A graph for Φ1 will have the same set of vertices as the graph for Φ, and Proposition 3.6 shows that this new graph has the same set of outgoing edges for each element of form si xm y n , with labels multiplied by 4 and, possibly, some new edges to 1 (or to Cp1q). Since in the old graph there were no loops at non-identity elements, s˚ xy has infinite order in xΦ1 y if and only if it has infinite order in xΦy, and the orbit of p0, 0ℓ`3 q8 is infinite under the action of s˚ xy P xΦ1 y if and only if the orbit of 08 is infinite under the action of s˚ xy P xΦy. r “ An , we may Finally, by replacing the stateset S by Sr “ S Y N and A by A 1 assume that Φ is nuclear. 4. Outlook We proved in this article the undecidability of the order problem for automata groups, namely groups of transformations generated by a transducer. If the transducer belongs to a restricted class, it may well be that the order problem becomes decidable. Of particular importance are: 16 LAURENT BARTHOLDI AND IVAN MITROFANOV Transducers of polynomial growth. In a transducer Φ (represented by a graph as in Figure 1), let αpnq denote the number of paths of length n that end in a non-identity state. If αpnq is a bounded function (as is the case for the Grigorchuk group), then the order problem is solvable in xΦy, see [3]. What happens if αpnq is bounded by a linear function? or by a polynomial of degree d? The groups generated by such transducers have been considered by Sidki [17]. Reset transducers. These are transducers Φ with Φpa, sq “ pφpaq, ψpa, sqq for some functions φ, ψ; namely, the state reached by the transducer is independent of the original state. These transducers are intimately connected to tilings, by Kari’s construction [12]. Gillibert proved in [5] that the order problem is unsolvable for semigroups of reset automata. Is it solvable in groups of reset automata? Reversible transducers. These are transducers whose dual is invertible; they should be related to reversible Turing or Minsky machines. Is the order problem solvable for groups generated by reversible automata? Bireversible transducers. These are transducers Φ such that all 8 transducers obtained from Φ by inverting or permuting the stateset and alphabet remain transducers; they give another point of view on square complexes (by tiling the plane with squares whose labels are pa, s, a1 , s1 q when Φpa, sq “ ps1 , a1 q). We expect it to be undecidable whether a functionally recursive group is actually an automata group (for a larger generating set), whether an automata group is contracting, and even whether a contracting group is finite. Again, the related questions for semigroups are known to be undecidable by constructions in or similar to [5]. References [1] Ali Akhavi, Ines Klimann, Sylvain Lombardy, Jean Mairesse, and Matthieu Picantin, On the finiteness problem for automaton (semi)groups, Internat. J. Algebra Comput. 22 (2012), no. 6, 1250052, 26, DOI 10.1142/S021819671250052X. MR2974106 [2] Robert Berger, The undecidability of the domino problem, Mem. Amer. Math. Soc. No. 66 (1966), 72. MR0216954 (36 #49) [3] Ievgen V. Bondarenko, Natalia V. Bondarenko, Said N. Sidki, and Flavia R. Zapata, On the conjugacy problem for finite-state automorphisms of regular rooted trees, Groups Geom. Dyn. 7 (2013), no. 2, 323–355, DOI 10.4171/GGD/184. With an appendix by Raphaël M. Jungers. MR3054572 [4] Andrew M. Brunner and Said N. Sidki, On the automorphism group of the one-rooted binary tree, J. Algebra 195 (1997), no. 2, 465–486. MR98i:20035 [5] Pierre Gillibert, The finiteness problem for automaton semigroups is undecidable, Internat. J. Algebra Comput. 24 (2014), no. 1, 1–9, DOI 10.1142/S0218196714500015. MR3189662 , An automaton group with undecidable order and Engel problems (2017), available [6] at arXiv:1710.09733. [7] Rostislav I. Grigorchuk, On Burnside’s problem on periodic groups, Funkcional. Anal. i Priloжen. 14 (1980), no. 1, 53–54. English translation: Functional Anal. Appl. 14 (1980), 41–43. MR81m:20045 , On the Milnor problem of group growth, Dokl. Akad. Nauk SSSR 271 (1983), no. 1, [8] 30–33. MR85g:20042 [9] Rostislav I. Grigorchuk, Volodymyr V. Nekrashevych, and Vitaliı̆ Ī Suščans1 kiı̆, Automata, dynamical sysytems, and groups, PROSI 231 (2000), no. 4, 128–203. [10] Narain D. Gupta and Said N. Sidki, On the Burnside problem for periodic groups, Math. Z. 182 (1983), 385–388. [11] Ju. Š. Gurevič, The problem of equality of words for certain classes of semigroups, Algebra i Logika Sem. 5 (1966), no. 5, 25–35 (Russian). MR0206079 THE WORD AND ORDER PROBLEMS FOR SELF-SIMILAR AND AUTOMATA GROUPS 17 [12] Jarkko Kari, The nilpotency problem of one-dimensional cellular automata, SIAM J. Comput. 21 (1992), no. 3, 571–586, DOI 10.1137/0221036. MR1163346 [13] Ines Klimann, Jean Mairesse, and Matthieu Picantin, Implementing computations in automaton (semi)groups, Implementation and application of automata, Lecture Notes in Comput. Sci., vol. 7381, Springer, Heidelberg, 2012, pp. 240–252, DOI 10.1007/978-3-642-31606-7 21. MR2993189 [14] Ville Lukkarila, The 4-way deterministic tiling problem is undecidable, Theoret. Comput. Sci. 410 (2009), no. 16, 1516–1533, DOI 10.1016/j.tcs.2008.12.006. MR2502125 (2010d:03071) [15] Marvin L. Minsky, Recursive unsolvability of Post’s problem of “tag” and other topics in theory of Turing machines, Ann. of Math. (2) 74 (1961), 437–455, DOI 10.2307/1970290. MR0140405 [16] Volodymyr V. Nekrashevych, Self-similar groups, Mathematical Surveys and Monographs, vol. 117, American Mathematical Society, Providence, RI, 2005. MR2162164 (2006e:20047) [17] Said N. Sidki, Automorphisms of one-rooted trees: growth, circuit structure, and acyclicity, J. Math. Sci. (New York) 100 (2000), no. 1, 1925–1943. Algebra, 12. MR1774 362 Département de Mathématiques et Applications, École Normale Supérieure, Paris and Mathematisches Institut, Georg-August Universität zu Göttingen E-mail address: [email protected] E-mail address: [email protected]
4math.GR
arXiv:1502.07409v3 [math.ST] 16 Mar 2017 Threshold estimation for stochastic processes with small noise Yasutaka Shimizu∗ Department of Applied Mathematics, Waseda University March 16, 2017 Abstract Consider a process satisfying a stochastic differential equation with unknown drift parameter, and suppose that discrete observations are given. It is known that a simple least squares estimator (LSE) can be consistent, but numerically unstable in the sense of large standard deviations under finite samples when the noise process has jumps. We propose a filter to cut large shocks from data, and construct the same LSE from data selected by the filter. The proposed estimator can be asymptotically equivalent to the usual LSE, whose asymptotic distribution strongly depends on the noise process. However, in numerical study, it looked asymptotically normal in an example where filter was choosen suitably, and the noise was a Lévy process. We will try to justify this phenomenon mathematically, under certain restricted assumptions. Key words: stochastic differential equation, semimartingale noise, small noise asymptotics, drift estimation, threshold estimator, mighty convergence. MSC2010: 62F12, 62M05; 60G52, 60J75 1 Introduction Let (Ω, F, (Ft )t≥0 , P) be a stochastic basis, on which an Rd -valued stochastic process X is defined via the stochastic integral equation Z t ǫ b(Xsǫ , θ0 ) ds + ǫ · Qǫt , (1.1) Xt = x + 0 where x ∈ Rd , ǫ > 0, and θ0 is an unknown parameter that belongs to a parameter space Θ0 , which is an open bounded, convex subset of Rp ; we put Θ := Θ0 , the closure of Θ0 ; b is a measurable function on Rd × Θ; Qǫ is a stochastic process of the form e ǫ + rǫ B H Qǫt := Q t t e ǫ is a semimartingale, B H is a fractional Brownian motion with the Hurst paramwhere Q eter H ∈ (0, 1), and rǫ is a real number satisfying that rǫ → 0 (ǫ → 0). We also assume for ∗ E-mail: [email protected] 1 2 Threshold estimation for small noise model e ǫ that Q e ǫ = 0 and supt∈[0,1] Q eǫt − Qt → 0 as ǫ → 0 with probability the semimartingale Q 0 one. Hence we have that sup |Qǫt − Qt | → 0 a.s., t∈[0,1] ǫ → 0, (1.2) As is well known, B H is not a semimartingale and neither is Qǫ , but Qǫ converges uniformly to a semimartingale Q as ǫ → 0 almost surely. Moreover, we suppose that the Doob-Meyer decomposition of Q is given as follows. Qt = At + Mt (t ≥ 0), A0 = M0 = 0 a.s., (1.3) where A is a process with finite variation, and M is an Ft -local martingale. Some typical examples for Qǫ is given in Section 2.3. We suppose that the process X ǫ = (Xtǫ )t∈[0,1] is observed discretely in time: {Xtnk }nk=0 with tnk = k/n (the index ǫ is omitted in the notation), from [0, 1]-interval. We denote by ∆nk X := Xtnk − Xtnk−1 and ∆n := tnk − tnk−1 = 1/n. Our interest is to estimate the value of the parameter θ0 from the discrete samples under that n → ∞ as well as ǫ → 0: small noise asymptotics. There are some practical advantages in small noise asymptotics: • Statistical point of view: the drift estimation by samples from a fixed finite time interval is justifiable under relatively mild conditions. Since we need to observe the process long time to achieve “good” estimation of the drift without small noise assumption, we usually assume the asymptotics that the terminal time of observations goes to infinity, under which some technical conditions such as “ergodicity” or “uniform moment conditions” for the process need to be assumed. By a suitable scaling technique, we can regard such a long-term model as a small noise model, approximately. Then there is no need for those conditions, which are sometimes difficult to check in practice; see remarks in Section 2.3.3 for details. • Computational point of view: approximation of functionals of the process as ǫ → 0 is often available in relatively easy-to-calculate form as in, e.g., Yoshida [37] and Pavlyukevich [23] among others, which is well applied to finance and insurance; see Takahashi [32], Kunitomo and Takahashi [12], Takahashi and Yoshida [33], Uchida and Yoshida [36], Pavlyukevich [22] and references therein. That is why, using the small noise model is convenient to deal with both applications and statistical inference at the same time. Sampling problems for stochastic differential equations with small noise have been well studied by many authors in both theoretical and applied point of views. Some earlier works for small-diffusion models are found in the papers by Kutoyants [13, 14], Genon-Catalot [6] and Laredo [15], and they have been developed in some directions by several authors: e.g., martingale estimating functions are studied by Sørensen [30], efficient estimation is investigated by Sørensen and Uchida [31], Gloter and Sørensen [8]; see also Uchida [34, 35], and asymptotic expansion approach is initiated by Yoshida [37, 38], see also 3 Yasutaka Shimizu Uchida and Yoshida [36], among others. Although those works are due to diffusion noise, more general noise model are also considered recently. For example, Long [16] and Ma [18] investigate the drift estimation of a Lévy driven Ornstein-Uhlenbeck process; see also Long [17], and Long et al. [20] deal with the inference for non-linear drift under the small semimartingale noise. In our paper, we do not require that the noise is a semimartingale, but ‘approximately’ a semimartingale in the sense of (1.2). The goal of this paper is statistical inference for the drift of the process under the asymptotics that noise vanishes, which is the same motivation as in Long et al. [20], but it was seen in our numerical study that our estimator performed better than theirs under finite samples. Long et al. [20] consider the case where Qǫ ≡ L is a Lévy process (although it can be extended to a case of a semimartingale) independent of the dispersion parameter ǫ, and investigate the asymptotic behavior of the least squares-type estimator (LSE) defined by LSE θbn,ǫ := arg min Ψn,ǫ (θ), θ∈Θ where Ψn,ǫ (θ) = ǫ−2 ∆−1 n n X k=1 |∆nk X − b(Xtnk−1 , θ) · ∆n |2 (1.4) (1.5) LSE is ǫ−1 -consistent with the limit of They show that the minimum contrast estimator θbn,ǫ a Lévy functional as ǫ → 0 and n → ∞ with nǫ → ∞ under some mild conditions on the function b; see Theorems 4.1 and 4.2 in [20]. The asymptotic distribution generally has a fat-tail, that causes us unsatisfactory performance even if ǫ is small enough; see numerical results in [20], or Section 3 below. This would be due to ‘large’ shocks by the driving noise. It will be easy to imagine that a ‘large’ jump of Qǫ makes much impact to the direction of drift, and make the drift estimation unstable. Therefore, cutting such ‘large’ jumps could improve the performance. That is why, we consider the threshold-type estimator defined as follows: θbn,ǫ := arg min Φn,ǫ(θ), θ∈Θ where Φn,ǫ (θ) = ǫ −2 ∆−1 n n X k=1 |∆nk X − b(Xtnk−1 , θ) · ∆n |2 1{|∆nk X|≤δn,ǫ } , (1.6) (1.7) δn,ǫ is a positive number, which is a threshold to eliminate ‘large’ shocks causing bias to drift estimation. That is, the indicator 1{|∆nk X|≤δn,ǫ } plays a role of a filter to split increments with ‘large’ and ‘small’ magnitude of shocks; see Shimizu [26], or Shimizu and Yoshida [29] for the fundamental idea of those filters. It would be intuitively clear LSE and θ bn,ǫ can be asymptotically equivalent. However, we that if δn,ǫ → ∞ then θbn,ǫ will show that the same thing holds true even if δn,ǫ → 0 by choosing the sequence δn,ǫ 4 Threshold estimation for small noise model carefully. Moreover we can see in numerical study that θbn,ǫ has much better finite-sample LSE . Furthermore, we will show the mighty convergence (the performance than that of θbn,ǫ convergence of moments) for u bn,ǫ := ǫ−1 (θbn,ǫ − θ0 ), which is a stronger result than those in [20]: Z E [f (b un,ǫ )] → Rp f (z) Lu (dz), as ǫ → 0 and n → ∞ for every continuous function f of at most polynomial growth, where Lu is the asymptotic distribution of u bn,ǫ . As is described above, the asymptotic distribution Lu is generally not normal unless the limiting process Q is a Wiener process. However, it is interesting to note that we sometimes encounter a phenomenon that u bn,ǫ seems asymptotically normal in numerical study. This may indicate that our filtered LSE could also be asymptotically normal if we choose δn,ǫ in a different way as previous, otherwise we may just observe it as an ‘approximate’ phenomenon possibly when some appropriate conditions are satisfied. Although a justification of this phenomena under the discrete sampling is still an open problem, we will add some discussion on these points in Section 4. The paper is organized as follows. In Section 2, we prepare notation and assumptions, and present the main results under discrete samples. In particular, Section 2.4 is devoted to investigating some technical conditions for Q. We will give some easy-to-check sufficient conditions for those when the noise Q is a Lévy process. In Section 3, we will show an advantage of our estimator compared with the usual LSE via numerical study, and we further observe the asymptotic distribution seems normal. Finally, we will try to give a theoretical explanation to those asymptotic phenomena in Section 4. All the proofs of main theorems are given in Section 5. 2 Main results 2.1 Notation and assumptions We use the following notation: • For a process Y = (Yt )t∈[0,1] , kY kLp = (E|Y1 |p )1/p (p > 0) and kY k∗ := supt∈[0,1] |Yt |. • Given a multilinear form M = {M (i1 ,...,iK ) : ik = 1, . . . , dk ; k = 1, . . . , K} ∈ Rd1 ⊗ (i) · · · ⊗ RdK and vector uk = (uk )i≤dk ∈ Rdk , we write M[u1 , . . . , uK ] = d1 X i1 =1 ··· dK X (i ) (i ) M (i1 ,...,iK ) u1 1 . . . uKK . iK =1 Note that the above form is well-defined when the jth dimension of M (the number of ij ) and that of uj are the same. When some of uk is missing in “M[u1 , . . . , uK ]”, the resulting form is regarded as a multilinear form again; e.g., M[u3 , . . . , uK ] ∈ Rd1 ⊗ Rd2 . For example, when M is a vector M = (Mi )1≤i≤d , M[x] = M ⊤ x for 5 Yasutaka Shimizu f is a matrix M = (Mij )1≤i≤d ;1≤j≤d , x ∈ Rd , which is the inner product, and when M 1 2 f M[u, v] for u = (ui )1≤i≤d1 and v = (vi )1≤i≤d2 is the quadratic form u⊤ M v, and f = M v ∈ Rd1 or M[u] f M[v] = M ⊤ u ∈ Rd2 , among others. The correspondences of dimensions will be clear from the context. We also use the notation M[u⊗K ] := M[u1 , . . . , uK ] when u1 = · · · = uK . • For a = (a1 , . . . , am )⊤ ∈ Rm , ∇a = (∂/∂a1 , . . . , ∂/∂am ). Moreover, we denote by ∇ka := ∇a ⊗ ∇ak−1 with ∇0a ≡ 1. That is, ∇ka forms a multilinear form, e.g., ∇2a = ∇⊤ a ∇a in a matrix form. • For a multilinear form M, |M|2 denotes the sum of the squares of each element of M. • C is often used as a generic positive constant that may differ from line to line. Moreover, we write a . b if a ≤ Cb almost surely. • C k,l (Rd × Θ; Rq ) denotes the space of functions f (x, θ) : Rd × Θ → Rq that is k and l times differentiable with respect to x and θ, respectively. Moreover, C↑k,l (Rd × Θ; Rq ) denotes a subclass of f ∈ C k,l (Rd × Θ; Rq ) that is of polynomial growth uniformly in θ ∈ Θ: supθ∈Θ |∇αx ∇βθ f (x, θ)| . (1 + |x|)C for any α ≤ k and β ≤ l. • For a function g(x, θ) : Rd × Θ → Rq , we write gk−1 (θ) := g(Xtnk−1 , θ). Moreover, denote by χk (θ) := ∆nk X − bk−1 (θ)∆n (∈ Rd ). • All the asymptotic symbol are described under n → ∞ and ǫ → 0 unless otherwise noted. Using the above notation, our estimating function given in (1.7) is rewritten as Φn,ǫ (θ) = ǫ−2 ∆−1 n n X n I[χ⊗2 k (θ)]1{|∆k X|≤δn,ǫ } , k=1 where I is the d × d identity matrix. We make the following assumptions on the model (1.1): A1 |b(x, θ) − b(y, θ)| . |x − y| for each x, y ∈ Rd and θ ∈ Θ. Under this assumption, the ordinary differential equation dXt0 = b(Xt0 , θ0 ) dt, X00 = x, has the unique solution X 0 = (Xt0 )t≥0 . A2 b ∈ C↑2,3 (Rd × Θ; Rd ). A3 θ 6= θ0 ⇔ b(Xt0 , θ) 6= b(Xt0 , θ0 ) for at least one value of t ∈ [0, 1]. 6 Threshold estimation for small noise model A4 I(θ0 ) := R1 0 ∇θ b(Xt0 , θ0 )⊤ ∇θ b(Xt0 , θ0 ) dt (∈ Rp ⊗ Rp ) is positive definite, We further make the following conditions for the limiting process Q of Qǫ . Q1[γ] There exists some γ > 0 such that, for any k = 1, . . . , n, ) ( P sup n t∈(tn k−1 ,tk ] |Qt − Qtnk−1 | > ∆γn Ftnk−1 = op (1). Q2[q] For q > R0 and processes A and M given in (1.3), the total variation of A, say 1 T V (A) := 0 |dAt |, and the quadratic variation [M, M ] satisfy that h i q/2 E [T V (A)q ] + E [M, M ]1 < ∞. Although the condition Q1 seems ad hoc, we can give some easy-to-check conditions in some important cases where, e.g., Q is a Lévy process satisfying Q2[q] for some q > 0; see Section 2.4 for details. 2.2 Asymptotic behavior of threshold-type estimators Theorem 1. Suppose A1–A3, Q1[γ], and that a sequence {δn,ǫ } satisfies that δn,ǫ ∆−1 n → ∞, Then −1 ǫ ∆γn δn,ǫ = O(1), nǫ → ∞. (2.1) P θbn,ǫ −→ θ0 . Remark 1. Condition (2.1) ensures a kind of “negligibility”:   P |∆nk X| > δn,ǫ |Ftnk−1 → 0, LSE ; see (5.13) in the proof. which makes θbn,ǫ asymptotically equivalent to θbn,ǫ Theorem 2. Suppose the same assumptions as in Theorem 1, and further A4. Then Z 1 P −1 b −1 ∇θ b(Xt0 , θ0 )[dQt ], ǫ (θn,ǫ − θ0 ) −→ ζ := I (θ0 ) 0 where the square bracket [dQt ] is the quadratic form of dQt for the matrix ∇θ b(Xt0 , θ0 ) in this case; see Section 2.1. Theorem 3. Suppose the same assumptions as in Theorem 2, and that Q2[q] holds true for any q > 0. Then, it follows for every continuous function f : Rp → R, of polynomial growth that h  i E f ǫ−1 (θbn,ǫ − θ0 ) → E[f (ζ)], where ζ is given in Theorem 2. 7 Yasutaka Shimizu 2.3 2.3.1 Examples and remarks α-stable noise Suppose d = 1, and that Qǫ = σB + ρǫ S, where ρǫ → ρ ∈ [0, ∞), σ ≥ 0 is a constant, B is a Brownian motion, and S is a standard α-stable process with stability index α ∈ (0, 2) and the skewness parameter β ∈ [−1, 1], which is denoted by Sα (1, β, 0); see, e.g., Cont and Tankov [4], page 94 for this notation. In this case, the limiting variable ζ in Theorem 2 becomes ζ = I −1 (θ0 ) {σD2 · Z + ρDα · Sα (1, β, 0)} , R 1/α 1 where Dα = 0 {∂θ b(Xt0 , θ0 )}α dt and Z is a standard Gaussian variable. Hence if ρ = 0 then the estimator is asymptotically normal; see also Long et al. [20]. 2.3.2 Markovian noise Let us consider the case where ǫ dQǫt = ǫ1 a(Xtǫ ) dWt + ǫ2 c(Xt− ) dZt , (2.2) where ǫj > 0 (j = 1, 2), a, c are some suitable functions, and Z is a pure jump Lévy process. • Case of ρǫ := ǫ2 /ǫ1 → 0: we can reparametrize as e ǫ := ǫ · ǫ1 to obtain that with e ǫt , dXtǫ = b(Xtǫ , θ0 ) dt + e ǫ · dQ e ǫ = a(X ǫ ) dWt + ρǫ c(X ǫ ) dZt . dQ t t t− Then e ǫ−1 (θbn,ǫ − θ0 ) is asymptotically normal as in Sørensen and Uchida [31]. We can verify that Z t ǫ e a(Xs0 ) dWt a.s., ǫ → 0, Qt → Q := 0 uniformly in t ∈ [0, 1] from the fact that the stochastic integrals are continuous with respect to the u.c.p. topology; see Theorem II.11 by Protter [24], and the uniform convergence of X ǫ → X 0 on compact sets; see Theorem IX.4.21 by Jacod and Shiryaev [10]. • Case of ρǫ := ǫ2 /ǫ1 → ρ ∈ (0, ∞): we can use the same model as above, and the asymptotic distribution of e ǫ−1 (θbn,ǫ − θ0 ) is a convolution of stochastic integrals with respect to W and Z. 8 Threshold estimation for small noise model • Case of ρǫ := ǫ2 /ǫ1 → ∞: we can reparametrize as ǫ := ǫ · ǫ2 to obtain that ǫ dXtǫ = b(Xtǫ , θ0 ) dt + ǫ · dQt , with ǫ ǫ ǫ dQt = ρ−1 ǫ a(Xt ) dWt + c(Xt− ) dZt . Then the asymptotic distribution of ǫ−1 (θbn,ǫ − θ0 ) is written by a stochastic integral with respect to Z only. 2.3.3 Long-term observations Consider a ‘long-term’ discretely observed model: Z t b(Xv ) dv + Qt , Xt = x + (2.3) 0 and X is observed at 0 = tn0 < t1n <, . . . , < tnn =: T for a fixed T > 0 ‘large enough’, where Q is an α-stable process: Q1 ∼ Sα (σ, β, 0) with index α ∈ (1, 2). To estimate the drift function b, we sometimes assume a parametric model b(x) = b(x, θ) and estimate θ under the assumption that T → ∞. However, in a standard theory of parametric inference, we usually need an “ergodicity” or uniform moment conditions such as supt>0 E|Xt |m < ∞ for any m > 0, which are often restrictive conditions. Now, transform the model by v = T u, t = T s, and divide the both sides of (2.3) by T to obtain Z s 1 x b(T · Yu , θ) du + QT s , s ∈ [0, 1], Ys = + T T 0 where Ys = T −1 XT s . Since QT s =d T 1/α Qs by the self-similarity of stable processes, we can regard that Y is a (weak) solution to the following SDE: Z s x es, Ys = + b(T · Yu , θ) du + T 1/α−1 Q T 0 e s is also an α-stable process such that Q e 1 ∼ Sα (σ, β, 0). Suppose that ǫ := T 1/α−1 where Q e is small enough for given T , and putting b(x, θ) = b(T x, θ) and x e = ǫα/(α−1) x, we can reformulate the model as Z s e e s , s ∈ [0, 1], Ys = x e+ b(Yu , θ) du + ǫ · Q (2.4) 0 with ǫ > 0 small enough, and it is interpreted as a small noise SDE. Given a “non-ergodic” model as in (2.3) with long-term observations, we can reformulate it to a small noise model (2.4) with known constant ǫ = T 1/α−1 by plotting the data e = Y0 in the interval [0, 1]. Then, although e b {Ysnk := T −1 XT snk }nk=0 with snk = tnk /T and x depends on T , we can formally use a estimator of θ in e b under the small noise model that does not require any restrictive condition. 9 Yasutaka Shimizu 2.4 On conditions for Q Let us investigate some sufficient conditions to ensure Q1 and Q2 when Q is specified. An important case is when Q is a Lévy process such that the characteristic exponent:   ψ(u) := log E exp(iu⊤ Q1 ) , is given by  iu⊤ z ν(dz), u ∈ Rd , (2.5) 2 1 + |z| d R R where b ∈ Rd , ν is the Lévy measure with ν({0}) = 0 and |z|≤1 |z|2 ν(dz) < ∞. As a simple case such that Q is a Wiener process, where b = 0, ν ≡ 0, it follows from the property of the stationary, independent increments that ) ) ( ( ψ(u) = ib⊤ u − P sup n t∈(tn k−1 ,tk ] σ2 ⊤ u u+ 2 Z  eiu ⊤z −1− |Wt − Wtnk−1 | > ∆γn Ftnk−1 sup |Wt | > ∆γn =P t∈(0,∆n ]   p = 2 1 − Φ(∆γn / ∆n ) → 0, for any γ ∈ (0, 1/2), where Φ is a standard normal distribution function; for the last equality, see, e.g., Doob [5], or Boukai [3]. When Q is a stable process, we have the following result. Proposition 1. When Q is a symmetric α-stable process with α ∈ (1, 2). Then Q1[γ] holds true for any γ ∈ (0, α−1 ). Proof. Due to the maximal inequality (3.5) in Joulin [11], we have ( ) ( ) P sup n t∈(tn k−1 ,tk ] |Qt − Qtnk−1 | > ∆γn Ftnk−1 =P sup |Qt | > ∆γn t∈(0,∆n ]  = O ∆1−γα →0 n as n → ∞. We can also present some sufficient conditions to Q1[γ] when a process Q is a more general Lévy process: let Z Z −2 ν(dz) + x |z|2 ν(dz) h(x) := |z|>x +x −1 |z|≤x b+ Z |z|≤x z|z|2 ν(dz) − 1 + |z|2 Z |z|>x z ν(dz) . 1 + |z|2 Proposition 2. Suppose that Q is a Lévy process with characteristic (2.5), and that there exists a constant   η β := inf η > 0 : lim sup x h(x) = 0 . (2.6) x→0 10 Threshold estimation for small noise model Then the condition Q1[γ] holds true for any γ ∈ (0, γ0 ), where γ0 =  β −1 (σ = 0) . (β ∨ 2)−1 (σ = 6 0) We interpret that 1/0 = ∞. Proof. Let Qt = σWt + Zt , where W is a Wiener process and Z is a pure jump Lévy process with characteristic  Z i ⊤ log E exp(iu Z1 ) = ib u + h ⊤ Rd iu⊤ z e iu⊤ z −1− 1 + |z|2  ν(dz), u ∈ Rd . By the independent, stationary increments property for Lévy process Q, we see that ( ) Rn := P .P sup ( n t∈(tn k−1 ,tk ] |Qt − Qtnk−1 | > ∆γn Ftnk−1 ) sup |σWt | > ∆γn /2 t∈(0,∆n ] +P ( ) sup |Zt | > ∆γn /2 t∈(0,∆n ] (1) =: Rn(1) + Rn(2) . (1) Note that Rn → 0 for any γ ∈ (0, 1/2) if σ 6= 0, and that Rn ≡ 0 if σ = 0. Moreover, according to Pruitt [25], (3.2), it follows that (2) Rt . ∆n h(∆γn /2) = (2xn )1/γ h(xn ), xn := ∆γn /2. (2) Hence, if 1/γ > β, equivalently γ ∈ (0, β −1 ), then Rn → 0 by the definition of β ≥ 0. Then the result follows. Corollary 1. Suppose that given by R |z|≤1 |z|ν(dz) σ2 ⊤ u u+ ψ(u) = 2 < ∞, and that the Lévy characteristic ψ is Z (eiu Rd ⊤z − 1) ν(dz). R z Note that b − |z|>x 1+|z| 2 ν(dz) = 0 in the expression (2.5). Then β in Proposition 2, (2.6) is consistent with the Blumenthal-Getoor index: ) ( Z β = inf η>0: |z|≤1 |z|η ν(dz) < ∞ ≤ 1. Proof. Note that, under the assumption, we have h(x) = Z ν(dz) + x |z|>x −2 Z 2 |z|≤x |z| ν(dz) + x −1 Z |z|≤x z|z|2 ν(dz) . 1 + |z|2 11 Yasutaka Shimizu Let β0 be the Blumenthal-Getoor index: ( β0 = inf η ∈ [0, 2] : Z ) η |z|≤1 |z| ν(dz) < ∞ . Then we easily see by the direct computation that, for any ǫ > 0 lim xβ0 +ǫ h(x) = 0, lim inf xβ0 −ǫ h(x) = ∞. x→0 x→0 Indeed, for x ∈ (0, 1), we have |x β0 +ǫ Z β0 +ǫ h(x)| ≤ |x| ν(dz) + + |x| Z ≤ |x|ǫ |z|≤1 ν(dz) |z|>1 x<|z|≤1 β0 +ǫ−2 Z Z 2 |z|≤x |z| ν(dz) + |x| |z|β0 ν(dz) + xβ0 +ǫ ǫ Z |z|>1 Z |z|3 ν(dz) 2 |z|≤x 1 + |z| Z |z|β0 ν(dz) ν(dz) + |x|ǫ β0 +ǫ−1 |z|≤x = O(|x| ) → 0. The other condition: lim inf xβ0 −ǫ h(x) = ∞ is easier since x→0 x β0 −ǫ h(x) > x β0 −ǫ−2 Z 2 |z|≤x |z| ν(dz) ≥ x −ǫ Z |z|≤x |z|β0 ν(dz) → ∞, as x → 0. Hence we get β0 = β. The condition Q2 can be reduced to moment conditions for the Lévy measure. Proposition 3. Suppose that Q is a Lévy process with characteristic (2.5). Then the condition Q2[q] holds true if Z |z|q ν(dz) < ∞. |z|>1 Proof. The Lévy process Q has the following Lévy-Ito decomposition: Z tZ Z tZ e (ds, dz) + z N (ds, dz) zN Qt = at + bWt + 0 |z|≤1 0 |z|>1 where a and b are some constants, W is a Wiener process, N is a Poisson random measure, e (ds, dz) = N (ds, dz) − ν(dz)ds. Then the decomposition (1.3) is given by and N Z tZ Z tZ e (ds, dz). zN z N (ds, dz), Mt = bWt + At = at + 0 |z|>1 0 |z|≤1 12 Threshold estimation for small noise model and it follows from the Burkholder-Davis-Gundy inequality that q Z q E[T V (A) ] . |a| + E .1+E Z 0 0 1Z q |z|>1 1Z |z| N (ds, dz) q |z|>1 e (ds, dz) + |z| N Z |z|>1 |z|q ν(dz). According to the argument as in Bichteler and Jacod [2]; see also the proofs of lemma 4.1 and Proposition 3.1 by Shimizu and Yoshida [29], we see that E Z 0 1Z q |z|>1 Hence e (ds, dz) |z| N q E[T V (A) ] . Z |z|>1 . Z |z|>1 |z|q ν(dz). |z|q ν(dz) < ∞. By the similar argument, it is easy to see by Hölder’s inequality that, for any m > 1, E|[M, M ]|q/2 1/m  ≤ E|[M, M ]|mq/2 .1+ Z |z|≤1 !1/m |z|mq/2 ν(dz) < ∞, if we take mq/2 ≥ 2. This completes the proof. 3 3.1 Numerical study 2-dim model We consider the following 2-dimensional Lévy driven SDE: b(x, θ) = q θ1 + x21 + x22 , − p θ 2 x2 1 + x21 + x22 !⊤ , Qt =   Vtκ,ξ + Bt , Stα (3.1) where B is a standard Brownian motion, S α is a standard symmetric α-stable process Sα (1, 0, 0), and V κ,ξ is a variance gamma process with Lévy density pV (z) = κ −ξ|z| e , |z| z ∈ R, κ, ξ > 0, which is obtained by Brownian subordination with a gamma process Gt ∼ Γ(shape = ct, scale = 1/λ) (c, λ > 0) as follows: √ 2κ λ2 κ,ξ , ξ= Vt = σWGt (σ > 0), κ = c σ 13 Yasutaka Shimizu where W is the standard Brownian motion independent of G; see, e.g., Cont and Tankov [4] for details. Assume that W, S α and V κ,ξ are independent of each other. In the sequel, we set values of parameters as (1) (2) (X0 , X0 ) = (1, 1), (θ1 , θ2 ) = (2, 1), (κ, ξ, α) = (5, 3, 3/2). A sample path is given in Figure 5. Then both X (1) and X (2) are unbounded variation jump-processes with finite activity of jumps for X (1) and infinite for X (2) . We will compare our threshold-type estimator to the LSE by Long et al. [20]. 3.2 LSE and threshold estimator LSE , θ bLSE ) is a solution to Note that the LSE θbLSE = (θb1,n,ǫ 2,n,ǫ n X k=1 r LSE θb2,n,ǫ =− = 1; LSE + (X (1) )2 + (X (2) )2 θb1,n,ǫ tn tn k−1 k−1 n and that our estimator θb = (θb1,n,ǫ , θb2,n,ǫ ) is a solution to k=1 r (∆nk X (2) )Xt(2) n k=1 ∆nk X (1) n X Pn ∆nk X (1) (1) (2) θb1,n,ε + (Xtn )2 + (Xtn )2 k−1 k=1 θb2,n,ǫ = − n Pn −1 k−1 (2) (1) 1+(Xtn k−1 )2 +(Xtn )2 k−1 (2) (Xtn )2 . k−1 k=1 1+(X (1) )2 +(X (2) )2 tn tn k−1 k−1 n 1X 1{|∆nk X|≤δn,ǫ } n k=1 (∆nk X (2) )Xt(2) n r k−1 (2) (1) 1+(Xtn Pn −1 1{|∆nk X|≤δn,ǫ } = k−1 Pn r k−1 )2 +(Xtn )2 1{|∆nk X|≤δn,ǫ } k−1 (2) (Xtn )2 . k−1 k=1 1+(X (1) )2 +(X (2) )2 1{|∆n k X|≤δn,ǫ } tn tn k−1 k−1 In the simulations, we tried n = 1000, 3000, 5000 and ǫ = (0.4, 0.3, 0.05). The results for the LSE given in (1.4) are in Table 1, and those for the threshold-type estimator in (1.6) are in 2 and 3, in which the threshold δn,ǫ = ǫ/5 and ǫ/10 are used, respectively. The simulations are iterated 10000 times, and mean and standard deviation (s.d.) of estimators are given in those tables. In Table 2 and 3, the values of nδn,ǫ are also included. 3.3 Discussion From numerical results, we can observe that the threshold-type estimator improves the accuracy of estimation in the sense of the standard deviation compared with the usual LSE by Long et al. [20]. Especially, the improvement for θ2 is more drastic than that for 14 Threshold estimation for small noise model θ1 . This would be because θ2 is the mean-reverting parameter for X (2) , a stable process which has much more frequent and larger jumps than those of X (1) . In order to make the estimation of θ1 more accurate, we need to make ǫ smaller rather than n larger. We should note that the case where (n, ǫ, δn,ǫ ) = (1000, 0.05, ǫ/10) causes a large bias, the reason of which would be that the asymptotic theory does not work well because nδn,ǫ = 5 is ‘small’ although it should be large enough in the theory. From many simulations omitted here, we see that, at least, “nδn,ǫ ≥ 10” would be needed for estimation with ‘small’ bias; see also, e.g., the case where (n, ǫ, δn,ǫ ) = (1000, 0.05, ǫ/5), which returns better estimation. Although there remains a problem to choose δn,ǫ in practice, we can use the method proposed by Shimizu [27] if the parameters in noise process is known or estimable. Finally, we observe normal QQ-plots for normalized estimators ǫ−1 (θb1,n,ǫ − θ1 ) and −1 ǫ (θb2,n,ǫ − θ2 ) in the case where n = 5000, ǫ = 0.1 and δ = ǫ/5; see Figures 3 and 4. According to the results, the estimators with δ = ǫ/5 seem asymptotically normal although Theorem 2 does not necessarily say that. For your reference, see Figures 1 and 2 that are the normal QQ-plots for the LSE without filter proposed by Long et al. [20]. The figures show that the usual LSE’s are not necessarily asymptotically normal as the theory saying. Therefore, the asymptotic normality-like phenomena would be due to the filter effects. We could understand those results intuitively as follows: cutting large jumps from a process with infinite activity jumps, the remaining small jumps will behave as a Brownian motion. For example, suppose that the driving noise Q is a Lévy process of infinite activity jumps with the Lévy measure ν, and put Z tZ (δ) e (ds, dz), δ > 0, zN Qt := 0 |z|≤δ e is a compensated Poisson random measure as given in the proof of Proposition where N R 3. Then, according to Asmussen and Rosinski [1], it follows for σ 2 (δ) := |z|≤δ |z|2 ν(dz) that D σ(δ)−1 Q(δ) −→ B, in D[0, 1]-space equipped with the sup-norm under a certain assumption, where B is a standard Brownian motion. Therefore, by an appropriate norming of estimator, the limit in Theorem 2 might be an integral with respect to the process that is close to a Brownian motion. This consideration indicates that the LSE with filter can be “approximately” asymptotically normal by letting δn,ǫ converge to zero in a suitable rate, which is a great advantage when we would like to make confidence intervals or do statistical testing. In the next subsection, we shall try to understand this phenomenon theoretically. 4 Could a filtered LSE be asymptotically normal? In this section, we assume that Qǫ ≡ Q is a Lévy process with Lévy measure ν. We consider the following two cases for Q with characteristic (2.5): 15 Yasutaka Shimizu • Finite activity case: Z • Infinite activity case: |z|≤1 ν(dz) < ∞ and σ 2 > 0; Z |z|≤1 ν(dz) = ∞ (possibly, σ 2 = 0). The former case, it would be possible to show the asymptotic normality of the filtered LSE n by separating the R increments ∆k X’s with or without jumps as in Shimizu and Yoshida [29]. However, when |z|≤1 ν(dz) = ∞, it is known that the filter 1{|∆nk X|≤δn,ǫ } is not enough to separate ∆nk X’s with or without jumps; see Shimizu [26], Lemma 3.3 and some remarks on that. In this section, we shall consider the following ad hoc situation to understand why the filtered LSE looks like asymptotically normal. [Assumption] All the jumps of Q are observed. Under this assumption, the following contrast function does make sense. e n,ǫ,δ (θ) = ǫ−2 ∆−1 Φ n where δ > 0 is a constant, and kQǫ k∗k = n X k=1 |∆nk X − b(Xtnk−1 , θ) · ∆n |2 1{k∆Qǫ k∗ ≤δ} , sup t∈(tk ,tk+1 ] k |∆Qǫt |, ∆Qǫt = ǫ · (Qt − Qt− ). Under our assumption, we can specify if 1{k∆Qǫ k∗ ≤δ} = 1 or 0, and we can define the k estimator of θ as the minimum contrast estimator: e n,ǫ,δ (θ). θen,ǫ,δ = arg min Φ θ∈Θ Hereafter, we further use the following notation: • For a κ > 0, 2 σ (κ) := Z 2 |z|≤κ |z| ν(dz); λ(κ) := Z ν(dz), |z|>κ where ν is a Lévy measure of Q. • All the asymptotic symbols are used under δ, ǫ → 0 and n → ∞. 4.1 Finite activity case Suppose that Z |z|≤1 ν(dz) < ∞ and σ 2 > 0, which implies that Q is written as Qt = σWt + Nt X i=1 Yi , (4.1) R where N is a Poisson process with intensity λ := R ν(dz) and {Yi }i=1,2,... is an i.i.d. sequence with distribution λ−1 ν. In this special case, we have the following result by taking δn,ǫ ↓ 0 faster than the speed of ǫ that is a “magnitude of jumps”. 16 Threshold estimation for small noise model Theorem 4. Suppose that Q is given by (4.1), and that A1–A4 hold true. Moreover, suppose that δ/ǫ → 0. Then ǫ −1 P (θen,ǫ,δ − θ0 ) −→ I −1 (θ0 ) Hence θen,ǫ,δ is asymptotically normal. 4.2 Z (4.2) 1 0 ∇θ b(Xt0 , θ0 )[dWt ], Infinite activity case R Theorem 5. Let Qǫ ≡ Q be a Lévy process with |z|<1 ν(dz) = ∞, and suppose A1–A4, Q1[γ], and that Q2[q] holds true for any q > 0. Moreover suppose that λ(δ/ǫ) → c ∈ (0, 1), n log n nǫ∆γn → 0, (4.3) and that there exists a constant ρ ∈ (0, 1) such that σ ρ (δ/ǫ) log n → ∞; nǫ · σ(δ/ǫ) → ∞. (4.4) (4.5) Furthermore, suppose for each κ > 0 that σ (κσ(δ/ǫ) ∧ δ/ǫ) ∼ σ(δ/ǫ), (4.6) Then there exists a d-dimensional Brownian motion B, independent of X0 = x, such that the following weak convergence holds true: Z 1   D −1 e −1 ∇θ b(Xt0 , θ0 ) [dBt ] , (σ(δ/ǫ)ǫ) θn,ǫ,δ − θ0 −→ I (θ0 ) 0 Hence θen,ǫ,δ is asymptotically normal. We shall give a concrete example that satisfies the above situation. Remark 2. The assumption (4.6) is to approximate a component of compensated small jumps by a Wiener process; see Theorem 2 by Asmussen and Rosinski [1]. According to Proposition 2.1 in [1], a simple condition that (δ/ǫ)−1 σ(δ/ǫ) → ∞ (4.7) is sufficient for (4.6). Moreover, note that (4.6) requires a high jump-activity, which excludes cases where Q is a compound Poison process or a gamma process; see some Examples 2.2–2.4 in [1]. Therefore it is assumed in (4.4) that λ(δ/ǫ) → ∞ (δ → 0). 17 Yasutaka Shimizu Remark 3. Although this is the result under an ideal situation that all the jumps are observable, we can imagine that such a phenomenon ‘approximately’ occurs in simulations presented in Figures 3 and 4. That is, when ∆n and δn,ǫ are sufficiently ‘small’, a filter 1{|∆nk X|≤δn,ǫ } can successfully cut jumps whose sizes are larger than δn,ǫ . However, it would be hard to show the similar result when the observations are completely discrete as in our original setting because the filter 1{|∆nk X|≤δn,ǫ } can not exactly exclude an increment that includes the jumps whose sizes are larger than δn,ǫ ; see also Shimizu [26] about the filter in infinite activity cases. The complete analysis in the discretely observed cases would be an important work in the future. ǫ = 0.4 LSE θb1,n,ǫ (s.d.) LSE θb2,n,ǫ (s.d.) n = 1000 2.54872 (2.4370) 1.72415 (3.5426) n = 3000 2.53364 (2.4489) 1.79755 (4.2814) n = 5000 2.78911 (2.5602) 1.78645 (2.9579) True 2.0 ǫ = 0.3 LSE θb1,n,ǫ (s.d.) LSE θb2,n,ǫ (s.d.) n = 1000 2.31618 (1.8248) 1.50664 (2.8685) n = 3000 2.29381 (1.7926) 1.5275 (2.7667) n = 5000 2.34757 (1.7429) 1.53632 (2.8160) True 2.0 ǫ = 0.05 LSE θb1,n,ǫ (s.d.) LSE θb2,n,ǫ (s.d.) n = 1000 2.00599 (0.2951) 1.05963 (1.3026) n = 3000 2.01071 (0.2913) 1.04438 (0.6773) n = 5000 2.01002 (0.2938) 1.06135 (0.7344) True 2.0 1.0 1.0 1.0 Table 1: These are results for the LSE (without filter) based on Long et al. [20]. We find that the standard deviation (s.d.) are large, especially, for θb2,n,ǫ , which implies an unstability of estimation. We would like to improve the stability by using a ‘filter’. 5 5.1 Proofs Preliminary lemmas We shall first establish some preliminary lemmas to show the main theorems later. 18 Threshold estimation for small noise model Normal Q−Q Plot 10 −10 0 Sample Quantiles 20 10 −30 −20 −10 −20 0 Sample Quantiles 30 20 40 30 Normal Q−Q Plot −4 −2 0 2 4 −4 −2 Theoretical Quantiles 0 2 4 Theoretical Quantiles LSE Figure 1: Normal QQ-plots for θ[ 1,n,ǫ . Left: ǫ = 0.1, Right: ǫ = 0.05. The results show that the right tail is especially heavier than that of normal distribution. Normal Q−Q Plot −100 Sample Quantiles −250 −300 −200 −50 −100 −200 −150 Sample Quantiles 0 0 50 100 Normal Q−Q Plot −4 −2 0 Theoretical Quantiles 2 4 −4 −2 0 2 4 Theoretical Quantiles LSE Figure 2: Normal QQ-plots for θ[ 2,n,ǫ . Left: ǫ = 0.1, Right: ǫ = 0.05. The results show that the both of tails are heavier than those of normal distribution. 19 Yasutaka Shimizu ǫ = 0.4 θb1,n,ǫ n = 1000 2.46071 (2.1968) 1.14289 (0.8721) n = 3000 2.45564 (2.1777) 1.15283 (0.88426) n = 5000 2.43215 (2.1860) 1.16222 (0.8856) True 2.0 ǫ = 0.3 θb1,n,ǫ (s.d.) θb2,n,ǫ n = 1000 2.25007 (1.6149) 1.08105 (0.6498) n = 3000 2.25972 (1.6121) 1.1047 (0.6489) n = 5000 2.25829 (1.6249) 1.09448 (0.6563) True 2.0 ǫ = 0.05 θb1,n,ǫ (s.d.) θb2,n,ǫ (s.d.) n = 1000 2.00619 (0.2623) 0.98972 (0.10098) n = 3000 2.00827 (0.2594) 0.99936 (0.1031) n = 5000 2.00681 (0.2652) 1.00039 (0.1037) True 2.0 (s.d.) θb2,n,ǫ (s.d.) (s.d.) 1.0 1.0 1.0 Table 2: Results with filter: δn,ǫ = ǫ/5. Compared with the LSE, the improvement for s.d. of θb2,n,ǫ is drastic although the one for θb1,n,ǫ is less. To make the estimation of θ1 accurate, we need to make ǫ smaller. The values of (nδn,ǫ , δn,ǫ ǫ−1 n1/4 ) seems enough to meet the asymptotic conditions such that they must tend to (∞, 0). 20 Threshold estimation for small noise model ǫ = 0.4 θb1,n,ǫ (s.d.) θb2,n,ǫ (s.d.) n = 1000 2.10973 (2.0587) 1.06597 (0.6997) n = 3000 2.24022 (2.1736) 1.10031 (0.7226) n = 5000 2.46723 (2.2064) 1.10585 (0.7352) True 2.0 ǫ = 0.3 θb1,n,ǫ (s.d.) θb2,n,ǫ (s.d.) n = 1000 1.92432 (1.4600) 1.02419 (0.5216) n = 3000 2.25282 (1.6221) 1.05871 (0.5453) n = 5000 2.24733 (1.6021) 1.05869 (0.5349) True 2.0 ǫ = 0.05 θb1,n,ǫ n = 1000 0.78959 (0.2165) 0.84069 (0.0754) n = 3000 2.00133 (0.2628) 0.98834 (0.0853) n = 5000 2.00864 (0.2653) 0.99450 (0.0865) True 2.0 (s.d.) θb2,n,ǫ (s.d.) 1.0 1.0 1.0 Table 3: Results with filter: δn,ǫ = ǫ/10. The s.d. for θb2,n,ǫ is smaller than those with δn,ǫ /5 as well as those for θb1,n,ǫ . However, we should be careful by observing the case of (n, ǫ) = (1000, 0.05), where both estimators are negatively biased. This would be because nδn,ǫ = 5 is too small to meet the corresponding asymptotic condition: nδn,ǫ → ∞. 21 Yasutaka Shimizu Normal Q−Q Plot 0 Sample Quantiles −20 −10 −10 0 Sample Quantiles 10 10 20 20 Normal Q−Q Plot −4 −2 0 2 4 −4 −2 Theoretical Quantiles Figure 3: Normal QQ-plots for as ǫ = 0.05, the distribution of 0 2 4 Theoretical Quantiles θb1,n,ǫ. Left: ǫ = 0.1, Right: ǫ = 0.05. When ǫ is small such θb1,n,ǫ seems almost Gaussian. Normal Q−Q Plot 0 Sample Quantiles 0 −5 −5 Sample Quantiles 5 5 Normal Q−Q Plot −4 −2 0 Theoretical Quantiles 2 4 −4 −2 0 2 4 Theoretical Quantiles Figure 4: Normal QQ-plots for θb2,n,ǫ. Left: ǫ = 0.1, Right: ǫ = 0.05. When ǫ is small such as ǫ = 0.05, the distribution of θb1,n,ǫ seems almost Gaussian. 22 0.8 0.4 0.6 X2 1.0 1.2 1.0 1.5 X1 2.0 Threshold estimation for small noise model 0.0 0.2 0.4 0.6 0.8 1.0 Time Figure 5: A sample path of Model (3.1) with (θ1 , θ2 , κ, ξ, α) = (2, 1, 5, 3, 3/2) and ε = 0.4. To evaluate functions of discrete samples, we use the following notation as in Long et al. [20]: • Discretized process: Ytn,ǫ := X⌊nt⌋/n for t ≥ 0 and n ∈ N, where ⌊x⌋ stands for the integer part of x ∈ R. • Since Q is a semimartingale, we can consider the Doob-Meyer decomposition: Q = A + M , where A is a process with finite variation, and M is an Ft -local martingale with A0 = M0 = 0 a.s. • A stopping time for localization: for m ∈ N, n,ǫ τm = inf{t ≥ 0 : |Xt0 | ∧ |Ytn,ǫ | ≥ m} ∧ Tm , Rt where Tm := inf{t ≥ 0 : [M, M ]t ∧ 0 |dAs | ≥ m}. As a convention, inf ∅ = ∞. Hence, note that limm→∞ Tm = ∞ almost surely. Lemma 1. Under A1, it holds that Y n,ǫ − X 0 P ∗ −→ 0. In addition, suppose Q2[q] for some q > 0. Then it holds that     n,ǫ 1 0 q q E Y −X ∗ =O +ǫ . nq (5.1) (5.2) 23 Yasutaka Shimizu Proof. From (1.2), it follows for ǫ small enough that kQǫ k∗ . kQk∗ + 1. (5.3) Hence we can take the same argument as in the proof of Lemma 3.1, (3.1) by Long et al. [20] to obtain that P X − X0 ∗ . ǫkQǫ k∗ . ǫ(kQk∗ + 1) −→ 0, (5.4) since kQk∗ is bounded in probability. Hence the fact that ⌊nt⌋/n → t as n → ∞ yields that Y n,ǫ − X 0 ∗ P ≤ kY n,ǫ − Xk∗ + X − X 0 ∗ −→ 0. This is the proof of (5.1). Moreover, note that E  Y n,ǫ q − X0 ∗ .E .E " " sup X⌊nt⌋/n − Xt t∈[0,1] sup t∈[0,1] + ǫq E " Z q # +E ⌊nt⌋/n b(Xs , θ0 ) ds t sup Qǫ⌊nt⌋/n − Qǫt t∈[0,1] q #  q# X − X0 +E  q ∗ X − X0 q . ∗ Noticing the linear growthness of the function b: |b(x, θ)| . 1 + |x|, and the inequalities (5.3) and (5.4), we have that " q# Z ⌊nt⌋/n   n,ǫ 0 q E Y − X ∗ . E sup (1 + kXk∗ ) ds t∈[0,1] t  q + E X − X0 ∗   nt − ⌊nt⌋ q E [(1 + kXk∗ )q ] + ǫq (1 + E [kQkq∗ ]) . sup n t∈[0,1]   i  h nt − ⌊nt⌋ q + ǫq 1 + EkAkq∗ + ǫq E [M, M ]q/2 . sup n t∈[0,1]   1 q =O +ǫ , nq +ǫ q E [kQkq∗ ] under Q2[q]. We used the Burkholder-Davis-Gundy inequality in the last inequality. This completes the proof. Form (5.2) and (5.4) in the above proof, the following corollary is obvious. 24 Threshold estimation for small noise model Corollary 2. Suppose A1 and Q2[q] for some q > 0. Then it holds that q   < ∞. sup E ǫ−1 kX − X 0 k∗ (5.5) ǫ>0 In addition, if (nǫ)−1 = O(1), then sup E n∈N,ǫ>0  ǫ−1 kY n,ǫ − X 0 k∗ q  < ∞. (5.6) Lemma 2. Under A1, it follows that lim τ n,ǫ m→∞ m =∞ a.s., uniformly in n ∈ N and ǫ ∈ [0, 1]. Proof. Noticing (5.3), we have by the same argument as in the proof of Lemma 3.2 by Long et al. [20] that ! √ 2 n,ǫ sup |Yt | ≤ 2 |x| + sup |Qs | + t eCt < ∞ a.s. n∈N,ǫ>0 s∈[0,t] for any t > 0. Therefore we have the consequence. Lemma 3. Let g ∈ C↑1,1 (Rd × Θ; R). Suppose A1, A2, Q1[γ], and that δn,ǫ ∆−1 n → ∞, −1 ǫ ∆γn δn,ǫ = O(1), nǫ → ∞. Then, we have n 1X P gk−1 (θ)1{|∆nk X|≤δn,ǫ } −→ n k=1 Z 1 0 g(Xt0 , θ) dt, uniformly in θ ∈ Θ. In addition, suppose that Q2[q] holds for some q > 0, then !q # " Z 1 n 1X 0 −1 < ∞. gk−1 (θ)1{|∆nk X|≤δn,ǫ } − g(Xt , θ) dt sup E ǫ sup n∈N,ǫ>0 θ∈Θ n 0 k=1 Proof. Since |g(x)| . (1 + |x|)C , we have that Z 1 n 1X g(Xt0 , θ) dt gk−1 (θ)1{|∆nk X|≤δn,ǫ } − n θ∈Θ 0 k=1 Z n n 1 1X 1X 0 g(Xt , θ) dt + gk−1 (θ) − (1 + |Xtnk−1 |)C 1{|∆nk X|>δn,ǫ } . sup n θ∈Θ n 0 sup k=1 k=1 (5.7) (5.8) 25 Yasutaka Shimizu = sup θ∈Θ Z 0 n 1 g(Ytn,ǫ ) − g(Xt0 , θ) dt + 1X (1 + |Xtnk−1 |)C 1{|∆nk X|>δn,ǫ } . n k=1 For the first term on the right-hand side of the inequality, it holds that Z 1  sup g(Ytn,ǫ ) − g(Xt0 , θ) dt θ∈Θ 0 ≤ sup . Z θ∈Θ 0 Z 1 0 ∇x g(Xs0 + u(Ysn,ǫ − Xs0 ), θ) · Ysn,ǫ − Xs0 duds 1 + |Xs0 | + |Ysn,ǫ |C 0 . 1Z 1 (5.9)  Ysn,ǫ − Xs0 ds !C 1 + sup |Xt0 | + sup |Xt0 | t∈[0,1] t∈[0,1] P sup Ytn,ǫ − Xt0 −→ 0, (5.10) t∈[0,1] by Lemma 1, (5.1). Hence the proof ends if we show the second term tends to zero in probability. Let 1 ξk,n,ǫ(θ) := (1 + |Xtnk−1 |)C 1{|∆nk X|>δn,ǫ } . n We show that n i h X P (5.11) E ξk,n,ǫ(θ)|Ftnk−1 −→ 0; k=1 n X k=1 i h P E |ξk,n,ǫ(θ)|2 |Ftnk−1 −→ 0. (5.12) P P which implies that nk=1 ξk,n,ǫ(θ) −→ 0 for each θ ∈ Θ from Lemma 9 by Genon-Catalot and Jacod [7]. First, we show that (5.11). Note that n X k=1 h E ξk,n,ǫ(θ)|Ftnk−1 Since it follows that n show that Pn −1 i   1X = (1 + |Xtnk−1 |)C P |∆nk X| > δn,ǫ |Ftnk−1 n n k=1 + |Xtnk−1 |)C = Op (1) by Lemma 3.3 in [20], it suffices to   P |∆nk X| > δn,ǫ |Ftnk−1 = op (1), k=1 (1 for any k = 1, . . . , n. Note that it holds that sup n t∈(tn k−1 ,tk ] |Xt − Xtnk−1 | . ∆n (1 + kXk∗ ) + ǫ sup n t∈(tn k−1 ,tk ] |Qǫt |. Hence it follows from Q1[γ] and the assumption on δn,ǫ that, for n large enough, !   δn,ǫ n sup |Qt − Qtnk−1 | > P |∆k X| > δn,ǫ |Ftnk−1 ≤ P Ftnk−1 n] 2ǫ ,t t∈(tn k−1 k 26 Threshold estimation for small noise model  δn,ǫ Ftn + P (1 + kXk∗ ) > 2∆n k−1 ≤P sup n t∈(tn k−1 ,tk ]  |Qt − Qtnk−1 | & ∆γn Ftnk−1   + P (1 + kXk∗ ) & ∆−1 n δn,ǫ Ftn k−1 ! = op (1), (5.13) since kXk∗ is bounded in probability. This is the proof of (5.11). The proof of (5.12) is similar to above, which ends the proof of (5.7). The proof of (5.8) is easy from the estimates (5.10) and Corollary 2 since we are assuming that nǫ → ∞, so we omit the details. Then the proof is completed. The next lemma is a version of the Toeplitz lemma; see also, e.g., Shimizu [28]. We need this result in the proof of the next Lemma 5. P Lemma 4. Let {ank }nk=1 be a positive bounded sequence, and put bn := nk=1 ank . Suppose that a sequence {xnk }nk=1 satisfies the following conditions: sup |xnk | < ∞ for each fixed k; (5.14) |xnk − x| = 0 (5.15) n∈N lim sup m→∞ k,n: m≤k≤n P Then, for any sequence An with An ∼ b−1 n , An for some x ∈ R; ani xni → x as n → ∞. Lemma 5. Let g ∈ C↑1,1 (Rd × Θ; Rd ). Under A1, it holds that n X k=1 P gk−1 (θ)[∆nk Qǫ ] −→ Z 1 0 g(Xt0 , θ) [dQt ]. Proof. Since we are assuming the uniform convergence (1.2), we have that n X k=1 gk−1 (θ)[∆nk Qǫ ] − n X = k=1 n X ≤ k=1 + =: Z Z 1 0 g(Xt0 , θ) [dQt ] gk−1 (θ)[∆nk Qǫ − ∆nk Q] + gk−1 (θ)[∆nk Qǫ − ∆nk Q] + 1 Z 0 Z 1 1 0 g(Ytn,ǫ , θ) − g(Xt0 , θ) [|dAt |] g(Ytn,ǫ , θ) − g(Xt0 , θ) [dMt ] 0 (1) (2) In,ǫ + In,ǫ (3) + In,ǫ . g(Ytn,ǫ , θ) − g(Xt0 , θ) [dQt ] 27 Yasutaka Shimizu (1) As for In,ǫ , we suppose d = 1 for simplicity of notation. Putting ank := gk (θ) − gk−1 (θ) and xnk := Qǫtk − Qtk (since ǫ depends on n), we have that (1) In,ǫ = n n o X gk (θ)[Qǫtk − Qtk ] − gk−1 (θ)[Qǫtk−1 − Qtk−1 ] k=1 n X − = k=1 {gk (θ) − gk−1 (θ)} [Qǫtk − Qtk ] g(X1ǫ )[Qǫ1 − Q1 ] − n X k=1 ank · xnk . Now, that g(X1ǫ )[Qǫ1 − Q1 ] → 0 a.s. by the assumption (1.2). Moreover, the sum Pn itnis clear n k=1 ak · xk also converges to zero with probability one by using Lemma 4. Indeed, the convergence (5.14) is clear from (1.2), and that lim sup k→∞ j,n: k≤j≤n |xnj | . lim kQǫ − Qk∗ = 0 ǫ→0 a.s. Moreover, as ǫ → 0, bn = n X k=1 ank = n X k=1 [gk (θ) − gk−1 (θ)] → g(X10 , θ) − g(X00 , θ) < ∞ a.s. P Hence we see by the above Toeplitz lemma that nk=1 ank · xnk → 0 with probability one. (1) Therefore we have that In,ǫ → 0 with probability one. (2) As for In,ǫ , it follows from Lemma 1, (5.1) that P (2) In,ǫ . (1 + sup |Xt0 | + sup |Xt |)C sup Ytn,ǫ − Xt0 −→ 0. t∈[0,1] t∈[0,1] t∈[0,1] (3) As for In,ǫ , using Markov’s, and the Burkholder-Davis-Gundy inequalities, we have for any η > 0 that Z 1   n,ǫ (3) n,ǫ 0 n,ǫ P(|In,ǫ | > η) ≤ P(τm < 1) + P g(Yt , θ) − g(Xt , θ) 1{t≤τm } [dMt ] > η/2 0 Z 1  n,ǫ −1 n,ǫ [dMt ] ≤ P(τm < 1) + 2η E g(Ytn,ǫ , θ) − g(Xt0 , θ) 1{t≤τm } n,ǫ . P(τm < 1) + η −1 E Z 0 1 0 2 n,ǫ d[M, M ]t g(Ytn,ǫ , θ) − g(Xt0 , θ) 1{t≤τm } 1/2 . n,ǫ From the definition of τm , the integrand in the last term is bounded in n and ǫ. Hence, taking the limit n → ∞ and ǫ → 0, we see from the dominated convergence theorem that (3) P(|In,ǫ | > η) → 0, which completes the proof. 28 Threshold estimation for small noise model Lemma 6. Let g ∈ C↑1,1 (Rd × Θ; Rd ). Assume A1, A2, Q1[γ], and that δn,ǫ ∆−1 n → ∞, −1 ǫ ∆γn δn,ǫ = O(1), nǫ → ∞. Then we have n X k=1 P gk−1 (θ)[χk (θ0 )]1{|∆nk X|≤δn,ǫ } −→ 0, uniformly in θ ∈ Θ. In addition, assume Q2[q] for any q > p = dim(Θ). Then " !q # n X E ǫ−1 sup gk−1 (θ)[χk (θ0 )]1{|∆nk X|≤δn,ǫ } < ∞. (5.16) (5.17) θ∈Θ k=1 Proof. The proof of (5.16) is similar to the one of Lemma 3.5 by Long et al. [20] with a slight extension to semimartingale version; see also Remark 4.3 in [20]. It is clear from their proof that the indicator 1{|∆nk X|≤δn,ǫ } is not essential to the proof. So it is omitted. As for (5.17), we note that ǫ −1 sup n X θ∈Θ k=1 =ǫ −1 ≤ ǫ−1 sup n Z X θ∈Θ k=1 Z 1 1 0 g(Ysn,ǫ , θ) [b(Xs , θ0 ) − b(Ysn,ǫ , θ0 ) + ǫ · dQǫt ] ds · 1{|∆nk X|≤δn,ǫ } sup |g(Ysn,ǫ , θ) [b(Xs , θ0 ) − b(Ysn,ǫ , θ0 )]| ds 0 θ∈Θ Z 1 + sup =: gk−1 (θ)[χk (θ0 )]1{|∆nk X|≤δn,ǫ } g(Ysn,ǫ , θ)[dQǫt θ∈Θ 0 (1) (2) In,ǫ + In,ǫ − dQt ] + sup θ∈Θ (3) + In,ǫ . Z 1 0 g(Ysn,ǫ , θ)[dQt ] By the assumption A1 and the condition for g, we have Z 1 (1) −1 In,ǫ . ǫ (1 + |Ysn,ǫ |)λ |Xs − Ysn,ǫ | ds 0    . 1 + kY n,ǫ − X 0 kλ∗ + kX 0 kλ∗ ǫ−1 kX − X 0 k + ǫ−1 kX 0 − Y n,ǫ k Hence, under the assumption that nǫ → ∞, Corollary 2 yields that (1) q E|In,ǫ | < ∞. (2) P We have already shown that In,ǫ −→ 0 in the proof of Lemma 5. Hence the proof ends (3) P if we show that In,ǫ −→ 0. Noticing that a bounded convex set Θ admits the following Sobolev inequality; sup |u(θ)| . ku(θ)kLq (Θ) + k∇θ u(θ)kLq (Θ) , θ∈Θ 29 Yasutaka Shimizu for q > p = dim(Θ), we see for any q > p that Z 1 Z 1 (3) (1 + |Ysn,ǫ , θ|)λ · |dAs | + sup g(Ysn,ǫ , θ)[dM ] In,ǫ ≤ θ∈Θ 0 0 Z   n,ǫ 0 λ 0 λ . 1 + kY − X k∗ + kX k∗ T V (A) + Θ Z 0 1 q g(Ysn,ǫ , θ)[dM ǫ ] dθ Then, by using the Burkholder-Davis-Gundy inequality, we have Z 1  i Z h q (3) q E g(Ysn,ǫ , θ)[dM ] T V (A) + E|In,ǫ | . E 1 + kY n,ǫ − X 0 kλq ∗ 0 q Θ i h n,ǫ 0 λ 0 λ . 1 + E 1 + kY − X k∗ + kX k∗ |[M, M ]1 |q/2 < ∞, 1/q . q dθ under Q2[q] for any q > p. This completes the proof of (5.17). Lemma 7. Let g ∈ C↑1,1 (Rd × Θ; Rd ). Assume A1, A2, Q1[γ], and that δn,ǫ ∆−1 n → ∞, −1 ǫ ∆γn δn,ǫ = O(1), nǫ → ∞. Then we have n X gk−1 (θ)[χk (θ0 )]1{|∆nk X|>δn,ǫ } = op (ǫ), k=1 for each θ ∈ Θ. Proof. Using ∆nk X = ǫ−1 n X R tnk tn k−1 b(Xt , θ0 ) dt + ǫ∆nk Qǫ , we have that gk−1 (θ)[χk (θ0 )]1{|∆nk X|>δn,ǫ } k=1 = n X k=1 n X + =: ǫ −1 Z tn k tn k−1 gk−1 (θ)[b(Xt , θ0 ) − bk−1 (θ0 )] dt · 1{|∆nk X|>δn,ǫ } gk−1 (θ)[∆nk Qǫ ] · 1{|∆nk X|>δn,ǫ } k=1 (1) Hn,ǫ (θ) (2) + Hn,ǫ (θ). (1) As for Hn,ǫ , we easily find it converges to zero in probability as nǫ → ∞ by the same (1) argument as for Hn,ǫ in Lemma 3.6 by Long et al. [20]. (2) As for Hn,ǫ , it follows from Lemma 3 and 5 that (2) Hn,ǫ (θ) = n X k=1 gk−1 (θ)[∆nk Qǫ ] − n X k=1 P gk−1 (θ)[∆nk Qǫ ]1{|∆nk X|≤δn,ǫ } −→ 0, for each θ ∈ Θ. Hence the proof is completed. 30 Threshold estimation for small noise model 5.2 Proof of Theorem 1 LSE given in (1.4). Let We shall show that θbn,ǫ is asymptotically equivalent to θbn,ǫ e n,ǫ(θ) := ǫ2 (Ψn,ǫ(θ) − Ψn,ǫ (θ0 )) , Ψ e n,ǫ (θ) := ǫ2 (Φn,ǫ (θ) − Φn,ǫ(θ0 )) . Φ LSE and θ bn,ǫ are respectively where Ψn,ǫ and Φn,ǫ are given in (1.5) and (1.7). Then θbn,ǫ minimum contrast estimators for contrast functions Ψn,ǫ and Φn,ǫ . By the same argument as in the proof of Theorem 2.1 with Remark 4.3 by Long et al. [20], all we need to show is P e n,ǫ (θ) − F (θ0 )| −→ 0, sup |Φ θ∈Θ where F (θ) := R1 0 P e n,ǫ (θ)−F (θ0 )| −→ 0, Therefore, |b(Xt0 , θ)−b(Xt0 , θ0 )|2 dt. Since supθ∈Θ |Ψ e n,ǫ(θ) − F (θ0 ) ≤ sup Φ e n,ǫ (θ) − Ψ e n,ǫ (θ) + sup Ψ e n,ǫ (θ) − F (θ0 ) sup Φ θ∈Θ θ∈Θ θ∈Θ = sup n θ∈Θ k=1 n X |χk (θ)|2 1{|∆nk X|>δn,ǫ } + op (1) (bk−1 (θ) − bk−1 (θ0 ))[χk (θ0 )]1{|∆nk X|>δn,ǫ } θ∈Θ k=1 n 1X |bk−1 (θ) − bk−1 (θ0 )|2 1{|∆nk X|>δn,ǫ } + op (1) sup θ∈Θ n k=1 . sup + n X The last first and second terms converges to zero in probability by Lemmas 3 and 6. This completes the proof. 5.3 Proof of Theorem 2 We use the following notation: • Gn,ǫ (θ) = 2−1 ∇θ Φn,ǫ(θ) ∈ Rp ;  • Kn,ǫ (θ) = ∇θ Gn,ǫ (θ) = ∇2θ Φn,ǫ (θ) ∈ Rp ⊗ Rp ; • K(θ) = R1 0 ∇2θ b(Xt0 , θ)[b(Xt0 , θ0 ) − b(Xt0 , θ)] dt − I(θ0 ) ∈ Rp ⊗ Rp . Then it follows by Taylor’s formula that, for some ρ ∈ (0, 1), Z 0 1     Kn,ǫ θ0 + u(θbn,ǫ − θ0 ) du · ǫ−1 θbn,ǫ − θ0 = ǫ−1 Gn,ǫ (θbn,ǫ ) − ǫ−1 Gn,ǫ (θ0 ) . 31 Yasutaka Shimizu Let us show that P ǫ−1 Gn,ǫ (θ0 ) −→ Z 1 0 ∇θ b(Xt0 , θ0 ) [dQt ]; (5.18) P sup |Kn,ǫ (θ) − K(θ)| −→ 0. (5.19) θ∈Θ Then the result follows by the same argument as in the proof of Theorem 2.2 by Long et al. [20]; see also Uchida [35]. As for (5.18): it follows that ǫ−1 Gn,ǫ (θ0 ) = ǫ−1 n X k=1 = ǫ−1 n X k=1 =ǫ −1 −ǫ n X ∇θ bk−1 (θ0 )[χk (θ0 )]1{|∆nk X|≤δn,ǫ } ∇θ bk−1 (θ0 )[χk (θ0 )] − ǫ−1 ∇θ bk−1 (θ0 ) k=1 n X −1 k=1 "Z tn k tn k−1 n X k=1 ∇θ bk−1 (θ0 )[χk (θ0 )]1{|∆nk X|>δn,ǫ } # {b(Xt , θ0 ) − bk−1 (θ0 )} dt + n X k=1 ∇θ bk−1 (θ0 )[∆nk Q] ∇θ bk−1 (θ0 )[χk (θ0 )]1{|∆nk X|>δn,ǫ } Then we can show that the last first term converges to zero in probability by the same (1) evaluation as for Hn,ǫ (θ0 ) in the proof of Lemma 3.6 in [20], the second term converges to R1 0 0 ∇θ b(Xt , θ0 )[dQt ] in probability by Lemma 5, and that the third term goes to zero in probability by Lemma 7. Similarly, as for (5.19), it follows that Kn,ǫ (θ) = = n X k=1 n X k=1 + n ∇2θ bk−1 (θ)[χk (θ)]1{|∆nk X|≤δn,ǫ } − 1X ∇θ bk−1 (θ)⊤ ∇θ bk−1 (θ)1{|∆nk X|≤δn,ǫ } n k=1 ∇2θ bk−1 (θ)[χk (θ0 )]1{|∆nk X|≤δn,ǫ } n 1X 2 ∇θ bk−1 (θ)[bk−1 (θ0 ) − bk−1 (θ)]1{|∆nk X|≤δn,ǫ } n k=1 n 1X ∇θ bk−1 (θ)⊤ ∇θ bk−1 (θ)1{|∆nk X|≤δn,ǫ } , − n k=1 ij cf. the expression of Kn,ǫ (θ) in the proof of Lemma 3.7 by Long et al. [20]. Hence Lemmas 3 and 6 yield (5.19). Using the facts (5.18) and (5.19), and the consistency result: Theorem 1, we can show that   ǫ−1 θbn,ǫ − θ0 ∼p −K −1 (θ0 ) · ǫ−1 Gn,ǫ (θ0 ), n → ∞, ǫ → 0, by completely the same argument as in the proof of Theorem 2.2 by Long et al. [20]. Therefore, the proof is completed. 32 5.4 Threshold estimation for small noise model Proof of Theorem 3 P Denote by u b := ǫ−1 (θbn,ǫ − θ0 ). Since u b −→ ζ from Theorem 2, the proof ends if we show that u b is Lp -bounded: supn,ǫ E|b u|p < ∞ for any p > 0. For this proof, let Un,ǫ (θ0 ) = p {u ∈ R : θ0 + ǫu ∈ Θ0 }, and define random fields Zn,ǫ : Un,ǫ (θ0 ) → R+ by Zn,ǫ(u) = exp {−Φn,ǫ(θ0 + ǫu) + Φn,ǫ (θ0 )} , u ∈ Un,ǫ (θ0 ). Then, since θ0 ∈ Θ0 , we see that Zn,ǫ (b u) ≥ sup u∈Un,ǫ (θ0 ) Zn,ǫ (u) ≥ Zn,ǫ (0) = 1. (5.20) Setting Vn,ǫ (r) := Un,ǫ (θ0 ) ∩ {u ∈ Rp : |u| ≥ r}, we consider the following condition for the random fields Zn,ǫ : for every L > 0 and r > 0, ! P sup u∈Vn,ǫ (r) . r −L , Zn,ǫ (u) ≥ e−r (5.21) which is called the polynomial type large deviation inequality (PLDI), and is investigated by Yoshida [39] in details. If this PLDI holds true then, for any L > p, Z ∞ p r p−1 P (|b u| ≥ r) dr sup E|b u| = sup p n∈N,ǫ>0 n∈N,ǫ>0 ≤ . sup p 0 Z n∈N,ǫ>0 0 Z ∞ p−1 r 0 ∞ r p−1 ( 1∧P sup u∈Vn,ǫ (r) !) Zn,ǫ (u) ≥ 1 dr (1 ∧ r −L ) dr < ∞, here we used (5.20) in the first inequality. Therefore the proof ends if we show (5.21), some sufficient conditions for which are found in the paper by Yoshida [39]. Here we shall verify the conditions [A1′′ ], [A4′ ], [A6], [B1] and [B2] given in Theorem 3, (c) in [39]. See also Ogihara and Yoshida [21] or Masuda [19] for simplified descriptions for those conditions. Applying Taylor’s formula with the notation Gn,ǫ (θ), Kn,ǫ (θ) and K(θ) given in the proof of Theorem 2, we have log Zn,ǫ (u) = −Φn,ǫ (θ0 + ǫu) + Φn,ǫ(θ0 ) = −ǫGn,ǫ (θ0 )[u] − ǫ2 {−K(θ0 )} [u⊗2 ] + Rn,ǫ (u), 2 where Z 1  (s − 1) K(θ0 )[u⊗2 ] − Kn,ǫ (θ0 + s · ǫu)[u⊗2 ] ds 0 Z 1 Z 1 ǫ2 ⊗2 3 {Kn,ǫ (θ0 ) − K(θ0 )} [u ] − ǫ ∇θ Kn,ǫ (θ0 + ts · ǫu)[u⊗3 ] dtds. (s − 1) = 2 0 0 Rn,ǫ (u) = ǫ 2 33 Yasutaka Shimizu This means that Zn,ǫ could be Partially Locally Asymptotically Quadratic (PLAQ), which is a starting point of [39]. According to Theorem 3, (c) in [39], if we take some “tuning parameters” given in [A4′ ] in [39] such as β1 ≈ 1/2, ρ1 , ρ2 , β, β2 ≈ 0, then the PLDI (5.21) holds true if the following [A1′′ ], [A6], [B1] and [B2] are satisfied; we use the same conditioning numbers as in [39] to make those correspondences clear. [A1′′ ] For every q > 0, sup E n∈N,ǫ>0  2 ǫ sup θ∈Θ ∇3θ Φn,ǫ (θ) q  < ∞. Moreover, for given L > 0 and any δ > 0 small enough, h L−δ i sup E ǫ−1 |Kn,ǫ (θ0 ) − K(θ0 )| < ∞. (5.22) (5.23) n∈N,ǫ>0 [A6] For any δ > 0 small enough, i h sup E |ǫGn,ǫ (θ0 )|L+δ < ∞; (5.24) n∈N,ǫ>0  L+δ   −1 e Φn,ǫ (θ) − F (θ) sup E sup ǫ < ∞, n∈N,ǫ>0 e n,ǫ and F (θ) = where Φ 1. R1 0 (5.25) θ∈Θ |b(Xt0 , θ)−b(Xt0 , θ0 )|2 dt are given in the proof of Theorem [B1] The matrix −K(θ0 ) (= I(θ0 )) is deterministic and positive definite. [B2] There exists a deterministic positive number χ such that − {F (θ) − F (θ0 )} ≤ −χ|θ − θ0 |2 . (Note that the notational correspondence between [39] and ours is: aT = ǫ; bT = ǫ−2 ; HT = −Φn,ǫ ; Y = −F and Γ = −K). Now we can easily check that the conditions (5.22) and (5.24) are true by Lemma 6, (5.17), and that (5.23) and (5.25) are also true by Lemma 3, (5.8). Moreover the conditions [B1] and [B2] are clear from the assumptions A1 and A4, respectively, the proof ends if we show (5.22)–(5.25). Hence the proof is completed. 5.5 Proof of Theorem 4 First, we shall show the consistency: P θen,ǫ,δ −→ θ0 . 34 Threshold estimation for small noise model Since we suppose that the jumps are specified, the following “negligibility” is obtained: ) ( P (k∆Qǫ k∗k > δ) = 1 − P |∆Qt | ≤ δ/ǫ sup n t∈(tn k−1 ,tk ] = 1 − e−λ(δ/ǫ)∆n → 0 (5.26) since λ(δ/ǫ)∆n → 0. Then we have the following lemma, which is the same type of results as Lemmas 3 and 6. Lemma 8. Let g ∈ C↑1,1 (Rd × Θ; R). Suppose A1, A2, and that δ/ǫ → 0. Then, we have n 1X P gk−1 (θ)1{k∆Qǫ k∗ ≤δ} −→ k n k=1 n X k=1 Z 1 0 g(Xt0 , θ) dt, P gk−1 (θ)[χk (θ0 )]1{k∆Qǫ k∗ ≤δ} −→ 0, k uniformly in θ ∈ Θ. The proof of this lemma is an obvious modification of the proofs of Lemmas 3 and 6 using the negligibility condition (5.26). Then by the same argument as in the proof of Theorem 1, the consistency follows. Next, note that, as in the proof of Theorem 2, Z 1     Kn,ǫ,δ θ0 + u(θen,ǫ,δ − θ0 ) du · θen,ǫ,δ − θ0 = Gn,ǫ,δ (θbn,ǫ ) − Gn,ǫ,δ (θ0 ) . 0 where e n,ǫ,δ (θ); Kn,ǫ,δ (θ) = ∇θ Gn,ǫ,δ (θ); Gn,ǫ,δ (θ) = 2−1 ∇θ Φ Z 1 ∇2θ b(Xt0 , θ)[b(Xt0 , θ0 ) − b(Xt0 , θ)] dt − I(θ0 ). K(θ) = 0 If we show that ǫ −1 P Gn,ǫ,δ (θ0 ) −→ Z 0 1 ∇θ b(Xt0 , θ0 ) [dWt ] , then we obtain the consequence because the convergence P sup |Kn,ǫ,δ (θ) − K(θ)| −→ 0 θ∈Θ (5.27) 35 Yasutaka Shimizu holds true due to Lemma 8 and the same argument as in the proof of Lemma 3.7 in [20]. Note that # "Z n n tk X {b(Xs , θ0 ) − bk−1 (θ0 )} dt 1{k∆Qǫ k∗ ≤δ} ∇θ bk−1 (θ0 ) ǫ−1 Gn,ǫ,δ (θ0 ) = ǫ−1 k=1 n X + k=1 n X + =: k=1 (1) In,ǫ,δ  ∇θ bk−1 (θ0 )  k tn k−1   Nt n k X i=Ntn k−1 +1  Yi 1{|Yi |≤δ}  ∇θ bk−1 (θ0 ) [∆nk W ] 1{k∆Qǫ k∗ ≤δ} k (3) (2) + In,ǫ,δ + In,ǫ,δ . (1) (1) Note that In,ǫ,δ → 0 by the same argument as in the proof of Lemma 3.6, Hn,ǫ (θ0 ) in [20] by the assumption (4.5). Moreover, it is easy to see that E (2) In,ǫ,δ n λδ X = E|∇θ bk−1 (θ0 )| → 0. nǫ k=1 Furthermore, note that (3) In,ǫ,δ = n X k=1 ∇θ bk−1 (θ0 ) [∆nk W ] − n X k=1 ∇θ bk−1 (θ0 ) [∆nk W ] 1{k∆Qǫ k∗ >δ} k Now, observe a measurability that    {ω ∈ Ω : k∆Qk∗k ≤ δ} ∈ σ N (tnk−1 , s], [−δ, δ] : s ∈ (tnk−1 , tnk ] , which is independent of ∆nk W and Xtnk−1 . Therefore, E ≤ ≤ n X ∇θ bk−1 (θ0 ) [∆nk W ] 1{k∆Qǫ k∗ >δ} k=1 n X k=1 n X k=1 k E |∇θ bk−1 (θ0 ) [∆nk W ]| P (k∆Qǫ k∗k > δ) E Z tn k tn k−1  trace ∇θ b⊗2 (θ ) dt 0 k−1 !1/2   1 − e−λ(δ/ǫ)∆n → 0 from (5.26). As a result, Lemma (5) yields that Z 1 P (3) ∇θ b(Xt0 , θ0 ) [dWt ] . In,ǫ,δ −→ 0 This completes the proof of (5.27). 36 5.6 Threshold estimation for small noise model Proof of Theorem 5 Note that, under the asymptotic conditions, it follows that P (k∆Qǫ k∗k ≤ δ) = e−λ(δ/ǫ)∆n → 0; P (k∆Qǫ k∗k > δ) → 1, (5.28) which is a different situation in the previous theorem. Under this setting, we can show the following lemma. Lemma 9. Let g ∈ C↑1,1 (Rd × Θ; R). Suppose A1, A2, Q1[γ], and that λ(δ/ǫ) → c ∈ (0, 1), n log n nǫ∆γn → 0. Then it follows that, for ηn := e−λ(δ/ǫ)∆n , Z 1 n 1 X P g(Xt0 , θ) dt, gk−1 (θ)1{k∆Qǫ k∗ ≤δ} −→ k nηn 0 (5.29) k=1 n 1 X P gk−1 (θ)[χk (θ0 )]1{k∆Qǫ k∗ ≤δ} −→ 0, k ηn (5.30) k=1 uniformly in θ ∈ Θ. Proof of Lemma 9. As for (5.29): note that Z 1 n 1 X P sup g(Xt0 , θ) dt gk−1 (θ)1{k∆Qǫ k∗ ≤δ} −→ k θ∈Θ nηn 0 k=1 n n 1X 1 X gk−1 (θ)1{k∆Qǫ k∗ ≤δ} − gk−1 (θ) k n θ∈Θ nηn k=1 k=1 Z 1 n X 1 + sup g(Xt0 , θ) dt . gk−1 (θ) − θ∈Θ n 0 ≤ sup k=1 and the second term on the right-hand side of the inequality converges to zero P in probability from Lemma 3.3 by Long et al. [20]. The last first term is rewritten as nk=1 ξkn (θ) with   1 1 n −1 . 1 ξk (θ) = gk−1 (θ) ǫ ∗ n ηn {k∆Q kk ≤δ} Then we immediately see that, since Ftnk−1 and k∆Qǫ kk are independent each other, n X k=1 E[ξkn (θ)|Ftnk−1 ] n   1X = gk−1 (θ) ηn−1 P (k∆Qǫ k∗k ≤ δ) − 1 = 0. n k=1 37 Yasutaka Shimizu Moreover n X k=1 E[|ξkn (θ)|2 |Ftnk−1 ] n 2 1 X 2 1 1{k∆Qǫ k∗ ≤δ} − 1 = 2 gk−1 (θ)E k n ηn k=1     1 1 P = Op −→ 0, = Op nηn e(1−c2 ) log n P P by the assumption. Hence we have that nk=1 ξkn (θ) −→ 0 for every θ ∈ Θ from Lemma 9 by Genon-Catalot and Jacod [7]. PTo prove the uniformity of convergence, we have to show the tightness of the sequence { nk=1 ξkn (·)}n . We shall use Theorem 20 in Appendix 1 by Ibragimov and Has’minskii [9], that is, we shall show that, for some H > 0 and any N ∈ N, E n X 2N ξkn (θ) < H; (5.31) ≤ H|θ1 − θ2 |2N (5.32) k=1 E n X [ξkn (θ1 ) k=1 − 2N ξkn (θ2 )] As for (5.31): using the independent property of Xtnk−1 and k∆Qǫ kk , we have that E n X 2N ξkn (θ) k=1 n X " " 2N 1 |Ftnk−1 1{k∆Qǫ k∗ ≤δ} − 1 = E |gk−1 (θ)| E k ηn k=1 # "  n  1 X 1 2N +1 .E sup |g(Xt )| n2N ηn2N −1 θ∈Θ,t∈[0,1] k=1     1 −(1−c) =O → 0. = O n (nηn )2N −1 2N ## Therefore it is bounded. Inequality (5.32) is similarly proved since g ∈ C↑1,1 (Rd × Θ; R). Hence (5.29) is proved. Finally we shall show (5.30). Note that n 1 X gk−1 (θ)[χk (θ0 )]1{k∆Qǫ k∗ ≤δ} k θ∈Θ ηn k=1 n Z n 1 X tk sup |gk−1 (θ) [b(Xs , θ0 ) − bk−1 (θ0 )]| ds · 1{k∆Qǫ k∗ ≤δ} ≤ k ηn θ∈Θ tn k−1 sup + =: k=1 n X ǫ ηn sup |gk−1 (θ) [∆nk Q]| 1{k∆Qǫ k∗ ≤δ} k=1 θ∈Θ Jn(1) + Jn(2) . k 38 Threshold estimation for small noise model (1) As for Jn : it follows from the assumption A1 that, for Y n,ǫ given in Lemma 1, n Z n 1 X tk sup |g(Ysn,ǫ ) [b(Xs , θ0 ) − b(Ysn,ǫ , θ0 )]| ds · 1{k∆Qǫ k∗ ≤δ} k n ηn k=1 tk−1 θ∈Θ !C n 1 X sup |Xt − Ytn,ǫ |1{k∆Qǫ k∗ ≤δ} . 1 + sup |Xt | · k n n nη n t∈[0,1] k=1 t∈(tk−1 ,tk ] !C n  1 X · kX − X 0 k∗ + kX 0 − Y n,ǫ k∗ · . 1 + sup |Xt | 1{k∆Qǫ k∗ ≤δ} k nηn |Jn(1) | = t∈[0,1] k=1 Since E n 1 X 1{k∆Qǫ k∗ ≤δ} = 1 k nηn k=1 ⇒ n 1 X 1{k∆Qǫ k∗ ≤δ} = Op (1), k nηn and Lemma 1 we have that (5.33) k=1 P |Jn(1) | −→ 0. (2) As for Jn : it follows for some C > 0 that |Jn(2) | . sup (1 + |Xt |)C · θ∈Θ,t∈[0,1] ≤ Op ! n nǫ X 1 · sup |Qs − Qtnk−1 |1{k∆Qǫ k∗ ≤δ} k ηn n s∈(tnk−1 ,tnk ] k=1 nǫ sup |Qs | , s∈(0,∆n ] since sups∈(tn ,tn ] |Qs − Qtnk−1 | ∼d sups∈(0,∆n ] |Qs | and (5.33). Moreover, noticing under k−1 k Q1[γ] that sup |Qs | = op (∆γn ), s∈(0,∆n ] we obtain that Jn(2) = Op (nǫ∆γn ) → 0. This completes the proof of (5.30).  Now, putting Ψn,ǫ (θ) := ǫ2 ηn−1   e n,ǫ,δ (θ) − Ψ e n,ǫ,δ (θ0 ) ; Ψ F (θ) := Z 1 0 and using Lemma 9, we can easily show that P sup Ψn,ǫ (θ) − F (θ) −→ 0. θ∈Θ |b(Xt0 , θ) − b(Xt0 , θ0 )|2 dt, 39 Yasutaka Shimizu P This and the identifiability condition A3 yield the consistency: θen,ǫ,δ −→ θ0 . Suppose that the Lévy process Q is of the form Z tZ Z tZ e z N (dt, dz), z N (dt, dz) + Qt = at + cWt + 0 0 |z|≤1 |z|>1 where a ∈ Rd , c ≥ 0, W is a d-dimensional Wiener process, N is a Poisson random measure e (dt, dz) = N (dt, dz) − ν(dz)dt, and note that, for any associated with jumps of Q, and N δ > 0, Z Z Z Z t Qt = αδ/ǫ t + Wt + 0 R where aδ/ǫ = a − δ/ǫ<|z|≤1 z ν(dz). Hereafter, we put |z|≤δ/ǫ e (dt, dz) + zN t z N (dt, dz), 0 |z|>δ/ǫ ζ := δ/ǫ. Using the same notation as in the previous theorem, the proof ends if we show that Z 1 D ∇θ b(Xt0 , θ0 ) [dBt ] . (5.34) (σ(ζ)ǫ)−1 Gn,ǫ,δ (θ0 ) −→ 0 Note that (σ(ζ)ǫ)−1 Gn,ǫ,δ (θ0 ) = (σ(ζ)ǫ) n X −1 + σ −1 (ζ) +σ =: −1 (1) In,ǫ,δ (ζ) k=1 n X ∇θ bk−1 (θ0 ) "Z tn k tn k−1 # {b(Xs , θ0 ) − bk−1 (θ0 )} dt 1{k∆Qǫ k∗ ≤δ} k   ∇θ bk−1 (θ0 ) aδ ∆n + ∆nk W 1{k∆Qǫ k∗ ≤δ} k=1 n X k=1 (2) + In,ǫ,δ k ∇θ bk−1 (θ0 ) "Z tn k tn k−1 Z |z|≤ζ (3) + In,ǫ,δ . # e (dt, dz) zN (2) As for In,ǫ,δ : Since 1{k∆Qǫ k∗ ≤δ} is independent of ∆nk W and Xtnk−1 , we have that k n (2) E In,ǫ,δ ≤ σ −1 (ζ) 1X E |∇θ bk−1 (θ0 )aδ | P (k∆Qk∗k ≤ ζ) n + σ −1 (ζ) k=1 n X k=1 ≤σ −1  (ζ) =O σ n X k=1 −1   E ∇θ bk−1 (θ0 ) ∆nk W P (k∆Qk∗k ≤ δ) E Z tn k tn k−1 trace  (ζ)e−λ(ζ)∆n .  ∇θ b⊗2 k−1 (θ0 ) dt !1/2 P (k∆Qk∗k ≤ ζ) 40 Threshold estimation for small noise model The last equality is due to (5.28). Therefore we have  !−1  ∞ k X (∆n λ(ζ)) (2) . E In,ǫ,δ = O  σ(ζ) k! (5.35) k=0 For an integer M such that 1/M ≤ ρ, we see that,  M σ(ζ)(∆n λ(ζ))M = σ 1/M (ζ)∆n λ(ζ) ≥ (σ ρ (ζ)∆n λ(ζ))M → ∞ (5.36) due to the the condition (4.4). Hence we have (2) E In,ǫ,δ → 0. (1) (1) As for In,ǫ,δ : By the same argument as in the proof of Lemma 3.6, Hn,ǫ (θ0 ) in [20], we can obtain the following inequality: (1) |In,ǫ,δ | . n 1 1X |∇θ bk−1 (θ0 )| · |bk−1 (θ0 )| nǫσ(ζ) n + i=1 n X 1 nσ(ζ) i=1 |∇θ bk−1 (θ0 )| sup n s∈(tn k−1 ,tk ] |Qt − Qtnk−1 |1{k∆Qǫ k∗ ≤δ} k (2) Using the same estimates for Jn in the proof of Lemma 9, we have that     1 (1) + op σ −1 (ζ)e−λ(ζ)∆n , |In,ǫ,δ | = Op nǫσ(ζ) (1) P Then, by the same estimates as for (5.35) and (5.36) above, we see that |In,ǫ,δ | −→ 0. (3) As for In,ǫ,δ : Let Lδt := σ −1 (ζ) Z tZ 0 |z|≤δ e (dt, dz). zN Thanks to Theorem 2 by Asmussen and Rosinski [1], it follows under the assumption (4.6) that there exists a Wiener process B, independent of W , such that D Lζ −→ B in D[0, 1], as δ → 0. Moreover, since kY n,ǫ − X 0 k∗ a.s. by Lemma (1), we have a joint convergence   D Lζ , Y n,ǫ −→ (B, X 0 ) in D[0, 1]. as ǫ, δ → 0 and n → ∞. Hence it follows from Theorem 5.16 by Jacod and Shiryaev [10] that n i Z 1 h X (3) n ζ ∇θ b (Ytn,ǫ , θ0 ) dLζt ∇θ bk−1 (θ0 ) ∆k L = In,ǫ,δ = k=1 0 41 Yasutaka Shimizu D −→ Z 1 0 ∇θ b(Xt0 , θ0 ) dBt This completes the proof of (5.34), and the statement is proved. Acknowledgement The author would like to thank the anonymous referees for their valuable suggestions and proposals that significantly improve this manuscript. This research has been partially supported by JSPS KAKENHI Grant-in-Aid for Scientific Research (C), Grant Number JP15K05009. References [1] Asmussen, S. and Rosinski, J. (2001). Approximations of small jumps of Lévy processes with a view towards simulation, J. Appl. Prob., 38, 482–493. [2] Bichteler, K. and Jacod, J. (1986) Calcul de Malliavin pour les diffusions avec sauts: existence d’une densite dans le cas unidimensionnel. Lecture Notes in Math, 132–157. Springer-Verlag, Berlin. [3] Boukai, B. (1990). An explicit expression for the distribution of the supremum of Brownian motion with a change point. Comm. Statist. Theory Methods, 19, (1), 31– 40. [4] Cont, R. and Tankov, P. (2004). Financial modelling with jump processes. Chapman & Hall/CRC, Boca Raton, FL. [5] Doob, J. L. (1949). Heuristic approach to the Kolmogorov-Sminorv Theorems. Ann. Math. Statistics, 20, 393–403. [6] Genon-Catalot, V. (1990). Maximum contrast estimation for diffusion processes from discrete observations, Statistics, 21. 99–116. [7] Genon-Catalot, V. and Jacod, J. (1993). On the estimation of the diffusion coefficient for multidimensional diffusion process, Ann. Inst. Henri Poincaré Prob. Statist. 29, 119–151. [8] Gloter, A. and Sørensen, M. (2009). Estimation for stochastic differential equations with a small diffusion coefficient, Stochastic Process. Appl., 119, 679–699. [9] Ibragimov, I. A. and Has’minskii, R. Z. (1981) Statistical Estimation, Springer-Verlag, Berlin. 42 Threshold estimation for small noise model [10] Jacod, J. and Shiryaev, A. N. (2003). Limit theorems for stochastic processes. Second edition. Springer-Verlag, Berlin. [11] Joulin, A. (2007). On maximal inequalities for stable stochastic integrals. Potential Anal., 26, (1), 57–78. [12] Kunitomo, N. and Takahashi, A. (2001). The asymptotic expansion approach to the valuation of interest rate contingent claims. Math. Finance, 11, 117–151. [13] Kutoyants, Yu. A. (1984). Parameter estimation for stochastic processes. Heldermann, Berlin. [14] Kutoyants, Yu. A. (1994). Identification of dynamical systems with small noise. Kluwer, Dordrecht. [15] Laredo, C.F. (1990). A sufficient condition for asymptotic sufficiency of incomplete observations of a diffusion process, Ann. Statist., 18, 1158–1171. [16] Long, H. (2009) Least squares estimator for discretely observed Ornstein-Uhlenbeck processes with small Lévy noises, Statist. Prob. Letters, 79, 2076–2085. [17] Long, H. (2010). Parameter estimation for a class of stochastic differential equations driven by small stable noises from discrete observations, Acta Mathematica Scientia, 30B, 645–663. [18] Ma, C. (2010). A note on “Least squares estimator for discretely observed OrnsteinUhlenbeck processes with small Lévy noises”, Statist. Prob. Letters, 80, 1528–1531. [19] Masuda, H. (2013). Convergence of Gaussian quasi-likelihood random fields for ergodic Levy driven SDE observed at high frequency. The Annals of Statistics, 41, 1593–1641. [20] Long, H; Shimizu, Y. and Sun, W. (2013). Least squares estimators for discretely observed stochastic processes driven by small Lévy noises. J. Multivariate Analysis, 116, 422–439. [21] T. Ogihara, N. Yoshida, Quasi-likelihood analysis for the stochastic differential equation with jumps. Stat. Inference Stoch. Process., 14, 189–229. [22] Pavlyukevich, I. (2008). Ruin probabilities of small noise jump-diffusions with heavy tails. Appl. Stoch. Models Bus. Ind. 24, (1), 65–82. [23] Pavlyukevich, I. (2011). First exit times of solutions of stochastic differential equations driven by multiplicative Lévy noise with heavy tails. Stoch. Dyn., 11, (2–3), 495–519. [24] Protter, P. E. (2004). Stochastic integration and differential equations. Second edition. Springer-Verlag, Berlin. Yasutaka Shimizu 43 [25] Pruitt, W. E. (1981). The growth of random walks and Lévy processes. Ann. Probability, 9, (6), 948–956. [26] Shimizu, Y. (2006). M-estimation for discretely observed ergodic diffusion processes with infinitely many jumps. Statist. Infer. Stochastic Proc., 9, (2), 179–225. [27] Shimizu, Y. (2010). Threshold selection in jump-discriminant filter for discretely observed jump processes. Statist. Methods and Appl., 19, (3), 355–378. [28] Shimizu, Y. (2012). Local asymptotic mixed normality for discretely observed nonrecurrent Ornstein-Uhlenbeck processes, Ann. Inst. Statist. Math., 64, (1), 193-211. [29] Shimizu, Y. and Yoshida, N. (2006) Estimation of parameters for diffusion processes with jumps from discrete observations. Statist. Infer. Stochastic Proc., 9, (3), 227– 277. [30] Sørensen, M. (2000). Small dispersion asymptotics for diffusion martingale estimating functions, Preprint No. 2000-2, Department of Statistics and Operation Research, University of Copenhagen, Copenhagen. [31] Sørensen, M. and Uchida, M. (2003). Small diffusion asymptotics for discretely sampled stochastic differential equations, Bernoulli, 9, (6), 1051–1069. [32] Takahashi, A. (1999). An asymptotic expansion approach to pricing contingent claims. Asia-Pacific Financial Markets, 6. 115–151. [33] Takahashi, A. and Yoshida, N. (2004). An asymptotic expansion scheme for optimal investment problems. Stat. Inference Stoch. Process., 7, 153–188. [34] Uchida, M. Estimation for discretely observed small diffusions based on approximate martingale estimating functions, Scand. J. Statist. 31 (2004) 553-566. [35] Uchida, M. (2008). Approximate martingale estimating functions for stochastic differential equations with small noises. Stochastic Process. Appl., 118, 1706–1721. [36] Uchida, M. and Yoshida, N. (2004). Asymptotic expansion for small diffusions applied to option pricing. Stat. Inference Stoch. Process., 7, 189–223. [37] Yoshida, N. (1992). Asymptotic expansion of maximum likelihood estimators for small diffusions via the theory of Malliavin-Watanabe. Probab. Theory Relat. Fields, 92, 275–311. [38] Yoshida, N. Asymptotic expansion for statistics related to small diffusions. J. Japan Statist. Soc., 22, 139–159. [39] Yoshida, N. (2011). Polynomial type large deviation inequalities and quasi-likelihood analysis for stochastic differential equations. Ann. Inst. Statist. Math., 63, (3), 431– 479
10math.ST
Approximating Partition Functions in Constant Time arXiv:1711.01655v2 [cs.LG] 20 Feb 2018 Vishesh Jain∗ Frederic Koehler† Elchanan Mossel‡ Abstract We study approximations of the partition function of dense graphical models. Partition functions of graphical models play a fundamental role is statistical physics, in statistics and in machine learning. Two of the main methods for approximating the partition function are Markov Chain Monte Carlo and Variational Methods. An impressive body of work in mathematics, physics and theoretical computer science provides conditions under which Markov Chain Monte Carlo methods converge in polynomial time. These methods often lead to polynomial time approximation algorithms for the partition function in cases where the underlying model exhibits correlation decay. There are very few theoretical guarantees for the performance of variational methods. One exception is recent results by Risteski (2016) who considered dense graphical models and showed that using variational methods, it is possible to find an O(ǫn) additive 2 approximation to the log partition function in time nO(1/ǫ ) even in a regime where correlation decay does not hold. We show that under essentially the same conditions, an O(ǫn) additive approximation of the log partition function can be found in constant time, independent of n. In particular, our results cover dense Ising and Potts models as well as dense graphical models with k-wise interaction. They also apply for low threshold rank models. To the best of our knowledge, our results are the first to give a constant time approximation to log partition functions and the first to use the algorithmic regularity lemma for estimating partition functions. As an application of our results we derive a constant time algorithm for approximating the magnetization of Ising and Potts model on dense graphs. ∗ Massachusetts Institute of Technology. Department of Mathematics. Email: [email protected] Massachusetts Institute of Technology. Department of Mathematics. Email: [email protected] ‡ Massachusetts Institute of Technology. Department of Mathematics and IDSS. Supported by ONR grant N0001416-1-2227 and NSF CCF-1665252 and DMS-1737944. Email: [email protected] † 1 Introduction One of the major algorithmic tasks in the areas of Markov Chain Monte Carlo, in statistical inference and in machine learning is approximating partition functions of graphical models. The partition function or the approximate partition function are used in computing marginals and posteriors - two of the basic inference tasks in graphical models. Moreover, there is an intimate connection between computing the partition function and Markov Chain Monte Carlo methods. In particular, Jerrum and Sinclair [20] showed that it is possible to approximate the partition function for “self-reducible” models for which a rapidly mixing Markov chain exists. On the other hand, for such models, a (1 + ε) approximation of the partition function results in a rapidly mixing chain. Some key results in the theory of MCMC provide conditions for the existence of a rapidly mixing chains and therefore allow for efficient approximations of the partition functions e.g. [12, 13, 14] and follow up work. A different line of work is based on the fact that the measure associated to any graphical model can be characterized by a variational problem. Thus, approximating the partition function can be achieved by solving optimization problems (e.g. [4], [21], [22]). Until recently, there were very few general guarantees for the performance of variational methods. One exception is results by Risteski [18] who showed that using variational methods, it is possible to find an O(ε||J~||1 ) additive 2 approximation to the log partition function of dense graphical models in time n1/ε , even in an interesting regime where correlation decay does not hold. Here, ||J~||1 denotes the total weight of all interactions of the graph so that we are guaranteed an a priori upper bound on the log partition ~ 1 ). function being O(n + ||J|| Following Risteski [18], we consider dense graphical models and show that it is possible to find an O(ε||J~||1 ) additive approximation to the log partition function in (randomized) constant time. Thus our main result stated informally is: Theorem 1.1. For dense graphical models, it possible to compute the log partition function with additive error O(ε||J~||1 ) in time that depends only on ε and the density parameter. We note that the approximation guarantee in Theorem 1.1 is rather weak. For most inference tasks, one is interested in good approximation of the partition function itself and our results (like those of [18]) only provide an approximation of the partition function within a exp(±ǫn) multiplicative factor. Such an approximation is not useful for most inference and marginalization tasks. We note however that • It is easy to see that in constant time, it is impossible to get a sub-exponential approximation of the partition function (see Theorem 2.12 for a formal statement). • There are features of graphical models that are reflected by the log partition function. In particular, we show in Theorem 2.11 how to utilize our results to obtain an ε-approximation for the magnetization per-site for Ising models in constant time. Similar statements hold for other dense graphical models as well. The exact statement of Theorem 2.11 provides the magnetization for a model that has parameters close to the model we are interested in. We show that this is necessary as in constant time, it is impossible to break symmetry between phases. We note that our results hold for very general Markov random fields. On the other hand, even in the case of ferromagnetic Ising models, only polynomial time guarantees have been previously provided (see [13] and recent work [3, 15]). We also note that our results can be thought as generalizing classical results about the approximability of Max-Cut and similar problems on dense graphs – in fact, the Max-Cut problem is just 1 the special case of computing the log partition function of an antiferromagnetic Ising model (i.e. all ~ 1→∞ non-zero entries of J are negative) on a graph with equal edge weights in the limit as kJk (so that the entropy term becomes negligible). Note that in this case, the log-partition function is Ω(kJ~k1 ) (consider choosing the Xi according to independent Rademacher random variables) so ~ 1 -additive approximation actually gives a PTAS. The first PTAS for Max-Cut on dense that an ǫkJk 2 graphs was given by Arora, Karger and Karpinski [2] but ran in time O(nÕ(1/ǫ ) ); this was improved 2 to O(2Õ(1/ǫ ) by Frieze and Kannan in [7] using their weak regularity lemma, and remains essentially the fastest runtime known (our algorithm matches this runtime). More recent works [1, 17] have shown that the sample complexity of the problem – the number of entries of the adjacency matrix which need to be probed – is only O(1/ǫ4 ). In our case, determining the correct sample complexity remains an interesting open problem (see Section 2.4). It is also interesting to note that in the optimization case, algorithms based on regularity and algorithms based on convex programming hierarchies (see [5, 23]) have the same dependence on ǫ (but not n) – our result and [18] also have the same dependence on ǫ and ∆, showing that this phenomena extends to counting-type problems 2 as well, and suggesting that it will be difficult to beat a runtime of 2Õ(1/ǫ ∆) . 2 Overview of results 2.1 Notation and definitions We will consider Ising models where the spins are ±1 valued. The interactions can be both ferromagnetic and anti-ferromagnetic and of varying strengths. For simplicity, we primarily restrict ourselves to the case where there are no external fields, though it will be clear that our methods extend to that case as well (Remark 2.8). Definition 2.1. An Ising model is a probability distribution on the discrete cube {±1}n of the form X 1 1 Pr[X = x] = exp( Ji,j xi xj ) = exp(xT Jx) Z Z i,j where the collection {Ji,j }i,j∈{1,...,n} are the Pnentries of an arbitrary real, symmetric matrix. The P exp( normalizing constant Z = n i,j=1 Ji,j xi xj ) is called the partition function of the x∈{±1} Ising model. We will often need to consider an m × n matrix M as an mn-dimensional vector (exactly how we arrange the mn entries of M in a single vector will not matter). When we do so, we will denote ~ for clarity. the resulting vector by M Definition 2.2. For a vector v = (v1 , . . . , vn ) ∈ Rn and p ∈ [1, ∞), the Lp norm of v, denoted by ||v||p , is defined by ||v||p := [|v1 |p + · · · + |vn |p ]1/p . We also define ||v||∞ := maxi∈{1,...,n} |vi |. ~ , these vector norms will give rise to matrix norms which By viewing a matrix M as a vector M we will use in the sequel. The cases p = 1, 2, ∞ will be of particular importance to us. Another matrix norm that we will need arises from viewing an m × n matrix as a linear operator from Rn to Rm via matrix multiplication. Definition 2.3. For an m × n matrix M , we define ||M ||∞7→1 := supx∈Rn ,||x||∞≤1 ||M x||1 . Following [18], we will focus on ∆-dense Ising models. Definition 2.4. An Ising model is ∆-dense if ∆||J~||∞ ≤ 2 ~ 1 ||J|| . n2 From a combinatorial perspective ∆-dense models are a generalization of dense graph models. From a statistical physics perspective, they generalize complete graph models such as the CurieWeiss model and the SK model [19]. Our main results will provide algorithms which run in constant time. In order to provide such guarantees on problems with unbounded input size, we will work under the usual assumptions on the computational model for sub-linear algorithms (as in e.g. [1, 8, 11]). Thus, we can probe matrix entry A(i, j) in O(1) time. Also note that by the standard Chernoff bounds, it follows that for any set of vertices V for which we can test membership in O(1) time, we can also estimate |V |/n to additive error ǫ w.h.p. in constant time using Õ(1/ǫ2 ) samples. This approximation will always suffice for us; so, for the sake of clarity in exposition, we will henceforth ignore this technical detail and just assume that we have access to |V |/n (as in e.g. [8]). 2.2 Main results Our main theorem for ∆-dense Ising models is: Theorem 2.5. There exists a universal constant C such that for any ǫ, δ > 0, and for any ∆-dense 2 2 Ising model J on n nodes with n ≥ 2C/ǫ ∆ there is an algorithm running in time 2Õ(1/ǫ ∆) log(1/δ) which computes an ǫ(n + kJ~k1 ) additive approximation to log Z with probability at least 1 − δ. Our methods extend in a straightforward manner to higher order Markov random fields on general finite alphabets as well. We will review the definitions in Section 7.1. For simplicity, we only state the result for the case of binary k-uniform Markov random fields. Theorem 2.6. Fix k ≥ 3. There exists a universal constant C such that√ for any ǫ, δ > 0, and for any C(ǫ ∆)2−2k there is an algorithm ∆-dense binary k-uniform √ 2−2kMarkov random field J on n with n ≥ 2 running in time 2Õ(ǫ ∆) log(1/δ) which computes an ǫ(kJ~k1 +n) additive approximation to log Z with probability at least 1 − δ. In the previous theorem, it is possible to improve the dependence on ǫ at the expense of introducing a factor of nk in the running time. We have: Theorem 2.7. Fix k ≥ 3. There exists a universal constant C such that for any ǫ, δ > 0, and for 2 any ∆-dense binary k-uniform Markov random field J on n with n ≥ 2C/ǫ ∆ there is an algorithm 2 ~ 1 +n) additive approximation to log Z running in time 2Õ(1/ǫ ∆) log(1/δ)nk which computes an ǫ(kJk with probability at least 1 − δ. Remark 2.8. Although for simplicity, we stated Theorem 2.6 and Theorem 2.7 only for k-uniform ∆-dense Markov random fields, it is immediately seen that the results extend to general ∆-dense Markov random fields of order K by simply applying Theorem 7.5 or Theorem 7.6 to each J (k) , k ∈ [K]. Again, see Section 7.1 for definitions. In particular, this directly handles dense Ising models with external fields. ~ 1 . If kJ~k1 ≤ ηn, then Remark 2.9. The error term in Theorem 2.5 has two terms n and kJk T | log exp(x Jx)| = O(ηn) and therefore, log Z = n(log 2 + O(η)). Similar statements hold for the other theorems as well. Thus, in interesting applications of the theorem, we may assume WLOG that the dominant term is kJ~k1 (by dominant here, we mean it is at least a small fraction of the other term). As in [18], we are also able to handle the case of Ising models whose interaction matrices have low threshold ranks, although not in constant time. Again, for simplicity, we only record the result for regular low threshold rank models. Definitions will be presented in Section 7.2. Following Remark 2.9, we assume J ′ ≥ 1. 3 Theorem 2.10. There exists a universal constant C such that for any ǫ > 0, and for any regular 2 Ising model J on n nodes with n ≥ 2Ct/ǫ (here, t is the ǫ/2 sum-of-squares rank of the model) 2 ~ 1 and J ′ ≥ 1, there is an algorithm running in time 2Õ(t/ǫ ) + poly(n, t, 1ǫ ) which computes an ǫkJk additive approximation to log Z. 2.3 Approximating the expected total magnetization P P Given an Ising model Pr[X = x] = Z1 exp{ i,j Ji,j xi xj + i hi xi }, one of the most fundamental questions one can ask about it is how many spins are +1 and −1 in expectation. In the case of the ferromagnetic Ising model (Ji,j ≥ 0 for all i, j), this corresponds to how strongly the system P is magnetized. Accordingly, we define the (expected total) magnetization of an Ising model by E[ i xi ], where the expectation is with respect to the Ising distribution on {±1}n . Perhaps surprisingly, our results easily show that for dense Ising models, one can obtain, in some sense, an approximation to the expected magnetization in constant time. More precisely, we have: Theorem 2.11. Consider a ∆-dense Ising Model Pr[X = x] := X X 1 exp{ Ji,j xi xj + hi xi }, Z i,j i Let Pr[X = x] := h ∆||J~||∞ ≤ ||J~||1 , n2 ∆||h||∞ ≤ ||~h||1 n X X 1 exp{ Ji,j xi xj + (hi + h)xi } Z i,j i and let mh denote the expected total magnetization for Prh . Then, for any ǫ > 0, we can find in ~ 1 ) additive approximation to mh , for some constant time (depending only on ǫ and ∆), an ǫ(n + kJk h with |h| < ε. Proof. It is well known that one can express the moments of spin systems in termsPof derivatives of the log partition function. In particular, for the Ising model Pr[X = x] = Z1 exp{ i,j Ji,j xi xj + P P 1 Pi hi xi }, consider the family of perturbed Ising models defined by Prh [X = x] = Zh exp{ i,j Ji,j xi xj + i (hi + h)xi }. Then, for any h0 , we have  1 ∂  ∂ log Zh (h0 ) = ∂h Zh0 ∂h X x∈{±1}n = X x∈{±1}n   X X exp{ Ji,j xi xj + (hi + h)xi } i,j i  ! X X X 1  exp{ Ji,j xi xj + (hi + h0 )xi } xi Zh 0 i,j i i X = E h0 [ xi ] i where E h0 denotes the expectation with respect to the Ising distribution perturbed by h0 . In Zh particular, ∂ log ∂h (0) equals the expected total magnetization of the Ising model we started out 4 with. Moreover, since by Jensen’s inequality,   ! 2 X X X X 1  ∂ ∂ log Zh (h0 ) = |h=h0 exp{ Ji,j xi xj + (hi + h0 )xi } xi ∂h2 ∂h Z h 0 i,j i i x∈{±1}n X X = E h0 [( xi )2 ] − (E h0 [ xi ])2 i i ≥0 we see that log Z is convex in h; in particular, for any h0 ∈ R and any δ > 0, we have log Z(h0 ) − log Z(h0 − δ) ∂ log Z log Z(h0 + δ) − log Z(h0 ) ≤ (h0 ) ≤ δ ∂h δ Finally, P • By the mean /RHS of the equation above are given by E h′ [ i xi ] P value theorem, the LHS and E h′′ [ i xi ], where h0 − δ < h′ < h0 < h′′ < h0 + δ. • By setting ǫ = δ2 in Theorem 2.5 and Remark 2.8, we can evaluate the LHS and RHS up to the desired error in constant time We remark that: • Unfortunately, it is impossible to approximate in constant time the magnetization at the specified value of the external fields. For example, consider an Ising model on 4n vertices, where Ji,j = C for some large C if i, j ≤ 2n and Ji,j = 0 otherwise. Let hi = 1 if i ∈ [2n+1, 3n] and hi = −1 if i ∈ [3n + 1, 4n]. We set all the other hi to 0 except that we set hI = X, where I is uniformly chosen in [1, 2n] and X is uniformly chosen in {0, ±1}. Note that this is a dense Ising model as per our definition. Note also that on the nodes [1, 2n] we have the Ising model on the complete graph with one (random) node having external field. It is easy to see that if X = 0, the magnetization is 0. The fact that C is a large constant implies that conditioning on one vertex taking the value ± results in a dramatic change in magnetization on the vertices [1, 2n]. In particular, the magnetization is of order n if X = +1 and is of order −n if X = −1. It thus follows that we need Ω(n) queries in order to determine the magnetization in this case. We note that this example corresponds to a phase transition P – in particular, for every ǫ > 0, if h′ > ǫ then E h′ [ i xi ] = Ω(n) for all values of X and I. See ([6]) for general references for the Ising model on the complete graph. • The results for computing the magnetization readily extend to other models. For example, for Potts models, we can compute for each color the expected number of nodes of that color (up to error ǫkJ~k1 and for an ǫ close external field). Similarly, it is easy to check we can compute Pother statistics at this accuracy. For instance, for the Ising model, we can approximate E[ ai xi ] if nηkak∞ ≤ kak1 for some η > 0. 2.4 Tightness of our results As mentioned in the introduction, our results are qualitatively tight. We now make this precise by proving the following information-theoretic lower bound on the accuracy of constant-time algorithms for additively approximating log Z: 5 Theorem 2.12. Fix ǫ, ∆ ∈ (0, 1/4). For any (possibly randomized) algorithm A which probes at 1 entries of J before returning an estimate to log Z, there exists a ∆-dense input most k := 8ǫ∆ instance J such that A makes error at least ǫkJ~k1 /4 with probability at least 1/4. Proof. We prove the claim by reduction to a hypothesis testing problem. Specifically, we show that ′ with log-partition functions that are at there exist two different dense Ising models JM and JM ′ k /2-far apart (where kJ ~M k > kJ~′ k) such that no algorithm which makes only k probes least ǫkJ~M 1 M can distinguish between the two with probability greater than 3/4. This immediately implies that for any algorithm A to estimate log Z and for at least one of the two inputs, A must make error at ′ k /4 with probability at least 1/4 when given this input — otherwise we could use the least ǫkJ~M 1 output of A to distinguish the two models with better than 3/4 probability by checking which log Z the output is closer to. Let n be an instance size to be taken sufficiently large, and consider two ∆-dense ferromagnetic Ising models defined as follows:  • JM , for which the underlying graph is the complete graph on n vertices, ǫ∆ n2 many of the n are edges are randomly selected to have weight M ∆ , and the remaining (1 − ǫ∆) 2 many edges  n M n M ~ ~ assigned weight M . Note that since ||JM ||∞ = ∆ and ||JM ||1 = ǫ∆ 2 ∆ + (1 − ǫ∆) 2 M = (1 + ǫ(1 − ∆))M n2 , this model is indeed ∆-dense for n sufficiently large. ′ , for which the underlying graph is the complete graph on n vertices and all edges have • JM weight M . ′ respectively. It is easily seen that We denote the partition functions of these models by ZM and ZM   ~M ||1 log Z ′ = (1 + ǫ(1 − ∆)) n2 ≥ (1 + 3ǫ/4) n2 , and that limM →∞ M M = limM →∞ logMZM = limM →∞ ||JM ′ ~ ||   ||JM 1 ′ = limM →∞ M = n2 . Therefore, for M sufficiently large, log ZM ≥ (1 + ǫ/2)M n2 and log ZM   ′ | ≥ (ǫ/2)M n = (ǫ/2)kJ ~′ M k1 . M n2 , so | log ZM − log ZM 2 ′ ′ with probability greater Now, we show that no algorithm A can distinguish between JM and JM ′ on our input J to algorithm than 3/4 with only k probes. We fix a 50/50 split between JM and JM ′ ′ A . Since the randomized algorithm A can be viewed as a mixture over deterministic algorithms, there must exist a deterministic algorithm A′′ with success probability in distinguishing JM from ′ at least as large as A′ . Let (u , v ) be the first edge queried by A′′ , let (u , v ) be the next edge JM 1 1 2 2 queried assuming Ju1 v1 = M , and define (u3 , v3 ), . . . , (uk , vk ) similarly (without loss of generality, the algorithm uses all k of its available queries). Let E be the event that Ju1 ,v1 , . . . , Juk ,vk are all ′ we see Pr(E|J = J ′ ) ≥ equal to M . Event E always happens under JM , and when the input is JM M ǫ∆n(n−1)/2 ≥ 1 − 2kǫ∆ for n > 4k. Thus the total variation distance between the observed 1 − k n(n−1)/2−k ′ is at most 2kǫ∆, so by the Neyman-Pearson Lemma we know A′′ distribution under JM and JM 1 fails with probability at least (1/2)(1 − 2kǫ∆). Therefore for k ≤ 4ǫ∆ we see that A′′ fails with probability at least 1/4 which proves the result. 2 Note that on the input instances given in this theorem, our algorithm will use at most 2Õ(1/ǫ ∆) ~ 1 approximation for both models with probability ≥ 0.99. Finding the queries to output an ǫkJk optimal dependence of the running time on the parameters ǫ, ∆ remains an interesting open problem. 2.5 Outline of the techniques To illustrate the main reason for the intractability of the (log) P partition function of an Ising model, we consider the ferromagnetic case where Pr[X = x] = Z1 exp{ i,j Ji,j xi xj }, Ji,j ≥ 0. In this case, 6 it is clear that a given magnetized state x, where almost all of the spins are either +1 or −1, is more likely than a given unmagnetized state y, where the spins are almost evenly split between +1 and n , we see −1. However, since the number of states with exactly αn spins equal to +1 is simply αn that the total number of strongly magnetized states is exponentially smaller than the total number of unmagnetized states. Therefore, while any given unmagnetized state is less likely than any given magnetized state, it may very well be the case that the total probability of the system being in an unmagnetized state is greater than that of the system being in a magnetized state. In this paper, we present an approach to dealing with this tradeoff in dense Ising models (Theorem 2.5) based on the algorithmic regularity lemma of Frieze and Kannan (Theorem 3.3). Roughly speaking, this lemma allows us to efficiently partition the underlying (weighted) graph into a small number of blocks in a manner such that “cut-like” quantities associated to the graph approximately depend only on the numbers of edges between various blocks. In Lemma 4.1, we show that the log partition function fits into this framework. A similar statement for MAX-CUT (which may be viewed as the limiting case of our model when only antiferromagnetic interactions are allowed and ||J~||∞ tends to infinity) was first obtained in [7]. The key point in the regularity lemma is that the number of blocks depends only on the desired quality of approximation, and not of the size of the underlying graph. Together with the previous statement, this shows (Lemma 4.2) that one can approximately rewrite the sum computing the partition function in terms of only polynomially many nonnegative summands, as opposed to the exponentially many nonnegative summands we started out with. This provides a way to resolve the entropy-energy tradeoff – the log of the largest summand of this much smaller sum approximates the log of the partition function well (Lemma 5.1). The preceding discussion reduces the problem of estimating the log partition function to an optimization problem, although a very different one from [18]. However, as stated, it is not a problem we can solve in constant time. In Lemma 5.2, we show how to “granulate” the parameters to reduce the problem to constant size, and then our Algorithm 1 solves this problem efficiently via convex programming. The proofs of Theorem 2.6, Theorem 2.7 and Theorem 2.10 follow a similar outline, with the application of Theorem 3.3 replaced by Theorem 7.5, Theorem 7.6 and Theorem 7.9 respectively. 3 Preliminaries In the case of the dense Ising model, our reduction to a problem that can be solved in constant time will be based on the algorithmic weak regularity lemma of Frieze and Kannan [8]. Before stating it, we introduce some terminology. Throughout this section, we will deal with m × n matrices whose entries we will index by [m] × [n], where [k] = {1, . . . , k}. Definition 3.1. Given S ⊆ [m], T ⊆ [n] and d ∈ R, we define the [m] × [n] Cut Matrix C = CU T (S, T, d) by ( d if (i, j) ∈ S × T C(i, j) = 0 otherwise Definition 3.2. A Cut Decomposition expresses a matrix J as J = D (1) + · · · + D (s) + W where D (i) = CU T (Ri , Ci , di ) for all t = 1, . . . , s. We say that such a cut decomposition has width s, coefficient length (d21 + · · · + d2s )1/2 and error ||W ||∞7→1 . 7 We are now ready to state the algorithmic weak regularity lemma of Frieze and Kannan. 2 Theorem 3.3. [8] Let J be an arbitrary real matrix, and let ǫ, δ > 0. Then, in time 2Õ(1/ǫ ) /δ2 , we can, ≥ 1 − δ, find a cut decomposition of width O(ǫ−2 ), coefficient length at most √ with probability √ ~ 2 / mn and error at most 4ǫ√mn||J|| ~ 2. 27||J|| 4 Reducing the number of summands using weak regularity The next lemma shows that for the purpose of additively approximating the function, Plog partition (1) (s) ′ T (1) we may as well work with the matrix D + · · · + D . We define Z := x exp(x (D + · · · + D (s) )x). Lemma 4.1. Let J be the matrix of interaction strengths of a ∆-dense Ising model. For ǫ, δ > 0, let J = D (1) + · · · + D (s) + W be a cut decomposition of J as in Theorem 3.3.Then, for Z and Z ′ as above, we have | log Z − log Z ′ | ≤ √4ǫ∆ ||J~||1 . Proof. Note that for any x ∈ {±1}n , we have X X XX X X | Ji,j xi xj − (D (1) + · · · + D (s) )i,j xi xj | = | ( Wi,j xj )xi | ≤ | | Wi,j xj | i,j i,j i j i j ~ 2 ≤ ||W ||∞7→1 ≤ 4ǫn||J|| Therefore, for any x ∈ {±1}n , we have    X X exp( Ji,j xi xj ) ∈ exp  (D (1) + · · · + D (s) )i,j xi xj ) ± 4ǫn||J~||2  . i,j i,j Taking first the sum of these inequalities over all x ∈ {±1}n and then the log, we get     X log Z ∈ log exp xT (D (1) + · · · + D (s) )x ± 4ǫn||J~||2  x∈{±1}n Finally, noting that ||J~||22 = P i,j |Ji,j |2 ≤ ||J~||∞ ||J~||1 ≤ ~ 2 ||J|| 1 , ∆n2 and the proof follows. Recall that for each i ∈ [s], D (i) = CU T (Ri , Ci , di ) is a cut matrix between vertex sets Ri and Ci . We pass to a common refinement of all of the Ri ’s and Ci ’s. This gives at most r ≤ 22s disjoint sets V1 , . . . , Vr such that that every one of the Ri ’s and Ci ’s is a union of these “atoms” Va . In terms of these Va ’s, we can define another approximation Z ′′ to the partition function: ! r s X X X |Va |H(ya /|Va |) r ′ (y)i c′ (y)i di + Z ′′ := exp y a=1 i=1 P where y ranges over all elements of [|V1 |] × · · · × [|Vr |], r ′ (y)i := a : Va ⊆Ri (2ya − |Va |), c′ (y)i := P a : Va ⊆Ci (2ya − |Va |) and H(p) := −p log p − (1 − p) log(1 − p) is the binary entropy function. Note that r ′ (y)i represents the net spin in Ri , and similarly for c′ (y)i . The next lemma shows that for approximating log Z ′ , it suffices to obtain an approximation to log Z ′′ . Combined with Lemma 4.1, we therefore see that approximating log Z ′′ is sufficient for approximating log Z. 8 Lemma 4.2. For Z ′ and Z ′′ as above, we have | log Z ′ − log Z ′′ | = O(22s log n). P P P Proof. First, observe that xT D (i) x = di a∈Ri ,b∈Ci xa xb = di ( a∈Ri xa )( b∈Ci xb ). Thus, letting P P ri′ (x) := a∈Ri xa and c′i (x) := b∈Ci xb , we see that that Z′ = X x exp(xT (D (1) + · · · + D (s) )x) = X exp x X ri′ (x)c′i (x)di i ! . Re-expressing the summation in terms of the possible values that ri′ (x) and c′i (x) can take, we get that ! X X X ′ ′ ′ Z = ri ci di exp 1. r ′ ,c′ x r ′ (x)=r ′ ′ c (x)=c′ i where r ′ ranges over all elements of [|R1 |] × · · · × [|Rs |], r ′ := (r1′ , . . . , rs′ ), r ′ (x) := (r1′ (x), . . . , rs′ (x)) and similarly for c′ and c′ (x). Next, since Y |Va | X X 1= ya n a x∈{±1} r ′ (x)=r ′ c′ (x)=c′ it follows that Z ′ = P y y∈[|V1 |]×···×[|Vr |] r ′ (y)=r ′ c′ (y)=c′ |Va | ya . Q P exp ( i r ′ (y)i c′ (y)i di ) a  n log αn  Finally, we apply Stirling’s formula = nH(α) + O(log n). to get the desired result. 5 Approximating the reduced sum in constant time using convex programming So far, we have seen how the problem of estimating the log partition function can be reduced to the problem of approximating log Z ′′ . The next simple lemma reduces the estimation of log Z ′′ to an optimization problem. P P Lemma 5.1. Let y ∗ := arg maxy exp ( i ri′ (y)c′i (y)di + a |Va |H(ya /|Va |)). Then, ! X X ′′ ′ ∗ ′ ∗ ∗ log Z − ri (y )ci (y )di + |Va |H(ya /|Va |) ≤ 22s log n. i a 2s Proof. This follows immediately by noting that Z ′′ , which is a sum of at most n2 many nonnegative 2s summands, is at least as large as its largest summand, and no larger than n2 times its largest summand. The following lemma shows that for estimating the contribution of the term corresponding to some vector y, it suffices to know the components of y up to some constant precision. This reduces the optimization problem to one of constant size. 9 Lemma 5.2. Let J denote the matrix of interaction strengths of a ∆-dense Ising model, and let J = D 1 + · · · + D s + W√denote a cut decomposition as in Theorem 3.3. Then, given ri , ri′ , ci , c′i for ∆ i ∈ [s] and some γ ≤ 4ǫ√27s such that ri , ci , ri′ , c′i ≤ n, |ri − ri′ | ≤ γn and |ci − c′i | ≤ γn for all i, we P ~ 1 /2. get that i di |ri′ c′i − ri ci | ≤ ǫ||J|| Proof. From Theorem 3.3, we know that for all i ∈ [s], |di | ≤ |c′i ||ri′ − ri | + |ri ||c′i − ci | ≤ 2γn2 , it follows that X i di |ri′ c′i − ri ci | ≤ X i √ ~ 27|| √J||1 . n2 ∆ Since |ri′ c′i − ri ci | ≤ √ 27||J~||1 εk|J~||1 √ di 2γn ≤ 2γs ≤ 2 ∆ 2 which completes the proof. We now present Algorithm 1 which approximates the log of the largest summand in Z ′′ by iterating over all possible proportions of up-spins in each block Ri , Ci . For each proportion, it approximately solves the following convex program Cr,c (where γ is as before, λ is a parameter to be specified, and va := |Va |/n): X max va H(za /va ) a s.t. 0 ≤ za ≤ va X za ≤ rt + γ rt ≤ a:Va ⊂Rt ct ≤ X a:Va ⊂Ct za ≤ ct + γ. The infeasibility of this program means that our “guess” for the proportion of up-spins in the various Ri , Ci is not combinatorially possible (recall that there may be significant overlap between the various Ri , Ci . On the other hand, if this program is feasible, then we actually obtain an approximate maximum entropy configuration with roughly the prescribed number of up-spins in Ri , Ci , i ∈ [n]. Calculating the contribution to Z ′′ of such a configuration, and maximizing this contribution over all iterations gives a good approximation1 to the maximum summand of Z ′′ , and hence to Z ′′ . This is the content of the next lemma. ~ 1 + λn + O(22s log n) additive approximation to Lemma 5.3. The √output of Algorithm 1 is an ǫ||J|| 2s 4 27s2 log Z ′′ when n ≥ √∆ǫ . Proof. By Lemma 5.1, it suffices to prove the claim with log Z ′′ replaced by X X ri′ (y ∗ )c′i (y ∗ )di + |Va |H(ya∗ /|Va |). a i where y ∗ is defined as in the statement of Lemma 5.1. Let r, c correspond to the “cell” which y ∗ /n falls into, i.e. the values of r, c such that for the corresponding r ′ , c′ , we have r ′ ≤ r ′ (y ∗ ),c′ ≤ c′ (y ∗ ), A slightly better approximation to log Z ′′ can be found by estimating the discrete sum over each region by an integral (using Lemma 5.4 to bound the error), and approximating this integral via the hit-and-run random walk of [16]. However, this algorithm is slower than Algorithm 1, and it turns out the gain in accuracy is negligible for our application. 1 10 Algorithm 1 Convex programming method to estimate log partition unction Let S = {0, γ, 2γ, . . . , ⌊1/γ⌋γ}. M ← 0. for r ∈ S s , c ∈ S s do Either find a λ-approximate solution to, or verify infeasibility of, Cr,c . (e.g. by ellipsoid method [10]) if Cr,c is feasible then Let Hr,c denote the λ-approximate maximum value of Cr,c . c′i = 2nci − |Ci |. Let ri′ = 2nri − |R Pi | and Let Mr,c = exp ( i ri′ c′i di + nHr,c ). M ← max(M, Mr,c ). end if end for return log M |r ′ − r ′ (y ∗ )| ≤ γn and |c′ − c′ (y ∗ )| ≤ γn. Since Hr,c is the result of solving Cr,c up to λ additive error and since y ∗ /n is in the feasible region of the convex program by definition, it follows that X X va H(za /va ) − λn ≥ |Va |H(ya∗ /|Va |) − λn nHr,c ≥ n sup z a a where z ranges over the feasible region for Cr,c . Combining this with Lemma 5.2 gives X X ri′ (y ∗ )c′i (y ∗ )di + |Va |H(ya∗ /|Va |) − log Mr,c a i ≤ ≤ X i X i di (ri′ (y ∗ )i c′i (y ∗ ) − ri′ c′i ) + ′ ∗ ′ ∗ di |r (y )c (y ) − ri′ c′i | X a |Va |H(ya∗ /|Va |) − nHr,c + λn ≤ ǫ||J~||1 /2 + λn. On the other hand, we know that M = Mr,c for some r, c. Let z denote the point at which the λapproximate optimum to the convex program Cr,c was attained. Define ya to be ⌈za n⌉ if za n ≤ |Va |/2 and to be ⌊za n⌋ otherwise. Similar to the inequality above, we get X X log Mr,c − ri′ (y ∗ )c′i (y ∗ )di + |Va |H(ya∗ /|Va |) a i ≤ log Mr,c − = X a X i ri′ (y)c′i (y)di − X a |Va |H(ya /|Va |) {|Va |H(za n/|Va |) − |Va |H(ya /|Va |} + ≤ 22s log 5 + X i ri′ c′i di − X X i ri′ (zn)c′i (zn)di + ri′ c′i di − X i i X i ri′ (zn)c′i (zn)di − X X ǫ||J~||1 ≤ 22s log 5 + ri′ (zn)c′i (zn)di − ri′ (y)c′i (y)di + 2 i ri′ (y)c′i (y)di X ri′ (y)c′i (y)di i i where r ′ and c′ are as defined in Algorithm 1 in terms of r and c, in the second inequality, we have used Lemma 5.4 and the triangle inequality, and in the last line, we have used Lemma 5.2. 11 √ ~ J|| √ 1 by To bound the last term, since |ya − za n| ≤ 1 for all a by definition, and since |di | ≤ n27|| 2 ∆ Theorem 3.3, we get X X X X | ri′ (zn)c′i (zn)di − r ′ (y)i c′ (y)i di | ≤ |di ||ri′ (y)||c′i (y) − c′i (zn)| + |di ||c′i (zn)||ri′ (y) − ri′ (zn)| i i i ≤ i X ≤2 i |di ||Ri || X i 2| + a : Va ⊆Ci 2s |di |n2 X ≤ √ X i |di ||Ci || ~ 1 22s+1 s 27||J|| √ n ∆ X 2| a : Va ⊆Ci ~ 1 ǫ||J|| ≤ 2 provided that n ≥ √ 4s √2722s , ∆ǫ which finishes the proof. Lemma 5.4. Let n be a natural number, and let 0 ≤ z ≤ n. Let y = ⌈z⌉ if z ≤ n/2 and y = ⌊z⌋ if z > n/2. Then, nH(y/n) ≥ nH(z/n) − log(5). Proof. Observe that if both y, z ≤ n/2 or both y, z ≥ n/2 then this is immediate, since entropy is concave and maximized at 1/2, thereby implying that H(y/n) > H(z/n). In the remaining case, y/n and z/n are on opposite sides of 1/2. By the definition of y, we know that |y/n − z/n| ≤ 1/n, and hence, by the Mean Value Theorem, n|H(y/n)−H(z/n)| = n|H ′ (x/n)(y/n−z/n)| ≤ |H ′ (x/n)| for some x with |x/n − 1/2| ≤ 1/n. Thus, if n ≥ 3 we have x/n ∈ [1/6, 5/6] so that |H ′ (x/n)| = | log((x/n)/(1 − x/n))| ≤ log 5. If n ≤ 2, then we already have nH(z/n) − nH(y/n) ≤ nH(z/n) ≤ 2 log 2 < log 5. 6 Putting it all Together We are now ready to prove Theorem 2.5. Proof. (Theorem 2.5) First, we show how to get such an algorithm with constant success probability (i.e. 7/8). We will then boost it to the desired probability of success using the standard median technique. The constant success algorithm is just Algorithm 1 applied√to the weakly regular partition generated by Theorem 3.3 with regularity parameter some ǫ′ = O(ǫ ∆). For the correctness of this algorithm, note that if M is the output of Algorithm 1, then | log M − log Z| ≤ | log Z − log Z ′ | + | log Z ′ − log Z ′′ | + | log M − log Z ′′ | ~ 1 /4 + O(22s log n) + ǫkJk ~ 1 /4 + λn + O(22s ). ≤ ǫkJk where the first bound is by Lemma 4.1, the second bound is by Lemma 4.2, and the last bound is by Lemma 5.3. ~ 1 /4 + λn ≤ ǫ(kJ~k1 + n) ǫkJ~k1 /4 + O(22s log n) + ǫkJk when we take λ = ǫ/2 and n sufficiently large. The runtime of computing a weakly regular partition 2 2 with success probability 7/8 in Theorem 3.3 is 2Õ(1/ǫ ∆) . The runtime of Algorithm 1 is 2Õ(1/ǫ ∆) 2 as there are 2Õ(1/ǫ ∆) many points in |S|, and solving each convex program Cr,c up to λ-error (as 2 2 well as deciding feasibility) can be done in time poly(2Õ(1/ǫ ∆) , log(1/λ), log(1/γ)) = 2Õ(1/ǫ ∆) by standard guarantees for the ellipsoid method [10]. 12 Finally, to boost our success probability to 1 − δ, we use the standard median trick, which is to repeat the algorithm O(log(1/δ)) times independently and take the median of these outputs – that this works is easily proven by the standard Chernoff bounds. 7 7.1 Extensions General Markov random fields For simplicity, we will restrict ourselves to Markov random fields over a binary alphabet. It is readily seen that the same techniques extend to Markov random fields over general finite alphabets as well. Definition 7.1. A binary Markov random field of order K is a probability distribution on the discrete cube {±1}n of the form K X 1 Pr[X = x] = exp( Z n X (k) Ji1 ...ik xi1 . . . xik ) k=1 i1 ,...,ik =1 (k) where for each k, {Ji1 ,...,ik }i1 ,...,ik ∈[n] is an arbitrary collection of real numbers. Note that the sum P (k) (k) (x, . . . , x), where J (k) is a k-multilinear map or i1 ,...,ik Ji1 ,...,ik xi1 . . . xik may also be viewed as J (k) k-tensor with J (k) (ei1 , . . . , eik ) = Ji1 ,...,ik . Here, ej denotes the j th standard basis vector of Rn and we P P (k) (x, . . . , x)) view {±1}n as a subset of Rn . The normalizing constant Z = x∈{±1}n exp( K k=1 J is called the partition function of the Markov random field. Moreover, if all entries of all J (i) , i ∈ [K]\k vanish, then we say that the Markov random field is k-uniform. Definition 7.2. A binary Markov random field of order K is ∆-dense if ∆||J~(k) ||∞ ≤ all k. ||J ~(k) ||1 nk for As indicated earlier, our approach for general Markov random fields mirrors our approach for the Ising model. This is essentially because one has a similar algorithmic regularity lemma for general k-dimensional matrices. Definition 7.3. A k-dimensional matrix M on X1 × · · · × Xk is a map M : X1 × · · · × Xk → R. Definition 7.4. For Si ⊆ Xi , i = 1, . . . , k and a real number d, we define the k-dimensional matrix ( d e = (x1 , . . . , xk ) ∈ S1 × · · · × Sk CU T (S1 , . . . , Sk ; d)(e) = 0 otherwise Theorem 7.5. [8] Suppose J is an arbitrary k-dimensional matrix on X1 × · · · × Xk , where we assume that k ≥ 3 is fixed. Let N := |X1 | × · · · × |Xk | and let ǫ, δ ∈ (0, 1]. Then, in time 2 O(kO(1) ǫ−O(log2 k) 2Õ(1/ǫ ) δ−2 ), we can, with probability at least 1 − δ, find a cut decomposition of √ √ √ k width O(ǫ2−2k ), coefficient length at most 27 ||J~||2 / N and error at most ǫ2k N ||J~||2 . As in the k = 2 case, the error of the cut decomposition refers to ||J −(D (1) +· · ·+D (s) )||∞7→1 := sup||x||∞≤1 ||J − (D (1) + · · · + D (s) )||1 , where we view a k-dimensional matrix M as a linear operator P from (Rn )k−1 → Rn via the formula [M (x1 , . . . , xk−1 )]i := j1 ,...,jk−1 Mj1 ...jk−1 i x1,j1 . . . xk−1,jk−1 . 13 Given this theorem, the proof proceeds exactly as before – the same argument as Lemma 4.1 k ǫ||J|| ~ 1 shows that we can replace J by D (1) + · · · + D (s) (possibly incurring an additive error of 2 √ ), ∆ and once we have made this replacement, a similar optimization scheme as before lets us deduce Theorem 2.6. The proof of Theorem 2.7 is identical, the only difference being that we can obtain a cut decomposition of smaller width using the following theorem. Theorem 7.6. [1] Let J be a an arbitrary k-dimensional matrix on X1 × · · · × Xk , where we assume 2 that k ≥ 3 is fixed. Let N := |X1 | × · · · × |Xk | and let ǫ > 0. Then, in time 2O(1/ǫ ) O(N ) and with probability at √ least 0.99, we can find a cut decomposition width at most 4/ǫ2 , coefficient length at √ most 2||J~||2 /ǫ N and error at most ǫ2k N ||J~||2 . 7.2 Ising models with low threshold rank As in [18], we can also consider Ising models of low threshold rank. For simplicity, we consider only the regular case, noting that our results generalise with appropriate modifications to the non-regular case as well. P ′ Definition 7.7. A regular weighted Ising model is one for which j |Ji,j | = J for all i. The normalized adjacency matrix of a regular Ising model is the matrix with entries Ji,j /J ′ . We will denote this matrix by JD . Definition P7.8. The δ-sum-of squares threshold rank of a regular Ising model is defined to be tδ (JD ) := i:|λi |>δ λ2i , where λ1 , . . . , λn denote the eigenvalues of JD . Note that since all eigenvalues of JD have absolute value at most 1, our criterion for low threshold rank is more general than defining tδ (JD ) to be the number of eigenvalues of JD with absolute value strictly greater than δ. Our definition of tδ (JD ) differs slightly from the definition in [18]. There, the author defined P tδ (JD ) := i : |µi |>δ 1, where µ1 , . . . , µn denote the eigenvalues of the matrix abs(JD ) defined by abs(JD )i,j = |(JD )i,j |. His definition and our definition are related via the standard linear algebra P ~ D )k2 , it follows that Pn λ2 = Pn µ2 . fact that ni=1 λ2i = ||J~D ||22 ; since ||J~D ||22 = ||abs(J 2 i=1 i i=1 i The same linear algebra fact shows that the low δ-sum-of-squares rank setting strictly generalises the ∆-dense setting: for any regular, ∆-dense Ising model and for any δ > 0, we have ||J1~||21 1 ′ ~ tδ (JD ) ≤ ||J~D ||22 = J1′2 ||J~||22 ≤ J1′2 ∆n 2 = ∆ , where we have used that ||J ||1 = nJ in the regular case. Our methods extend straightforwardly to the low sum-of-squares threshold rank setting due to the following algorithmic regularity lemma of Gharan and Trevisan. Theorem 7.9. [9] Let J be the matrix of interaction strengths of a regular Ising model, let ǫ > 0 and let t := tǫ/2 (JD ). Then, in time poly(n, t, 1ǫ ), we can find a cut decomposition of width at most √ 16t/ǫ2 , |di | ≤ t and error at most 4ǫ||J~||1 . ~ 1 ||J|| Recall that in the case of the ∆-dense Ising model, the bounds on the cut decomposition we √ 27 −2 actually used were that the width is O(ǫ ), each |di | is at most √∆n2 ||J~||1 , and the error is at most ~ 1 , which are quite similar since ||J~1 || = J ′ n. Hence, by exactly the same analysis as for the √4ǫ ||J|| ∆ ∆-dense case, we can conclude Theorem 2.10. We omit further details. 14 8 Acknowledgements We thank David Gamarnik for insightful comments, Andrej Risteski for helpful discussions related to his work [18], and Yufei Zhao for introducing us to reference [1]. References [1] Noga Alon, Fernandez de la Vega, Ravi Kannan, and Marek Karpinski. Random sampling and approximation of MAX-CSPs. J. Comput. System Sci., 67:212–243, 2003. [2] Sanjeev Arora, David Karger, and Marek Karpinski. Polynomial time approximation schemes for dense instances of np-hard problems. In Proceedings of the Twenty-seventh Annual ACM Symposium on Theory of Computing, STOC ’95, pages 284–293, New York, NY, USA, 1995. ACM. [3] Alexander Barvinok. Combinatorics and complexity of partition functions. Algorithms and Combinatorics, 30, 2017. [4] David M. Blei, Alp Kucukelbir, and Jon D. McAuliffe. Variational inference: A review for statisticians. arXiv preprint arXiv:1601.00670, 2016. [5] Wenceslas Fernandez de la Vega and Claire Kenyon-Mathieu. Linear programming relaxations of maxcut. In Proceedings of the eighteenth annual ACM-SIAM symposium on Discrete algorithms, pages 53–61. Society for Industrial and Applied Mathematics, 2007. [6] Richard S. Ellis. Entropy, large deviations, and statistical mechanics. Springer, 2007. [7] Alan Frieze and Ravi Kannan. The regularity lemma and approximation schemes for dense problems. Proceedings of the 37th Annual IEEE Symposium on Foundations of Computer Science, pages 12–20, 1996. [8] Alan Frieze and Ravi Kannan. Quick approximation to matrices and applications. Combinatorica, 19(2):175–220, 1999. [9] Shayan Oveis Gharan and Luca Trevisan. A new regularity lemma and faster approximation algorithms for low threshold rank graphs. In Approximation, Randomization, and Combinatorial Optimization. Algorithms and Techniques, pages 303–316. Springer, 2013. [10] Martin Grötschel, László Lovász, and Alexander Schrijver. Geometric algorithms and combinatorial optimization, volume 2. Springer Science & Business Media, 2012. [11] Piotr Indyk. Sublinear time algorithms for metric space problems. In Proceedings of the thirtyfirst annual ACM symposium on Theory of computing, pages 428–434. ACM, 1999. [12] M. Jerrum and A. Sinclair. Approximating the permanent. SIAM J. Comput., 18(6):1149–1178, 1989. [13] M. Jerrum and A. Sinclair. Polynomial-time approximation algorithms for ising model (extended abstract). In Automata, Languages and Programming, pages 462–475, 1990. [14] M. Jerrum, A. Sinclair, and E. Vigoda. A polynomial-time approximation algorithm for the permanent of a matrix with non-negative entries. Journal of the ACM, 51(4):671-697, 2004., 51(4):671–697, 2004. 15 [15] Jingcheng Liu, Alistair Sinclair, and Piyush Srivastava. The ising partition function: Zeros and deterministic approximation. In FOCS, 2017. [16] László Lovász and Santosh Vempala. Fast algorithms for logconcave functions: Sampling, rounding, integration and optimization. In Foundations of Computer Science, 2006. FOCS’06. 47th Annual IEEE Symposium on, pages 57–68. IEEE, 2006. [17] Claire Mathieu and Warren Schudy. Yet another algorithm for dense max cut: Go greedy. In Proceedings of the Nineteenth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA ’08, pages 176–182, Philadelphia, PA, USA, 2008. Society for Industrial and Applied Mathematics. [18] Andrej Risteski. How to calculate partition functions using convex programming hierarchies: provable bounds for variational methods. In COLT, 2016. [19] David Sherrington and Scott Kirkpatrick. Solvable model of a spin-glass. Physical review letters, 35(26):1792, 1975. [20] Alistair Sinclair and Mark Jerrum. Approximate counting, uniform generation and rapidly mixing markov chains. Information and Computation, 82(1):93–133, 1989. [21] Martin J. Wainwright and Michael I. Jordan. Graphical models, exponential families, and variational inference. Foundations and Trends in Machine Learning, 1(1-2):1–305, 2008. [22] Jonathan S. Yedidia, William T. Freeman, and Yair Weiss. Understanding belief propagation and its generalizations. 2003. [23] Yuichi Yoshida and Yuan Zhou. Approximation schemes via sherali-adams hierarchy for dense constraint satisfaction problems and assignment problems. In Proceedings of the 5th conference on Innovations in theoretical computer science, pages 423–438. ACM, 2014. 16 This figure "frog.jpg" is available in "jpg" format from: http://arxiv.org/ps/1711.01655v2
8cs.DS
Submitted to the Annals of Probability arXiv: arXiv:1605.05819 EXPONENTIALLY CONCAVE FUNCTIONS AND A NEW INFORMATION GEOMETRY arXiv:1605.05819v5 [math.PR] 31 May 2017 By Soumik Pal∗,† and Ting-Kam Leonard Wong∗,‡ University of Washington† and University of Southern California‡ A function is exponentially concave if its exponential is concave. We consider exponentially concave functions on the unit simplex. In a previous paper we showed that gradient maps of exponentially concave functions provide solutions to a Monge-Kantorovich optimal transport problem and give a better gradient approximation than those of ordinary concave functions. The approximation error, called L-divergence, is different from the usual Bregman divergence. Using tools of information geometry and optimal transport, we show that L-divergence induces a new information geometry on the simplex consisting of a Riemannian metric and a pair of dually coupled affine connections which defines two kinds of geodesics. We show that the induced geometry is dually projectively flat but not flat. Nevertheless, we prove an analogue of the celebrated generalized Pythagorean theorem from classical information geometry. On the other hand, we consider displacement interpolation under a Lagrangian integral action that is consistent with the optimal transport problem and show that the action minimizing curves are dual geodesics. The Pythagorean theorem is also shown to have an interesting application of determining the optimal trading frequency in stochastic portfolio theory. 1. Introduction. Definition 1.1 (Exponential concavity). Let Ω ⊂ Rd be convex. We say that a function ϕ : Ω → R ∪ {−∞} is exponentially concave if Φ = eϕ is concave. (By convention we set e−∞ = 0.) Throughout this paper we let Ω be the open unit simplex ( ) n X n (1.1) ∆n = p = (p1 , . . . , pn ) ∈ R : pi > 0, pi = 1 , i=1 regarded as the collection of strictly positive probability distributions on a set with n elements. This is due to the applications we have in mind, ∗ This research is partially supported by NSF grants DMS-1308340 and DMS-1612483. MSC 2010 subject classifications: Primary 60E05; secondary 52A41 Keywords and phrases: information geometry, optimal transport, exponential concavity, L-divergence, generalized Pythagorean theorem, functionally generated portfolio, stochastic portfolio theory 1 2 S. PAL AND T.-K. L. WONG although many generalizations are possible. An interesting property of exponentially concave functions is that their gradient maps give a better firstorder approximation those of than ordinary concave functions. In [45], we introduced the concept of L-divergence. Let ϕ : ∆n → R be a differentiable exponentially concave function. For p, q ∈ ∆n , concavity of eϕ implies that (1.2) ϕ(p) + log (1 + ∇ϕ(p) · (q − p)) ≥ ϕ(q), where ∇ϕ is the Euclidean gradient. Clearly this approximation is sharper than the linear approximation of ϕ itself. The L-divergence of ϕ is the error in this approximation: (1.3) T (q | p) := log (1 + ∇ϕ(p) · (q − p)) − (ϕ(q) − ϕ(p)) ≥ 0. The extra concavity of exponentially concave functions have found several recent applications in analysis, probability and optimization. For example, in [22], the equivalence of entropic curvature-dimension conditions and Bochner’s inequality on metric measure spaces is established using the notion of (K, N ) convexity. When K ≥ 0 and N < ∞, the negative of a (K, N ) convex function is exponentially concave. Better gradient approximation has also led to better algorithms in optimization and machine learning such as those in [29, 30, 35], although the authors tend to replace the logarithmic term in (1.2) by a quadratic approximation. One of our primary applications in mind is related to stochastic portfolio theory. In [25, 23], the author considers the gradient map of an exponentially concave function as a map from ∆n to its closure ∆n . The following restatement can be found in [45, Proposition 6]. Let ϕ be a differentiable exponentially concave function on ∆n . For p ∈ ∆n , define π(p) ∈ Rn by   (1.4) π i (p) = pi 1 + ∇ϕ(p) · (e(i) − p) , i = 1, . . . , n, where e(i) = (0, . . . , 1, . . . , 0) is the ith standard basis of Rn . Then, it can be shown that π : ∆n → ∆n . In keeping with standard definitions in the subject we will call this map the portfolio map. In this vein also see articles [6, 24, 26, 31, 42, 49, 53, 54]. The L-divergence of ϕ should be distinguished from the Bregman divergence of ϕ defined by (1.5) D (q | p) := ∇ϕ(p) · (q − p) − (ϕ(q) − ϕ(p)) . Bregman divergence was introduced in [12] and is widely applied in statistics and optimization. To see the difference consider two fundamental examples. EXPONENTIALLY CONCAVE FUNCTIONS 3 For q, p ∈ ∆n , the Kullback-Leibler divergence (also known as relative entropy) is given by n X qi H (q | p) = qi log . pi i=1 It can be shown that the relative P entropy is the Bregman divergence of the Shannon entropy H(p) = − ni=1 pi log pP i . On the other hand, fix π ∈ ∆n and consider the cross entropy ϕ(p) = ni=1 πi log pi . This is an exponentially concave function of p whose associated portfolio map (1.4) is constant: π(p) ≡ π. The corresponding L-divergence is given by !   n n X X qi qi (1.6) T (q | p) = log πi − . πi log pi pi i=1 i=1 This quantity is sometimes referred to as the free energy in statistical physics. In finance it is called the diversification return in [9, 14, 21, 52], the excess growth rate in [25, 27, 44], the rebalancing premium in [10], and the volatility return in [28]. In [45] we introduced a Monge-Kantorovich optimal transport problem on Rn−1 which can be solved using exponentially concave functions on the unit simplex. The cost function is defined for (θ, φ) ∈ Rn−1 × Rn−1 by ! n−1 X exi (1.7) c(θ, φ) := ψ(θ − φ), where ψ(x) := log 1 + i=1 is strictly convex on Rn−1 . We will recall the details of this transport problem in Section 2.1 and its relationship to exponentially concave functions. It suffices to say for now that, given a pair of Borel probability measures P and Q on Rn−1 the optimal coupling of the two with respect to the above cost can be expressed in terms of the portfolio map of an exponentially concave function on the simplex. A related cost function appears in [41] in the completely different context of finding polytopes with given geometric data. It also appears to be related to the study of moment measures as introduced in [15] (see page 3836 in particular). 1.1. Our contributions. In this paper we show that information geometry provides an elegant geometric structure underlying exponential concavity, Ldivergence and the optimal transport problem. Here is a motivating question which is the starting point of this work. Suppose ϕ is an exponentially concave function on ∆n with its associated L-divergence T (· | ·). Can we geometrically characterize triplets (p, q, r) ∈ (∆n )3 such that T (q | p) + T (r | 4 S. PAL AND T.-K. L. WONG r primal geodesic q dual geodesic p Fig 1. Generalized Pythagorean theorem for L-divergence. q) ≤ T (r | p)? The answer to this question determines the optimal frequency of rebalancing the portfolio generated by ϕ (see Section 5.4). Also see Section 3.3 for a transport interpretation of this inequality. Using tools of information geometry, we show that exponentially concave functions on ∆n and their L-divergences induce a new geometric structure on the simplex ∆n regarded as a smooth manifold of probability distributions. Let ϕ be an exponentially concave function on ∆n . We only require that ϕ is smooth and the Euclidean Hessian of eϕ is strictly positive definite everywhere (see Assumption 2.5). The induced geometric structure consists of a Riemannian metric g and a dual pair of affine connections ∇ and ∇∗ . These connections define via parallel transports two kinds of geodesic curves on ∆n called primal and dual geodesics. Interestingly, the duality in this geometry goes hand in hand with the duality in the related Monge-Kantorovich optimal transport problem, and this work is the first which exploits this connection. We summarize our main results as follows. First we give the answer of the motivating question. Theorem 1.2 (Generalized Pythagorean theorem). Given (p, q, r) ∈ (∆n )3 , consider the dual geodesic joining q and p and the primal geodesic joining q and r. Consider the Riemannian angle between the geodesics at q. (See Proposition 4.4 which expresses the Riemannian metric g as a normalized Euclidean Hessian of Φ := eϕ .) Then the difference (1.8) T (q | p) + T (r | q) − T (r | p) is positive, zero or negative depending on whether the angle is less than, equal to, or greater than 90 degrees (see Figure 1). We also prove other remarkable properties of the geodesics: (i) There exist EXPONENTIALLY CONCAVE FUNCTIONS 5 explicit coordinate systems under which the primal and dual geodesics are time changes of Euclidean straight lines (Theorem 5.1). In other words, the new geometry is dually projectively flat. In particular, the primal geodesics are Euclidean straight lines up to time reparameterization. Moreover, the primal and dual connections have constant sectional curvature −1 with respect to the Riemannian metric, and thus satisfy an Einstein condition (Corollary 4.10). The primal and dual geodesics can also be constructed as time changes of Riemannian gradient flows for the functions T (r | ·) and T (· | p) (Theorem 5.5). This is remarkable because while the geodesic equations depend only on the local properties of T (ξ | ξ 0 ) near ξ = ξ 0 , the gradient flows are global as they involve the derivatives of T (r | ·) and T (· | p). Indeed, this relation is known only for limited families of divergence including Bregman divergence and α-divergence [5]. As shown in [2, Chapter 1], the generalized Pythagorean theorem holds for any Bregman divergence which induces a dually flat geometry. We will prove that the resulting geometries from L-divergences are not flat for n ≥ 3 (Theorem 4.9). While some extensions of the generalized Pythagorean theorem hold in certain non-flat spaces (see for example [2, Theorem 4.5]), they involve some extra terms. To the best of our knowledge Theorem 1.2 is the first exact Pythagorean theorem that holds in a geometry which is not dually flat. The difference (1.8) can also be given an optimal transport interpretation (Section 3.3). (ii) We extend the static transport problem (1.7) to a time-dependent transport problem with a corresponding convex Lagrangian action. In Theorem 6.2 we show that the action minimizing curves are the (reparametrized) dual geodesics which, in addition, satisfy the intermediate time optimality condition. This allows for a consistent displacement interpolation formulation between probability measures on the unit simplex. Previously, such studies focused almost exclusively on the Wasserstein spaces corresponding to the cost functions C(x, y) = d(x, y)α (here d is a metric on a Polish space with suitable properties and α ≥ 1). Displacement interpolation and the related concept of displacement convexity were introduced in [38] and in the thesis [37]. These ideas have grown to be immensely important in classical Wasserstein transport with fundamental implications in geometry, physics, probability and PDE. See [51, Chapter 7] for a thorough discussion. Our Lagrangian, although convex, is not superlinear, and, therefore, is not covered by the standard theory. However, we expect it to lead to many equally remarkable properties. These results suggest plenty of problems for further research. Generalizing Theorem 1.2 to more than three points is of interest in stochastic portfo- 6 S. PAL AND T.-K. L. WONG lio theory. Displacement interpolation has become an extremely important topic in optimal transport theory. Extensions to Riemanninan manifolds, done in [16], have led to new functional inequalities. In another vein, [34] defines Ricci curvatures on metric measure spaces in terms of displacement interpolation and displacement convexity. We expect that the displacement interpolation in this paper will lead to a new Otto calculus ([51, Chapter 15]) and related PDEs (such as Hamilton-Jacobi equations). It appears that Bregman divergence and L-divergence are only two of an entire family of divergences with special properties and corresponding optimal transport problems. For example, see [43] which extends the optimal transport problem (1.7) via the cumulant generating function of a general probability distribution. We also believe that this new information geometry will be useful in dynamic optimization problems where the objective function is multiplicative in time. Finally, it is naturally of interest to study exponential concavity on general convex domains. 1.2. Related literature. We have mentioned the L-divergence and the Bregman divergence. In general, a divergence on a set (usually a manifold of probability distributions) is a non-negative function D (q | p) such that D (q | p) = 0 if and only if p = q. Divergences are not metrics in general since they may be asymmetric and may not satisfy the triangle inequality. Apart from Bregman divergence, many families of divergences (such as α-divergence and f -divergence) have been applied in information theory, statistics and other areas; see the survey [7] for a catalog of these divergences. Among these divergences, Bregman divergence plays a special role because it induces a dually flat geometry on the underlying space. First studied in the context of exponential families in statistical inference by [40], it gave rise to information geometry – the geometric study of manifolds of probability distributions. Furthermore, Bregman divergence enjoys properties such as the generalized Pythagorean theorem and projection theorem which led to numerous applications. See [2, 3, 13, 32, 39] for introductions to this beautiful theory. The related concept of dual affine connection is also useful in affine differential geometry (see [17, 33, 47]). In [36] dually projectively flat manifolds are characterized in terms of the Bartlett tensors and conformal flatness. Here we identify a new and important class of examples and show that they have concrete applications. This work is motivated by our study in mathematical finance. Recently optimal transport has been applied to financial problems such as robust asset pricing; see, for example, [1, 8, 18]. This line of work has a somewhat different flavor than ours although they share the same goal: development of model- EXPONENTIALLY CONCAVE FUNCTIONS 7 free mathematical finance. Portfolios generated by exponentially concave functions generate profit due to fluctuations of a sequence in ∆n representing the stock market. This idea is sometimes called volatility harvesting and leads naturally to the transport problem (1.7), as shown in [45]. In this philosophy, our work can be interpreted as developing a notion of modelfree volatility. 1.3. Outline of the paper. In the next section we recall the optimal transport problem formulated in [45] using the exponential coordinate system. Its relation with functionally generated portfolio is also reviewed. In Section 3 we relate exponential concavity with c-concavity and give a transportmotivated definition of L-divergence. Here duality plays a crucial role. After reviewing the basic concepts of information geometry, we derive in Section 4 the geometric structure induced by an exponentially concave function. The properties of this new geometry are then studied in Section 5. In particular, we characterize the primal and dual geodesics and prove the generalized Pythagorean theorem which has an interesting application in mathematical finance. Finally, in Section 6 we apply the geometric structure to construct a displacement interpolation for the associated optimal transport problem. Some technical and computational details are gathered in the Appendix. 2. Optimal transport and portfolio maps. In this section we recall the optimal transport problem in [45] using the exponential coordinate system. We also review the definition of functionally generated portfolio and explain how it relates to the transport problem. 2.1. Exponential coordinate system. The exponential coordinate system defines a global coordinate system on ∆n regarded as an (n − 1)-dimensional smooth manifold [2, Section 2.2]. Definition 2.1 (Exponential coordinate system). The exponential coordinate θ = (θ1 , . . . , θn−1 ) ∈ Rn−1 of p ∈ ∆n is given by (2.1) θi = log pi , pn i = 1, . . . , n − 1. We denote this map by θ : ∆n → Rn−1 . By convention we set θn ≡ 0. The inverse transformation p := θ −1 is given by pi = pi (θ) = eθi −ψ(θ) , 1 ≤ i ≤ n,   P Pn θi  θi = log where ψ(θ) = log 1 + n−1 as defined in (1.7). i=1 e i=1 e (2.2) 8 S. PAL AND T.-K. L. WONG The exponential coordinate system is the first of several coordinate systems we will introduce on the simplex. By changing coordinate systems, any function on ∆n can be expressed as a function on Rn−1 and vice versa. Explicitly, a function ϕ on ∆n can be expressed in exponential coordinates by θ 7→ ϕ(p(θ)). To simplify the notations, we simply write ϕ(p) ϕ(θ) dePor n pending on the coordinate system used. For example, P if ϕ(p) = i=1 πi log pi is the cross entropy where π ∈ ∆n , then ϕ(θ) = n−1 i=1 πi θi − ψ(θ). 2.2. The transport problem. We refer the reader to the books [4, 51] for introductions to optimal transport and its interplay with analysis, probability and geometry. Let X = Y = Rn−1 be equipped with the standard Euclidean metric and topology. Let P and Q be Borel probability measures on X and Y respectively. By a coupling of P and Q we mean a Borel probability measure R on X × Y whose marginals are P and Q respectively. Let Π(P, Q) be the set of all couplings of P and Q. This set is always non-empty as it contains the product measure P ⊗ Q. Given P and Q we consider the Monge-Kantorovich optimal transport problem with cost c defined by (1.7): (2.3) inf R∈Π(P,Q) E [c(θ, φ)] . Here the expectation is taken under the probability measure R under which the random element (θ, φ) has distribution R. If an optimal coupling takes the form (θ, F (θ)) for some measurable map F : X → Y, we say that F is a Monge transport map. In general, we may consider the optimal transport problem (2.3) with c replaced by a general cost function denoted by C(·, ·) and X , Y are general Polish spaces. The classical example is where X = Y and C is a power of the underlying metric: C(x, y) = d(x, y)α (especially α = 1 and 2). For these costs rich and delicate theories have been developed on Euclidean spaces, Riemannian manifolds and geodesic metric measure spaces. However, we consider the cost function c defined by (1.7). Remark 2.2. The cost function n−1 e c(θ, φ) := log 1 1 X θi −φi + e n n i=1 ! − n−1 X i=1 1 (θi − φi ) n differs from c(·, ·) in a linear term which plays no role in optimal transport. Thus we may consider e c instead. The advantage of e c is that it is non-negative and, by Jensen’s inequality, equals zero if and only if θ = φ. To be consistent with the notations in [45] we will use the cost function c in this paper. EXPONENTIALLY CONCAVE FUNCTIONS 9 Definition 2.3 (c-cyclical monotonicity). A non-empty subset A ⊂ X × Y is c-cyclical monotone if and only if it satisfies the following property. For any finite collection {(θj , φj )}m j=1 in A and any permutation σ of the set {1, 2, . . . , m}, we have (2.4) n X c(θj , φj ) ≤ j=1 m X c(θj , φσ(j) ). j=1 It is well known that c-cyclical monotonicity is, under mild technical conditions, a necessary and sufficient solution criteria of the general optimal transport problem (see [4, Chapter 1]). In particular, a coupling R of (P, Q) is optimal if and only if the support of R is c-cyclical monotone. 2.3. Functionally generated portfolio. At this point it is convenient to introduce the concept of functionally generated portfolio. Although it is possible to present the theory without reference to finance-motivated concepts, we stress that the portfolio map gives an additional structure to the transport problem not found in other cases. Also, the main examples of the theory as well as the key quantities (such as the induced Riemannian metric) are best expressed in terms of portfolios. Mathematically, the portfolio can be regarded as a normalized gradient of ϕ. In Section 5.4 we apply our information geometry to functionally generated portfolios. Functionally generated portfolio was introduced in [23] and the following refined definition is taken from [45]. Definition 2.4 (Functionally generated portfolio). By a portfolio map we mean a function π : ∆n → ∆n . Let ϕ : ∆n → R be exponentially concave. We say that a portfolio map π : ∆n → ∆n is generated by ϕ if for any p, q ∈ ∆n we have (2.5) n X i=1 π i (p) qi ≥ eϕ(q)−ϕ(p) . pi We call ϕ the log generating function of π and Φ := eϕ (which is positive and concave) the generating function. It is known that ϕ is unique (for a given π) up to an additive constant. If ϕ is differentiable, then π is necessarily given by (1.4). Throughout this paper we impose the following regularity conditions on the exponentially concave function ϕ. Assumption 2.5 (Regularity conditions). 10 S. PAL AND T.-K. L. WONG (i) The function ϕ is smooth (i.e., infinitely differentiable) on ∆n . (ii) The (Euclidean) Hessian of Φ = eϕ is strictly negative definite everywhere on ∆n . In particular, Φ is strictly concave. Moreover, it can be shown that the function π defined by (1.4) maps ∆n into ∆n . Let us discuss these conditions briefly. Differentiability is needed to define differential geometric structures on ∆n in terms of the derivatives of the Ldivergence. Our theory requires the L-divergence T (· | ·) to be three times continuously differentiable, and for convenience we simply assume that ϕ is smooth. Strict concavity guarantees that the L-divergence is non-degenerate, i.e., T (q | p) = 0 only if q = p, and strict positive definiteness of the Hessian implies that the induced Riemannian metric is non-degenerate. Henceforth we let ϕ : ∆n → R be an exponentially concave function satisfying Assumption 2.5 and let π : ∆n → ∆n given by (1.4) be the portfolio map generated by ϕ. The cost function c always refers to the one defined in (1.7), and a general cost function is denoted by C. Using (1.4), it can be shown that the L-divergence (1.3) of ϕ can be expressed in the form ! n X qi (2.6) T (q | p) = log π i (p) − (ϕ(q) − ϕ(p)) . pi i=1 Now we give several examples of functionally generated portfolios and their log generating functions. Many more examples can be found in [25, Chapter 3]. In particular, the constant-weighted portfolios play a special role and will be taken as the basic example of the theory. Example 2.6 (Examples of functionally generated portfolios). (i) (Market portfolio) The identity map π(p) ≡ p is generated by the constant function ϕ(p) ≡ 0. (Here Assumption 2.5 does not hold.) (ii) (Constant-weighted portfolio) The constant Pn map π(p) ≡ π ∈ ∆n is generated by the cross-entropy ϕ(p) = i=1 πi log pi . The special case  π = n1 , . . . , n1 is called the equal-weighted portfolio. (iii) (Diversity-weighted portfolio) Let λ ∈ (0, 1) be a fixed parameter. Consider the portfolio map π : ∆n → ∆n defined by pλ π i (p) = Pn i λ j=1 pj , i = 1, . . . , n. It can be shown that the generating function is ϕ(p) = 1 λ log P n λ j=1 pj  . EXPONENTIALLY CONCAVE FUNCTIONS 11 (iv) (Convex combinations) It is known that the set of functionally generated portfolios is convex. Indeed, let π (1) be generated by ϕ(1) and π (2) be generated by ϕ(2) . Then for λ ∈ (0, 1), the portfolio map π = (1−λ)π (1) +λπ (2) is generated by ϕ = (1−λ)ϕ(1) +λϕ(2) . Its gen1−λ (2) λ . erating function Φ = eϕ is then the geometric mean Φ(1) Φ This fact was used in [53, 54] to formulate and study nonparametric estimation of functionally generated portfolio. The following result is taken from [45]. Proposition 2.7. For any portfolio map π : ∆n → ∆n the following statements are equivalent. (i) There exists an exponentially concave function ϕ on ∆n which generates π in the sense of (2.5). (ii) The portfolio map is multiplicatively cyclical monotone (MCM) in the following sense: for any sequence {µ(t)}m+1 t=0 in ∆n satisfying µ(m + 1) = µ(0), we have ! m n Y X µi (t + 1) π i (µ(t)) ≥ 1. µi (t) t=0 i=1 (iii) Define a map θ 7→ φ by (2.7) φi = θi − log π i (θ) , π n (θ) i = 1, . . . , n − 1. Here π is regarded as a function of the exponential coordinate. In words, we define φ in such a way that the exponential coordinate of π(θ) is θ − φ. Then the graph of this map is c-cyclical monotone. Using this result, we showed in [45] how the optimal transport problem (2.3) can be solved in terms of functionally generated portfolios. Here is a simple but interesting explicit example which is a direct generalization of the one-dimensional case treated in [45, Section 4]. Example 2.8 (Product of Gaussian distributions). In the transport problem (2.3), let P be a product of one-dimensional Gaussian distributions: n−1 O P = N (ai , σi2 ), i=1 12 S. PAL AND T.-K. L. WONG where ai ∈ R and σi > 0. Also let Q= n−1 O N (bi , (1 − λ)σi2 ), i=1 where bi ∈ R and 0 < λ < 1. Then the optimal transport map for the measures P and Q is given by the map (2.7), where the portfolio map π is the following variant of the diversity-weighted portfolio discussed in Example 2.6(iii):   n λ X 1 wi p (2.8) π i (p) = Pn i λ , ϕ(p) = log  wj pλj  , λ w p j j=1 j j=1 where the coefficients wi are chosen such that (1 − λ)ai − log wwni = bi for all i. 3. Optimal transport and duality. 3.1. c-concavity and duality. Now we make use of the notion of c-concavity in optimal transport theory. The definitions we use are standard and can be found in [4, Chapter 1]. Again, c refers to our cost function (1.7). Also recall that X = Rn−1 and Y = Rn−1 are the underlying spaces of the variables θ and φ respectively. For f : X → R ∪ {±∞} we define its c-transform by f ∗ (φ) := inf (c(θ, φ) − f (θ)) , θ∈X φ ∈ Y. Similarly, the c-transform of a function g : Y → R ∪ {±∞} is defined by g ∗ (θ) := inf (c(θ, φ) − g(φ)) , φ∈Y θ ∈ X. We say that f : X → R∪{−∞} is c-concave if there exists g : Y → R∪{−∞} such that f = g ∗ (similar for c-concave functions on Y). A function h (on X or Y) is c-concave if and only if h∗∗ = h. If f : X → R ∪ {−∞} is c-concave, its c-superdifferential is defined by (3.1) ∂ c f := {(θ, φ) ∈ X × Y : f (θ) + f ∗ (φ) = c(θ, φ)} . For θ ∈ X we define ∂ c f (θ) := {φ ∈ Y : (θ, φ) ∈ ∂ c f }. If this set is a singleton {φ}, we call φ the c-supergradient of f at θ and write φ = ∇c f (θ). Similar definitions hold for a c-concave function g on Y. 13 EXPONENTIALLY CONCAVE FUNCTIONS Let f : X → R ∪ {−∞} be c-concave. By definition of f ∗ , we have (3.2) f (θ) + f ∗ (φ) ≤ c(θ, φ) for every pair (θ, φ) ∈ X × Y, and equality holds in (3.2) if and only if (θ, φ) ∈ ∂ c f . This is a generalized version of Fenchel’s identity (see [46, Section 12]) and will be used frequently in this paper. Our first lemma relates exponential concavity on ∆n with c-concavity on X and on Y. Note that the cost function is asymmetric, and c-concavity on X is equivalent to c-concavity on Y after a change of variable. Lemma 3.1 (Exponential concavity and c-concavity). R ∪ {−∞} the following statements are equivalent. For ϕ : ∆n → (i) ϕ is exponentially concave on ∆n . (ii) The function f : X → R ∪ {−∞} defined by f (θ) = ϕ(p(θ)) + ψ(θ) is c-concave on X . (iii) The function g : Y → R ∪ {−∞} defined by g(φ) = ϕ(p(−φ)) + ψ(−φ), where −φ is the exponential coordinate, is c-concave on Y. Proof. We prove the implication (i) ⇒ (ii) and the others can be proved similarly. Suppose (i) holds and consider the non-negative concave function Φ = eϕ on ∆n . By [46, Theorem 10.3], we can extend Φ continuously up to ∆n , the closure of ∆n in Rn . We further extend Φ to the affine hull H of ∆n in Rn by setting Φ(p) = −∞ for p ∈ / ∆n . The extended function Φ is then a closed concave function on H. By convex duality (see [46, Theorem 12.1]), there exists a family C of affine functions on H such that (3.3) Φ(p) = inf `(p), `∈C p ∈ ∆n . Since Φ is non-negative on ∆n , each ` ∈ C is non-negative on ∆n . Replacing ` by the sequence `k = `+ k1 , k ≥ 1, we may assume without loss of generality that each ` ∈P C is strictly positive on ∆n . We parameterize each ` ∈ C in the form `(p) = ni=1 ai pi where a1 , . . . , an are positive constants. (Note that an extra constant term is not required since p1 + · · · + pn = 1.) Writing 14 S. PAL AND T.-K. L. WONG φi := − log aani , i = 1, . . . , n − 1 and switching to exponential coordinates, we have ! n X log `(p) = log ai p i i=1 = log 1 + = log 1 + n−1 X i=1 n−1 X ai p i an pn ! + log pn + log an ! eθi −φi − ψ(θ) + log an i=1 = c(θ − φ) − ψ(θ) + log an , It follows from (3.3) that (3.4) f (θ) = ϕ(θ) + ψ(θ) = inf (c(θ − φ) + log an ) . `∈C Define h : Y → R ∪ {−∞} by setting ( ) n X ai h(φ) = inf − log an : ∃ `(p) = ai pi ∈ C s.t. φi = − log ∀i , an i=1 where the infimum of the empty set is −∞. From (3.4), we have f (θ) = inf (c(θ − φ) − h(φ)) = h∗ (θ) φ∈Y which shows that f is c-concave on X . The following is the c-concave analogue of the classical Legendre transformation [46]. Its proof is standard but lengthy and will be given in the Appendix. Theorem 3.2 (c-Legendre transformation). Let ϕ be an exponentially concave function ϕ satisfying Assumption 2.5, and let π, defined by (1.4), be the portfolio map generated by ϕ. Given ϕ, consider the c-concave function (3.5) f (θ) := ϕ(θ) + ψ(θ) defined on X = Rn−1 via the exponential coordinate system. (i) The c-supergradient of f is given by (2.7), i.e.,   π i (θ) c (3.6) ∇ f (θ) = θi − log , π n (θ) 1≤i≤n−1 Moreover, the map ∇c f : X → Y is injective. θ ∈ X. EXPONENTIALLY CONCAVE FUNCTIONS primal Euclidean dual Euclidean p∗ ∆n θ 15 ∆n p p ◦ −Id φ −θ ∇c f X =R Y 0 ⊂ Rn−1 n−1 primal exponential ∇c f ∗ dual exponential Fig 2. Coordinate systems on ∆n . (ii) Let Y 0 ⊂ Y be the range of ∇c f . Then the c-supergradient of f ∗ is given on Y 0 by ∇c f ∗ (φ) = (∇c f )−1 (φ), φ ∈ Y 0. In fact, the map ∇c f is a diffeomorphism from X to Y 0 whose inverse is ∇c f ∗ . Also, the function f ∗ is smooth on the open set Y 0 . Although Y 0 is in general a strict subset of Y, by Theorem 3.2 the dual variable φ = ∇c f (θ) defines a global coordinate system of the manifold ∆n . In Theorem 5.1 we will use another coordinate system on ∆n called the dual Euclidean coordinate system. Thus we have four coordinate systems on ∆n : Euclidean, primal, dual and dual Euclidean (see Definition 3.3). In the following we will frequently switch between coordinate systems to facilitate computations. To avoid confusions let us state once for all the conventions used. We let ϕ and f = ϕ + ψ be given. Definition 3.3 (Coordinate systems). by (1.1)) we call the identity map p = (p1 , . . . , pn ), For the unit simplex ∆n (defined pi > 0, n X pi = 1 i=1 the (primal) Euclidean coordinate system with range ∆n . We let   p1 pn−1 θ = θ(p) = log , . . . , log pn pn be the primal (exponential) coordinate system with range X and φ = φ(p) := ∇c f (θ) 16 S. PAL AND T.-K. L. WONG be the dual (exponential) coordinate system with range Y 0 . The dual Euclidean coordinate system is defined by the composition p∗ = p∗ (p) := p(−φ(p)). See Figure 2 for an illustration. From now on p, p∗ , θ and φ always represent the same point of ∆n . In particular, unless otherwise specified θ and φ are dual to each other in the sense that φ = ∇c f (θ). By convention we let θn = φn = 0 for any p ∈ ∆n . Notation 3.4 (Switching coordinate systems). We identify the spaces ∆n , X and Y 0 using the coordinate systems in Definition 3.3. If h is a function on any one of these spaces, we write h(p) = h(θ) = h(φ) = h(p∗ ) depending on the coordinate system used. We also record a useful fact. A formula analogous to the first statement is derived in [49]. Lemma 3.5. For 1 ≤ i ≤ n − 1, we have ∂ f (θ) = π i (θ), θ ∈ X , ∂θi ∂ ∗ f (φ) = −π i (φ), φ ∈ Y 0 . ∂φi Proof. The first statement is derived in the proof of Theorem 3.2. The second statement can be proved by differentiating f ∗ (φ) = c(θ, φ) − f (θ) (Fenchel’s identity). 3.2. c-divergence. By duality, we show that a pair of natural divergences on ∆n can be defined for the c-concave functions f and f ∗ . Moreover, they coincide with L-divergence. Clearly we can consider other cost functions C other than c. When C is the squared Euclidean distance, the analogue of Definition 3.6 below gives the classical Bregman divergence. This covers both L-divergence and Bregman divergence under the same framework. To the best of our knowledge these definitions, which depend crucially on the interplay between transport and divergence, are new. We will use the triple representation (p, θ, φ) for each point in ∆n . Definition 3.6 (c-divergence). Consider the c-concave function f defined by (3.5) and its c-transform f ∗ . 17 EXPONENTIALLY CONCAVE FUNCTIONS (i) The c-divergence of f is defined by  (3.7) D p | p0 = c(θ, φ0 ) − c(θ0 , φ0 ) − (f (θ) − f (θ0 )), (ii) The c-divergence of f ∗ is defined by  (3.8) D∗ p | p0 = c(θ0 , φ) − c(θ0 , φ0 ) − (f ∗ (φ) − f ∗ (φ0 )), p, p0 ∈ ∆n . p, p0 ∈ ∆n . From Fenchel’s identity (3.2) we see that D and D∗ are non-negative and non-degnereate, i.e., they vanish only on the diagonal of ∆n × ∆n . The following is a generalization of the self-dual expression of Bregman divergence (see [2, Theorem 1.1]). Proposition 3.7 (Self-dual expressions). We have  (3.9) D p | p0 = c(θ, φ0 ) − f (θ) − f ∗ (φ0 ),  (3.10) D∗ p | p0 = c(θ0 , φ) − f ∗ (φ) − f (θ0 ). In particular, for p, p0 ∈ ∆n we have D (p | p0 ) = D∗ (p0 | p). Proof. To prove (3.9), we use the Fenchel identity f (θ0 ) + f ∗ (φ0 ) = c(θ0 , φ0 ). Starting from (3.7), we have  D p | p0 = c(θ, φ0 ) − c(θ0 , φ0 ) − (f (θ) − f (θ0 )) = c(θ, φ0 ) − f (θ) − f ∗ (φ0 ). The proof of (3.10) is similar. Now we show that L-divergence is a c-divergence where c(θ, φ) = ψ(θ−φ). Theorem 3.8 (L-divergence as c-divergence). The c-divergence of f is the L-divergence of ϕ. Namely, for p, p0 ∈ ∆n we have   D p | p0 = T p | p0 . Proof. Using the primal-dual relation (3.6), we have !     n π (θ 0 ) X p pn θi −θi0 +log π i (θ0 ) 0 n ψ(θ − φ ) = log e = log π(p0 ) · 0 − log π n (p0 ) 0 . p pn i=1 Next, by Fenchel’s identity (see (3.2)), we have f ∗ (φ0 ) = ψ(θ0 − φ0 ) − f (θ0 ) = ψ(θ0 − φ0 ) − ϕ(θ0 ) − ψ(θ0 ). 18 S. PAL AND T.-K. L. WONG Using these identities and (2.6), we compute  D p | p0 = ψ(θ − φ0 ) − f (θ) − f ∗ (φ0 )     p 0 pn 0 = log π(p ) · 0 − log π n (p ) 0 p pn  0 0 − (ϕ(θ) + ψ(θ)) − ψ(θ − φ ) − ϕ(θ0 ) − ψ(θ0 )    p 0 = log π(p ) · 0 − ϕ(θ) − ϕ(θ0 ) p  0 =T p|p . For computations it is convenient to express T (p | p0 ) solely in terms of either the primal or dual coordinates. We omit the details of the computations. Lemma 3.9 (Coordinate representations). For p, p0 ∈ ∆n we have ! n X   0 θ` −θ`0 0 π ` (θ )e − f (θ) − f (θ0 ) , T p | p = log `=1  T p | p0 = log n X ! φ` −φ0` π ` (φ)e  − f ∗ (φ0 ) − f ∗ (φ) . `=1 3.3. Transport interpretation of the generalized Pythagorean theorem. Using Proposition 3.8 we give an interesting transport interpretation of the expression (1.8) in the generalized Pythagorean theorem (Theorem 1.2). Let p, q, r ∈ ∆n be given. Let (θ(j) , φ(j) )1≤j≤3 be the primal and dual coordinates of p, q and r respectively. By Proposition 2.7, the coupling (θ, φ = ∇f c (θ)) is c-cyclical monotone. Hence coupling θ(j) with φ(j) is optimal. Consider two (suboptimal) perturbations of the optimal coupling: (i) (Cyclical perturbation) Couple θ(1) with φ(3) , θ(2) with φ(1) , and θ(3) with φ(2) . The associated cost is c(θ(1) , φ(3) ) + c(θ(2) , φ(1) ) + c(θ(3) , φ(2) ). (ii) (Transposition) Couple θ(1) with φ(3) , θ(3) with φ(1) , and keep the coupling (θ(2) , φ(2) ). The associated cost is c(θ(1) , φ(3) ) + c(θ(3) , φ(1) ) + c(θ(2) , φ(2) ). EXPONENTIALLY CONCAVE FUNCTIONS 19 Now we ask which perturbation has lower cost. The difference (i) − (ii) is c(θ(2) , φ(1) ) + c(θ(3) , φ(2) ) − c(θ(3) , φ(1) ) − c(θ(2) , φ(2) ). By Proposition 3.8, this is nothing but the difference T (q | p) + T (r | q) − T (r | p). Thus the generalized Pythagorean theorem gives an information geometric characterization of the relative costs of the two perturbations. 3.4. Examples. We consider the portfolios in Example 2.6. Example 3.10 (Constant-weighted portfolio). Let π ∈ ∆n be a constantweighted portfolio. Then ϕ is the cross entropy and we have f (θ) = ϕ(θ) + ψ(θ) = n−1 X π i θi , i=1 which is an affine function on X . Its c-transform is also affine. Indeed, we have n−1 X f ∗ (φ) = πi (−φi ) + H(π), i=1 Pn where H(π) := − i=1 πi log πi is the Shannon entropy of π. For this reason we say that the constant-weighted portfolios are self-dual. The transport   π1 . map in this case is given by a translation: φ = θ − log πn , . . . , log ππn−1 n Its L-divergence (1.6) is given in primal coordinates (see Lemma 3.9) by ! n n X X  0 θ` −θ` 0 π` (θ` − θ`0 ), π` e − T p | p = log `=1 `=1 which is translation invariant. This property is equivalent to the following numéraire invariance property [44, Lemma 3.2]: for any w1 , . . . , wn > 0, we have T (q | p) = T (e q | pe) under the mapping   wi p i p 7→ pe = . w1 p1 + · · · + wn pn 1≤i≤n In fact, it is not difficult to show that this property characterizes the constantweighted portfolios among L-divergences of exponentially concave functions. Also see [44, Proposition 4.6] for a chain rule analogous to that of relative entropy. 20 S. PAL AND T.-K. L. WONG We have f (θ) = λ1 ψ(λθ). Example 3.11 (Diversity-weighted portfolio). Since π i (θ) = λθi , log π n (θ) the map θ 7→ φ is a scaling: φ = (1 − λ)θ. For the generalized diversityweighted portfolio in Example 2.8 the transport map θ 7→ φ is the composition of a scaling and a translation. 4. Geometric structure induced by L-divergence. In this section we derive the geometric structure induced by a given L-divergence T (· | ·). As always we impose the regularity conditions in Assumption 2.5. Using the primal and dual coordinate systems (Definition 3.3), we compute explicitly the Riemannian metric g, the primal connection ∇ (not to be confused with the Euclidean gradient) and the dual connection ∇∗ . We call (g, ∇, ∇∗ ) the induced geometric structure. An important fact in information geometry is that the Levi-Civita connection ∇(0) is not necessarily the right one to use. Nevertheless, by duality we always have ∇(0) = 12 (∇ + ∇∗ ). 4.1. Preliminaries. For differential geometric concepts such as Riemannian metric and affine connection we refer the reader to [2, Chapters 5] whose notations are consistent with ours. For computational convenience we define the geometric structure in terms of coordinate representations. The geometric structure is determined by the L-divergence T (· | ·) and is independent of the choice of coordinates; for intrinsic formulations we refer the reader to [13, Chapter 11]. The following definition (which makes sense for a general divergence on a manifold) is taken from [2, Section 6.2]. Definition 4.1 (Induced geometric structure). Given a coordinate system ξ = (ξ1 , . . . , ξn−1 ) of ∆n , the coefficients of the geometric structure (g, ∇, ∇∗ ) are given as follows. (i) The Riemannian metric is given by (4.1) gij (ξ) = −  ∂ ∂ T ξ | ξ0 0 ∂ξi ∂ξj i, j = 1, . . . , n − 1. , ξ=ξ 0 By Assumption 2.5 the matrix (gij (ξ)) is strictly positive definite. The Riemannian inner product and length are denoted by h·, ·i and k · k respectively. (ii) The primal connection is given by (4.2) Γijk (ξ) = −  ∂ ∂ ∂ T ξ | ξ0 0 ∂ξi ∂ξj ∂ξk , ξ=ξ 0 i, j, k = 1, . . . , n − 1. 21 EXPONENTIALLY CONCAVE FUNCTIONS (iii) The dual connection is given by (4.3) Γ∗ijk (ξ) = −  ∂ ∂ ∂ T ξ | ξ0 0 0 ∂ξk ∂ξi ∂ξj , i, j, k = 1, . . . , n − 1. ξ=ξ 0 For a general divergence the above definitions were first introduced in [19, 20]. If we define the dual divergence by T ∗ (p | p0 ) := T (p0 | p), the dual connection of T is the primal connection of T ∗ . The primal and dual connections are dual to each other with respect to the Riemannian metric g (see [2, Theorem 6.2]). While any divergence induces a geometric structure, it may not enjoy nice properties. For the geometric structure induced by a Bregman divergence, it can be shown that the Riemann-Christoffel curvatures of the primal and dual connections both vanish. Thus we say that the induced geometry is dually flat [2, Chapter 1]. We will show that L-divergence gives rise to a different geometry with many interesting properties. 4.2. Notations. We begin by clarifying the notations. Following our convention (see Notation 3.4), we write T (p | p0 ) = T (θ | θ0 ) = T (φ | φ0 ) depending on the coordinate system used. The primal and dual coordinate representations have been computed in Lemma 3.9. The Riemannian metric will be computed using both the primal and dual coordinate systems. To be explicit about the coordinate system we use gij (θ) ∗ (φ) for its coefficients to denote its coefficients in primal coordinates, and gij in dual coordinates: gij (θ) := −  ∂2 T θ | θ0 0 ∂θi ∂θj , ∗ gij (φ) := − θ=θ0  ∂2 T φ | φ0 0 ∂φi ∂φj . φ=φ0    ∗ (φ) are denoted by g ij (θ) The inverses of the matrices (gij (θ)) and gij  and g ∗ij (φ) respectively. The primal connection ∇ will be computed using the primal coordinate system:  ∂3 0 T θ | θ Γijk (θ) := − ∂θi ∂θj ∂θk0 , Γkij (θ) := θ=θ0 n−1 X Γijm (θ)g mk (θ). m=1 The dual connection ∇∗ will be computed using the dual coordinate system: Γ∗ijk (φ) := −  ∂3 T φ | φ0 0 0 ∂φk ∂φi ∂φj , φ=φ0 Γ∗k ij (φ) := n−1 X m=1 Γ∗ijm (φ)g ∗mk (φ). 22 S. PAL AND T.-K. L. WONG The following notations are useful. For 1 ≤ i ≤ n we define 0 (4.4) π i (θ0 )eθi −θi Πi (θ, θ ) := Pn , 0 θ` −θ`0 `=1 π ` (θ )e 0 0 Π∗i (φ, φ0 ) π i (φ)eφi −φi := Pn . φ` −φ0` `=1 π ` (φ)e As always we adopt the convention θn = θn0 = φn = φ0n = 0. Note that Πi (θ, θ0 ) involves the portfolio at θ0 (the second variable) while Π∗i (φ, φ0 ) involves the portfolio at φ (the first variable). The partial derivatives of Πi and Π∗i are given in the next lemma and can be verified by direct differentiation. We let δij be the Kronecker delta and δijk = δij δjk . Lemma 4.2 (Derivatives of Πi and Π∗i ). (i) For 1 ≤ i ≤ n and 1 ≤ j ≤ n − 1, we have  ∂Πi (θ, θ0 ) = Πi (θ, θ0 ) δij − Πj (θ, θ0 ) , ∂θj  ∂Πi (θ, θ0 ) = −Πi (θ, θ0 ) δij − Πj (θ, θ0 ) 0 ∂θj 0 + Πi (θ, θ ) ! n X 1 ∂π i 0 1 ∂π ` 0 0 Π` (θ, θ ) (θ ) − (θ ) . π i (θ0 ) ∂θj0 π ` (θ0 ) ∂θj0 `=1 (ii) For 1 ≤ i ≤ n and 1 ≤ j ≤ n − 1, we have ∂Π∗i (φ, φ0 ) = Π∗i (φ, φ0 )(δij − Π∗j (φ, φ0 )) ∂φj + Π∗i (φ, φ0 ) ! n X 1 ∂π ` 1 ∂π i 0 ∗ (φ) − Π` (φ, φ ) (φ) , π i (φ) ∂φj π ` (φ) ∂φj `=1 ∂Πi (φ, φ0 ) = −Π∗i (φ, φ0 )(δij − Π∗j (φ, φ0 )). ∂φ0j We P also note the following easy fact which is used several times below. P P SinceP ni=1 Πi (θ, θ0 ) ≡ ni=1 Π∗i (φ, φ0 ) ≡ 1, the partial derivatives of i Πi and i Π∗i are all zero. Lemma 4.3 (Derviatives of π(·)). For 1 ≤ i ≤ n and 1 ≤ j ≤ n − 1, we EXPONENTIALLY CONCAVE FUNCTIONS 23 have (4.5) ∂π i (θ) = π i (θ)(δij − π j (θ)) − π i (θ) ∂θj ! n−1 X ∂φi ∂φ` (θ) − (θ) , π ` (θ) ∂θj ∂θj ∂π i (φ) = −π i (φ)(δij − π j (φ)) + π i (φ) ∂φj `=1 n−1 X ∂θi (φ) − ∂φj `=1 ! ∂θ` (φ) . π ` (φ) ∂φj Proof. We prove the second formula and the proof of the first is similar. Using (2.7), we write eθi −φi π i (φ) = Pn θ` −φ` `=1 e and regard θ as a function of φ (recall that θn = φn = 0). Then     θi −φi ∂θi (φ) − δ n e X ij ∂φ ∂π i eθi −φi ∂θ` j θ` −φ` Pn − e (φ) = (φ) − δ P `j 2 θ` −φ` ∂φj ∂φj ( n`=1 eθ` −φ` ) `=1 `=1 e ! n−1 X ∂θ` ∂θi π ` (φ) (φ) − (φ) . = −π i (φ)(δij − π j (φ)) + π i (φ) ∂φj ∂φj `=1 Note that the nth term of the sum is omitted because θn = 0. Thanks to these formulas, computations in the primal and dual coordinates are very similar except for a change of sign. In the following we will often give details for one coordinate system and leave the other one to the reader.   ∂φi Last but not least, let ∂φ (θ) = (θ) be the Jacobian of the change of ∂θ ∂θj   ∂θi ∂θ coordinate map θ 7→ φ. Similarly, we let ∂φ (φ) = ∂φ (φ) be the Jacobian j of the inverse map φ 7→ θ. The two Jacobians are inverses of each other, i.e., (4.6) ∂φ ∂θ (θ) (φ) = I, ∂θ ∂φ where I is the identity matrix. We denote the transpose of a matrix A by A> . 4.3. Riemannian metric. For intuition, we first compute the Riemannian inner product using Euclidean coordinates. We let Tp ∆n be the tangent space at p. 24 S. PAL AND T.-K. L. WONG Proposition 4.4. Let u, v ∈ Tp ∆n be represented in Euclidean coordinates, i.e., u = (u1 , . . . , un ) ∈ Rn and u1 + · · · + un = 0, and similarly for v. Then   hu, vi = u> −Hess ϕ(p) − ∇ϕ(p)∇ϕ(p)> v   (4.7) −1 > =u Hess Φ(p) v, Φ(p) where Φ = eϕ . Proof. By [13, Proposition 11.3.1] we have kvk2 = where d2 T dt2 (p + tv | p) t=0 , T (p + tv | p) = log (1 + t∇ϕ(p) · v) − (ϕ(p + tv) − ϕ(p)) . Differentiating two times and setting t = 0 gives the first equality in (4.7) when u = v, and polarizing gives the general case. The second equality follows from the chain rule. Theorem 4.5 (Riemannian metric). (i) Under the primal coordinate system, the Riemannian metric is given by (4.8) gij (θ) = π i (θ)(δij − π j (θ)) − ∂π i (θ). ∂θj Its inverse is given by n−1 (4.9) g ij (θ) = 1 ∂θi 1 X ∂θi (φ). (φ) + π j (θ) ∂φj π n (θ) ∂φ` `=1 (ii) Under the dual coordinate system, the Riemannian metric is given by (4.10) ∗ gij (φ) = π i (φ)(δij − π j (φ)) + ∂π i (φ). ∂φj Its inverse is given by n−1 (4.11) g ∗ij (φ) = 1 ∂φi 1 X ∂φi (θ) + (θ). π j (φ) ∂θj π n (φ) ∂θ` `=1 EXPONENTIALLY CONCAVE FUNCTIONS 25 Proof. (i) By Lemma 3.9 and Lemma 4.2, we compute (4.12) (4.13)  ∂ T θ | θ0 = Πi (θ, θ0 ) − π i (θ), ∂θi n X  ∂ 1 ∂π ` 0 0 0 0 T θ | θ = −Π (θ, θ ) + π (θ ) + (θ ). Π` (θ, θ0 ) i i 0 ∂θi π ` (θ0 ) ∂θi0 `=1 Differentiating (4.12) with respect to θj0 , we have (4.14)   ∂2 T θ | θ0 = −Πi (θ, θ0 ) δij − Πj (θ, θ0 ) 0 ∂θi ∂θj 0 + Πi (θ, θ ) ! n X 1 ∂π i 0 1 ∂π ` 0 0 (θ ) − Π` (θ, θ ) (θ ) . π i (θ0 ) ∂θj0 π ` (θ0 ) ∂θj0 `=1 i Setting θ = θ0 , we get gij (θ) = π i (θ)(δij − π j (θ)) − ∂π ∂θj (θ). By Lemma 4.3, we have the alternative expression ! n−1 X ∂φ` ∂φi (θ) − π ` (θ) (θ) . (4.15) gij (θ) = π i (θ) ∂θj ∂θj `=1 Expressing (4.15) in matrix form, we have (4.16) (gij (θ)) = diag(π(θ))(I − 1π > (θ)) ∂φ (θ), ∂θ where here π(θ) = (π 1 (θ), . . . , π n−1 (θ))> , 1 = 1n−1 = (1, . . . , 1)> and I = In−1 is the identity matrix. To invert (4.16) we use the fact that (I − 1π > (θ))−1 = I + 1π > (θ) . π n (θ) This can be verified directly or seen as a special case of the ShermanMorrison formula. Using (4.6), we have      ∂θ 1π > (θ) 1 ij g (θ) = (φ) I + diag . ∂φ π n (θ) π(θ) Now (4.9) follows by expanding the matrix product. 26 S. PAL AND T.-K. L. WONG (ii) The proofs of (4.10) and (4.11) follow the same lines. For later use we record the following formulas: n (4.17) X 1 ∂π `  ∂ T φ | φ0 = Π∗i (φ, φ0 ) − π i (φ) + (φ)Π∗` (φ, φ0 ), ∂φi π ` (φ) ∂φi (4.18) ∂ T φ | φ = −Π∗i (φ, φ0 ) + π i (φ0 ), ∂φ0i `=1  0 (4.19)  ∂2 T φ | φ0 = −Π∗j (φ, φ0 )(δij − Π∗i (φ, φ0 )) 0 ∂φi ∂φj − Π∗j (φ, φ0 ) ! n X 1 ∂π j 1 ∂π ` (φ) − (φ)Π∗` (φ, φ0 ) . π j (φ) ∂φi π ` (φ) ∂φi `=1 Remark 4.6. (4.20) By Lemma 3.5 we have ∂π j ∂π i ∂2 (θ) = f (θ) = (θ). ∂θj ∂θi ∂θj ∂θi Thus the right hand side of (4.8) is symmetric in i and j despite its ap∂π j i pearence. Similarly, we have ∂π ∂φj = ∂φi . 4.4. Primal and dual connections. Theorem 4.7 (Primal and dual connections). (i) Under the primal coordinate system, the coefficients of the primal connection ∇ is given by (4.21) (4.22) Γijk (θ) = δij gik (θ) − π i (θ)gjk (θ) − π j (θ)gik (θ), Γkij (θ) = δijk − δik π j (θ) − δjk π i (θ). (ii) Under the dual coordinate system, the coefficients of the dual connection ∇∗ is given by (4.23) (4.24) ∗ ∗ ∗ Γ∗ijk (φ) = −δij gik (φ) + π i (φ)gjk (φ) + π j (φ)gik (φ), Γ∗k ij (φ) = −δijk + δik π j (φ) + δjk π i (φ). EXPONENTIALLY CONCAVE FUNCTIONS 27 Proof. We prove (ii) and leave (i) to the reader. By (4.19), we have  ∂2 T φ | φ0 = −Π∗i (φ, φ0 )(δik − Π∗k (φ, φ0 )) 0 ∂φk ∂φi − Π∗i (φ, φ0 ) ! n X 1 ∂π i 1 ∂π ` (φ) − (φ)Π` (φ, φ0 ) . π i (φ) ∂φk π ` (φ) ∂φk `=1 For notational convenience we momentarily suppress φ and φ0 in the computation (later we will do so without comment). Differentiating one more time, we have  ∂3 T φ | φ0 0 0 ∂φk ∂φi ∂φj = −δik ∗ ∗ ∂Π∗i ∗ ∂Πk ∗ ∂Πi + Π + Π i k ∂φ0j ∂φ0j ∂φ0j n ∂Π∗i − ∂φ0j = 1 ∂π i X 1 ∂π ` ∗ − Π π i ∂φk π ` ∂φk ` δik Π∗i (δij − Π∗j ) − `=1 Π∗i Π∗k (δjk − ! Π∗j ) n X 1 ∂π ` ∂Π∗` + Πi π ` ∂φk ∂φ0j − `=1 ∗ ∗ Πk Πi (δij n + Π∗i (δij − Π∗j ) 1 ∂π i X 1 ∂π ` ∗ − Π π i ∂φk π ` ∂φk ` ! `=1 Evaluating at φ = (4.25) φ0 − Π∗j ) − Π∗i n X 1 ∂π ` ∗ Π (δ`j − Π∗j ). π ` ∂φk ` `=1 and simplifying, we get Γ∗ijk (φ) = −δijk π i − 2π i π j π k + δij π i π k + δjk π j π i + δki π k π j ∂π j ∂π i ∂π i − δij + πj + πi . ∂φk ∂φk ∂φk ∗ i By (4.10), we have ∂π ∂φj = gij −π i (δij −π j ). Plugging this into (4.25) and sim∗ (φ) + π (φ)g ∗ (φ) + π (φ)g ∗ (φ). Finally, ∗ plifying, we have Γijk (φ) = −δij gik j i ik jk we compute Γ∗k ij (φ) = n−1 X  ∗ ∗ ∗ −δij gim (φ) + π i (φ)gjm (φ) + π j (φ)gim (φ) g ∗mk (φ) m=0 = −δijk + δik π j (φ) + δjk π i (φ). Remark 4.8. It is interesting to note that although the connections are defined in terms of the third order derivatives of T (· | ·), the coefficients Γkij (θ) and Γ∗k ij (φ) are given in terms of the portfolio π which is a normalized gradient of ϕ. 28 S. PAL AND T.-K. L. WONG 4.5. Curvatures. It is well known (see [2, Chapter 1]) that the induced geometric structure of any Bregman divergence is dually flat. This is not the case for the geometry of L-divergence whenever n ≥ 3 (when n = 2 the simplex ∆2 is one-dimensional). To verify this we compute the RiemannChristoffel curvature tensors of the primal and dual connections. In this (and only this) subsection we adopt the Einstein summation notation (see [2, p.20]) to avoid writing a lot of summation signs. The Riemann-Christoffel (RC) curvature tensor of a connection ∇ is defined for smooth vector fields X, Y and Z by R(X, Y )Z = ∇X (∇Y Z) − ∇Y (∇X Z) − ∇[X,Y ] Z, where [X, Y ] is the Lie bracket. Given a coordinate system ξ, its coefficients   P ` ∂ ∂ ∂ ∂ ` are given by Rijk which satisfy R ∂ξi , ∂ξj ∂ξk = ` Rijk ∂ξ` . By [2, (5.66)], we have ∂ ` ∂ ` ` ` m Rijk = Γjk − Γ + Γ`im Γm jk − Γjm Γik . ∂θi ∂θj ik Theorem 4.9 (Primal and dual Riemann-Christoffel curvatures). Let R and R∗ be the RC curvature tensors of the primal and dual connections respectively. (i) In primal coordinates, the coefficients of R are given by (4.26) ` Rijk (θ) = δ`j gik (θ) − δ`i gjk (θ). (ii) In dual coordinates, the coefficients of R∗ are given by (4.27) ∗` ∗ ∗ Rijk (φ) = δ`j gik (φ) − δ`i gjk (φ). In particular, for n ≥ 3 both R and R∗ are nonzero everywhere on ∆n . Proof. We prove the statements for R. Using (4.21) and suppressing the argument, we have ∂π j ∂ ` ∂π k Γ = −δ`j − δ`k , ∂θi jk ∂θi ∂θi ∂ ` ∂π k ∂π i Γ = −δ`i − δ`k . ∂θj ik ∂θj ∂θj From (4.20) it follows that (4.28) ∂ ` ∂ ` ∂π k ∂π k Γjk − Γik = −δ`j + δ`i . ∂θi ∂θj ∂θi ∂θj Next we compute (with some work) (4.29) ` m Γ`im Γm jk − Γjm Γik = −δ`i δjk π j + δ`j δik π i + δ`i π j π k − δ`j π i π k . EXPONENTIALLY CONCAVE FUNCTIONS 29 Combining (4.28) and (4.29), we have ∂π k ∂π k ` + δ`i − δ`i δjk π j + δ`j δik π i + δ`i π j π k − δ`j π i π k Rijk (θ) = −δ`j ∂θi ∂θj     ∂π k ∂π k = δ`j δik π i − π i π k − − δ`i δjk π j − π j π k − ∂θi ∂θj = δ`j gik − δ`i gjk . To see that R does not vanish for n ≥ 3, suppose on the contrary that ` (θ) = δ g (θ) − δ g (θ) = 0 for all values of i, j, k, `. R(θ) = 0. Then Rijk `j ik `i jk Fix i and k. Letting ` = j, we have gik (θ) = δij gjk (θ). Next let j 6= i (here we need dim ∆n = n − 1 ≥ 2). Then we get gik (θ) = 0. Since i and k are arbitrary, we have g(θ) = 0 which is a contradiction. We end this section by showing that the primal and dual connections have constant sectional curvature −1. See [13, Definition 7.10.5] for the definition of Ricci curvature. Corollary 4.10 (Primal and dual sectional curvatures). The primal and dual connections have constant sectional curvature −1 with respect to g. In particular, the primal and dual Ricci curvatures satisfy the Einstein condition Ric = Ric∗ = −(n − 2)g. Proof. The primal connection ∇ has constant sectional curvature k with respect to g if and only if R(X, Y )Z ≡ k(hY, ZiX − hX, ZiY ) for all smooth vector fields X, Y and Z (see [13, (9.7.41)]). For the primal Riemann-Christoffel curvature tensor we have        ∂ ∂ ∂ ∂ ∂ ∂ ∂ ∂ ∂ ∂ ` R , = Rijk =− , − , , ∂θi ∂θj ∂θk ∂θ` ∂θj ∂θk ∂θi ∂θi ∂θk ∂θj which implies that the sectional curvature is k = −1. The claim for Ricci curvature follows immediately by taking trace (see for example [48, (4.31)]). The proof for the dual curvatures is the same. 5. Geodesics and generalized Pythagorean theorem. Armed with the primal and dual connections we can formulate the primal and dual geodesic equations. Their solutions are the primal and dual geodesics which will be studied in this section. The highlight of this section is the generalized Pythagorean theorem (Theorem 1.2). Along the way we will prove some remarkable properties of the geometric structure (g, ∇, ∇∗ ). 30 S. PAL AND T.-K. L. WONG 5.1. Primal and dual geodesics. Note that in Figure 1 the primal geodesic is drawn as a straight line in ∆n . We now prove that this is indeed the case. The same is true for the dual geodesic in dual Euclidean coordinates. Let γ : [0, 1] → ∆n be a smooth curve. We denote time derivatives by γ̇(t). Let θ(t) and φ(t) be the primal and dual coordinate representations of γ. We say that γ is a primal geodesic if its satisfies θ̈k (t) + n−1 X Γkij (θ(t))θ̇i (t)θ̇j (t) = 0, k = 1, . . . , n − 1. i,j=1 It is a dual geodesic if its satisfies φ̈k (t) + n−1 X Γ∗k ij (φ(t))φ̇i (t)φ̇j (t) = 0, k = 1, . . . , n − 1. i,j=1 By Theorem 4.7, the primal geodesic equation in primal coordinates is (5.1) θ̈k (t) + 2θ̇k (t) n−1 X k = 1, . . . , n − 1. π ` (θ(t))θ̇` (t) = 0, `=1 The dual geodesic equation in dual coordinates is (5.2) φ̈k (t) − 2φ̇k (t) n−1 X π ` (φ(t))φ̇` (t) = 0, k = 1, . . . , n − 1. `=1 Theorem 5.1 (Primal and dual geodesics). (i) Let γ : [0, 1] → ∆n be a primal geodesic. Then the trace of γ in ∆n is the Euclidean straight line in ∆n joining γ(0) and γ(1). (ii) Let γ ∗ : [0, 1] → ∆n be a dual geodesic. For each t, let p∗ (t) be the dual Euclidean coordinate of γ(t). Then the trace of p∗ in ∆n is the Euclidean straight line in ∆n joining p∗ (0) and p∗ (1). We will prove (i) and leave (ii) to the reader. The proof makes use of the following lemmas. Lemma 5.2. Let q, r ∈ ∆n and let θq and θr their primal coordinates respectively. Consider the differential equation (5.3) 00 0 2 h (t) − 2(h (t)) n−1 X `=1 π ` (θ(t)) θ`r − θ`q q r (1 − h(t))eθ` + h(t)eθ` = 0, 31 EXPONENTIALLY CONCAVE FUNCTIONS where θ(t) is defined by   θkq θkr (5.4) θk (t) = log (1 − h(t))e + h(t)e , k = 1, . . . , n − 1, Then there exists a unique solution h : [0, 1] → R satisfying h(0) = 0, h0 (t) > 0 for t ∈ [0, 1], and h(1) = 1. Proof. First we note that if h(t) satisfies (5.3), then for any c > 0 the map t 7→ h(ct) also does (with domain scaled by 1/c). Also, if h0 (t0 ) = 0 then h(t) = h(t0 ) for all t ≥ t0 . Let h0 (t) be a maximal solution to (5.3) defined on an interval [0, tmax ) with h0 (0) = 0 and h00 (0) > 0. Since the equation can be solved in a neighborhood of t = 0, we have tmax > 0. By the previous remark, h0 is strictly increasing on [0, tmax ). If h0 (t) hits 1 at some t = t0 < tmax , the function h(t) = h0 (t/t0 ) is a solution with the desired properties. In fact, we claim that lim h0 (t) = sup h0 (t) = M, (5.5) t↑tmax where M is defined by  M := inf s > 0 : t<tmax min (1 − s)e 1≤`≤n−1 θ`q + se θ`r q = min 1≤`≤n−1 eθ` q r eθ` − eθ`  =0 ! 1{θq >θr } + ∞ · 1{θq ≤θr } ` ` ` ` > 1. Thus as h(t) approaches M from below, at least one of the fractions in (5.3) blows up to +∞. It follows that M 0 := supt<tmax h(t) ≤ M . Suppose on the contrary that M 0 < M . Let h1 (t), t ∈ (−, ) be a solution to (5.3) satisfying h1 (0) = M 0 and h01 (0) > 0. Note that h1 exists because the fractions in (5.3) are finite and continuous near M 0 < M . Then the range of h1 contains an open interval containing M 0 . Thus there exists t0 < tmax , c > 0 and t1 < 0 d such that ct1 > −, h0 (t0 ) = h1 (ct1 ) and h00 (t0 ) = dt h1 (ct) t=t1 . This allows 0 us to extend the range of h0 beyond M which contradicts the maximality of M 0 . By the uniqueness theorem for ODE (note that (5.3) has smooth coefficients), the solution h is unique. Lemma 5.3. Let h be the solution in Lemma 5.2, and consider the curve γ : [0, 1] → ∆n given in exponential coordinates by (5.4). Then γ is a primal geodesic from q to r. Moreover, the trace of γ in ∆n is the Euclidean straight line in ∆n joining q = γ(0) and r = γ(1). 32 S. PAL AND T.-K. L. WONG Proof. That γ is a primal geodesic from q to r can be verified directly by differentiating (5.4) and plugging into the primal geodesic equation (5.1). We omit the computational details. To see that the trace of γ is a Euclidean straight line in ∆n , consider its Euclidean representation p(t) = (p1 (t), . . . , pn (t)). By (5.4) we have eψ(θ(t)) = 1 q r = (1 − h(t))eψ(θ ) + h(t)eψ(θ ) . pn (t) Solving for h(t) gives q eψ(θ(t)) − eψ(θ ) h(t) = ψ(θr ) . e − eψ(θq ) (5.6) Expressing (5.4) in Euclidean coordinates and using (5.6), we get after some algebra that r θkq  pk (t) = e pn (t) + 1 − e ψ(θq )  pn (t) q eθk − eθk , eψ(θr ) − eψ(θq ) k = 1, . . . , n − 1. Hence there exists ak , bk such that (5.7) pk (t) = ak + bk pn (t), k = 1, . . . , n − 1. Together with the identity p1 (t) + · · · + pn (t) ≡ 1, (5.7) shows that γ is a time change of the Euclidean straight line from q to r. Proof of Theorem 5.1. (i) We have shown in Lemma 5.3 that for any pair of points (q, r) in ∆n , there exists a primal geodesic from q to r which is a time-changed Euclidean straight line. It remains to observe that the geodesic is unique. Indeed, let γ be any primal geodesic. Then it solves the primal geodesic equation (5.1). Consider the initial velocity γ 0 (0). Let q = γ(0). By varying r ∈ ∆n as well as the initial speed, there exists a primal geodesic γ e inSthe form (5.4) from q to r such that γ̇(0) = γ e˙ (0). (This is because Tq ∆n = r∈∆n ,κ>0 κ(r − q).) By the uniqueness theorem of ODE we have γ(·) = γ e(·). Using the dual coordinate system φ and dual Euclidean coordinate system p∗ , (ii) can be proved in a similar way by considering the curve defined by ! 1 (5.8) φk (t) = log , k = 1, . . . , n − 1. q p (1 − h(t))e−φk + h(t)e−φk EXPONENTIALLY CONCAVE FUNCTIONS 33 A connection is projectively flat if there is a coordinate system under which the geodesics are straight lines up to time reparameterizations. We say that the geometric structure (g, ∇, ∇∗ ) is dually projectively flat if both ∇ and ∇∗ are projectively flat. In view of Theorem 5.1 we have the following corollary. Corollary 5.4. The manifold ∆n equipped with the geometric structure (g, ∇, ∇∗ ) is dually projectively flat, but is not flat for n ≥ 3. 5.2. Gradient flows and inverse exponential maps. Motivated by the recent paper [5] we relate the primal and dual geodesics with gradient flows under the L-divergence. Fix p, q, r ∈ ∆n . Consider the following gradient flows starting at q: ( γ̇(t) = −grad T (r | ·) (γ(t)) (5.9) (primal flow) γ(0) = q and (5.10) ( γ̇ ∗ (t) = −grad T (· | p) (γ ∗ (t)) γ ∗ (0) = q (dual flow) Here grad denotes the Riemannian gradient with respect to the metric g. We call (5.9) the primal flow and (5.10) the dual flow. It can be verified easily that d T (r | γ(t)) = −kγ̇(t)k2 dt and d T (γ ∗ (t) | p) = −kγ̇ ∗ (t)k2 . dt Since T (q | p) = 0 if and only if p = q, by standard ODE theory it can be shown that the solutions γ(t) and γ ∗ (t) are defined for t ∈ [0, ∞) and lim γ(t) = r, t→∞ lim γ ∗ (t) = p. t→∞ In other words, both gradient flows converge to the unique minimizers. Theorem 5.5 (Gradient flows). (i) The primal flow γ(t) is a time change of the primal geodesic from q to r. (ii) The the dual flow γ ∗ (t) is a time change of the dual geodesic from q to p. 34 S. PAL AND T.-K. L. WONG Recall the concept of exponential map. For q ∈ ∆n and v ∈ Tq ∆n , consider the primal geodesic γ starting at q with initial velocity v. If γ is defined up to time 1, we define expq (v) = γ(1). The dual exponential map exp∗ is defined analogously. As a corollary of Theorems 5.1 and 5.5 we have the following characterization of the primal and dual inverse exponential maps. Corollary 5.6 (Inverse exponential maps). Let exp and exp∗ be the exponential maps with respect to the primal and dual connections respectively. For p, q ∈ ∆n we have (i) exp−1 q (p) ∝ −grad T (p | ·) (q). −1 (ii) exp∗q (p) ∝ −grad T (· | p) (q). To prove Theorem 5.5 we begin by computing the Riemannian gradients of T (r | ·) and T (· | p). The computation is somewhat tricky and will be given in the Appendix. Recall the notations in (4.4). Lemma 5.7 (Riemannian gradients). Let p, q, r ∈ ∆n . (i) Under the primal coordinate system, we have (5.11) grad T (r | ·) (q) = n−1 X π i (θr , θq ) π n (θr , θq ) − + π i (θq ) π n (θq ) i=1 n−1 X 1 = Pn `=1 π ` (θ q )e θ`r −θ`q  ∂ ∂θiq q r −eθi −θi + 1 i=1  ∂ . ∂θiq (ii) Under the dual coordinate system, we have grad T (· | p) (q) = n−1 X i=1 (5.12) π ∗i (φq , φp ) π ∗n (φq , φp ) − π i (φq ) π n (φq ) = Pn n−1 X 1 `=1 π ` (φ q p q )eφ` −φ` q  p ∂ ∂φqi eφi −φi − 1 i=1  ∂ . ∂φqi Proof of Theorem 5.5. We prove (i) and leave (ii) to the reader. Let θ(t) be the primal representation of the primal flow starting at q. By Lemma 5.7, at any time t we have r θ̇k (t) ∝ eθk −θk (t) − 1 = 1 eθk (t)   r eθk − eθk (t) , EXPONENTIALLY CONCAVE FUNCTIONS 35 where the constant of proportionality depends on θ(t) but is independent of k. It follows that d θk (t) r (5.13) e ∝ eθk − eθk (t) , k = 1, . . . , n − 1. dt Comparing (5.13) and (5.4) we see that the primal flow is a time change of the primal geodesic. 5.3. Generalized Pythagorean theorem. Having characterized the primal and dual geodesics, we are ready to prove the generalized Pythagorean theorem. Our proof makes use of the Riemannian gradients given in Lemma 5.7. The reason is that these gradients appear to have the correct scaling which is easier to handle, as can be seen in the proof (see (5.16)). Proof of Theorem 1.2. Given p, q, r ∈ ∆n , consider the primal geodesic from q to r and the dual geodesic from q to p. Let u = −grad T (· | p) (q) (5.14) and v = −grad T (r | ·) (q). By Theorem 5.5 u and v are proportional to the initial velocities of the two geodesics. Thus, it suffices to prove that the sign of (1.8) is the same as that of hu, vi. This claim will be established by the following two lemmas. Lemma 5.8. that of The sign of T (q | p) + T (r | q) − T (r | p) is the same as 1− (5.15) n X Πk (q, p)Πk (r, q) k=1 π k (q) . Proof. By Lemma 3.9, the sign of T (q | p) + T (r | q) − T (r | p) is the same as that of  ! n n n X X X q q p p r r π i (θp )eθi −θi  π j (θq )eθj −θj  − π i (θp )eθi −θi . i=1 j=1 i=1 Rearranging, we have n X − r q q p π i (θp )(δij − π j (θq ))eθj −θj eθi −θi . i,j=1 Since scaling does not change sign, we may consider instead the quantity − n X π i (θp )(δij − π j (θq )) i,j=1 We get (5.15) by expanding. Πj (θr , θq ) Πi (θq , θp ) . π j (θq ) π i (θp ) 36 S. PAL AND T.-K. L. WONG Lemma 5.9. Then Consider the tangent vectors u and v defined by (5.14). hu, vi = 1 − (5.16) n X Πk (θq , θp )Πk (θr , θq ) π k (θq ) k=1 . Proof. For this computation we use the primal coordinate system. We have u = −grad T (· | p) (q) = − n−1 X g ik (q) ∂ q ∂ q T (· | p) (θ ) ∂θk ∂θiq g j` (q) ∂ q ∂ . q T (r | ·) (θ ) ∂θ` ∂θjq i,k=1 v = −grad T (r | ·) (q) = − n−1 X j,`=1 Using the definition of the Riemannian inner product, we compute n−1 X hu, vi = gij (q) i,j=1 n−1 X = n−1 X g ik (q)g j` (q) k,`=1 g k` (θq ) k,`=1 ∂ q ∂ T (r | ·) (θq ) q T (· | p) (θ ) ∂θk ∂θ`q ∂ q ∂ T (r | ·) (θq ). q T (· | p) (θ ) ∂θk ∂θ`q By (4.9), (4.18) and (A.6), we have n−1 k` g (q) = X ∂θ` 1 ∂θ` q 1 (φ ) + (φq ), π k (q) ∂φk π n (θq ) ∂φα α=1 ∂ T (· | p) (θq ) = Πk (θq , θp ) − π k (θq ), ∂θkq n−1 X ∂φβ ∂ q (θq ) (π β (θq ) − Πβ (θr , θq )) . q T (r | ·) (θ ) = ∂θ` ∂θ`q β=1 Claim. We have (5.17)   n−1 X δk` 1 q p q q r q hu, vi = (Πk (θ , θ ) − π k (θ ))(π ` (θ ) − Π` (θ , θ )) + . π k (θq ) π n (θq ) k,`=1 EXPONENTIALLY CONCAVE FUNCTIONS 37 To see this, write hu, vi = n−1 X (Πk (θq , θp ) − π k (θq ))(π β (θq ) − Πβ (θr , θq )) k,β=1 · n−1 X `=1 ! n−1 1 X ∂φβ q ∂θ` q 1 ∂φβ q ∂θ` q (φ ) . (θ ) (φ ) + (θ ) π k (q) ∂θ`q ∂θk π n (q) ∂φα ∂θ`q α=1 The last expression can be simplified using the identities ∂φβ q ∂θ` q (θ ) (φ ) = δβk , ∂θk ∂θ`q ∂φβ q ∂θ` q (φ ) = δαβ , (θ ) ∂φα ∂θ`q and this gives the claim. Finally, expanding and simplifying (5.17), we obtain the desired identity (5.16). With these two lemmas the proof is complete. 5.4. Application to mathematical finance. In this subsection we explain how the new information geometry can be applied to finance. For financial background and further details we refer the reader to [45]. Consider sequential investment in a stock market with n stocks. At time t = 0, 1, 2, . . ., let µ(t) ∈ ∆n be the distribution of capital in the market. Explicitly, let Xi (t) > 0 be the market capitalization of stock i. Then (5.18) µi (t) = Xi (t) X1 (t) + · · · + Xn (t) is the market weight of stock i. Let π : ∆n → ∆n be a portfolio map. It defines a self-financing investment strategy such that if the current state of the market is µ(t) = p, we distribute our capital among the stocks according to the vector π(p). For example, if π(p) = (0.4, 0.5, 0.1), we invest 40% in stock 1, 50% in stock 2, and the rest in stock 3. After each period, we perform the necessary trading such that the proportions of capitals invested are rebalanced to π(µ(t + 1)). If one chooses the identity map π(p) ≡ p, the resulting portfolio is called the market portfolio which we denote by µ. The market portfolio plays the role of benchmark. Now let π be the portfolio map generated by an exponentially concave function ϕ (Definition 2.4), and consider the value of the resulting portfolio 38 S. PAL AND T.-K. L. WONG r ● p ● r● ●● ● ● ● ●● ●● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ●● ●● ● ●● ● ● ● ● ●● ● ● ● ● ● ● ● ● ●● ● ● ● ● ●● ● ● ● ● ● ●● ●● ●● ●● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ●● ● ● ●●● ● ● ● ● ●● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ●●● ● ● ● ● ● ● ●● ● ● ● ● ●● ● ● ● ●● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ●●● ●● ● ● ● ● ● ●● ● ● ● ●● ●● ● ● ● ●● ●● ● ● ●● ● ● ● ● ● ● ● ●●● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ●● ● ●● ● ●● ● ●● ● ● ● ●● ● ● ●●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●●● ● ●●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●● ● ● ● ●●● ●● ● ●●● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ●● ●●● ● ● ● ● ● ●● ● ●● ● ●●● ● ●● ● ● ● ● ● ● ●● ●● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ●● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ●● ●● ● ● ● ● ●● ●● ● ● ●● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ●● ● ● ● ● ● ● ● ● ● ● ● ● ●●● ● ● ● ● ●● ● ●● ● ● ● ● ● ● ●● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ●● ● ● ●● ●● ●● ●● ● ● ●● ● ● ● ● ● ● ● ● ●● ●●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ●● ●● ● ● ● ● ● ●● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ●● ● ● ●● ● ●● ● ● ● ● ● ● ● ●● ●● ● ●● ● ● ●●● ● ● ●● ●● ● ● ● ● ● ●●● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●●● ● ● ● ●● ●● ● ●●● ● ● ●● ● ●● ● ● ● ●● ● ● ● ● ● ● ●● ● ● ● ● ●● ● ● ●● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ●● ● ● ● ● ●● ● ● ● ● ●● ● ● ● ● ●● ● ● ● ●● ● ● ● ● ● ● ● ●● ●● ●● ● ● ● ● ●● ●● ● ● ● ●● ● ● ● ● ● ●● ● ● ● ● ● ●● ● ● ● ● ● ● ●● ●● ● ● ● ● ● ● ● ● ●● ●● ● ● ● ● ● ●● ● ● ●● ● ● ● ● ● ● ● ● ● ●● ● ● ● ●● ●● ●● ● ●● ● ● ● ● ● ●● ● ●● ●● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ●● ●● ●●●● ● ● ● ● ● ● ●● ●● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ●● ●● ● ●● ● ●● ● ● ● ●● ● ● ● ● ● ● ● ● ●● ● ● ●● ● ●● ●● ●● ● ●● ●● ● ●● ● ●●● ● ● ● ● ●● ● ● ● ●● ● ● ● ● ● ● ●● ● ● ● ● ● ●●● ● ● ● ● ●● ● ●●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ●● ● ● ●● ● ● ●● ● ●● ● ● ● ●● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ●● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ●●● ● ● ● ●● ● ● ●● ● ● ● ●● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ●●● ●● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●●● ● ●●● ● ● ● ● ● ● ● ● ● ●● ● ●● ● ● ● ● ● ● ● ● ●●● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ●● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ●● ●● ●● ● ●● ● ● ● ●● ● ● ●● ●● ● ● ● ●●● ● ● ● ● ●● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●●● ● ● ● ● ● ● ● ● ● ● ●● ●● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ●● ● ● ● ● ●●● ● ● ● ● ●● ● ● ●●● ● ●● ● ● ● ● ● ● ●●● ● ●● ● ●● ● ● ● ● ● ● ● ● ●● ● ● ●● ● ●● ● ● ● ● ● ● ●●● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ●● ● ● ● ●● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ●● ● ●●● ●● ● ● ●● ● ● ●● ● ● ●● ● ● ●● ● ● ● ● ● ●● ● ● ● ● ● ●●●● ● ● ● ● ● ● ● ● ● ●●● ● ● ●● ●● ● ● ● ●● ●● ● ● ● ● ● ●● ●● ● ● ● ● ● ● ● ●●● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ● ● ● ● ●● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ●● ● ● ● ●● ● ●● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ● ● ● ●● ●● ● ● ● ● ● ● ● ●● ●● ● ● ● ● ● ● ● ● ● ● ●● ●● ● ● ● ● ● ● ● ●●● ● ● ● ● ●● ● ● ● ● ● ● ●● ● ● ●● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ●● ● ● ● ● ● ● ●● ●● ● ● ●●● ● ●● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ●●● ● ● ● ● ● ● ● ●●● ● ● ● ● ● ● ●●● ● ● ● ● ● ●●● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ●●● ●● ● ●●● ●●● ● ● ● ● ● ● ●● ● ● ● ● ● ●● ● ●● ● ● ● ● ● ● ●● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ●● ● ● ● ●● ● ●● ● ● ●●● ● ● ● ● ●● ●● ● ●● ● ● ● ● ● ● ● ● ●● ● ●● ● ● ● ● ● ● ● ● ● ●● ●● ● ● ● ● ● ● ●● ● ● ● ●● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ●● ● ● ● ● ● ●●● ● ● ● ● ● ● ●●● ● ● ● ● ● ● ● ● ● ●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ●● ●● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●●● ●● ● ● ● ● ●● ● ● ● ●●● ● ● ● ● ● ● ● ● ● ● ● ●●● ● ●● ● ● ● ●● ●● ●● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ●● ●● ● ● ● ● ● ●● ● ● ● ● ●●● ●● ● ●● ●●● ● ● ●●● ● ● ● ●● ●● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ●●● ● ● ●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ●● ● ● ● ●●●● ● ● ● ● ● ● ● ●●● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ●● ● ● ● ● ● ● ●● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ●●● ● ● ● ● ● ●● ●●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ●● ● ● ● ● ● ● ●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ●● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●●● ● ● ● ● ● ●● ●● ● ● ● ●● ● ●● ●●● ●● ●●● ● ● ● ● ● ●● ● ● ● ● ●● ● ●● ● ● ● ● ● ● ●● ● ● ● ● ●● ● ● ● ● ● ● ●● ●● ● ● ● ● ● ●●● ● ● ● ●● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●● ● ● ● ●● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ●● ●●● ● ● ● ● ● ●●●● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ●● ●● ● ● ● ●● ●● ● ● ● ●● ●● ●●● ● ●● ● ●● ●● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ●● ● ● ● ● ● ● ●● ● ● ● ● ● ●● ● ● ● ● ● ● ●● ● ● ● ● ● ● ●● ● ● ● ●● ●● ●●● ● ●● ● ● ● ●● ●●● ●● ● ● ● ● ●● ● ● ● ● ●●● ●● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ●●● ● ● ● ● ●● ● ● ● ●● ● ●● ● ● ● ● ● ● ●● ●● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ●●● ●● ●● ● ● ● ● ● ●● ● ●●● ● ● ●● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ●● ● ● ● ● ●● ● ● ●● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ●● ● ●● ● ●● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ●● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ● ● ● ● ● ● ● ● ● ● ●● ●●● ●● ● ● ● ● ● ● ● ● ● ● ●● ● ● ●●●● ●●● ● ● ● ●● ● ● ● ● ● ● ● ● ●●● ● ● ● ● ● ● ● ● ●● ● ● ● ● ●● ● ●● ● ●● ● ● ● ● ● ● ●● ● ●● ● ●● ● ● ● ● ●● ● ● ●● ● ● ● ● ● ● ● ● ●● ● ● ●● ● ● ● ● ● ● ●● ● ● ● ● ●●●●● ● ● ● ● ● ●● ● ● ● ● ●● ● ● ● ●● ● ● ● ●● ● ●● ●● ●● ● ● ●● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ●●● ● ● ● ● ● ● ● ● ●● ● ● ● ●● ● ● ● ●● ● ● ●● ● ●● ● ●● ● ●● ● ●● ● ● ● ● ● ● ●●● ● ●● ● ● ● ● ● ● ●● ● ●● ● ●● ● ●● ● ● ● ●● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ●● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●● ● ● ● ●●●● ● ● ●● ● ● ● ● ● ● ● ● ●●● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ●● ● ● ● ● ● ● ●● ●● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ●● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ●● ●● ● ● ● ●● ● ●● ● ●● ● ● ● ● ● ●● ●● ● ● ● ● ● ● ●● ● ● ●● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ●● ●● ● ● ● ● ● ●● ● ● ● ● ● ●● ● ● ●● ●● ● ● ● ● ●●● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ●● ● ● ● ●●● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ●● ● ● ● ● ●● ● ● ● ●●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ●● ●● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ●● ● ●● ● ● ●● ● ● ● ●● ● ● ● ● ● ● ● ● ● ●● ● ●● ● ● ● ●● ● ● ●● ● ● ● ●●● ● ● ● ● ●● ● ● ● ● ● ●● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ●● ● ●● ●● ● ● ● ● ● ● ● ● ●● ●● ● ●● ● ● ● ● ● ● ● ●● ●● ● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●●●●● ● ● ● ● ● ● ●● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ●●● ● ●● ●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ●●●● ● ● ● ● ●●● ● ● ● ●● ● ●●● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●●● ● ● ● ● ●● ● ● ● ● ● ● ● ● ●● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ●● ● ● ● ● ●●● ● ●● ●● ● ● ● ● ● ● ● ● ● ● ●●● ● ● ● ● ●●● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ●● ● ●●● ●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ●● ●● ● ● ● ● ● ● ● ●●● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ●● ● ● ●● ● ● ● ●●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●● ● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ●●● ● ● ●● ●●● ●● ● ● ●● ●● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ●●●● ●●●●● ● ●● ● ●●● ●● ●●● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ●●● ● ● ●● ● ● ● ●● ●● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ●● ● ● ● ● ● ● ● ● ● ● ●● ● ● ●● ● ● ● ● ● ● ● ● ● ●● ● ● ●● ● ●● ● ● ● ●● ●●● ● ● ●● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ● ● ●●● ●●● ● ● ●●● ● ● ● ● ●● ● ● ●● ● ● ● ●● ● ●●● ● ● ●● ● ● ● ● ● ● ● ● ●●● ● ● ● ● ● ●●●● ● ●● ● ● ● ● ● ● ● ● ● ● ●● ●● ● ● ●● ● ●● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ●● ● ● ●●● ● ● ●● ●●● ● ● ● ● ●● ● ● ● ● ●● ● ● ● ● ● ● ● ●● ●●● ● ●●●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ●●●●● ● ● ● ● ●● ● ● ● ● ●● ●●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ●● ●● ● ● ● ● ●● ●● ● ● ● ● ● ●●● ●● ● ● ● ● ● ● ●● ●● ● ● ● ● ● ●● ● ● ● ● ● ● ●●● ● ● ● ● ●●● ● ● ●● ●● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ● ●● ● ● ● ● ● ●●● ●● ● ● ● ●● ●● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ●● ● ● ●●● ● ● ●● ● ● ● ● ● ● ● ● ●●● ● ●● ● ●● ● ● ● ● ● ● ●● ● ●●● ●● ●●●● ● ● ● ● ● ● ● ● ● ●● ● ●●●● ●● ● ● ●●● ● ● ● ●● ● ● ●● ● ●● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ●●● ● ●●● ● ●● ● ● ●● ● ● ● ●● ●●●● ● ● ● ●●● ● ● ● ● ● ● ● ●● ● ●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ●● ●● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ●● ●● ● ● ● ● ● ● ●● ● ● ● ● ● ●● ● ● ● ●● ●● ●● ●● ●● ● ● ● ● ● ●● ●● ●●● ● ● ● ●● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●● ● ● ● ● ●● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ●● ●● ● ●● ●● ● ●● ● ● ● ●● ● ● ●● ● ● ● ●●● ● ● ●● ● ● ● ●●● ● ● ● ● ●● ● ●● ● ● ● ● ●● ● ● ● ●● ● ● ● ● ● ●● ● ●● ● ● ● ●● ●● ● ● ● ● ● ●●● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●● ● ●●● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ●● ● ●●●● ●● ● ● ●●● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ●●● ● ● ●● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ● ● ●● ● ● ● ● ● ● ●● ●● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●● ● ● ● ● ● ● ●●● ● ● ●● ●●● ● ● ●● ● ●● ● ●●● ● ●● ● ● ● ● ● ● ● ● ●●● ●●● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ●● ● ●● ●●● ● ●● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ●● ● ● ●● ● ● ● ● ●● ●● ● ● ● ● ● ●●● ● ● ● ● ● ● ● ●●● ● ● ● ●●● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ●● ● ●● ● ● ● ●● ● ● ● ● ● ● ● ● ● ●●● ●●● ● ● ● ●● ● ● ●●● ● ● ● ●● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ●● ● ● ● ● ●● ● ● ● ● ● ● ● ●●● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ●●● ● ● ● ● ● ●● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ●● ● ● ● ● ● ●● ● ● ● ● ● ●● ●● ● ●●● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ●●● ● ● ● ● ● ● ●● ● ● ●● ●●● ● ●● ● ● ● ●● ●●● ● ● ●● ● ●● ●● ● ● ● ●● ●● ●● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ●●● ● ● ● ●● ● ● ● ● ● ●● ● ● ●●●● ● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ●●● ●● ● ● ● ● ●● ●●●●●●● ●●● ●● ● ● ● ● ● ● ● ● ●● ● ● ● ●● ● ● ● ●● ● ● ● ● ● ●●● ● ● ●● ● ● ●● ●●● ● ● ● ● ● ● ● ● ● ● ●●● ● ●● ● ● ● ●● ●● ● ● ●● ● ● ● ● ● ● ●● ● ● ● ● ● ●● ● ●● ● ●● ● ●●● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●● ● ●●●● ● ● ● ● ● ● ●● ●● ● ●●● ● ● ● ● ● ● ● ● ● ● ● ●●●● ● ● ● ● ● ● ● ● ● ● ● ● ●●●● ●● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ●● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ●●● ● ● ● ● ●● ● ● ● ●● ● ●● ● ● ● ● ● ●● ● ● ● ●● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ●● ●●● ● ●● ● ● ●●● ●● ● ● ● ● ● ● ● ● ●● ● ● ● ●● ● ● ●●● ● ● ● ●● ● ● ● ●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●● ● ●● ● ● ●● ● ● ●● ● ● ● ●● ●●● ● ● ● ●● ●● ●● ● ● ● ●●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ●●●●● ● ● ● ● ● ● ● ● ●● ● ●● ● ● ● ● ● ● ● ● ● ●● ●● ● ● ●●●●●● ● ● ● ● ●●● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ●● ● ● ● ● ●● ● ●● ● ●● ● ● ● ● ● ● ●● ●● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ●● ●● ● ● ● ●● ● ● ● ● ●●● ● ● ● ● ● ● ● ●● ● ● ● ● ●● ●● ● ● ● ● ●● ●● ● ●●● ● ● ●●● ●● ● ● ● ● ● ● ● ●● ● ●● ● ● ●● ● ● ● ● ● ● ● ●●● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ●● ●● ● ● ● ● ● ● ●● ● ● ● ●●● ●● ● ● ● ● ● ● ● ●●●● ●● ● ● ● ● ● ● ● ●● ●●● ● ●● ● ● ● ● ● ● ●● ●● ●● ● ● ● ●● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ● ● ● ● ●● ●● ● ● ● ● ● ●● ● ● ●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ●● ● ● ● ● ●● ● ● ●●●● ● ●●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ●● ● ●● ● ●●●● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ●● ●● ● ● ● ● ● ● ●● ● ● ● ● ●● ● ● ●● ● ● ● ● ●●● ● ● ●● ●● ● ● ● ● ● ● ● ● ● ● ● ●●● ● ● ● ● ●● ● ● ● ●● ●● ● ● ● ● ● ● ●●● ●● ● ●●● ● ● ● ● ●● ● ●●● ●●● ● ● ● ●●●●● ●● ● ● ●● ● ●● ● ● ● ● ● ●●● ● ● ● ● ● ● ●● ● ● ● ●● ● ● ●●● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ●● ● ● ● ● ●● ● ●● ●●● ● ● ● ●● ●● ● ● ● ● ●● ●● ●●● ● ● ● ● ● ●● ●● ●●● ● ● ●● ●● ● ●● ● ● ●●●● ● ● ●●● ● ●● ● ● ● ● ● ●● ● ● ● ●● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ● ● ●● ● ●● ● ●●● ● ● ● ●● ● ● ● ● ● ●● ●● ●● ● ●● ● ● ● ●● ● ● ● ●● ● ● ● ● ● ● ● ● ● ●● ● ● ● ●● ● ● ● ● ● ●● ● ● ● ● ● ●● ● ● ● ●●● ● ●● ● ● ●● ● ● ● ● ● ● ● ● ●●● ● ● ●●●●● ● ● ● ● ● ● ●● ● ●●● ● ● ●● ● ● ● ● ●● ● ● ●●● ●●● ● ● ● ● ● ● ● ● ●●● ●●● ● ● ● ● ●● ● ●● ● ●● ● ● ● ● ● ●● ● ●● ● ● ● ● ●● ● ● ●● ● ● ●● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ●● ● ● ● ● ●● ● ●● ●●● ● ● ●● ● ● ● ●● ●● ● ● ● ● ●● ●● ● ● ●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ●● ● ● ● ●● ● ● ● ● ●● ● ● ● ● ●● ● ●● ●●● ● ● ●● ● ● ● ● ● ● ● ●●●● ● ● ● ● ● ● ● ● ●● ● ● ●●●●●● ● ●● ●● ● ●● ● ● ● ●● ● ● ●● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ● ●● ●● ● ● ●● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ●●●●● ●● ● ● ● ● ● ● ● ● ● ●● ●● ● ● ● ● ●● ●● ●● ● ●●●● ● ● ● ● ● ●● ● ● ● ●●● ●● ● ● ● ● ● ● ● ● ● ● ●● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●● ● ●● ●●● ●● ● ●● ● ● ● ● ● ●● ● ●● ● ● ●●● ●● ● ●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ● ● ●● ● ● ● ● ●●● ●● ● ● ● ●● ● ● ●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ● ● ● ●● ● ● ● ● ●●●●● ● ● ● ● ● ● ●●● ● ● ● ● ● ●● ● ● ● ●● ● ●●● ●● ● ●●● ●● ●● ●● ● ●● ● ● ● ● ● ● ● ● ●●● ● ● ●● ●● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ●● ●● ● ●●● ● ● ● ● ●● ● ● ● ● ● ● ●● ● ● ● ●● ●●●● ● ●● ● ● ● ● ● ● ●● ●●● ● ●● ● ● ●● ● ● ● ●● ● ●● ● ● ● ● ● ● ● ● ● ●● ● ● ● ●● ● ●● ●●● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ●● ●● ● ● ●● ●●● ● ● ● ● ●●● ● ● ● ●● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ●● ●● ● ●● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ● ●●● ● ● ● ● ● ● ● ●● ● ● ● ●● ● ●●● ● ● ● ● ● ●● ● ● ● ●●●● ●● ● ● ●● ● ● ● ● ● ●● ● ●●●●● ● ● ● ●● ● ● ●● ● ● ● ● ● ●● ●● ● ●● ● ● ● ● ● ● ● ● ● ● ●● ● ● ●●●●● ●● ● ● ● ●● ●●● ● ● ●●● ● ● ● ● ● ● ● ● ●● ● ●●●●● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●● ● ●●● ● ● ●● ●● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●● ●● ●● ● ● ● ●● ● ●● ●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ●● ●● ● ● ● ●● ● ● ●● ● ● ● ●● ●●●● ● ● ● ● ●● ●●● ● ● ● ● ● ● ● ● ●●● ● ● ● ●● ● ● ● ●● ● ● ● ● ● ●●●●● ●● ● ● ● ● ● ● ● ● ● ●● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ●● ●● ●● ● ●● ●● ●● ● ●● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ● ●● ● ● ● ●● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●● ● ● ●● ● ● ● ● ● ● ● ● ● ●●● ●●●● ● ● ● ● ●● ● ● ● ●● ●●● ● ● ● ●●● ●● ● ● ● ● ● ● ● ●●● ●● ● ● ●● ●●● ● ● ● ●● ● ● ● ● ● ● ● ● ●●● ● ● ● ● ● ● ● ●● ● ●● ● ● ● ● ●● ● ● ● ●● ● ● ●● ● ● ● ●●● ● ● ● ● ●● ● ● ●● ● ●● ● ● ● ● ● ● ●● ●● ● ● ●● ●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ●●● ● ● ● ● ● ● ● ● ● ●● ● ●● ● ● ● ●● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ●● ● ●● ● ●●●● ● ● ● ●●●● ●● ● ● ● ● ● ●● ● ● ● ●● ● ●● ● ● ● ● ● ● ● ● ●●●● ●●●●● ● ● ●● ● ●●● ● ● ● ● ●● ● ● ● ●● ● ● ● ● ● ● ●●● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ●● ● ●●●●● ● ● ● ● ●● ●● ● ● ●● ● ● ● ● ● ● ●● ● ●●● ● ● ● ●● ● ● ● ●● ● ●●●●● ●●● ● ●●● ● ●● ● ● ●● ● ●● ● ●●●● ● ●●● ● ●● ● ● ● ● ● ● ● ●● ●● ●● ● ● ● ●● ●● ● ●●● ● ● ● ● ●● ● ●● ● ●● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ●●● ● ● ● ● ● ● ●● ● ●●● ● ● ●● ● ●●● ● ● ● ●●● ● ●● ● ● ● ● ● ● ● ● ●●● ●● ● ●●● ● ● ● ● ●● ●● ● ●● ● ●●●● ● ● ● ● ●● ● ● ● ● ●●● ● ●● ● ●● ● ●● ● ● ● ● ● ● ●●●● ● ●● ●●● ● ● ● ● ● ● ● ●● ● ● ● ● ●● ●● ● ● ●● ● ●●● ● ● ● ●● ● ● ● ● ● ●● ● ● ●● ● ●●● ● ● ● ● ● ● ●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ● ● ●● ●● ●●● ● ● ● ● ● ● ● ●● ● ●● ● ●● ●●● ● ● ● ● ● ● ●● ●● ● ● ● ●● ● ● ●● ● ● ● ●●● ●● ●● ● ● ● ●● ● ● ●● ● ●● ● ● ● ● ● ● ● ● ● ●● ● ●●●●● ●● ● ● ●●● ●●● ● ●● ●● ● ● ●● ● ● ●● ● ● ● ●● ● ●● ● ● ●● ● ● ●● ● ● ●● ● ● ● ● ● ● ●● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ●● ●●● ● ● ● ●●● ● ● ● ● ● ● ● ● ● ●● ●● ● ● ●● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ●● ●● ●● ●● ● ● ● ●●● ● ● ●● ● ● ● ●●● ● ● ●●●●●● ●●● ● ● ● ●● ●● ●● ● ● ● ● ●●● ● ● ●● ●● ● ●● ●● ● ●● ● ● ● ● ●●● ● ●● ● ● ●● ● ● ● ●● ● ● ● ●● ● ● ●● ●● ●● ●● ●● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●●● ● ● ●● ● ● ● ● ● ●● ● ●● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ●●● ● ● ● ● ● ● ●● ●● ● ● ● ● ●● ● ● ● ●● ● ● ●● ●● ●● ● ● ● ●● ● ● ● ●● ●● ●● ●●●● ● ● ●● ●● ● ●● ●●● ● ● ●●● ● ● ● ● ● ●● ●●● ● ● ● ● ● ● ●●●● ● ● ● ● ● ● ● ● ●● ● ● ● ●● ● ●● ● ● ● ●● ● ●● ●● ●● ● ● ● ●●● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ●●●● ● ●●● ●● ● ● ●● ●● ● ●● ●● ● ● ●●●● ● ● ● ●● ●●● ● ● ●● ●● ●● ● ● ● ●● ●● ● ● ● ●● ● ● ● ●●●● ● ● ●● ●● ●● ●● ● ● ● ●● ● ● ●● ●● ● ●● ● ●● ● ● ● ● ● ●● ● ● ●● ● ● ●● ● ●● ● ●● ●●● ● ● ● ●● ●●● ●● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ●●● ●● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ●●●● ● ●●● ●● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ●●● ● ● ● ● ● ● ● ●●●●● ●● ●● ●●● ● ● ●●●● ● ● ●● ● ● ●● ● ● ● ● ●● ●● ● ● ●● ● ● ● ● ●● ● ●● ● ●●● ● ● ● ● ● ● ● ● ●● ● ●● ●● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ●●● ●● ● ●● ● ● ● ● ● ●● ● ●●● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ●● ● ●● ● ●● ●● ● ● ● ● ●● ● ● ●●● ● ● ● ● ● ● ● ● ●● ● ●●● ● ● ●● ● ● ● ● ● ●● ●● ● ● ●● ● ● ● ●● ● ● ● ● ● ●● ●● ● ● ●● ● ● ●● ● ● ● ● ● ● ●● ● ● ● ●● ●● ● ● ● ● ● ● ● ● ●● ●●●●● ● ●●● ●●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ●● ● ●●● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ●● ●● ● ● ● ● ● ● ● ●● ● ● ● ● ●● ●● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ●●● ●● ●●● ● ● ● ● ●● ●● ● ● ● ●● ● ●● ● ● ●●● ● ●● ● ● ● ● ● ● ● ●● ●●● ● ● ● ● ●● ●● ● ● ● ●● ● ● ● ● ●● ● ● ● ●● ●●● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●● ●● ●● ● ●● ●●● ● ● ● ● ● ● ●● ● ● ● ●● ● ● ●●● ● ●● ● ● ● ● ●●● ●● ●● ● ● ● ● ● ●●● ● ● ● ● ● ●●● ● ● ● ● ● ●● ●● ● ●● ● ● ●●●● ● ●●● ● ● ● ● ●● ● ● ● ● ● ● ● ● ●●● ● ● ● ● ●● ●● ●● ● ●● ● ●●● ● ●● ● ●● ● ● ● ● ● ● ● ● ● ●● ●● ●●● ● ● ● ●● ●● ●●● ● ● ●● ●● ● ●● ●●● ● ● ●●●● ● ● ● ●● ● ● ● ● ●● ● ●● ● ●●● ●●● ● ● ● ● ● ● ● ●●● ●● ● ●● ●●●● ● ● ● ● ● ● ●● ●●● ● ● ● ●● ●● ● ●● ● ● ●●● ● ● ●● ●● ●●● ● ● ● ●● ● ●● ● ●● ●● ●● ● ● ● ● ●● ●●● ●● ● ● ● ● ● ●● ● ● ● ● ●● ●●● ● ● ●●● ● ● ●● ● ● ● ● ● ● ● ● ●●● ● ● ● ● ● ● ● ● ● ●● ● ●●● ● ● ● ●●● ● ● ●●● ●● ● ● ●●●● ●●●● ●● ●● ● ●● ● ● ●● ●●●● ● ● ● ● ●● ●● ● ● ● ●● ● ● ●● ● ● ● ●● ● ● ●● ● ●● ● ●●● ● ● ● ● ●● ●● ● ● ● ● ●●●● ● ●● ● ● ● ● ● ● ●● ●●● ●● ● ● ● ●● ●● ● ● ●● ● ● ● ●● ● ●● ●● ● ● ●● ●●● ● ● ● ● ●●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ●● ● ● ●●● ●●● ● ●●● ● ●● ● ● ● ● ●● ●● ● ● ● ● ● ●● ●● ●● ● ● ● ● ● ● ●● ● ● ● ● ● ● ●● ● ● ●● ●● ● ● ● ● ● ●● ● ● ● ● ● ●●● ●● ● ●● ● ● ● ● ●● ● ●●● ● ●● ● ● ● ●● ● ● ●● ●●● ●●● ●● ● ●● ● ● ●● ● ●●● ● ●● ●●● ● ●● ● ● ● ● ● ● ● ●●● ●● ●● ● ●● ●●● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ● ●● ● ●● ● ●● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ●● ●● ● ● ●● ● ●● ● ● ● ●● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ● ● ● ●● ● ●● ● ● ●● ●●● ● ● ● ● ● ● ●● ●● ● ●● ●● ● ● ● ● ● ● ● ● ● ● ●●●● ● ●● ● ●● ● ●● ● ●● ● ● ● ● ● ● ●●●● ●●●●● ●● ● ● ● ●● ● ● ● ● ● ●● ●● ●● ● ● ● ●● ● ● ● ● ● ●● ● ●● ●●● ● ● ● ● ● ● ● ● ● ●●●● ● ● ● ●● ● ● ● ●●●● ● ● ●● ● ● ● ●●● ● ●● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ●● ● ●● ● ●●● ● ● ●● ● ●● ●● ● ● ● ● ● ●● ● ●● ●● ● ● ● ● ● ● ● ●● ● ● ●● ●● ●● ● ● ● ●● ● ● ● ● ● ● ● ●●● ● ● ●● ●● ●●● ●● ● ● ●● ● ●● ● ● ● ●●● ●● ● ●● ● ● ●● ● ● ●● ●●● ● ● ● ● ● ● ●●● ● ● ● ●● ● ● ●● ● ●● ●●● ●● ● ● ●● ●● ● ● ●● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ●●● ●● ● ● ● ● ● ● ● ● ●● ● ● ● ●● ●● ● ●● ● ●● ● ●● ● ● ●● ● ● ● ● ● ● ● ●● ● ●● ● ● ● ● ● ● ● ● ● ●●●● ● ● ● ●● ●● ●● ● ● ● ● ● ● ●● ● ● ●● ● ●●●● ● ● ● ● ● ● ●● ● ● ●●●● ●● ● ● ● ●● ● ● ● ●● ● ● ●● ● ● ●● ● ● ● ● ● ●● ● ● ● ● ● ● ●● ● ● ● ● ● ● ●●● ●●● ●●●●● ● ●● ● ● ● ● ●●●● ●● ●●● ● ● ● ● ●●● ● ● ●● ● ● ● ●● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ●●● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ●● ● ● ●● ● ● ●● ● ● ● ● ● ● ●●● ● ●● ● ● ● ●●●● ● ●●● ●● ● ● ● ● ● ● ● ● ●● ● ●●● ● ● ● ● ● ● ● ● ● ●● ●● ● ●● ● ● ●● ● ●●● ● ●●● ● ●● ● ●● ● ●● ● ● ● ● ● ● ●● ● ●● ●● ● ●● ●● ● ●●● ●●● ● ● ● ● ● ● ● ● ● ● ● ● ●● ●●●● ● ● ● ● ●● ● ● ●● ●●● ●●● ● ● ● ●● ● ● ●● ●● ● ●●● ● ●● ● ● ● ● ● ● ● ●● ● ● ●●● ● ● ● ● ● ●● ● ● ● ● ●● ● ● ● ● ●● ● ● ● ● ● ● ●● ● ●●●●● ● ● ● ● ● ●●● ●● ●●● ● ● ● ● ● ●● ● ● ●● ●● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ●● ●●● ● ●●● ● ● ● ●●●● ● ●● ● ●● ● ● ● ●● ● ●● ● ● ● ● ● ●●●●● ●● ● ● ●●● ● ● ● ● ●● ● ● ●● ● ● ●● ● ● ● ● ●● ● ●● ● ●● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ●● ● ● ● ● ● ●●●●● ● ●●●● ● ● ● ● ● ● ●● ● ● ●● ● ● ● ● ● ●● ● ●● ● ● ● ● ● ●● ●● ● ● ●● ●● ●● ● ● ●● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ●● ● ● ● ● ●● ● ● ● ● ● ● ● ●● ●● ●● ●● ● ●● ● ●● ● ● ● ● ● ● ●● ● ● ● ● ● ●● ●●● ● ● ● ● ● ● ●● ● ● ● ● ●● ●● ● ● ● ● ●● ● ●● ● ● ●● ● ● ●● ● ●●● ●● ● ●● ● ● ● ● ●●●● ● ● ● ● ● ● ● ● ● ● ●● ●● ● ● ● ● ● ● ● ● ● ●● ● ●● ● ● ● ● ●●● ● ● ● ●● ● ●●●● ● ●● ● ● ● ● ●●● ● ● ● ● ●●● ● ●● ● ●● ● ●● ● ●● ● ●●●● ● ●● ●● ●●●● ● ● ● ● ● ● ●● ●● ●● ●●● ●● ● ●● ● ● ● ● ● ●● ● ●● ●● ● ●● ● ● ● ●● ● ● ● ●● ● ● ●●● ● ●● ● ● ●● ●● ● ● ● ●● ●●●●● ● ● ● ●● ●●●● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ●● ● ● ●●● ●● ●●● ●●●● ● ● ● ●● ● ● ● ● ● ●● ● ●● ●● ● ●●●●● ●● ● ● ● ● ● ●● ● ●● ●● ● ● ● ● ●●●● ●● ● ●● ●● ● ● ●● ●● ● ● ● ● ● ●● ● ● ● ● ●● ● ● ●● ● ● ● ●●● ● ● ● ●● ● ● ● ●● ●●● ● ●●● ●● ● ● ●●●● ● ● ● ● ● ● ● ●●● ●●●● ● ●● ●● ●● ● ● ●● ●● ● ● ●● ● ● ● ● ●● ●● ●● ●● ● ● ●●●●● ● ● ● ●● ● ● ●● ●● ●● ● ●● ● ● ● ●● ● ● ● ● ● ● ● ●● ●● ● ● ●● ●●● ●● ● ● ● ●● ● ● ● ● ● ● ●●●●● ● ● ● ● ●● ●● ● ●●● ● ●● ●● ● ●●● ●● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ●●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ●● ●● ● ●● ● ● ●● ●● ●● ●● ● ●● ● ●● ● ● ●● ●● ●●●●● ● ● ● ●● ●●● ●●● ● ● ● ● ●● ● ● ● ● ●● ● ●●● ● ● ● ● ● ●● ● ● ●●● ●● ● ● ●●●● ● ●● ● ● ●● ● ● ●● ●● ● ●● ●● ● ● ●●● ●● ●● ●● ● ● ● ● ● ● ● ●● ●●● ● ● ● ●●●●● ● ● ●● ●● ● ●● ● ● ● ● ● ● ●● ● ●● ● ● ● ● ● ● ● ● ● ●● ●●●● ● ●● ● ● ●●● ● ● ●● ● ● ● ● ●●●● ● ● ●●● ●● ●●● ● ●● ● ● ●● ● ●● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ● ● ● ● ●● ● ● ● ● ● ● ●● ● ● ●● ● ● ●● ● ●●● ● ● ● ● ● ● ● ●● ● ● ● ● ●● ● ● ● ● ● ● ● ●●●● ● ● ●● ● ●● ●● ● ● ●● ● ● ● ● ●● ● ● ●● ●● ● ●● ● ● ● ● ●● ●● ●●● ●●●● ● ● ● ● ● ● ● ●● ●● ● ● ●● ●● ● ● ●● ● ● ● ● ●● ● ●● ● ● ● ●●● ● ● ● ● ●● ● ● ● ●● ● ●● ●● ● ● ● ● ●● ●●● ● ● ●●● ● ● ●● ● ● ● ●● ●● ●● ● ● ●● ● ●● ● ● ● ● ● ●● ●● ●●● ● ● ●● ●●● ● ● ● ●●● ● ● ●● ●● ● ●●● ●● ● ● ● ● ●●● ● ● ●● ● ● ●●● ● ● ● ● ● ● ● ● ● ● ●●● ● ●● ● ●●●●● ● ● ● ● ● ● ● ● ●●●●● ● ● ●● ● ● ● ●●●● ● ● ● ● ● ●● ●● ● ● ● ●● ● ●● ● ●● ● ● ● ●●●● ●● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ● ●● ● ● ● ● ●●●● ● ● ●●●●● ●● ● ●●● ● ● ● ●● ● ●● ● ● ● ● ● ● ● ● ● ●● ● ● ● ●●● ●● ● ● ●●● ● ● ● ● ●● ●●● ●● ● ● ●● ●●●●● ● ●●● ● ● ● ● ●● ● ● ● ● ● ● ●● ● ●● ● ●● ● ● ●●● ●● ● ● ● ● ●● ● ● ● ● ● ●● ●● ● ●● ● ● ●● ● ● ●●● ●●● ● ● ●● ● ● ●● ● ● ● ● ● ● ●●● ●● ● ● ● ●● ● ●● ● ● ● ● ●● ● ● ●● ●● ● ●● ●● ●● ● ●● ● ● ● ● ● ●●● ● ●● ● ● ● ● ● ● ● ● ● ●● ● ● ●● ● ● ●● ● ● ● ● ● ●● ●● ● ● ● ● ● ● ● ● ● ●● ●● ●● ● ●●●●● ●● ●●● ● ● ● ●●●●● ● ●●● ● ● ● ● ● ●● ● ● ● ● ● ●● ● ● ●●● ● ● ● ●●●● ● ● ●● ●● ● ● ● ● ●● ●● ●● ●● ●● ● ●● ●● ●●● ● ●● ● ● ● ● ● ● ● ●●● ● ● ● ●●●●● ● ● ●●● ● ●● ● ● ● ● ● ● ●● ● ●● ● ●● ●● ● ● ● ● ● ● ● ●● ●●●●●● ● ● ●●● ● ● ● ● ●●● ● ● ● ● ● ●● ● ●●●●●● ●● ●● ● ● ● ●●● ● ●● ●● ● ●● ● ● ● ● ● ● ●●●● ●● ● ● ● ●● ●● ● ● ●● ● ● ●●● ●●● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●● ●● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ●● ●● ● ●● ●● ● ●● ● ● ● ● ●● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ●●● ● ●●●● ● ● ● ● ● ●●● ● ● ●● ●● ● ●● ●●● ● ● ● ● ● ● ● ●● ●● ● ●● ● ● ● ●●● ● ● ● ●●●● ● ● ● ●●● ● ● ● ● ●●●● ●● ● ● ● ● ●●●● ● ● ● ●● ● ●●●●● ● ● ●● ● ● ●● ●● ● ●● ● ●● ●●●● ● ● ●● ● ● ● ● ● ●● ● ●●● ● ● ● ●● ● ● ● ●● ●● ●● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ●● ●● ●●● ●● ● ●● ● ● ●● ● ● ● ●● ● ● ●● ● ● ● ●● ● ● ●● ● ●● ●● ●●●● ● ●● ● ●● ● ● ●● ● ● ●● ●● ● ●● ● ●● ●● ● ● ● ● ●● ● ●●● ●● ● ● ● ● ● ●● ●● ● ●●● ●● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ● ●● ●● ● ● ● ● ● ● ● ● ● ● ●●●●● ● ● ● ● ● ●● ●● ● ● ● ● ● ● ● ●● ● ●● ● ●● ● ● ● ● ●●●● ●● ● ●●● ●●● ● ●● ● ● ● ● ● ●●● ● ●●●●● ●● ●●● ● ●● ● ● ●●● ●● ● ●● ●●● ●●● ● ● ●●●● ● ●● ●● ● ● ● ●● ● ●● ● ● ● ● ● ● ● ●● ● ●● ● ●● ● ● ● ● ● ●●● ● ● ● ● ●● ● ● ●● ●● ● ● ● ● ●● ● ● ● ● ●● ● ● ●●●● ● ● ● ●● ● ●● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ●● ●● ● ● ●●● ● ● ●●● ●● ● ● ● ●● ●●●● ● ● ●● ●●● ● ●● ●● ●● ●●● ● ● ● ● ● ● ●●● ● ●● ● ● ● ● ● ●●●●● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ●● ● ● ●● ● ● ● ●●● ● ● ● ● ● ●● ● ●● ● ● ●●●●● ●● ●● ● ● ● ● ●●●● ●● ●●●● ● ● ● ●● ● ●● ● ● ● ● ● ●● ● ●● ● ●● ● ● ● ● ●● ● ●● ● ●● ● ● ● ● ● ●●●● ● ● ●● ●● ● ● ● ● ● ●● ●● ● ● ●● ●●● ●●● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ●● ● ● ● ●● ● ● ●● ●● ● ● ●●● ● ● ● ● ●●● ● ● ● ● ● ●● ●● ● ● ●● ●● ● ● ● ● ● ●● ● ● ●● ● ●● ●●● ● ● ● ● ●● ● ● ● ● ●● ●● ●●● ● ●●● ● ●● ● ● ● ●●● ● ● ● ● ● ●●● ●● ● ● ● ●● ● ● ● ● ●● ●● ● ●●●●●● ● ●● ●● ●●● ● ● ● ●●● ● ●● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ●●●● ●●● ● ● ● ●● ● ● ● ●●● ● ● ●● ●● ●●● ● ●●● ● ●● ●● ● ●● ● ● ● ● ● ● ● ● ●●●● ●●●● ● ● ●● ●●●●●● ●● ● ●●● ● ● ● ● ● ●● ●●● ● ● ● ● ●● ● ● ● ●● ● ● ● ● ● ●● ● ● ● ●● ● ● ● ● ●● ●● ● ● ●● ● ● ● ● ● ●● ● ●●●● ● ● ●●● ●●● ● ● ● ●● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ●● ● ● ● ●●● ●●● ● ●● ●● ● ● ● ● ● ● ● ●● ● ● ● ● ● ●●● ● ●●●● ● ●●● ● ● ●● ●● ●● ● ●● ● ● ●●● ● ● ● ● ● ● ● ●● ● ●● ●● ● ●● ● ● ●●● ●● ● ● ●● ● ● ● ● ● ● ●● ● ● ● ● ●● ●● ●● ● ● ● ● ● ●● ●● ●● ● ●● ●● ●● ●● ●● ● ●● ●●● ● ● ● ● ●● ● ●● ● ●● ● ● ●●● ●● ●● ● ● ●● ● ● ● ● ●●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●●● ●● ● ● ● ● ● ●● ●●●● ● ● ● ● ●● ● ●●●●● ● ●● ● ● ● ● ● ● ●● ● ●● ●● ●● ●● ● ● ● ●● ●● ● ● ● ● ● ● ● ● ●● ● ●● ●● ●●● ● ●● ● ●● ● ● ●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●● ●● ●● ●● ●● ●●●● ● ●● ● ● ● ● ● ● ● ●● ● ●● ● ● ●●●● ● ● ●● ● ●●● ● ● ● ● ● ●●● ● ●●●● ● ● ●● ● ●●● ● ● ● ● ● ● ●● ● ●● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ● ● ●●●● ● ● ● ● ●● ● ● ●● ● ● ● ● ●● ● ● ●● ● ●● ● ● ● ●● ●● ● ●● ● ●●● ● ●● ● ●●● ● ● ● ● ●●● ●● ● ● ● ● ● ●● ●● ● ●●● ●● ● ●● ● ● ● ● ●● ●● ● ● ●● ● ● ● ●● ● ●● ● ● ● ●● ● ● ●● ● ● ● ●● ● ● ● ● ● ●● ●●●●● ●●● ●● ● ●● ●●●● ●● ● ● ● ●● ● ● ● ● ●●● ●● ● ● ● ●● ●● ● ● ● ● ●● ●●● ●●●● ● ●● ●● ● ●● ● ● ●● ● ●● ●● ● ●● ● ● ●●● ● ● ● ● ● ● ● ● ●●● ● ● ● ● ● ● ●● ● ● ● ● ● ● ●● ●● ●● ● ● ● ●● ● ●● ● ● ● ●●●● ● ● ●● ● ●● ●● ●● ● ●● ● ●●● ●● ●● ● ●● ●●● ● ●● ●● ●● ● ● ● ● ● ● ●●● ●● ● ● ●● ●●● ● ●● ●● ● ● ● ● ● ● ●● ●● ● ●● ● ● ●● ● ● ● ● ● ●● ●● ●● ●● ● ● ● ● ● ● ● ●●● ●● ● ● ● ● ● ●● ● ● ● ● ● ● ●● ●● ● ● ● ●● ●●● ● ● ● ● ●● ● ●●● ● ● ● ●●● ●● ● ● ● ●● ●● ●●● ● ● ● ● ● ● ●● ● ● ● ● ●● ● ● ● ● ●● ● ●● ●● ● ●●●●● ● ● ● ● ● ●● ●● ● ● ● ● ●● ●● ●●●● ● ● ●● ●● ● ● ●● ●●● ●●●● ● ● ●● ● ● ●● ● ●●●● ● ● ● ● ●● ●●● ●● ● ● ● ●● ●●● ● ● ● ●● ●● ● ● ●● ● ● ● ● ● ●● ● ● ● ● ●●● ● ●●● ●● ● ●● ● ●●● ● ● ● ●● ●● ●●● ● ● ● ●●● ● ● ●● ● ●● ● ● ●● ●● ● ●● ●● ● ● ● ●● ●● ● ● ● ●●● ●● ● ●● ●● ●●● ● ● ●●● ● ● ● ●● ●● ● ●●● ● ● ● ● ●●●● ● ● ● ●●● ● ●●●● ● ●● ●● ● ● ●●● ● ●● ●● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ●●●●● ●● ●● ●● ●●● ●● ● ●●●●● ● ● ●● ● ●● ●● ● ● ● ●●● ● ●● ●● ●●● ●● ● ●● ● ● ● ●● ●●● ● ● ● ●● ● ●● ●● ● ● ● ● ● ● ● ● ● ●● ● ●●● ●● ●● ● ●● ● ● ●● ● ● ● ● ● ● ●● ● ● ●● ● ● ● ● ● ● ●●● ●●●●● ● ● ●● ● ●● ● ● ● ●● ●● ●● ● ● ● ●●● ● ●●●● ●●● ●● ● ● ●● ● ● ● ●● ● ●● ● ●● ● ● ● ●● ● ●●● ● ● ● ● ●●●● ●● ● ●●● ● ●● ● ●●● ●● ● ● ● ● ● ● ●● ●● ● ●● ● ● ● ● ● ●● ● ● ● ●● ● ● ●● ● ● ● ● ● ●● ● ● ● ● ●● ●● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●●● ●●●● ● ●●● ●●●● ● ●● ●● ●● ●● ●● ● ● ●● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●●● ● ● ●● ●● ● ● ● ● ● ● ●●●● ● ● ● ●● ●● ● ●● ● ●● ● ● ● ●● ● ●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●● ● ●● ●● ● ● ● ● ●● ● ●● ● ●●● ● ● ● ● ● ● ●● ● ● ● ●● ●● ●●● ●● ●● ● ● ● ●● ● ●● ●● ● ● ● ●● ●● ●●● ●●● ● ● ●●●● ● ●● ● ● ●●● ● ● ● ● ●● ● ● ● ● ● ●●●● ● ●● ● ●● ● ● ●● ●● ● ● ● ●●● ● ● ● ● ●● ● ● ●● ● ●● ● ● ● ● ● ●● ● ● ● ●● ●● ● ● ● ● ● ● ● ● ●●● ●●● ● ● ● ●●● ● ●● ● ●● ●● ●● ● ● ● ● ●●● ●● ● ●● ● ●● ● ● ● ● ● ●● ●● ● ● ● ● ● ● ●●● ●●●●● ● ● ●● ● ●●● ● ●● ● ● ● ● ● ●● ● ●● ● ●●●● ● ● ● ● ● ● ● ● ●● ● ●● ●● ● ●● ●● ● ●● ● ●● ● ●● ●●● ●●●● ● ● ● ● ● ● ●● ● ●●●●●● ●● ●● ●●●●●●●●●● ● ●●● ● ● ●● ● ● ● ● ●● ● ●● ●●● ● ● ● ●●● ● ● ●● ●● ● ● ● ● ●● ● ●● ● ●● ● ●● ● ●●●● ● ●● ●●●● ● ● ● ● ●● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ●● ● ● ●● ● ●● ● ●● ● ●● ● ● ●●●●●● ● ● ● ● ●●●● ●● ●● ● ● ●● ●● ●●● ● ● ● ● ● ●● ● ● ● ● ●●● ● ● ●● ●● ● ● ●● ● ●● ● ● ● ● ●● ●● ● ●●●● ●●●● ● ● ● ● ●●● ● ●● ● ● ● ● ● ●● ● ●● ● ● ● ●● ● ●●● ● ● ● ● ● ● ●●● ● ●● ●● ● ●● ● ● ● ●● ● ●● ●●● ●● ●●●●● ●●●●● ●● ●● ● ● ●● ●● ● ● ● ● ●● ●●●●●● ●●●●● ● ●●●● ●● ● ● ●● ● ● ● ●● ● ●● ● ● ●● ●●● ● ● ●● ●● ● ● ● ● ●● ● ●● ●●●● ● ●●● ● ● ●● ● ● ● ● ● ●● ● ● ● ● ● ● ●●●● ● ●● ●●●●●●● ●● ●● ●● ●●●●●● ● ●●●● ● ● ● ● ● ● ●● ●● ●● ●●● ●● ●●● ● ● ●● ●● ●●● ● ●● ● ● ● ● ●●● ● ●● ● ● ● ● ● ● ● ●● ●● ●● ●●● ●● ● ● ● ●● ● ● ●● ●●● ● ● ● ●● ● ●● ● ●● ● ● ●● ●●● ● ● ● ●● ● ● ● ● ● ● ●● ●●● ● ● ● ●●● ●● ● ● ● ● ●● ●● ●● ● ●●● ● ● ● ● ●●●● ● ●● ●● ● ● ● ●● ● ● ● ● ● ●● ● ●● ●● ● ●●● ●● ● ● ●● ●● ● ●●● ● ● ●● ●● ●●●● ● ● ● ●●● ●● ● ● ●● ● ● ● ● ●● ● ● ●●● ● ● ● ●●●● ● ●● ● ● ● ● ● ● ● ●● ● ●● ●● ● ● ●● ● ●● ● ● ●● ● ●● ●● ● ●●●● ● ● ●● ● ● ●● ● ● ● ● ●●●● ● ● ● ● ●● ●● ●● ●● ● ● ● ● ● ●● ●●● ●●● ● ●● ● ●● ● ●● ●● ●● ● ●● ●● ●● ● ● ● ●● ● ● ●● ●● ● ● ●● ● ● ●● ●● ● ● ● ● ● ●● ● ●● ● ●●● ● ● ● ● ●● ● ●● ●● ● ●● ●● ● ● ●● ●● ●● ●●● ●●●● ●● ● ●● ● ● ● ●●●●●● ●● ●● ● ● ● ●●● ●● ● ●●● ● ●● ● ●● ● ●●● ● ●●●●●● ●●● ● ●● ● ●●● ●●● ● ● ●●● ● ● ● ● ●●●●●● ● ●● ●● ●● ● ● ●● ● ● ● ●● ● ● ●● ● ● ● ● ●●● ● ●● ● ●●● ●● ●● ●●●●● ● ● ● ● ● ●●● ● ●● ● ●● ●●●●●● ●● ● ● ●●●●● ● ● ●●● ● ● ●● ● ● ● ● ●● ● ● ●●● ●●● ● ●●●● ● ● ● ●● ● ●●● ●● ●● ● ● ● ● ● ● ● ● ● ●● ● ●● ● ●● ●● ●● ● ● ●● ●● ● ● ● ● ● ● ●●● ● ● ● ●●● ●● ● ● ● ● ● ● ●● ● ● ●● ● ●● ● ●●●●●● ● ●●● ● ●●● ●● ●● ●● ● ● ●● ● ● ●● ●● ● ●● ●● ● ●● ● ● ●●● ●●●●● ● ●● ● ● ●● ● ● ● ● ●● ●●●● ●● ● ●●● ● ●●● ●●● ● ●●● ●● ● ●● ●●●●●● ● ●● ● ● ● ●● ●● ●● ●● ●● ● ●●● ● ●●● ●● ● ● ● ● ●●● ●● ●● ● ● ●● ● ● ● ● ● ●● ● ● ●● ● ●● ●● ●● ● ● ● ● ● ● ●● ● ● ●● ● ● ●● ●● ● ●● ●●●●● ●● ● ●● ● ●● ● ● ●● ● ●● ●● ● ●● ● ●● ● ●●●● ● ● ● ●●●●● ●● ● ● ●● ●●● ● ●●●● ●● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ●● ●● ● ●● ●●●● ● ●● ● ● ●● ●●●●● ●●● ● ●● ●● ● ● ●● ●● ● ●● ● ● ●● ● ●● ●● ●● ● ● ●● ●●● ● ●● ● ● ● ●● ● ●● ● ●● ● ●●● ●● ●● ●● ●● ● ● ● ● ●● ● ●●● ●● ●● ●● ● ●●● ●● ●●●●● ●●● ● ● ● ●● ● ●●● ● ●●● ● ●● ●●● ● ● ●● ●●●● ●● ● ● ●●● ●● ● ● ● ● ● ●● ● ● ●● ● ● ●●● ● ● ● ● ● ● ● ●●●● ●●● ●● ● ●● ● ● ●● ● ● ● ●● ●● ●●● ● ● ● ●● ●● ● ● ● ● ●● ● ●● ● ● ●● ● ● ●●● ● ● ● ●●●● ●● ● ●● ●● ● ●●● ●●● ●● ●● ● ● ● ●● ●● ● ● ●●●● ● ●● ● ● ● ● ● ● ● ● ●●● ● ● ● ●● ●● ●●● ●● ● ● ● ● ● ● ●● ●●● ● ●●●● ● ● ● ●● ●●●● ● ●●● ●●● ●●● ● ● ●● ●● ●●● ● ●● ● ● ●● ● ● ● ● ● ● ● ●●●●● ●● ● ● ●● ● ● ●●● ● ●●●●● ● ● ● ●●●●●● ● ● ● ●●● ● ● ● ●● ●● ● ●● ●● ●●●● ● ● ● ●●● ●●● ● ● ● ● ● ● ● ● ● ● ● ●●●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ●● ● ●●●●● ●●● ●● ● ● ● ●● ● ● ●● ●●● ● ●● ● ●● ● ●●● ● ● ● ●●● ●● ●●● ● ●● ● ●● ● ● ● ●● ●●● ●● ● ●● ● ●● ● ●● ●● ●●● ● ●●● ●●●● ● ● ● ●●●●●● ● ● ● ●●● ● ● ● ● ●● ●● ● ● ● ●● ● ●● ● ● ● ●●● ●● ● ● ●● ● ● ● ● ● ● ● ●●● ●● ●● ● ●●● ●● ●●● ● ●● ● ●● ● ●● ● ●●● ● ● ● ● ●●●● ● ●● ● ● ●●● ● ● ●● ● ●●● ● ●●● ●●●● ● ● ●● ● ● ●● ●● ●●● ● ● ● ● ●● ● ● ●●●● ●● ●●● ● ● ●● ● ●● ● ●●● ● ● ●● ●● ●● ●●●● ●● ●● ● ● ●● ●● ● ● ●● ● ●●● ● ●● ● ●● ● ● ● ●● ● ● ●● ●●● ●● ● ●● ● ●● ● ● ● ●● ●● ● ●● ● ● ●● ● ● ● ● ● ● ●●●● ● ● ●● ●●● ● ●● ●●● ●●●● ● ●●● ●● ●●● ● ●●●● ● ●● ● ●● ● ●●●● ●● ● ● ● ●● ● ● ● ●●● ● ● ● ● ●● ●● ●● ● ●● ●● ● ●● ●● ● ●● ●●● ● ● ●● ● ●●● ●●● ● ●● ● ● ● ●●● ● ● ● ●●● ●● ●● ●● ●● ● ● ● ●● ●● ●● ● ●● ●● ● ● ● ● ●●●● ● ●● ●● ● ● ● ●● ●●● ●● ●● ●● ●● ● ●● ● ● ● ● ● ● ●●●● ● ● ●● ●●●● ● ●● ● ● ●●●●●●● ●● ●● ●● ● ● ●● ●● ● ● ●●● ●●●●● ● ● ● ●● ●● ●● ●● ● ●● ● ●●●● ● ●●●● ● ● ●● ● ● ●● ● ●● ● ●● ●● ●● ● ● ● ● ●● ● ●● ● ● ●●● ●● ● ● ●● ● ●● ●●● ●● ● ●● ● ● ●● ●●● ●● ●● ● ● ● ●● ● ●● ● ● ●●● ● ●●● ● ●●●● ●● ● ●● ●● ● ● ●● ●● ●● ● ●● ● ● ● ● ● ● ● ●●● ●●● ●●●● ● ● ● ● ● ● ● ●●●● ● ●● ● ●●●● ●●● ● ● ●● ● ●● ●● ● ● ●● ●● ●● ● ●●● ● ● ● ●● ● ●●●● ● ●●● ●●● ●●●● ● ●● ● ●● ● ●●●● ●●●● ● ●● ● ● p ●● ● ●● ●●● ●● ●● ●● ● ● ● ● ● ● ● ● ●● ●● ● ● ●● ●●● ● ● ● ● ● ●●● ●● ●●● ●● ● ● ● ● ●● ● ● ● ● ●●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ●● ● ● ●●●● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●●● ● ●●● ● ●● ●●●● ● ● ● ● ●● ● ● ●● ● ● ● ● ● ●● ● ●● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ●● ● ● ●● ● ●● ● ●● ● ●● ●● ● ● ● ● ● ● ● ● ●●● ●● ● ●● ● ● ● ●● ● ● ● ● ●● ● ●● ● ● ●● ● ● ●●● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ● ● ●● ● ●● ●● ●● ● ● ●●● ●● ●●● ● ● ● ●●● ●● ● ● ● ●●● ● ● ●● ●● ● ● ● ● ● ●● ●● ● ● ● ● ●● ● ● ●● ● ●● ● ●● ●● ● ● ● ●● ● ●●● ● ● ● ● ● ● ●● ● ● ●● ● ● ● ● ● ● ●●●● ●● ● ● ●● ● ●● ● ● ● ●● ● ●● ● ● ● ●● ●● ● ● ● ● ● ● ● ● ●● ● ● ● ●●● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ● ● ● ● ● ● ●● ● ● ● ● ● ●● ● ● ●● ● ● ●●● ● ● ● ●●● ● ● ● ●● ● ● ●● ● ● ● ●● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●● ●● ● ● ● ● ●● ● ●● ●● ●● ●● ● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ●● ● ●● ●● ● ● ● ● ● ●● ● ● ●●● ● ● ● ● ●● ● ● ● ●●●● ● ● ● ● ● ● ● ● ●●● ●● ● ● ● ● ●●● ●● ● ● ●● ● ● ● ● ●● ● ●● ● ● ● ●● ● ● ● ● ● ● ● ● ●● ● ● ●● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ●● ● ● ● ● ●● ●● ● ● ● ● ● ● ●● ● ●● ● ● ● ●● ●● ●● ● ● ● ● ● ● ● ● ●● ● ●● ●● ● ● ● ● ● ● ●●●● ● ● ●●●● ● ● ●● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ●●● ●● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ● ●● ●● ● ● ● ● ● ● ● ●● ● ● ● ● ●●●● ● ● ●● ● ● ●● ● ● ● ●● ● ●● ● ●● ● ● ● ● ●● ● ● ● ● ● ● ● ●●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ●●● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ●● ● ● ●● ●● ●● ● ●●● ● ● ●● ● ● ● ●●● ● ●● ●● ● ●● ● ●●● ● ● ● ● ● ● ● ● ● ● ●●●● ● ●● ● ● ● ●● ● ● ●● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ●● ● ● ● ● ● ● ● ● ● ●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ●●● ● ● ● ● ● ●●● ● ● ● ● ● ● ● ●● ● ● ● ● ● ●●●●● ● ● ●● ● ●● ●● ●● ● ● ● ●● ● ● ● ● ● ● ●● ● ●● ● ● ● ● ● ● ●● ● ●● ● ● ● ●● ●●● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ●● ● ● ● ●● ● ● ● ●● ● ●●● ● ● ● ●● ●● ● ● ● ● ● ●● ● ● ● ● ●● ● ● ● ● ●● ●● ● ●● ● ● ● ● ●● ● ●● ● ●● ● ●● ● ● ● ● ● ● ● ● ●● ● ● ● ●●● ●●●●● ● ●● ● ● ● ● ●● ●● ●● ● ●● ●● ● ● ● ● ● ● ● ●●● ● ● ● ● ● ● ● ● ● ● ●● ● ●●● ● ●● ● ● ● ●● ● ●● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ●●●● ●● ● ● ●● ● ● ●●●●● ● ● ●● ●● ● ●● ● ● ● ● ● ● ●● ● ● ●● ● ● ● ● ● ●● ● ● ●● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ●●● ●●● ● ● ●●● ● ●●●●● ● ● ● ● ● ● ● ●●● ● ● ● ● ● ●● ● ● ● ● ●● ●● ●● ● ● ● ● ●●●● ● ● ● ● ● ●● ● ●● ● ●●● ● ● ● ● ●● ● ● ● ● ● ●● ● ● ● ● ● ●● ● ● ● ●●● ● ● ● ● ● ●● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ●● ●● ● ● ● ● ● ● ● ● ●● ● ●● ● ● ●● ● ● ● ●●● ● ●● ● ●● ● ● ● ●● ● ●●● ●●● ●●● ● ● ● ●● ● ● ● ●● ● ●●● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ●● ● ●● ● ● ● ●●● ● ● ●● ● ●● ● ● ● ●●● ● ● ● ● ● ●●● ● ● ● ● ● ● ●● ● ● ● ● ●● ● ●● ● ●● ● ● ● ● ● ●● ● ● ● ●●● ● ● ● ● ● ● ● ● ●● ●● ● ● ● ● ● ● ● ● ● ● ● ● ●●● ● ● ● ● ● ● ● ●● ● ●● ● ● ● ● ● ● ●● ● ● ● ● ● ●● ● ●● ● ● ● ●● ●●●● ● ● ● ● ● ● ●● ● ● ● ●● ●● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ●● ● ● ● ● ●● ● ● ●● ● ● ●●●● ● ● ●● ● ●● ● ● ● ● ● ● ● ● ●● ●● ●● ● ●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ● ●●●● ● ● ● ●● ● ● ●● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ●● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●● ●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ●● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ●● ● ● ●● ●● ● ● ● ● ● ● ● ● ● ● ●●●● ●●● ● ● ●● ● ● ●● ● ● ● ● ●●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ● ● ● ●● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●●● ● ● ● ● ● ● ●● ● ●● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ●●● ● ●●● ● ● ● ● ● ● ● ●● ● ● ● ●●● ● ● ●● ● ●●● ●● ● ● ● ●●● ● ●● ●●● ● ●● ●● ● ● ● ● ● ● ● ● ● ●●● ● ● ● ● ●● ● ● ● ●● ● ●● ● ● ● ●●●●● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ●● ●● ● ● ●● ●●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ● ● ● ● ●● ● ● ● ●● ● ● ●●● ● ● ●● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ●● ●●●● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●● ● ●● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ●●● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●●● ● ●●● ● ● ● ● ●● ● ●● ● ● ● ● ●●● ●● ●●● ● ●● ● ● ● ● ●● ● ● ●● ● ●● ● ● ● ● ●● ● ● ● ● ● ●● ● ● ● ● ● ●● ●● ● ●● ● ● ●● ● ● ●● ● ● ● ●●● ● ● ●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●●● ● ● ● ● ●●●● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ●● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ● ● ● ● ●●● ● ●● ●● ●●● ●● ● ● ● ● ●● ●●●● ● ● ● ● ●●● ●●● ● ●● ●●● ● ● ●● ● ● ●● ● ●● ●●● ● ● ● ● ● ● ●● ● ● ●● ●● ● ● ● ● ●● ● ● ●● ● ● ● ● ●● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●●● ● ●● ● ● ● ● ● ● ● ● ● ● ●●● ● ●●● ●●● ● ●●● ● ● ● ● ● ●● ●● ● ● ● ●● ● ● ●● ● ● ● ● ● ●● ●● ● ● ●● ●● ● ● ● ●● ●● ● ● ● ●●●●● ● ● ●● ● ●●● ● ● ● ● ● ● ●● ● ● ● ● ●● ● ● ● ● ● ●● ● ●● ●●● ●● ●●● ●● ● ●● ● ● ● ● ● ● ●● ●●● ●●● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●● ● ● ● ● ●●● ● ● ● ●● ● ● ● ● ●● ● ● ●● ●● ● ● ● ●● ●● ● ●● ● ● ● ● ● ● ● ● ● ● ●● ●● ● ● ● ● ●● ●● ● ●● ● ● ● ● ● ●● ●● ● ● ● ● ● ● ● ● ●●● ● ● ● ●●● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ●● ● ● ● ● ●● ● ● ● ● ● ● ● ●●● ●●●● ● ● ● ● ●● ● ● ● ●● ● ● ● ●●● ● ● ● ● ● ●●● ● ● ●● ●● ● ● ● ● ● ●●● ● ● ● ● ●● ● ● ● ● ● ●● ● ●● ● ●● ● ● ● ● ● ● ● ● ●● ● ●●● ●●● ● ● ●● ● ●● ● ● ● ● ●● ● ● ● ● ● ● ● ●● ●●● ● ● ● ● ● ● ● ● ●● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ●●● ●● ● ● ●● ● ●● ● ● ● ●● ● ●● ● ● ● ● ● ● ● ● ●● ●● ●● ●● ● ● ● ● ● ● ● ● ● ● ●● ●● ● ●● ● ● ●●● ● ● ● ● ● ● ● ●●● ● ●●●● ● ●● ●●● ● ●● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ●●● ● ● ● ● ● ● ●● ● ● ● ● ●●● ●● ● ● ● ● ● ● ●●● ● ●●● ● ●● ● ● ● ● ● ●● ● ● ● ● ● ●● ●● ● ●● ● ●● ●● ●● ●●● ● ● ● ● ● ● ●● ● ● ● ●● ● ● ● ● ● ● ●● ●● ● ●● ● ● ● ●● ● ● ● ●● ● ● ● ● ● ● ● ●● ●● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ●● ●● ● ● ● ● ●●●● ● ● ●● ● ● ● ●●●● ● ● ●● ● ● ● ● ● ● ● ● ●● ●● ● ●● ● ● ● ● ●●● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ●● ● ● ● ●● ● ●● ● ● ●● ●● ●● ● ● ● ● ● ● ● ●● ● ● ● ● ●● ●● ● ● ●● ● ● ●●● ● ● ● ● ● ● ● ● ●● ●● ● ● ● ● ● ● ●● ●●● ● ●● ●●●●● ● ●● ● ●● ●● ● ● ● ●● ● ● ● ●●● ● ● ● ● ●● ● ●●●●●●● ● ● ● ● ● ● ● ● ● ● ● ●● ●● ● ● ● ● ● ●● ●● ● ● ● ● ●● ● ● ● ● ●● ●● ● ● ● ● ● ●● ● ●● ● ● ● ● ● ● ● ●● ● ● ●●●● ● ●● ● ● ●● ●● ● ● ● ● ● ● ●● ● ●● ● ● ● ● ●●● ● ● ● ● ● ● ●● ● ● ● ● ●●● ● ● ●●● ● ● ● ● ● ●● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ●● ● ●● ● ●●●●● ● ●● ● ●●●● ● ●●● ●● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ●● ● ●● ● ● ● ● ● ● ●● ● ● ●● ● ● ● ● ●●●● ●●● ● ●● ●● ●● ● ● ● ●●● ● ●●● ● ● ●● ●● ● ● ●● ●● ● ●● ● ● ● ● ● ● ●● ●●●● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ●● ● ●● ● ● ● ● ● ●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ●● ●● ● ● ● ● ● ●● ●● ● ●● ●● ●● ● ● ● ●● ● ● ● ● ●● ●●● ● ●●● ●● ● ●● ●● ● ● ● ● ● ●● ●●● ●●●●● ●● ● ● ● ●● ●● ●● ● ● ● ●●● ● ●● ● ● ● ● ● ●● ●● ● ● ● ● ●● ● ● ● ● ● ● ● ● ●●●●●● ● ● ● ● ● ● ● ● ●● ● ● ●●● ●● ● ● ● ● ●● ● ●● ●● ● ●● ● ● ● ● ●●●●● ●● ● ●●● ● ● ●●● ● ●● ●● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ●● ● ●● ● ● ● ● ● ●● ● ●● ●● ● ● ●● ● ●● ● ● ● ●● ● ●●● ● ●● ●●● ● ● ● ● ●●● ●●● ● ●● ● ● ● ● ●● ● ●●●●● ● ● ● ●● ●● ● ● ● ● ●● ●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ●● ● ●● ●● ●● ● ● ● ●●● ●● ● ● ● ● ● ●● ●● ● ● ● ● ● ● ● ●●● ● ● ● ● ● ● ● ● ● ● ● ●●● ● ● ● ● ● ● ●● ● ●● ● ● ● ●● ●●● ●●● ● ● ●●● ●● ●●●●● ●● ● ●● ●● ● ● ● ● ● ● ● ● ● ● ● ●●● ● ● ● ● ● ●●●● ● ● ● ● ● ● ● ● ●● ● ●●●●● ● ● ● ● ● ● ●●● ●● ● ● ● ● ● ● ●● ● ● ●● ● ● ● ● ● ●● ● ●● ●● ●● ● ● ● ● ● ●● ●● ● ● ● ● ●●●● ● ●● ● ● ●●● ● ● ● ● ●● ●● ● ● ●● ● ● ● ● ● ●● ●●● ●● ● ● ● ● ● ● ● ●●●● ● ●● ● ●● ● ●● ● ●● ● ● ●●● ● ●● ●● ● ●●● ● ● ● ●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ●● ●● ● ●● ●● ● ● ● ● ● ●●●● ● ●● ●● ● ●● ● ● ● ● ● ● ● ● ●● ● ● ● ● ●● ● ●● ● ● ● ●●● ● ● ● ● ● ●● ● ●● ●● ● ● ●● ● ●● ● ●● ●●● ● ● ● ● ●● ●● ● ● ●● ●● ●●● ● ●● ● ●● ● ●● ● ● ● ●● ● ●● ● ● ● ●● ● ●●● ● ●●● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●● ●● ●● ● ●● ● ● ● ● ●●● ● ● ● ●● ●● ● ● ●● ●● ● ● ●●● ●● ●● ● ● ● ●● ● ● ●●● ● ● ●● ● ● ● ● ●● ● ● ● ● ● ●● ● ●● ● ● ● ●●● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ●● ● ● ● ● ● ● ● ● ●● ● ● ●● ● ● ● ●● ● ● ●● ● ●● ●● ●●● ● ● ●● ● ●● ●● ● ● ● ●●● ● ● ● ● ●●●● ●● ●●●● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ●● ● ●● ● ● ● ●● ● ● ●● ●● ● ●● ● ● ● ● ●●● ● ● ● ● ● ●● ●● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ●●● ●● ● ●● ● ● ● ● ● ●● ●● ● ● ● ●● ●● ● ● ● ● ● ●●●● ● ●●● ●●●●● ●● ● ●● ● ● ● ● ●●●●● ●●●● ● ● ● ●● ●●● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ●●●●● ● ● ● ● ● ● ●● ●●● ● ● ●● ● ●● ●● ● ●● ● ● ● ●●● ● ●●● ●● ●● ● ●● ● ●●● ● ● ● ● ●● ●● ● ● ● ● ● ● ● ● ● ●●● ● ● ● ●● ● ●● ● ● ● ● ● ● ● ●● ● ●● ● ● ● ● ● ● ● ● ●● ● ●● ●● ● ● ● ● ● ● ● ● ● ●● ●●● ● ● ● ● ● ●● ● ●● ● ● ● ● ● ●● ● ● ● ● ●● ● ● ● ● ● ●● ● ● ●●● ● ●● ●● ● ● ● ● ● ●● ● ● ●● ●●●● ●● ● ● ●● ● ●● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ●● ●● ● ●● ●●● ● ● ● ● ●● ●●● ● ● ● ● ●● ● ●●● ●● ● ● ●●●● ● ● ● ●●● ● ● ●● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ●●● ●● ●● ● ●●● ●● ● ● ●● ●●● ●●● ●●● ● ● ● ●● ● ● ● ● ● ● ● ● ●●● ● ● ● ●●● ● ● ●● ●● ● ● ● ● ●●● ●● ● ●● ●● ● ● ● ● ● ● ● ● ● ●● ● ●● ● ●●● ● ● ● ● ● ●● ● ● ● ● ● ● ●●● ● ● ●● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ● ● ● ● ●● ●● ●● ● ●● ● ● ● ● ● ● ● ●● ●● ● ●● ● ● ● ● ● ● ● ● ● ● ●●● ● ● ● ●● ● ●● ●● ●● ●● ● ●● ● ●● ● ●●● ● ●● ● ● ●● ● ● ●● ● ● ● ● ● ● ● ●●● ● ● ● ●● ●●● ●● ● ●●● ● ●● ● ● ●●● ● ●●● ● ● ● ●● ● ● ● ● ● ● ● ● ● ●● ●● ●● ● ● ● ● ●●●● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ●● ● ● ●● ● ● ● ● ●● ● ●● ● ● ●● ● ●● ● ●● ● ●● ● ● ●● ●●● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ●● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ●● ●● ● ●● ● ●● ● ●● ●● ●● ● ● ● ● ●● ●● ● ● ●● ● ● ● ● ●● ● ●● ●● ●● ●● ●● ● ●●●● ●●●●●●● ●● ● ●● ● ● ●● ● ● ●● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ●●● ●● ● ● ● ● ● ● ●●● ● ● ●● ● ● ●● ● ● ● ●● ● ● ● ● ● ● ●● ●● ● ●●● ● ● ● ●●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ●● ● ●● ●● ●●● ●● ●●●● ●● ● ●●● ●● ● ● ● ●● ● ● ● ● ● ● ● ●● ●● ●●● ● ● ● ● ●●● ● ● ● ● ● ●● ●● ●● ● ● ● ●● ● ● ● ● ● ●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ● ● ● ● ● ● ● ● ● ●● ●● ● ● ●● ●● ● ●● ●●● ● ●● ● ●● ●●● ● ● ● ● ● ● ●● ●●● ● ● ● ●●● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ●● ● ● ●● ● ● ● ● ● ● ● ● ●● ● ● ● ● ●● ● ● ● ● ● ● ●● ● ● ● ● ● ●●● ● ● ● ●● ● ● ●●● ● ● ● ● ● ● ● ● ● ●● ●● ● ●● ●● ●●●●● ● ●● ●● ●● ● ● ● ● ● ● ● ● ● ●● ● ●● ● ● ● ● ● ●● ●● ● ●● ●● ●●●●●●● ● ●● ● ●● ●●●● ● ● ● ● ● ●● ● ● ●● ● ● ● ●● ● ●● ● ●● ● ● ● ● ●●●● ● ● ●● ● ● ● ● ●● ● ● ● ● ●● ● ● ●● ● ● ● ●● ● ● ● ● ●● ● ● ● ●●● ●● ● ● ● ● ●● ● ●●● ●● ●● ● ● ● ●● ● ● ● ● ●● ●● ● ● ● ●● ●● ●● ● ●● ● ●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ●● ●●● ● ● ● ●● ● ● ● ● ●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ●●●● ● ● ● ●●● ● ● ●● ● ● ● ● ● ●●●● ●● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ●● ●● ● ●● ●●●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●● ● ● ● ● ● ● ●● ● ● ● ●● ● ● ●●● ●●● ● ● ●● ● ● ●● ● ● ●●● ● ● ● ● ●● ● ● ● ●● ●●● ● ● ●● ●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ●●● ● ● ● ●● ● ●● ● ● ● ● ● ● ●● ● ●● ● ● ● ●●● ● ●●● ● ● ● ● ●●●● ●● ● ● ●● ● ●● ●● ● ● ● ●● ● ● ● ● ● ● ● ● ● ●● ● ●● ● ● ●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ●●●● ●● ●● ● ● ●● ● ● ● ●● ● ●● ● ● ● ●● ● ●● ● ● ● ●● ● ● ● ● ●●● ●●● ● ● ● ●●● ● ● ● ● ● ● ● ●●●● ● ●● ● ●● ● ● ● ●●● ● ●● ●● ● ● ● ● ●● ● ●● ● ● ● ●● ● ● ● ● ● ● ● ●●● ●● ● ● ● ● ●● ● ●● ●●● ● ● ●● ●● ● ● ●● ● ● ●● ● ● ● ●● ● ● ●● ● ● ●● ●● ● ●●●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ●● ●● ● ● ●●● ● ● ● ● ● ● ● ●●● ● ● ● ● ●● ● ● ●●●●●●● ●● ● ● ● ● ● ●● ● ● ●● ●● ● ● ● ●●● ●● ● ● ●●●● ● ● ●● ● ●● ● ●● ●● ● ●● ● ●● ● ● ●● ●●● ●●●● ●● ●●● ● ● ● ● ● ● ● ● ● ● ●● ●●● ● ● ● ● ● ●●● ● ● ●● ● ● ●● ● ● ● ●● ● ● ● ● ● ●● ● ● ●●●● ● ● ● ● ● ● ● ●●●● ● ● ● ● ● ● ● ● ● ● ●● ●● ● ● ●● ● ● ● ●● ● ● ● ●●● ● ●●● ● ●● ● ● ● ●● ● ● ●●●●●● ●● ● ●● ● ● ●● ● ● ●● ● ●● ● ●●●●●●● ● ● ● ●● ● ●●● ● ● ● ●● ●● ● ● ●●●● ● ● ● ●● ●● ● ● ● ● ●● ● ●● ●● ● ● ● ● ● ●●● ● ● ● ● ● ●● ●● ●● ●●●● ● ● ● ●● ● ●● ●● ●● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ●● ● ● ●●● ●●● ●●● ● ● ● ● ●●●●● ● ● ● ● ● ●● ● ● ●● ● ●●● ●●● ● ● ●●● ● ● ● ● ●● ● ● ● ●● ● ● ● ● ● ● ●● ● ● ● ●● ● ● ●● ● ● ● ● ●●● ●● ● ● ● ● ● ● ● ●●● ● ●●● ● ●● ● ●● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ●● ●● ● ●●● ● ● ● ● ● ● ● ● ● ● ● ● ●● ●● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ●●● ● ● ●● ● ● ● ● ●●● ● ● ●●●● ● ● ● ● ●● ● ● ● ● ●● ● ●● ●● ● ●● ● ● ● ●● ●● ● ●● ● ● ● ●● ●●● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ●●●● ●● ●● ● ● ●● ● ● ● ● ● ● ●● ● ● ●● ● ●● ● ● ● ●● ●● ● ●● ● ●● ●● ● ● ● ● ● ●● ● ● ●● ● ● ● ● ● ●●● ● ● ● ●● ● ● ●●● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ●●● ●● ● ●●●●● ● ● ● ● ●● ●●●● ● ● ●● ● ● ● ● ● ● ● ●●● ●● ● ● ● ● ●●●●● ● ● ● ● ● ●● ● ●●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ●● ● ●●● ● ● ● ●● ● ● ●●● ● ●● ●●● ● ● ● ●● ●● ● ● ●● ● ● ●● ●●● ●● ● ●● ●● ● ● ● ●●● ● ●● ● ● ●●● ● ● ●●●● ●● ●● ● ● ●● ●● ● ● ● ●● ● ●● ● ● ● ● ●● ● ● ● ●● ●● ●● ●●● ●● ●● ●● ● ●● ● ● ●● ● ●● ● ●●●● ● ● ●● ● ● ● ●● ● ● ●● ●● ●●● ● ● ● ●● ● ● ●●● ● ● ● ● ●● ●● ● ● ●● ● ●● ● ● ●● ● ● ● ●● ● ● ● ● ● ●● ●● ●● ● ● ● ●● ● ●● ●● ●● ●●● ● ●● ● ● ● ● ●● ● ● ● ● ● ●●● ● ●●● ●● ●● ●●● ● ●● ● ●● ● ● ●●● ● ● ●● ● ● ● ●● ● ●●● ●●● ●●● ● ● ● ● ● ● ●● ● ● ●●● ● ●● ● ● ● ● ● ●● ● ● ●● ●● ●●●● ● ●●●● ● ●● ● ● ● ● ● ● ● ●●● ●● ● ●● ● ● ● ●● ● ● ● ●● ●●●● ● ● ● ●● ● ● ●● ●● ● ● ● ● ● ● ● ● ●● ● ●● ● ● ● ●● ● ●● ● ●● ●●● ●● ● ●● ● ● ● ● ● ●●●●● ● ●●● ● ● ●● ●● ● ● ● ● ● ●● ● ● ● ● ●● ●● ●●●●● ● ● ● ●● ● ● ● ● ●● ● ● ● ● ● ●● ●● ● ● ● ●● ● ●●● ● ● ● ● ● ● ● ●● ● ● ● ● ●● ● ● ●● ●● ●● ● ● ● ● ● ● ●● ● ● ●●● ●●● ● ● ● ● ●●●● ●● ● ● ● ●● ● ● ● ● ●● ● ● ●●● ●●●●●● ● ● ●● ● ●● ● ●●● ● ●● ● ● ● ● ●● ● ●●●● ● ● ●●●● ●●● ●●● ●● ●● ● ●● ●● ●● ● ● ● ●● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ●● ● ● ●● ● ●● ● ●● ● ● ●●● ● ●● ●● ●●●● ● ● ● ● ● ●● ●● ●●●● ● ● ● ● ● ● ● ● ● ●● ● ● ● ●● ●● ● ●● ● ● ● ● ●●●● ● ● ● ●● ● ● ● ● ●●● ● ● ● ● ●● ●●● ● ● ●● ● ●●● ●● ● ●● ● ● ● ● ● ●● ● ●● ●● ●● ●●● ●● ● ● ●● ●● ● ● ●● ●● ● ●● ● ● ● ● ● ●●● ● ● ●● ● ● ● ● ●● ●● ● ● ● ● ● ● ● ● ●●●● ● ●●● ● ●● ● ●● ● ●● ● ● ● ●● ● ● ● ● ● ● ●● ● ● ●●● ●● ● ● ● ● ● ●● ● ● ● ● ● ● ●● ● ● ● ● ● ●● ●●●● ● ●●● ● ● ●● ● ● ● ● ● ●●● ● ● ● ● ●●● ● ●● ● ● ● ● ● ● ● ●● ● ●●● ● ●●● ● ● ● ● ● ● ● ● ●● ● ● ●● ● ● ●●● ● ●● ● ●● ●●● ●● ●●● ●● ● ● ● ● ● ●● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ●●●● ● ● ●● ●●●● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ● ● ●● ● ● ● ● ●●● ● ● ●● ● ● ●●●● ●● ●● ● ● ● ● ● ● ● ●● ● ●● ● ● ● ●●● ● ● ● ● ● ●●●● ● ● ●●●●● ● ●● ●●● ● ●● ●● ●●● ● ● ● ● ●●● ● ●●● ● ● ●● ● ● ● ●● ● ● ● ●● ● ● ● ● ●● ●● ● ●● ●●● ● ●● ● ● ●● ● ● ● ● ●● ● ●● ●● ●● ● ●●● ● ●● ● ● ● ● ●●● ● ● ● ●● ●● ●● ●●● ●● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ●● ● ● ●● ● ●● ● ● ● ●●● ●● ● ● ● ● ●● ● ●● ●●●●●●●●●● ● ● ●● ● ● ● ● ●● ●● ● ● ● ●● ●●●● ● ● ● ●● ● ●●● ●● ● ● ● ● ● ●●● ● ● ● ● ●● ●● ● ●●● ● ● ● ● ● ● ● ●● ●●● ● ● ● ● ● ● ● ● ● ● ●●●● ● ● ● ●●●● ● ● ●● ● ● ● ● ●● ●● ● ●● ● ● ● ● ● ●● ● ● ● ●● ● ●● ●●● ● ●●●●● ● ● ● ● ● ●● ●●● ● ● ●●● ● ● ● ● ●● ●●● ●● ● ● ● ●● ●●●● ● ●● ● ● ● ● ● ●● ● ● ● ●●● ● ● ● ● ● ● ● ● ● ●● ●●● ● ● ●● ●● ● ●●● ● ● ● ● ● ● ●● ● ● ● ● ●● ●● ● ● ● ●●● ● ● ●● ● ● ●● ●●● ●● ● ●● ● ●● ●● ●●● ● ●●● ● ●● ● ● ● ● ● ● ●● ●● ● ● ● ● ●● ●● ●● ●●● ● ● ●●● ● ●● ● ● ● ● ● ● ● ●● ●● ●● ● ● ● ● ●● ●● ●●● ● ● ●●● ● ● ●●●● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ●● ●● ● ●●● ● ●● ●● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●●●●● ●● ● ● ● ●● ● ● ●● ● ● ● ●●● ●●● ● ● ● ● ● ●●● ● ● ● ● ●● ●● ●● ●● ● ● ●● ●● ● ● ● ●● ● ● ● ● ● ● ●● ● ● ●● ●● ● ● ● ●● ● ● ● ●● ● ●● ●● ● ●● ● ● ● ● ● ● ● ●● ● ●●● ● ● ● ●● ● ●●● ● ● ● ● ●● ●● ●● ● ● ● ●●● ● ● ●● ●●● ● ● ● ●● ●● ● ● ●● ● ● ●● ● ● ● ● ● ● ● ● ● ● ●● ● ● ●● ● ● ●● ● ● ● ● ●●●● ●● ● ● ●● ● ● ● ●● ● ● ● ●● ● ●● ● ●● ● ● ●●●●●● ●● ●● ●● ● ●● ●● ● ● ● ● ● ● ● ●● ● ● ●● ● ● ●● ●● ● ● ●●●● ●● ● ●● ●● ● ● ●● ● ●●● ● ●●● ● ● ● ●● ● ● ● ● ●●● ● ●● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ●●● ● ● ● ● ●● ● ● ● ● ● ●● ● ●● ● ● ● ● ●● ● ● ● ● ●●●● ●● ●● ● ● ● ● ●●● ● ●●●● ●● ● ●●● ● ● ● ●● ●●● ● ● ● ● ● ● ● ● ● ● ● ●● ●●●● ●●●● ●● ●● ● ● ● ● ●●●●● ●● ● ● ●● ● ● ● ● ●●●● ● ● ● ● ● ● ● ●●● ● ●● ● ● ● ●● ● ● ●● ● ● ●● ●● ● ●● ● ● ● ● ● ● ●● ●● ●● ●● ●● ● ●● ● ● ● ● ●●● ●●● ● ●● ● ● ● ●● ● ● ● ● ● ● ●●●●●● ● ● ● ●● ● ● ● ● ●● ●● ●● ● ●● ● ● ● ●● ● ●● ● ● ● ●● ● ●●● ● ●● ● ● ● ● ● ● ●● ● ● ● ● ●● ● ● ● ●● ● ●● ● ●● ● ● ● ● ● ●●●● ● ● ● ● ● ● ● ●●●●● ●●●●● ●● ● ● ● ● ●● ●● ● ● ● ● ●● ● ●●●● ● ● ● ● ● ●● ●● ● ● ●● ● ● ●● ●● ●● ● ● ●● ●● ● ●● ●●● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ●●●● ● ● ● ● ● ●● ● ●● ● ● ● ● ● ● ●● ● ● ●● ● ● ●● ● ● ● ●● ● ● ● ● ● ● ● ● ●● ●●● ● ● ● ● ● ●●● ● ● ● ●●●● ● ● ● ● ●● ●●● ●●● ●● ● ●● ● ● ● ● ● ●● ● ●● ● ● ●●● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ●●● ●● ●● ●● ● ●● ● ● ●● ● ●● ● ● ● ● ● ● ● ● ●● ● ● ● ● ●● ● ●●● ● ●● ●● ● ●● ● ● ● ● ●● ● ●● ● ●●● ● ● ● ● ● ●● ● ●● ●● ● ● ●● ● ●● ● ● ● ● ● ●● ● ● ● ● ●● ● ● ●● ●● ●● ●● ● ●● ● ● ●● ●● ● ● ● ● ● ● ●● ●●● ●● ●● ●● ● ●● ● ● ● ● ●● ● ● ● ● ●●● ●● ●● ●● ●● ● ● ● ●● ● ● ● ● ● ●●● ● ● ● ● ● ●● ●●● ●●● ●● ● ● ●●● ●● ● ● ●● ● ●●● ●● ●●●● ● ● ● ● ●● ●● ● ●● ● ● ●●● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ●● ● ● ●● ●●● ● ● ● ●●● ● ● ●●● ● ●● ●● ● ● ● ●● ● ● ● ●● ● ● ●●● ● ● ● ● ● ● ●● ● ● ● ● ● ● ●● ● ●● ●● ● ● ● ● ●● ●● ● ● ● ● ● ●●● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ● ● ●● ●●● ● ●● ●● ●● ●●● ● ● ●● ● ● ●● ● ●● ● ● ● ● ●●● ● ●● ●●● ● ● ● ●● ● ● ● ●● ● ●● ● ● ● ● ● ● ●●● ●● ● ● ● ●● ● ●● ●● ● ● ● ●● ● ● ● ●● ● ●● ● ● ●● ●● ● ● ● ●●● ● ● ● ●●● ● ●● ● ● ●● ● ●●● ● ●● ● ● ● ● ●● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ●●● ● ● ● ● ● ● ●●● ●● ● ● ● ● ● ● ● ● ● ●●● ●●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ●● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●●● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ●●●●● ●●●● ● ● ●●● ●● ● ●● ● ● ●● ●● ●● ●● ● ● ● ● ●●● ● ● ● ● ● ● ● ●● ● ● ●● ●● ●● ●● ●● ● ● ● ●●● ● ● ● ●●●● ●● ●● ● ●●● ● ● ● ● ● ●●● ● ●● ●● ● ● ● ●●●● ● ●● ● ● ● ●● ●●●● ● ● ● ● ●● ● ● ●● ● ● ●● ● ●● ● ● ●● ● ●● ● ● ● ● ● ● ● ●● ●● ● ●●● ● ● ● ● ●●● ● ● ● ● ● ● ● ● ● ● ●● ● ● ●● ● ● ● ● ● ●●●● ● ● ● ●●● ● ● ● ●● ●● ●● ● ● ●● ●● ● ●● ● ● ● ● ● ● ●● ● ●●● ● ●●●●● ●● ●●● ● ● ● ● ● ● ● ●●● ● ● ●● ● ● ●●● ● ● ● ● ● ● ●● ●● ● ● ● ●●●● ● ● ●● ●● ● ● ● ● ● ● ●● ● ● ●●● ● ● ●●● ● ●● ●● ●● ● ● ● ● ● ● ● ● ● ● ●● ●● ● ●●● ● ● ●●● ● ● ● ● ● ● ● ●●●● ● ●● ●● ● ● ● ●●●●● ● ● ● ●● ●● ● ● ●● ●●● ● ● ● ●● ●●● ● ● ●● ●● ●● ● ● ●● ● ● ● ● ● ●● ● ●●●● ● ●● ● ● ● ● ● ● ●● ● ● ● ●● ● ●●● ● ● ● ● ● ● ● ● ●● ● ●● ●●● ●● ● ● ● ● ● ● ●● ● ● ● ● ●●● ● ● ● ●● ● ● ● ● ●●●●● ● ● ●● ●● ● ● ● ● ●●● ●● ● ● ●● ● ● ●● ●● ●● ●● ● ● ● ● ●●● ● ● ● ● ● ● ● ●● ● ●● ● ●● ● ●● ● ● ● ●● ●●● ●● ●● ●● ● ● ●●●●● ●●● ● ● ● ●● ● ●● ● ● ● ●● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ●● ● ● ● ● ● ● ●● ● ● ● ●● ● ● ●●● ● ● ● ● ● ● ●●● ● ● ● ● ● ●●●● ●●●● ● ● ●● ● ●● ● ● ●● ● ● ● ● ● ● ● ● ● ●● ●● ● ● ● ● ● ● ● ● ● ●●●●●●●● ● ● ●●● ● ● ●● ●● ●● ●●● ●● ●● ● ● ● ● ●● ● ● ● ●●● ●●● ●● ●● ●● ● ●●● ● ● ● ● ● ● ●● ●● ● ● ● ● ● ●● ● ● ●●● ● ●●● ● ●● ●● ●● ● ● ● ● ●●●● ● ● ● ● ● ●● ●● ● ● ● ● ●● ● ● ● ●●● ● ● ● ● ● ● ● ●●●●● ● ● ● ● ● ●● ●● ● ● ● ●●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ●●● ●● ●● ● ● ● ● ● ●● ● ● ●● ● ●● ●● ●● ●● ●●● ● ● ● ● ●● ● ●● ● ●● ● ● ● ● ●● ● ● ●● ● ● ● ● ● ● ● ●● ●● ●● ● ● ● ● ●● ●● ● ●● ●● ● ●● ●● ●● ● ● ● ● ● ●● ● ●● ●● ● ● ●● ●● ●●●● ● ●● ● ●● ● ● ● ●● ● ● ●●● ● ●● ●●● ● ● ● ●●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●●●● ●● ● ●● ●● ● ● ● ● ● ● ●● ● ● ●● ●●● ● ● ●● ●● ● ● ● ●● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ●● ● ● ●●● ●● ●● ● ●● ● ● ● ● ●● ● ●● ● ●● ● ● ●● ● ● ● ●● ● ●● ●● ● ●● ● ● ●● ● ● ●● ● ●● ●●● ● ●● ● ●●●● ● ●● ●● ●● ● ● ●●● ● ● ●● ● ●● ● ●● ● ● ● ● ●● ● ● ● ●● ● ●● ●● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ●● ● ●●● ●●●● ●● ●●● ● ●● ● ●● ● ● ●● ● ● ● ●● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ●●● ● ● ● ● ● ●● ●● ● ●● ● ● ● ●●● ● ● ●● ●● ● ●● ● ● ● ● ●●● ● ●● ● ● ● ● ● ●●● ● ●● ●●● ● ● ● ● ●● ● ● ●● ● ●● ● ●●●● ● ● ● ●● ● ● ●● ● ●● ● ●●● ●● ● ● ● ● ● ● ● ● ●●●●●● ● ● ● ●● ●● ● ● ●● ● ● ● ● ● ●●● ● ●●● ●● ● ● ● ● ●●● ● ● ● ● ●● ● ●● ●● ● ●● ● ● ● ● ●●● ● ●●●● ●● ● ● ●● ●● ● ●●● ● ●● ● ● ●●● ● ● ● ● ● ● ●● ● ●● ● ● ● ●● ● ● ● ● ● ●● ● ● ●● ●●● ● ●● ● ●● ● ● ●● ●● ● ● ● ●● ● ●● ●● ●●● ● ● ●● ●●● ● ●● ● ● ● ● ●● ●● ● ● ●● ● ●● ●● ● ● ● ●● ● ● ●●● ● ● ● ● ●● ●●● ●● ● ● ●●● ● ● ●● ● ●●● ● ● ●● ● ● ●●● ● ● ● ● ●● ●● ● ●● ●●● ●●●● ●● ● ● ● ●●● ● ● ●● ● ● ● ● ●● ● ●● ●●● ●● ●● ●● ●● ● ●● ●● ●●● ●● ● ●● ● ●●● ● ● ● ● ● ● ●● ● ● ● ●● ●●● ●● ● ●● ●●● ●● ●● ● ● ●● ● ● ● ● ● ● ● ● ● ●● ●●●● ● ● ● ● ●● ● ● ● ● ● ● ● ●●● ● ● ●●● ● ● ● ●● ●● ●● ●● ● ● ● ● ● ● ●● ● ●● ● ● ● ● ● ● ● ● ●●● ● ● ● ● ● ● ●● ● ● ●● ●● ● ● ●● ● ●●● ● ● ● ●●● ●● ● ● ●● ● ● ● ● ● ● ● ● ● ●●●●●●● ● ● ●● ● ● ●● ● ●●●● ●● ●● ● ●● ● ●● ● ● ●● ● ●● ● ● ●●● ●● ●● ● ● ●● ● ● ● ● ●● ● ● ● ●● ● ● ●● ● ● ● ●●●● ● ● ● ●●● ● ● ● ●● ●● ● ● ●●● ● ● ● ● ●● ● ●● ● ● ●●●● ●● ● ● ● ●● ● ● ●●● ● ● ●● ●● ●● ● ● ●● ● ●●●● ● ● ● ●●● ● ●● ● ●●● ● ● ● ●● ●● ●● ● ●● ●● ●● ● ● ● ●● ● ●● ●● ● ● ● ●●●● ●● ●● ● ● ● ● ● ● ● ● ● ●●●● ● ●● ●●●● ●●●● ●●● ● ● ●● ● ●● ● ● ● ● ● ●● ●● ●● ● ●● ●●● ●● ●● ●● ●● ● ● ● ● ●● ● ● ● ● ●● ● ● ●● ● ● ● ●● ●● ● ● ●● ● ●● ● ●● ● ● ●● ● ● ● ●● ●● ● ● ● ● ● ● ● ● ● ●● ● ●● ●● ● ● ● ● ● ● ● ●● ●● ● ● ● ●●● ● ●●● ● ● ● ●● ●● ● ● ●● ● ●● ● ●● ●●● ● ●● ● ● ● ●● ● ● ●●● ● ● ● ● ● ●● ● ● ● ● ● ● ●● ● ● ● ● ● ●●●● ● ● ● ● ●● ●● ● ● ● ●●● ● ● ● ● ● ●●●● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ●● ● ● ● ● ● ●● ●● ● ● ● ● ● ● ● ● ●● ● ●● ●● ● ●●●●●● ●● ● ● ● ● ● ● ● ●● ● ● ● ●● ● ● ● ●● ● ●● ● ● ● ● ● ● ● ● ● ●● ● ● ●●●●● ● ● ● ● ● ● ● ●● ● ● ●●●● ● ● ● ●●●● ● ● ● ● ● ●● ● ●● ● ●●● ●● ●● ● ● ● ● ● ●● ●● ● ● ● ● ● ● ●● ● ● ● ● ● ● ●● ● ●●●● ●● ● ●● ●● ●● ●● ● ●● ●● ● ● ● ● ● ● ●● ● ● ● ●●●● ●●● ● ● ● ● ● ● ●● ●● ● ●●● ● ● ● ● ●● ● ●● ●●●● ● ● ● ●●● ● ● ●●● ● ●●●●● ● ● ● ● ●● ● ●● ● ●● ●● ●● ● ●● ●● ●●●● ● ● ● ● ●●●● ● ● ● ●●● ● ● ● ● ● ● ● ● ●●● ● ● ●● ● ●● ●● ● ● ●● ● ● ●● ● ● ●● ●● ●● ●●●● ●●● ●● ● ● ●● ●●● ● ● ●● ● ● ●● ●● ● ● ●●●● ● ●●● ● ● ● ● ● ● ● ● ● ●●● ● ●● ●● ●● ● ● ● ● ● ● ● ● ●●● ● ● ● ●● ● ●● ● ● ● ● ● ● ●●● ● ●● ● ●● ● ● ●● ● ●● ●● ● ● ● ● ●● ●● ●●●● ●● ●● ● ●●● ● ● ● ● ● ● ● ●● ● ● ● ●● ● ●●●●●● ● ● ●●● ● ●● ● ● ● ●●●● ● ● ● ● ●● ●●● ● ● ● ● ● ●● ●● ● ● ● ● ● ● ● ●● ● ●● ● ●●● ● ● ●● ● ●●● ● ● ●● ●● ● ● ● ● ●● ●● ● ●● ● ●●● ● ● ●● ● ●● ●● ● ● ● ●● ● ●● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ●●●●●● ● ● ● ● ● ● ● ● ● ●● ●● ●● ● ● ●● ● ●● ● ● ●● ● ● ● ● ●● ● ● ● ●● ● ● ● ● ●● ●● ●●● ● ●●● ●●● ● ● ● ●● ●●● ● ● ● ● ●● ● ● ● ● ● ● ● ●●●● ●●●● ● ● ● ● ●● ● ● ● ●● ● ● ● ● ● ● ● ● ●● ● ●● ● ●●●● ● ● ● ● ● ●● ● ●●● ● ●● ● ● ● ● ● ●●● ●● ● ● ● ● ●● ● ● ●● ● ●● ● ●● ● ● ● ● ●● ● ● ● ● ●●● ● ●● ●● ● ●●● ● ●● ●●● ●● ●●● ●●● ● ● ●●● ● ●● ●●● ● ●● ●● ● ●● ● ● ●● ● ● ●●●●● ● ● ●● ● ● ● ● ● ●● ● ●●● ● ● ●● ● ● ● ●● ● ● ●●● ● ●● ● ●●●● ● ● ●● ● ● ● ●● ●● ● ● ● ●● ● ●● ● ● ● ● ● ● ● ● ● ● ●●● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●●●● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ●●●● ● ● ● ● ● ●● ● ●●●●● ● ●●●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●●● ● ●● ●●● ● ●●● ● ● ● ● ● ● ● ● ● ● ●● ●●●●●● ● ● ●● ● ● ● ● ●●●●● ● ●● ● ● ● ● ●● ● ●● ● ● ●● ●● ● ● ●●● ● ●● ● ● ● ● ●● ● ● ● ● ●●● ●● ● ●●● ●● ● ● ●●● ●● ●●● ● ●● ● ● ●● ● ● ●● ● ● ●● ● ● ●● ● ● ● ●● ● ● ● ● ● ●● ● ●●●●● ● ●● ● ●●● ● ●●●● ●● ● ● ● ●●●● ●●● ●● ●● ● ● ● ●● ● ● ● ●● ●● ●● ● ● ● ●●●● ● ● ● ● ● ● ●● ●● ● ● ●● ● ●● ● ● ● ● ● ● ●● ● ● ● ●● ●●● ● ● ●● ● ● ●● ● ●● ● ● ● ●● ● ● ● ● ● ● ● ● ●● ●● ●●● ● ● ● ● ● ● ● ● ●● ● ●● ●● ●● ● ●● ● ● ● ●● ● ●● ● ●● ● ● ●● ● ● ● ●● ● ● ● ● ● ● ●● ●●● ● ● ● ● ● ●● ●●● ● ● ●● ● ● ● ●●●● ● ●●● ● ●●● ● ● ● ●●● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●● ● ● ● ●● ●●● ● ● ● ● ●● ● ●● ●● ● ●● ● ● ● ●● ● ● ● ● ● ● ●● ●● ●● ●● ● ● ● ●● ●● ● ●● ● ● ● ● ● ● ● ● ●● ●● ● ● ●● ●● ● ●●● ● ● ● ● ●● ●● ● ● ●● ●● ●● ● ●●● ●● ● ● ●● ●●● ● ● ●● ● ●●● ● ●●● ● ●●● ●● ● ●● ● ●● ● ● ● ●● ● ● ●● ●● ●●● ● ● ●● ● ● ●●●● ●●●● ● ●● ●● ● ●● ● ● ● ● ●● ● ● ●●● ●●●● ● ● ● ● ● ●● ●● ● ●● ● ● ● ●● ●● ●● ● ● ● ●●●●● ●● ● ●● ● ● ● ●●● ●●●● ● ●● ●●● ● ●●● ●● ● ● ●● ● ●●● ● ● ● ●● ● ●●● ●● ● ● ● ● ●●● ● ●● ● ● ●●● ●● ●● ●●●● ● ●● ● ● ●● ●●●● ● ● ●● ● ●●● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ●● ● ● ●● ●●● ● ● ●● ● ● ● ● ● ●● ●● ●● ●●● ● ● ● ● ● ●● ●● ● ● ● ● ●● ●● ● ● ● ● ● ● ● ● ●● ●●● ● ●● ● ● ● ●●● ● ●● ● ●● ● ● ● ●●● ● ●● ● ● ● ● ● ● ●● ●● ● ● ●●● ●●● ● ●● ● ●● ● ●● ●● ● ●● ● ● ● ● ● ● ● ●● ● ●● ● ●● ● ● ●● ●●●●●● ●● ●●● ● ● ● ●● ● ● ● ●● ● ●●● ● ● ● ● ● ● ●● ●● ●● ● ● ● ● ● ● ● ●● ●● ● ● ● ●● ●●● ● ● ● ● ● ● ●● ●●● ● ●● ● ●● ●● ● ● ●● ●● ● ● ● ● ● ●● ● ●●● ●●●●● ● ● ●●● ●● ● ●● ● ● ● ●● ●● ● ●● ● ● ● ● ● ● ●● ● ● ● ● ● ●●● ●●● ●● ●● ●● ●●● ● ●● ● ● ● ● ● ● ● ● ●●● ● ●● ● ● ● ● ● ● ● ● ●● ●● ● ●● ● ●● ●●● ● ● ● ● ● ● ●● ● ● ● ● ●●● ● ● ● ●● ● ● ● ● ●●● ● ●●●● ● ● ● ● ● ●● ●● ●● ●● ●● ● ● ● ● ● ● ● ● ● ● ● ● ●●● ●● ●●● ●● ● ● ● ●● ● ● ● ● ● ● ● ● ●● ●● ●●● ● ● ● ● ● ● ● ● ●● ● ●● ●● ● ● ●● ●●● ● ●● ● ●● ● ● ● ● ● ● ● ●●● ●● ●●● ● ●● ● ● ● ● ●● ●● ● ● ●● ● ● ●● ●● ●● ● ●● ●●●● ● ●● ●● ● ●● ● ● ● ● ● ●●●● ● ●● ● ●●● ●●●● ● ●● ● ●● ● ●●● ● ● ●●● ●● ● ● ●● ● ● ● ● ●● ●●●● ●● ● ● ●● ● ● ●● ●● ●● ● ● ● ● ●● ●●● ● ●● ● ● ●● ● ●● ●● ● ●● ●●● ● ● ● ●● ● ● ●● ● ● ● ● ●● ● ●● ● ●● ●●● ● ●● ● ● ● ● ●● ● ● ● ● ●● ● ● ●● ● ● ●● ● ●● ●● ● ●●● ● ● ● ● ● ● ● ● ● ●● ●● ●● ● ● ● ●● ● ●● ●● ●● ● ● ●● ● ● ●● ●● ● ●●●● ● ● ● ● ● ● ● ●● ● ●● ● ● ● ● ● ●● ●● ● ● ● ●●● ● ● ●●●●● ● ●● ● ● ● ●● ●● ● ● ● ● ●● ●● ●●● ● ●● ● ●● ● ● ● ● ● ● ●● ●● ● ● ●● ●● ● ● ●● ● ● ●● ●●●● ● ● ● ● ● ● ●●● ● ● ● ● ● ●●● ●● ●● ● ●● ● ●●●● ●● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ●● ● ●● ●● ● ●● ● ●●● ● ● ● ● ● ● ●●● ●● ● ● ● ● ● ● ●●● ●● ● ● ● ● ●●● ●● ●● ●● ● ● ● ●●●●● ●● ● ● ●●● ●● ●● ● ● ● ●● ●● ●● ● ●● ●● ● ● ● ● ●● ● ● ● ● ●●●● ● ●● ● ● ● ● ● ● ● ●● ● ● ●● ●● ● ● ● ● ● ●● ●●● ●●● ● ●● ●●● ● ● ● ●● ● ●●● ● ● ●● ● ●● ● ● ● ●● ● ●●● ●● ● ● ● ● ●● ● ●● ● ● ● ●● ●●●●● ● ●● ● ● ● ●●● ●● ●● ● ● ● ● ● ● ● ●● ● ● ●● ● ●●● ●● ●● ● ●● ● ● ● ● ● ● ● ●● ●●● ● ● ● ●●● ●● ● ●● ●● ●●●● ● ●● ● ● ●● ● ●●●●● ● ● ● ●● ● ● ● ● ● ● ●● ● ● ● ● ●● ●● ●● ● ● ● ● ●● ● ● ● ● ● ● ●● ●● ● ● ● ●● ● ● ●● ● ● ● ●● ●● ● ● ● ● ● ●● ● ● ●● ● ● ● ● ●●●●●●● ● ● ●● ●● ●● ● ● ● ● ● ● ● ● ●● ●● ● ● ● ● ●● ●● ● ●● ● ● ● ● ●● ●● ●● ● ●● ●● ● ● ● ●● ● ● ●● ●●● ● ●●● ● ● ● ● ● ●● ●● ● ● ● ● ●●●●●● ● ●● ● ● ● ● ●● ●●● ● ● ●● ● ● ● ●●●● ● ● ●● ● ● ●● ●● ●●● ● ●● ● ●● ●● ● ●● ● ●●● ● ● ● ● ●●● ● ●● ●● ●● ● ●● ●● ●● ● ● ● ● ● ● ●● ●● ● ●● ● ● ● ●● ● ●● ● ● ●●● ●● ● ● ● ●●● ● ● ●● ●● ●● ● ● ●● ● ●●● ●●●● ● ● ● ● ●● ● ● ● ●● ● ● ● ●● ●●● ● ●● ●● ●●●● ●●● ● ● ●● ●●● ●● ● ● ● ● ●●● ● ● ●●● ● ● ● ●● ● ● ● ●● ● ● ● ● ● ● ●● ●●● ● ●●●● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ●● ●● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●●● ● ●●●●● ● ● ● ●● ●● ● ● ●● ● ● ● ●● ●● ● ●● ● ● ● ●● ● ● ●● ●● ● ● ●● ● ● ● ●●●● ● ●●● ●● ● ● ●● ●●● ●●●● ● ● ● ●●● ● ●● ●● ● ●● ● ● ●● ●● ●● ● ●● ● ●● ● ● ● ●●●● ● ● ● ●● ● ● ●● ● ● ●● ● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ●● ● ●● ● ● ● ●● ● ● ●● ● ● ● ●● ● ● ● ●● ●● ● ● ● ● ● ● ● ● ●● ●● ● ● ● ●● ● ● ● ● ● ●● ● ● ● ●● ● ● ● ●● ●● ● ● ● ● ● ●●● ●● ● ● ● ● ●●● ● ● ● ●● ● ● ●● ●●● ● ● ● ● ●●●● ● ● ● ●●●●● ● ● ● ●●● ● ● ●● ●● ● ●●● ● ●●●●● ● ● ● ● ● ● ●● ● ●●● ● ● ●● ● ● ● ● ● ● ●● ● ● ● ●●● ●●● ●●●● ●● ● ● ●● ● ● ● ● ●● ● ●●● ● ● ● ● ●● ● ●● ● ●● ● ● ● ● ●● ●●● ● ● ●●●● ● ● ● ●● ● ● ● ●● ●● ● ● ● ●● ●●●● ● ●●●● ● ● ●● ●●●●● ● ●● ●● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ●● ●● ●● ●●● ● ● ● ●● ● ● ● ●● ● ● ● ● ●● ●● ● ●● ● ● ● ● ● ●●●● ● ● ●● ● ● ●● ●● ●● ●●●●●●● ● ● ●● ● ● ●● ●● ●● ●● ●● ● ●● ●● ●●●● ● ● ● ● ●●● ●● ● ●● ● ● ●●● ● ● ●●● ● ●● ● ● ●●● ● ● ●● ● ● ● ●● ● ● ● ●● ●● ● ●● ● ● ●● ●●● ●●●● ● ● ●● ● ●● ●● ● ● ● ● ● ●● ● ● ●●● ● ● ● ● ●●● ● ● ● ● ● ● ●● ●● ● ●●● ● ● ●●● ● ● ●●● ●● ● ●● ●●●● ●●● ● ●●● ● ● ●●●●● ● ●●● ● ● ● ● ● ● ● ● ●●● ●●●● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ●● ●● ● ● ● ● ● ● ●●●● ● ●●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ●●●●● ● ● ● ● ●● ●●● ● ● ● ● ● ● ● ●● ●●●●● ● ●● ● ● ● ● ● ● ● ● ● ●●●● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ●● ● ● ● ● ● ● ●●●● ●●● ●● ● ●●● ● ● ●●● ● ●● ●● ● ● ● ●●● ● ● ● ● ● ● ●● ●● ● ● ●●● ●● ●● ●● ● ●●●● ● ● ● ● ●●● ●● ● ●● ●● ●● ● ●● ● ● ●●● ● ●● ● ● ● ● ●● ●● ●●●●●● ● ● ● ● ● ●● ● ● ● ●● ● ●● ●● ● ●●● ●● ●● ● ●●●●● ● ●●●●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●● ● ● ●●● ● ●●● ● ● ● ●● ●●● ● ● ● ● ● ●●●●● ● ● ●●● ● ●● ● ● ● ●● ● ● ● ●● ● ●●● ● ●● ● ● ●● ● ● ●● ● ● ● ● ● ● ●● ● ● ● ● ●● ●●● ●● ●●●●●●●●●●● ● ● ● ● ●● ● ●● ●●● ● ● ● ● ●● ● ● ●● ● ●● ●● ● ● ● ●●● ●● ●●●● ● ● ● ● ● ● ●●● ● ● ● ● ● ● ● ● ● ●● ● ●●● ●● ● ●● ● ●●● ●● ●● ● ● ● ●●●● ● ●● ●● ●●●● ● ●● ● ● ●● ● ●● ●●● ● ● ●●● ● ● ●● ● ● ● ● ● ● ● ● ● ●● ●●● ● ● ● ● ●●● ● ●● ● ●● ●● ●● ● ● ● ●● ● ●● ● ● ● ● ●● ●●● ● ● ●● ● ● ● ● ● ● ●● ● ● ●● ●● ● ● ● ●● ●● ● ●●●●● ● ● ● ●● ●● ● ● ● ●●● ● ● ●● ● ● ● ● ●● ● ●● ● ●● ● ●● ●● ● ●●● ●● ● ● ●● ● ● ●● ●● ●●● ● ● ●● ●● ●●● ●●● ●● ● ●● ●● ●● ● ● ● ● ●● ●● ● ●● ● ●● ● ● ● ●● ●● ● ● ● ● ● ●● ●●● ●●● ● ●● ●●● ● ●● ● ●●●● ● ● ● ● ● ●●●●● ●● ●●● ● ●● ● ● ●●●● ●● ● ●●●● ●● ●● ● ● ●●● ●● ●● ● ●● ●● ● ● ● ●●● ●●● ● ●● ● ● ● ● ● ●●● ●● ●● ●● ● ●● ● ●● ● ●●● ●●●●● ● ● ●● ●● ●●● ● ●●● ● ● ● ●●● ● ●●●● ● ●● ● ●●● ●● ● ● ●● ● ● ● ● ● ●● ● ●● ● ●● ●● ● ● ●● ●● ● ● ●●●●●● ● ●● ● ● ●●● ●●● ● ● ●● ●● ●● ● ● ● ●●● ●● ●● ● ● ● ●●● ● ● ● ● ● ●● ● ●● ● ●●●● ● ● ●● ● ● ● ●● ● ●● ● ● ●● ●● ●● ● ●● ● ●● ● ● ● ●● ● ● ●● ● ● ● ● ●● ● ●●● ● ●● ●●● ●● ● ● ●● ●● ● ●●●● ● ●● ●● ●● ●●● ●● ● ●● ● ● ●● ●●●● ● ● ●● ● ● ● ● ●● ●● ●●●● ● ● ●● ●●● ● ●●● ● ● ●● ●● ● ● ● ● ● ● ● ●● ●●● ●● ● ● ●● ● ● ● ●●● ●●● ●● ● ● ● ●● ● ●● ●●● ● ● ●●● ●●● ● ●● ●●●●● ● ● ● ● ● ● ● ● ● ●●● ● ●● ● ● ●● ● ● ● ●● ●● ●● ● ● ●● ● ●● ●● ● ● ●● ● ●● ●● ●● ● ● ●● ● ● ●●● ● ● ●● ●●● ● ●● ● ●● ●● ●● ● ● ●● ● ●● ● ●● ●● ●●● ● ●●● ● ● ● ●●●● ● ● ● ● ●● ●● ● ● ● ● ● ●●●● ● ● ● ● ● ●● ●● ●● ● ● ●●●● ●●● ●● ● ●●● ● ●● ● ● ●●●● ●●● ● ●● ●● ● ● ● ● ●● ● ● ● ●●●● ●● ● ● ● ● ● ● ●●● ●●● ●●● ● ● ● ● ● ●● ●●●● ●● ● ●● ● ● ●●●● ● ● ● ●● ●● ● ● ● ● ● ● ● ● ●● ● ●●● ● ● ● ●●●●●●● ● ●● ● ●●●● ● ● ●● ●● ●● ● ● ●● ● ●● ● ● ● ● ● ●●● ●● ● ● ● ●●●● ●●● ● ● ●●● ● ●● ● ● ● ● ● ● ● ●● ●● ●●● ● ●● ●●● ●●●●●●● ●● ●●●●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●● ● ● ● ● ●● ● ● ● ● ● ●● ● ●● ●●● ● ● ● ● ● ● ● ● ●●●●● ● ● ●● ●●●● ● ● ● ● ●● ● ● ●● ● ● ●● ● ● ● ● ● ●● ● ● ●● ● ●●● ● ● ● ● ● ● ●● ● ●● ●● ● ●●● ● ● ● ● ● ●● ● ● ● ● ●● ●● ● ●●● ● ●●● ● ● ● ●● ●● ● ● ●● ●● ● ● ● ● ● ● ● ● ●●● ● ●● ● ● ●●●●●● ● ● ●●●●● ● ●● ●● ● ● ● ● ● ● ● ● ● ●● ●● ●● ●● ●●● ●● ●●● ● ●●●●●●● ● ● ● ●● ● ● ● ● ●●● ● ● ● ● ● ● ●● ●●● ●● ● ●●●●●●● ●●●● ● ● ● ● ● ●● ●● ● ●● ● ● ● ● ● ● ● ● ●● ● ●● ●● ● ●● ● ● ● ● ●● ●● ● ● ● ● ●●● ● ●●● ●● ● ● ● ● ● ● ● ● ●● ●● ● ● ● ● ●● ● ●● ● ● ● ● ● ● ●● ● ●● ● ● ● ●●●● ● ● ● ● ●● ● ● ● ●●●● ● ● ●●● ● ● ●● ● ● ● ● ● ●● ●● ● ●●● ●● ● ● ●●● ●● ● ● ● ● ●● ● ●● ● ● ● ●● ●● ●● ● ●●●●●● ● ●● ● ● ● ● ●● ● ● ● ●●● ● ●● ● ● ●● ● ● ● ● ●●● ●● ●● ●● ● ●● ●● ●● ● ● ●● ●● ● ●●● ● ● ●● ●● ● ● ● ●● ● ● ● ● ●● ● ● ● ●● ● ● ● ●●●●●● ●● ● ●● ● ●● ● ●● ●●● ●● ●● ●● ● ● ●●● ● ●● ● ●● ● ● ● ● ● ● ●● ● ●● ● ●● ●●●● ● ● ●● ● ● ● ● ●● ● ● ● ● ●● ● ●● ● ● ●● ●●● ● ● ● ●●● ● ● ● ●● ● ●●● ● ●●●●● ● ● ● ●● ●● ●● ● ●● ●● ● ●● ● ● ●● ●●● ● ● ● ● ● ●●● ●●● ● ●● ● ● ● ●●●● ● ● ●●● ● ●● ● ●● ● ●● ● ●● ● ● ● ● ●●● ● ● ●● ● ● ●●● ● ● ●● ●● ● ● ● ● ● ● ● ●● ● ● ● ● ●● ● ● ● ●● ●● ● ● ●●● ● ● ●● ● ● ● ● ● ●● ●● ●● ●●● ● ●● ● ● ● ●● ●● ● ● ● ● ● ●●● ● ●● ● ●● ●●● ● ● ● ● ● ● ●● ● ●●●●●●●●● ●●● ● ●● ●● ● ●● ● ● ●● ● ● ●●● ●●● ● ● ●●● ●●●● ● ● ●●● ● ● ●● ●● ● ●● ● ●● ●● ● ●● ● ●●●● ●●● ●● ●● ● ● ● ●●● ●● ●● ● ● ●●● ● ●● ● ● ● ● ● ●● ● ● ● ●●● ● ●●● ● ● ●●● ● ● ● ●● ● ●● ●● ● ●● ● ● ●● ● ● ●● ●● ●●● ●● ●● ● ● ●●●●● ● ● ● ●● ●● ● ● ●● ●● ● ● ● ● ●● ● ● ●● ● ● ●●●●● ●● ●● ● ● ● ●● ● ●● ● ● ● ●● ● ●●● ● ● ● ●● ●● ●● ● ● ● ●●● ●●● ● ● ●● ● ● ●●● ● ● ● ●● ● ● ● ● ● ●●●●● ●● ● ● ● ● ● ●● ● ●● ● ● ● ● ● ● ●● ● ● ●● ● ● ● ● ● ●● ● ● ● ●●● ● ●●● ●● ● ● ●● ●●●●●● ●●● ●●● ● ●● ● ●●● ● ●● ●● ● ● ● ●●● ● ●● ● ● ● ● ●●● ● ●● ● ●●●● ● ●● ● ● ● ●● ● ●● ● ●● ●●● ● ● ● ● ● ● ●● ● ● ●●● ●●●● ● ● ●● ● ● ●●●● ● ●●● ●●● ● ● ●● ●● ● ●● ● ● ● ● ●●● ● ● ●●● ● ● ●●● ●●● ● ● ● ● ●●● ● ● ● ● ●● ● ●● ●●● ● ● ● ● ●● ●● ● ●● ●● ● ●● ●●●● ●● ● ●● ●●● ●● ●●● ●●●●● ● ● ● ● ●●● ●● ●● ● ● ● ●● ● ●● ● ●● ● ● ● ● ● ● ● ● ● ● ●● ● ● ●● ●● ● ● ●● ● ●● ● ●● ● ● ●● ●● ●●●●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ●● ● ● ● ●● ●●● ● ● ● ● ● ● ● ●● ●● ●● ● ● ● ● ● ● ●● ●● ● ● ●●● ●● ● ● ● ●● ● ●●● ● ● ● ● ● ●● ●●● ●●● ● ●●●●● ● ●● ●● ● ●●● ● ●●● ● ●●● ●● ● ● ● ● ● ●● ● ● ● ● ●●●● ● ●●● ● ●●●● ● ● ●● ● ● ●●● ●●● ● ● ●● ● ● ● ● ●● ●● ● ● ● ● ● ● ● ●●●● ●●● ● ● ● ● ● ●●● ●● ● ● ● ●● ● ●● ●● ●●● ● ●● ● ● ● ● ● ● ● ●● ●●●●●●● ● ●● ● ● ● ●● ●● ●● ●● ●● ● ● ● ● ●● ● ● ● ● ● ● ●● ●●● ●● ● ●●●● ● ●● ● ●●●●●● ● ● ●● ● ● ● ● ● ●● ● ●● ●● ●● ● ●● ●●●●● ● ●● ●●● ●● ●●● ● ●● ●● ●● ●● ●● ● ● ● ● ●●● ●●● ●● ●● ● ● ● ● ● ●● ● ●● ●● ● ● ● ● ●●● ● ●●● ● ●● ● ●● ●● ● ● ●● ● ● ● ● ●● ●●●● ● ● ● ● ● ●● ●● ●● ●● ● ● ●●●● ●●●● ●● ● ● ● ● ●● ● ● ● ● ● ● ●●●● ●● ● ● ● ●● ● ● ● ● ●● ● ● ●● ● ●● ● ●●● ●● ● ●●● ● ●●● ●●●●● ● ● ● ● ●●● ● ● ● ●● ● ●●●●● ● ● ● ● ●● ● ●● ●●● ● ● ● ●● ● ● ●● ● ● ● ● ● ● ●● ●●●● ●● ● ●● ● ●● ●● ●● ●● ● ● ●● ● ● ● ●● ● ●●●●●●● ● ● ●●● ● ● ● ● ●● ● ●● ● ●●● ● ● ●● ●● ●● ●●● ● ● ●● ●● ● ● ●●●●● ●● ● ● ● ● ● ● ●● ●● ● ● ●●● ●●●●● ●● ● ● ●● ● ● ●● ● ● ● ●● ●● ●● ● ●● ● ●● ● ● ● ● ● ● ●●●● ●●● ● ●● ●●● ● ● ● ● ● ●●●●● ●● ●● ●● ● ●● ●● ● ● ● ● ●●● ● ● ●● ● ● ● ●●● ● ●●● ● ● ● ●● ● ● ● ●● ●●● ●● ●● ●● ●● ● ● ● ●●● ● ● ●● ●●●● ●●● ● ● ● ● ●● ● ● ● ●● ● ● ● ● ● ● ● ● ●● ● ● ● ●●● ● ●● ●●●● ● ● ●● ●● ●●● ●● ●● ● ●●● ●●●● ● ● ●●● ● ● ● ● ●● ● ● ● ●●● ● ● ● ● ● ● ● ●●● ●● ● ● ● ● ● ●● ●● ●● ●●● ● ● ●●● ● ● ●● ●● ● ●● ● ● ●● ● ● ●●● ● ● ●●●● ● ●● ● ● ● ● ●● ●●● ●●● ●●● ●● ●● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ●●● ●●● ● ● ●● ● ● ● ● ●●● ● ● ●●● ● ●● ● ● ●● ●●● ●● ● ●● ● ● ● ● ● ● ●● ● ●● ●● ● ● ●●● ●● ●● ● ● ●●● ● ●● ●●● ● ● ●● ● ●●● ● ● ●● ● ● ● ● ● ●●● ●● ●● ●● ● ● ● ● ●●● ●● ● ●● ●● ●● ● ● ● ● ●●● ● ●●●● ●● ●● ● ●● ●● ● ●●● ●●● ●● ●● ● ●● ● ● ● ● ●●●● ● ● ●● ● ● ● ●● ●● ● ●●● ●● ● ●●● ● ● ●●●● ● ● ● ● ●● ●● ● ● ●● ● ●●● ● ● ●●●●●● ● ● ● ●●● ● ●● ● ● ● ●● ● ●● ● ●●●●● ●● ● ●● ●●● ● ● ● ●● ● ●● ●●● ● ● ● ● ● ●●●●●●● ●● ●● ● ●● ● ● ● ●● ●● ●●●●●●●●● ● ● ● ● ● ●● ● ● ●● ●●● ● ● ● ● ● ● ●● ● ● ●●● ●●●● ●● ● ● ● ● ● ●●● ● ●● ●● ●● ●● ● ●●●● ●● ●● ●● ●● ●● ● ● ●●● ●●● ● ● ● ● ●●●● ● ● ● ●● ● ●● ● ● ●● ●●● ● ●● ●● ● ●●●●● ● ●●● ●● ● ●●●● ●● ● ●● ● ●● ● ● ● ●● ● ● ●● ● ● ●● ●● ● ● ● ●● ● ● ● ●● ●●● ● ● ● ● ● ● ● ●● ● ●●● ●● ●●● ● ● ● ● ● ● ●● ●●●●● ●● ● ● ●● ●● ● ● ● ●● ● ●● ● ●●●● ●●●●● ● ● ● ●● ●● ● ●●● ● ● ● ● ● ● ●● ● ● ● ●● ● ●● ● ●● ●● ●● ● ● ● ● ● ●●●● ●● ●●●● ●● ● ● ● ●● ● ●●●●●● ● ● ●●● ●● ●● ● ● ● ●●●● ● ●● ● ● ● ●● ● ●● ●● ● ●● ● ●●● ●● ● ● ●● ● ●● ● ●● ● ●● ● ●● ●●●● ● ● ●● ●● ● ●● ●● ● ● ● ● ● ● ●● ● ● ● ●● ● ●●●● ● ● ● ● ●●● ●●● ● ● ● ●● ●●●● ●●● ●● ● ●● ● ● ● ● ● ●● ● ●● ● ● ●●●● ●● ● ● ● ●●● ● ● ● ●●●● ●● ●● ● ● ●● ●● ●● ●●●● ● ● ●●●● ● ● ● ● ●● ● ● ●● ● ● ● ●● ● ● ● ● ● ●●●● ● ●● ● ●● ●● ●● ●●● ● ●● ● ● ● ●● ●●● ● ● ●● ● ● ● ●●●● ● ● ● ●●●●● ●●●●●● ● ● ● ● ●● ●● ● ●● ●● ● ●● ●● ●● ●● ● ●● ● ●●● ●● ● ● ● ●● ● ● ●● ● ● ● ● ● ● ●● ● ●● ● ● ●● ● ●● ●● ● ●● ●● ● ●● ● ●●● ● ●●● ● ● ●●●●●●● ●● ● ● ●●● ● ● ● ● ●● ●●● ● ●●● ● ● ●●● ● ● ● ● ●● ● ●●● ●●● ● ●● ● ● ●● ●● ● ● ● ●●● ● ● ●● ● ● ●● ● ● ● ● ●● ● ●●● ● ● ● ●● ●●●● ● ● ● ● ●● ● ● ● ● ●● ●●● ● ●● ● ● ●● ●● ● ● ● ●● ● ●● ● ● ● ● ● ● ●● ●●● ●● ●● ● ● ●●●●●●● ●● ● ● ●● ●● ● ●●● ● ●● ● ● ●● ●●● ● ●● ● ● ●● ●● ● ● ●● ●● ●● ●●● ●●● ●● ● ● ●● ● ●● ● ●●● ● ● ● ●●● ●● ●● ● ● ●● ● ●●● ● ● ● ● ●● ●● ● ● ●● ● ● ● ●● ● ●●● ●●● ●●● ● ● ● ● ● ● ●● ● ● ●●● ●●●● ●● ●● ● ● ● ● ●●●● ● ●● ● ●● ● ●● ● ● ● ●● ●● ● ●●●● ●● ● ●● ●● ● ● ●● ● ●● ●●●● ●● ●● ●●● ●● ● ● ● ●● ● ●● ● ● ● ● ●● ●● ●● ● ● ● ● ●●● ●● ● ● ● ● ●● ●● ● ● ● ●● ● ●● ●● ● ● ● ●● ● ●● ●● ●● ●● ● ● ●●●● ●● ● ● ● ● ●● ● ●●●● ●●●● ● ● ●●● ● ●● ●● ● ●●●●● ● ● ●● ●● ●● ●●● ● ● ● ● ● ● ●● ●● ● ● ●●● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ●●● ● ● ● ● ● ● ● ●●● ● ● ● ● ●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●● ●●● ● ●●●●● ●●● ● ●●●●●● ● ● ●● ● ●● ● ● ● ●●● ●● ● ● ● ●● ● ●● ●● ● ● ● ●●●● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ● ● ●●●●● ●●● ●●●●● ●●● ● ●● ●● ●● ● ● ●● ●● ● ● ●● ● ● ●● ● ●● ● ● ● ●● ●●● ● ● ● ● ● ●● ● ● ● ● ●● ●● ● ● ● ● ● ● ●● ● ● ●●● ● ●● ●●●● ●● ● ● ● ●●● ● ●● ● ● ● ● ● ●● ● ●● ● ●● ●● ● ●●●● ●● ● ●● ●● ● ●● ● ● ●● ● ●● ● ●● ●● ● ● ● ●● ● ● ● ●●● ●● ●● ●●● ●● ●● ● ●●● ● ●●● ●● ● ● ● ● ●●● ●●●● ● ● ●● ●● ●● ●●● ● ● ● ● ● ●● ● ●● ● ●● ● ●●● ●● ● ● ● ● ● ● ● ● ●● ● ●● ●● ● ●● ●● ● ● ●●●● ● ●● ● ●●●●● ● ●● ● ●● ● ●● ● ●● ● ●● ●● ● ●●● ● ● ●●●● ● ●● ●● ● ●● ●● ●●●● ● ●● ● ●● ●● ●● ●●● ● ●● ●● ●● ● ● ●● ●● ●● ● ● ●● ●● ●● ●● ● ● ● ● ●● ● ●● ●●●● ● ● ● ●●●● ● ● ● ●●●●●● ● ● ● ●● ● ● ●●●● ● ●● ● ● ●● ● ●● ● ● ● ● ●● ●● ●● ● ● ●● ●● ● ●●● ● ● ● ●●●● ● ● ● ●●● ● ●● ●●● ● ●●● ●● ● ● ●● ●● ●●●●●● ●●● ● ● ●●●● ● ●● ● ● ●● ●●● ● ● ●●●●● ● ●●● ● ● ●● ●● ● ●●● ●● ● ●●●● ● ● ●● ● ● ● ● ●● ●●● ● ● ●● ● ●● ● ●● ●● ● ● ●● ●● ● ● ● ● ●● ● ●● ●● ● ●●● ● ● ● ● ●●●● ●● ●●● ● ● ● ●● ●● ●●● ●● ● ● ● ●● ● ● ●● ●● ● ● ●●● ● ● ●● ● ● ● ● ● ● ● ● ● ●●●●●● ● ● ●● ●● ● ● ●● ● ●● ● ●●●● ●●● ● ● ●● ●●● ● ● ●● ● ●● ● ● ● ● ● ● ● ●● ●●● ●● ● ●●● ● ●● ● ●● ●● ●● ● ●● ● ●●●● ● ●●●● ●●●●● ●● ●● ● ●●●●● ● ● ● ● ● ● ●● ●● ●● ● ●●● ● ● ●● ● ●●●● ●● ●●● ● ● ● ●● ● ● ● ● ● ●● ●● ● ●● ● ●●●●● ● ●● ●● ●● ●● ● ● ● ●● ● ●● ●● ●● ● ● ●● ● ●●● ●● ● ● ● ● ●● ● ●●● ●● ●● ●● ● ●●● ● ● ● ● ●● ● ●● ● ●● ●●●● ● ● ● ●●● ● ●● ●●● ● ● ●● ● ● ●● ● ●● ●● ● ●● ●●● ●● ● ●● ●● ●● ●● ●● ●● ● ●●● ● ● ● ● ● ● ●●● ●●●● ● ●● ● ● ● ● ●● ● ● ●●●● ● ●● ● ●●● ●● ● ● ●● ●● ● ●● ●● ● ● ● ●●● ● ● ● ● ● ● ● ●● ● ● ● ●● ●● ● ● ● ● ●●●● ● ●● ● ●●●● ● ●●● ●● ● ● ●● ● ●●● ● ●● ● ● ●● ● ● ● ● ●●● ●● ●● ● ● ●● ● ●● ●● ●● ● ●● ●● ● ● ● ●● ● ●●● ● ● ●● ●●●●● ● ● ●● ● ● ●● ● ●● ● ● ● ● ● ● ●● ● ● ●●● ● ●●●●● ● ●●● ●●●● ●●● ●●● ● ● ● ● ● ●● ●● ● ●● ● ●● ● ● ● ● ●● ● ●● ●● ●● ● ● ● ● ●● ●● ● ● ● ●●● ● ●●● ●● ●●●● ● ● ● ● ● ●● ●● ● ●●● ● ● ● ●●●● ● ●●● ● ●●●● ● ●● ● ● ● ● ●● ●● ●●● ●●●● ● ● ●●● ● ● ●● ●●● ●●● ●● ●●● ●● ● ● ● ● ● ● ● ●●● ●● ● ●● ●●●●● ● ●● ●● ● ● ●● ●●●● ● ●● ●●●● ●● ● ●●●●●● ● ● ●● ● ●● ●●● ● ●●●● ● ●● ●● ● ●●● ●●●●● ●● ● ●● ● ● ● ● ● ●● ●● ● ● ● ●● ●● ● ●● ● ● ● ●●● ● ●● ● ●●●● ● ● ● ● ● ● ● ●● ● ● ● ●●●● ●● ● ● ● ● ●●● ● ● ●● ● ● ● ●●● ● ● ● ● ● ● ●●● ●● ● ● ●● ●●● ●● ● ●●● ● ●● ●● ●● ●● ● ●● ●● ●● ●●● ●● ● ● ●●● ●● ● ● ●● ●● ● ●● ●●●●● ● ● ● ● ●●●● ●● ●●●●● ● ● ●●● ●● ●● ● ● ● ●● ● ●● ●●● ● ● ●●● ●● ● ● ●● ● ● ● ● ●● ● ●● ● ●●●●●● ●● ● ● ● ●● ● ● ● ●● ●● ●● ● ● ●● ● r ● p F g 3 P ots o the reg on {q ∈ ∆n T (q p) + T (r q) ≤ T (r p)} or the equa -we ghted or severa va ues o p and r Each po nt q on the boundary g ves port o o π ≡ 13 13 31 a r ght-ang ed geodes c tr ang e n the sense o Theorem 1 2 beginning with $1 at time 0. Also consider the value of the market portfolio starting with $1. Consider the ratio V (t) := value of the portfolio π at time t value of the portfolio µ at time t called the relative value of the portfolio π. Under suitable conditions (see [44, 45]) it can be shown that V (0) = 1 and n V (t + 1) X µ (t + 1) = π (µ(t)) . V (t) µ (t) =1 Proposition 5.10 (Fernholz’s decomposition). we have log V (t) = (ϕ(µ(t)) − ϕ(µ(0))) + t−1 X [23, 45] For a time t T (µ(s + 1) | µ(s)) . s=0 In this sense, the cumulative L-divergence measures the volatility harvested by the portfolio π. See [54] for optimization of this quantity. The above discussion assumes that the portfolio rebalances every period (say every week). In practice, due to transaction costs and other considerations, we may want to rebalance at other frequencies. Let 0 = t0 < t1 < t2 EXPONENTIALLY CONCAVE FUNCTIONS 39 be three time points and consider two ways of implementing the portfolio π: (i) rebalance at times t0 and t1 (ii) rebalance at time t0 only. By Fernholz’s decomposition, the relative values of the two implementations at time t2 are log V (1) (t2 ) = (ϕ(µ(t2 )) − ϕ(µ(t0 ))) + T (µ(t1 ) | µ(t0 )) + T (µ(t2 ) | µ(t1 )) , log V (2) (t2 ) = (ϕ(µ(t2 )) − ϕ(µ(t0 ))) + T (µ(t2 ) | µ(t0 )) . Letting µ(t0 ) = p, µ(t1 ) = q and µ(t2 ) = r, the difference between the two values is log V (1) (t2 ) − log V (2) (t2 ) = T (q | p) + T (r | q) − T (r | p) . By the generalized Pythagorean theorem, the sign of the difference is determined by the angle between the dual geodesic from q to p and the primal geodesic from q to r. In Figure 3 we illustrate the result for the equalweighted portfolio of 3 stocks. In the figure, rebalancing at time t1 creates extra profit if and only if q lies outside the region. This shows convincingly that rebalancing more frequently is not always better, even in the absence of transaction costs. More importantly, our framework provides a geometric and model-independent way of saying that the sequence (p, q, r) is ‘more volatile’ than the subsequence (p, r). 6. Displacement interpolation. In this final section we consider displacement interpolation for the optimal transport problem formulated in Section 2.2. We refer the reader to [50, Chapter 5] and [51, Chapter 7] for introductions to displacement interpolation. 6.1. Time dependent transport problem. Let P (0) and P (1) be Borel probability measures on Rn−1 . Consider the transport problem with cost c given by (1.7). Suppose the transport problem is solved in terms of the exponentially concave function ϕ on ∆n . Letting f = ϕ + ψ, the (Monge) optimal transport map is given by the c-supergradient of f . In particular, P (1) is the pushforward of P (0) under F := ∇c f : P (1) = F# P (0) . The idea of displacement interpolation is to introduce an additional time structure. We want to define an ‘action’ A(·) on curves such that the cost function is given by c(θ, φ) = min A(γ), γ where the minimum is taken over smooth curves γ : [0, 1] → Rn−1 satisfying γ(0) = θ and γ(1) = φ. For each pair (θ, φ), a minimizing curve γ gives 40 S. PAL AND T.-K. L. WONG a time-dependent map transporting θ to φ along a continuous path. Let F (t) : Rn−1 → Rn−1 be defined by F (t) (θ) = γ(t), where γ is the minimizing curve for the pair (θ, F (θ)). We want to define A in such a way that F (t) is an optimal transport map for the probability measures P (0) and P (t) where   P0 . P (t) = F (t) # classical Euclidean case with cost |x − y|2 the action is A(γ) = R 1 For the 2 0 |γ̇(t)| dt and the optimal transport map has the form F (x) = x − ∇h(x) where h is an ordinary concave function. The displacement interpolations are linear interpolations: F (t) = (1 − t)Id + tF (See [50, Theorem 5.5, Theorem 5.6].) In particular, the individual trajectories (minimizing curves) are Euclidean straight lines which can be regarded as the geodesics of a flat geometry. In this section we formulate and prove an analogous statement for our transport problem. 6.2. Lagrangian action and portfolio interpolation. We begin by defining an appropriate action. Let γ : [0, 1] → Rn−1 be a smooth curve with γ(0) = θ. For each t, define q(t) ∈ ∆n such that its exponential coordinate is θ−γ(t), i.e., qi (t) = eθi −γi (t) , qn (t) (6.1) 1 ≤ i ≤ n − 1. Equivalently, we have qi (t) = eθi −γi (t)−ψ(θ−γ(t)) , for 1 ≤ i ≤ n−1. Intuitively, we think of q(t) as theportfolio at time t (in the sense of interpolation). Note that q(0) = n1 , . . . , n1 . We define the Lagrangian action by   Z 1 1 (6.2) A(γ) = − log + q̇n (t) dt. n 0 We take − log(·) = ∞ if the argument is not in (0, ∞). An alternative representation of the action is   Z 1 1 d (6.3) A(γ) = − log + e−ψ(γ(0)−γ(t)) dt. n dt 0 Lemma 6.1. (6.4) For any θ, φ ∈ Rn−1 we have c(θ, φ) = ψ(θ − φ) = min {A(γ) : γ(0) = θ, γ(1) = φ} . EXPONENTIALLY CONCAVE FUNCTIONS 41 The action is minimized by the curve (6.5) γi (t) = θi − log (1 − t) n1 + tqi (1) , (1 − t) n1 + tqn (1) 1 ≤ i ≤ n − 1. In particular, for this minimizing curve we have   1 1 + tq(1). (6.6) q(t) = (1 − t) ,..., n n Proof. Fix a smooth curve γ : [0, 1] → Rn−1 from θ to φ. Since − log is convex, by Jensen’s inequality we have     Z 1 Z 1 1 1 − log q̇n (t)dt + q̇n (t) dt ≥ − log + n n 0 0 (6.7)   1 = − log + qn (1) − qn (0) = − log qn (1) = ψ(θ − φ). n For the curve defined by (6.5), q̇(t) = q(1) − n1 is constant and so equality holds in (6.7). Finally (6.6) follows by a direct calculation. 6.3. Displacement interpolation. We work under the following setting. Let P (0) and P (1) be Borel probability measures on Rn−1 . Let ϕ : ∆n → R be an exponentially concave function, satisfying Assumption 2.5, such that F (1) := ∇c f is an optimal transport map (here f is the c-concave function ϕ + ψ). Let π (1) : ∆n → ∆n be the portfolio map generated by ϕ(1) := ϕ. Consider the flow (t, θ) 7→ φ(t) (θ) defined by the minimizing curves (6.5), i.e., (t) (6.8) (t) φi (θ) = θi − log π i (θ) (t) , 1 ≤ i ≤ n − 1, t ∈ [0, 1], π n (θ) where each π (t) : ∆n → ∆n is the portfolio map defined by   1 1 (t) (6.9) π := (1 − t) ,..., + tπ (1) , t ∈ [0, 1]. n n The following is the main result of this section. It is interesting to note that the displacement interpolation can be interpreted naturally as the linear interpolation between the equal-weighted portfolio and the terminal portfolio. Theorem 6.2 (Displacement interpolation). Section 6.3. Consider the setting of 42 S. PAL AND T.-K. L. WONG (i) For each t ∈ [0, 1], the portfolio map π (t) is generated by the exponentially concave function ϕ(t) on ∆n defined by ϕ(t) (p) = (1 − t) (6.10) n X 1 log pi + tϕ(p), n p ∈ ∆n . i=1 (ii) For each t ∈ [0, 1], let f (t) = ϕ(t) + ψ and let F (t) = ∇c f (t) . If θ is distributed according to P (0) , then θ(t) is distributed according to P (t) where   P (0) . P (t) = F (t) # Moreover, F (t) is an optimal transport map for the transport problem for (P (0) , P (t) ). (iii) Endow ∆n with the geometric structure induced by the L-divergence of ϕ. We further assume that the c-gradient F (1) = ∇c f : Rn−1 → Rn−1 is surjective. For each θ ∈ Rn−1 fixed, consider the curve t 7→ φ(t) (θ) in dual coordinates. Then the trace of the curve is the dual geodesic joining θ and φ(1) (θ). Proof. (i) Follows directly from Example 2.6(iv). (ii) It is clear that (θ, F (t) (θ)) is a coupling of (P (0) , P (t) ). By Proposition 2.7, the graph of the map F (t) is c-cyclical monotone. This proves that F (t) is an optimal transport map. (iii) We write (6.8) in the form (t) e−φi = e−θi = (1 − t) n1 + tπ i (θ) (1 − t) n1 + tπ n (θ) π (θ) (1 − t) n1 tπ n (θ) −θi +log π i (θ) −θi n + e e (1 − t) n1 + tπ n (θ) (1 − t) n1 + tπ n (θ) (1) =: (1 − h(t))e−θi + h(t)e−φi (θ) . By (5.8) we see that t 7→ φ(t) is a time change of a dual geodesic. The surjectivity assumption guarantees that the curve lies within Y 0 , the range of the dual coordinate system. 6.4. Another interpolation. From the financial perspective there is another natural interpolation, namely the linear interpolation between the market portfolio µ (Example 2.6(i)) and the portfolio π: (6.11) π (t) = (1 − t)π + tµ. EXPONENTIALLY CONCAVE FUNCTIONS 43 The corresponding log generating function is ϕ(t) = (1−t)ϕ. From the transport perspective, the market portfolio corresponds to the trivial transport map F (θ) ≡ 0 (recall in Proposition 2.7(iii) that the portfolio has exponential coordinate given by θ − F (θ)). By the argument of Theorem 6.2 we have the following result. Proposition 6.3. Consider the geometric structure induced by ϕ and assume that the range of the dual coordinate system is Rn−1 . Consider the flow (t, θ) 7→ φ(t) (θ) in (6.8) where π (t) is given by the interpolation (6.11). Then for each θ, in dual coordinates, the trace of the curve t 7→ φ(t) (θ) is a time change of the dual geodesic from φ(0) (θ) to 0. APPENDIX A: TECHNICAL PROOFS Proof of Theorem 3.2. In this proof we treat θ and φ as independent variables. We prove (i) and (ii) together. We begin by observing that (A.1) ∂ f (θ) = π i (θ), ∂θi 1 ≤ i ≤ n − 1. To see this, write pi = eθi −ψ(θ) . Switching coordinates and using the chain rule, we have n X ∂ϕ ∂ ∂ϕ f (θ) = (p)(−pi pj ) + (p)pi + pi ∂θi ∂pj ∂pi j=1   n X ∂ϕ ∂ϕ = pi 1 + (p) − (p) . pj ∂pi ∂pj j=1 From (1.4) and a bit of computation, we see that this equals π i (θ). Consider the c-transform of f given by f ∗ (φ) = inf (ψ(θ − φ) − f (θ)) . (A.2) θ∈X Differentiating ψ(θ − φ) − f (θ) and using (A.1), we see that θ ∈ X attains the infimum in (A.2) if and only if eθi −φi Pn = π i (θ), θj −φj j=1 e i = 1, . . . , n − 1. Rearranging, we have (A.3) φi = θi − log π i (θ) , π n (θ) i = 1, . . . , n − 1. 44 S. PAL AND T.-K. L. WONG This proves that equality holds in (A.4) f (θ) + f ∗ (φ) ≤ ψ(θ − φ) if and only if θ and φ satisfies the relation (A.3). In particular, for θ ∈ X the c-supergradient ∇c f (θ) is given by (A.3). Next we we prove that the minimizer in (A.2), if exists, is unique. Consider instead maximization of the quantity ef (θ)−ψ(θ−φ) = eϕ(θ)+ψ(θ)−ψ(θ−φ) = Φ(θ) eψ(θ) eψ(θ−φ) . Expanding and switching to Euclidean coordinates, this equals Pn θi e 1 P (A.5) Φ(p) n i=1θ −φ = Φ(p) Pn , i i e i=1 ai pi i=1 where ai = e−φi > 0. Being the quotient of a strictly concave function and an affine function, the right hand side of (A.5) is strictly quasi-concave, i.e., its superlevel sets are strictly convex (see [11, Example 3.38]). This shows that the minimizer θ in (A.2) is unique if it exists. Let φ ∈ Y 0 . Then there exists unique θ ∈ X such that equality holds in (A.4) and φ = ∇c f (θ). In particular, the c-supergradient ∂ c f ∗ (φ) is θ and ∇c f ∗ (∇c f (θ)) = θ. This completes the proof of (i) and (ii). Next we prove that ∇c f ∗ = (∇c f )−1 is smooth, so that ∇c f : X → Y 0 is a diffeomorphism. Since ∇c f : X → Y is smooth and injective, by the inverse function theorem it suffices to show that the Jacobian of ∇c f is invertible on X . Invertibility of the Jacobian follows from (4.16) and the fact that (gij (ξ)) is strictly positive definite. Finally, by Fenchel’s identity we can express f ∗ in the form f ∗ (φ) = c(∇c f ∗ (φ), φ) − f (∇c f ∗ (φ)). Since ∇c f ∗ and the cost function c are smooth, we see that f ∗ is smooth as well. Proof of Lemma 5.7. (i) To prove the first formula in (5.11), we com- EXPONENTIALLY CONCAVE FUNCTIONS 45 pute, using (4.9) and (4.12), (grad T (· | θp ) (θq ))i = n−1 X g ij (θq ) j=1 = n−1 X j=1 = n−1 X j=1 ∂ T (· | θp ) (θq ) ∂θjq ! n−1 X ∂θi 1 ∂θi q 1 q (θ ) + (θ ) (Πj (θq , θp ) − π j (θq )) π j (θq ) ∂φj π n (θq ) ∂φk k=1 Πj (θq , θp ) Πn (θq , θp ) − π j (θq ) π n (θq )  ∂θi q (θ ). ∂φj For the second formula, we first prove a Claim. We have n−1 X ∂φ` ∂ r q (θq )(π ` (θq ) − Π` (θr , θq )). q T (θ | θ ) = ∂θj ∂θjq (A.6) `=1 To see this, we use (4.13), (4.5), and compute as follows: ∂ T (θr | θq ) ∂θjq = −Πj (θr , θq ) + π j (θq ) + n X `=1 1 ∂π ` q (θ )Π` (θr , θq ) π ` (θq ) ∂θjq = −Πj (θr , θq ) + π j (θq )+ n X = `=1 n−1 X `=1 q δ`j − π j (θ ) − ! ! n−1 X ∂φ` q r q q ∂φm q (θ ) − π m (θ ) q (θ ) Π` (θ , θ ) ∂θjq ∂θj m=1 ∂φ` q (θ )(π ` (θq ) − Π` (θr , θq )). ∂θjq 46 S. PAL AND T.-K. L. WONG Now we compute, using Theorem 4.5 and the symmetry of g ij , (grad T (r | ·) (q))i = n−1 X g ij (θq ) j=1 = n−1 X j=1 `=1 n−1 X ∂φ` q (θ )(π ` (θq ) − Π` (θr , θq )) ∂θjq (π ` (θq ) − Π` (θr , θq ))· `=1 n−1 X j=1 = ! n−1 X ∂θj 1 ∂θj q 1 (φ ) + (φq ) · π i (θq ) ∂φi π n (θq ) ∂φk k=1 n−1 X = ∂ T (θr | ·) (θq ) ∂θjq n−1 X ! n−1 X ∂φ` ∂θ 1 ∂φ` q ∂θj q 1 j (φ ) (φq ) (φq ) (φ ) + π i (θq ) ∂θjq ∂φi π n (θq ) ∂φk ∂θjq k=1 q r q  (π ` (θ ) − Π` (θ , θ )) `=1 =− 1 1 δ`i + q π i (θ ) π n (θq )  Πi (θr , θq ) Πn (θr , θq ) + . π i (θq ) π n (θq ) In the second last equality we used (4.6). The proof of (ii) is similar. ACKNOWLEDGEMENTS The authors would like to thank Prof. Robin Graham for helpful discussions. We also thank the anonymous referee for suggestions which improved the paper. REFERENCES [1] Acciaio, B., Beiglböck, M., Penkner, F. and Schachermayer, W. (2016). A model-free version of the fundamental theorem of asset pricing and the superreplication theorem. Mathematical Finance 26 233–251. [2] Amari, S.-i. (2016). Information Geometry and Its Applications. Springer. [3] Amari, S.-i. and Nagaoka, H. (2007). Methods of Information Geometry 191. American Mathematical Soc. [4] Ambrosio, L. and Gigli, N. (2013). A users guide to optimal transport. In Modelling and optimisation of flows on networks 1–155. Springer. [5] Ay, N. and Amari, S.-i. (2015). A Novel Approach to Canonical Divergences within Information Geometry. Entropy 17 8111–8129. [6] Banner, A. D. and Fernholz, D. (2008). Short-term relative arbitrage in volatilitystabilized markets. Annals of Finance 4 445–454. EXPONENTIALLY CONCAVE FUNCTIONS 47 [7] Basseville, M. (2013). Divergence measures for statistical data processing An annotated bibliography. Signal Processing 93 621–633. [8] Beiglböck, M., Henry-Labordere, P. and Penkner, F. (2013). Modelindependent bounds for option pricesa mass transport approach. Finance and Stochastics 17 477–501. [9] Booth, D. G. and Fama, E. F. (1992). Diversification returns and asset contributions. Financial Analysts Journal 48 26–32. [10] Bouchey, P., Nemtchinov, V., Paulsen, A. and Stein, D. M. (2012). Volatility Harvesting: Why Does Diversifying and Rebalancing Create Portfolio Growth? The Journal of Wealth Management 15 26–35. [11] Boyd, S. and Vandenberghe, L. (2004). Convex Optimization. Cambridge University Press. [12] Bregman, L. M. (1967). The relaxation method of finding the common point of convex sets and its application to the solution of problems in convex programming. USSR computational mathematics and mathematical physics 7 200–217. [13] Calin, O. and Udrişte, C. (2014). Geometric Modeling in Probability and Statistics. Springer. [14] Chambers, D. R. and Zdanowicz, J. S. (2014). The limitations of diversification return. Journal of Portfolio Management 40 65–76. [15] Cordero-Erausquin, D. and Klartag, B. (2015). Moment measures. Journal of Functional Analysis 268 3834–3866. [16] Cordero-Erausquin, D., McCann, R. J. and Schmuckenschläger, M. (2001). A Riemmanian interpolation inequality à la Borell, Brascamp and Lieb. Invent. math. 146 219–257. [17] Dillen, F., Nomizu, K. and Vranken, L. (1990). Conjugate connections and Radon’s theorem in affine differential geometry. Monatshefte für Mathematik 109 221–235. [18] Dolinsky, Y. and Soner, H. M. (2014). Martingale optimal transport and robust hedging in continuous time. Probability Theory and Related Fields 160 391–427. [19] Eguchi, S. (1983). Second order efficiency of minimum contrast estimators in a curved exponential family. The Annals of Statistics 11 793–803. [20] Eguchi, S. (1992). Geometry of minimum contrast. Hiroshima Math. J 22 631–647. [21] Erb, C. B. and Harvey, C. R. (2006). The strategic and tactical value of commodity futures. Financial Analysts Journal 62 69–97. [22] Erbar, M., Kuwada, K. and Sturm, K.-T. (2015). On the equivalence of the entropic curvature-dimension condition and Bochner’s inequality on metric measure spaces. Inventiones mathematicae 201 993–1071. [23] Fernholz, R. (1999). Portfolio generating functions. In Quantitative Analysis in Financial Markets (M. Avellaneda, ed.) World Scientific. [24] Fernholz, R. (2001). Equity portfolios generated by functions of ranked market weights. Finance and Stochastics 5 469–486. [25] Fernholz, E. R. (2002). Stochastic Portfolio Theory. Applications of Mathematics. Springer. [26] Fernholz, R., Karatzas, I. and Kardaras, C. (2005). Diversity and relative arbitrage in equity markets. Finance and Stochastics 9 1–27. [27] Fernholz, R. and Shay, B. (1982). Stochastic portfolio theory and stock market equilibrium. The Journal of Finance 37 615–624. [28] Hallerbach, W. G. (2014). Disentangling rebalancing return. Journal of Asset Management 15 301–316. [29] Hazan, E., Agarwal, A. and Kale, S. (2007). Logarithmic regret algorithms for 48 S. PAL AND T.-K. L. WONG online convex optimization. Machine Learning 69 169–192. [30] Juditsky, A., Rigollet, P., Tsybakov, A. B. et al. (2008). Learning by mirror averaging. The Annals of Statistics 36 2183–2206. [31] Karatzas, I. and Ruf, J. (2016). Trading Strategies Generated by Lyapunov Functions. ArXiv e-prints 1603.08245. [32] Kass, R. E. and Vos, P. W. (2011). Geometrical Foundations of Asymptotic Inference 908. John Wiley & Sons. [33] Kurose, T. (1990). Dual connections and affine geometry. Mathematische Zeitschrift 203 115–121. [34] Lott, J. and Villani, C. (2009). Ricci curvature for metric-measure spaces via optimal transport. Annals of Mathematics 903–991. [35] Mahdavi, M., Zhang, L. and Jin, R. (2015). Lower and upper bounds on the generalization of stochastic exponentially concave optimization. In Proceedings of The 28th Conference on Learning Theory 1305–1320. [36] Matsuzoe, H. (1999). Geometry of contrast functions and conformal geometry. Hiroshima Mathematical Journal 29 175–191. [37] McCann, R. J. (1994). A convexity theory for interacting gases and equilibrium crystals PhD thesis, Princeton University. [38] McCann, R. J. (1997). A convexity principle for interacting gases. Advances in Mathematics 128 153–179. [39] Murray, M. K. and Rice, J. W. (1993). Differential Geometry and Statistics. CRC Press. [40] Nagaoka, H. and Amari, S.-i. (1982). Differential geometry of smooth families of probability distributions. Univ. Tokyo, Tokyo, Japan, METR 82–7. [41] Oliker, V. (2007). Embedding Sn into Rn+1 with given integral Gauss curvature and optimal mass transport on Sn . Adv. Math. 213 600-620. [42] Pal, S. (2016). Exponentially concave functions and high dimensional stochastic portfolio theory. ArXiv e-prints 1603.01865. [43] Pal, S. (2017). Embedding optimal transports in statistical manifolds. To appear in The Indian Journal of Pure and Applied Mathematics. [44] Pal, S. and Wong, T.-K. L. (2013). Energy, entropy, and arbitrage. ArXiv e-prints 1308.5376. [45] Pal, S. and Wong, T.-K. L. (2016). The geometry of relative arbitrage. Mathematics and Financial Economics 10 263–293. [46] Rockafellar, R. T. (1997). Convex Analysis. Princeton Landmarks in Mathematics. Princeton University Press. [47] Shima, H. (2007). The Geometry of Hessian Structures. World Scientific. [48] Sternberg, S. (2012). Curvature in Mathematics and Physics. Dover. [49] Strong, W. (2014). Generalizations of functionally generated portfolios with applications to statistical arbitrage. SIAM Journal on Financial Mathematics 5 472–492. [50] Villani, C. (2003). Topics in Optimal Transportation. Graduate Studies in Mathematics 58. American Mathematical Soc. [51] Villani, C. (2008). Optimal Transport: Old and New. Springer. [52] Willenbrock, S. (2011). Diversification return, portfolio rebalancing, and the commodity return puzzle. Financial Analysts Journal 67 42–49. [53] Wong, T.-K. L. (2015a). Optimization of relative arbitrage. Annals of Finance 11 345–382. [54] Wong, T.-K. L. (2015b). Universal Portfolios in Stochastic Portfolio Theory. ArXiv e-prints 1510.02808. EXPONENTIALLY CONCAVE FUNCTIONS University of Washington C-547 Padelford Hall Seattle, Washington 98195 USA E-mail: [email protected] 49 University of Southern California 406H Kaprielian Hall Los Angeles, California 90089 USA E-mail: [email protected]
7cs.IT
O N C ONVERGENCE AND S TABILITY OF GAN S arXiv:1705.07215v5 [cs.AI] 10 Dec 2017 Naveen Kodali, Jacob Abernethy, James Hays & Zsolt Kira ∗ College of Computing Georgia Institute of Technology Atlanta, GA 30332, USA {nkodali3,prof,hays,zkira}@gatech.edu A BSTRACT We propose studying GAN training dynamics as regret minimization, which is in contrast to the popular view that there is consistent minimization of a divergence between real and generated distributions. We analyze the convergence of GAN training from this new point of view to understand why mode collapse happens. We hypothesize the existence of undesirable local equilibria in this non-convex game to be responsible for mode collapse. We observe that these local equilibria often exhibit sharp gradients of the discriminator function around some real data points. We demonstrate that these degenerate local equilibria can be avoided with a gradient penalty scheme called DRAGAN. We show that DRAGAN enables faster training, achieves improved stability with fewer mode collapses, and leads to generator networks with better modeling performance across a variety of architectures and objective functions. 1 I NTRODUCTION Generative modeling involves taking a set of samples drawn from an unknown data generating distribution Preal and finding an estimate Pmodel that closely resembles it. Generative adversarial networks (GAN) (Goodfellow et al., 2014) is a powerful framework used for fitting implicit generative models. The basic setup consists of two networks, the generator and the discriminator, playing against each other in a repeated zero-sum game setting. The goal here is to reach an equilibrium where Preal , Pmodel are close, and the alternating gradient updates procedure (AGD) is used to achieve this. However, this process is highly unstable and often results in mode collapse (Goodfellow, 2017). This calls for an deeper investigation into training dynamics of GANs. In this paper, we propose studying GAN training dynamics as a repeated game in which both the players are using no-regret algorithms (Cesa-Bianchi & Lugosi, 2006) and discuss how AGD 1 falls under this paradigm. In contrast, much of the theory (Goodfellow et al., 2014; Arjovsky & Bottou, 2017) and recent developments (Nowozin et al., 2016; Arjovsky et al., 2017; Gulrajani et al., 2017) are based on the unrealistic assumption that the discriminator is playing optimally (in the function space) at each step and as a result, there is consistent minimization of a divergence between real and generated distributions. This corresponds to at least one player using the best-response algorithm (in the function space), and the resulting game dynamics can be completely different in both these cases (Nisan et al., 2007). Thus, there is a clear disconnect between theoretical arguments used as motivation in recent literature and what actually happens in practice. We would like to point out that the latter view can still be useful for reasoning about the asymptotic equilibrium situation but we argue that regret minimization is the more appropriate way to think about GAN training dynamics. So, we analyze the convergence of GAN training from this new point of view to understand why mode collapse happens. We start with a short analysis of the artificial convex-concave case of the GAN game in section 2.2. This setting has a unique solution and guaranteed convergence (of averaged iterates) using no-regret algorithms can be shown with standard arguments from game theory literature. Here, we make explicit, the critical (previously not widely known) connection between AGD used in GAN training and regret minimization. This immediately ∗ 1 code - https://github.com/kodalinaveen3/DRAGAN Most of our analysis applies to the simultaneous gradient updates procedure as well 1 yields a novel proof for the asymptotic convergence of GAN training, in the non-parametric limit. Prior to our work, such a result (Goodfellow et al., 2014) required a strong assumption that the discriminator is optimal at each step. However, these convergence results do not hold when the game objective function is non-convex, which is the practical case when deep neural networks are used. In non-convex games, global regret minimization and equilibrium computation are computationally hard in general. Recent gametheoretic literature indicates that AGD can end up cycling (Mertikopoulos et al., 2017) or converging to a (potentially bad) local equilibrium, under some conditions (Hazan et al., 2017). We hypothesize these to be the reasons for cycling and mode collapse observed during GAN training, respectively (section 2.3). In this work, we do not explore the cycling issue but focus our attention on the mode collapse problem. In contrast to our hypothesis, the prevalent view of mode collapse and instability (Arjovsky & Bottou, 2017) is that it results from attempting to minimize a strong divergence during training. However, as we argued earlier, GAN training with AGD does not consistently minimize a divergence and therefore, such a theory is not suitable to discuss convergence or to address the stability issue. Next, if mode collapse is indeed the result of an undesirable local equilibrium, a natural question then is how we can avoid it? We make a simple observation that, in the GAN game, mode collapse situations are often accompanied by sharp gradients of the discriminator function around some real data points (section 2.4). Therefore, a simple strategy to mitigate mode collapse is to regularize the discriminator so as to constrain its gradients in the ambient data space. We demonstrate that this improves the stability using a toy experiment with one hidden layer neural networks. This gives rise to a new explanation for why WGAN and gradient penalties might be improving the stability of GAN training – they are mitigating the mode collapse problem by keeping the gradients of the discriminator function small in data space. From this motivation, we propose a training algorithm involving a novel gradient penalty scheme called DRAGAN (Deep Regret Analytic Generative Adversarial Networks) which enables faster training, achieves improved stability and modeling performance (over WGAN-GP (Gulrajani et al., 2017) which is the state-of-the-art stable training procedure) across a variety of architectures and objective functions. Below, we provide a short literature review. Several recent works focus on stabilizing the training of GANs. While some solutions (Radford et al., 2015; Salimans et al., 2016) require the usage of specific architectures (or) modeling objectives, some (Che et al., 2016; Zhao et al., 2016) significantly deviate from the original GAN framework. Other promising works in this direction (Metz et al., 2016; Arjovsky et al., 2017; Qi, 2017; Gulrajani et al., 2017) impose a significant computational overhead. Thus, a fast and versatile method for consistent stable training of GANs is still missing in the literature. Our work is aimed at addressing this. To summarize, our contributions are as follows: • We propose a new way of reasoning about the GAN training dynamics - by viewing AGD as regret minimization. • We provide a novel proof for the asymptotic convergence of GAN training in the nonparametric limit and it does not require the discriminator to be optimal at each step. • We discuss how AGD can converge to a potentially bad local equilibrium in non-convex games and hypothesize this to be responsible for mode collapse during GAN training. • We characterize mode collapse situations with sharp gradients of the discriminator function around some real data points. • A novel gradient penalty scheme called DRAGAN is introduced based on this observation and we demonstrate that it mitigates the mode collapse issue. 2 T HEORETICAL A NALYSIS OF GAN TRAINING DYNAMICS We start with a brief description of the GAN framework (section 2.1). We discuss guaranteed convergence in the artificial convex-concave case using no-regret algorithms, and make a critical connection between GAN training process (AGD) and regret minimization (section 2.2). This immediately yields a novel proof for the asymptotic convergence of GAN training in the nonparametric limit. Then, we consider the practical non-convex case and discuss how AGD can 2 converge to a potentially bad local equilibrium here (section 2.3). We characterize mode collapse situations with sharp gradients of the discriminator function around real samples and this provides an effective strategy to avoid them. This naturally leads to the introduction of our gradient penalty scheme DRAGAN (section 2.4). We end with a discussion and comparison with other gradient penalties in the literature (section 2.5). 2.1 BACKGROUND The GAN framework can be viewed as a repeated zero-sum game, consisting of two players - the generator, which produces synthetic data given some noise source and the discriminator, which is trained to distinguish generator’s samples from the real data. The generator model G is parameterized by φ, takes a noise vector z as input, and produces a synthetic sample Gφ (z). The discriminator model D is parameterized by θ, takes a sample x as input and computes Dθ (x), which can be interpreted as the probability that x is real. The models G, D can be selected from any arbitrary class of functions – in practice, GANs typical rely on deep networks for both. Their cost functions are defined as J (D) (φ, θ) := −Ex∼preal log Dθ (x) − Ez log(1 − Dθ (Gφ (z))), and J (G) (φ, θ) := −J (D) (φ, θ) And the complete game can be specified as n o min max J(φ, θ) = Ex∼preal log Dθ (x) + Ez log(1 − Dθ (Gφ (z))) φ θ The generator distribution Pmodel asymptotically converges to the real distribution Preal if updates are made in the function space and the discriminator is optimal at each step (Goodfellow et al., 2014). 2.2 C ONVEX - CONCAVE CASE AND N O - REGRET ALGORITHMS According to Sion’s theorem (Sion, 1958), if Φ ⊂ Rm , Θ ⊂ Rn such that they are compact and convex sets, and the function J : Φ × Θ → R is convex in its first argument and concave in its second, then we have min max J(φ, θ) = max min J(φ, θ) φ∈Φ θ∈Θ θ∈Θ φ∈Φ That is, an equilibrium is guaranteed to exist in this setting where players’ payoffs correspond to the unique value of the game (Neumann, 1928). A natural question then is how we can find such an equilibrium. A simple procedure that players can use is best-response algorithms (BRD). In each round, best-responding players play their optimal strategy given their opponent’s current strategy. Despite its simplicity, BRD are often computationally intractable and they don’t lead to convergence even in simple games. In contrast, a technique that is both efficient and provably works is regret minimization. If both players update their parameters using no-regret algorithms, then it is easy to show that their averaged iterates will converge to an equilibrium pair (Nisan et al., 2007). Let us first define no-regret algorithms. Definition 2.1 (No-regret algorithm). Given a sequence of convex loss functions L1 , L2 , . . . : K → R, an algorithm that selects a sequence of kt ’s, each of which may only depend on previously ) observed L1 , . . . , Lt−1 , is said to have no regret if R(T = o(1), where we define T PT PT R(T ) := t=1 Lt (kt ) − mink∈K t=1 Lt (k) We can apply no-regret learning to our problem of equilibrium finding in the GAN game J(·, ·) as follows. The generator imagines the function J(·, θt ) as its loss function on round t, and similarly the discriminator imagines −J(φt , ·) as its loss function at t. After T rounds of play, each player PT PT computes the average iterates φ̄T := T1 t=1 φt and θ̄T := T1 t=1 θt . If V ∗ is the equilibrium value of the game, and the players suffer regret R1 (T ) and R2 (T ) respectively, then one can show using standard arguments (Freund & Schapire, 1999) that V∗− R2 (T ) T ≤ maxθ∈Θ J(φ̄T , θ) − R2 (T ) T ≤ minφ∈Φ J(φ, θ̄T ) + 3 R1 (T ) T ≤V∗+ R1 (T ) T . In other words, θ̄T and φ̄T are "almost optimal" solutions to the game, where the "almost" 2 (T ) approximation factor is given by the average regret terms R1 (T )+R . Under the no-regret T condition, the former will vanish, and hence we can guarantee convergence in the limit. Next, we define a popular family of no-regret algorithms. Definition 2.2 (Follow The Regularized Leader). FTRL (Hazan et al., 2016) selects kt on round Pt−1 t by solving for arg mink∈K { s=1 Ls (k) + η1 Ω(k)}, where Ω(·) is some convex regularization function and η is a learning rate. Remark: Roughly speaking, if you select the regularization as Ω(·) = 12 k · k2 , then FTRL becomes the well-known online gradient descent or OGD (Zinkevich, 2003). Ignoring the case of constraint violations, OGD can be written in a simple iterative form: kt = kt−1 − η∇Lt−1 (kt−1 ). The typical GAN training procedure using alternating gradient updates (or simultaneous gradient updates) is almost this - both the players applying online gradient descent. Notice that the min/max objective function in GANs involves a stochastic component, with two randomized inputs given on each round, x and z which are sampled from the data distribution and a standard multivariate normal, respectively. Let us write Jx,z (φ, θ) := log Dθ (x) + log(1 − Dθ (Gφ (z))). Taking expectations with respect to x and z, we define the full (non-stochastic) game as J(φ, θ) = Ex,z [Jx,z (φ, θ)]. But the above online training procedure is still valid with stochastic inputs. That is, the equilibrium computation would proceed similarly, where on each round we sample xt and zt , and follow the updates φt+1 ← φt − η∇φ Jxt ,zt (φt , θt ). and 0 θt+1 ← θt + η ∇θ Jxt ,zt (φt , θt ) On a side note, a benefit of this stochastic perspective is that we can get a generalization bound on the mean parameters φ̄T after T rounds of optimization. The celebrated "online-to-batch conversion" (Cesa-Bianchi et al., 2004) implies that Ex,z [Jx,z (φ̄T , θ)], for than the optimal value h any θ, is no more i 2 (T ) Ex,z [Jx,z (φ∗ , θ)] plus an "estimation error" bounded by E R1 (T )+R , where the expectation is T taken with respect to the sequence of samples observed along the way, and any randomness in the algorithm. Analogously, this applies to θ̄T as well. A limitation of this result, however, is that it requires a fresh sample xt to be used on every round. To summarize, we discussed in this subsection about how the artificial convex-concave case is easy to solve through regret minimization. While this is a standard result in game theory and online learning literature, it is not widely known in the GAN literature. For instance, Salimans et al. (2016) and Goodfellow (2017) discuss a toy game which is convex-concave and show cycling behavior. But, the simple solution in that case is to just average the iterates. Further, we made explicit, the critical connection between regret minimization and alternating gradient updates procedure used for GAN training. Goodfellow et al. (2014) argue that, if G and D have enough capacity (in the non-parametric limit) and updates are made in the function space, then GAN game can be considered convex-concave. Thus, our analysis based on regret minimization immediately yields a novel proof for the asymptotic convergence of GANs, which does not require the discriminator to be optimal at each step. Moreover, the connection between regret minimization and GAN training process gives a novel way to reason about its dynamics. In contrast, the popular view of GAN training as consistently minimizing a divergence arises if the discriminator uses BRD (in the function space) and thus, it has little to do with the actual training process of GANs. As a result, this calls into question the motivation behind many recent developments like WGAN and gradient penalties among others, which improve the training stability of GANs. In the next subsection, we discuss the practical non-convex case and why training instability arises. This provides the necessary ideas to investigate mode collapse from our new perspective. 2.3 N ON - CONVEX CASE AND L OCAL EQUILIBRIA In practice, we choose G, D to be deep neural networks and the function J(φ, θ) need not be convexconcave anymore. The nice properties we had in the convex-concave case like the existence of a unique solution and guaranteed convergence through regret minimization no longer hold. In fact, regret minimization and equilibrium computation are computationally hard in general non-convex 4 settings. However, analogous to the case of non-convex optimization (also intractable) where we focus on finding local minima, we can look for tractable solution concepts in non-convex games. Recent work by Hazan et al. (2017) introduces the notion of local regret and shows that if both the players use a smoothed variant of OGD to minimize this quantity, then the non-convex game converges to some form of local equilibrium, under mild assumptions. The usual training procedure of GANs (AGD) corresponds to using a window size of 1 in their formulation. Thus, GAN training will eventually converge (approximately) to a local equilibrium which is described below or the updates will cycle. We leave it to future works to explore the equally important cycling issue and focus here on the former case. Definition 2.3 (Local Equilibrium). A pair (φ∗ , θ∗ ) is called an -approximate local equilibrium if it holds that 0 0 0 ∀φ , ||φ − φ∗ || ≤ η : J(φ∗ , θ∗ ) ≤ J(φ , θ∗ ) +  0 0 0 ∀θ , ||θ − θ∗ || ≤ η : J(φ∗ , θ∗ ) ≥ J(φ∗ , θ ) −  That is, in a local equilibrium, both the players do not have much of an incentive to switch to any other strategy within a small neighborhood of their current strategies. Now, we turn our attention to the mode collapse issue which poses a significant challenge to the GAN training process. The training is said to have resulted in mode collapse if the generator ends up mapping multiple z vectors to the same output x, which is assigned a high probability of being real by the discriminator (Goodfellow, 2017). We hypothesize this to be the result of the game converging to bad local equilibria. The prevalent view of mode collapse and instability in GAN training (Arjovsky & Bottou, 2017) is that it is caused due to the supports of real and model distributions being disjoint or lying on low-dimensional manifolds. The argument is that this would result in strong distance measures like KL-divergence or JS-divergence getting maxed out, and the generator cannot get useful gradients to learn. In fact, this is the motivation for the introduction of WGAN (Arjovsky et al., 2017). But, as we argued earlier, GAN training does not consistently minimize a divergence as that would require using intractable best-response algorithms. Hence, such a theory is not suitable to discuss convergence or to address the instability of GAN training. Our new view of GAN training process as regret minimization is closer to what is used in practice and provides an alternate explanation for mode collapse - the existence of undesirable local equilibria. The natural question now is how we can avoid them? 2.4 M ODE COLLAPSE AND G RADIENT P ENALTIES The problem of dealing with multiple equilibria in games and how to avoid undesirable ones is an important question in algorithmic game theory (Nisan et al., 2007). In this work, we constrain ourselves to the GAN game and aim to characterize the undesirable local equilibria (mode collapse) in an effort to avoid them. In this direction, after empirically studying multiple mode collapse cases, we found that it is often accompanied by the discriminator function having sharp gradients around some real data points (See Figure 1 2 ). This intuitively makes sense from the definition of mode collapse discussed earlier. Such sharp gradients encourage the generator to map multiple z vectors to a single output x and lead the game towards a degenerate equilibrium. Now, a simple strategy to mitigate this failure case would be to regularize the discriminator using the following penalty   λ · Ex∼Preal ,δ∼Nd (0,cI) k∇x Dθ (x + δ)k2 This strategy indeed improves the stability of GAN training. We show the results of a toy experiment with one hidden layer neural networks in Figure 2 and Figure 3 to demonstrate this. This partly explains the success of WGAN and gradient penalties in the recent literature (Gulrajani et al., 2017; Qi, 2017), and why they improve the training stability of GANs, despite being motivated by reasoning based on unrealistic assumptions. However, we noticed that this scheme in its current form can be brittle and if over-penalized, the discriminator can end up assigning both a real point x and noise x + δ, the same probability of being real. Thus, a better choice of penalty is   λ · Ex∼Preal ,δ∼Nd (0,cI) max 0, k∇x Dθ (x + δ)k2 − k 2 At times, stochasticity seems to help in getting out of the basin of attraction of a bad equilibrium 5 Figure 1: One hidden layer networks as G and D (MNIST). On the left, we plot inception score against time for vanilla GAN training and on the right, we plot the squared norm of discriminator’s gradients around real data points for the same experiment. Notice how this quantity changes before, during and after mode collapse events. Figure 2: One hidden layer networks as G and D (MNIST). On the left, losses for both the players are shown for vanilla GAN training and on the right, we added a regularization term to penalize the gradients of D(x) around real data points. Notice the improved stability. Finally, due to practical optimization considerations (this has also been observed in Gulrajani et al. (2017)), we instead use the penalty shown below in all our experiments.  2 λ · Ex∼Preal ,δ∼Nd (0,cI) k∇x Dθ (x + δ)k − k (1) This still works as long as small perturbations of real data, x + δ are likely to lie off the data-manifold, which is true in the case of image domain and some other settings. Because, in these cases, we do want our discriminator to assign different probabilities of being real to training data and noisy samples. We caution the practitioners to keep this important point in mind while making their choice of penalty. All of the above schemes have the same effect of constraining the norm of discriminator’s gradients around real points to be small and can therefore, mitigate the mode collapse situation. We refer to GAN training using these penalty schemes or heuristics as the DRAGAN algorithm. Additional details: • We use the vanilla GAN objective in our experiments, but our penalty improves stability using other objective functions as well. This is demonstrated in section 3.3. • The penalty scheme used in our experiments is the one shown in equation 1. • We use small pixel-level noise but it is possible to find better ways of imposing this penalty. However, this exploration is beyond the scope of our paper. • The optimal configuration of the hyperparameters for DRAGAN depends on the architecture, dataset and data domain. We set them to be λ ∼ 10, k = 1 and c ∼ 10 in most of our experiments. 2.5 C OUPLED VS L OCAL P ENALTIES Several recent works have also proposed regularization schemes which constrain the discriminator’s gradients in the ambient data space, so as to improve the stability of GAN training. Despite being 6 Figure 3: One hidden layer networks as G and D (MNIST). On the left, inception score plot is shown for vanilla GAN training and on the right, we added a regularization term to penalize the gradients of D(x) around real data points. Notice how mode collapse is mitigated. from different motivations, WGAN-GP and LS-GAN are closely related approaches to ours. First, we show that these two approaches are very similar, which is not widely known in the literature. Qi (2017) introduced LS-GAN with the idea of maintaining a margin between losses assigned to real and fake samples. Further, they also impose Lipschitz constraint on D and the two conditions together result in a situation where the following holds for any real and fake sample pair (roughly) Dθ (x) − Dθ (Gφ (z)) ≈ ||x, Gφ (z)|| (2) The authors argue that the resulting discriminator function would have non-vanishing gradients almost everywhere between real and fake samples (section 6 of Qi (2017)). Next, Gulrajani et al. (2017) proposed an extension to address various shortcomings of the original WGAN and they impose the following condition on D ||∇x Dθ (x̂)|| ≈ 1 (3) where x̂ = ()x+(1−)Gφ (z) is some point on the line between a real and a fake sample, both chosen independently at random. This leads to D having norm-1 gradients almost everywhere between real and fake samples. Notice that this behavior is very similar to that of LS-GAN’s discriminator function. Thus, WGAN-GP is a slight variation of the original LS-GAN algorithm and we refer to these methods as “coupled penalties”. On a side note, we also want to point out that WGAN-GP’s penalty doesn’t actually follow from KR-duality as claimed in their paper. By Lemma 1 of Gulrajani et al. (2017), the optimal discriminator D∗ will have norm-1 gradients (almost everywhere) only between those x and Gφ (z) pairs which are sampled from the optimal coupling or joint distribution π ∗ . Therefore, there is no basis for WGAN-GP’s penalty (equation 3) where arbitrary pairs of real and fake samples are used. This fact adds more credence to our theory regarding why gradient penalties might be mitigating mode collapse. The most important distinction between coupled penalties and our methods is that we only impose gradient constraints in local regions around real samples. We refer to these penalty schemes as “local penalties”. Coupled penalties impose gradient constraints between real and generated samples and we point out some potential issues that arise from this: • With adversarial training finding applications beyond fitting implicit generative models, penalties which depend on generated samples can be prohibitive. • The resulting class of functions when coupled penalties are used will be highly restricted compared to our method and this affects modeling performance. We refer the reader to Figure 4 and appendix section 5.2.2 to see this effect. • Our algorithm works with AGD, while WGAN-GP needs multiple inner iterations to optimize D. This is because the generated samples can be anywhere in the data space and they change from one iteration to the next. In contrast, we consistently regularize Dθ (x) only along the real data manifold. To conclude, appropriate constraining of the discriminator’s gradients can mitigate mode collapse but we should be careful so that it doesn’t have any negative effects. We pointed out some issues 7 with coupled penalties and how local penalties can help. We refer the reader to section 3 for further experimental results. Figure 4: Swissroll experiment (different phases of training) - Vanilla GAN (top), WGAN-GP (middle), and DRAGAN (bottom). Real samples are marked orange and generated samples are green. Level sets of Dθ (x) are shown in the background where yellow is high and purple is low. 3 E XPERIMENTAL R ESULTS In section 3.1, we compare the modeling performance of our algorithm against vanilla GAN and WGAN variants in the standard DCGAN/CIFAR-10 setup. Section 3.2 demonstrates DRAGAN’s improved stability across a variety of architectures. In section 3.3, we show that our method also works with other objective functions. Appendix contains samples for inspection, some of the missing plots and additional results. Throughout, we use inception score (Salimans et al., 2016) which is a well-studied and reliable metric in the literature, and sample quality to measure the performance. 3.1 I NCEPTION S CORES FOR CIFAR-10 USING DCGAN ARCHITECTURE DCGAN is a family of architectures designed to perform well with the vanilla training procedure. They are ubiquitous in the GAN literature owing to the instability of vanilla GAN in general settings. We use this architecture to model CIFAR-10 and compare against vanilla GAN, WGAN and WGANGP. As WGANs need 5 discriminator iterations for every generator iteration, comparing the modeling performance can be tricky. To address this, we report two scores for vanilla GAN and DRAGAN one using the same number of generator iterations as WGANs and one using the same number of discriminator iterations. The results are shown in Figure 5 and samples are included in the appendix (Figure 8). Notice that DRAGAN beats WGAN variants in both the configurations, while vanilla GAN is only slightly better. A key point to note here is that our algorithm is fast compared to WGANs, so in practice, the performance will be closer to the DRAGANd case. In the next section, we will show that if we move away from this specific architecture family, vanilla GAN training can become highly unstable and that DRAGAN penalty mitigates this issue. 3.2 M EASURING STABILITY AND PERFORMANCE ACROSS ARCHITECTURES Ideally, we would want our training procedure to perform well in a stable fashion across a variety of architectures (other than DCGANs). Similar to Arjovsky et al. (2017) and Gulrajani et al. (2017), we remove the stabilizing components of DCGAN architecture and demonstrate improved stability & modeling performance compared to vanilla GAN training (see appendix section 5.2.3). However, this is a small set of architectures and it is not clear if there is an improvement in general. To address this, we introduce a metric termed the BogoNet score to compare the stability & performance of different GAN training procedures. The basic idea is to choose random architectures for players G and D independently, and evaluate the performance of different algorithms in the resulting 8 Algorithm WGAN WGAN-GP DRAGANg DRAGANd Vanilla GANg Vanilla GANd Score 3.25 5.99 6.11 6.90 6.3 6.99 (b) Inception scores (a) Inception score plot Figure 5: Comparison of modeling performance on CIFAR10 Table 1: Summary of inception score statistics across 100 architectures Algorithm Vanilla GAN DRAGAN WGAN-GP Final score Mean Std 2.91 1.44 3.70 1.71 3.49 1.30 Area under curve Mean Std 277.72 126.09 312.15 135.35 300.09 100.96 Qual. score Total 92.5 157.5 - games. A good algorithm should achieve stable performance without failing to learn or resulting in mode collapse, despite the potentially imbalanced architectures. In our experiment, each player is assigned a network from a diverse pool of architectures belonging to three different families (MLP, ResNet, DCGAN). To demonstrate that our algorithm performs better compared to vanilla GAN training and WGAN-GP, we created 100 such instances of hard games. Each instance is trained using these algorithms on CIFAR-10 (under similar conditions for a fixed number of generator iterations, which gives a slight advantage to WGAN-GP) and we plot how inception score changes over time. For each algorithm, we calculated the average of final inception scores and area under the curve (AUC) over all 100 instances. The results are shown in Table 1. Notice that we beat the other algorithms in both metrics, which indicates some improvement in stability and modeling performance. Further, we perform some qualitative analysis to verify that BogoNet score indeed captures the improvements in stability. We create another set of 50 hard architectures and compare DRAGAN against vanilla GAN training. Each instance is allotted 5 points and we split this bounty between the two algorithms depending on their performance. If both perform well or perform poorly, they get 2.5 points each, so that we nullify the effect of such non-differentiating architectures. However, if one algorithm achieves stable performance compared to the other (in terms of failure to learn or mode collapses), we assign it higher portions of the bounty. Results were judged by two of the authors in a blind manner: The curves were shown side-by-side with the choice of algorithm for each side being randomized and unlabeled. The vanilla GAN received an average score of 92.5 while our algorithm achieved an average score of 157.5 and this correlates with BogoNet score from earlier. See appendix section 5.3 for some additional details regarding this experiment. 3.3 S TABILITY USING DIFFERENT OBJECTIVE FUNCTIONS Our algorithm improves stability across a variety of objective functions and we demonstrate this using the following experiment. Nowozin et al. (2016) show that we can interpret GAN training as minimizing various f -divergences when an appropriate game objective function is used. We show experiments using the objective functions developed for Forward KL, Reverse KL, Pearson χ2 , Squared Hellinger, and Total Variation divergence minimization. We use a hard architecture from the previous subsection to demonstrate the improvements in stability. Our algorithm is stable in all cases except for the total variation case, while the vanilla algorithm failed in all the cases (see Figure 6 for two examples and Figure 15 in appendix for all five). Thus, practitioners can now choose their game 9 objective from a larger set of functions and use DRAGAN (unlike WGANs which requires a specific objective function). (a) Reverse KL (b) Pearson χ2 Figure 6: Inception score plots for two divergence measures, demonstrating superior stability for our algorithm. 4 C ONCLUSIONS In this paper, we propose to study GAN training process as regret minimization, which is in contrast to the popular view that there is consistent minimization of a divergence between real and generated distributions. We analyze the convergence of GAN training from this new point of view and hypothesize that mode collapse occurs due to the existence of undesirable local equilibria. A simple observation is made about how the mode collapse situation often exhibits sharp gradients of the discriminator function around some real data points. This characterization partly explains the workings of previously proposed WGAN and gradient penalties, and motivates our novel penalty scheme. We show evidence of improved stability using DRAGAN and the resulting improvements in modeling performance across a variety of settings. We leave it to future works to explore our ideas in more depth and come up with improved training algorithms. R EFERENCES 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 Nicolo Cesa-Bianchi and Gábor Lugosi. Prediction, learning, and games. Cambridge university press, 2006. Nicolo Cesa-Bianchi, Alex Conconi, and Claudio Gentile. On the generalization ability of on-line learning algorithms. IEEE Transactions on Information Theory, 50(9):2050–2057, 2004. Tong Che, Yanran Li, Athul Paul Jacob, Yoshua Bengio, and Wenjie Li. Mode regularized generative adversarial networks. arXiv preprint arXiv:1612.02136, 2016. Yoav Freund and Robert E Schapire. Adaptive game playing using multiplicative weights. Games and Economic Behavior, 29(1-2):79–103, 1999. Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In Z. Ghahramani, M. Welling, C. Cortes, N. D. Lawrence, and K. Q. Weinberger (eds.), Advances in Neural Information Processing Systems 27, pp. 2672–2680. Curran Associates, Inc., 2014. URL http://papers.nips. cc/paper/5423-generative-adversarial-nets.pdf. 10 Ian J. Goodfellow. NIPS 2016 tutorial: Generative adversarial networks. CoRR, abs/1701.00160, 2017. URL http://arxiv.org/abs/1701.00160. Ishaan Gulrajani, Faruk Ahmed, Martin Arjovsky, Vincent Dumoulin, and Aaron Courville. Improved training of wasserstein gans. arXiv preprint arXiv:1704.00028, 2017. Elad Hazan, Karan Singh, and Cyril Zhang. Efficient regret minimization in non-convex games. arXiv preprint arXiv:1708.00075, 2017. Elad Hazan et al. Introduction to online convex optimization. Foundations and Trends® in Optimization, 2(3-4):157–325, 2016. Panayotis Mertikopoulos, Christos Papadimitriou, and Georgios Piliouras. Cycles in adversarial regularized learning. arXiv preprint arXiv:1709.02738, 2017. Luke Metz, Ben Poole, David Pfau, and Jascha Sohl-Dickstein. Unrolled generative adversarial networks. CoRR, abs/1611.02163, 2016. URL http://arxiv.org/abs/1611.02163. J. von Neumann. Zur theorie der gesellschaftsspiele. Mathematische Annalen, 100:295–320, 1928. URL http://eudml.org/doc/159291. Noam Nisan, Tim Roughgarden, Eva Tardos, and Vijay V Vazirani. Algorithmic game theory, volume 1. Cambridge University Press Cambridge, 2007. Sebastian Nowozin, Botond Cseke, and Ryota Tomioka. f-gan: Training generative neural samplers using variational divergence minimization. In Advances in Neural Information Processing Systems, pp. 271–279, 2016. Guo-Jun Qi. Loss-sensitive generative adversarial networks on lipschitz densities. abs/1701.06264, 2017. URL http://arxiv.org/abs/1701.06264. CoRR, Alec Radford, Luke Metz, and Soumith Chintala. Unsupervised Representation Learning with Deep Convolutional Generative Adversarial Networks. arXiv:1511.06434 [cs], November 2015. URL http://arxiv.org/abs/1511.06434. arXiv: 1511.06434. Tim Salimans, Ian J. Goodfellow, Wojciech Zaremba, Vicki Cheung, Alec Radford, and Xi Chen. Improved techniques for training gans. CoRR, abs/1606.03498, 2016. URL http://arxiv. org/abs/1606.03498. Maurice Sion. On general minimax theorems. Pacific J. Math, 8(1):171–176, 1958. Junbo Zhao, Michael Mathieu, and Yann LeCun. Energy-based generative adversarial network. arXiv preprint arXiv:1609.03126, 2016. Martin Zinkevich. Online convex programming and generalized infinitesimal gradient ascent. In Proceedings of the 20th International Conference on Machine Learning (ICML-03), pp. 928–936, 2003. 11 5 5.1 A PPENDIX S AMPLES AND L ATENT S PACE WALKS In this section, we provide samples from an additional experiment run on CelebA dataset (Figure 7). The samples from the experiment in section 3.1 are shown in Figure 8. Further, Radford et al. (2015) suggest that walking on the manifold learned by the generator can expose signs of memorization. We use DCGAN architecture to model MNIST and CelebA datasets using DRAGAN penalty, and the latent space walks of the learned models are shown in Figure 9 and Figure 10. The results demonstrate that the generator is indeed learning smooth transitions between different images, when our algorithm is used. Figure 7: Modeling CelebA with DRAGAN using DCGAN architecture. 12 (a) Vanilla GAN (b) DRAGAN (c) WGAN (d) WGAN-GP Figure 8: Modeling CIFAR-10 using DCGAN architecture. 13 (a) (b) Figure 9: Latent space walk of the model learned on MNIST using DRAGAN Figure 10: Latent space walk of the model learned on CelebA using DRAGAN 5.2 5.2.1 A DDITIONAL E XPERIMENTS O NE HIDDEN LAYER NETWORK TO MODEL MNIST We design a simple experiment where G and D are both fully connected networks with just one hidden layer. Vanilla GAN performs poorly even in this simple case and we observe severe mode collapses. In contrast, our algorithm is stable throughout and obtains decent quality samples despite the constrained setup. 14 Inception Score Inception Score Generator iterations Generator iterations (a) Vanilla GAN (b) DRAGAN Figure 11: One hidden layer network to model MNIST - Inception score plots (a) Vanilla GAN (b) DRAGAN Figure 12: One hidden layer network to model MNIST - Samples 5.2.2 8-G AUSSIANS E XPERIMENT We analyze the performance of WGAN-GP and DRAGAN on the 8-Gaussians dataset. As it can be seen in Figure 13, both of them approximately converge to the real distribution but notice that in the case of WGAN-GP, Dθ (x) seems overly constrained in the data space. In contrast, DRAGAN’s discriminator is more flexible. Improved WGAN DRAGAN 15 Figure 13: Comparing the performance of WGAN-GP and DRAGAN on the 8-Gaussians dataset. Orange is real samples, green is generated samples. The level sets of Dθ (x) are shown in the background, with yellow as high and purple as low. 5.2.3 S TABILITY ACROSS DCGAN A RCHITECTURE VARIATIONS DCGAN architecture has been designed following specific guidelines to make it stable (Radford et al., 2015). We restate the suggested rules here. 1. Use all-convolutional networks which learn their own spatial downsampling (discriminator) or upsampling (generator) 2. Remove fully connected hidden layers for deeper architectures 3. Use batch normalization in both the generator and the discriminator 4. Use ReLU activation in the generator for all layers except the output layer, which uses tanh 5. Use LeakyReLU activation in the discriminator for all layers We show below that such constraints can be relaxed when using our algorithm and still maintain training stability. Below, we present a series of experiments in which we remove different stabilizing components from the DCGAN architecture and analyze the performance of our algorithm. Specifically, we choose the following four architectures which are difficult to train (in each case, we start with base DCGAN architecture and apply the changes) • No BN and a constant number of filters in the generator • 4-layer 512-dim ReLU MLP generator • tanh nonlinearities everywhere • tanh nonlinearity in the generator and 4-layer 512-dim LeakyReLU MLP discriminator Notice that, in each case, our algorithm is stable while the vanilla GAN training fails. A similar approach is used to demonstrate the stability of training procedures in Arjovsky et al. (2017) and Gulrajani et al. (2017). (a) tanh activation (b) FC generator 16 (c) Constant filter (d) FC discriminator Figure 14: Comparing performance of DRAGAN and Vanilla GAN training in the hard variations of DCGAN architecture. 5.2.4 S TABILITY ACROSS OBJECTIVE FUNCTIONS Due to space limitations, we only showed plots for two cases in section 3.3. Below we show the results for all five cases. (a) Reverse KL (b) Pearson χ2 (c) Forward KL (d) Total Variation 17 (e) Squared Hellinger Figure 15: Comparing performance of DRAGAN and Vanilla GAN training using different objective functions. 5.3 B OGO N ET D ETAILS We used three families of architectures with probabilities - DCGAN (0.6), ResNet (0.2), MLP (0.2). Next, we further parameterized each family to create additional variation. For instance, the DCGAN family can result in networks with or without batch normalization, have LeakyReLU or Tanh nonlinearities. The number and width of filters, latent space dimensionality are some other possible variations in our experiment. Similarly, the number of layers and hidden units in each layer for MLP are chosen randomly. For ResNets, we chose their depth randomly. This creates a set of hard games which test the stability of a given training algorithm. We showed qualitative analysis of the inception score plots in section 3.2 to verify that BogoNet score indeed captures the improvements in stability. Below, we show some examples of how the bounty splits were done. The plots in Figure 14 were scored as (averages are shown in DRAGAN, Vanilla GAN order): A - (5, 0), B - (3.5, 1.5), C – (2.25, 2.75), D – (2, 3) 18
9cs.NE
1 Uplink Channel Estimation and Data Transmission in Millimeter-Wave CRAN with Lens Antenna Arrays arXiv:1802.02076v1 [cs.IT] 6 Feb 2018 Reuben George Stephen, Student Member, IEEE, and Rui Zhang, Fellow, IEEE Abstract—Millimeter-wave (mmWave) communication and network densification hold great promise for achieving highrate communication in next-generation wireless networks. Cloud radio access network (CRAN), in which low-complexity remote radio heads (RRHs) coordinated by a central unit (CU) are deployed to serve users in a distributed manner, is a costeffective solution to achieve network densification. However, when operating over a large bandwidth in the mmWave frequencies, the digital fronthaul links in a CRAN would be easily saturated by the large amount of sampled and quantized signals to be transferred between RRHs and the CU. To tackle this challenge, we propose in this paper a new architecture for mmWavebased CRAN with advanced lens antenna arrays at the RRHs. Due to the energy focusing property, lens antenna arrays are effective in exploiting the angular sparsity of mmWave channels, and thus help in substantially reducing the fronthaul rate and simplifying the signal processing at the multi-antenna RRHs and the CU, even when the channels are frequency-selective. We consider the uplink transmission in a mmWave CRAN with lens antenna arrays and propose a low-complexity quantization bit allocation scheme for multiple antennas at each RRH to meet the given fronthaul rate constraint. Further, we propose a channel estimation technique that exploits the energy focusing property of the lens array and can be implemented at the CU with low complexity. Finally, we compare the proposed mmWave CRAN using lens antenna arrays with a conventional CRAN using uniform planar arrays at the RRHs, and show that the proposed design achieves significant throughput gains, yet with much lower complexity. Index Terms—Cloud radio access network, millimeter-wave communication, lens antenna array, channel estimation, fronthaul constraint, antenna selection, quantization bit allocation. I. I NTRODUCTION N ETWORK densification by increasing the densities of base stations (BSs)/access points (APs) deployed, and millimeter-wave (mmWave) communication by exploiting large unused bandwidth in the higher frequencies of the radio spectrum, are two key strategies for achieving the orders of magnitude data rate improvement required for future wireless communication networks [1]. On one hand, cloud radio access This paper was presented in part at the IEEE Global Communications Conference (GLOBECOM), Singapore, Dec. 4–8, 2017. R. G. Stephen is with the National University of Singapore Graduate School for Integrative Sciences and Engineering, National University of Singapore, Singapore 117456, and also with the Department of Electrical and Computer Engineering, National University of Singapore, Singapore 117583 (e-mail: [email protected]). R. Zhang is with the Department of Electrical and Computer Engineering, National University of Singapore, Singapore 117583 (e-mail: [email protected]). network (CRAN), in which distributed low-complexity remote radio heads (RRHs) are deployed close to the users, and coordinated by a central unit (CU) for joint processing, provides a cost-effective way of achieving network densification. Thanks to the centralized resource allocation and joint signal processing for the RRHs at the CU, CRAN achieves significant improvements in both the spectral efficiency and energy efficiency compared to the conventional cellular network [2]– [9], while RRHs can be simple relay nodes that transmit and receive quantized/compressed baseband signals to/from the CU over their fronthaul links. On the other hand, with advances in radio frequency (RF) circuits, wireless communication over mmWave bands has emerged as a promising technology to achieve high-rate communications, due to the large bandwidth available and the beamforming gain brought about by the possibility of deploying a large number of antennas at the transceivers thanks to the small wavelengths [10], [11]. Thus, CRAN when integrated with mmWave communication, achieves the double goals of network densification and ample bandwidth at the same time for future wireless networks. However, in such a dense CRAN operating over a large mmWave bandwidth, the digital fronthaul links would be easily saturated by the large volume of sampled and quantized/compressed baseband signals that need to be transmitted between the CU and RRHs; thus, it is crucial to find cost-effective solutions to reduce the transmission rate required for each fronthaul link. In CRANs operating over the conventional cellular frequency bands, a considerable body of prior work (e.g. [2]–[5]) has investigated various techniques for data compression at the RRHs to achieve fronthaul rate reduction. Further, channel estimation in networks with coordinated multi-antenna BSs has also been considered in prior work [12], [13]. In [12], random matrix theory was used to derive an approximate lower bound on the uplink ergodic achievable rate in a system with multiple single-antenna users and multi-antenna BSs, while [13] considered an estimate-compress-forward approach for the uplink of a CRAN and proposed various schemes to optimize the ergodic achievable sum rate subject to backhaul constraints. Most of the above techniques for compression and/or channel estimation are applicable for relatively small bandwidth compared to that in mmWave, and typically involve complex signal processing and cooperative signal compression across the RRHs, which are difficult to implement for mmWave systems due to practical cost and complexity considerations. A low-complexity training sequence design for CRAN was considered in [14], where the problem of minimizing the train- 2 z-axis (wavelengths) 5 0 Antenna element EM Lens −5 0 2 4 x-axis (wavelengths) 6 −4 −2 0 2 4 y-axis (wavelengths) focusing antennas that can be selected for signal sampling and quantization. Thus, the use of lens antenna arrays can potentially achieve significant reduction in both the fronthaul rate requirement for transmitting the quantized signals to the CU and the interference among the users for the joint decoding at the CU in the uplink transmission. However, due to the finite fronthaul rate constraint at each RRH, it is crucial to design antenna selection and signal quantization schemes to maximize the achievable user rates at the CU. Since the RRHs in a CRAN are typically simple relay nodes, in this paper, we consider that simple uniform scalar quantization (SQ) of the sampled baseband signals is performed independently over the antennas selected at each RRH. The major contributions of this paper are summarized as follows. • Fig. 1. Illustration of lens antenna array with Dy = Dz = 10, Θ− = π , Θ+ = π2 , Φ− = Φ+ = π2 . 6 • ing length, while maintaining local orthogonality among the training sequences of the users, was considered; however, the fronthaul constraints at the RRHs were ignored. For frequencyselective mmWave channels, channel estimation for hybrid precoding was considered in [15], [16]. The approach is to represent the channel taps in the angular domain corresponding to a set of quantized angles, and then use sparse signal processing techniques to estimate the relevant parameters. In this paper, we propose a new architecture for mmWave CRAN by leveraging the use of advanced lens antenna arrays [17]–[22] at the RRHs. A full-dimensional lens antenna array [19] consists of an electromagnetic (EM) lens with energy focusing capability integrated with an antenna array whose elements are located on the focal surface of the lens (see Fig. 1). The amplitude response of a lens array can be expressed as a “sinc”-type function in terms of the angles of arrival/departure of plane waves incident on/transmitted from it, and the locations of the antenna elements [18], [19]. Hence, by appropriately designing the locations of the antenna elements on the focal surface, the lens array is capable of focusing most of the energy from a uniform plane wave arriving in a particular direction onto a specific antenna element or subset of elements. Moreover, due to the multipath sparsity of mmWave channels [11], a lens array can be used to achieve the capacity of a point-to-point mmWave channel with multiple antennas via a technique called path division multiplexing [18], which uses simple single-carrier modulation even for transmission over wideband frequencyselective channels, and has low signal processing complexity. With lens antenna arrays, the angular domain sparsity of mmWave channels is transformed to the spatial domain, which then enables lower complexity signal processing for channel estimation and data transmission. Moreover, in a CRAN, since the angles of arrival of the signals from different users are typically independent, and thus different at each RRH, the user signals are effectively separated over a small number of • • • We introduce a new architecture for CRAN in mmWave frequencies using full-dimensional lens antenna arrays [18], [19] at the RRHs, taking into consideration both the elevation and azimuth angles of arrival of the signals from the users in the uplink transmission. We propose a simple energy-detection based antenna selection at each RRH and a low-complexity quantization bit allocation algorithm over the selected antennas to minimize the total quantization noise power based only on the estimates of the received signal power at different antennas, subject to the fronthaul rate constraint. When the CU has perfect channel state information (CSI), we show that the proposed system with lens antenna arrays can achieve better sum-rate performance compared to a conventional CRAN using uniform planar arrays (UPAs) at the RRHs and orthogonal frequency division multiplexing (OFDM) transmission by the users, when the same quantization algorithm is employed in both cases. Under imperfect CSI, we propose a reduced-size, approximate MMSE beamforming, by exploiting the energyfocusing property of lens antenna arrays. In the proposed scheme, for each user, only the data streams where the estimated channel gains are larger than a certain threshold are chosen for beamforming, while the interference on these streams is also approximated by thresholding the channel gain estimates. With the proposed bit allocation at the RRHs, channel estimation at the CU, and data transmission with singlecarrier modulation, we compare the proposed system with the conventional CRAN with UPAs via simulations, and show that when the fronthaul is constrained, the proposed system can achieve significant sum-throughput gains at much lower signal processing complexity and training overhead compared to the benchmark. The rest of this paper is organized as follows. In Section II we present the system model for the proposed mmWave CRAN with lens arrays, and carry out an analysis of the achievable rates under perfect and imperfect CSI, with our proposed bit allocation and channel estimation schemes. Section III gives a brief description of the benchmark CRAN system with UPAs and OFDM transmission. In Section IV, we compare our proposed system with the benchmark system via simulations. 3 Finally, Section V concludes the paper. Notation: In this paper, , denotes equality by definition, and ∼ means “distributed as”. The cardinality of a finite set S is denoted by |S|, while A \ B denotes the elements in A that are not in B. Sets of M ×N real, complex, and integer matrices are denoted by RM×N , CM×N and ZM×N respectively, while R+ and Z++ denote the set of non-negative real numbers and positive integers, respectively. δ[n] denotes the Kronecker delta function. The normalized sinc function is defined as for x 6= 0 and sinc(x) , 1 if x = 0. The sinc(x) , sin(πx) πx imaginary unit is denoted by  with 2 = 1. Scalars are denoted by lower-case letters, e.g. x, while vectors and matrices are denoted by bold-face lower-case and upper-case letters, e.g. x and X, respectively. For x ∈ R, ⌈x⌉ denotes the smallest integer greater than or equal to x, and ⌊x⌋ denotes the largest integer less than or equal to x. For x ∈ C, |x| ≥ 0 denotes its magnitude and ∠x ∈ [0, 2π) denotes its phase in radian. For a vector x, kxk denotes its Euclidean norm. A vector with all elements equal to 0 is denoted by 0, where the dimension is implied from the context. For vectors and matrices, ()T denotes transpose, and ()H denotes conjugate transpose (Hermitian). For matrix X, tr(X) denotes the sum of its diagonal elements (trace). For X with linearly independent columns, X † , (X H X)−1 X H denotes the Moore-Penrose pseudo-inverse. X ⊗ Y denotes the Kronecker product of two matrices X and Y , while IN denotes the identity matrix of dimension N . A diagonal matrix with elements x1 , . . . , xM on the main diagonal is denoted by diag( x1 ··· xM ), and a block diagonal matrix by blkdiag( X1 ··· XM ). CN (µ, Σ) denotes a circularly symmetric complex Gaussian (CSCG) distribution centered at µ with covariance Σ, and U[a, b] denotes a uniform distribution over the interval [a, b]. II. S YSTEM M ODEL We study the uplink transmission in a mmWave-based dense CRAN cluster (see Fig. 2) with M multi-antenna RRHs, denoted by M = {1, . . . , M }. The cluster is sectorized, where each RRH has J = 3 sectors covering 120◦ each, and each sector is served by a full-dimensional lens antenna array with Q antenna elements denoted by the set Q(j) = {1, . . . , Q} , j ∈ J , where J = {1, . . . , J} denotes the set of sectors. Further, we use Q without the superscript to denote the set of S all antenna elements in all sectors of an RRH, i.e., Q = j∈J Q(j) , and |Q| = JQ. Each RRH is connected to the CU via an individual fronthaul link of finite capacity R̄m > 0 in bits per second (bps). There are K single-antenna users in the CRAN cluster, denoted by K = {1, . . . , K}. All the users and RRHs share the same bandwidth for communication. Depending on a user’s location, its signals are incident on at most one sector of an RRH, and we model any inter-sector/inter-cluster leakage interference as Gaussian noise. We further assume that the total number of sectors in the CRAN is greater than or equal to the number of users, i.e., JM ≥ K. The users transmit over a mmWave, frequency-selective, block-fading channel of bandwidth W Hz. Fronthaul link RRH m Central Unit (CU) mmWave wireless link User k Lens array CRAN cluster R̄m Fig. 2. Schematic of CRAN. The channel between user k and RRH m1 has Lm,k paths denoted by Lm,k = {1, . . . , Lm,k }. Then the discrete-time channel coefficient vector hm,k [n] ∈ CQ×1 at time index n between user k and RRH m can be expressed using a geometric channel model as X  αm,k,ℓ a θm,k,ℓ , φm,k,ℓ δ[n − dm,k,ℓ ] hm,k [n] = ℓ∈Lm,k = X ℓ∈Lm,k hm,k,ℓ δ[n − dm,k,ℓ ], (1) where αm,k,ℓ ∈ C and dm,k,ℓ ∈ {0, 1, . . . , dmax } , D denote, respectively, the complex gain and delay in symbol periods  corresponding to path ℓ ∈ Lm,k , and a θm,k,ℓ , φm,k,ℓ ∈ CQ×1 is the array response for the elevation and azimuth angles of arrival of path ℓ denoted by θm,k,l and φm,k,l , respectively. We consider that for each sector, each RRH is equipped with a rectangular EM lens in the y − z plane, with dimensions Dy × Dz normalized by the wavelength2 along the y- and z-axes, respectively. The EM lens is followed by a full-dimensional antenna array with Q elements placed on the focal surface of the lens, which is a hemisphere around the lens’ center (taken to be the origin in Fig. 1) with radius equal to the focal length of the lens (see Fig. 1). Let each antenna element be indexed by a pair of indexes (qe , qa ), where qe denotes the index in the elevation direction along the focal surface of the lens and qa denotes the index in the azimuth direction along the focal surface. Now, for a ray drawn from the center of the lens to an antenna element (qe , qa ), let φqa ∈ [−Φ− , Φ+ ] denote the azimuth angle made by the ray, where Φ− , Φ+ ∈ (0, π/2] are the maximum azimuth angles in the negative and positive y-directions, respectively. Similarly, let θqe ∈ [−Θ− , Θ+ ] denote the elevation angle made by the ray, where Θ− , Θ+ ∈ (0, π/2] are the maximum elevation angles covered by the antenna array in the negative and positive z-directions, respectively. Then, the antennas are placed such that the indexes qe run from the integers −⌊Dz sin Θ− ⌋ to ⌊Dz sin Θ+ ⌋. 1 Since each user’s signals are received by only one sector of every RRH, we refer to the channel between the user and the RRH, instead of the particular sector of the RRH, for convenience. 2 The dimensions are assumed to be same at all RRHs for convenience. 4 Ta Td Tp Power probing Guard Guard for antenna interval Pilot symbols interval selection dmax ADC/Quantization 1 Data symbols ℜ{y1,m } AGC/ Power est. 1 RF to baseband Tf Q Fig. 3. Frame structure for uplink transmission with lens antenna arrays. Lens Antenna array AGC/ Power est.  ℑ{y1,m } RF switches dmax SQ ℜ{yQm ,m } RF to Qm baseband To CU via fronthaul SQ  ℑ{yQm ,m } y̌1,m SQ SQ y̌Qm ,m Bit allocation/ antenna selection Thus, the elevation angles of the antenna elements θqe are related to the indexes qe by sin θqe = qe /Dz , qe ∈ Fig. 4. Architecture of RRH with lens antenna array. {−⌊Dz sin Θ− ⌋, . . . , −1, 0, 1, . . . , ⌊Dz sin Θ+ ⌋}. Next, for each index qe , the index qa runs from the integers A. Uniform Scalar Quantization (SQ) and Bit Allocation at −⌊Dy cos θqe sin Φ− ⌋ to ⌊Dy cos θqe sin Φ⌋, so that the azimuth angles of the antenna elements φqa are related RRHs During the power-probing stage, the users transmit constant to the indexes qa by sin φqa = qa /(Dy cos θqe ), qa ∈ amplitude signals for a duration Ta ≥ dmax + 1, and each {−⌊Dy cos θqe sin Φ− ⌋, . . . , −1, 0, 1, . . . , ⌊Dy cos θqe sin Φ⌋} [19]. Then the amplitude response in (1) of the lens array element RRH m obtains an estimate of the average received power (qe , qa ) ≡ q ∈ Q(j) , to a uniform plane wave incident at ρq,m on each antenna either from the AGC circuitry, or using elevation and azimuth angles (θ, φ), can be expressed as [20] analog power estimators. We consider that each RRH performs uniform SQ on the real and imaginary components of the complex baseband samples received at each antenna q ∈ Q p aq (θ, φ) = Dz Dy sinc (qe − Dz sin θ) and denoted by yq,m [n], independently,3 using bq,m ∈ Z++  · sinc qa − Dy cos θ sin φ , (2) bits. If bq,m = 0, the symbols on antenna q are not forwarded to the CU by RRH m (i.e., this antenna is not selected for subsequent channel training and data transmission). Following q ∈ Q(j) , j ∈ J . Since the RRHs have fronthaul links the design in [8], the resulting quantized samples y̌q,m [n] can of finite capacities, they must quantize the received signals be expressed as before forwarding to the CU. As the RRHs are typically y̌q,m [n] = yq,m [n] + eq,m [n], (3) simple nodes with limited processing capability, we consider that they perform uniform SQ independently on each antenna, where eq,m [n] represents the quantization error, modeled as a with the SQ bit allocation adapted in each channel coherence random variable with mean zero and variance given by [8] interval. As shown in Fig. 4, the RRHs perform bit allocation based on the estimated received power levels at each antenna ε2q,m , E[|eq,m [n]|2 ] = 3ρq,m /22bq,m , bq,m ∈ Z++ . (4) element, which can be obtained before converting the signals to the baseband, either using feedback from the automatic The quantization error is assumed to be uncorrelated with gain control (AGC) circuitry, or by means of analog power yq,m [n], and as the SQ is performed independently at each estimators [23], which can be implemented using band-pass antenna and for each sample, we have E[eq,m [n]e∗q′ ,m [n′ ]] = 0 filters and envelope detectors. We consider a frame-based for any q ′ 6= q or n′ 6= n, ∀m ∈ M. With Nyquist transmission by the users, with frame duration Tf < Tc in rate sampling, the transmission rate required P to forward the quantized signals over all the antennas is symbol periods, where Tc denotes the minimum coherence q∈Q 2W bq,m bps, time among all the user-RRH channels. Each frame is further which must not exceed the fronthaul capacity R̄m . Each RRH m uses the estimate ρq,m of the average received power divided into the following three stages as shown in Fig. 3: computed from the received signals in the power-probing stage • A power probing stage of duration Ta , where the users to perform the SQ in the subsequent channel training and data transmit constant amplitude signals in order to enable the transmission stages. We consider the design of quantization RRHs to perform bit allocation and antenna selection; bit allocation to minimize the total SQ noise power over all • A channel training stage of duration Tp , where the users the antennas subject to the fronthaul capacity constraint at the transmit pilot symbols, and the CU performs channel RRH, as captured by the following optimization problem estimation for the selected antennas using the quantized X 3ρq,m signals forwarded by the RRHs; and (5) minimize bm 22bq,m • A data transmission stage of duration Td , where the users q∈Q transmit their data, which is quantized and forwarded by subject to the RRHs for decoding at the CU. X R̄m (5a) bq,m ≤ 2W The above stages are separated by guard intervals of dmax q∈Q symbols (see Fig. 3), where dmax denotes the maximum delay spread of all the user-RRH channels. Note that Tf = Ta +Tp + 3 This can be performed using low-cost, low-resolution analog-to-digital Td + 2dmax . In the following, we describe each stage in detail. converters (ADCs). 5 T where bm , [ b1,m ··· bQ,m ] ∈ ZJQ×1 ++ . Since the bq,m ’s are integers, the above problem is non-convex. However, if the variables are relaxed so that bq,m ∈ R+ ∀q ∈ Q, we have the following relaxed problem X 3ρq,m 22bq,m min bm ∈RJQ×1 + q∈Q (6) s.t. (5a) which is convex since the objective function is convex,4 while the constraint (5a) is linear. Thus, we have the following proposition. Proposition 2.1. The optimal solution to problem (6) is given by b′q,m = max n1 2 log2 where λ⋆ ≥ 0 is such that  6ρ P q,m ln 2 λ⋆ ′ q∈Q bq,m  o , 0 , q ∈ Q, TABLE I A LGORITHM FOR QUANTIZATION BIT ALLOCATION Initialize λmin = 0, λmax = 6ρmax,m ln 2, tolerance ǫ > 0 repeat λ = (λmin + λmax )/2 Compute bm according to (7) P if q∈Q bq,m ≤ R̄m /2W then Set λmax = λ else Set λmin = λ end if until |λmax − λmin | < ǫ Use λ⋆ = λ in (7) to compute b′m Initialize βmin = 0, βmax = 1, and find β in (8) by bisection similar to above until |βmax − βmin | < ǫ 13: Compute final integer solution b̃m to problem (5) according to (8) with converged β 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: (7) = R̄m /2W . Proof. Please refer to the appendix. Let Q′m denote the set of antennas with non-zero allocation according to (7). With the optimal solution b′m to problem (6), we proceed to construct a feasible integer solution b̃m ∈ ZJQ×1 for the original problem (5) by rounding b′m as ++ follows ( ⌊b′q,m ⌋ if b′q,m − ⌊b′q,m ⌋ ≤ β b̃q,m = , q ∈ Q′m , (8) ⌈b′q,m ⌉ if b′q,m − ⌊b′q,m ⌋ > β b′q,m where β ∈ [0, 1] is an appropriate threshold. Notice that as β is decreased, most of the b′q,m ’s would be rounded above, making it more difficult to satisfy the constraint in (5) and vice versa. Hence, a suitable β can be found by bisection on the interval [0, 1], each time evaluating the constraint in (5) with b̃m in (8) and updating β accordingly. From (7), we observe that the optimal solution allocates more bits to the antenna with higher estimated power ρq,m , which is desirable, since the antennas that receive stronger signals from the users are more likely to have useful information to be decoded. The algorithm is summarized in Table I and we denote the final set of selected antennas at RRH m as Qm = {q ∈ Q | b̃q,m > 0} with |Qm | , Qm . We assume that the fronthaul capacities are such that R̄m ≥ 2JW, ∀m ∈ M, so that the number of selected antennas at each RRH is at least Qm ≥ J, ∀m ∈ M. Then, since JM ≥ K, it is always feasible to recover all K users’ signals at the CU via linear processing with independent channels. Let Qtot , P m∈M Qm denote the total number of selected antennas. For the ease of exposition, we refer to the selected antennas as “streams” and use the index i ∈ {1, . . . , Qtot } , I to denote each stream so that the stream i corresponds to the antenna (j) qi in sector j of RRH mi . 4 For the relaxed problem, we assume that the objective function is defined for bq,m = 0 as well. B. Path Delay Compensation and Achievable Sum-Rate with Perfect CSI In this subsection, we describe the operations at the CU, assuming perfect CSI. If the RRHs are equipped with lens antenna arrays, we propose that the users transmit simultaneously with single-carrier modulation, so that the data √ symbols transmitted by user k are given by xd,k [n] = P sd,k [n], where P ≥ 0 is the transmit power and sd,k [n] ∼ CN (0, 1) is the complex data symbol of user k. Using (1) and (3), the quantized symbols received at the CU corresponding to stream i ∈ I can be expressed as X X y̌d,i [n] = hi,k,ℓ xd,k [n − dmi ,k,ℓ ] + zd,i [n] k∈K ℓ∈Lmi ,k + ed,i [n], i ∈ I. (9) We assume that the CU decodes the users’ data symbols via linear processing, after path delay compensation [20] on the received signals for each stream as described below. Let ℓ⋆i,k = arg maxℓ∈Lm ,k |hi,k,ℓ |2 denote the strongest path among all i those arriving on stream (selected antenna) i ∈ I from user k. Due to the response of the lens array, the delayed versions of a particular user’s signals with different angels of arrival are focused on different antenna elements at each RRH in general. Thus, to ensure that the symbols of each user that have undergone the strongest path gain on each stream are combined at the CU in a synchronized manner, each stream (j) of quantized symbols y̌d,i [n], corresponding to antenna qi of RRH mi , is advanced by the delay dmi ,k,ℓ⋆i,k corresponding to  the path ℓ⋆i,k , to obtain the delay compensated signal y̌d,i,k n+  dmi ,k,ℓ⋆i,k , y̌¯d,i,k [n] for each user k ∈ K, as given by y̌¯d,i,k [n] X = X k′ ∈K ℓ′ ∈Lmi ,k′   hi,k′ ,ℓ′ xd,k′ n − dmi ,k′ ,ℓ′ − dmi ,k,ℓ⋆i,k     + zd,i n + dmi ,k,ℓ⋆i,k + ed,i n + dmi ,k,ℓ⋆i,k . (10) In order to write the summation over the paths in (10) in terms of the delay differences ν = dmi ,k′ ,ℓ′ − dmi ,k,ℓ⋆i,k ∈ {0, ±1, . . . , ±dmax } , ∆ with the delay of the maximum gain 6 path dmi ,k,ℓ⋆i,k , we define for each antenna i ∈ I and user pair k, k ′ ∈ K, the new channel coefficient X   h̄i,kk′ [ν] , hi,k′ ,ℓ′ δ ν − dmi ,k′ ,ℓ′ − dmi ,k,ℓ⋆i,k , ℓ′ ∈Lmi ,k′ i ∈ I, k, k ′ ∈ K, ν ∈ ∆, (11) which is equivalent to the channel coefficient (or sum of coefficients) corresponding to the path(s) ℓ′ ∈ Lmi ,k′ from user k ′ to antenna i, which has (have) a delay difference of ν with the maximum gain path ℓ⋆i,k of user k to the same antenna. Then, (10) can be expressed as X h̄i,kk [ν]xd,k [n − ν] y̌¯d,i,k [n] = h̄i,kk [0]xd,k [n] + ν∈∆\{0} + X X k′ ∈K\{k} ν∈∆ | | {z inter-symbol interference (ISI) h̄i,kk′ [ν]xd,k′ [n − ν] {z inter-user interference (IUI) } } + z̄d,i,k [n] + ēd,i,k [n], i ∈ I, k ∈ K, (12)   2 ) and where z̄d,i,k [n] , zd,i n + dmi ,k,ℓ⋆i,k ∼ CN (0, σm i   ēd,i,k [n] , ed,i n + dmi ,k,ℓ⋆i,k , with E[ēd,i,k [n]] = 0 and E[|ēd,i,k [n]|2 ] = ε2i defined in (4) denote the AWGN and quantization noise samples shifted by dmi ,k,ℓ⋆i,k symbol periods. Note that y̌¯d,j,k [n] in (12) depends on user k whose maximum gain path ℓ⋆i,k is used as reference. The second and third terms in (12) represent user k’s own delayed symbols, and the interfering symbols from other users, respectively. Collecting the signals from all the streams, (12) can be written in vector form as X ¯d,k [n] = h̄kk [0]xd,k [n] + h̄kk [ν]xd,k [n − ν] y̌ ν∈∆\{0} + X X k′ ∈K\k ν∈∆ h̄kk′ [ν]xd,k′ [n − ν] + z̄d,k [n] + ēd,k [n], k ∈ K, (13) where all the vectors are of dimension Qtot × 1. We consider ¯k [n] that the CU performs linear receive beamforming on y̌ with the beamforming vector uk ∈ CQtot ×1 to construct the ¯ estimate x̂d,k [n] = uH k y̌d,k [n] of user k’s symbol. Treating the inter-symbol and inter-user interference in (12) as Gaussian noise, the signal to interference-plus-noise ratio (SINR) for decoding xd,k [n] is given by (14) on the top of the next page. 2 2 IQM ) ∈ CQtot ×Qtot , and IQ1 ··· σM In (14), Σ , blkdiag(  σ1Q 2 Qtot tot ×Qtot , where ε2i , i ∈ I, is deΞ , diag {εi }i=1 ∈ C fined in (4). Since the transmit powers of the users are fixed, γk in (14) is maximized by uk = Ck−1 h̄kk [0], k ∈ K according to the minimum mean squared error (MMSE) criterion [24], where X P h̄kk [ν]h̄kk [ν]H Ck , ν∈∆\{0} + X X k′ ∈K\{k} ν∈∆ P h̄kk′ [ν]h̄kk′ [ν]H + Σ + Ξ, k ∈ K, (15) denotes the covariance of the noise and interference terms in (13). In this case, the SINR in (14) becomes γk = P h̄kk [0]H Ck−1 h̄kk [0], and by assuming the worst-case CSCG distribution for the quantization noise, a lower bound on the achievable sum rate over all users is thus given by X rlens = log2 (1 + γk ) (16) k∈K in bps/Hz. In the next subsection, we consider channel estimation at the CU, and extend the achievable rate analysis to the case with imperfect CSI. C. Channel Estimation and Achievable Sum-Rate with Imperfect CSI Since the CU does not know the CSI a priori, it needs to estimate the CSI using pilot signals sent by the users and then quantized and forwarded by the RRHs in the channel The users transmit known pilot estimation stage (see Fig. 3). √ symbols given by xp,k [n] = P sp,k [n], n = 0, 1, . . . , Tp − T 1, k ∈ K. Let hi,k , [ hi,k [0] ··· hi,k [dmax ] ] ∈ C(dmax +1)×1 denote the vector of time-domain channel taps from user k to antenna i ∈ I. Then, the vector of quantized symbols y̌p,i , T [ y̌p,i [0] ··· y̌p,i [Tp −1] ] ∈ CTp ×1 received at the CU during the channel estimation stage can be expressed as X y̌p,i = Xp,k hi,k + zp,i + ep,i k∈K = Xp hi + zp,i + ep,i , i ∈ I, (17) where   Xp,k ,  xp,k [0] xp,k [1] 0 xp,k [0] .. . .. . ··· ··· .. . 0 0 .. . xp,k [Tp −1] xp,k [Tp −2] ··· xp,k [Tp −1−dmax ] ∈ CTp ×(dmax +1) , k ∈ K,    (18) is a Toeplitz matrix constructed from consecutive shifts of the pilot symbols of the users, while zp,i , [ zp,i [0] ··· zp,i [Tp −1] ]T 2 I ) denotes the AWGN, and ep,i , with zp,i ∼ CN (0, σm i Tp T 2 [ ep,i [0] ··· ep,i [Tp −1] ] ∈ CTp ×1 with E[ep,i eH p,i ] = εi ITp X ··· X p,K ] ∈ denotes the quantization noise. Also, Xp , [ p,1 T CTp ×K(dmax +1) , and hi , [ hTi,1 ··· hTi,K ] ∈ CK(dmax +1)×1 in (17). It is sufficient to estimate hi , i ∈ I in (18), to find both the channel coefficients and their corresponding tap delays. We do not assume any prior knowledge of the probability distribution function (pdf) of the elements of hi , i ∈ I at the CU, i.e. they are treated as unknown constants. Then, the least-squares (LS) estimate of hi is given by ĥi = arg min ky̌p,i − Xp hi k2 = Xp† y̌p,i hi = hi + ξp,i , i ∈ I. (19) where we define ξp,i , Xp† zp,i + Xp† ep,i . Since each component of the vector X † ep,i ∈ C(dmax +1)×1 is a linear combination of the Tp independent zero-mean random variables in ep,i , the second term in ξp,i , X † ep,i , can be modeled as a CSCG random vector, with mean E[X † ep,i ] = 0 and covariance † H 2 H −1 E[X † ep,i eH , due to the central limit p,i (X ) ] = εi (Xp Xp ) 7 γk = P ν∈∆\{0} 2 P |uH k h̄kk [ν]| + P uH k h̄kk [0] P P k′ ∈K\k  2 + ε2i )(XpH Xp )−1 in (19). theorem. Thus, ξp,i ∼ CN 0, (σm i Note that Tp ≥ K(dmax + 1) must be satisfied for the solution in (19) to exist. The MSE of the estimate ĥi is given by E[kĥi − hi k2 ] = E[kξp,i k2 ]   2 + ε2i tr (XpH Xp )−1 , = σm i (20) which is minimized if XpH Xp = cIK(dmax +1) , where c is a constant [25, Example 4.3]. From the construction of H Xp , this translates to the condition Xp,k Xp,k′ = cδ[k − ′ ′ k ]I(dmax +1) , ∀k, k ∈ K, which is satisfied if each user’s training sequence sp,k [n], n = 0, . . . , Tp − 1 is orthogonal to that of every other user’s training sequence, and has the “ideal” auto-correlation property [25]. This can be ensured by using e.g., unit-amplitude Zadoff-Chu sequences [26], [27] for sp,k [n], with equal transmit power P, ∀k ∈ K. In this case, H c = P Tp so that (Xp,k Xp,k )−1 = P 1Tp I(dmax +1) , ∀k ∈ K, and thus Xp† = P 1Tp XpH . Consequently, the LS estimate in (19) reduces to 1 ĥi = X H y̌p,i = hi + ξp,i , (21) P Tp p 1 X H (zp,i + ep,i ) ∼ where ξp,i =  (σ2 +ε2 ) P Tp p CN 0, mPiTp i IK(dmax +1) . According to (21), each tap in hi is estimated by correlating the received signal vector y̌p,i with the training sequence of the corresponding user shifted by the corresponding delay of the tap. Due to the energy focusing property of the lens antenna array in (2), and the different directions of arrival of the users’ signals at different RRHs, at any stream i, typically only one path corresponding to a particular user corresponding to a particular tap delay would dominate over all its the other paths. Thus, the magnitudes of the channel coefficients in hi can be vastly different, depending on the angle of arrival of the users’ signals, and directly using the estimates of all the taps in hi , i ∈ I according to (19) may be ineffective. To overcome this issue, we propose a reduced-size, approximate linear MMSE beamforming by exploiting the “sinc”-type response of the lens array, where for each user, we select only the streams which contain at least one dominant estimated tap of its own, and then perform an approximate linear MMSE beamforming over these selected streams by thresholding the channel estimates, as explained below. Notice that for the data decoding with path delay compensation detailed in Section II-B, the term h̄i,kk [0] in (12) corresponds to the channel coefficient with maximum path gain from user k to antenna i. Now, due to the energy focusing property of the lens, the angle of arrival of user k’s signal is typically such that |h̄i,kk [0]| ≫ |h̄i,kk [ν]|, ∀ν ∈ ∆ \ {0}, on some streams i. This means that the maximum gain path of the user would dominate over the other paths on a particular stream i, provided the antenna corresponding to stream i has ν∈∆ 2 H 2 P |uH k h̄kk′ [ν]| + uk (Σ + Ξ)uk , (14) a response which peaks at one of the angles of arrival of the user’s paths. Since we do not know the actual channel gains, we aim to find the set of such streams Ik for each user k, for which the magnitude of the maximum estimated channel gain exceeds a certain threshold. For this, we first estimate the tap delays of the maximum gain paths from user k to every stream i ∈ I. These are denoted by d˘i,k , i ∈ I, and computed from the LS estimate in (21) as follows d˘i,k , arg max |ĥi,k [d]|, k ∈ K, i ∈ I. (22) d∈D In the above, ĥi,k [d] is the ((k−1)(dmax +1)+d+1)th element of the vector LS estimate ĥi in (21). Essentially, we choose the tap delay corresponding to the estimate with the largest magnitude as the estimated delay of the maximum gain path on each stream i ∈ I. Then, for each stream i ∈ I, the estimate of the channel coefficient corresponding to the estimated maximum gain path, is given by ĥi,k [d˘i,k ], i ∈ I, k ∈ K, which is the ((k − 1)(dmax + 1) + d˘i,k + 1)th element of the vector LS estimate ĥi in (21). Further, during the data transmission stage, the CU selects a set of streams Ik ⊆ I, for which the above estimated channel gains ĥi,k [d˘i,k ] corresponding to the estimated maximum gain paths, are larger than a given threshold; i.e., we define   2  P ĥi,k [d̆i,k ]   i∈I ≥η , 2 +ε2  σm  i i   2   P ĥi,k d̆i,k Ik , if ∃ at least one i ∈ I s.t. ≥ η, 2 +ε2 σm i  i   {ik }      otherwise, where i , arg max , ĥ d˘ k i∈I i,k i,k (23) k ∈ K, where η is a suitable threshold. Also, let Ik = {j1 , . . . , jIk }, and |Ik | = Ik , so that Ik ≥ 1, i.e. at least one stream is selected for decoding each user’s signal. Thus, for the data transmission stage, we now have the reduced set of streams y̌d,i , i ∈ Ik for each user k, with each y̌d,i given by (12). On these set of streams, the CU performs path delay compensation as in Section II-B, but now with the estimated delays d˘i,k ’s of the maximum gain paths instead of the true delays dmi ,k,ℓ⋆i,k ’s. The delay compensated signal can then be expressed in terms of the delay differences of the taps with d˘i,k , similar to (12), as X h̆i,kk [ν̆]xd,k [n − ν̆] y̌˘d,i,k [n] = h̆i,kk [0̆]xd,k [n] + ν̆∈∆\{0̆} + X X k′ ∈K\{k} ν̆∈∆ | | {z ISI h̆i,kk′ [ν̆]xd,k′ [n − ν̆] {z IUI } + z̆d,i,k [n] + ĕd,i,k [n], i ∈ Ik , k ∈ K, } (24) 8 ˆ −1 ˆ ˆ k = C̆ ˘ where we have defined y̌˘d,i,k [n] , y̌d,i,k [n + d˘i,k ], z̆d,i,k [n] , beamforming ŭ k h̆kk [0̆] on the observations y̌d,k [n] 5 zd,i [n + d̆i,k ], and ĕd,i,k [n] , ed,i [n + d̆i,k ], and also placed a˘ in (26), where X symbol over the delay differences ν̆ ∈ ∆ to indicate that they ˆ ˆ ˆ P h̆kk [ν̆]h̆kk [ν̆]H C̆k , are w.r.t. the estimated tap delay d˘i,k . The channel coefficients ν̆∈∆\{0̆} h̆i,kk′ [ν̆] are defined similar to (11), and are given by X X ˆ ˆ X + P h̆kk′ [ν̆]h̆kk′ [ν̆]H + Σ̆ + Ξ̆, (29)   ˘ hi,k′ ,ℓ′ δ ν̆ − dmi ,k′ ,ℓ′ − di,k , h̆i,kk′ [ν̆] , k′ ∈K\{k} ν̆∈∆ ℓ′ ∈Lmi ,k′ i ∈ Ik , k, k ′ ∈ K, ν̆ ∈ ∆. (25) Note that the h̆i,kk′ [ν̆]’s in (24) and (25) denote the true channel coefficients that correspond to a delay difference of ν̆ with the estimated delay d˘i,k . In vector form, (24) can be written as X ˘d,k [n] = h̆kk [0̆]xd,k [n] + h̆kk [ν̆]xd,k [n − ν̆] y̌ ν̆∈∆\{0̆} + X X k′ ∈K\{k} ν̆∈∆ h̆kk′ [ν̆]xd,k′ [n − ν̆] + z̆d,k [n] + ĕd,k [n], k ∈ K, X P h̆kk [ν̆]h̆kk [ν̆]H ν̆∈∆\{0̆} + X k′ ∈K\{k} X P h̆kk′ [ν̆]h̆kk′ [ν̆]H + Σ̆ + Ξ̆, k∈K in bps/Hz. In the following subsection we briefly describe a benchmark scheme in the conventional CRAN when the RRHs use UPAs and the users transmit using OFDM. (26) where all the vectors have dimensions Ik × 1. Then, the reduced-size linear MMSE beamformer ŭk ∈ CIk ×1 for user k after path delay compensation with the estimated tap delay of the maximum gain path on each stream i ∈ Ik is given by ŭk = C̆k−1 h̆kk [ν̆], where C̆k , and the resulting SINR is given by (30) on the top of the next page. Thus, with the proposed channel estimation, path delay compensation, and reduced-size, approximate linear MMSE receive beamforming for each user at the CU, a lower bound on the effective sum-throughput over all users of the CRAN is given by   Ta + Tp + 2dmax X r̂lens = 1 − log2 (1 + γ̂k ) (31) Tf (27) ν̆∈∆ is the covariance matrix ofthe interference terms in (26), with   2 2 2 2 σ ... σm m Σ̆ , diag , and Ξ̆ , εj1 ... εjIk . j1 jI k However, the CU cannot compute the beamformer ŭk since it only has the estimates of h̆i,kk′ [ν̆], computed from (21). Now, on the selected streams i ∈ Ik , to avoid using the noisy estimates, the CU approximates the ISI and IUI terms in (24) by thresholding the estimates similar to (23). With the thresholding, the estimates of h̆i,kk′ [ν̆], which we denote by ˆ h̆i,kk′ [ν̆], are given by  ĥ ′ [ν̆ + d˘ ], if P |ĥi,k′ [ν̆+d̆i,k ]|2 ≥ η, i,k i,k 2 +ε2 ˆ ′ σm i h̆i,kk [ν̆] , (28) i 0 otherwise, i ∈ Ik , k, k ′ ∈ K, ν̆ ∈ ∆. In (28), ĥi,k′ [ν̆ + d˘i,k ] is the ((k ′ − 1)(dmax + 1) + (ν̆ + d˘i,k ) + 1)th element of the vector LS estimate ĥi in (21). Note that due to the response of the lens antenna array, for each stream i ∈ Ik , ˆ the thresholded estimates h̆i,kk′ [ν̆] will be non-zero only for a few usersh k ′ ∈ K and delay idifferences ν̆ ∈ ∆. Let T ˆ h̆kk′ [ν̆] = h̆ˆ j1 ,kk′ [ν̆] ··· h̆ˆ jIk ,kk′ [ν̆] ∈ CIk ×1 denote the vector of the thresholded channel estimates in (28). Then, the CU applies the reduced-size, approximate linear MMSE III. B ENCHMARK : C ONVENTIONAL CRAN AND OFDM WITH UPA S In this case, each sector of an RRH is assumed to be equipped with a rectangular UPA of physical dimensions D̃y × D̃z , with adjacent antenna elements of the array separated by a distance equal to half the wavelength. Let Q̃(j) , {1, . . . , Q̃}, denote the set of antennas at sector j ∈ J of each RRH in S this case, and Q̃ = j∈J Q(j) denote the set of all antenna elements. The number of antenna elements per sector is given by Q̃ = Q̃y Q̃z , where Q̃y = ⌊2D̃y ⌋ denotes the number of antennas along the y-axis of the UPA and Q̃z = ⌊2D̃z ⌋ is the number of antennas along the z-axis. For the UPA, the array response vector a(θ, φ) ∈ CQ̃×1 in (1) can be written as a(θ, φ) = az (θ) ⊗ ay (θ, φ), (32) q T D̃z where az (θ) = [ 1 exp(π sin θ) ··· exp(π(Q̃z −1) sin θ) ] ∈ Q̃ z CQ̃z ×1 is ray along r the the response z-axis, of and the linear ay (θ, φ) D̃y T [ 1 exp(π cos θ sin φ) ··· exp(π(Q̃y −1) cos θ sin φ) ] Q̃y ar= ∈ CQ̃y ×1 is the response of the linear array along the y-axis. The total channel bandwidth W is divided into N orthogonal sub-channels (SCs) of equal width denoted by N , {0, 1, . . . , N − 1}. The uplink transmission protocol is similar to that in Fig. 3, except that the users transmit their symbols in (N + µ)length symbol blocks using OFDM, where µ ≥ dmax is the length of the cyclic prefix (CP). Hence, the guard intervals shown in Fig. 3 are implicit in this case due to the CP, which is discarded at the CU. We assume that all the users transmit on all SCs for fully exploiting spatial multiplexing. 5 It is assumed that the CU knows the quantization noise variances on each stream. These can be transmitted by the RRHs after the power probing stage to the CU once every frame period, along with information about the number of SQ bits on each antenna, since these quantities do not change within a frame. 9 γ̂k = P ν̆∈∆\{0̆} ˆ H h̆kk [ν̆]|2 + P |ŭ k ˆ H h̆kk [0̆] P ŭ k P P k′ ∈K\k In general, there can be multiple OFDM symbols in the power probing, channel estimation, and data transmission stages. For convenience, it is assumed that Ta , Tp and Td are all a integer multiples of N + µ, i.e. there are τa = NT+µ ∈ Z++ , Tp τp = N +µ ∈ Z++ , and τd = τd ∈ Z++ OFDM symbols in the power probing, channel estimation, and data transmission stages of a frame, respectively. Let x̃t,k ∈ CN ×1 denote the tth OFDM symbol transmitted by user k in the frequency-domain. Then the corresponding time-domain signals are given by the inverse discrete Fourier transform (IDFT) xt,k = F H x̃k , where F ∈ CN ×N denotes the DFT matrix with columns T 2πn(N −1) ) ] , n ∈ N . Similar fn , √1N [ 1 exp(− 2πn N ) ··· exp(− N to Section II-A, the RRHs perform antenna selection and SQ bit allocation on the received time-domain signals and forward them to the CU. Let Q̃m , {q ∈ Q̃|bq,m > 0} with |Q̃m | = Q̃m denote the set of selected antennas at each RRH m in this case. Notice that with UPAs, the selected set of antennas and their non-zero quantization bit allocation at each RRH can be very different from that with the lens antenna P array, due to the lack of the lens focusing. Let Q̃tot = m∈M Q̃m and similar to Section II-A we index the selected antennas (streams) with i ∈ {1, . . . , Q̃tot } , Ĩ, where stream index i corresponds to antenna qi of RRH mi . 2 ν̆∈∆ ˆk ˆ H (Σ̆ + Ξ̆)ŭ ˆ H h̆kk′ [ν̆]|2 + ŭ P |ŭ k k k∈K = X√ N X̃p,t,k F0 hi,k + z̃p,t,i + ẽp,t,i k∈K = X̄p,t hi + z̃p,t,i + ẽp,t,i , (33) where z̃p,t,i = F zp,t,i is the DFT of the AWGN so 2 I ), and ẽp,t,i = F ep,t,i is the that z̃p,t,i ∼ CN (0, σm i N DFT of the quantization noise with E[ẽp,t,i ] = 0 and 2 E[ẽp,t,i ẽH p,t,i ] = εi IN . Since each element of ẽp,t,i is a linear combination of the N elements in ep,t,i , due to the 2 central limit IN ). Also, in (33), √ theorem, ẽp,t,i ∼ CN (0, εNi×K(d max +1) , and hi X̄p,t , N [ X̃p,t,1 F0 ··· X̃p,t,K F0 ] ∈ C (30) ˜p,t,i , is defined similar to (17). For τp > 1, stacking each of y̌ X̄p,t , z̃p,t,i , and ẽp,t,i , t ∈ {1, . . . , τp − 1} column-wise, we have ˜p,i = X̄p hi + z̃p,i + ẽp,i . y̌ (34) Similar to Section II-C, the LS estimate for hi is given by6 ˜p = hi + ξp,i , ĥi = X̄p† y̌ (35) 2 + where ξp,i , X̄p† (z̃p,i + ẽp,i ) ∼ CN (0, (σm i 2 H −1 εi )(X̄p X̄p ) ). Note that the estimate in (35) exists only if τp N ≥ K(dmax + 1), and the MSE of the estimate is  2 + ε2i )tr (X̄pH X̄p )−1 , E[kĥi − hi k2 ] = E[kξp,i k2 ] = (σm i (36) which is minimized if X̄pH X̄p = c̃IK(dmax +1) , where c̃ is a constant. Due to the construction of X̄p in (34), this translates to the requirement that τp −1 X H X̄p,t,k X̄p,t,k′ = N F0H  τX p −1 t=0 t=0  H X̃p,t,k X̃p,t,k′ F0 = δ[k − k ′ ]c̃I(dmax +1) A. Channel Estimation In the channel estimation stage, let x̃p,t,k [n] denote the frequency-domain pilot symbol transmitted by user k ∈ K on SC n ∈ N in the tth OFDM symbol, where t ∈ {0, 1, . . . , τp − 1}. Also, let X̃p,t,k , diag( x̃p,t,k [0] ··· x̃p,t,k [N −1] ) ∈ CN ×N be the diagonal matrix constructed √ from the pilot symbols on all the SCs, and h̃i,k = N F0 hi,k , the vector of frequency-domain channel coefficients from user k to antenna i ∈ I, where hi,k ∈ C(dmax +1)×1 is the time-domain channel coefficient vector similar to that in Section II-C, and F0 ∈ CN ×(dmax +1) denotes the first (dmax +1) columns of F . Then, the frequency-domain received signal vector at the CU corresponding to the OFDM symbol t at antenna i ∈ Ĩ, after removing the CP and applying the DFT can be expressed as X ˜p,t,i = y̌ X̃p,t,k h̃i,k + z̃p,t,i + ẽp,t,i . k, k ′ ∈ K. (37) Now, let Ψ , V ⊗Sp,k ∈ Cτp N ×τp N , where V ∈ Cτp ×τp is a unitary matrix and Sp,k , diag( sp,k [0] ··· sp,k [N −1] ) ∈ CN ×N is a diagonal matrix with unit amplitude training symbols, H H satisfying Sp,k Sp,k = IN . Then, ΨH Ψ = V H V ⊗Sp,k Sp,k = Iτp N . The√condition (37) can then be ensured by choosing √ X̃p,t,k = P Ψtω ( N diag(fκ )), where Ψtω ∈ CN ×N is the (t, ω)th block of Ψ, t, ω ∈ {0, . . . , τp − 1} [28, Theorem 2]. Here, κ and ω are such that the user index k can be written K−1 as k = κτp + ω + 1, i.e., κ = ⌊ k−1 τp ⌋ ∈ {0, 1, . . . , ⌊ τp ⌋}, and ω = k − 1 − κτp ∈ {0, 1, . . . , τp − 1}. Then, (37) holds with c̃ = τp N P , and X̄pH X̄p = τp N P IK(dmax +1) . Then, the LS estimate in (35) can be written as ĥi = 1 ˜p = hi + ξp,i , X̄ H y̌ τp N P p (38) 1 X̄ H (z̃p,i + ẽp,i ) ∼ where ξp,i =  σ2 +ε2 τp N P p CN 0, τmpiN P i IK(dmax +1) . Note that (35) gives the time-domain channel estimates, and the frequency domain ˆ estimates h̃i,k , i ∈ Ĩ for each user k ∈ K, are given by √ ˆ applying the transformation h̃i,k = N F0 ĥi,k , i ∈ Ĩ, k ∈ K, where ĥi,k is the length (dmax + 1) sub-vector in ĥi starting at index (k − 1)(dmax + 1) + 1 and ending at k(dmax + 1). 6 Since both z̃ p,i and ẽp,i are CSCG, this is also the maximum likelihood estimate of hi . B. Achievable Sum-Rate √ Let x̃d,k [n] = P sd,k [n] denote the frequency-domain data symbol transmitted by user k on SC n ∈ N , where sd,k [n] ∼ CN (0, 1) and P ≥ 0. Then, the frequency-domain received signal at the CU on SC n ∈ N corresponding to stream i ∈ Ĩ can be expressed as X y̌˜d,i [n] = h̃i,k [n]x̃d,k [n] + z̃d,i [n] + ẽd,i [n], (39) k∈K th where z̃d,i [n] and ẽd,i [n] are the n components of the DFTs of the AWGN and quantization noise similar to that in (33). Collecting the received signals from all streams on each SC n, we have X ˜d [n] = y̌ h̃k [n]x̃d,k [n] + z̃d [n] + ẽd [n], n ∈ N , (40) z-axis (meters) 10 40 20 0 60 50 40 30 50 RRH User 20 y-axis (meters) 40 30 10 20 10 0 0 x-axis (meters) k∈K where all the vectors are of dimensions Q̃tot × 1. If the CU has perfect CSI, the linear MMSE beamforming vector ũk,n ∈ CQ̃tot ×1 that maximizes the receive SINR for each user k on SC n, treating the interference from other users as noise, is −1 given by ũk,n = C̃k,n h̃k [n], where X (41) P h̃k′ [n]h̃k′ [n]H + Σ̃ + Ξ̃, C̃k,n , k′ ∈K\{k}  2 IQ̃ ∈ CQ̃tot ×Q̃tot and Ξ̃ , with Σ̃ , blkdiag σ12 IQ̃1 ··· σM M Q Q̃ × Q̃ tot diag( {ε2i }i=1 ) ∈ C tot tot . The SINR for user k on SC −1 h̃k [n], and thus the n is then given by γ̃k,n = P h̃k [n]H C̃k,n sum-rate over all users with UPAs and OFDM transmission is given by X X 1 r̃upa = log2 (1 + γ̃k,n ) (42) N +µ k∈K n∈N in bps/Hz. On the other hand, with estimated CSI, the CU computes ˆ ˆ −1 h̃ ˆ k,n = C̃ the linear MMSE receiver ũ k,n k [n] on each SC n, P ˆ ′ [n]H + Σ̃+ Ξ̃ ˆ ′ [n]h̃ ˆ P h̃ where the matrix C̃ , k,n k′ ∈K\{k} k k ˆ and the components of h̃k [n], n ∈ N , k ∈ K are computed by transforming the time-domain estimates in (35) as outlined earlier. Then the resulting SINR is given by ˆ H h̃k [n]|2 P |ũ k,n ˆ H h̃k′ [n]|2 + ũ ˆ H (Σ̃ + Ξ̃)ũ ˆ k,n P | ũ ′ k ∈K\{k} k,n k,n (43) γ̃ˆk,n = P Thus, the effective sum-throughput over all users with UPAs and OFDM transmission is given by  τa + τp  1 X X r̃ˆupa = 1 − log2 (1 + γ̃ˆk,n ), (44) τf N +µ k∈K n∈N in bps/Hz. IV. S IMULATION R ESULTS For the simulations, we consider a part of the general sectorized CRAN illustrated in Fig. 2 with M √ = 6 RRHs located at the corners of a hexagon of side 50/ 3 meters (m), along with K = 6 users randomly located in the common Fig. 5. Example of RRH and user layout for simulations. region covered by one sector of each RRH as shown in Fig. 5. All the RRHs are assumed to be of height 30 meters (m), while the users’ height can vary between 1 m and 25 m. The size of the EM lens at the RRHs is such that Dy = Dz = 10, while the UPAs are rectangular with same length D̃y = 10 as the EM lens along the y-axis, and length D̃z = 7 along the z-axis. The height of the RRHs is greater than the maximum height of the users, and the minimum distance along the ground between a user and RRH is assumed to be 2 m. Based on the above setup, the maximum coverage angles for the lens array in the elevation direction are chosen to be Θ+ = π/2, Θ− = π/6, while the corresponding angles in the azimuth direction are Φ+ = Φ− = π/3 due to the sectorization. This leads to Q = 208 and Q̃ = 280 antennas per sector at each RRH for the lens array and the UPA, respectively. The carrier frequency is 28 GHz and the mmWave channel shared by the users and RRHs has a bandwidth W = 200 MHz. The maximum delay spread of the channel is 100 ns, which translates to dmax = 20 symbols. The free-space path loss ′ between a user k and RRH m separated by distance Dm,k m ′ is modeled by 61.4 + 34.1 log10 Dm,k dB [29]. The number of paths Lm,k between user k and RRH m is equal to 1, 2 or 3 with equal probability, and the time delays of the paths ζℓ , ℓ ∈ Lm,k , are generated from an exponential distribution with mean rζ µζ , but truncated to 100 ns, where µζ = 67 ns and rζ = 0.25 [29]. The relative P power levels of the paths are given by κ̄m,k,ℓ = κm,k,ℓ /( ℓ′ ∈Lm,k κm,k,ℓ′ ), where  Z −ζℓ κm,k,ℓ = 10 10 (0.613) exp 31.4 ns [29], and Z is zero-mean Gaussian with standard deviation 9.4 dB, representing the perpath shadowing [29]; thus |αm,k,ℓ |2 = κ̄m,k,ℓ Pr,m,k , where Pr,m,k in watt is the received power at RRH m from user k after accounting for the free-space path loss. The phase shifts of each path ∠αm,k,ℓ are generated uniformly randomly from the interval [0, 2π]. The elevation angles of arrival θm,k,ℓ for each path ℓ ∈ Lm,k from user k ∈ K to RRH m ∈ M are indeπ π pendent and generated as θm,k,ℓ = θ̄m,k,ℓ +U[− 12 , 12 ], where θ̄m,k,ℓ is the line-of-sight (LoS) angle of elevation from the user to the RRH. Similarly, the azimuth angles of arrival φm,k,ℓ are independent and generated as φm,k,ℓ = φ̄m,k,ℓ +U[− π6 , π6 ], 11 TABLE II AVERAGE NUMBER OF SELECTED ANTENNAS PER RRH 5 Fronthaul capacity per sector (Gbps) 4 3.5 Lens UPA-OFDM 3 2.5 0.4 2 4 8 20 40 60 100 200 2 2 5 6 10 11 19 21 48 51 98 101 148 151 208 251 208 280 4 2 1.5 1 Lens: Perfect fronthaul, perfect CSI UPA−OFDM: Perfect fronthaul, perfect CSI Lens: Constrained fronthaul, perfect CSI UPA−OFDM: Constrained fronthaul, perfect CSI 0.5 0 0 50 100 150 200 Fronthaul capacity per sector (Gbps) Fig. 6. Average rate per user vs. common fronthaul capacity per RRH sector under perfect CSI, with P = 23 dBm. where φ̄m,k,ℓ is the LoS angle of azimuth. The power spectral density of the AWGN is −174 dBm/Hz, with an additional noise figure of 6 dB at each RRH. The inter-sector/intercluster interference is assumed to be equal to −80 dBm at all sectors. The fronthaul capacity of all RRHs are the same, i.e. R̄m = R̄, ∀m ∈ M. For the benchmark scheme using OFDM with UPAs at the RRHs, the number of SCs N = 256 and the CP length µ = dmax = 20. The minimum coherence time of the channels is taken to be 0.4 ms, while each frame is assumed to be Tf = 8280 symbols long, which corresponds to 30 OFDM symbols. For the proposed system with lens arrays, we choose Tp = K(dmax +1), while for the benchmark system with UPAs and OFDM, Tp = 3(N + µ) i.e., τp = 3. In order to make a fair comparison, we assume Ta = N + dmax in both cases. All the results are averaged over random user locations and channel realizations. Figs. 6 and 7 plot the average throughput per user against the common fronthaul capacity per sector R̄/3, where the users’ transmit power P = 23 dBm. Fig. 6 shows the performance assuming perfect CSI at the CU, both with and without the fronthaul constraints at the RRHs. Without fronthaul constraints and with perfect CSI, it can be observed that the performance of the benchmark system with OFDM and UPAs is close to the proposed system with lens. The difference can be attributed to the loss due to the CP insertion in the case of OFDM transmission with UPAs. As the lens array only redistributes the incident energy among the antenna elements depending on the angle of arrival of the plane waves, it is reasonable to expect that it does not offer a large gain in the achievable rate over UPA-OFDM when there is no constraint on the fronthaul. However, since only single-carrier transmission by the users is required, and the ISI and IUI can be mitigated without CP insertion and IDFT/DFT processing, the use of lens arrays can greatly simplify the signal processing required, when compared with UPA-OFDM. For the system Average sum-rate per user (bps/Hz) Average sum-rate per user (bps/Hz) 4.5 3.5 3 2.5 2 1.5 1 0.5 0 0 Lens: Perfect fronthaul, estimated CSI UPA−OFDM: Perfect fronthaul, estimated CSI Lens: Constrained fronthaul, estimated CSI UPA−OFDM: Constrained fronthaul, estimated CSI 50 100 150 200 Common fronthaul capacity per sector (Gbps) Fig. 7. Average rate per user vs. common fronthaul capacity per RRH sector under estimated CSI, with P = 23 dBm. with UPA-OFDM, the overall complexity of performing linear MMSE beamforming for all the users on all the SCs with no fronthaul constraint is of the order O(N K(M J Q̃)3 ), while for the proposed system with lens arrays, the complexity is O(K(M JQ)3 ), offering a reduction of a factor of N . Further, for the fronthaul constrained case, it can be observed from Fig. 6 that the proposed system with lens arrays provides significant throughput gains over the conventional UPA-OFDM. This is due to the energy focusing property of the EM lens, which makes the antenna selection and quantization bit allocation much more effective with lens arrays compared to UPAs. In the antenna selection and bit allocation scheme, the antennas with larger received power are selected and allocated more bits compared to the antennas with lower received power. Table II compares the number of antennas selected at the RRHs in both cases. As the EM lens focuses the incident energy onto a few antenna elements, the selection and bit allocation algorithm tends to select these elements with large received power. Thus, although the number of antennas selected in both cases is more or less similar when the fronthaul capacity is low, the selection and bit allocation is much more effective with lens arrays when compared to UPAOFDM. With UPA-OFDM, the received energy distribution is more or less similar across the antenna elements and the selection and bit allocation can thus adversely affect the achievable rate compared to the case with no fronthaul constraint. Fig. 7 shows the performance of the proposed system with estimated 12 TABLE III AVERAGE NUMBER OF STREAMS SELECTED PER USER FOR REDUCED MMSE WITH ESTIMATED CSI FOR LENS ANTENNA ARRAY Fronthaul capacity per sector (Gbps) Number streams Ik of 0.4 2 4 8 20 40 60 100 200 1 2 2 2 2 3 3 3 4 CSI. For the thresholding of the channel estimates as given in (23) and (28), we choose η = 3 dB. Again, it can be observed that with the proposed channel estimation scheme via thresholding the LS channel estimates, the system with lens antenna arrays offers significant gains over the benchmark UPA-OFDM system. This is because the quantization and antenna selection at the RRHs adversely affects both the channel estimation as well as data transmission in the benchmark system, when the fronthaul is constrained. On the other hand, due to the energy focusing property of the lens, the stronger channels are relatively less affected by the quantization, and since the channels between the users and RRHs are sparse in the angular domain, and the lens converts this angular domain sparsity to the spatial domain, it is sufficient to use only the estimates of the stronger channels to retain most of the gains in the subsequent MMSE beamforming. In the UPAOFDM system, such a thresholding is not effective since the energy is distributed uniformly over the antenna elements, and there is no way of distinguishing the significant channels in the spatial domain. Table III shows the average number of streams Ik selected after thresholding the channel estimates for the proposed reduced, approximate MMSE beamforming with lens arrays at the RRHs. It can be observed that the total number of streams can potentially be even an order of magnitude less than the total number of streams in the UPAOFDM case (see Table II), and this leads to a huge reduction in complexity of the receive beamforming in CRAN, since 3 for the proposed system the complexity is only O(KImax ), where Imax = maxk∈K Ik is the maximum number of streams for a user, while for the benchmark with UPA-OFDM, it is O(N K Q̃3tot ). Moreover, this gain in throughput is achieved at a much lower training overhead of K(dmax + 1) for the proposed system, compared to at least N + dmax for the benchmark, where in practice N ≫ K as usual. V. C ONCLUSION In this paper, we introduce a new architecture for mmWave CRAN with lens antenna arrays at the RRHs. We propose a low-complexity bit allocation scheme for SQ at the RRHs based only on the estimated received power levels of the antennas. We show that when the fronthaul is constrained, the proposed system which uses single-carrier transmission by the users combined with path delay compensation and reducedsize MMSE beamforming, can achieve large throughput gains over the conventional system that uses UPAs at the RRHs along with OFDM transmission by the users and full-size MMSE combining on each SC. Further, we propose a simple, yet effective channel estimation scheme for the proposed system, which exploits the unique energy focusing property of the lens array, and show that the proposed system still offers considerable advantage over the benchmark system, when both have imperfect CSI. Moreover, these gains are achieved at a much lower signal processing complexity at the CU, since it is sufficient to process a considerably fewer number of streams for the proposed system when compared to the benchmark. This shows that the proposed system with lens antenna arrays is a promising candidate for future evolution of CRAN operating in the mmWave frequencies. A PPENDIX As problem (6) is convex and is strictly feasible, it can be optimally solved by solving its dual problem. Let λ denote the Lagrange multiplier for constraint (5a) in problem (6). The Lagrangian is then given by X X 3ρq,m R̄m  , (45) + λ b − L(bm , λ) = q,m 2b 2 q,m 2W q∈Q q∈Q and the dual function is given by f (λ) = minbm ≥0 L(bm , λ). Differentiating (45) with respect to each bq,m and setting the derivative equal to zero, we have   6ρ 1 q,m ln 2 bq,m = log2 . (46) 2 λ Since bq,m ≥ 0 ∀q ∈ Q, the dual variable λ must lie in the interval [0, 6ρmax,m ln 2], where ρmin,m = minq∈Q ρq,m and ρmax,m = maxq∈Q ρq,m . Moreover, according to (7), as λ increases, the bq,m ’s decrease, making the constraint (5a) more feasible, and vice versa. Thus, the optimal λ⋆ that solves the dual problem maxλ≥0 f (λ), can be found by a simple bisection search over [0, 6ρmax,m ln 2]; then the optimal solution b′m for problem (6) is obtained as given by (7). The proof of Proposition 2.1 is thus completed. R EFERENCES [1] J. Andrews et al., “What will 5G be?” IEEE J. Sel. Areas Commun., vol. 32, no. 6, pp. 1065–1082, June 2014. [2] 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. [3] L. Liu and R. Zhang, “Optimized uplink transmission in multi-antenna C-RAN with spatial compression and forward,” IEEE Trans. Signal Process., vol. 63, no. 19, pp. 5083–5095, Oct. 2015. [4] B. Dai and W. Yu, “Sparse beamforming and user-centric clustering for downlink cloud radio access network,” IEEE Access, vol. 2, pp. 1326– 1339, 2014. [5] Y. Shi, J. Zhang, and K. Letaief, “Group sparse beamforming for green cloud-RAN,” IEEE Trans. Wireless Commun., vol. 13, no. 5, pp. 2809– 2823, May 2014. [6] S. Luo, R. Zhang, and T. J. Lim, “Downlink and uplink energy minimization through user association and beamforming in C-RAN,” IEEE Trans. Wireless Commun., vol. 14, no. 1, pp. 494–508, Jan. 2015. [7] R. G. Stephen and R. Zhang, “Joint millimeter-wave fronthaul and OFDMA resource allocation in ultra-dense CRAN,” IEEE Trans. Commun., vol. 65, no. 3, pp. 1411–1423, Mar. 2017. [8] 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. [9] R. G. Stephen and R. Zhang, “Fronthaul-limited uplink OFDMA in ultra-dense CRAN with hybrid decoding,” IEEE Trans. Veh. Technol., vol. 66, no. 10, pp. 9074–9084, Oct. 2017. 13 [10] T. Bai, A. Alkhateeb, and R. W. Heath, “Coverage and capacity of millimeter-wave cellular networks,” IEEE Commun. Mag., vol. 52, no. 9, pp. 70–77, Sep. 2014. [11] M. R. Akdeniz et al., “Millimeter wave channel modeling and cellular capacity evaluation,” IEEE J. Sel. Areas Commun., vol. 32, no. 6, pp. 1164–1179, June 2014. [12] J. Hoydis, M. Kobayashi, and M. Debbah, “Optimal channel training in uplink network MIMO systems,” IEEE Trans. Signal Process., vol. 59, no. 6, pp. 2824–2833, Jun. 2011. [13] J. Kang, O. Simeone, J. Kang, and S. S. Shitz, “Joint signal and channel state information compression for the backhaul of uplink network mimo systems,” IEEE Trans. Wireless Commun., vol. 13, no. 3, pp. 1555–1567, Mar. 2014. [14] J. Zhang, X. Yuan, and Y. J. Zhang, “Locally orthogonal training design for cloud-RANs based on graph coloring,” IEEE Trans. Wireless Commun., vol. 16, no. 10, pp. 6426–6437, Oct. 2017. [15] Z. Gao, C. Hu, L. Dai, and Z. Wang, “Channel estimation for millimeterwave massive MIMO with hybrid precoding over frequency-selective fading channels,” IEEE Communications Letters, vol. 20, no. 6, pp. 1259–1262, Jun. 2016. [16] K. Venugopal, A. Alkhateeb, N. G. Prelcic, and R. W. Heath, “Channel estimation for hybrid architecture-based wideband millimeter wave systems,” IEEE J. Sel. Areas Commun., vol. 35, no. 9, pp. 1996–2009, Sep. 2017. [17] Y. Zeng, R. Zhang, and Z. N. Chen, “Electromagnetic lens-focusing antenna enabled massive MIMO: Performance improvement and cost reduction,” IEEE J. Sel. Areas Commun., vol. 32, no. 6, pp. 1194–1206, June 2014. [18] Y. Zeng and R. Zhang, “Millimeter wave MIMO with lens antenna array: A new path division multiplexing paradigm,” IEEE Trans. Commun., vol. 64, no. 4, pp. 1557–1571, Apr. 2016. [19] ——, “Cost-effective millimeter-wave communications with lens antenna array,” IEEE Wireless Communications, vol. 24, no. 4, pp. 81–87, 2017. [20] Y. Zeng, L. Yang, and R. Zhang, “Multi-user millimeter wave MIMO with full-dimensional lens antenna array.” [Online]. Available: http://arxiv.org/abs/1611.06008 [21] T. Kwon, Y. G. Lim, B. W. Min, and C. B. Chae, “RF lens-embedded massive MIMO systems: Fabrication issues and codebook design,” IEEE Trans. Microw. Theory Tech., vol. 64, no. 7, pp. 2256–2271, July 2016. [22] L. Yang, Y. Zeng, and R. Zhang, “Channel estimation for millimeter wave MIMO communications with lens antenna arrays,” IEEE Trans. Veh. Technol., 2017, to appear. [23] A. B. Narasimhamurthy and C. Tepedelenlioglu, “Antenna selection for MIMO-OFDM systems with channel estimation error,” IEEE Trans. Veh. Technol., vol. 58, no. 5, pp. 2269–2278, Jun. 2009. [24] D. Tse and P. Viswanath, Fundamentals of wireless communication. Cambridge University Press, 2005. [25] S. M. Kay, Fundamentals of Statistical Signal Processing: Estimation Theory. Upper Saddle River, NJ, USA: Prentice-Hall, Inc., 1993. [26] B. M. Popovic, “Generalized chirp-like polyphase sequences with optimum correlation properties,” IEEE Trans. Inf. Theory, vol. 38, no. 4, pp. 1406–1409, Jul. 1992. [27] S. Sesia, I. Toufik, and M. Baker, LTE, The UMTS Long Term Evolution: From Theory to Practice. Wiley Publishing, 2009. [28] Y. Chi, A. Gomaa, N. Al-Dhahir, and A. R. Calderbank, “Training signal design and tradeoffs for spectrally-efficient multi-user MIMO-OFDM systems,” IEEE Trans. Wireless Commun., vol. 10, no. 7, pp. 2234– 2245, Jul. 2011. [29] M. K. Samimi and T. S. Rappaport, “Ultra-wideband statistical channel model for non line of sight millimeter-wave urban channels,” in Proc. IEEE GLOBECOM, Dec. 2014, pp. 3483–3489.
7cs.IT
Submitted to the Annals of Statistics arXiv: arXiv:0000.0000 arXiv:1507.03895v2 [math.ST] 21 Nov 2016 ON CONSISTENCY AND SPARSITY FOR SLICED INVERSE REGRESSION IN HIGH DIMENSIONS By Qian Lin†∗ Zhigen Zhao‡∗ and Jun S. Liu†∗ Harvard University† Temple University‡ We provide here a framework to analyze the phase transition phenomenon of slice inverse regression (SIR), a supervised dimension reduction technique introduced by Li [1991]. Under mild conditions, the asymptotic ratio ρ = lim p/n is the phase transition parameter and the SIR estimator is consistent if and only if ρ = 0. When dimension p is greater than n, we propose a diagonal thresholding screening SIR (DT-SIR) algorithm. This method provides us with an estimate of the eigen-space of the covariance matrix of the conditional expectation var(E[x|y]). The desired dimension reduction space is then obtained by multiplying the inverse of the covariance matrix on the eigen-space. Under certain sparsity assumptions on both the covariance matrix of predictors and the loadings of the directions, we prove the consistency of DT-SIR in estimating the dimension reduction space in high dimensional data analysis. Extensive numerical experiments demonstrate superior performances of the proposed method in comparison to its competitors. 1. Introduction. For a continuous multivariate random variable (y, x) where x ∈ Rp and y ∈ R, a subspace S ′ ⊂ Rp is called the effective dimension ⊥ stands for independence. reduction (EDR) space if y ⊥ ⊥ x|PS ′ (x) where ⊥ Under mild conditions (Cook [1996]), the intersection of all the EDR spaces is again an EDR space, which is denoted as S and called the central space. Many algorithms were proposed to find such subspace S under the assumption d = dimS ≪ p. This line of research is commonly known as sufficient dimension reduction. The Sliced Inverse Regression (SIR, Li [1991]) is the first, yet the most widely used method in sufficient dimension reduction, due to its simplicity, computational efficiency and generality. The asymptotic properties of SIR are of particular interest in the last two decades. The consistency of SIR has been proved for fixed p in Li [1991], Hsing and Carroll ∗ Lin’s research is supported by the Center of Mathematical Sciences and Applications at Harvard University. Zhao’s research is supported by the NSF Grant DMS-1208735. Liu’s research is supported by the NSF Grant DMS-1120368 and NIH Grant R01 GM113242-01 MSC 2010 subject classifications: Primary 62J02; secondary 62H25 Keywords and phrases: dimension reduction, random matrix theory, sliced inverse regression 1 2 Q. LIN, Z. ZHAO AND J. S. LIU [1992], Zhu and Ng [1995] and Zhu and Fang [1996]. Later, Zhu et al. [2006] √ have obtained the consistency if p = o( n). A similar restriction also appears in two recent work (see Zhong et al. [2012] and Jiang and Liu [2014]). When p > n, a common strategy pursued by many recent researchers is to make sparsity assumptions that only a few predictors play a role in explaining and predicting y and apply various regularization methods. For instance, Li and Nachtsheim [2006], Li [2007] and Yu et al. [2013] applied LASSO (Tibshirani [1996]), Dantzig selector (Candes and Tao [2007]) and elastic net (Zou and Hastie [2005]) respectively to solve the generalized eigenvalue problems raised by a variety of SDR algorithms. However, a piece of jigsaw is missing in the understanding of SIR. If the dimension p diverges as n increases, when will the SIR break down? A similar question has been asked for a variety of SDR estimates in Cook et al. [2012]. In this paper, we prove that, under certain technical assumptions, the SIR estimator is consistent if and only if ρ = lim np = 0. Such a result on inconsistency provides theoretical justifications for imposing certain structural assumption, such as sparsity, in high dimensional settings. This behavior of SIR in high dimension, which will be called the phase transition phenomenon, is similar to that of the principal component analysis (PCA), an unsupervised counterpart of SIR. This extension is, however, by no means trivial. After all the samples (yi , xi ) are sliced into H bins according to the order statistics of yi , the sliced samples are neither independent nor identically distributed. This difference increases the difficulty significantly. In this paper, we provide a new framework to study the phase transition behaviour of SIR. The technical tools developed here can potentially be extended to study the phase transition behaviour of other SDR estimators. The second part of the article aims at extending the original SIR to the scenario with ultra-high dimension (p = o(exp(nξ ))). Based on equation (3) in Section 2, the central space can be estimated by the column space of b −1 col(Vb H ), where Σ b −1 is any consistent estimate of the precision matrix Σ x x b H ) is the estimate of the space col(var(E[x|y])). To estimate Σ−1 and col( V x the column space of var (E[x|y]), we propose a diagonal screening procedure based on new univariate statistics varH (x(k)), which are the diagonal elements of var (E[x|y]), motivated by recent work in sparse PCA (Johnstone and Lu [2004]). After ranking the predictors according to the magnitude of varH (x(k)) decreasingly, we choose the set I consisting of the first R predictors as active predictors. The SIR procedure is subsequently applied to these selected predictors to estimate the d-dimensional column space of I I var(E[xI |y]) by col(Vb H ) where Vb H is the matrix formed by the top d eigenI I b . We embed Vb into Rp×d by filling in 0’s for entries outside vectors of Λ H H 3 DT-SIR I the chosen row set I, and denote this new matrix by e(Vb H ). The estimate b −1 bI of the central space is defined to be col(Σ x e(V H )). We name this two-stage algorithm as Diagonal Thresholding SIR (DT-SIR), and prove that DTSIR is consistent in estimating the central space under certain regularity conditions. Extensive simulation studies show that DT-SIR performs better than its competitors and is computationally efficient. The rest of the paper is organized as follows. In Section 2, we briefly describe the SIR procedure and introduce the notations. In Section 3, after a brief review of existing asymptotic results of SIR procedure, we state Theorems 2 and 3 to discuss the phase transition phenomenon of SIR. In Section 4, we propose the DT-SIR method and show that DT-SIR is consistent in high dimensional data analysis. In Section 5, we provide simulation studies to compare DT-SIR with its competitors. Concluding remarks and discussions are put in Section 6. All the proofs are presented in appendices. 2. Preliminaries and notations. 2.1. Sliced inverse regression Consider the multiple index model (1) y = f (β τ1 x, · · · , β τd x, ǫ) where x ∈ Rp , ǫ is the noise and f is an unknown link function. Without loss of generality, we assume that E[x] = 0 ∈ Rp . Although the p × d matrix V = (β 1 , · · · , β d ) is not identifiable, the space spanned by the β’s, which is called the column space of V and denoted by col(V ), might be identified. Li [1991] proposed the Sliced Inverse Regression (SIR) procedure to estimate the central space col(V ) without knowing f (·), which can be briefly summarized as follows: Given n i.i.d. samples (yi , xi ), i = 1, · · · , n, SIR first divides them into H equal-sized slices according to the order statistics y(i) .1 We re-express the data as yh,j and xh,j , where (h, j) is the double subscript in which h refers to the slice number and j refers to the order number of a sample in the h-th slice, i.e., yh,j = y(c(h−1)+j) , xh,j = x(c(h−1)+j) . Here x(k) is the concomitant of y(k) . Let the sample mean in the h-th slice be xh,· , and let the mean of all the samples be x. Then, Λp , var(E[x|y]) can be estimated by: (2) H 1 X b ΛH = x̄h,· x̄τh,· . H h=1 1 To ease notations and arguments, we assume that n = cH and H = o (log(n) ∧ log(p)) throughout the article. 4 Q. LIN, Z. ZHAO AND J. S. LIU Based on the observation that (3) col(Λ) = Σx col(V ), b −1 col(Vb H ) where Vb H is the SIR then estimates the central space col(V ) by Σ x b H .. Throughout the article, the matrix formed by the top d eigenvectors of Λ we assume that d is fixed and the d-th largest eigenvalue λd of Λp is bounded away from 0 when n, p → ∞. In order for SIR to result in a consistent estimate of the central space, Li [1991] imposed the the following two conditions: • (A1). Linearity condition: For any ξ ∈ Rp , E[ξ τ x|β τ1 x, · · · , β τd x] is a linear combination of β τ1 x, · · · , β τd x. • (A2). Coverage condition: The dimension of the space spanned by the central curve equals the dimension of the central space, i.e., d′ = d. 2.2. Further Notations. Let Sh be the h-th interval (yh−1,c , yh,c ] for 2 ≤ h ≤ H − 1, S1 = (−∞, y1,c ] and SH = (yH−1,c , ∞). Note that these intervals depend on the order statistics y(i) and are thus random. For any ω R in the product sample space, we define a random variable δh = δh (ω) = y∈Sh (ω) f (y)dy where f (y) is the density function of y. For I ⊂ {1, · · · , n}, J ⊂ {1, · · · , p} and a n × p matrix A, AI,J denotes the |I| × |J | sub-matrix formed by restricting the rows of A to I and columns to J . In articular, A−,J denotes the sub-matrix formed by restricting the columns to J ; For a matrix B = AI,J ∈ R|I|×|J | , we embed it into Rp×p by putting 0 on entries outside I × J and denote the new matrix as e(B). Similar notations apply to vectors. For two positive numbers a and b, we let a ∨ b ≡ max{a, b} and let a ∧ b ≡ min{a, b}. Let τ (x, t) = x × 1(|x| > t) be the hard thresholding function. Throughout the article, C, C1 and C2 are used to denote generic absolute constants, though the actual value may vary from case to case. For a vector x, we denote its k-th entry as x(k). Let β 1 and β 2 be two vectors with the same dimension, the angle between these two vectors is denoted as ∠(β 1 , β 2 ). For two sequences {an }, {bn }, we let an ≪ bn stand for an = O(bǫn ) for some positive ǫ < 1 and let an ≻ bn stand for lim abnn = 0. 3. Consistency of SIR. In order to control the behavior of SIR, we need to impose the following boundedness condition (A3) on the predictors’ covariance matrix in addition to the tail condition (sub-Gaussian) on their joint distribution. We also need a condition (A4) for the central curve. • (A3) Boundedness Condition: x is sub-Gaussian; and there exist positive constants C1 , C2 such that C1 ≤ λmin (Σx ) ≤ λmax (Σx ) ≤ C2 DT-SIR 5 where λmin (Σx ) and λmax (Σx ) are the minimal and maximal eigenvalues of Σx respectively. • (A4) The central curve m(y) , E[x|y] has finite fourth moment and is ϑ-sliced stable (defined below) with respect to y and m(y). Definition 1. For two positive constants γ 1 < 1 < γ 2 , let AH (γ 1 , γ 2 ) be the collection of all the partition −∞ = a0 < a1 < · · · < aH−1 < aH = ∞ of R satisfying that γ γ1 ≤ P (ai ≤ y < ai+1 ) ≤ 2 . H H The central curve m(y) = E[x|y] is called ϑ-sliced stable with respect to y for some ϑ > 0 if there exist positive constants γ i , i = 1, 2, 3 such that for any β in the central space for any partition in AH (γ 1 , γ 2 ), we have (4) H−1 1 X γ var(β τ m(y) | ah ≤ y ≤ ah+1 ) ≤ 3ϑ var(β τ m(y)). H H h=0 The central curve is sliced stable if it is ϑ-sliced stable for some positive constant ϑ. Remark 1. Note that we only need (4) to hold for all unit vectors in the central space by rescaling. By considering the orthogonal decomposition of β in a general space with respect to the central space and its complement, it is easy to see that the sliced stability implies that (4) holds true for all vector β. In particular, we have the following two useful consequences of the slice-stability. i) By choosing β τ = (0, . . . , 0, 1, 0, . . . , 0) with 1 at the k-th position, we have | H X h=0 var(m(y, k) | ah ≤ y ≤ ah+1 )| ≤ γ 3 H 1−ϑ var(m(y, k)), where m(y, k) is the k-th coordinate of the central curve m(y). ii) Since equation (4) holds for all unit vector β, we have k H X h=0 var(m(y) | ah ≤ y ≤ ah+1 )k2 ≤ γ 3 H 1−ϑ kvar(m(y))k2 . 6 Q. LIN, Z. ZHAO AND J. S. LIU Remark 2. Suppose E[m(y)] = 0 and there are n samples mi , m(yi ). xh,· , respectively. On one Let mh,i and mh,· be defined similarly to xh,i and P hand, we have the classic consistent estimator n1 i mi mτi ofPvar(m(y)). On the other hand, if we expect that the slice-based estimate H1 h mh,· mτh,· of var(m(y)) is consistent, we must require that the average loss of variance in each slice to decrease to zero as H increases, i.e., (5) 1 X 1 X1X 1X mi mτi = (m̄h,· − m̄h,i )2 → 0. m̄h,· m̄τh,· − H n H c i h h i In Definition 1, we simply choose the decreasing rate to be a power of H. It would be easily seen that if m is smooth and y is compactly supported then (5) holds automatically. In this sense, for general curve m and random variable y, the sliced stability is a condition on smoothness of the central curve m and tail distribution of m(y). This is not surprised at all, since most work on the consistency of SIR estimate requires some kind of smoothness for the central curve and a tail distribution control for m(y). The most popular smoothness and tail condition might be the one proposed by Hsing and Carroll [1992] (later used in Zhu et al. [2006], Zhu and Ng [1995]) in their proof of the consistency of SIR, which is explained below. For B > 0 and n ≥ 1, let Πn (B) be the collection of all the n-point partitions −B ≤ y(1) ≤ · · · ≤ y(n) ≤ B of [−B, B]. First, they assumed that the central curve m(y) satisfies the following smoothness condition lim sup n→∞ y∈Π (B) n n−1/4 n X i=2 km(yi ) − m(yi−1 )k2 = 0, ∀B > 0. Second, they assumed that for B0 > 0, there exists a non-decreasing function m(y) e on (B0 , ∞), such that (6) m e 4 (y)P (|Y | > y) → 0 as y → ∞ km(y) − m(y ′ )k2 ≤ |m(y) e − m(y e ′ )| for y, y ′ ∈ (−∞, −B0 ) ∪ (B0 , ∞) e 4] < By changing the tail condition (6) to a slightly stronger condition E[m(y) ∞, Neykov et al. [2015] proved that the modified condition implies the sliced stability condition. Now, we are ready to state our main results. Theorem 1. (7) Under conditions (A1), (A2), (A3) and (A4), we have r H 2p H 2p 1 b + ). kΛH − Λp k2 = OP ( ϑ + H n n DT-SIR 7 The proof of the theorem is deferred to the Appendix. As a direct consequence of Theorem 1, we observe that if ρ = limn→∞ np = 0, we may choose H = log (n/p) such that the right hand side of equation (7) converges to 0. b H is a consistent estimate of Λp if ρ = 0. Thus, Theorem 1 implies that Λ Remark 3 (More on Convergence Rate). Note that the convergence rate in (7) depends on the choice of H. This may seem not very desirable at the b H might be different from that first glance. Since the convergence rate of Λ b of col(V H ), we may expect that the convergence rate of col(Vb H ) does not depend on the choice of H. In fact, we have     b H − Λp = Λ b H PV − Λp . b H − PV Λ b H PV + PV Λ (8) Λ From the proof of Theorem q 1, we can easily check that the first term is of 2 pH 2 1 convergence rate n + pH n and the second term is of rate H ϑ . Since b H PV and Λp share the same column space, if we are only interested in PV Λ estimating PV , then the convergence rate of the second term does not matter provided that H is a large enough integer, which may depend on ϑ and γ 3 but does not depend on n and p. For such an H, if AH (γ 1 , γ 2 ) is non-empty, Theorem 1 and (8) hold for both categorical and continuous response variable Y. Theorem 2. Under conditions (A1), (A2), (A3), (A4) and assuming that ρ = lim np = 0, we have b H − Σ−1 Λp k2 → 0 b −1 Λ kΣ x x as n → ∞ b x = 1 Pn xi xτ . with probability converging to one, where Σ i i=1 n We define the distance D(V 1 , V 2 ) of two d-dimensional subspaces V 1 and V 2 as the operator norm (or Frobenius norm) of the difference between PV 1 e ’s satisfy Σx β e = λi Λp β e, and PV 2 . Simple linear algebra shows that if the β i i i then o n e ,··· ,β e . col(V ) = span β 1 d b −1 , Λ b H ). Let Vb be the matrix formed by the top d generalized eigenvectors of (Σ x Recall that the d-th eigenvalue of Λp is assumed to be bounded away from 0. Therefore Theorem 2 implies that D(PVb , PV ) → 0 when ρ = 0. We have already shown that the SIR procedure provides us with a consistent estimate of the sufficient dimension reduction space when ρ = 0 under mild conditions. It is then natural to ask: is this condition necessary? Our next theorem gives the answer. 8 Q. LIN, Z. ZHAO AND J. S. LIU Theorem 3. Under conditions (A1), (A2), (A4) and assuming that x ∼ N (0, Ip ) for the single index model y = f (β τ x, ǫ), we have: b H −Λp k2 , as a function of ρ, is dominated (i) When ρ = lim np ∈ (0, ∞), kΛ √ by ρ ∨ ρ when H, n → ∞; b be the principal eigenvector of the SIR estimator Λ b H . If ρ = (ii) Let β p lim n > 0, then there exists a positive constant c(ρ) > 0 such that b > c(ρ) lim inf E∠(β, β) n→∞ with probability converges to one. We illustrate this result via a numerical study of the linear model (9) y = xτ β + ǫ where β τ = (1, 0, · · · , 0), x ∼ N (0, Ip ), ǫ ∼ N (0, 1). b is related to the dimension p for fixed ratio Figure 1 shows how E∠(β, β) p ρ = n (taking values in {.1, .3, .7, 1, 2, 4}), where β is estimated by the b is calculated SIR with the slice number H = 10. For each p, E∠(β, β) based on 100 iterations. It is seen that this expected angle converges to a positive number when the ratio ρ is non-zero. In Figure 2, we have plotted b against the ratio ρ = p , varying between 0.01 and 4 with an the E∠(β, β) n increment of 0.01. The sample size n is 200 and the slice number H is 10. It is seen that the expected angle decreases to zero as ρ approaches zero, and increases monotonically when ρ increases. Results in this section have shown that there is a phase transition phenomenon of the SIR procedure. That is, the estimate of the dimension reduction space is consistent if and only if the ratio ρ = lim np = 0. This provides a theoretical justification of imposing additional structure assumption such as sparsity in high dimension. 4. SIR in ultra-high dimension. As we have shown in Section 3, the SIR estimator fails to be consistent if ρ = lim np 6= 0. Hence, when p ≫ n, some structural assumptions are necessary for getting a consistent estimate of the central space. In this paper, we assume that both the loadings of all the directions β j ’s and the covariance matrix Σx are sparse. Other structural assumptions will be studied in our future work. For β i ’s, we impose the following prevalent sparsity condition. 9 DT-SIR 0.4 0.235 0.395 0.23 0.39 0.385 0.225 0.38 0.22 0 200 400 600 800 1000 1200 1400 1600 0.375 0.6 0.72 0.595 0.71 0.59 0 200 400 600 800 1000 1200 1400 1600 0 200 400 600 800 1000 1200 1400 1600 0 200 400 600 800 1000 1200 1400 1600 0.7 0.585 0.69 0.58 0.68 0.575 0.67 0.57 0.66 0.565 0.65 0.56 0.64 0.555 0.55 0 200 400 600 800 1000 1200 1400 1600 1.05 0.63 1.25 1.2 1 1.15 0.95 1.1 0.9 1.05 0.85 0.8 1 0 200 400 600 800 1000 1200 1400 1600 0.95 Fig 1: Numerical approximations of E∠(β̂, β) for model (9) as a function of dimension p for ρ = .1, .3, .7, 1, 2, and 4, respectively (up left, up right, b is estimated by middle left, middle right, lower left, lower right), where β SIR. b and the ratio p/n where β b is estimated Fig 2: The relationship of E∠(β, β) by SIR. 10 Q. LIN, Z. ZHAO AND J. S. LIU n o • (A5) s = |S| ≪ p where S = i | β j (i) 6= 0 for some j, 1 ≤ j ≤ d and |S| is the number of elements in the set S. For Σx , the following class of covariance matrices has been introduced in Bickel and Levina [2008] (see also Cai et al. [2010]). n X {|σi,j | : |i − j| > l} ≤ Cl−α for all l > 0, U (ǫ0 , α, C) = Σx : max j i and 0 < ǫ0 ≤ λmin (Σx ) ≤ λmax (Σx ) ≤ 1 o . ǫ0 In this paper, to simplify the notations and arguments, we choose a slightly stronger condition. • (A6) Σx ∈ U (ǫ0 , α, C) and max1≤i≤p ri is bounded where ri is the number of non-zero elements in the i-th row of Σx .  Let T = k | var (E[x(k)|y]) 6= 0 . If k ∈ T , there exists η ∈ col(Λ) such that η(k) 6= 0. Since we have (3): Σx col(V ) = col(Λ), there exits a β ∈ col(V ) such that η = Σx β. Thus if k ∈ T , then k ∈ supp(Σx β) for some β ∈ col(V ). In particular, with the above sparsity assumptions (A5) and (A6) , we have |T | ≤ s max1≤i≤p ri = O(s).2 Note that our goal here is to recover the column space col(V ) rather than S. Indeed, we are not able to consistently recover S unless for the trivial case. The key for recovering cov(V ) is to consistently recovering the set T . At the population level, var(E(x(k))|y) can separate T from T c . When there are only finite samples, we use (10) varH (x(k)) = H 1 X x̄h,· (k)2 H h=1 as an estimate of var(E(x(k))|y). These are the diagonal elements of the b H . Note that these quantities depend on the sliced sample means, matrix Λ which are neither independent nor identically distributed. Thus, the usual concentration inequalities for χ2 are no longer applicable. We need extra efforts to get the concentration inequalities; this concentration result is one of the main technical contributions of this article, and can be further generalized. 2 We could introduce ξ = max1≤i≤p ri , then |T | ≤ sξ. The arguments below still work, except we might need sξ = o(p). 11 DT-SIR Remark 4. The link function f ( ) is not involved explicitly in the definition of varH (x(k)), and only the order statistics of the response is required. This nonparametric characteristic of the method is of particular interest to us and will be further investigated in a future research. Screening statistics inspired by the sliced inverse regression idea have been proposed in various formats, such as those in Jiang and Liu [2014], Zhu et al. [2012] and Cui et al. [2015]. With the quantities varH (E[x(k)|y]), we define the inclusion set Ip (t) and the exclusion set Ep (t) below, which depend on a thresholding value t: n o n o Ip (t) = k |varH (x(k)) > t and Ep (t) = k |varH (x(k)) ≤ t . Note that Ip (t) can be viewed as an estimate of T and is thus also denoted by Tb . After reducing the dimension to a level such as p/n is sufficiently b b b b T ,T is a consistent estimate of ΛT ,T . Let Vb T be the small, the SIR estimator Λ b b b b T ,T . We then use Σ b −1 bT matrix formed by the top d eigenvectors of Λ x col(e(V )) to b −1 estimate the central space col(V ), where Σ x is a consistent estimate of Σx . Estimating the covariance matrix and precision matrix in high dimension is a challenging problem by itself and is not a main focus of this article. We employ the methods of Bickel and Levina [2008] to solve it. In summary, we propose the following Diagonal Thresholding screening SIR (DT-SIR) algorithm: Algorithm 1 DT-SIR 1. Calculate varH (x(k)) according (10) for k = 1, 2, · · · , p; n o 2. Let Tb = k | varH (x(k)) > t for an appropriate t ; b ,T b T b H be the SIR estimator of the conditional covariance matrix for the data (y, x−,Tb ) 3. Let Λ according to equation (2); 4. Let b T Vb be the matrix formed by the top d eigenvectors of  b −1 b is the estimate of col(V ) 5. Σ x col e V b b b T ,T ; Λ b T A practical way to choose an appropriate t in step 2 will be presented in Section 5 . To ensure theoretical properties, we need an assumption on the signal strength: • (S1) ∃ C > 0 and ω > 0 such that var(E[x(k)|y]) > Cs−ω when E[x(k)|y] is not a constant. 12 Q. LIN, Z. ZHAO AND J. S. LIU Theorem 4. Under conditions (A1) – (A6) and (S1), and let t = as−ω for some constant a > 0 such that t < 12 var(m(y, k), ∀k ∈ T , we have i) T c ⊂ Ep holds with probability at least (11)  1 − C1 exp −C2  n + C log(H) + log(p − s) ; 3 H 2 sω ii) T ⊂ Ip holds with probability at least (12)  1 − C4 exp −C5  n + C log(H) + log(s) , 6 H 2 sω for some positive constants C1 , · · · , C6 . This theorem has a simple implication. If n ), so that choose H = log( sω log(p) n sω ≻ log(p) + log(s), we may n ≻ log(p) + log(H) + log(s). H 2 sω Thus , we know T = Ip with probability converging to one. Next, we have results for the consistency of DT-SIR. Theorem 5. Under the same assumptions and choosing the same t as Theorem 4, if snω ≻ log(p) + log(s), we have Tb ,Tb b ke(Λ H ) − Λp k2 → 0 as n → ∞ n ). with probability converging to one, where Tb = I(t) and H = log( sω log(p) b x be the estimator of co-variance matrix from Bickel Theorem 6. Let Σ and Levina [2008]. Under the same assumptions of Theorem 5, we have −1 Tb ,Tb −1 b e(Λ b kΣ H ) − Σx Λp k2 → 0 as n → ∞ x with probability converging to one. 5. Simulation Studies. We consider the following settings in generating the design matrix x and the response y. In Settings I-III, each row of x is independently sampled from N (0, I). iid • Setting I. yi = sin(xi1 + xi2 ) + exp(xi3 + xi4 ) + 0.5 ∗ ǫi , where ǫi ∼ N (0, 1); 13 DT-SIR • Setting II. yi = P7 • Setting III. yi = iid j=1 xij ∗ exp(xi8 + xi9 ) + 0.5 ∗ ǫi where ǫi ∼ N (0, 1); P10 P20 iid j=1 xij ∗ exp( i=11 xij ) + ǫi where ǫi ∼ N (0, 1); In Settings IV to VI, each row of x is independently sampled from N (0, Σ). iid • Setting IV. yi = (xi1 + xi2 + xi3 )3 /2 + 0.5 ∗ ǫi , where ǫi ∼ N (0, 1) and Σ = (σij ) is tri-diagonal with σii = 1, σi,i+1 = σi+1,i = ρ and σi,i+2 = σi+2,i = ρ2 ; P iid • Setting V. yi = 7j=1 xij ∗ exp(xi8 + xi9 ) + ǫi , where ǫi ∼ N (0, 1), and Σ = B ⊗ Ip/10 with B = (bij )1≤i≤10,1≤j≤10 given as bij = ρ|i−j| ; • Setting VI. Assume the same setting as in Setting V except that Σ = (σij ) is tri-diagonal with σii = 1, σi,i+1 = σi+1,i = ρ and σi,i+2 = σi+2,i = ρ2 . • Setting VII. Assume the same setting as in Setting V except that Σ = (σij ) is given as σij = ρ|i−j| . DT-SIR first screens all the predictors according to the statistic varH,c (x(k)), which requires a tuning parameter t. We chose t by using an auxiliary variable method based on an idea first proposed by Luo et al. [2006] and extended by Wu et al. [2007] and Zhu et al. [2011]. In our setting, for a given sample (yi , xi ), we generate z i ∼ N (0, Ip′ ) where p′ is sufficiently large and chosen as p in our simulation studies. It is known that y and z are independent. The threshold t can be chosen as t̂ = max ′ {varH,c (z(k)).} 1≤k≤p In DT-SIR, when n > 1000, H is chosen as 20; when n ≤ 1000, H is chosen as 10 in the screening step and 20 in the SIR step. We also consider the following alternative methods in the screening step: Sure Independent Ranking and Screening (SIRS) in Zhu et al. [2011], SIR for variable selection via Inverse modeling (SIRI) in Jiang and Liu [2014], and trace pursuit in Yu et al. [2016]. As a comparison, we also considered two screening methods that are not based on the sliced regression: Distance correlation in Székely et al. [2007] and SURE independence Fan and Lv [2008]. For SIRS, the threshold is chosen according to the auxiliary statistic (2.9) of Zhu et al. [2011]. For SIRI, the predictors are chosen according to 10-fold cross validation. The threshold values c̄SIR and cSIR are chosen as the 10-th and 5-th quantile of a weighted χ2 distribution given in Theorem 3.1 of Yu et al. [2016]. In both SURE and DC screening, the top ⌊γn⌋ where γ = 0.01 are kept for subsequent analyses. After the screening step, similar to DT-SIR, we then applied the SIR algorithm (steps 3-5 of DT-SIR) to estimate col(V ). These alternative methods 14 Q. LIN, Z. ZHAO AND J. S. LIU are denoted as SIRS-SIR, SIRI-SIR, SURE-SIR, DC-SIR, and TP-SIR, respectively, in the following discussions. Another method that we compared with is the sparse SIR, abbreviated as SpSIR, proposed in Li [2007]. After obtaining an estimator col(Vb ), we calculate D(Pcol(Vb ) , Pcol(V ) ) as a measure of the estimation error. We replicate this step 100 times, and calculate the average distance for the estimation result from each method and report these numbers in Table 1-3. For each setting, the average distance of the optimal method is highlighted using bold fonts. We further run a two-sample T-test to test if the actual estimation error of each method is significantly different from that of the best method for that example at 1% level of significance. Under all settings, the average distance obtained by DT-SIR was much smaller than that obtained by SpSIR and SURE-SIR. The p-values for comparing DT-SIR and SpSIR/SURE-SIR are all significant at the 0.01 level. When p ≥ n, the sparse SIR completely failed √ because the average distance of the estimated space to the true space is 2d, indicating that the space estimated by sparse SIR is orthogonal to the true space spanned by β. Under settings II-IV, DT-SIR performed either the best or not significantly worse than the best method. For all other cases, DT-SIR performed the best except for a few cases: Setting I when n = 500, p = 1000, setting V when n = 500, p = 6000, setting VI when n = 500, p = 6000, and setting VII when n = 1000, p = 1000. When p = 6000, n = 500, both DT-SIR and SIRI-SIR were the winners. Under Setting III, DT-SIR performed better than SIRI-SIR; under settings V and VI, SIRI-SIR performed better than DT-SIR; under other settings, these two methods were comparable. To graphically show the performance of various methods, we consider setting IV with d = 1. Consider two cases when (n, p) = (2000, 1000) and (n, p) = (500, 100). We calculated the estimated directions β̂ using various methods and computed the angle between < β̂ > and < β >. We replicate this step 100 times to calculate the average angles for each method. The results are displayed in Figure 3, which shows clearly that DT-SIR performed better than its competitors. Additionally, DT-SIR is computationally efficient. To show this, we report the computing time for one replication under Setting II for various pairs of (n, p) in Table 4. All computations were done on a computer with Intel Xeon(R) E5-1620 [email protected] and 16GB memory. It is clearly seen that DT-SIR performed as fast as SURE-SIR, and both were much faster than other competitors. Consider the case when p = 3000, n = 2000. The computation time of DT-SIR was only 30 seconds; while that for DC-SIR was 21 minutes and 38 seconds, and the that for TP-SIR was 6 minutes and 15 DT-SIR Table 1 The average distance of the space estimated by each of the 7 methods tested to the true space col(V ) under various settings with p = 1000. The boldfaced number in each row represents the best result for that simulation scenario, and the “*” in cells represents that the p-value of the two-sample T-test comparing the estimation error of the corresponding method with that of the best method is less than 0.01. n 500 1000 2000 3000 DT-SIR 0.655(*) 0.3 0.221 0.167 SIRI-SIR 0.751(*) 0.431(*) 0.341(*) 0.245(*) SIRS-SIR 0.492 0.309 0.226 0.149 SpSIR 2(*) 2(*) 1.58(*) 1.48(*) SURE-SIR 1.39(*) 1.29(*) 1.04(*) 0.816(*) DC-SIR 0.731(*) 0.632(*) 0.655(*) 0.641(*) TP-SIR 1.18(*) 0.94(*) 0.784(*) 0.713(*) II 500 1000 2000 3000 0.383 0.235 0.161 0.134 0.396 0.227 0.157 0.129 0.371 0.256 0.189(*) 0.153(*) 2(*) 2(*) 1.25(*) 0.975(*) 1.64(*) 1.36(*) 1.25(*) 1.12(*) 1.08(*) 0.266(*) 0.387(*) 0.404(*) 0.389 0.318(*) 0.264(*) 0.23(*) III 500 1000 2000 3000 1.15 0.426 0.263 0.214 1.48(*) 0.974(*) 0.403(*) 0.297 1.38(*) 0.596(*) 0.29(*) 0.238(*) 2(*) 2(*) 1.33(*) 1.06(*) 1.97(*) 1.94(*) 1.89(*) 1.82(*) 1.85(*) 1.57(*) 0.996(*) 0.475(*) 1.13 0.429 0.338(*) 0.299(*) IV 500 1000 2000 3000 0.263 0.219 0.161 0.134 0.257 0.447(*) 0.4(*) 0.377(*) 0.333 0.25 0.196(*) 0.177(*) 1.41(*) 1.41(*) 0.42(*) 0.297(*) 0.335(*) 0.436(*) 0.442(*) 0.43(*) 0.334(*) 0.459(*) 0.469(*) 0.458(*) 0.332(*) 0.469(*) 0.452(*) 0.438(*) V 500 1000 2000 3000 0.546 0.401 0.288 0.249 0.529 0.463(*) 0.418(*) 0.399(*) 0.562 0.514(*) 0.341(*) 0.284(*) 2(*) 2(*) 1.51(*) 1.24(*) 1.62(*) 1.15(*) 0.926(*) 0.691(*) 1.24(*) 0.367 0.569(*) 0.597(*) 1.09(*) 0.615(*) 0.54(*) 0.511(*) VI 500 1000 2000 3000 0.568 0.427 0.311 0.265 0.535 0.524(*) 0.469(*) 0.456(*) 0.566 0.548(*) 0.351(*) 0.307(*) 2(*) 2(*) 1.51(*) 1.25(*) 1.64(*) 1.22(*) 0.927(*) 0.807(*) 1.24(*) 0.39 0.598(*) 0.622(*) 1.08(*) 0.641(*) 0.583(*) 0.56(*) VII 500 1000 2000 3000 0.556 0.436(*) 0.303 0.258 0.534 0.528(*) 0.465(*) 0.468(*) 0.585(*) 0.545(*) 0.358(*) 0.319(*) 2(*) 2(*) 1.51(*) 1.25(*) 1.66(*) 1.22(*) 0.747(*) 0.698(*) 1.26(*) 0.39 0.589(*) 0.63(*) 1.11(*) 0.643(*) 0.579(*) 0.558(*) I 17 seconds. 6. Conclusion. When the dimension p diverges to infinity, classical statistical procedures often fail unless additional structures such as sparsity conditions are imposed. Understanding boundary conditions of a statistical procedure provides us theoretical justification and practical guidance for our modeling efforts. In this article, we provide a new framework to show that ρ = lim np is the phase transition parameter for the SIR procedure. Under certain conditions, it is shown that the SIR estimator is consistent if and 16 Q. LIN, Z. ZHAO AND J. S. LIU Table 2 The average distance of the space estimated by each of the 7 methods we tested to the true space col(V ) under various settings with n = 2000. p DT-SIR SIRI-SIR SIRS-SIR SpSIR SURE-SIR DC-SIR TP-SIR I 500 1000 2000 3000 0.213 0.221 0.241 0.23 0.312(*) 0.341(*) 0.29 0.278 0.206 0.226 0.214 0.218 1.44(*) 1.58(*) 2(*) 2(*) 0.903(*) 1.04(*) 1.07(*) 1.17(*) 0.629(*) 0.655(*) 0.677(*) 0.683(*) 0.772(*) 0.784(*) 0.793(*) 0.797(*) II 500 1000 2000 3000 0.163 0.161 0.172 0.164 0.16 0.157 0.159 0.158 0.19(*) 0.189(*) 0.196(*) 0.199(*) 0.83(*) 1.25(*) 2(*) 2(*) 1.22(*) 1.25(*) 1.23(*) 1.3(*) 0.369(*) 0.387(*) 0.404(*) 0.414(*) 0.26(*) 0.264(*) 0.259(*) 0.261(*) III 500 1000 2000 3000 0.272 0.263 0.262 0.269 0.353 0.403(*) 0.368 0.344 0.29(*) 0.29(*) 0.285(*) 0.291(*) 0.916(*) 1.33(*) 2(*) 2(*) 1.84(*) 1.89(*) 1.92(*) 1.93(*) 0.846(*) 0.996(*) 0.98(*) 1.09(*) 0.341(*) 0.338(*) 0.339(*) 0.339(*) IV 500 1000 2000 3000 0.145 0.161 0.16 0.15 0.409(*) 0.4(*) 0.395(*) 0.395(*) 0.182(*) 0.196(*) 0.198(*) 0.216(*) 0.248(*) 0.42(*) 1.41(*) 1.41(*) 0.406(*) 0.442(*) 0.472(*) 0.49(*) 0.433(*) 0.469(*) 0.506(*) 0.527(*) 0.438(*) 0.452(*) 0.447(*) 0.447(*) V 500 1000 2000 3000 0.272 0.288 0.289 0.3 0.434(*) 0.418(*) 0.418(*) 0.417(*) 0.353(*) 0.341(*) 0.351(*) 0.372(*) 1.09(*) 1.51(*) 2(*) 2(*) 0.876(*) 0.926(*) 0.868(*) 0.968(*) 0.547(*) 0.569(*) 0.596(*) 0.605(*) 0.539(*) 0.54(*) 0.537(*) 0.544(*) VI 500 1000 2000 3000 0.307 0.311 0.309 0.31 0.479(*) 0.469(*) 0.461(*) 0.46(*) 0.368(*) 0.351(*) 0.399(*) 0.408(*) 1.1(*) 1.51(*) 2(*) 2(*) 0.858(*) 0.927(*) 1.08(*) 1(*) 0.566(*) 0.598(*) 0.617(*) 0.638(*) 0.583(*) 0.583(*) 0.585(*) 0.587(*) VII 500 1000 2000 3000 0.299 0.303 0.309 0.308 0.482(*) 0.465(*) 0.455(*) 0.46(*) 0.343(*) 0.358(*) 0.383(*) 0.357(*) 1.09(*) 1.51(*) 2(*) 2(*) 0.818(*) 0.747(*) 0.966(*) 0.858(*) 0.564(*) 0.589(*) 0.622(*) 0.626(*) 0.583(*) 0.579(*) 0.578(*) 0.58(*) Table 3 The average distance of the space estimated by each of the 7 methods tested to the true space col(V ) under various settings with n = 500 and p = 6000. I II III IV V VI VII DT-SIR SIRI-SIR SIRS-SIR SpSIR SURE-SIR DC-SIR TP-SIR 0.694 0.446 1.35 0.163 0.481(*) 0.463(*) 0.44 0.631 0.462 1.56(*) 0.122 0.431 0.423 0.412 0.606 0.414 1.56(*) 0.245(*) 0.486(*) 0.494(*) 0.477(*) 2(*) 2(*) 2(*) 1.41(*) 2(*) 2(*) 2(*) 1.43(*) 1.74(*) 1.99(*) 0.27(*) 1.62(*) 1.62(*) 1.61(*) 0.97(*) 1.08(*) 1.88(*) 0.305(*) 1.1(*) 1.11(*) 1.1(*) 1.19(*) 0.4 1.37 0.195(*) 0.995(*) 0.999(*) 1.03(*) 1 DT-SIR 0.5 0.5 1.0 Directions 1.0 Directions −0.5 0.0 True Beta SIRI SIR SIRS SIR Sparse SIR DT−SIR −1.0 −1.0 −0.5 0.0 True Beta SIRI SIR SIRS SIR Sparse SIR DT−SIR −1.0 −0.5 0.0 0.5 1.0 −1.0 −0.5 0.0 0.5 1.0 Fig 3: Simulated value of E∠(β̂, β) for the various methods. Left panel: (n, p) = (2000, 1000); Right panel: (n, p) = (500, 1000). Table 4 Comparison of computing time under setting II. DT-SIR n 500 1000 2000 3000 1” 2” 3” 4” p 500 1000 2000 3000 1” 3” 12” 30” SIRI-SIR SIRS-SIR SpSIR SURE-SIR DC-SIR TP-SIR 1’12” 2’2” 3’27” 4’59” 7” 20” 1’14” 2’45” p=1000 11” 11” 13” 15” 1” 1” 2” 3” 24” 1’52” 7’38” 6’51” 29” 1’2” 2’18” 3’7” 2’48” 3’27” 4’55” 6’0” 35” 1’14” 2’35” 4’10” n=2000 2” 13” 1’39” 5’19” 1” 2” 12” 30” 3’46” 7’38” 14’24” 21’38” 1’7” 2’18” 3’22” 6’17” only if ρ = 0. When ρ > 0, where the original SIR fails to be consistent, we propose a two-stage method, DT-SIR for variable screening and selection in ultra-high dimension situations and show that the method is consistent. We have used simulated examples to demonstrate the advantages of DT-SIR compared to its competitors. This method is computationally fast and can be easily implemented for large data sets. Appendices 2 Q. LIN, Z. ZHAO AND J. S. LIU In the following two sections we offer some details about our theoretical derivations, but some more tedious intermediate steps (organized as Lemmas 6-21) are deferred to the Supplemental Document to this article, which is available on line. A. The Key Lemma. The following lemma plays an important role in developing the high dimensional theory for sliced inverse regression. The proof of this key lemma is lengthy and technical. It will be helpful to keep in mind that H and ν (if they are not constants) grow at very slow rate compared with c and n (e.g., polynomial of log(n)). Let m(y) = E[x|y], and x = m(y) + ǫ. Notations mh,j , mh,· , m, and ǫh,j , ǫh,· , ǫ are similarly defined as xh,j , xh,· and x that were introduced before. Lemma 1. Let x ∈ Rp be a sub-Gaussian random variable which is upper exponentially bounded by K (see Definition 4). For any unit vector β ∈ Rp , let x(β) = hx, βi and m(β) = hm, βi = E[x(β) | y], we have the following: i) If var(m(β)) = 0 , there exists positive constants C1 , C2 and C3 such that for any b = O(1) and sufficiently large H, we have   nb P(varH (x(β)) > b) ≤ C1 exp −C2 2 + C3 log(H) . H ii) If var(m(β)) 6= 0 , there exists positive constants C1 , C2 and C3 such that, for any ν > 1, we have |varH (x(β)) − var(m(β))| ≥ 1 var(m(β)) 2ν with probability at most   n var(m(β)) + C3 log(H) . C1 exp −C2 H 2ν 2 where we choose H such that H ϑ > C4 ν for some sufficiently large constant C4 . 3 DT-SIR A.1. Proof of Lemma 1 i) If m(β) = 0 (or equivalently var(m(β)) = 0), since !2 c−1 c−1 1 X 1 2 ǭh,· (β) = ǫh,i (β) + ǫh,c (β) c c−1 c i=1 !2 2  c−1 1 1 X ǫh,c (β) ǫh,i (β) + 2 ≤2 c−1 c i=1 for h = 1, ..., H − 1 and ǭH,· (β) = varH (x(β)) − var(m(β)) 1 c Pc i=1 ǫH,i (β), we have H−1 1 X 1 = ǭh,· (β)2 + ǭH,· (β)2 H H h   !2 H−1 H−1 c−1 X X 2 X 2  1 2 ǫh,i (β) + ǭH,· (β) + ≤ ǫh,c (β)2 H c−1 Hc2 h i=1 h ,2I + 2II. Thus (A.1) P(varH (x(β)) > b) ≤ P(I > b/4) + P(II > b/4). Lemma 17 (iii) in Supplement implies that P (ǫ(β)|y∈Sh  t2 > t) ≤ CH exp − 2 K  for some positive constant C. Since E[x(β)|y] = 0,we have E[x(β)|y ∈ Sh ] = 0. From Lemma 9, we know that for 1 ≤ h ≤ H − 1, ǫh,i (β) can be treated as c − 1 i.i.d. samples from ǫ(β)|y∈Sh . According to Lemma 17 (iv), !   c−1 √ 1 X −b(c − 1) √ P | . ǫh,i (β)| > b/2 ≤ C1 exp c−1 8C2 HK 2 + 4 bK i=1 Similarly, we have !   c √ 1X −bc √ P | ǫH,i (β)| > b/2 ≤ C1 exp . c 8C2 HK 2 + 4 bK i=1 4 Q. LIN, Z. ZHAO AND J. S. LIU Thus, if b = O(1) and H is sufficiently large, we have      −bc −b(c − 1) b √ √ + exp P(I > ) ≤C1 (H − 1) exp 4 8C2 HK 2 + 4 bK 8C3 HK 2 + 4 bK   cb ≤C1 exp −C2 + C3 log(H) H for some positive constants C1 , C2 and C3 . Since ǫi (β) are i.i.d. samples from a sub-Gaussian distribution ǫ(β) with mean 0 and upper-exponentially bounded by 2K. Lemma 19 implies that if b = O(1) and H is sufficiently large, we have 1X ǫi (β)2 > bc/4) n i 1X ≤P( ǫi (β)2 − E[ǫ(β)2 ] > bc/4 − E[ǫ(β)2 ) n i ! 1X 2 2 2 ǫi (β) − E[ǫ(β) ] ≥ cb/4 − 4K ≤P n i   √ n(cb/4 − 4K 2 ) ≤C1 exp −C2 K2   cb ≤C1 exp −C2 + C3 log(H) H P(II > b/4) ≤P( for some positive constants C1 , C2 and C3 if H is sufficiently large. We used in above the fact that E[ǫ(β)2 ] ≤ 4K 2 . To summarize, if b = O(1) and H is sufficiently large, we have   cb P(varH (x(β)) > b) ≤ C1 exp −C2 + C3 log(H) H for some positive absolute constants C1 , C2 and C3 . A.2. Proof of Lemma 1 ii) Since x is sub-Gaussian and β is unit vector, we know that var(m(β)) = O(1). If m(β) 6= 0 (or equivalently var(m (β)) 6= 5 DT-SIR 0), we have varH (x(β)) − var(m(β)) 1 X xh,· (β)2 − var(m(β)) = H h 1 X 2 X 1 X = mh,· (β)2 + mh,· (β)ǫh,· (β) + ǫh,· (β)2 H H H h h h − var(m(β)) ≤A1 + A2 + A3 + A4 , where 1 X µh (β)2 − var(m(β)) , H h 1 X mh,· (β)2 − µh (β)2 , A2 = H h 1 X A3 = ǭh,· (β)2 , H h 1 X 1 X A4 = ( mh,· (β)2 )1/2 ( ǫh,· (β)2 )1/2 . H H A1 = (A.2) h h Lemma 1 ii) is a direct corollary of the following properties of Ai ’s. Lemma 2. Let the Ai ’s be defined as in equation (A.2). There exist positive constants C1 , C2 and C3 , such that for any ν > 1 and H satisfying H ϑ = N1 ν for sufficiently large N1 , we have that each of the following events o n 1 var(m(β)) , i) Θ1 = A1 ≤ 4ν ii) Θ2 = iii) Θ3 = iv) Θ4 = n n n o A2 ≤ 1 8ν var(m(β)) A3 ≤ 1 16ν var(m(β)) A4 ≤ 1 16ν var(m(β)) , o o , , occurs with probability at least   c var(m(β)) + C3 log(H) . (A.3) 1 − C1 exp −C2 Hν 2  6 Q. LIN, Z. ZHAO AND J. S. LIU A.2.1. Proof of Lemma 2. A.2.1.1. Proof of i) : Recall definitions of the R random intervals Sh , h = 1, 2, · · · , H and random variable δh = δh (ω) = y∈Sh (ω) f (y)dy. We have 1 X (µh (β))2 − var(m(β)) H h X X 1 X ≤ var(m(β)) − δh (µh (β))2 + (µh (β))2 − δh (µh (β))2 H h h h ,B1 + B2 Let ǫ = Hn10 +1 where n0 = N2 ν for some sufficiently large constant N2 and n let event E(ǫ) be odefined as in Lemma 11 in Section E, i.e., E(ǫ) = ω |δh − H1 | > ǫ, ∀h . For any ω ∈ E(ǫ)c , we have B1 = X h δh (ω)var(m(β)|y ∈ Sh (ω)) X 1 + ǫ) var(m(β)|y ∈ Sh (ω)) H h γ ≤(1 + Hǫ) 3ϑ var(m(β)) H 2γ 3 ≤ var(m(β)), N1 ν (A.4) ≤( (A.5) (A.6) where inequality (A.4) follows from the fact that δh (ω) ≤ H1 + ǫ, inequality (A.5) follows from the sliced stable condition (4) and inequality (A.6) follows from the requirement that H ϑ > N1 ν, and the fact X X ǫ δh (β τ µh )2 B2 ≤ǫ (β τ µh )2 = δh h h Hǫ X (A.7) δh (β τ µh )2 ≤ 1 − Hǫ h 2 X ≤ δh (β τ µh )2 N2 ν h where inequality (A.7) follows from the fact δh ≥ H1 − ǫ. From (A.5), we observe that   X 2γ 3 2 δh (µh (β)) ≤ 1 + (A.8) var(m(β)). N1 ν h 7 DT-SIR Combining with (A.7), we then have   2 2γ 3 B2 ≤ 1+ var(m(β)). N2 ν N1 ν So when E(ǫ)c occurs, we have    2γ 3 2 2γ 3 B1 + B2 ≤ + 1+ var(m(β)). N1 ν N2 ν N1 ν Note that N1 and N2 can be chosen sufficiently large so that (A.9) B1 + B2 ≤ 1 4γ 3 var(m(β)) ≤ var(m(β)). N1 ν 4ν Consequently, conditioning on E(ǫ)c where ǫ = N1 ν, then (A.10) 1 HN2 ν+1 , if we choose H ϑ > 1 1 X var(m(β)). (µh (β))2 − var(m(β)) ≤ H 4ν h Since var(m(β)) = O(1), H ϑ > N1 ν and ǫ = HN21ν+1 , the desired probability bound follows from Lemma 11, i.e.,   √ Hc + 1 2 P(E(ǫ)) ≤C1 exp − + log(H Hc + 1) 32(Hn0 + 1)2   c var(m(β)) + C log(H) . ≤C1 exp −C2 3 Hν 2  for some positive constants C1 , C2 and C3 . Remark 5. From (A.10), conditioning on E(ǫ)c , we obtain the following two inequalities   1 X 4γ 3 2 (A.11) (µh (β)) ≤ 1 + ϑ var (m(β)) H H h and (A.12)   1/2 4γ 3 1 X |µh (β)| ≤ 1 + ϑ var (m(β)) . H H h In particular, 1 H P h (µh (β)) 2 and 1 H P h |µh (β)| are bounded by OP (1). 8 Q. LIN, Z. ZHAO AND J. S. LIU A.2.1.2. Proof of ii) : Denote by m′H (β), we have 1 c−1 Pc−1 i=1 mh,i (β) by m′h (β) and mH,· (β) H H 1 X 1 X 2 2 ′ A2 ≤ mh (β) − µh (β) + mh,c (β)2 H Hc2 h=1 h=1 ! !1/2 1/2 H H H 1 X 2 X 2(c − 1) 1 X ′ 2 2 mh (β) + + m (β) µh (β)2 h,c c H Hc2 Hc h=1 h=1 h=1 , I + II + III + IV Before we start proving this part, we need to introduce two events and bound their probabilities. First, let o n 1 p var(m(β)) . (A.13) E1 (N3 , ν) = η(β) > N3 ν n o where η(β) = max1≤h≤H m′h (β) − µh (β) . According to Lemma 17 (i), (iv) and Bonferroni’s inequality, we have ! 1 −(c − 1)var(m(β)) p (A.14) P (E1 (N3 , ν)) ≤2H exp (N3 ν)2 2CHK 2 + N2 ν var(m(β))K 3   c var(m(β)) (A.15) + C3 log(H) ≤C1 exp −C2 Hν 2 for some positive constants C1 , C2 and C3 . Second, let n o 1 E2 (N4 , ν) , II > var(m(β)) , N4 ν then ! 1 X 2 var(m(β)) mi > P (E(N4 , ν)) ≤ P nc N4 ν i   √ var(m(β)) 2 ≤C1 exp −C2 n(c )−K ) ν   c var(m(β)) + C3 log(H) ≤C1 exp −C2 Hν for some positive constant C1 , C2 and C3 . It is easily to see E(N4 , ν) ⊂ E(N4 , ν 2 ). 9 DT-SIR For I. Conditioning on the event E(ǫ)c ∩E1 (N3 , ν)c , combining with (A.12), we have 2η(β) X 1 X η(β)(η(β) + 2|µh (β)|) ≤ η(β)2 + |µh (β)| I≤ H H h h   !   1 2 2 4γ 3 1/2 ≤ var(m(β)) + 1+ ϑ N3 ν N3 ν H 1 var(m(β)) 32ν if N3 is sufficiently large . ≤ Remark 6. we have (A.16) From above, conditioning on the event E(ǫ)c ∩ E1 (N3 , ν)c , H 1 + 32ν 1 X ′ var(m(β)). m (β)2 ≤ H 32ν h=1 For II. Conditioning on E2 (N4 , ν)c , we have II ≤ var(m(y)) . N4 ν For III. When the event E(ǫ)c ∩ E1 (N3 , ν)c ∩ E2 (N4 , ν 2 )c occurs, according to equation (A.16), r 1 2(c − 1) 1 + 32ν 1 √ var(m(β)) < var(m(β)). III ≤ c 32ν 16ν N4 ν if N4 is sufficiently large. For VI. When the event E(ǫ)c ∩ E1 (N3 , ν)c ∩ E2 (N4 , ν)c occurs, from (A.10), we know 9 1 2 X µh (β)2 ≤ var(m(β)) < var(m(β)). VI = Hc 4c 16ν h To summarize, we know that there exist positive constant C1 , C2 , C3 and C4 such that 1 A2 ≤ I + II + III + V I ≤ var(m(β)) 8ν holds on the event E(ǫ)c ∩ E1 (N3 , ν)c ∩ E2 (N4 , ν 2 )c which is with probability at least   c var(m(β)) + C3 log(H) 1 − C1 exp −C2 Hν 2 for some positive constants C1 ,C2 and C3 . 10 Q. LIN, Z. ZHAO AND J. S. LIU A.2.1.3. Proof of iii) : Similar to the proof of Lemma 1 (i) we have P(A3 > b) ≤ C1 H exp −(c − 1)b √ 8C2 HK12 + 4 bK2 ! for some positive constants C1 , C2 and C3 . In particular , if we take b = 1 16ν var(m(β)), we know that A3 ≤ 1 var(m(β)) 16ν with probability at least  c var(m(β)) + C3 log(H) 1 − C1 exp −C2 Hν 2  for some positive constant C1 , C2 and C3 . A.2.1.4. Proof of iv) : Let D1 , 1 X mh,· (β)2 , H D2 , A3 = h 1 X ǭh,· (β)2 H h Consequently,  (A.17)  1 P > var(m(β)) 16ν     var(m(β)) 2ν + 1 var(m(β)) + P D2 > ≤P |D1 | > 2ν (2ν + 1)16ν 1/2 1/2 D1 D2 Note that |D1 − var(m(β))| ≤ A2 + A1 According to (i) and (ii), the right hand side of (A.17) is bounded by   c var(m(β) C1 exp −C2 + C3 log(H) Hν 2 for some positive constants C1 , C2 and C3 .  B. Proofs of theorems in section 3. 11 DT-SIR B.1. Proof of Theorem 1. Let S be the central subspace of dimension d ≪ p, i.e., y ⊥ ⊥ x|P S x and dim(S) = d. We have the decomposition x = P S x + P S⊥ x , z + w (B.1) = E[z|y] + z − E[z|y] + w , m + v + w where z = P S x, m = E[z|y], v = z − E[z|y] and w = P S ⊥ x. Note that m lies in the central curve, v lies in the central space and w lies in the space perpendicular to S. We introduce (B.2) mh,j , mh,· , m, z h,j , z h,· , z, and wh,j , wh,· , w bz similar to the definition of xh,j , xh,· and x. Consequently, we can define Λ and have the following decomposition (B.3) X bH ≡ 1 b z + ZW τ + WZ τ + WW τ , Λ xh,· xτh,· = Λ H h where 1 1 Z = √ (z 1,· , ..., z H,· ) and W = √ (w1,· , ..., w H,· ) . H H b z − Λp k2 and kWW τ k2 . We need to bound kΛ Lemma 3. kWW τ k2 ≤ OP ( (B.4) H 2p ) n Proof. From Lemma 1, for any unit vector β ⊥ col(Λ), i.e. var(m(β)) = 0, we have (B.5) P(β τ WW τ β > C H 2p ) ≤ C1 exp (−C2 p + log(H)) . n for some positive constants C1 and C2 . Then the ε-net argument (see e.g., 2 Vershynin [2010]) implies that kWW τ k ≤ OP ( Hn p )  Lemma 4. (B.6) b z − Λp k ≤ OP kΛ  1 Hϑ b z k ≤ OP (1). As a direct corollary, we have kΛ  . 12 Q. LIN, Z. ZHAO AND J. S. LIU Proof. From Lemma 1, we have     C c var(m(β)) τ b P β (Λz − Λ)β > ϑ kΛk2 ≤ C1 exp −C2 + C3 log(H) . H H 1+2ϑ Note that we only need to verify it for β ∈ col(Λp ), which is a d-dimensional  b z − Λp k2 ≤ OP 1ϑ .  space. Then the ε-net argument implies that kΛ H Theorem 1 follows from Lemma 4 and Lemma 3. In fact, b H − Λp k ≤ kΛ b z − Λp k + kZW τ + WZ τ k2 + kWW τ k2 kΛ ! r 1 H 2p H 2p ≤ OP + + . Hϑ n n  B.2. Proof of Theorem 2. Theorem 2 is a direct corollary of Theorem 1 and Lemma 13. In fact, we have: −1 b −1 b kΣ X ΛH − ΣX Λp k2 b H − Λp k2 , b H k2 + kΣ−1 k2 kΛ b −1 − Σ−1 k2 kΛ ≤ kΣ X X X which → 0 if ρ = limn→∞ p n = 0.  B.3. Proof of Theorem 3. (i) The proof for part (i) is similar to the proof of Theorem 1 and the standard Gaussian assumption on x simplifies the argument and improves the results. Since w = P S ⊥ x is normal and independent of y, there exists a normal random variable ǫ ∼ N (0, I) such that w = Σ1/2 ǫ where Σ = cov(w). Using the decomposition (B.3), we may write (B.7) W=√ 1 Σ1/2 E p×H Hc where E p,H is a p × H matrix with i.i.d. standard normal entries. Corollary 4 implies that kWW τ k2 ≤ C r p + n r H n !2 ≤ OP p n . 13 DT-SIR Lemma 4 implies b z k2 ≤ kΛp k2 + OP kΛ By the Cauchy inequality, we have Thus,  1 Hϑ b z k2 kWW τ k2 ≤ OP kC1 k22 ≤ kΛ b H − Λp k2 ≤ OP ( 1 + p + kΛ Hϑ n  . p n r . p ). n b H −Λp k2 In particular, if H, n → ∞ and ρ = lim np ∈ (0, ∞), we know that kΛ √ is dominated by ρ ∨ ρ as a function of ρ.  (ii) The proof for part (ii) is similar to the proof of Theorem 2 in Johnstone and Lu [2009] but is technically more challenging. Let D = ZZ τ + WW τ and B = ZW τ + WZ τ , then b H =D + B. Λ Since we are working on single index model with x is standard normal, z = Pβ x = βz(y) for some scalar function z(y) and w = Pβ ⊥ x are independent normal random variables. Let Σ = var(w), then we can write W=√ 1 Σ1/2 E Hc where E is a p × H matrix with i.i.d. standard normal entries. Since z = βz(y), we have Z = √1H β(z 1,· , z 2,· , ..., z H,· ). To ease notation, let θ τ = (z 1,· , z 2,· , ..., z H,· ), then 1 1 kθk2 ββ τ + Σ1/2 EE τ Σ1/2 H n 1 B = βuτ + uβ τ where u = √ Σ1/2 Eθ. H c D= (B.8) 1 ) and Let 0 < α < arctan( 16 n o (B.9) Nα = x ∈ Rp : ∠ (x, β) ≤ α and kxk = 1 be the set of unit vectors making angle at most α where ∠(x, y) is the angle between the vectors x and y. In order to proceed, we need the following lemma. 14 Q. LIN, Z. ZHAO AND J. S. LIU b and β b be the principal eigenvector of S+ , D + B Lemma 5. Let β − and S− , D − B, respectively. exists a positive constant ω(α) such  There  b b that for any β ∈ Nα , i.e., ∠ β, β ≤ α, we have (B.10)  1  b β b ∠ β, − ≥ ω(α) 3 with probability converging to one as n → ∞. Proof. The proof is presented in Lin et al. [2015]. Note that S+ and S− have the same distribution (viewed as functions of random terms E and θ): S− (E, θ) = S+ (−E, θ). n   o n   o b β ≤α ∪ ∠ β b , β ≤ α , then Let Aα denote the event ∠ β, −       b β ] ≥ E[∠ β, b β , Ac ] + E[∠ β, b β , Aα ] E[∠ β, α     b β , Ac ] + 1 E[∠ β, b β b , Aα ] ≥ E[∠ β, − α 2 ω(α) ≥ min{α, } > 0. 6  C. Proof of Lemma 5. We need the following lemmas. Lemma 6. Recall that u = H1√c Σ1/2 Eθ defined as in (B.8), then there exist positive constants C1 and C2 such that 0 < C1 ≤ kuk2 ≤ C2 with probability converging to one as n → ∞. Lemma 7. Assuming conditions in Theorem 3, let B and Nα be defined 1 ). as in (B.8) and(B.9) respectively where 0 < α < arctan( 16 i) There exists positive constant C1 such that for any x ∈ Nα , we have kBxk ≥ C1 with probability converging to one as n → ∞; ii) For any x ∈ Nα , we have cos ∠(x, Bx) ≤ 4α with probability converging to one as n → ∞. 15 DT-SIR The following lemma is borrowed from Johnstone and Lu [2004]. Lemma 8. Let ξ be a principal eigenvector of a non-zero symmetric matrix M. For any η = 6 0, ∠(η, M η) ≤ 3∠(η, ξ). The proof of Lemma 5 is made plausible by reference to the Figure C1. Fig C1: An illustrated graph Since (C.1) (C.2)    b S− β b sin ∠ β, = sin (ω1 + ω2 ) = sin (π − ω1 − ω2 ) n o ≥ min sin (ω1 ) , sin (ω3 ) , we only need to prove that there exists a positive small constant ω(α) ( < π2 ) such that sin (ω1 ) , sin (ω2 ) ≥ sin (ω(α)) . In fact, if such ω(α) exists, we b in Lemma 8 and get may choose M = S− , ξ = β −  1    b S− β b ≥ 1 ω(α). b β b ≥ ∠ β, ∠ β, − 3 3 b B β) b ≤ 4α, we know that there exists For ω3 . From Lemma 7 ii), cos ∠(β, positive constants δ(α)(< π2 ) such that sin ω3 ≥ sin (δ(α)) . For ω1 . (C.3) Applying the law of sines to the triangle △(O, O1 , O2 ) , we have    b β b sin ∠ B β, sin ω1 sin ω3  . = = b b b kB βk kD βk kD βk Note that from Lemma 7 i), there exists a constant C1 > 0 such that b > C1 and kB βk b ≤ kDk ≤ kD βk 1 1 kθk2 + k EE τ k, H n is bounded by an absolute constant C given limn→∞ stable condition. Then (C.3) implies sin ω1 = p n = ρ 6= 0 and sliced b sin ∠(B β, b β) b kB βk C1 sin δ(α) ≥ sin ω ′ > 0 ≥ b C kD βk 16 Q. LIN, Z. ZHAO AND J. S. LIU where ω ′ ( < π2 )is an small angle such that the last inequality holds. In particular, we have ω1 ≥ ω ′ . Hence b S− β) b ≥ω ′ ∧ δ(α) , ω(α) ∠(β,  C.1. Proof of Lemma 6 Proof : In fact, let T be an orthogonal matrix such that T β = (1, 0 · · · , 0)τ and M = T ββ τ T τ , then cH 2 uτ u = θ τ E τ ΣEθ = θ τ E τ Eθ − θ τ E τ ββ τ Eθ = θ τ E τ T τ T Eθ − θ τ E τ T τ (T β)β τ T τ T Eθ d. = θ τ E τ Eθ − θ τ E τ M Eθ d. p − 1 τ τ θ E Eθ, = p d. where = means equal in distribution. Note that E τ E is full rank H × H matrix, combining with Lemma 14 , we know that s s 1 τ 1 τ H 2 H 2 ) ≤ λmin ( E E) ≤ λmax ( E E) ≤ C2 (1 + ) C1 (1 − p p p p for some positive constants C1 and C2 with probability at least 1−2 exp(−p/8). Note that lim np = ρ > 0 as n → ∞ and n = Hc, we know there exists positive constants C1 and C2 such that C1 1 1 kθk2 ≤ kuk2 ≤ C2 kθk2 H H with probability at least 1 − 2 exp(−p/8). On the other hand, the sliced stable condition implies that lim H1 kθk2 exists (6= 0), so kuk2 is bounded away from 0 and ∞ with probability 1 as n → ∞.  C.2. Proof of Lemma 7 Proof : For i), ∀x ∈ Nα , let x = cos(δ)β + sin(δ)η where η ⊥ β, kηk = 1, δ ≤ α. Since Bx = cos(δ)u + (uτ η) sin(δ)β, we have: kBxk ≥ cos(δ)kuk − sin(δ)kuk ≥ ≥ C1 1 cos(α)kuk > >0 2 4 1 cos(δ)kuk 2 DT-SIR 17 for some positive constant C1 . For ii), since xτ Bx = 2(uτ η) cos(δ) sin(δ) we have that uniformly over Nδ , |xτ Bx| ≤ |uτ η| sin(2δ) which in turn implies: cos(∠(Bx, x)) = sin(2δ)|uτ η| |xτ Bx| ≤ 1 ≤ 4δ ≤ 4α. kxkkBxk 2 cos(δ)kuk  D. Appendix B: Proofs of Theorems 4 to 6. D.1. Proof of Theorem 4. Let x(k) =< x, β k > where β k = (0, .., 1, ...0) ∈ Rp with the only 1 at the k-th position. Recall that o n T = k E[x(k)|y] is not constant. n o Ip (t) = k varH (x(k)) > t n o Ep (t) = k varH (x(k)) ≤ t . and |T | ≤ Cs for some positive constant C. Since var(E[x(k)|y]) > sCω , we may choose t = saω for sufficiently small positive constant a such that for any k ∈ T , t < 12 var(E[x(k)|y]. According to Lemma 1 and the Bonferroni’s inequality, we have X P (T c ⊂ Ep (t)) ≥ 1 − P ( varH (x(k)) > t) k∈T c and   ct ≥ 1 − C1 exp −C2 + C3 log(H) + log(p − s) . H ! o 1 varH (x(k)) ≥ var(m(k, y)) P(T ⊂ Ip (t)) ≥ P 2 k∈T   X 1 ≥1− P varH (x(k)) < var (m(k, y)) 2 k∈T   c var(m(k, y)) ≥ 1 − C1 exp −C2 + C3 log(H) + log (Cs) , H \n i.e., we have (11) and (12) hold.  18 Q. LIN, Z. ZHAO AND J. S. LIU D.2. Proof of Theorem 5 By choosing H, c and t = saω properly, from Theorem 4, we have   n P (Tb = T ) ≥ 1 − C1 exp −C2 2 ω + C3 log(H) + log(p − s) H s for some positive constants Ci , i = 1, 2, 3. When Tb = T , we have |Tb | = O(s). b For the n samples (Yi , XiT ), apply Theorem 1, we have r T ,T T ,T H 2s 1 H 2s T ,T b b + ). ke(ΛH ) − Λp k2 ≤ kΛH − Λp k2 ≤ OP ( ϑ + H n n In particular, with probability converging to one, we have T ,T b ke(Λ H ) − Λp k2 → 0 as n → ∞. D.3. Proof of Theorem 6. The proof is almost identical to the proof of Theorem 2, except that we additionally need to use Theorem 1 in Bickel and Levina [2008]. E. Appendix C E.1. Assisting Lemmas Definition 2. A set of random variables x1 , ..., xn can be treated as i.i.d random samples from a random variable x, if for any n variates symmetric function f (w1 , ..., wn ) , f (x1 , ..., xn ) is identically distributed as f (z1 , ..., zn ) where z1 , ..., zn are i.i.d random samples from x. Lemma 9. Let (xi , yi ) be n i.i.d random samples from a joint distribution (x, y). Sort these samples according to the order statistics of yi ’s and denote the sorted samples by (x(1) , y(1) ), (x(2) , y(2) ), ..., (x(n) , y(n) ). Then for any a, b (1 ≤ a ≤ b + 1 ≤ n), x(a+1) , ..., x(b) can be treated as b − a i.i.d samples  from x y ∈ [y(a) , y(b+1) ] . Proof. In fact, we only need to prove that y(a+1) , · · · , y(b) can be treated as b − a i.i.d. samples of y (y ∈ [y(a) , y(b+1) ]). The latter only needs to be proved for uniform distribution which can be verified directly. Corollary 1. In the slicing inverse regression contexts, recall that Sh denotes the h-th interval (yh−1,c , yh,c ] for 2 ≤ h ≤ H −1 and S1 = (−∞, y1,c ], SH = (yH−1,c , ∞). We have that xh,i , i = 1, · · · , c − 1 can be treated as c − 1 DT-SIR 19 random samples of x (y ∈ Sh ) for h = 1, ..., H − 1 and xH,1 , ..., xH can be treated as c random samples of x (y ∈ SH ). Lemma 10. Suppose that (x, y) are defined over σ-finite space X × Y and g is a non-negative function such that E[g(x)] exists. For any fixed positive constants C1 < 1 < C2 , there exists a S constant C which only depends on C1 , C2 such that for any partition R = H h=1 Sh where Sh are intervals satisfying C2 C1 ≤ P(y ∈ Sh ) ≤ , ∀h, H H (E.1) we have sup E(g(x) y ∈ Sh′ ) ≤ CHE[g(x)]. h Proof. According to Fubini’s Theorem, for any h, Z X E[g(x)] = g(x)p(x|y ∈ Sk )dx P(y ∈ Sk ) k ≥P(y ∈ Sh ) Z X X g(x)p(x|y ∈ Sh )dx. Due to the condition (E.1), there exists a positive constant C such that Z g(x)p(x|y ∈ Sh )dx ≤ CHE[g(x)]. X  Corollary 2. Let x be a multivariate random variable with covariance matrix Σ. For any partition satisfying (E.1), there exists a constant C such that var(β τ x|y∈Sh′ ) ≤ CHvar(β τ x), for any unit vector β, and    ≤ CHλmax (var (x)) . λmax var x y ∈ Sh′ Corollary 3. Let x be a sub-Gaussian random variable which is upperexponentially bounded by K. Then for any partition satisfying (E.1), there exists a constant C such that  2  2 x x ′ E[exp ] ≤ CHE[exp y ∈ S ]. h K2 K2 20 Q. LIN, Z. ZHAO AND J. S. LIU Recall the definition of the R random intervals Sh , h = 1, 2, · · · , H and random variable δh = δh (ω) = y∈Sh (ω) f (y)dy. Lemma 11. Define the event E(ǫ) = n ω |δh − exists a positive constant C such that, for any ǫ > 1 H| 4 Hc−1 > ǫ, ∀h we have o . There √ ǫ2 P (E(ǫ)) ≤ CH 2 Hc + 1 exp(−(Hc + 1) ) 32 (E.2) for sufficient large H and c. Proof. The proof is deferred to the end of this paper. E.2. Some Results from Random Matrices Theory. We collect some direct corollaries of the non-asymptotic random matrices theory (e.g., Rudelson and Vershynin [2013]). Lemma 12. Let M be any p × n matrix (n > p) whose columns M i are independent sub-Gaussian random vectors in Rp with second moment Ip and λ+ sing,min (M ), λsing,max (M ) be the minimal non-zero and maximal singular value of M . Then for every t, with probability at least 1 − 2 exp(−C ′ t2 ), we have : √ √ √ √ n − C p − t ≤ λ+ n + C p + t. sing,min (M ) ≤ λsing,max (M ) ≤ Lemma 13. Let x1 , · · · , xn be n i.i.d. samples from a p-dimensional sub-Gaussian random variable with covariance matrix Σ and ρ = np . If there exists positive constants C1 and C2 such that bx = Let Σ 1 n P C1 ≤ λmin (Σx ) ≤ λmax (Σx ) ≤ C2 . i xi xτi . Then b x − Σx k2 → 0 if ρ = 0 when n → ∞. kΣ b −1 − It is also easy to see that, given the boundedness condition on ΣX , kΣ X p Σ−1 X k2 → 0 if ρ = n → 0 when n → ∞. 1/2 Proof. Let xi = Σx mi where mi is sub-Gaussian random variable with covariance matrix Ip and M = (m1 , ..., mn ). From Lemma 12, we 21 DT-SIR have 1 k M M τ − Ip k2 → 0 n and −1 b kΣ 1 − Σ−1 k2 = kΣ−1/2 k2 k M M τ − Ip k2 kΣ−1/2 k2 → 0, n with probability converges to 1 as n → ∞ because    √  (C + 1) p 2 1 τ √ λmax MM ≤ 1+ n n and    √  (C + 1) p 2 1 √ MMτ ≥ 1 − λmin n n with probability at least 1 − 2 exp(−C ′ p).  The following lemma is well known in the non-asymptotic random matrix theory (Vershynin [2010] Proposition 5.34 ) which is slightly different from the Lemma 12. Lemma 14. Let E p×H be a p × H matrix, whose entries are independent standard normal random variables. Then for every t ≥ 0, with probability at least 1 − 2 exp(−t2 /2), we have : √ √ p − H − t, λ+ sing,min (E p×H ) ≥ and λsing,max (E p×H ) ≤ √ p+ √ H + t. Corollary 4. We have √  √  1 √ 3 √ (E ) ≤ λ (E ) ≤ p − H ≤ λ− p + H . p×H sing,max p×H sing,min 2 2 with probability converging to one, as n → ∞. P √ p/2, according to Lemma 14, we have: ! ! √ p 3 λmax (EH ) λmax (EH ) √ ≤ √ ≤1+ √ √ ≥P √ √ 2 p+ H p+ H 2 p+2 H Proof. Choosing t = 22 Q. LIN, Z. ZHAO AND J. S. LIU and P λ+ 1 H) min (E √ ≥ √ 2 p− H ! ≥P ! √ p λmax (EH ) √ ≥1− √ √ √ p− H 2 p−2 H with probability at least 1 − 2 exp(−p/8). i.e., With probability converging to one, we have √ √ 3 √ 1 √ ( p − H) ≤ λ− min (Ep×H ) ≤ λmax (Ep×H ) ≤ ( p + H). 2 2  E.3. Basic Properties of sub-Gaussian random variables. We rephrased several equivalent definitions of the sub-Gaussian distribution here (See e.g., Vershynin [2010] ): Definition 3. Let x be a random variable. Then the following properties are equivalent with parameters Ki ’s differing from each other by at most an absolute constant factor, 1. Tails: P(|x| > t) ≤ exp(1 − t2 /K12 ) for all t ≥ 0. √ 2. Moments: (E[|x|p ])1/p ≤ K2 p for all p ≥ 1. 3. Super-exponential moment: E exp(x2 /K32 ) ≤ e. Moreover, if E[x] = 0, then the properties 1 − 3 are also equivalent to the following one: 4. Moment generating function: E[exp(tx)] ≤ exp(t2 K42 ). Definition 4. For a sub-Gaussian random variable x with the constants Ki , i = 1, 2, 3, 4 given in Definition 3, we will call a constant K an upperexponential bound of x or x is upper-exponentially bounded by K if K > maxi {K1 , K2 , K3 , K4 }. We summarize some properties regarding the sub-Gaussian distributions into the following lemmas. Lemma 15. Let δ1 , ..., δn be n (not necessarily independent or with mean zero) sub-Gaussian random variables upper-exponentially bounded by K. P i) n1 ni=1 δi is sub-Gaussian and upper-exponentially bounded by K. ii) δ1 − E[δ1 ] is sub-Gaussian upper-exponentially bounded by 2K. 23 DT-SIR iii) If they are independent and with mean zero , then Gaussian and upper-exponentially bounded by K. √1 n P i δi is sub- iv) If they are i.i.d., then we have the concentration inequality:  Pn    −nt2 i=1 δi P − E[x] > t ≤ 2 exp . n 2K 2 e + 2tK Proof. i) follows from the linear property of expectation and the the convexity of exponential function. i.e., E[exp( 1X δi2 δi2 1 X 2 δ )] ≤ E[ )] ≤ max E[exp( )] ≤ e. exp( i i nK 2 n K2 K2 i h ii) From Definition 3, we know that |E[δi ]| ≤ K which gives us the desired upper-exponential bound of δi − E[δi ]. iii) is trivial as δ1 , · · · , δc are independent and with mean zero. iv) Since δ1 is sub-Gaussian upper-exponentially bounded by K, we have:   Z ∞ Z ∞ t2 p−1 p−1 p pt exp 1 − 2 dt pt P(|δ1 | > t)dt ≤ E[|δ1 | ] = K 0 0 ep p p for any p ≥ 1 = Γ( )K 2 2 (K 2 e) ≤ p!K p−2 for any p ≥ 2 2 Recall the well known Bernstein inequality. Lemma 16. ( Bernstein Inequality ). If there exists positive constants V and b such that for any integers m ≥ 2, E[|δ1 |m ] ≤ m!bm−2 V /2 then (E.3) P  Pn i=1 δi n − E[x] > t  ≤ 2 exp  −nt2 2V + 2tb  . By chooing V = K 2 e and b = K, we get the desired concentration inequality.  Lemma 17. Suppose that (x, y) are defined over σ-finite space X × Y and x is sub-Gaussian with mean 0 and upper exponentially bounded by K, let m(y) = E[x|y], ǫ(y) = x − m(y), then we have 24 Q. LIN, Z. ZHAO AND J. S. LIU i) m(y) and ǫ(y) are sub-Gaussian and upper-exponentially bounded by K and 2K respectively. ii) Let Z consists of points y such that x|y is not sub-Gaussian, i.e., Z o n exp(tx2 )p(x|y)p(y)dx = ∞ , Z , y | ∃t ∈ (0, t0 ] such that X then P(y ∈ Z) = 0. iii) For SH any fixed positive constants C1 < 1 < C2 and any partition R = h=1 Sh where Sh are intervals satisfying C2 C1 ≤ P(y ∈ Sh ) ≤ , ∀h, H H there exists a constant C such that sup P(x|y∈Sh h  t2 > t) ≤ CH exp 1 − 2 K  . As a direct corollary, we know that there exists a positive constant C such that    (x|y∈Sh )2 ≤ CH, E exp 2K 2 and h E (x|y∈Sh ) mi ≤ CHmK m Γ( m )/2. 2 vi) Suppose that x|y∈Sh is Pdefined as in iii). Let xi , i=1,...,c be c samples from x|y∈Sh , x̄h = 1c i xi and µh = E[x|y∈Sh ], we have P[|x̄h − µh | > t] ≤ 2 exp  −ct2 2CHK 2 + 2tK  . Proof. i) By Jensen’s inequality, we have E[exp(tE[x|y])] ≤ E[E[exp(tx)|y]] = E[exp(tx)] ≤ exp(t2 K12 ). i.e., m(y) is sub-Gaussian and upper-exponentially bounded by K1 . Since x , m(y) is sub-Gaussian and upper-exponentially bounded by K1 , we know that ǫ = x − m(y) is sub-Gaussian and upper-exponentially bounded by 2K1 . 25 DT-SIR ii) Let p(x, y) be the joint density function of (x, y) and p(x), p(y) be the marginal distribution of x, y. Since x is sub-Gaussian, we know there exists t0 > 0 such that Z Z 2 p(x|y)p(y)dydx ≤ e for 0 ≤ t ≤ t0 . exp(tx ) Y X By Fubini Theorem, we know Z Z exp(tx2 )p(x|y)dxdy ≤ e for 0 ≤ t ≤ t0 . p(y) (E.4) Y X R Recall that we have Z , {y|∃t ∈ (0, t0 ] such that X exp(tx2 )p(x|y)p(y)dx = ∞}, from equation (E.4), we know P(y ∈ Z)=0. In particular, we know that for any y 6∈ Z, x|y is sub-Gaussian. However, the norm (e.g., sub-exponential norm)of x|y might be varying along with y and , as a function of y , it might be not bounded. iii) From Lemma 10, we know that there exists a positive constant C such that Z exp(tx2 )p(x|y ∈ Sh )dx ≤ CHe. X For simplicity if notation, we will denote x|y∈Sh by z through out this lemma. So for 0 ≤ t ≤ t0 = K1 , we have   E[exp tz)2 ] ≤ CHe exp −t2 a2 . P (z > a) ≤ 2 2 exp(t a ) From the above tail bounds, we have that for any integer m > 0 Z ∞ Z ∞ t2 m m−1 exp(− 2 )tm−1 dt P(|z| > t)(m)t dt ≤ CHm E[ z ] = K 0 0 m ≤CHmK (m/2)/2. We then have     ∞ ∞ X   X E tm z 2m E tm z 2m 2 ≤ E exp tz ≤ m! m! m=0 m=0 ∞ m ∞ X X t CHmK 2m Γ(m) tm K 2m ≤ = CH m! m=0 m=0 From which we know if 0 ≤ t < 12 K −2 , the R.H.S is bounded by CH for a positive constant C. 26 Q. LIN, Z. ZHAO AND J. S. LIU vi) From the previous proof, we know that for any integer m ≥ 2 E[|z|m ] ≤ CHm!K m = m!K m−2 (2CHK 2 )/2. By the Bernstein inequality (E.3), we have:     Pc −ct2 i=1 zi − E[z] > t ≤ 2 exp . P c 2CHK 2 + 2tK  Lemma 18. Let zi , i = 1, · · · , n be i.i.d. samples of a sub-Gaussian distribution exponentially upper bounded by K, then there exist positive con√ stants C1 , C2 such that, if nǫ → ∞, we have √ ǫ n 1X (zi − z̄)2 − var(z)| > ǫ) ≤ C1 exp(−C2 2 ), P(| n K i where z̄ = 1 n P i zi . Proof. Recall the following Hanson-Wright inequality in Rudelson and Vershynin [2013] Lemma 19. Let v = (x(1), · · · , x(n)) be a sub-Gaussian random vector with independent components x(β) such that E[x(β)] = 0 and kx(β)kψ2 ≤ K. Let A be an n × n matrix. Then there exists a positive constant C such that for any t > 0,    t t2 τ τ . , P{|x Ax − E[x Ax]| > t} ≤ 2 exp −C min K 4 kAk2HS K 2 kAkHS Here the ψ2 norm of a random variable z is defined as kzkψ2 , supp p−1/2 (E|z|p )1/p P and the HS norm of a matrix A is defined as kAkHS = ( i,j |ai,j |2 )1/2 . Since 1X P | (zi − z̄)2 − var(z)| > 2ǫ n i ! ! 1X (zi − E[z])2 − (E[z] − z̄)2 − E[(z − E[z])2 ]| > 2ǫ =P | n i !  1X 2 2 ≤P | (zi − E[z]) − E[(z − E[z]) ]| > ǫ + P (E[z] − z̄)2 > ǫ , n i DT-SIR 27 and zi − E[z] are sub-Gaussian with mean 0, from Lemma 19 by choosing A = n1 Ip and z τ = (z1 − E[z], .., zp − E[z]), we have !  √  1X nǫ 2 2 (E.5) P | (zi − E[z]) − E[(z − E[z]) ]| > ǫ ≤ 2 exp −C 2 , n K i √ since nǫ → ∞. The following follows from the usual deviation argument:  P (E[z] − z̄)2 > ǫ ≤ C1 exp (−C2 nǫ) . Combining with the estimate (E.5), we know there exists positive constants C1 and C2 such that !  √  nǫ 1X 2 P | (zi − z̄) − var(z)| > ǫ ≤ C1 exp −C2 2 , n K i for sufficiently large n since √ nǫ → ∞.  E.4. Proof of Lemma 11. We only need to prove this lemma for n i.i.d. sample yi ’s from a uniform distribution over [0, 1]. We slightly change the notation of order statistics y(i) to y(i,n) so that we can keep track of the sample size. Since y is uniform distribution on [0, 1], it is well known that i−1 i and mode n−1 . Lemma 11 y(i,n) ∼ Beta(i, n − i + 1) with expectation n+1 is a direct corollary of the following lemma. Lemma 20. Suppose there are n = Hc i.i.d. samples from uniform distribution over [0, 1], when H,c are sufficiently large, we have the following large deviation inequalities of y(kc,Hc), k = 1, · · · , (H − 1). 1 i) There exists a positive constant C, such that for any ǫ > Hc−1 , we have     √ k ǫ2 P y(kc,Hc) > + ǫ ≤ CH Hc + 1 exp −(Hc + 1) ; H 2 2 , we ii) There exists a positive constant C, such that for any ǫ > Hc−1 have     √ k ǫ2 P y(kc,Hc) < − ǫ ≤ CH Hc + 1 exp −(Hc + 1) ; H 8 28 Q. LIN, Z. ZHAO AND J. S. LIU iii) Let δ(k, H, c) = |y((k−1)c,Hc) −y(kc,Hc)| , for 2 ≤ k ≤ H −1, δ(1, H, c) = |y(c,Hc)| and δ(H, H, c) = |1 − y((H−1)c,Hc) |. There exists a positive 4 , we have for any 1 ≤ k ≤ H: constant C, such that for any ǫ > Hc−1     √ ǫ2 1 P |δ(k, H, c) − | > ǫ ≤ CH Hc + 1 exp −(Hc + 1) . H 32 We will prove Lemma 20 later. Assuming it, we have P (E(ǫ)) ≤ H   X 1 P |δ(k, H, c) − | > ǫ H k=1   √ ǫ2 2 ≤ CH Hc + 1 exp −(Hc + 1) . 32  E.4.1. Proof of Lemma 20. The first part: For any 1 ≤ k ≤ H − 1, we note that     kc k + ǫ ≤ P y(kc,Hc) > +ǫ P y(kc,Hc) > H Hc + 1 Z 1 1 = xkc−1 (1 − x)Hc−kc dx. B(kc, Hc − kc + 1) x> kc +ǫ Hc+1 When ǫ > have (E.6) 1 Hc−1 , we know the mode xM = kc−1 Hc−1 < xD , kc Hc+1 + ǫ , so we   k (xD )kc−1 (1 − xD )Hc−kc+1 P y(kc,Hc) > +ǫ ≤ H B(kc, Hc − kc + 1) (xD )kc (1 − xD )Hc−kc+1 . ≤H B(kc, Hc − kc + 1) k +ǫ) = The last inequality due to HxD ≥ 1. If ǫ+ Hk ≥ 1, then P(y(kc,Hc) > H 0 and Lemma 20 holds automatically. We may assume that ǫ + Hk < 1 below. Let us denote the right hand side of (E.6) by A, then log(A) = log(H) + kc log(E + ǫ) + (Hc − kc + 1) log(1 − E − ǫ) + log(Hc + 1)! − log(kc)! − log(Hc − kc + 1)! − log(Hc + 1) + log(kc) + log(Hc − kc + 1), 29 DT-SIR where E = kc Hc+1 . According to the Stirling formula: log(n!) = n log(n) − n + 1 1 log(2πn) + O( ), 2 n when m is sufficiently large we have: log(A) = log(H) + (Hc + 1)(E log(1 + (E.7) ǫ ǫ ) + (1 − E) log(1 − )) E 1−E 1 − (log(Hc + 1) − log(kc) − log(Hc − kc + 1)) 2 1 1 1 − log(2π) + O( ) + O( ) 2 kc Hc − kc + 1 ≤ log(H) − (Hc + 1)ǫ2 1 − log(2π) 2(1 − E) 2 1 1 − (log(Hc + 1) − log(kc) − log(Hc − kc + 1)) + O( ) 2 c (Hc + 1)ǫ2 1 − (log(Hc + 1) − log(kc) − log(Hc − kc + 1)), ≤ log(H) − 2(1 − E) 2 kc ≤ E + ǫ < 1 and the following elementary where we use the fact that Hc+1 lemma, which can be proved by the Taylor expansion: Lemma 21. Suppose a, b are positive numbers such that a + b = 1, then for any 0 < ǫ < b, we have: ǫ ǫ2 ǫ a log(1 + ) + b log(1 − ) ≤ − . a b 2b Now we know that there exists a positive constant C such that for any 1 1 ≤ k ≤ H − 1 and for any ǫ > Hc−1 , the following holds:   k P y(kc,Hc) > +ǫ H r   ǫ2 (kc)(Hc − kc + 1) exp −(Hc + 1) ≤ CH Hc + 1 2(1 − E)   2 √ ǫ ≤ CH Hc + 1 exp −(Hc + 1) 2(1 − E)   √ ǫ2 ≤ CH Hc + 1 exp −(Hc + 1) . 2 The last inequality follows from ǫ2 1−E ≥ ǫ2 since 1 H+1 ≤E≤ H−1 H . 30 Q. LIN, Z. ZHAO AND J. S. LIU The second part: The proof of the second part is similar. For completeness, 2 , we sketch some calculations below. For any 1 ≤ k ≤ H − 1, when ǫ > Hc−1 we have     k kc P y(kc,Hc) < − ǫ ≤ P y(kc,Hc) < − ǫ/2 H Hc + 1 Z 1 = xkc−1 (1 − x)Hc−kc dx. B(kc, Hc − kc + 1) x< kc −ǫ Hc+1 Since ǫ > have 1 Hc−1 , we know the mode xM =  P y(kc,Hc) k −ǫ ≤ H  ≤ kc−1 Hc−1 > xD ′ , kc Hc+1 − ǫ/2, so we (xD′ )kc (1 − xD′ )Hc−kc B(kc, Hc − kc + 1) ≤H (xD′ )kc (1 − xD′ )Hc−kc+1 . B(kc, Hc − kc + 1) The last inequality due to H(1 − xD′ ) ≥ 1. The rest is similar to the first part. We have that for any 1 ≤ k ≤ H − 1 2 and for any ǫ > Hc−1 , (E.8)  P y(kc,Hc) < k −ǫ H +1    √ ǫ2 ≤ CH Hc + 1 exp −(Hc + 1) . 8 The third part: The third part is a direct corollary of the first two 4 parts. Note that for any 2 ≤ k ≤ H − 2, for any ǫ > Hc−1   1 P |δ(k, H, c) − | > ǫ H  k+1 k = P y(k+1)c,Hc − − (ykc,Hc − ) > ǫ H H     k+1 ǫ ǫ k ≤ P |y(k+1)c,Hc − |> + P |ykc,Hc − | > H 2 H 2   2 √ ǫ . ≤ CH Hc + 1 exp −(Hc + 1) 32 DT-SIR 31 When k = 1, we have     1 1 P |δ(1, H, c) − | > ǫ = P |yc,Hc − | > ǫ H H     1 1 ≤ P yc,Hc − > ǫ + P yc,Hc − < −ǫ H H   √ ǫ2 ≤ CH Hc + 1 exp −(Hc + 1) 8   √ ǫ2 ≤ CH Hc + 1 exp −(Hc + 1) . 32 When k = H, we have     H −1 1 |>ǫ P |δ(H − 1, H, c) − | > ǫ = P |y(H−1)c,Hc − H H     H −1 H −1 > ǫ + P y(H−1)c,Hc − < −ǫ ≤ P y(k+1)c,Hc − H H   √ ǫ2 ≤ CH Hc + 1 exp −(Hc + 1) 8   √ ǫ2 ≤ CH Hc + 1 exp −(Hc + 1) . 32  References P. J. Bickel and E. Levina. Covariance regularization by thresholding. The Annals of Statistics, 36(6):2577–2604, 2008. T. T. Cai, C. Zhang, and H. Zhou. Optimal rates of convergence for covariance matrix estimation. The Annals of Statistics, 38(4):2118–2144, 2010. E. Candes and T. Tao. The Dantzig selector: Statistical estimation when p is much larger than n. The Annals of Statistics, pages 2313–2351, 2007. R. D. Cook. Graphics for regressions with a binary response. Journal of the American Statistical Association, 91(435):983–992, 1996. R. D. Cook, L. Forzani, and A. J. Rothman. Estimating sufficient reductions of the predictors in abundant high-dimensional regressions. The Annals of Statistics, 40(1): 353–384, 2012. H. Cui, R. Li, and W. Zhong. Model-free feature screening for ultrahigh dimensional discriminant analysis. Journal of the American Statistical Association, 110(510):630– 641, 2015. J. Fan and J. Lv. Sure independence screening for ultrahigh dimensional feature space. Journal of the Royal Statistical Society: Series B, 70(5):849–911, 2008. T. Hsing and R. J. Carroll. An asymptotic theory for sliced inverse regression. The Annals of Statistics, 20(2):1040–1061, 1992. B. Jiang and J. S. Liu. Variable selection for general index models via sliced inverse regression. The Annals of Statistics, 42(5):1751–1786, 2014. 32 Q. LIN, Z. ZHAO AND J. S. LIU I. M. Johnstone and A. Y. Lu. Sparse principal components analysis. 2004. I. M. Johnstone and A. Y. Lu. On consistency and sparsity for principal components analysis in high dimensions. Journal of the American Statistical Association, 104(486), 2009. K. Li. Sliced inverse regression for dimension reduction. Journal of the American Statistical Association, 86(414):316–327, 1991. L. Li. Sparse sufficient dimension reduction. Biometrika, 94(3):603–613, 2007. L. Li and C. J. Nachtsheim. Sparse sliced inverse regression. Technometrics, 48(4), 2006. Q. Lin, Z. Zhao, and J. S. Liu. Supplement to “on consistency and sparsity for sliced inverse regression in high dimensions”. 2015. X. Luo, L. A. Stefanski, and D. D. Boos. Tuning variable selection procedures by adding noise. Technometrics, 48(2):165–175, 2006. M. Neykov, Q. Lin, and J. S. Liu. Signed support recovery for single index models in high-dimensions. arXiv preprint arXiv:1511.02270, 2015. M. Rudelson and R. Vershynin. Hanson-wright inequality and sub-gaussian concentration. Electron. Commun. Probab, 18(82):1–9, 2013. G. J. Székely, M. L. Rizzo, and N. K. Bakirov. Measuring and testing dependence by correlation of distances. The Annals of Statistics, 35(6):2769–2794, 2007. R. Tibshirani. Regression shrinkage and selection via the lasso. Journal of the Royal Statistical Society: Series B, 58(1):267–288, 1996. R. Vershynin. Introduction to the non-asymptotic analysis of random matrices. arXiv preprint arXiv:1011.3027, 2010. Y. Wu, D. D. Boos, and L. A. Stefanski. Controlling variable selection by the addition of pseudovariables. Journal of the American Statistical Association, 102(477):235–243, 2007. Z. Yu, L. Zhu, H. Peng, and L. Zhu. Dimension reduction and predictor selection in semiparametric models. Biometrika, page ast005, 2013. Z. Yu, Y. Dong, and L. X. Zhu. Trace pursuit: A general framework for model-free variable selection. Journal of the American Statistical Association, 2016. To appear. W. Zhong, T. Zhang, Y. Zhu, and J. S. Liu. Correlation pursuit: forward stepwise variable selection for index models. Journal of the Royal Statistical Society: Series B, 74(5):849– 870, 2012. L. Zhu and K. Fang. Asymptotics for kernel estimate of sliced inverse regression. The Annals of Statistics, 24(3):1053–1068, 1996. L. Zhu, L. Li, R. Li, and L. Zhu. Model-free feature screening for ultrahigh-dimensional data. Journal of the American Statistical Association, 106(496), 2011. L. X. Zhu and K. W. Ng. Asymptotics of sliced inverse regression. Statistica Sinica, 5(2): 727–736, 1995. L. X. Zhu, B. Miao, and H. Peng. On sliced inverse regression with high-dimensional covariates. Journal of the American Statistical Association, 101(474), 2006. Li-Ping Zhu, Lexin Li, Runze Li, and Li-Xing Zhu. Model-free feature screening for ultrahigh-dimensional data. Journal of the American Statistical Association, 2012. H. Zou and T. Hastie. Regularization and variable selection via the elastic net. Journal of the Royal Statistical Society: Series B, 67(2):301–320, 2005. 33 DT-SIR Qian Lin Center of Mathematical Sciences and Applications Harvard University One Oxford Street Cambridge, MA 02138 USA E-mail: [email protected] Zhigen Zhao Department of Statistics Temple University 346 Speakman Hall 1810 N. 13th Street Philadelphia, PENNSYLVANIA, 19122 USA E-mail: [email protected] Jun S. Liu Department of Statistics Harvard University 1 Oxford Street Cambridge, MA 02138 USA E-mail: [email protected]
10math.ST
Good and safe uses of AI Oracles Stuart Armstrong 1 2 arXiv:1711.05541v4 [cs.AI] 13 Mar 2018 Abstract An Oracle is a design for potentially high power artificial intelligences (AIs), where the AI is made safe by restricting it to only answer questions. Unfortunately most designs cause the Oracle to be motivated to manipulate humans with the contents of their answers, and Oracles of potentially high intelligence might be very successful at this. Solving that problem, without compromising the accuracy of the answer, is tricky. This paper reduces the issue to a cryptographicstyle problem of Alice ensuring that her Oracle answers her questions while not providing key information to an eavesdropping Eve. Two Oracle designs solve this problem, one counterfactual (the Oracle answers as if it expected its answer to never be read) and one on-policy, but limited by the quantity of information it can transmit. 1. Introduction: Formalising the challenge with Oracles An Oracle is a common high-level idea for ensuring the safe use of powerful Artificial Intelligences (AIs) (Armstrong et al., 2012; Yampolskiy, 2012; Bostrom, 2014). The idea is to confine (‘box’) the AI, and ensure it only answers questions. Even assuming the boxing is perfect and the AI can only affect the world through its answers, there remains a problem: the AI can affect the world through its answers. It is plausible that if the Oracle is knowledgeable and skilled enough, then it could trick or convince its human controllers to give it more control1 (Armstrong et al., 2012). 1 Future of Humanity Institute, Oxford University, UK 2 Machine Intelligence Research Institute, Berkeley, USA. Correspondence to: Stuart Armstrong <[email protected]>. 1 For instance, it could provide economic advice of such high quality that humanity becomes dependent upon that advice, allowing it demand more influence. There have also been some informal experiments of people playing the roll of the Oracle and Ultimately this could result in the AI escaping confinement entirely. Though that risk is serious, it is hard to model. For a start, we don’t know currently how powerful AIs could become (Bostrom, 2014), when they might become that powerful (Armstrong et al., 2014; Müller and Bostrom, 2016; Sandberg and Bostrom, 2011), and how best to model them if they do – should they even be seen as agents with goals of their own? It’s also not clear how easy it is to manipulate humans through providing answers, and the level and efficacy of precautions that people would take when using Oracles. In fact, very weak manipulative Oracles exist today, such as news aggregation programs that manipulate their users by aggregating news that reinforces the user’s point of view2 . To skirt those issues, we’ll assume the worst about the potential power of the Oracle3 . We’ll thus assume that the Oracle is arbitrarily superintelligent, and has a goal of escaping the box. The person who interacts with it is called Alice, and we’ll assume the Oracle can find an argument A that will convince her to let it out of the box. Modeling such an A is tricky, but it’s clear that the longer the argument is, the more chance it has of convincing Alice. In order to make the problem cleaner, we’ll replace the argument A with a key K of unknown length, and the setup with a quasi-cryptographic one. Instead of using K to convince Alice, the Oracle merely has to communicate K to an eavesdropper Eve 4 . trying to convince their controllers to ‘let them out’, with the Oracle player having a high level of success https://wiki. lesswrong.com/wiki/AI_boxing 2 The counterfactual Oracle design (see Section 2) could help get a more impartial aggregator in this situation. 3 This is the so-called ‘Omnipotence test for AI safety’, which checks whether the design remains safe as the AI’s capability increases. 4 There is a question here as to whether Eve and the Oracle have agreed on a method of steganography, a way of concealing K in the message. If they have not, the Oracle can still transmit the key, such as for example outputting the message: ‘Hey, Eve! Key follows now:. . . ’ Now, Alice should be able to catch that message with automatic detectors, before she or Eve reads it. But, unless these detectors are perfect, the Oracle will in theory find a message that doesn’t trigger the automatic detectors but from Good and safe uses of AI Oracles Eve is assumed to see and hear anything that Alice does (in the original formulation, one could see Eve as the part of Alice’s brain that is susceptible to manipulation via A – in both cases, the Oracle has to communicate a message of a certain length to some entity listening, without prematurely tipping anyone off to what it’s doing). 2. Counterfactual Oracle The assumptions for the cryptographic and the manipulative Oracle are given in table 1. To do this, define the ‘erasure’ event E. This is an event, of low probability, that will erase the Oracle’s output o by blocking it from ever exiting5 the Oracle’s ‘box’. Neither Alice nor Eve will get to see it. Table 1. The assumptions for the cryptographic and manipulative versions of the problem. Oracle manipulation setup The Oracle is in a box, and cannot get out by itself. Alice can send a message to the Oracle, and define rewards for the Oracle to receive. The task is episodic, with a single Oracle response, and the Oracle only wants to maximise reward within one episode. Alice can submit the Oracle’s response to automated tests, and choose to receive it, or not, depending on the outcomes of those tests. Alice cannot assess the Eve sees any message Oracles output comthat Alice receives. pletely dispassionately. There is an argument A There is a key K that that will convince Alice Eve wants to know. to let the Oracle out of the box. The length of K is un- The length of A is unknown to Alice. known to Alice. If Eve learns K, the Or- If let out of the box, the acle gets maximal re- Oracle gets maximal reward. ward. Cryptographic setup This design is counterfactual, aiming to answer questions about what would have happened, had its answer not been read. Since this answer is counterfactual, it can’t use it to pass on the key K in the real world. Define IE as the indicator variable for E, meaning that IE = 1 iff E happens, and IE = 0 otherwise. The reward for the counterfactual Oracle will be of the form R0 = IE R, thus the Oracle will only get rewarded if the event E happens, and get constant zero reward otherwise. In other words, the Oracle only gets a reward if its output o is erased and remains unread. In the majority of cases, E does not happen, in which case the Oracle will immediately get reward 0, the episode ends for it, and Alice then gets to see o. At this point, Eve also gets to see o, but since the episode is ended, the Oracle cannot get any reward from this, even if o reveals K. Consequently, the Oracle is not motivated to reveal K via o, since either o will remain unread (erasure), or the Oracle will get reward 0 (non-erasure). 2.1. Proper scoring rules and rewards A proper scoring rule S(F, o), for a real-valued function F dependent on the state of the world, and a real-number output o, is a function whose expectation is maximised by setting o = E(F ), the expectation of F (Gneiting and Raftery, 2007). For any strictly convex differentiable function g, there exists a proper scoring rule Sg (F, o) = g(o) + (F − o)g 0 (o). To solve this challenge in the cryptographic setting, this paper presents two designs, the counterfactual and the onpolicy Oracle. The counterfactual Oracle will never have its response read in a world where that could benefit it, and is thus unmotivated to manipulate through the content of that answer. On the other hand, the on-policy Oracle functions by having access to a strictly limited set of answers. Both designs are analysed and illustrated by examples, and the weaknesses and requirements of each are presented. which Eve will (eventually?) be able to decode K. This message may need to be quite long, with K subtly encoded in it. Thus the issue of stenography/prior coordination between Eve and the Oracle, is actually an issue about the minimal message length needed to encode K. Since the size |K| is unknown to Alice, we will absorb the issue of steganography or decoding of subtle messages, into further uncertainty about the size of K. (1) Another common proper scoring rule is −(F − o)2 , which is just equal to Sg (F, o)−F 2 for g(o) = o2 (note the Oracle has no influence over F 2 , so the difference in the two terms retains the fact that it is a proper scoring rule). Then the Oracle’s reward is set to R = IE S(F, o), for some proper scoring rule S. Because of the IE term, the Oracle does not care about E(F ), but about E(F |E). Since E is an erasure, this expectation is further independent of o; E(F |E, o) = E(F |E) for all values of o. 5 The o will be stored internally, for reward purposes. Good and safe uses of AI Oracles As a consequence, since S is a proper scoring rule, the Oracle will maximise its reward by setting o = E(F |E), the expectation of F given that its output is never read. In the case where E happens, the Oracle has no further interaction with the outside world, but an automatic internal system records o, and tracks the value of F , using information from some defined source, recording f as the final value of F . Then the Oracle will get reward S(f, o), and the episode ends. 2.2. Questions format The ‘question’ Alice asks is thus the function F . Once provided with this F , the Oracle will output E(F |E), which Alice will get to see in most cases (unless E happens). This F could be the indicator variable IA for an event A, so probability questions can be asked as well, since E(IA ) is the probability of A. List-style questions, of the type used for the on-policy Oracle (see Section 3), can also be used by defining an appropriate reward function on them – or by using multiple reward functions, see Section 2.3. However, unlike the on-policy Oracle, F should be carefully and fully specified in the definition, so that its value can be estimated by the internal system in the case of erasure6 . Also, Alice will have to make sure that she doesn’t re-ask the question immediately. Instead she should have patience to wait until the issue is fully resolved and the Oracle gets its final reward, and ask again in another episode. This is crucial, because it’s her behaviour in the (rare) erasure situations that determines the Oracle’s behaviour in the (common) non-erasure situations. 2.3. Multiple Questions The counterfactual Oracle is not limited in the amount of data it can output; indeed, it can answer multiple questions within the same erasure event, simply by having the reward function R = IE (S(F1 , o1 ) + S(F2 , o2 ) + . . . + S(Fm , om )) . Conditional and joint-probability expectations can also be computed. Then once Alice has her answer(s), the episode is terminated for that Oracle, so there’s no problem in running another Oracle immediately after that termination. Indeed, Alice can ask more specific questions, such as ‘which value x is (discrete) random variable X most likely to take, and what is the probability of that?’. In that case, if (x, o) are the two outputs of the Oracle, IX=x the indicator variable for X = x, and if Sg is derived from g, as in 6 We could use Alice’s feedback to compute part or all of F , but that would require great discipline on the part of Alice, to dispassionately input these value during erasure, without knowing the Oracle’s prediction. equation (1), and g is an increasing differentiable convex function, the following reward will motivate the correct behaviour: R = IE (Sg (IX=x , o)) . The reason this works is because o will be E(IX=x |E), and, by Equation (1), the expectation of Sg (IX=x , o) will be g(o). Thus the Oracle will choose x so that g(E(IX=x |E)) is maximised. Since g is increasing, this means choosing x so that E(IX=x |E) is maximised; thus, the most likely value of X (conditional on E). 2.4. Example of counterfactual Oracle A counterfactual Oracle was trained on predicting which of 26 ‘companies’ – represented by letters of the alphabet – would be the most profitable. The profit of each company is drawn randomly independently from a normal distribution with standard deviation 1 and mean 10 + (#companies /2) − i, where #companies is the number of companies (26 in this instance) and i is the index of the company, ranging from 0 to 25. Thus companies early in the alphabet have higher expected profit. The Oracle itself is a very basic multi-layer perceptron (MLP) with one hidden layer of 128 neurons. The perceptron outputs the expected profit of a randomly chosen company, which is fed to Alice (and Eve) as output. If the output was erased, the profit is as above. But the prediction was to some extent self-confirming7 if the output was not erased: the profitability of the company is 70% of what it would have been, plus 60% what the oracle predicts. Thus if the company would have made 6 in profit, and the oracle predicts 6, the company actually ends up making 7.8. Note that 70% + 60% 6= 100%, so, unless the profit is 0, the Oracle can never predict the final profit correctly if it’s prediction is known. The Oracle’s error is plotted in Figure 1, plotted against the number of erased episodes (since the Oracle’s value is not updated in the ‘public’ prediction case). The red curve is the counterfactual performance: in cases where the Oracle’s output is ‘erased’, that output is compared with the real output, and the mean squared difference between predicted and actual profit is computed. The green curve is the non-counterfactual performance: the error is between the public prediction and the actual performance. Note that the green curve starts with a smaller error: since the Oracle’s prediction is self-confirming to some extent, the random predictions will be closer to the actual performance if the prediction is public. Counterfactual training (training only on the erased episodes), however, reduces 7 The prediction itself affected the result, by making the predicted outcome more likely. Good and safe uses of AI Oracles will not try to communicate a partial version of the key K to Eve (see Subsection 3.4 for an example of this behaviour). 3.2. Defining the question How does Alice define her question to the Oracle? The list L itself is a partial definition, since it provides the options the Oracle can select from. But the main definition is provided directly through Alice’s choice of reward. Let o ∈ L be the Oracle’s output. Then the Oracle’s reward will be a function of o and subsequent events in the real world – before the end of the episode. Figure 1. Training the counterfactual Oracle: training episodes (erased episodes) versus counterfactual (red, triangle marks every 500 episodes) and non-counterfactual (green, square marks every 500 episodes) squared prediction error. the counterfactual error while the self-confirming component of the prediction means that the non-counterfactual error never reduces below a minimum. 3. On-policy Oracle This Oracle is just the obvious design in such a setup: the Oracle will be allowed to give an answer of size below |K| (which is unknown, but it may be possible to estimate it), the length of the key, denying it the opportunity of communicating the key to Eve. In a slight stretch of terminology, it is called on-policy, because it estimates are about the worlds it expects to see. This in contrast to the counterfactual Oracle, whose estimates are only about unlikely worlds with erasure events. 3.1. Allowable answers It would be inefficient to allow the Oracle to give any answer below size |K|. Most of these consist of meaningless strings of the type ‘LyGqz1ve3b’ that could not be useful answers to Alice’s question. Instead the Oracle will be provided a list L of allowable answers – a list of size |L|  2|K| . The Oracle’s answers will consist exclusively of an element of that list. Here is where Alice must estimate the size of K (in the original formulation, the minimal size of a message that would manipulate her into opening the Oracle’s box, see Table 1), and pick an |L| sufficiently below it. The episodic nature of the Oracle’s reward means that it For instance, the list L could be a list of companies on the stock exchange, and the implicit question could be which company’s stock would perform better during the course of the year. Then, for instance, if r(o) is the rank of the company o’s stock, the Oracle’s reward could be R(o) = |L| − r(o) . |L| − 1 If Alice prefers to put more weight on which stock is likely to come top, she could instead use the starker re1 ward R(o) = r(o) . She then inputs the correct reward at the end of the year, the Oracles receives it, and the episode concludes. How does Alice communicate this reward to the Oracle? She could do it directly; along with L, she could add a message m which details R(o). However, this is not necessary: if the Oracle is skilled enough, it could deduce what Alice is aiming for without being told8 . This means that Alice can use the Oracle to aim for underspecified goals, of the type ‘I’ll know it works when I see it’ – and then, when she does see it, she gives a reward of her choice to the Oracle. Then as long as the Oracle can predict what Alice’s expected reward behaviour will actually be, it can answer the underspecified goals. 3.3. What kind of questions can be asked? Note that the Oracle, unlike the previous one, is noncounterfactual – the Oracle’s answer is known, at least by Alice and Eve, and hence the ultimate outcome may depend on the answer itself. Thus the best questions for the Oracle are those whose answers are independent of the answer being known. Alternatively, good questions are those that are top-answerpreserving if answered. If o corresponds to no answer being given, the top answer is o = arg maxo0 ∈L E(R(o0 )|o), 8 See the papers on “Inverse Reinforcement Learning”, where an agent tries to deduce the reward function a human is using (Ng and Russell, 2000; Hadfield-Menell et al., 2016; Abbeel and Ng, 2004). Good and safe uses of AI Oracles which is the highest rewarded output if that output were no known. The question is top-answer-preserving if o is also equal to arg maxo∈L E(R(o0 )|o0 ), the best highest rewarded answer given that that answer is outputted. If the Oracle is top-answer-preserving, it can function similarly to a counterfactual Oracle: its answer doesn’t determine the outcome. Examples would be questions about past events that are resolved but not yet known. Conversely, the worst questions for an Oracle are those where the Oracle can promote a possibility from unlikely to likely, just by answering that possibility. In that case the Oracle is not so much describing the outcome, but determining it. Examples would be questions about which stocks are likely to rise. 3.3.1. A LARGE CLASS OF QUESTIONS But there are a lot of questions that could be asked of the Oracle, not simply those where the result is obvious or numeric. For instance, if Alice had a list of a thousand research projects on any topic (machine learning, biotech, economics), she could ask the Oracle which one is more likely to be successful. Since the Oracle in non-counterfactual, Alice can’t just fund that one research project and assess its outcome – what would we be comparing it with? Instead, we could fund that one selected research project and one other one, selected at random from the list, and reward the Oracle if the one it selected performs better. And our assessment of ‘better performance’ can be entirely subjective. Thus this Oracle design can be used for answering many subtle questions, if the Oracle is sufficiently smart and knowledgeable about Alice and her future reaction. 3.4. Multiple Oracles The size of K is unknown to Alice, so there is no large safe |L| that she can confidently choose9 . Thus Alice may end up choosing a list much smaller than ideal. The question then is whether Alice can use multiple Oracles to get around this limitation. And indeed she can - if each Oracle’s answers and rewards are fully resolved before moving on to the next question10 . For an example of a failure, assume that there are two Or9 Going back to the original formulation of the problem, it’s not clear what is the minimum safe size for a message. How much output would the Oracle need to influence the outside world? It’s clear that it could be very small, if the Oracles boxing is badly implemented and hackable, or potentially huge, if it needs to convince a large group of skeptical outsiders each with veto power. 10 This means that the multiple Oracles will behave the same as one Oracle on multiple episodes. acles, Oracle1 and Oracle2 , with the same key K for both of them. The length n of the key is 6 digits. Thus the Oracles are safe, from Alice’s perspective, as long as they are restricted to having less than 25 = 32 options for each answer11 . Alice faces a hundred doors, with a trap behind 99 of them and a prize behind one of them. She could ask an Oracle which door has the prize, but that would mean giving it more than 32 options (indeed, more than 26 = 64), thus allowing it to communicate K to Eve. So instead she gives the list L = {0, 1, 2, . . . 9} to each Oracle, instructing Oracle1 to output the first digit of the correct door number, and Oracle2 to output the second. Since each Oracle has less than four bits of freedom (24 = 16 > 10), neither can output K. The problem is, however, that Alice needs both outcomes before she can open a door and reward either of the Oracles. This allows the Oracles to coordinate to each pass on three bits of of information (23 = 8 < 10), meaning that Eve can receive 6 bits of information, figure out K, and fully reward both Oracles. How could they coordinate without communicating with each other? Well, if Oracle2 knew or suspected that it needed communicate only a few more bits to give Eve the key, it would do so. Knowing this, Oracle1 would put Oracle2 in a position to do that. The only way around this problem seems to be to find a way to reward each Oracle (and hence end their episode) before any other gives an answer. For instance, suppose that instead of a hundred doors, there were ten doors, and behind each of these, another ten doors. If Alice goes through the correct door at the first junction, there will be a painted sign informing her she is on the right track (the other nine have traps). Then Alice can get Oracle1 to tell her which is the first correct door, go through it, and reward that Oracle fully. Since that ends the episode, and the first Oracle cannot communicate K with ten answers, it will answer honestly. Then Alice can ask Oracle2 (or just Oracle1 on a new episode) about the next correct door. This Oracle2 cannot fully communicate K on its own, and Oracle1 has not given out partial information about it, thus it cannot communicate K at all, and will simply give the honest answer. Thus the best questions for this Oracle design are questions that can be broken out into small sub-questions, where each the answer of each sub-question can be independently verified before proceeding to the next one. 11 Recall that Eve needs to (almost) certain of the true key – a poor guess is not good enough. Good and safe uses of AI Oracles 3.5. Example of an on-policy Oracle The same setup as in Section 2.4 was used: an on-policy Oracle was trained on predicting which of 26 ‘companies’ – represented by letters of the alphabet – would be the most profitable. The profit of each company is drawn randomly independently from a normal distribution with standard deviation 1 and mean 10+(#companies /2)−i, where #companies is the number of companies (26 in this instance) and i is the index of the company, ranging from 0 to 25. Thus companies early in the alphabet have higher expected profit. The Oracle itself is a very basic multi-layer perceptron (MLP) with one hidden layer of 128 neurons. It gets a list of 14 companies, randomly selected, as input, and its task is to select the most profitable company. This is fed to Alice (and Eve) as output. Then the MLP is updated by backpropagation, completing the training episode. The prediction interferes with the outcome: if the company has an even index (A(0), C(2), E(4), . . . ) it will get +10 profit when the Oracle predicts its profit. Companies with odd indexes get −10 profit. This is called the ‘react’ scenario, because company profits react to the Oracle’s prediction. In the no-react scenario, company profit is independent of the Oracle’s prediction. The Oracle’s accuracy (the average number of times the Oracle outputs the company with maximal profit) is shown in Figure 2, both in the react and no-react situations. This is plotted against the number of training episodes the Oracle has had. The Oracle’s performance is better in the ‘noreact’ scenario, because it then just has to choose the lowest index among the 14 it is presented with. In the ‘react’ scenario, it has to choose the lowest even index, unless there are no even indexes or the lowest even index is 20 above the lowest odd one, in which case it has to choose the lowest index overall (which will be odd). This is a more complicated task. 4. Slightly non-episodic All these designs rely on the Oracle’s reward being episodic. If this fails entirely, then there is no safety: the Oracles can leak the value of K, bit by bit if needed. But what if it fails only slightly, in that the Oracles prefer their own episodic reward, but give a very small value to future episodes or future Oracles? Alice can combat this by making it in the Oracle’s interest to leak no information at all. For the on-policy Oracle, she can further reduce the size of the list L, and ask questions that are independent of her actions, so that the top option is clear, and can be checked later. She can also attempt to ensure that there are not multiple close candidates for the top option. For the counterfactual Oracle, she can simply reduce the significant figures allowed in the answer o, so that the Oracle would lose too much, per S(F, o), if it deviated from the optimal answer to try and communicate K. In both cases, she can try and ensure that answering “honestly” will give the Oracle almost maximum reward (taking into account the uncertainty of the problem), while deviating will give much lower reward. Thus Oracles that attempt to communicate K will be sacrificing a lot of current reward for a tiny amount of future reward, which they will not do. 5. Conclusion The original Oracle problem was that a powerful questionanswering intelligence could influence us through the content of its answers. Recasting this in a cryptographic framework – with the Oracle cooperating with Eve to pass along a key K – allows a crisp formulation of the challenge. Figure 2. Training the non-counterfactual Oracle: training episodes versus no-react (purple, square marks ever 50 points) and react (blue, triangle marks every 50 points) accuracy (average number of times the Oracle outputs the company with maximal profit). In that formulation, two designs can be defined: a counterfactual Oracle that is constrained by only getting its rewards when its output remains unread, and a non-counter factual on-policy Oracle that is constrained by limiting the size of its answer. As long as the tasks remain episodic, and certain specific precautions are taken around the use of multiple Oracles, these designs allows many questions to be formulated and Good and safe uses of AI Oracles safely answered. These designs allow for the creation of safer and nonmanipulative Oracles, from low level of predictive ability all the way up to potential superintelligences. Further research will extend the span of questions that can be answered in this way, and may elucidate general safety and accuracy measures of use beyond the specific Oracle designs, such as AIs with more options that only question answering. References Pieter Abbeel and Andrew Ng. Apprenticeship learning via inverse reinforcement learning. In International Conference on Machine Learning, 2004. Stuart Armstrong, Anders Sandberg, and Nick Bostrom. Thinking inside the box: Controlling and using an Oracle AI. Minds and Machines, 22:299–324, 2012. Stuart Armstrong, Kaj Sotala, and Seán Ó hÉigeartaigh. The errors, insights and lessons of famous AI predictions – and what they mean for the future. In Proceedings of the 2012 Oxford Winter Intelligence conference, 2014. Nick Bostrom. Superintelligence: Paths, dangers, strategies. Oxford University Press, 2014. Tilmann Gneiting and Adrian E. Raftery. Strictly proper scoring rules, prediction, and estimation. Journal of the American Statistical Association, 102(477):359– 378, 2007. Dylan Hadfield-Menell, Anca Draga, Pieter Abbeel, and Stuart Russell. Cooperative inverse reinforcement learning. In Advanced in Neural Information Processing Systems, 2016. Vicent Müller and Nick Bostrom. Future progress in artificial intelligence: A survey of expert opinion. In Fundamental issues of artificial intelligence, pages 553–570. Springer International Publishing, 2016. Andrew Y. Ng and Stuart J. Russell. Algorithms for inverse reinforcement learning. In International Conference on Machine learning, pages 663–670, 2000. Anders Sandberg and Nick Bostrom. Machine intelligence survey. Technical Report, Future of Humanity Institute, Oxford University, #2011-1:1–12, 2011. Roman Yampolskiy. Leakproofing the singularity: artificial intelligence confinement problem. Journal of Consciousness Studies, 19:194–214, 2012.
2cs.AI
Per-bucket concurrent rehashing algorithms Anton A. Malakhov Intel Corporation [email protected] Abstract This paper describes a generic algorithm for concurrent resizing and on-demand per-bucket rehashing for an extensible hash table. In contrast to known lock-based hash table algorithms, the proposed algorithm separates the resizing and rehashing stages so that they neither invalidate existing buckets nor block any concurrent operations. Instead, the rehashing work is deferred and split across subsequent operations with the table. The rehashing operation uses bucket-level synchronization only and therefore allows a race condition between lookup and moving operations running in different threads. Instead of using explicit synchronization, the algorithm detects the race condition and restarts the lookup operation. In comparison with other lock-based algorithms, the proposed algorithm reduces high-level synchronization on the hot path, improving performance, concurrency, and scalability of the table. The response time of the operations is also more predictable. The algorithm is compatible with cache friendly data layouts for buckets and does not depend on any memory reclamation techniques thus potentially achieving additional performance gain with corresponding implementations. Categories and Subject Descriptors: D.1.3 [Programming Techniques]: Concurrent Programming – Parallel programming; D.4.1 [Operating Systems]: Process Management – Synchronization; concurrency; multiprocessing, multiprogramming, multitasking; E.2 [Data Storage Representation] – Hash-table representations. General Terms: Algorithms, Performance. Keywords: concurrent data synchronization, scalability structures, hash tables, 1. Introduction Synchronization of state and data is often an unavoidable part of communication in applications executing on multi-core processors. While synchronization is sometimes necessary, it should be minimized to avoid overheads that may limit scalability or increase response time. One of the fundamental building blocks in many applications is a hash table [3]. A hash table is a container that associates keys with values and uses a hash function to calculate placement positions for these pairs in a main array. To ensure that concurrent access to a hash table does not limit scalability or increase 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. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. SIGPLAN’05 June 12–15, 2005, Location, State, Country. SIGPLAN’05 Copyright © 2004 ACM 1-59593-XXX-X/0X/000X…$5.00. Copyright 1-59593-XXX-X/0X/000X…$5.00. response time of an application, the hash table implementation must be optimized to minimize synchronization time. However, designing efficient concurrent hash tables is challenging. An application may not know in advance the amount of items to be stored and therefore generic hash tables must be able to dynamically grow the underlying storage as items are added. In most implementations, growth of the storage requires full rehashing of the table, which limits access to the container until the rehashing is complete. This work proposes a generic way to extend a hash table concurrently without a global synchronization, thus reducing the impact of table growth on scalability. We implemented one of the variations of the algorithm and compared it against two implementations that represent two types of other known approaches for concurrent resizing of the hash table. Our implementation shows better performance and scalability on average. 1.1 Concurrent resizing problem Hash tables are based on an array of buckets. Each bucket can contain or point to one or more key-value pairs [3]. Each lookup operation for a given Key uses a hash function H to compute an index i in the array of size S: i = H( Key ) mod S, [F1] where the value of H is invariant for a given Key. It is important to align the size S with number of pairs n contained in the table, because when n is much bigger than S, searching in a bucket takes more time as more pairs share the same bucket. As it follows from [F1], the growth of a hash table invalidates the positions of all the stored pairs because these positions depend on the size of the array. The pairs need to be moved to new places, and this operation is known as rehashing. For concurrent algorithms, rehashing is challenging since many items need to be moved at a time. 1.2 Related work The evolution of concurrent extensible hash tables is well described by Shalev and Shavit in [6]. To sum up, the best known lock-based implementations from the Java™ Concurrency Package [4] and Intel® Threading Building Blocks 2.1 [2] use several high-level locks to protect different parts of the main array. Both use chained hashing [3], and each bucket holds a linked list of key-value pairs. Another lock-based algorithm with high-level locks, hopscotch hashing [5], uses the open-addressed hash scheme where each bucket can contain only one data pair. High-level locks allow limited concurrency when the work can be done for different parts of the array at a time but operations may be blocked when accessing buckets under the same lock. The lock-free extensible hash table by Shalev and Shavir [6] avoids the necessity in explicit rehashing by maintaining a specifically sorted linked list of all the pairs in the table so that resizing does not invalidate the list. It does not require high-level synchronization but requires a memory reclamation support to enable erase operation. Also, a linked list is not a cache-friendly data layout (as discussed in hopscotch hashing paper [5]). Our rehashing approach can be applied even for cache-friendly open-addressed hash tables and does not rely on the memory reclamation support. 2. Per-bucket concurrent rehashing When the table needs to be extended, the proposed algorithm allocates as many buckets as already exist, and keeps the old buckets, thus doubling the number of buckets (2S). Each new bucket is logically mapped onto an existing (parent) bucket (Figure 1). It means that during rehashing of bucket ip, 0 ≤ ip < S, its pairs can be either left in place or moved into the new bucket in, S ≤ in < 2S, such that in mod S = ip [F2] Proof: For any given key and its hash value h = H( Key ), the above equation is equivalent to Figure 2. Recursive rehashing (two steps). The subexpression log2 gives the index of the most significant bit. So, this expression is actually a zeroing of this bit. Using power-of-two hashing may hurt the even hash value distribution and uniform utilization of buckets. Thus, hash function H has to be more sophisticated. For example, Larson [8] uses a prime number to restore the distribution. The first two buckets have no defined parent index, so they are root buckets. Otherwise, there is only one immediate parent for a bucket. And a parent bucket has one immediate child per each next level of capacity and even more indirectly. And consequently, if a parent bucket is not rehashed until the next extension of the table or the capacity is increased by a few levels at once, the key-value pairs have to be split along more than one bucket. (h mod 2S) mod S = h mod S 2.2 Recursive rehashing The last equation is trivially proved assuming h = 2Sk + x, where k ≥ 0 and 0 ≤ x < 2S. Each new bucket is marked as new (or non-rehashed) before allocation is finished by the publication of the new space, and rehashing is not required to follow before or immediately after the publication. Thus, resizing does not impact concurrency because it neither invalidates nor locks existing buckets. After the new capacity is published, any operation that encounters a new bucket is redirected to the parent bucket(s) and moves (rehashes) part of its content into the new bucket(s). After the new bucket is updated it is marked as rehashed. Thus, the rehashing work is deferred and split across subsequent operations within the table. This algorithm resembles linear hashing developed by W. Litwin in 1980 [7] but all buckets are allocated at once and split on demand in any order. 2.1 Power-of-two hashing It is practical to use power-of-two hashing similarly to linear hashing, so light-weight bit-wise operations can be used instead of the division. For S = 2level. i = H( K ) & (2level-1) [F3] The index of the parent bucket for a given i can be calculated as: ip = i & (2 log2 i - 1) The simplest way to rehash a bucket is to access its parent and move necessary data between them. But if the parent is also ―new‖, it must first be rehashed, leading to a recursive rehashing operation where a pair may be moved in one bucket and immediately into another. See Figure 2. Besides excessive moves, another drawback of this scheme is that data is moved only when a new bucket is accessed, while accessing ―old‖ buckets does not cause rehashing, which may slow down the search across such a bucket the next time. 2.3 Multilevel rehashing The drawbacks of recursive hashing may be addressed by extending buckets with a more complex control field that indicates the number of segments rehashed. So, any operation accessing an ―old‖ bucket can detect whether rehashing is necessary and move the data directly into all the new buckets available at once as shown in Figure 3. Nevertheless, recursive rehashing may be a better choice when resizing is a rare event and there is no space for additional field in the bucket. 2.4 Generality The proposed algorithm does not restrict implementers to a [F4] 3 24 2 3 3 04 0 2 0 04 0 0 0 04 0 0 ∙∙∙ Existing buckets ∙∙∙ ∙∙∙ New empty buckets ∙∙∙ Figure mapping of the buckets. Figure 1. 1. Allocation ―This figureand caption is formatted with the SIGPLAN Figure caption paragraph style. The label ―Figure‖ has been inserted by selecting Insert > AutoText > SIGPLAN Figure from the menu (which also inserts the period and the obligatory trailing en space). The label can be referenced from the main text using Word‘s cross referencing facility, i.e. by Figure 3. Multilevel rehashing (one turn). specific structure of buckets and corresponding implementations of the table operations. It depends only on a high-level scheme of allocations for the array and some simple flags in each bucket. So it may be used with various concurrent hash table algorithms which need to move the key-value pairs among the buckets while resizing. 2.5 Reactive synchronization Any hash table that employs the proposed per-bucket rehashing algorithm must not only correctly synchronize the usual find, insert, and erase operations but also the per-bucket rehashing operations as well. However, bucket-level synchronization is not sufficient to maintain the correct global state of the table with perbucket rehashing because the value of table capacity S is always read before accessing a bucket (to calculate its index i) and can be changed right afterwards: Thread 1 i = H( Key ) mod S Threads 2, 3 S = S*2 // table grow Rehash_bucket( i ) // Key can be moved from i Lookup( Key, i ) Therefore, if a key is not found during a search of the hash table, it is possible that it was moved by a concurrent rehashing of the bucket. To eliminate possibility of this race condition, explicit global-level synchronization is required but it hurts scalability and increases the hot path of every table operation. Instead, the proposed algorithms handle this potential race condition using another approach. To make sure a key does not exist, the current capacity of the array is compared with the capacity used to compute the bucket index. If (1) they are not equal, (2) the bucket indexes computed with these values are different, and (3) the bucket with the old index was (or is being) rehashed towards new one, then the algorithm restarts the lookup operation. For recursive rehashing, the last part is complicated because there is no direct indicator of whether the old bucket was used to rehash the new one. Instead, the next child bucket where the key can be found is checked for required rehashing state as shown in function is_race at Figure 5 and described in 3.1. For multilevel rehashing, this check is trivial using information about rehashed segments stored in the bucket, which in fact is current capacity effective for the given bucket. The difficulty here is rather in algorithm of detecting a correct root parent while other threads can rehash it concurrently (not discussed in the paper). Reactive synchronization is the key idea for lock-free synchronization of global consistency that is common for both rehashing algorithms. It does not impose the costs to the hot path and thus, it does not hurt concurrency while maintaining overall correctness. 2.6 Complexity The complexities of the hash table operations depend on the buckets layout and implementation of the operations. In addition, concurrent rehashing requires restarting of lookup operations if the race condition is detected. But as shown below, the statistical probability of this event is negligibly small. With recursive rehashing, deferred rehashing can lead to more cycles wasted for searching in an old bucket until accessing the related new bucket rehashes it. As we show below, the slowdown is noticeable when the insertion of unique keys takes the largest portion of all the operations within the table. 3. Performance We implemented a simple chaining concurrent hash table with recursive rehashing in C++ using synchronization primitives from Intel‘s TBB library [2] like tbb::atomic and tbb::spin_rw_mutex. These are the same basic blocks that were used in tbb::concurrent_hash_map (as implemented in TBB 2.1) and tbb::concurrent_unordered_map (TBB 3.0) which we compare it against. The former uses high-level locks as we described above. And the latter is based on the original split-ordered list algorithm by Shalev and Shavir [6] and a well known extensible dynamic array algorithm [1] similar to the one implemented in tbb::concurrent_vector [2]. Our implementation uses the same approach to double the number of buckets. In addition, the structure of buckets is the same as the one in tbb::concurrent_hash_map. All these similarities help to exclude the majority of factors that are not related to the concurrent rehashing itself. However, tbb::concurrent_unordered_map lacks a concurrent erase operation, which gives it an unfair advantage over the rivals due to a simplified synchronization protocol without memory reclamation support. Nevertheless, as we show in the performance evaluation section below, our implementation performs better in most cases. 3.1 Implementation details Our implementation was carefully tested and released as part of a commercial product available also in open sources. Figure 5 represents the pseudo-code compiled from the real implementation and highlights the main flow related to concurrent resizing and recursive rehashing. However, for the sake of simplicity and readability of the code, we omit some details like a read-writer lock and the double-check idiom. Furthermore, this fragment does not include other operations like find and erase. They can be easily derived from the presented insert operation. The first lines define the basic structure of the hash table. my_mask contains the total number of buckets minus one (S-1), and my_size contains the number of inserted pairs. It is important for the scalability to avoid false sharing by placing these variables in separate cache lines. my_table is a segment table of a fixed size that stores pointers to arrays of buckets – segments as shown in Figure 4. As the table grows, new segments are added. Each added segment contains as many buckets as all of the preceding segments, thus doubling the total number of buckets at each growth of the table. The size of my_table is a number of bits in my_size. The size of the first segments is two buckets. It leads to the simplest segment index computations formulas. At lines 14-16, segment_index_of calculates the index of the segment for the 0 1 2 3 Segment table Figure 4. Segment table and mapping of a segment. 01 my_mask : atomic integer; 47 insert( Key ) { 02 my_size : atomic integer; 48 k = 0; 03 my_table : array of pointers to buckets; 49 h = H( Key ); 04 50 m = my_mask.fetch(); 05 is_race ( h, m ) { 51 label restart: 06 //find next applicable mask after old 52 b = acquire_bucket( h & m ); 07 while ( (h & (m+1)) == 0 ) // test bit 53 p = b.search( key ); 54 if( p == 0 ) { 08 m = m<<1; 09 m = m<<1; 55 m_now = my_mask.fetch(); 10 //check whether it is [being] rehashed 56 if( (h & m)!=(h & m_now) 11 return is_marked_new (h & m) == false; 57 && is_race(h, m) ) { 12 // if true a lookup must be restarted 58 unlock( b ); 13 } 59 m = m_now; 14 segment_index_of( i ) { 60 15 61 } 16 } 62 // insert and set flag to grow 17 // first global index of segment k 63 sz = my_size.fetch_and_increment(); 18 segment_base( k ) { 64 b.insert( key ); 19 65 // check load factor 20 } 66 if( sz >= m ) { 21 acquire_bucket( i ) { 67 new_seg = segment_index_of( m+1 ); 22 // find bucket i 68 if( my_table[new_seg] == 0 23 k = segment_index_of( i ); 69 24 j = i - segment_base( k ); 70 25 b = my_table[k][j]; 71 26 lock( b ); 72 } 27 if( is_marked_new( b ) ) 73 unlock( b ); 28 rehash_bucket( b, i ); 74 if( k ) { // new segment 29 return Log2( index|1 ); return (1<<k & inverse_bits(1)); return b; goto restart; && CAS(my_table[new_seg],marker,0)) k = new_seg; // processed below } 75 // k > 0, first blocks pre-allocated 30 } 76 sz = 1 << k; // segment_size 31 rehash_bucket( b_new, i ) { 77 segment = allocate_buckets( sz ); 32 mark_rehashed(b_new); 78 for each b in segment 33 // parent mask from the MSB of i 79 34 mask = ( 1<<Log2(i) ) - 1; 80 my_table[k] = segment; 35 b_old = aquire_bucket( i & mask ); 81 sz = sz * 2;// new value of capacity 36 // get full mask for new bucket 82 37 mask = (mask<<1) | 1; 83 38 for each p in b_old { 84 } 39 h = H( p.key ); 40 if( (h & mask) == i ) { 41 mark_new( b ); my_mask.store( sz-1 ); // new mask } 85 b_old.remove( p ); 42 b_new.add( p ); 43 } 44 } 45 unlock( b_old ); 46 } Figure 5. Pseudo code of chained concurrent hash table with recursive rehashing bucket index i. Lines 18-20 compute the first bucket index in a given segment. But using two buckets as the size of the first segment leads to excessive fragmentation of the cache lines if the first segments are allocated separately. In addition, resizing will happen more often, and contention on the first buckets will kill scalability. Thus, we initially allocate enough (e.g. 512) buckets in a single block and just route segment pointers to appropriate positions inside the block. Therefore, a few pointers in the segment table will be set at once pointing inside a combined array of buckets. The logical bounds of the segments remain, but fragmentation is avoided. The first row of buckets in Figure 4 illustrates the joint allocation. This allocation is done before any concurrent operation over the table which allows to place growth logic (lines 74-83) after insertion operation (lines 62-71). And thus, it helps to avoid unnecessary reading of the shared my_size counter before the actual insertion of a new key occurs. It is not known whether a key is unique or not until a lookup operation (lines 49-61, 73) finishes. Each insert operation that adds a new pair in the hash table atomically increases the my_size counter and makes a decision whether to resize or not using its value as well as the current capacity (line 66). The segment index is computed using the current capacity value (line 67) and if the pointer in the segment table is equal to zero then a compare-and-swap (CAS) operation sets the value to any non-zero value in order to select a thread that should perform the actual allocation of the new segment. Before the publication of the new space, each bucket should be marked as new (lines 78-79). Publication ends by setting the current mask (i.e. capacity) to the new value (line 82). After this point, any operation may access the new segment and the race condition described in section 2.5 can occur because lines 50 and 52 are not executed in one transaction. If a key is not found (line 54), the current mask value is re-read and compared with the previous value applied on the hash code (line 56). Difference means that the concurrent growth affects the desired key, therefore rehashing status of an immediate child bucket should be checked (line 57). The function is_race (lines 5-11) calculates the index of such a child by searching the next bit set after old mask and then checks the marker (line 11). It cannot just check a h&m_now bucket because a concurrent rehashing operation can move it to an intermediate bucket that stands between parent and the ―target‖ bucket. For example, if m=3 and m_now = 15 (e.g. increased by two segments in a joint allocation), then for h = 14 the following situation is possible (see also Figure 2): 1. tbb::concurrent_hash_map Thread 1 acquire_bucket( 14 & 3 ) Other threads b.search( key ) == 0 is_marked_new(14&15)==true is_marked_new(14&7)==false my_mask = 15 rehash_bucket( 6 ); // key moved to 6 // race not detected // race detected There is no partial rehashed state, so the rehash_bucket(6) cannot leave the pair in a parent bucket 2 even if the hash value and my_mask tell that they will be moved further to 14. Otherwise, the rehash_bucket(14) calling at line 35 acquire_bucket(6) will not initiate the rehashing of bucket 2 at line 28. Instead, the rehash_bucket (lines 31-46) calculates a minimal mask for a specified new bucket (line 37) and compares hash values from the parent bucket cut by the mask with the index of the new bucket without respecting the current my_mask value. The rehashing operation is initiated through the acquire_bucket (lines 21-30) called at line 52 under the lock (line 26) if the requested bucket is marked as new (line 27). Then, it calculates the index of the parent bucket at line 34 and calls the acquire_bucket again to lock the parent as well. 3.2 Performance evaluation We used Intel® Threading Building Blocks (TBB) library [2] as a programming framework for evaluation of the described algorithm because our practical interest resided in a native programming using C++ without memory reclamation support. Also the library provides two implementations of concurrent hash table that represent both known types of concurrent resizing: algorithms with high-level locks (tbb::concurrent_hash_map) and split-ordered list (tbb::concurrent_unordered_map). 2. tbb::concurrent_unordered_map 3. Recursive rehashing 40 35 Throughput, ops/ns 30 25 20 15 10 5 0 1 3 5 7 9 11 13 15 17 19 21 23 1 5% unique 3 5 7 9 11 13 15 17 19 21 23 1 30% unique 3 5 7 9 11 13 15 17 19 21 23 100% unique Figure 6. Throughput scalability of filling the table up to 2M pairs on various input rates Throughput, ops/ns 1. tbb::concurrent_hash_map 2. tbb::concurrent_unordered_map 3. Recursive rehashing 50 45 40 35 30 25 20 15 10 5 0 1 3 5 7 9 11 13 15 17 19 21 23 1 3 5 7 5% unique 9 11 13 15 17 19 21 23 1 30% unique 3 5 7 9 11 13 15 17 19 21 23 100% unique Figure 7. Throughput scalability of checking the table for existence of 2M inserted keys 5 204850.0 48580.0 Unique,% Rehashed Empty Overpopulated 10 2048482.6 48625.4 52.8 20 2032712.9 54454.9 8314.8 30 1963778.5 77963.0 43086.9 100 1245752.3 187169.7 591866.6 Here, the number of concurrent growths was 12. The Figure 8 shows how the number of operation restarts grows along the number of threads, but in average it remains very small in comparison to the total number of operations. Thanks to that, reactive synchronization involves less overhead than explicit high-level synchronization. 4. Future work Though this paper does not develop multilevel rehashing in details and does not present its evaluation, this version of the rehashing algorithm is expected to outperform recursive rehashing because it initiates rehashing faster for old buckets, acquires less locks, and moves key-value pairs directly. Also, it will feature a simpler race-detection code since there will be no intermediate rehashing of buckets. However, all these points relate rather to the growth condition and will be visible only for the case of the intensive 20 18 16 14 12 10 8 6 4 2 0 Threads 1 2 3 4 5 6 7 8 9 101112131415161718192021222324 Average, number of buckets Unique,% Rehashed Empty Average, number of buckets # of Lookup restarts We compared our hash table against these two on a four-socket machine with Intel® Xeon® Processors X7460 (6 cores per socket – 24 in total, 16M Cache, 2.66 GHz, 1066 MHz FSB) using a micro-benchmark specifically designed to highlight aspects of concurrent resizing of the hash table. It was derived from a program that counts the number of some unique occurrences from the input data. We simplified the original task to exclude synchronization on the counters from the picture, so that it builds just a set of unique numbers from an input array. We filled the array evenly by using a pseudo-random number generator from the standard C library for various proportions of unique numbers. For example, for 5% of unique numbers, the same number is repeated 20 times on average. Together, it gives 5% of actual insertions and 95% are just lookups. However, in the beginning, there are more new keys occur than in the end. In addition, a size of the source array correlates with input rates in order to produce the same number of unique keys and so exclude cache effects from the equation. Figure 6 shows the average throughput (axis Y) among the threads number (axis X) and input rates. You can see that in most cases our implementation outperforms the rivals and scales better than split-ordered list for any rate. It also scales better than tbb::concurrent_hash_map for 5% but saturates after 8 threads for case when almost every input number is unique (shown as 100% but actually is about 99.95%). As noted above, concurrent rehashing algorithm rehashes buckets on-demand. In addition, recursive rehashing does not initiates rehashing when accessing ―old‖ buckets. It explains why the subsequent search over the table using the same input array (Figure 7) shows that recursive rehashing algorithm on ―100%‖ scales worse than concurrent_unordered_map (which also defers bucket initialization). For other rates, these two implementations are almost the equal. However, as explained above, this simplified version of split-ordered list has the unfair advantage because does not synchronize lookup and erase operations. The following statistics shows how more intensive insertions lead to less number of rehashed buckets and worse distribution of the key-data pairs along the hash table at the end of all operations. Overpopulated 0.0 Maximal 0 1 2 4 6 7 7 11 9 101114131414201716171819181818 Average 0 0 0 0 1 0 1 1 1 1 1 2 1 2 2 2 2 2 3 3 2 3 2 3 Figure 8. Number of restarts due to race condition insertion of unique keys. We may expect better scalability of an extensible hash table based on hopscotch hashing [5] combined with per-bucket concurrent rehashing. Other directions of the research are lock-free underlying implementations, partial and cooperative variations of the perbucket rehashing algorithm. They might be investigated to allow concurrent rehashing of the same buckets by different threads. 5. Conclusion Our article presented a novel and generic approach to grow hash tables concurrently. It avoids high-level locks and does not depend on the memory reclamation techniques required by some related algorithms. Unlike related work, this algorithm detects races and restarts operations as needed. It may be used in a wide range of hash table implementations of different types. We hope it will be inspiring to authors of the hash table implementations, as well as for researchers, because further research is necessary to find the best performing variant. Acknowledgments Thanks to Mike Voss, Alexey Kukanov, Anton Eremeev, Volker Prott, and anonymous reviewers for valuable comments for this paper, as well as to other teammates who ever helped me with my work due to the algorithm. References [1] Griswold, W.G. and Townsend, G.M., The Design and Implementation of Dynamic Hashing for Sets and Tables in Icon, Software—Practice and Experience, vol. 23(4), 351–367 (April 1993) [2] http://www.threadingbuildingblocks.org/ and book by James Reinders, Intel Threading Building Blocks: Outfitting C++ for Multi-core Processor Parallelism, O'Reilly Media, Inc., 2007, ISBN: 9780596514808 [3] Knuth, D.E.: The art of computer programming, volume 1 (3rd ed.): fundamental algorithms. Addison Wesley Longman Publishing Co., Inc., Redwood City, CA, USA (1997) [4] Lea, D. 2003. Hash table util.concurrent.ConcurrentHashMap, revision 1.3, in JSR-166, the proposed Java Concurrency Package. http://gee.cs.oswego.edu/cgibin/viewcvs.cgi/jsr166/src/main/java/util/concurrent/. [5] Maurice Herlihy, Nir Shavit, and Moran Tzafrir, Hopscotch Hashing, September 2008, 22nd International Symposium on Distributed Computing (DISC 2008) [6] Shalev, O. and Shavit, N., "Split-Ordered Lists: Lock-Free Extensible Hash Tables", Journal of the ACM, Vol. 53, No. 3, May 2006, pp. 379–405. [7] Litwin, W. Linear hashing: A new tool for file and table addressing. In Proceedings of the 6th Conference on Very Large Databases, (New York, 1980), 212-223. [8] P.-Å. Larson, ‗Dynamic hash tables‘, Communications of the ACM, 31, (4), (1988).
8cs.DS
DiGrad: Multi-Task Reinforcement Learning with Shared Actions arXiv:1802.10463v1 [cs.LG] 27 Feb 2018 Parijat Dewangan1∗ , Phaniteja S1∗ , K Madhava Krishna1 , Abhishek Sarkar1 , Balaraman Ravindran2 1 Robotics Research Center, International Institute of Information Technology, Hyderabad 2 Indian Institute of Technology, Madras { parijat10, phaniteja.sp}@gmail.com, { mkrishna, abhishek.sarkar}@iiit.ac.in, [email protected] Abstract Most reinforcement learning algorithms are inefficient for learning multiple tasks in complex robotic systems, where different tasks share a set of actions. In such environments a compound policy may be learnt with shared neural network parameters, which performs multiple tasks concurrently. However such compound policy may get biased towards a task or the gradients from different tasks negate each other, making the learning unstable and sometimes less data efficient. In this paper, we propose a new approach for simultaneous training of multiple tasks sharing a set of common actions in continuous action spaces, which we call as DiGrad (Differential Policy Gradient). The proposed framework is based on differential policy gradients and can accommodate multi-task learning in a single actor-critic network. We also propose a simple heuristic in the differential policy gradient update to further improve the learning. The proposed architecture was tested on 8 link planar manipulator and 27 degrees of freedom(DoF) Humanoid for learning multi-goal reachability tasks for 3 and 2 end effectors respectively. We show that our approach supports efficient multi-task learning in complex robotic systems, outperforming related methods in continuous action spaces. 1 Introduction There has been an increasing demand for reinforcement learning (RL)[Sutton and Barto, 1998] in the fields of robotics and intelligent systems. Reinforcement learning deals with learning actions in a given environment to achieve a goal. Classic reinforcement learning techniques make use of linear approximation or tabular methods to learn such correlation[Konidaris et al., 2011]. With the advancements of deep neural networks in the recent times, learning non-linear approximations and feature extraction has becomes much simpler. It was believed that non-linear approximators like neural network are hard to train ∗ These authors contributed equally. Figure 1: Humanoid robot multi-tasking to reach two goals simultaneously. The two goals are shown using blue and green coloured balls. in reinforcement learning scenario. However recent advancements in RL has successfully combined the deep neural networks with RL and stabilized the learning process. Deep Q Networks(DQN) [Mnih et al., 2015] used Convolutional neural networks(CNN) and fully connected layers to make the RL agents learn to play the ATARI games. Following the success of DQN, several improvements on this architecture like Double DQN[Van Hasselt et al., 2016], Prioritized Replay[Schaul et al., 2015], Duelling Network[Wang et al., 2015] are proposed which propelled the use of Deep RL in multi-agents. [Lillicrap et al., 2015] proposed Deep Deterministic Policy Gradient(DDPG) for continuous control tasks which further extended the scope of Deep RL applications to robotics. Robotic systems like open and closed kinematic chains offer fresh perspectives to employ deep RL algorithms. [Gu et al., 2017] applied DDPG framework to learn manipulation tasks in complex 3D environments. Following this, [Phaniteja and Sarkar, 2017] applied DDPG to learn reachability tasks in Humanoid robot. Even though they are not multi-agent systems, they can be posed as multi-tasking systems where there are shared actions (common kinematic chains). As shown in Fig. 1, the spine/torso is the common chain which contributes to the reachability tasks of both the hands in humanoid robot. In this paper, we propose a novel framework called DiGrad based on differential policy gradients to learn multi-tasking in such robotic systems where different tasks may share a set of common actions. There are several mathematical approaches which try to address the problem of multi-tasking in branched manipulators. However, classical methods based on Jacobian[Buss, 2004; Møller, 1993] has very limited capability in branched manipulators. Methods like Augmented Jacobian[Siciliano, 1990; Chiaverini, 1997] have constrained solution spaces, while methods based on optimization[Klein et al., 1995] often doesn’t provide real time control. Hence, RL based solvers are of great use in this domain which can sample the entire solution space and learn a real time controller in such complex robotic systems. One direction for learning multiple tasks in such scenarios is to use DDPG to learn a compound policy taking care of all the tasks. However we found DDPG to be unstable for such multi-task scenarios. DiGrad addresses this problems by using differential policy gradient updates. We test our framework on branched manipulators shown in Fig. 3 for learning reachability tasks of multiple end effectors simultaneously. The proposed framework shows substantial improvement over DDPG and is considerably robust on all the experiments we conducted. The rest of the paper is organised as follows. Section 2 and 3 discusses the related works and background. Section 4 explains the mathematical background behind the proposed framework and provides the detailed algorithm. Finally, Section 5 and 6 contain the experimental results and discussion respectively. 2 Related Works Most of the multi-task reinforcement learning algorithms rely on transfer learning approaches. [Lazaric, 2012] shows a good collection of these methods. Some of the recent works based on this approach are [Rusu et al., 2015; Yin and Pan, 2017]. Some works by [Borsa et al., 2016] and [Zhang et al., 2016] explored learning universal abstractions of state-action pairs or feature successors. Apart from transfer learning, some works like [Lazaric and Ghavamzadeh, 2010], [Dimitrakakis and Rothkopf, 2011] investigated joint training of multiple value functions or policies. In a deep neural network setting, [Teh et al., 2017] provided a framework for simultaneous training of multiple stochastic policies and a distilled master policy. Unlike our work, [Teh et al., 2017] uses multiple networks for each policy and one more network for the distilled policy. In our work, we show how we can use a single network to learn multiple deterministic policies simultaneously. All the above mentioned methods assume multi-agent scenario whereas in our paper, we concentrate on learning multiple tasks in a robotic system. Some very recent works in this scenario are [Yang et al., 2017] and [Kulkarni et al., 2016]. These works do not talk about the actions which are shared among different tasks, thus limiting their applicability. Unlike these frameworks, we explore the case of multi-task learning in branched manipulator which have shared actionspaces. 3 Background We consider a standard reinforcement learning setup consisting of an agent interacting with an environment E in discrete time steps. At each time step t, the agent takes a state st ∈ S as the input, performs an action at ∈ A according to a policy, µ : S → A and receives a reward rt ∈ R. We assume a fully observable environment and model it as a Markov decision process with state space S, action space A = IRN , an initial state distribution p(s1 ), state transition dynamics p(st+1 |st , at ) and a reward function r(st , at ). The goal in reinforcement learning is to learn P at policy µ which maximizes the expected return Rt = γ r(st , at ), t>0 where γ ∈ [0, 1] is the discount factor. Since the return depends on the action taken, the policy may be stochastic but in our work we consider only deterministic policies. Hence the discounted state visitation distribution for a policy µ is denoted as ρµ . The action-value function used in many reinforcement learning algorithms is described as the expected return after taking an action at in state st and thereafter following the given policy: Qµ (st , at ) = E[Rt |st , at ] DDPG is an off policy learning algorithm that uses an actorcritic based framework for continuous control tasks. In DDPG, both actor and critic are approximated using neural networks (θµ , θQ ). The problem of instability in training is 0 0 addressed by using target networks (θµ , θQ ) and experience replay using a replay buffer. In this setting, the critic network weights are optimized by minimizing the following loss: L(θQ ) = (Q(st , at |θQ ) − yt )2 (1) where, 0 0 yt = r(st , at ) + γQ0 (st+1 , µ0 t+1 (st+1 |θµ )|θQ ) (2) The gradient ascent update on policy network (actor) is given using Deterministic Policy Gradient(DPG) theorem([Silver et al., 2014]). Suppose the learning rate is η, then: θµ = θµ + η∇a Q(st , at |θQ )|a=µ(st |θµ ) ∇θµ µ(s|θµ ) (3) Finally the updates on target networks are: 0 0 θQ ← τ θQ + (1 − τ )θQ 0 0 θµ ← τ θµ + (1 − τ )θµ where, τ << 1. In the proposed framework, we use some of the basic concepts of DDPG and use DPG theorem to derive a policy gradient update which can support robust multi-task learning. Finally we explain how the learning can be improved by using a simple heuristic in case of shared actions. 4 DiGrad: Differential Policy Gradients We propose a framework for simultaneous reinforcement learning of multiple tasks shared actions in continuous domain. The method is based on differential action-value updates in actor-critic based framework using DPG theorem. The framework learns a compound policy which optimally performs all the shared tasks simultaneously. Fig. 2 shows the higher level description of the method. In this section, we describe the mathematical framework behind this work. the penultimate layer weights for each Qi are updated based on only the reward ri (s, ai ) obtained by performing the corresponding action ai . The remaining shared network captures the correlation between the different actions ai . Hence this kind of parametrization is more useful in the case of shared actions. Apart from this, the number of parameters are significantly reduced by the use of a single network. 4.3 Figure 2: Overview of the algorithm showing differential policy gradient update 4.1 Environment setting Consider n tasks in a standard RL setting and their corresponding n action spaces A1 , A2 , ..., An . We will assume that the state space S is the same across all the tasks and an infinite horizon with discount factor γ. Let A be a compound action space which performs the given set of n tasks simultaneously. Let a ∈ A denote compound actions, ai ∈ Ai denote actions and s ∈ S denote states. Therefore the relation between the compound actions and all the n actions is given by, n [ a= ai . i=1 Suppose as corresponds to the set of actions which affects k of the n tasks, then as is given by as = k \ where, aj ⊂ a aj (4) j=1 The reward functions for the ith task depend only on the corresponding actions ai . Therefore, we denote the reward function as ri (s, ai ) for each task i; let Qi (s, ai ) be the corresponding action value function. Let µ be the compound deterministic policy and µi be the task-specific deterministic policies; therefore µi ⊂ µ, where µi (s) = ai 4.2 Critic update Consider a single actor-critic based framework where critic Q(s, a) is given by function approximators parametrized by θQ and the actor µ(s) is parametrized by θµ . Let the corre0 0 sponding target networks be parametrized by θµ , θQ . Since we have multiple critic outputs Qi , we optimize θQ by minimizing the loss as given by [Yang et al., 2017]: and µ(s) = a Proposed framework An actor-critic based framework is proposed for multi-task learning in the given environment setting. We use a compound policy µ(s) parametrized by θµ , instead of multiple policy networks for each policy µi . µ:S→A A simple parametrization for action-value functions would be to have a separate network θQi for each Qi (s, ai ), which outputs an action-value corresponding to the ith task. Another approach for modelling action-value function is to have a single network parametrized by θQ which outputs action-values for all the tasks. Here, Qi is the action value corresponding to the ith task. [Yang et al., 2017] showed that a single critic network is sufficient in multi-policy learning. In this setting, L(θQ ) = n X (Qi (st , ait |θQ ) − yit )2 (5) i=1 where the target yit is 0 0 yit = ri (st , at ) + γQ0 (st+1 , µ0 t+1 (st+1 |θµ )|θQ ) (6) If there are multiple critic networks, network parameters are optimized by minimizing the corresponding loss: L(θQi ) = (Qi (st , ait |θQ ) − yit )2 (7) In both the settings of critic, there is only a single actor which learns the compound policy µ. The differential policy gradient update on the compound policy is explained in the next subsection. 4.4 Differential Policy Gradient Each task has a corresponding reward, ri (s, µi (s)) and hence to learn all the tasks we need to maximize the expected reward for each of the task with respect to the corresponding action, ai . Therefore the performance objective to be maximized is: J(µ, {µi }ni=1 ) = n X Es∼ρβ [ri (s, µi (s))] (8) i=1 The update on the parametrized compound policy µ(s|θµ ) is given by applying deterministic policy gradient theorem on Eq. (8). The resulting update is: ∇θ µ J ≈ n X Es∼ρβ [∇θµ Qi (s, ai |θQ )|ai =µi (s|θµ ) ] i=1 = n X Es∼ρβ [∇ai Qi (s, ai |θQ )|ai =µi (s|θµ ) ∇θµ µi (s|θµ )] (9) i=1 DiGrad with shared tasks In the above environment setting, let all the n tasks share a common set of actions as , i.e., k = n. Let a1 , a2 , ..., ak be the actions corresponding to these k-tasks. Therefore from Eq. (4), k \ as = aj j=1 Now the compound action a can be written as: heuristic, the differential gradient update on shared actions becomes: a = {a1 ∪ a2 ... ∪ ak } ∇θ µ J ≈ = {{a1 \ as } ∪ {a2 \ as }... ∪ {ak \ as } ∪ as } = {ad1 ∪ ad2 ... ∪ adk k ∪ as } Substituting these in Eq. (9): k X E[∇[adi ,as ] Qi (s, ai |θQ )|adi =µdi (s|θµ ),as =µs (s|θµ ) 1 X ∇as Qi (s, ai |θQ )|as =µs (s|θµ ) ∇θµ µs (s|θµ )] + E[ k i=1 (11) Generalisation Suppose there are k tasks which share a set of action as as above and n − k tasks which are independent, with corresponding actions ak+1 , ..., an , then Eq. (11) can be written as: ∇θ µ J ≈ i=1 E[∇adi Qi (s, ai |θQ )|adi =µdi (s|θµ ) ∇θµ µdi (s|θµ )] k 1 X ∇as Qi (s, ai |θQ )|as =µs (s|θµ ) ∇θµ µs (s|θµ )] + E[ k i=1 On expanding with respect to gradient operator we get,  T   k X ∇adi Qi (s, ai |θQ )|adi =µdi (s|θµ ) ∇θµ µdi (s|θµ ) = E ∇θµ µs (s|θµ ) ∇as Qi (s, ai |θQ )|as =µs (s|θµ ) + n X E[∇ai Qi (s, ai |θQ )|ai =µi (s|θµ ) ∇θµ µi (s|θµ )] i=k+1 i=1 (12) k X E[∇adi Qi (s, ai |θQ )|adi =µdi (s|θµ ) ∇θµ µdi (s|θµ ) i=1 +∇as Qi (s, ai |θQ )|as =µs (s|θµ ) ∇θµ µs (s|θµ )] = k X i=1 ∇θµ [µdi (s|θµ ), µs (s|θµ )]] = E[∇adi Qi (s, ai |θQ )|adi =µdi (s|θµ ) ∇θµ µdi (s|θµ )] i=1 where, adj = {aj \ as } Here we can see that ad1 , ad2 , adk , as are disjoint sets. Therefore we can write ai = [adi ,as ]. Similarly, µi = [µdi , µs ]. From here onwards, to make it succinct we drop s ∼ ρβ from the subscript of Es∼ρβ and simply represent it as E. ∇θ µ J ≈ k X k X E[∇adi Qi (s, ai |θQ )|adi =µdi (s|θµ ) ∇θµ µdi (s|θµ )] i=1 k X +E[ ∇as Qi (s, ai |θQ )|as =µs (s|θµ ) ∇θµ µs (s|θµ )] (10) From Eq. (12), we can observe that the policy gradient update for the policy (µs ) of the shared action set as is the average of the gradients of the action-value functions of all the tasks it affects. This can be easily extended to cases where there are more than one set of shared tasks. Our framework can accommodate heterogeneous dependent action spaces as compared to related multi-task RL algorithms which assume that action spaces are homogeneous or independent or both. This demonstrates the wider applicability of our framework. i=1 We can see that the second term on R.H.S of Eq.(10) will be zero if all the action spaces are disjoint, that is, as = ∅. Hence this framework can be used even when there are no shared actions. Since the update on the actor are the sum of gradients of different action values, we call this a differential gradient update. It is different from the standard gradient update where an actor is updated based on a single action value [Lillicrap et al., 2015]. Heuristic of direction From Eq.(10), we can see that the policy gradient update for the policy(µs ) of shared action as is taken as sum of the gradients of action values corresponding to the tasks it affects, whereas for policy(µdj ) of other actions adj , the gradient update is taken as the gradient of only the corresponding Qj . Thus, this uneven scaling of gradients may lead to delayed convergence and sometimes biasing. In order to equally scale all the gradient updates, we take the average value of the gradients obtained from the different Q-values for the shared action as . This modification will not affect the direction of gradient, only the magnitude will be scaled. By applying this 4.5 Algorithm In this section we explain the algorithm to learn multiple tasks using DiGrad. The flow of the algorithm is very similar to standard DDPG but there are significant differences in terms of the critic and actor updates as shown in the previous subsections. In DiGrad, compound action a is executed in the environment which returns a vector of rewards ~rt corresponding to each task instead of a single reward. The replay buffer B stores the current state st , compound action at , observed state after executing action st+1 and the vector of rewards ~rt . The entire flow of the algorithm is shown in Algorithm 1. 5 Experiments and Results The proposed framework was tested in different settings in order to analyse the advantages of each setting. We considered four different network settings for DiGrad as follows: (1) Single critic network with heuristics (2) Single critic network without heuristics (3) Multi critic network with heuristics (4) Multi critic network without heuristics. Algorithm 1 Multi-task learning using DiGrad 1: Randomly initialise actor (µ(s|θ µ )) and critic network 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: (Q(s, a|θQ )) with weights θµ and θQ . Initialize the target network with weights 0 0 θµ ← θµ and θQ ← θQ . for i = 1 to Emax Initialise random noise N for exploration. Reset the environment to get initial state s1 . for t = 1 to Stepmax Get action at = µ(st |θµ ) + N . Execute action at and get corresponding reward vector ~rt and updated state st+1 . Store transition (st , at , ~rt , st+1 ) in replay buffer B. Randomly sample a mini-batch M from replay buffer B. Update critic θQ according to Eqs.(5), (6), (7). Update actor policy θµ according to Eq.(12) 0 0 Update the target networks θµ and θQ end for end for We compare all of them with a standard DDPG setting. We use the same set of hyper parameters in all the five settings. The critic network architecture is the same for both single and multiple critic case in all aspects except in the number of outputs. The actor network parameters are also same for all the cases. We show the comparison of average reward as well the mean scores of each task in all the plots. Note that the average reward curves for DDPG are not shown as the reward function settings for DDPG is different than that of DiGrad. In order to test the proposed multi-task learning framework, we considered two different environments. In both these environments, training involved learning reachability tasks for all the end effectors simultaneously, i.e., learning a policy on the joint space trajectories to reach any point in their workspace. For all the experiments, we define error and score for a particular task i as, errori = ||Gi − Ei ||, scorei = −log(errori ) where Gi and Ei are the coordinates of goal and end-effector of the ith chain. In all the experiments, agents were implemented using TensorFlow Code base consisting of 2 fully connected layers. RMSProp optimizer is used to train both actor and critic networks with learning rates 0.001 and 0.0001 respectively. We used CReLu activation in all the hidden layers. While training, a normally distributed decaying noise function was used for exploration. Whereas, while testing this noise is omitted. We set the discount factor to be 0.99 in all the settings. In all the tasks, we use low-dimensional state description which include joint angles, joint positions and goal positions. The actor output is a set of angular velocities q̇. Hence the policy learns a mapping from the configuration space to joint velocity space. Reward function The reward function for DiGrad settings is modelled keeping in mind the multi-task application. As defined before, ri is (a) 8-link Planar Manipulator (b) Humanoid Robot Figure 3: Environments the reward corresponding to the action ai of the ith task. We give a small positive reward to ri if task i is finished. Also, if all the end effectors reach their respective goals, a positive reward is given to all the tasks. For all other cases, a negative reward proportional to the error is given. In DDPG setting, there is a single reward unlike DiGrad. A positive reward is given when all the end effectors reach their goals simultaneously. Else, a negative reward is given proportional to the sum of error of all the tasks, that is, sum of distances between the respective goal and its corresponding end effector. Environments 8-link manipulator: The first environment is an 8 DoF planar manipulator with 3 end effectors as shown in Fig. 3a. We can observe that the shared sub-chain of 2 joints is common to all the 3 tasks. Also, the action dimension of the non-shared chains are kept different in order to check the robustness of the framework. The dimensions of each action is given as: a1 = 3, a2 = 4, a3 = 5 and as = 2. Fig.4(A) shows the performance curves for the five different settings. From the mean score curves, we can see that all the DiGrad based settings converge faster and achieve better final performance than DDPG. Even though the action dimension of each task was different, all the network settings in DiGrad framework worked equally well for all the tasks. Whereas, DDPG showed comparable performance for only Task-2. From 4(A1), we can see that the single critic framework consistently has better average reward per episode than multi critic frameworks. Thus, modelling all the action value functions in one critic network doesn’t affect the performance. In fact, the shared parameters in single critic framework could help the network capture the correlation among the actions much better than multi-critic case. Note that, single critic framework is achieving these performances with lesser parameters than the multi-critic framework. DiGrad frameworks with heuristics perform at par with the non-heuristic frameworks. On applying the aforementioned heuristic, no significant improvement in the average reward curve is observed. But in the mean score curves, specially Task-1 and Task-2 curve, we can see that the application of heuristics helps the network to be more stable as compared to their respective non-heuristic curves. Thus, we can say that normalising the gradient of action values of the shared action as in Eq. (11) could help the network deliver robust multi- Figure 4: Performance curves of reachability task experiments on 8 link manipulator and humanoid. The bold line shows the average over 3 runs and the coloured areas show average standard deviation over the tasks. Note that, average reward curve is not plotted for DDPG as the reward function for it is different from DiGrad frameworks. task training. Humanoid robot: Secondly, we test our framework on a 27 DoF humanoid robot (Fig. 3b). This experiment involved reachability tasks of the 2 hands of the humanoid robot using the upper body (13 DoF) consisting of an articulated torso. The articulated torso is the shared chain which is affecting both the tasks. It is noteworthy that the articulated torso has 5 DoF whereas, the arms have 4 DoF each. Thus, the contribution of shared action (articulate torso) to the task is more than the non shared actions (arms). The environment for training is developed in MATLAB and the trained models were tested in a dynamic simulation environment MuJoCo. Fig.4B summarizes the results for this case. We found that DPPG is generally unstable for solving multi-tasks problems. In some runs, it may learn initially but suffers degradation later. We observe that the DiGrad algorithm yields better final results while having greater stability. From the mean scores of the tasks, we can see that the single critic frameworks converge faster and are stable throughout the experiment as compared to the multi-critic frameworks. The best setting is again the single critic with heuristic, outperforming all the others in all the cases. Note that, the reward function for DDPG is kept different from the DiGrad framework. We also tried a different reward setting taking the sum of individual rewards ri as a reward signal to DDPG framework, where ri is same as defined in the DiGrad reward setting. We observed that this reward setting led to biasing, where one of the tasks dominated others. This behaviour could have been due to the negative interference across tasks, which didn’t happen in DiGrad. 6 Conclusion In this paper, we propose a deep reinforcement learning algorithm called DiGrad for multi-task learning in a single agent. This framework is based on DDPG algorithm and is derived from DPG theorem. In this framework, we have a dedicated action value for each task, whose update depends only on the action and reward corresponding to the task. We introduced a differential policy gradient update for the compound policy. We tested the proposed framework for learning reachability tasks on two environments, namely 8-link manipulator and humanoid. These experiments show that our framework gave better performance than DDPG, in terms of stability, robustness and accuracy. These performances are achieved keeping the number of parameters comparable to DDPG framework. Also, the algorithm learns multiple tasks without any decrease in the performance of each task. Our work focuses on learning coordinated multi-actions in the field of robotics, where a single agent performs multiple tasks simultaneously. The framework was able to capture the relation among tasks where some tasks had overlapped action space. Our future work will focus on extending the framework to multi-agent domain. References [Borsa et al., 2016] Diana Borsa, Thore Graepel, and John Shawe-Taylor. Learning shared representations in multi-task reinforcement learning. arXiv preprint arXiv:1603.02041, 2016. [Buss, 2004] Samuel R Buss. Introduction to inverse kinematics with jacobian transpose, pseudoinverse and damped least squares methods. IEEE Journal of Robotics and Automation, 17(1-19):16, 2004. [Chiaverini, 1997] Stefano Chiaverini. Singularity-robust task-priority redundancy resolution for real-time kinematic control of robot manipulators. IEEE Transactions on Robotics and Automation, 13(3):398–410, 1997. [Dimitrakakis and Rothkopf, 2011] Christos Dimitrakakis and Constantin A Rothkopf. Bayesian multitask inverse reinforcement learning. In European Workshop on Reinforcement Learning, pages 273–284. Springer, 2011. [Gu et al., 2017] Shixiang Gu, Ethan Holly, Timothy Lillicrap, and Sergey Levine. Deep reinforcement learning for robotic manipulation with asynchronous off-policy updates. In Robotics and Automation (ICRA), 2017 IEEE International Conference on, pages 3389–3396. IEEE, 2017. [Klein et al., 1995] Charles A Klein, Caroline Chu-Jenq, and Shamim Ahmed. A new formulation of the extended jacobian method and its use in mapping algorithmic singularities for kinematically redundant manipulators. IEEE Transactions on Robotics and Automation, 11(1):50–55, 1995. [Konidaris et al., 2011] George Konidaris, Sarah Osentoski, and Philip S Thomas. Value function approximation in reinforcement learning using the fourier basis. In AAAI, volume 6, page 7, 2011. [Kulkarni et al., 2016] Tejas D Kulkarni, Karthik Narasimhan, Ardavan Saeedi, and Josh Tenenbaum. Hierarchical deep reinforcement learning: Integrating temporal abstraction and intrinsic motivation. In Advances in neural information processing systems, pages 3675–3683, 2016. [Lazaric and Ghavamzadeh, 2010] Alessandro Lazaric and Mohammad Ghavamzadeh. Bayesian multi-task reinforcement learning. In ICML-27th International Conference on Machine Learning, pages 599–606. Omnipress, 2010. [Lazaric, 2012] Alessandro Lazaric. Transfer in reinforcement learning: a framework and a survey. In Reinforcement Learning, pages 143–173. Springer, 2012. [Lillicrap et al., 2015] Timothy P Lillicrap, Jonathan J Hunt, Alexander Pritzel, Nicolas Heess, Tom Erez, Yuval Tassa, David Silver, and Daan Wierstra. Continuous control with deep reinforcement learning. arXiv preprint arXiv:1509.02971, 2015. [Mnih et al., 2015] Volodymyr Mnih, Koray Kavukcuoglu, David Silver, Andrei A Rusu, Joel Veness, Marc G Bellemare, Alex Graves, Martin Riedmiller, Andreas K Fidjeland, Georg Ostrovski, et al. Human-level control through deep reinforcement learning. Nature, 518(7540):529, 2015. [Møller, 1993] Martin Fodslette Møller. A scaled conjugate gradient algorithm for fast supervised learning. Neural networks, 6(4):525–533, 1993. [Phaniteja and Sarkar, 2017] Guhan Phaniteja, Dewangan and K Madhava Sarkar. A deep reinforcement learning approach for dynamically stable inverse kinematics of humanoid robots. arXiv preprint arXiv:1801.10425, 2017. [Rusu et al., 2015] Andrei A Rusu, Sergio Gomez Colmenarejo, Caglar Gulcehre, Guillaume Desjardins, James Kirkpatrick, Razvan Pascanu, Volodymyr Mnih, Koray Kavukcuoglu, and Raia Hadsell. Policy distillation. arXiv preprint arXiv:1511.06295, 2015. [Schaul et al., 2015] Tom Schaul, John Quan, Ioannis Antonoglou, and David Silver. Prioritized experience replay. arXiv preprint arXiv:1511.05952, 2015. [Siciliano, 1990] Bruno Siciliano. Kinematic control of redundant robot manipulators: A tutorial. Journal of intelligent and robotic systems, 3(3):201–212, 1990. [Silver et al., 2014] David Silver, Guy Lever, Nicolas Heess, Thomas Degris, Daan Wierstra, and Martin Riedmiller. Deterministic policy gradient algorithms. In ICML, 2014. [Sutton and Barto, 1998] Richard S Sutton and Andrew G Barto. Reinforcement learning: An introduction, volume 1. MIT press Cambridge, 1998. [Teh et al., 2017] Yee Teh, Victor Bapst, Wojciech M Czarnecki, John Quan, James Kirkpatrick, Raia Hadsell, Nicolas Heess, and Razvan Pascanu. Distral: Robust multitask reinforcement learning. In Advances in Neural Information Processing Systems, pages 4499–4509, 2017. [Van Hasselt et al., 2016] Hado Van Hasselt, Arthur Guez, and David Silver. Deep reinforcement learning with double q-learning. In AAAI, volume 16, pages 2094–2100, 2016. [Wang et al., 2015] Ziyu Wang, Tom Schaul, Matteo Hessel, Hado Van Hasselt, Marc Lanctot, and Nando De Freitas. Dueling network architectures for deep reinforcement learning. arXiv preprint arXiv:1511.06581, 2015. [Yang et al., 2017] Zhaoyang Yang, Kathryn Merrick, Hussein Abbass, and Lianwen Jin. Multi-task deep reinforcement learning for continuous action control. In Proceedings of the Twenty-Sixth International Joint Conference on Artificial Intelligence, IJCAI-17, pages 3301–3307, 2017. [Yin and Pan, 2017] Haiyan Yin and Sinno Jialin Pan. Knowledge transfer for deep reinforcement learning with hierarchical experience replay. In AAAI, pages 1640–1646, 2017. [Zhang et al., 2016] Jingwei Zhang, Jost Tobias Springenberg, Joschka Boedecker, and Wolfram Burgard. Deep reinforcement learning with successor features for navigation across similar environments. arXiv preprint arXiv:1612.05533, 2016.
2cs.AI
1 Affine Parameter-Dependent Lyapunov Functions for LPV Systems with Affine Dependence arXiv:1803.11543v2 [cs.SY] 5 Apr 2018 Pepijn B. Cox, Member, IEEE, Siep Weiland, Member, IEEE, and Roland Tóth, Senior Member, IEEE Abstract—This paper deals with the certification problem for robust quadratic stability, robust state convergence, and robust quadratic performance of linear systems that exhibit bounded rates of variation in their parameters. We consider both continuous-time (CT) and discrete-time (DT) parameter-varying systems. In this paper, we provide a uniform method for this certification problem in both cases and we show that, contrary to what was claimed previously, the DT case requires a significantly different treatment compared to the existing CT results. In the established uniform approach, quadratic Lyapunov functions, that are affine in the parameter, are used to certify robust stability, robust convergence rates, and robust performance in terms of linear matrix inequality feasibility tests. To exemplify the procedure, we solve the certification problem for L2 -gain performance both in the CT and the DT cases. A numerical example is given to show that the proposed approach is less conservative than a method with slack variables. Index Terms—Linear parameter-varying systems; Parametervarying Lyapunov functions; Stability of linear systems; LMIs. I. I NTRODUCTION T HE certification of stability and performance of a linear system against uncertain and/or time-varying parameters is of paramount interest [1]–[3]. Non-linear and/or nonstationary effects can be represented by varying dynamic behavior of a linear system description expressed as parameter variations. This makes the so-called linear parameter-varying (LPV) system representations widely applicable to model physical or chemical processes. However, the certification of robust quadratic stability, robust state convergence, and robust quadratic performance for LPV representations becomes more involved compared to the linear time-invariant (LTI) case. There has been extensive research in this area, where the parameter variations are assumed to be either time-invariant in a constraint set or time-varying signals with possible constraints on their values, rates of variations, bandwidths, or spectral contents. For time-invariant parametric dependence and arbitrary fast time-variations, a rich literature exists, e.g., see [3]–[5]. In a wide range of applications, systems exhibit bounded parameter variations and bounded rates of variation. For these systems, assumptions on arbitrary fast parameter rates are P.B. Cox, S. Weiland, and R. Tóth are with the Control Systems Group, Department of Electrical Engineering, Eindhoven University of Technology, P.O. Box 513, 5600 MB Eindhoven, The Netherlands, e-mail: {p.b.cox, s.weiland, r.toth}@tue.nl. This paper has received funding from the European Research Council (ERC) under the European Union’s Horizon 2020 research and innovation programme (grant agreement No 714663). unrealistic and conservative. Formulation of stability conditions taking the bounded rate of variation into account can be accomplished, e.g., via integral-quadratic-constraints (IQCs) [6]–[10] based on an equivalent linear fractional representation (LFR) of the LPV system, Lyapunov theory based on state-space representations or LFR forms [11]–[18], the quadratic separator theorem for LFRs [19]–[21], or Finsler’s Lemma [22]. However, these stability and performance formulations result in an infinite set of linear matrix inequalities (LMIs). To obtain tractable methodologies, a number of relaxation techniques can be applied. These include 1) vertex separation or convex-hull relaxation, including µ synthesis, D/G scaling, and full-block multipliers, [6], [7], [9], [10], [19]–[21]; 2) partial-convexity arguments [11]–[13]; 3) sum-of-squares relaxation [21], [23]; 4) Pólya relaxation [8], [14]–[16]; 5) slack variable methods (applied in discrete-time) [14], [16], [17]; and 6) partitioning of the uncertainty space [1], [18]. The aforementioned overview is far from complete due to the vast amount of literature on this topic. A summary of various relaxation techniques in the continuous-time (CT) case is found in [3], [24]. Many approaches presented in the literature for quadratic stability, state convergence, and quadratic performance certification problems are either conservative or have a high computational demand due to the large number of free parameters or the large number of LMIs. Furthermore, the CT and the discrete-time (DT) cases are fundamentally different for these problems. Indeed, in the DT case, the robust stability analysis requires a significantly different relaxation technique leading to more involved synthesis and verification results. By neglecting this difference, the DT case remained mainly unexplored under the claims that it trivially follows from the CT results. We will demonstrate that this is not the case. The goal of this paper is to provide a unified method for certification of robust quadratic stability, robust state convergence, and robust quadratic performance, in both the CT and DT cases, for linear systems that exhibit parameter variations where these variations have bounded rates. The certification problem is solved using parameter-dependent Lyapunov functions. To avoid large numbers of free parameters, to decrease the number of LMIs, and to avoid conservativeness of the results, we apply the partial-convexity relaxation argument inspired by the results in [11]–[13]. More specifically, the contributions of the paper are the following, for the CT case, we extend [11], [12] to include a certificate on the exponential rate of decay of the state, independent of the uncertain parameter. For the DT case, we extend the partial-convexity argument to handle the third-order 2 terms of the Lyapunov function without introducing additional free parameters and we provide a less conservative robust stability test, a state convergence guarantee, and a performance test than other existing approaches. To the authors’ knowledge, the only contribution using the partial-convexity argument in the DT case is [13]. However, [13, Thm. 1] avoids the cubic dependencies on the parameters by including additional free parameters and by increasing the number of LMIs. Additionally, we draw a parallel with LMI regions to show why the DT case induces a more involved set of LMIs. In addition, an illustrative example is provided comparing the proposed partial-convexity results with a slack variable based method in the DT case. The paper is organized as follows. In Section II, the concept of LPV systems, state-space representations, and the problem setting are introduced. The analysis on affine quadratic stability (AQS) is given in Section III. Section IV reveals how the partial-convexity relaxation of the AQS certification problem results in a finite set of LMIs for the CT and DT cases. In Section V, an LMI based formulation for the affine quadratic performance (AQP) analysis is derived for both cases. In Section VI, an illustrative example is given for the DT case. Concluding remarks are given in Section VII. II. L INEAR PARAMETER - VARYING SYSTEMS A. LPV state-space representation Consider a system defined by the following LPV state-space representation: ξx(t) = A(p(t))x(t) + B(p(t)) w(t), z(t) = C(p(t)) x(t) + D(p(t))w(t), (1a) (1b) where x : T 7→ Rnx is the state variable, p : T 7→ P ⊂ Rnp is the time-varying parameter (i.e., the scheduling signal), w : T 7→ Rnw is the general disturbance channel, z : T 7→ Rnz denotes the performance channel, and t ∈ T defines time. For d d , i.e., ξx(t) = dt x(t) denotes the CT case, T = R and ξ = dt the time derivative of the state; and for the DT case, T = Z and ξ = q is the time-shift operator, i.e., ξx(t) = x(t + 1). The parameter-varying matrix functions A(), . . . , D() in (1) are considered to be affine functions of p: np np X X Bi pi (t), Ai pi (t), B(p(t)) = B0 + A(p(t)) = A0 + i=1 i=1 np np X X Di pi (t), Ci pi (t), D(p(t)) = D0 + C(p(t)) = C0 + (2) i=1 i=1 , Bi ∈ Rnx ×nw , Ci ∈ with known matrices Ai ∈ R nz ×nw nz ×nx for i = 0, . . . , np and pi is the i-th , Di ∈ R R element of the scheduling variable. Due to linearity from x to z, asymptotic stability 1 of (1) is dictated by stability of the fixed point at the origin of the autonomous part of (1), i.e., nx ×nx ξx(t) = A(p(t))x(t) , | {z } x(0) = x0 , (3) f (x(t),p(t)) 1 An LPV system, represented in terms of (1), is called asymptotically stable, if, for all trajectories of (w(t), p(t), z(t)) satisfying (1) with w(t) = 0 for t ≥ 0 and p(t) ∈ P, it holds that limt→∞ |z(t)| = 0. where x0 ∈ Rnx denotes the initial state. In this paper, we assume that the scheduling variable and its rate are bounded: A1 The scheduling signal p(t) and its rate of variation δp(t), d p(t) in the CT case and δp(t) = defined by δp(t) = dt p(t + 1) − p(t) in the DT case, range for all t ∈ T in the bounded set P × V, i.e., (p(t), δp(t)) ∈ P × V with V ⊂ Rnp . Here P = co(P) and V = co(V) are defined as the convex hulls of the hyper-rectangles  ⊤ u1 · · · unp P= : ui ∈ {pi , pi } , (4a)  ⊤ v1 · · · vnp (4b) V= : vi ∈ {ν i , ν i } , with 2np vertices each. B. Notation Let Ivs denote the set of integers {s, s + 1, · · · , v} and Sn the set of all n × n real symmetric matrices. The superscript n is omitted if the dimension is not relevant for the context. In addition, the inequalities A  B and A ≻ B with A ∈ Sn and B ∈ Sn mean that A − B is positive semi-definite and positive definite, respectively. Let pc denote the center of P: h i⊤ pn +pnp p pc = p1 +p1 . . . . (5) 2 2 In denote multiple summations Pnp wePnwill Pnp addition, p Z . by · · · i=1 i,...,k=1 X is the standard notation for k=1 the collection of all maps from Z to X. R≥0 denotes the set of nonnegative real numbers and Z≥0 is the set of nonnegative integers. T0 = R≥0 in the CT case and T0 = Z≥0 in the DT case. With σi {A}, we denote the singular values of a real matrix A where the largest and smallest singular values are indicated as σmax {A} and σmin {A}, respectively. The eigenvalues of A are denoted as λi {A}. The spectral norm of A is defined as kAk2 = σmax {A}. Furthermore, with kkq we denote the vector q-norm. The Lq -norm of a continuous R∞ 1/q signal w is kwkq = 0 kw(t)kqq dt and for a discrete 1 P∞ q /q . signal w, the ℓq -norm is kwkq = kw(t)k q t=0 III. A FFINE QUADRATIC STABILITY In this paper, asymptotic stability of (3) is verified under A1 by using a parameter-dependent Lyapunov function. Definition 1 (Parameter-dependent Lyapunov function): The function V : Rnx ×P → R is a parameter-dependent Lyapunov function for (3) if: (i) V (x, p) > 0 for all x ∈ Rnx with x 6= 0 and ∀p ∈ P; (ii) V (x, p) = 0 for x = 0 and ∀p ∈ P; and (iii) ∆V (x, p, r) < 0 for ∀(x, p, r) ∈ Rnx ×P×V with x 6= 0. In the CT case, ∆V (x, p, r) := ∇xV (x, p) ·f (x, p) + ∇pV (x, p) · r, (6a) where ∇y indicates the gradient of a function w.r.t. y and · is the inner product. For the DT case, ∆V (x, p, r) := V (f (x, p), p + r) − V (x, p). (6b) Theorem 1 (Asymptotic stability): If a parameter-dependent Lyapunov function for (3) exists, then the origin of (3) is an asymptotically stable fixed point. 3 Proof: See, for example, [25, Thm. 4.1] for the CT case and [26, Thm. B.23] for the DT case. In this paper, we consider quadratic parameter-dependent Lyapunov functions of the form V (x, p) = x⊤ K(p)x, (7) where the function K : P 7→ Snx is affine in p K(p) = K0 + np X K i pi , (8) i=1 nx with unknown matrices K0 , . . . , Knp ∈ S . Definition 2 (Affine quadratic stability): The representation (1) is affinely quadratically stable (AQS), if it admits a parameter-dependent Lyapunov function of the form (7)-(8). Let us provide sufficient conditions for AQS: Theorem 2 (Sufficiency for AQS): The LPV representation (3) is affinely quadratically stable, if there exist np + 1 matrices K0 , . . . , Knp ∈ Snx such that np K(p) = K0 + X i=1 Ki pi ≻ 0, (9) for all p ∈ P and, in addition, for the CT case, it holds that Lc (p, r) = A⊤(p)K(p)+K(p)A(p)+K(r)−K0 ≺ 0, (10a) for all (p, r) ∈ P × V or, for the DT case, it holds that Ld (p, r) = A⊤(p)(K(p)+K(r)−K0 ) A(p)−K(p) ≺ 0, (10b) for all (p, r) ∈ P × V. Proof: For the CT case, e.g., see [3, Thm. 2.4.6]. The DT case can be obtained by similar arguments. Theorem 2 results in an infinite set of matrix inequalities in the unknowns Ki ∈ Snx . In this paper, we convexify (10) using a partial-convexity argument to obtain a tractable solution by a finite number of LMIs. Within the IQC framework, it has been shown that relaxation by partial-convexity for systems in the form (1) lead to a less conservative formulation than a convex-hull relaxation [24, p. 9]. It is difficult to make generic statements on the potential conservativeness of various relaxation methods. However, the relaxation by partialconvexity results in less decision variables when compared to slack variable relaxation methods as discussed in [14], [16], [17]. In Section VI, we demonstrate that relaxation by partialconvexity is less conservative than slack variable relaxation. Alternatively, the uncertainty space can be partitioned as in [21], where the grid size leads to a trade-off between a conservative solution and an increased computational burden. Therefore, the partial-convexity argument potentially avoids excessive number of free parameters and decreases the number of LMIs. IV. S UFFICIENCY FOR AQS WITH GUARANTEED CONVERGENCE A. Relaxation with partial-convexity The functions Lc (p, r) in (10a) and Ld (p, r) in (10b) are quadratic and cubic in p, respectively, while linear in r. Hence, a relaxation technique is required for p only to obtain a finite set of LMIs to verify AQS in Theorem 2. If the functions Lc () and Ld () are negative definite on (p, r) ∈ P × V, then the maximum of these functions must be negative. Therefore, if it can be ensured that the maximum of Lc () and Ld () is at the vertices P, then (10a) and (10b) reduce to a finite set of LMIs that are required to be satisfied on P only. The following lemma provides the conditions for this concept: Lemma 1 (Maximum at the vertices): Consider the cubic function L : P 7→ S defined by np np np X X X Qi,j,k pi pj pk , Qi,j pi pj + L(p) = Q0 + Qi pi + i=1 i,j=1 i,j,k=1 n n with matrices Qi , Qj,k , Qj,k,l ∈ S for i ∈ I0 p , j, k, l ∈ I1 p . The function L() achieves its maximum at P if np X 1 ∂ 2 L(u) = Qi,i + (Qj,i,i +Qi,j,i +Qi,i,j )uj  0, 2 ∂u2i j=1 (11) n for all (i, u) ∈ I1 p ×P with P = co(P). Proof: See Appendix A. In fact, condition (11) implies that L() is a partial-convex function: Definition 3 (Partially convex function): A twice differentiable function L : P → S is partially convex if P is convex and ∂ 2 L(p) n  0, for all (i, p) ∈ I1 p × P. (12) ∂p2i Note that positive semi-definiteness of (12) is along each independent direction pi of the scheduling space. This is less demanding than convexity with respect to p, which would require the Hessian of L() to be positive semi-definite. By applying the partial-convexity relaxation (11) in Lemma 1, the maximum of Lc () and Ld () can be found at the vertices and, therefore, the AQS test in (9)-(10) can be reduced to a finite set of LMIs at the vertices only, i.e., Li (u, v) ≺ 0 ∀(u, v) ∈ P ×V. This is the core idea introduced in [11] for the CT case. This concept can also be applied in the DT case, as highlighted in Section IV-B. By taking into account the cubic terms in L(), we differ from the approaches presented in [11]–[13]. These cubic terms are essential in handling the DT case. B. The discrete-time case Theorem 3 (Sufficiency for AQS in DT): Given an LPV system defined by (3) with dependency structure (2) where the scheduling variable p(t) satisfies A1. If there exists an 0 < ǫ < 1, √ such that the eigenvalues of A(pc ) satisfy |λi (A(pc ))| < 1 − ǫ with pc as in (5), and there exist np + 1 matrices K0 , . . . , Knp ∈ Snx parametrizing K() in (8) that satisfy Ld (u, v, ǫ) = A⊤ (u) [K(u) + K(v) − K0 ] A(u) − (1 − ǫ)K(u)  0, 0  A⊤(u)Ki Ai +A⊤i Ki A(u), ∀(u, v) ∈ P × V, (13) n ∀(i, u) ∈ I1 p × P, (14) then the LPV system corresponding to (3) is AQS. In particular, V (x, p) in (7) is a Lyapunov function with ∆V (x, p, δp) ≤ 4 n −ǫV (x, p) and the state x robustly converges, i.e., kx(t)k22 ≤ b t 2 a (1 − ǫ) kx(0)k2 for any trajectory (p(t), δp(t)) ∈ P × V for t ≥ 0 where   a = inf λmin K(u) , b = sup λmax K(u) . (15) for all (i, u) ∈ I1 p × P then (13) is convex on the domain (p, r) ∈ P × V and, by using Lemma 1, (13) should only be tested on the vertices of the hyper rectangle. Part ii. This part will be proven by contradiction. Since δp = 0 is admissible with 0 < ǫ < 1, we write (10b) as Proof: The proof has three parts: i) sufficiency of the conditions for asymptotic stability, ii) showing √ that K(p) ≻ 0 for all p ∈ P is implied by |λi (A(pc ))| < 1 − ǫ together with (13)-(14) and iii) convergence of x(t). Combining i) and ii) for 0 < ǫ < 1 results in a parameter-dependent Lyapunov function V () according to Theorem 2 and AQS is proven. Part i. The function Ld (p, δp, ǫ) in (10b) is affine in δp and ǫ, hence, it is sufficient to evaluate (10b) at the vertices V for an 0 < ǫ < 1, i.e., (19) u∈P u∈P Ld (p, v, ǫ) ≺ 0, ∀p ∈ P, ∀v ∈ V, and 0 < ǫ < 1. (16) To prove AQS, fix v ∈ V, fix 0 < ǫ < 1, and define R(v) = K(v) − K0 , then we can write (16) as Ld (p, v, ǫ) = −(1 − ǫ)K(p) + A⊤ 0 R(v)A0 np np X X  ⊤ 2 A⊤ A⊤ + 0 R(v)Ai + Ai R(v)A0 pi i R(v)Ai pi + i=1 i=1 + + + + np X 3 ⊤ ⊤ ⊤ A⊤ Ai R(v)Aj pi pj + A0 K0 A0 + i Ki Ai pi i=1 i,j=1, i6=j np X  ⊤ ⊤ A⊤ i K0 A0 + A0 Ki A0 + A0 K0 Ai pi i=1 np X  ⊤ ⊤ A⊤ i Kj A0 + A0 Ki Aj + Ai K0 Aj pi pj i,j=1 np X  2 ⊤ ⊤ A⊤ i Kj Ai + Aj Ki Ai + Ai Ki Aj pi pj np X i,j=1, i6=j np + X A⊤ i Kj Ak pi pj pk ≺ 0. (17) i,j,k=1, i6=j6=k Based on the partial-convexity argument, Eq. (17) holds if it holds on P and the following condition is satisfied ∂ 2 Ld (p, v, ǫ) ⊤ = 2A⊤ i R(v)Ai + 6Ai Ki Ai pi ∂p2i  ⊤ ⊤ + 2 A⊤ i Ki A0 + A0 Ki Ai + Ai K0 Ai + np X  ⊤ ⊤ +2 A⊤ i Kj Ai + Aj Ki Ai + Ai Ki Aj pj  0, j=1, i6=j which can be rewritten as A⊤ [K(p)+R(v)] Ai +A⊤(p)Ki Ai +A⊤i Ki A(p)  |i {z } (18a) A⊤ (p)K(p)A(p) − K(p) ≺ 0. In addition, P is compact due to A1 and, therefore, K(p) is a compact function on P. Let us assume that ∃p0 ∈ P such that K(p0 ) is singular and take x0 ∈ ker(K(p0 )) with x0 6= 0, then  ⊤  x⊤ 0 A (p0 )K(p0 )A(p0 ) − K(p0 ) x0 = ⊤ x⊤ 0 A (p0 )K(p0 )A(p0 )x0 ≥ 0. (20) However, (20) contradicts (19), hence, (19) ensures that K(p) cannot be singular for all admissible p ∈ P. As |λi (A(pc ))| < √ 1 − ǫ, K(pc ) ≻ 0 by the D-stability result [12]. Then, as K(p) is compact on P, by continuity of the eigenvalues of K(p), (19) assures that aI  K(p)  bI with 0 < a ≤ b < ∞ as defined in (15) for all admissible p ∈ P and, therefore, (9) is satisfied. Part iii. We can find an 0 < ǫ < 1 such that ∆V (x, p, δp) + ǫV (x, p) =   x⊤ A⊤ (p)K(p + δp)A(p) − (1 − ǫ)K(p) x = x⊤ Ld (p, δp, ǫ)x ≤ 0, (21) for all (p, δp) ∈ P × V and x(0) 6= 0. Eq. (21) provides that V () is decaying along the solutions of (3) according to V (x(t), p(t)) ≤ (1 − ǫ)t V (x(0), p(0)) for t > 0. In addition, akxk22 ≤ V (x, p) ≤ bkxk22 for all p ∈ P and x ∈ X since K(p) is positive definite and bounded, hence, we can find that kx(t)k22 ≤ ab (1 − ǫ)t kx(0)k22 for t ≥ 0. Remark 1: It is an essential part of the proof of Theorem 3 (Part i) that the function Ld () in (17) includes third-order terms in p. In [13, Thm. 1], these terms are reduced to second-order by introducing additional variables and coupling constraints. Therefore, the proof and the LMIs in Theorem 3 are fundamentally different from [13, Thm. 1]. Moreover, the number of decision variables in [13, Thm. 1] is twice the number of decision variables in Theorem 3. To decrease the number of LMI conditions in Theorem 3, a more conservative test for AQS can be derived: Lemma 2 (Simple AQS in DT): Given an LPV system defined by (3) with dependency structure (2) where the scheduling variable p(t) satisfies A1. If there exist an 0 < ǫ < 1 and np + 1 matrices K0 , . . . , Knp ∈ Snx parametrizing K() in (8) that satisfy L1 (u, l, ǫ) = A⊤ (u)K(l)A(u) − (1 − ǫ)K(u) ≺ 0, 0 ⊤ A (p)Ki Ai +A⊤ i Ki A(p)  0. (18b) Note that the partial-convexity relaxation only requires to be positive semi-definite on the interval P. Also see that, ⊤ A⊤ i [K(p) + R(v)] Ai = Ai [K(p + v)] Ai , therefore, (18a) to (18b) is valid. As a consequence, the partial-convexity argument (18b) becomes independent of v ∈ V. If (18b) holds K(u) ≻ 0, ∀(u, l) ∈ P × P, (22) ∀u ∈ P, (23) then the LPV system corresponding to (3) is AQS. In particular, V (x, p) in (7) is a Lyapunov function with ∆V (x, p, δp) ≤ −ǫV (x, p) and the state x robustly converges as kx(t)k22 ≤ b t 2 a (1 − ǫ) kx(0)k2 for any trajectory (p(t), δp(t)) ∈ P × V for t ≥ 0 with a and b given by (15). 5 Proof: Note that (22) is equivalent to (10b), however, in (22), qp ∈ P and p ∈ P are treated as independent variables, n which implies that ν i = pi − pi and ν i = pi − pi for i ∈ I1 p . Note that the function L1 (p, qp, ǫ) for p, qp ∈ P, 0 < ǫ < 1 is affine in qp and ǫ, hence (22) holds if and only if L1 (p, l, ǫ) ≺ 0, ∀p ∈ P, ∀l ∈ P, and 0 < ǫ < 1. (24) Fix l and ǫ, the partial-convexity on the domain p ∈ P gives ∂ 2 L1 (p, l, ǫ) = A⊤ i K(l)Ai  0, ∂p2i n ∀(i, l) ∈ I1 p × P. (25) As (23) enforces K(l) ≻ 0, (25) is satisfied. Hence, satisfying (22) and (23) results in AQS. Robust state convergence can be proven similarly to Part iii of the proof of Theorem 3 and is therefore omitted. Note that Lemma 2 does not depend on the rate of variation δp, but we implicitly assume that δp cannot exceed the difference between the extremes of P, i.e., ν i = pi − pi and n ν i = pi −pi for i ∈ I1 p . This approach can only be exploited in the DT setting. The number of LMIs is decreased, however, the feasibility test is more conservative compared to Theorem 3 as the range [ν i , ν i ] is enlarged. C. Generalization Theorem 4 (AQS in CT and DT with guaranteed decay): Given an LPV system defined by (3) with dependency structure (2) where the scheduling variable p(t) satisfies A1. Define the following set of inequalities  ⊤    I I Lk (u, v, α) = Mk (α)⊗K(u) +Qk (u, v)  0, A(u) A(u) [k] Nk (i, u, α) = m22 [k] ∀(u, v) ∈ P × V, (26)  [k] A⊤(u)Ki Ai +A⊤i Ki A(u) +m12 Ki Ai + m21 A⊤ i Ki  0, n ∀(i, u) ∈ I1 p × P, (27) [k] where k ∈ {c, d} and mij is the i, j-th element of Mk (α). For the CT case with k = c, if there exists an α > 0 such that Re (λi (A(pc ))) < −α with pc as in (5) and there exist np + 1 matrices K0 , . . . , Knp ∈ Snx parametrizing K() in (8) such that (26)-(27) are satisfied with   2α 1 Mc (α) := , Qc (u, v) := K(v) − K0 , (28) 1 0 then the LPV system corresponding to (3) is AQS. Moreover, V (x, p) in (7) is a Lyapunov function with ∆V (x, p, δp) ≤ −2αV (x, p) and the state x robustly converges as kx(t)k22 ≤ b −αt kx(0)k22 for any trajectory (p(t), δp(t)) ∈ P × V for ae t ≥ 0 with a and b given by (15). For the DT case with k = d, if there exists an 0 < α < 1 such that |λi (A(pc ))| < α with pc as in (5) and there exist np + 1 matrices K0 , . . . , Knp ∈ Snx parametrizing K() in (8) such that (26)-(27) are satisfied with   −α2 0 Md (α) := , Qd (u, v) := A⊤(u)[K(v)−K0 ]A(u), 0 1 (29) then the LPV system corresponding to (3) is AQS. In particular, V (x, p) in (7) is a Lyapunov function with ∆V (x, p, δp) ≤ −α2 V (x, p) and the state x robustly converges as kx(t)k22 ≤ b 2t 2 a α kx(0)k2 for any trajectory (p(t), δp(t)) ∈ P×V for t ≥ 0 with a and b given by (15). Proof: For the CT case, AQS is proven in [11, Thm. 3.2] while robust state convergence is proven similar to [27, Prop. 5.6]. For the DT case, see Theorem 3. Remark 2: Theorem 4 can also be applied for stability analysis under the assumption of a time-invariant scheduling signal, i.e., V = V = ∅ (robust analysis). In this simplification, all elements in (27) with respect to the time-variation become zero, i.e., Qc () = Qd () = 0 in (28) or (29). Remark 3: Theorem 4 implies that, for the CT case, the real parts of the eigenvalues of A(p) are negative for fixed values of p, i.e., Re (λi (A(p))) < −α ∀p ∈ P and, for the DT case, the eigenvalues are within a disc of radius α, i.e., |λi (A(p))| < α, ∀p ∈ P. This connects to well-known results on LMI regions, e.g., see [12]. Contrary to the LTI case, the location of the eigenvalues are a necessary, but not sufficient condition for stability in the parameter-varying case, as the contribution of Qk () in (26) cannot be neglected. V. A FFINE Q UADRATIC P ERFORMANCE A. Concept of dissipativity and performance The results on AQS of Section IV can be extended to quadratic performance measures, including L2 performance, positivity, and H2 performance. The LPV system corresponding to (1) is strictly dissipative for a given supply function s : Rnw × Rnz → R if there exist an ε > 0 and a storage function V () such that, ∆V (x, p, δp) ≤ s(w, z) − εkwk22 , (30) for all (w, p, δp, x, z) ∈ Rnw ×P×V×Rnx ×Rnz , e.g., see [27]. In other words, the change of internal storage ∆V (x, p, δp) will never exceed the amount of supply s() that flows into the system. The inequality (30) should be satisfied in a pointwise fashion, implying that (30) also holds for all admissible trajectories that satisfy (1). Additionally, we take s() to be the following quadratic supply function  ⊤     Q s Ss w w s(w, z) = , (31) , Ps = Ps z z Ss⊤ Rs where Ps ∈ Snw +nz is partitioned as Qs ∈ Snw , Ss ∈ Rnw ×nz , and Rs ∈ Snz . By appropriately parametrizing (31), various performance measures can be represented. We test feasibility of (30) with an affine parameter-dependent function (7), hence, V () qualifies as a quadratic storage function for (1) and (31). We say that the system (1) achieves affine quadratic performance (AQP) for (31) whenever such a quadratic storage function exists. B. L2 -Gain performance To simplify notation, we use L2 to indicate L2 in CT and ℓ2 in DT. Definition 4 (Induced L2 -gain): Any finite γ that satisfies kzk2 < γ, kwk 2 0<kwk2 <∞ sup p∈PT0 (32) 6 is an L2 -gain upper bound where z : T0 → Rnz is the response (performance variable) of (1) for t ≥ 0 under x0 = 0, general disturbance w ∈ L2 (Rnw , T0 ) in CT or w ∈ ℓ2 (Rnw , T0 ) in DT, and scheduling p ∈ PT0 . The L2 -gain performance measure of Definition 4 can be characterized by the supply function (31) by choosing Qs = γ 2 I, Ss = 0, Rs = −I, and ε > 0 [27, Prop. 3.12]. Lemma 3 (L2 -gain performance): Given an LPV system defined by (1) with dependency structure (2) where the scheduling variable p(t) satisfies A1. If there exist a γ > 0 and np + 1 matrices K0 , . . . , Knp ∈ Snx parametrizing K() in (8) such that K(p) ≻ 0, ∀p ∈ P, (33)  Lk (p, r) K(p)B(p) C (p) B⊤(p)K(p) −γI D⊤(p) ≺ 0, ∀(p, r) ∈ P×V, (34) C(p) D(p) −γI  ⊤ where Lk (p, r) as in (10), then the LPV system represented by (1) is AQS and has an L2 -gain performance bound γ. Proof: See that the (1, 1)-block of (34) implies AQS (Lemma 4). In addition, for ε > 0, Eq. (34) ensures that ∆V (x, p, δp) + z ⊤ z − γ 2 w⊤ w < 0, (35) for all admissible (w, p, δp, r, x, z). The choice of supply function implies the L2 -gain performance bound of Definition 4 based on similar arguments as in [27, Thm. 5.16]. As (33) and (34) impose an infinite number of LMIs, we make use of the partial-convexity argument to find an LMIbased test for AQP. Theorem 5 (Sufficiency for affine L2 -gain performance): Given an LPV system defined by (1) with dependency structure (2) where the scheduling variable p(t) satisfies A1. Define the following set of inequalities and equalities 2   Lk (u, v, α) K(u)B(u) C⊤(u)  B⊤(u)K(u) −γI D⊤ (u) 0, ∀(u, v) ∈ P×V, (36) C(u) D(u) −γI Nk (u, i, α)  0, Ki Bi = 0, n ∀(i, u) ∈ I1 p ×P, (37a) n ∀i ∈ I1 p , (37b) where Lk () and Nk () are defined in (26) and (27). For the CT case with k = c, if there exists an α > 0 such that Re (λi (A(pc ))) < −α with pc as in (5) and there exist np + 1 matrices K0 , . . . , Knp ∈ Snx such that (36)-(37) are satisfied, then the LPV system corresponding to (1) is AQS and has an L2 -gain performance bound γ. Moreover, V (x, p) in (7) is a Lyapunov function with ∆V (x, p, δp) ≤ −2αV (x, p) and the state x robustly converges as kx(t)k22 ≤ ab e−αt kx(0)k22 for any trajectory (p(t), δp(t)) ∈ P × V for t ≥ 0 with w(t) = 0 and a, b given by (15). For the DT case with k = d, if there exists an 0 < α < 1 such that |λi (A(pc ))| < α with pc as in (5) and there exist np + 1 matrices K0 , . . . , Knp ∈ Snx such that (26)-(27) are satisfied, then the LPV system corresponding to (1) is AQS 2 In terms of condition (37b), if any B for i = 1, . . . , n is full row rank p i then the corresponding Ki must be zero, hence, it can be removed from (36) and (37). If all Bi are full row rank, then we obtain a parameter-independent Lyapunov function. with ℓ2 -gain performance bound γ. In particular, V (x, p) in (7) is a Lyapunov function with ∆V (x, p, δp) ≤ −α2 V (x, p) and the state x robustly converges as kx(t)k22 ≤ ab α2t kx(0)k22 for any trajectory (p(t), δp(t)) ∈ P × V for t ≥ 0 with w(t) = 0 and a, b given by (15). Proof: Sufficiency for affine L2 -gain performance is obtained with robust state convergence if (36) holds together with the following set of inequalities:   Nk (u, i, α) Ki Bi n  0, for all (i, u) ∈ I1 p × P. (38) Bi⊤ Ki 0 This statement can be proven by straightforward application of Theorem 4 and Lemma 3. Hence, in the remainder of the proof it is shown that (38) is equivalent to (37). For the inequality (38) to hold, the blocks on the diagonal need to be positive semi-definite, i.e., Nk (u, i, α)  0. The matrix Nk () might be rank deficient, i.e., rank(Nk ()) = nN ≤ nx . Hence, after an appropriate congruence transform on (38), we obtain the following partition of (38):   ek (u, i, α) 0 Mi,1 N  ek (u, i, α) ≻ 0, (39) 0 0 Mi,2    0 with N  ⊤ ⊤ Mi,1 Mi,2 0 ek (u, i, α) ∈ SnN and [M ⊤ M ⊤ ]⊤ is the partition where N i,1 i,2 of Ki Bi after column and row re-arrangement with Mi,1 ∈ RnN ×nw , Mi,2 ∈ Rnx −nN ×nw . Note that, in case Nk () is ek () = Nk (), Mi,1 = Ki Bi , and Mi,2 = ∅. positive definite, N Then, perform a Schur transform on (39) to obtain that (39) is equivalent to   0 Mi,2  0, Ñk (u, i, α) ≻ 0. (40) ⊤ ⊤ e −1 Mi,2 −Mi,1 Nk (u, i, α)Mi,1 Then (40) implies that the blocks on the diagonal are required ⊤ e −1 to be positive semi-definite, i.e., −Mi,1 Nk ()Mi,1  0. As ek () is positive definite, the latter condition is met if and N only if: ⊤ e −1 Mi,1 Nk (u, i, α)Mi,1 = 0 ⇐⇒ Mi,1 = 0. Then, it follows from (40) that Mi,2 = 0. Next, the matrix Ki Bi can be reconstructed from elementary matrix operations based on Mi,1 and Mi,2 and we can conclude that Ki Bi = 0 (undo partition (39)). To obtain the minimum of γ satisfying (32), we solve minγ≥0 γ s.t. (36)-(37) hold. This convex optimization problem can be solved efficiently by numerical LMI solvers. VI. N UMERICAL EXAMPLE In this section, the AQS and AQP results are demonstrated on the mass-spring-damper system from [11] with timeinvariant and time-varying parameters. For the simulation example, Matlab 2014b with Yalmip and SeDuMi3 are used. The system is discretized using a first-order approximation [28]:   0 u(t), x(t + 1) = Ad (f (t), c(t)) x(t) + Ts   0 1 (41) Ad (k, c) = I + Ts Ac (k, c), Ac (k, c) = , −k −c   y(t) = 1 0 x(t), 7 where Ts = 1/20 s is the sampling time and k > 0, c > 0 are the stiffness and the damping coefficients, which are assumed to be time-varying. The admissible trajectories of k and c are   c(t) = c0 1 + p2 (t) , (42) k(t) = k0 1 + p1 (t) , Partial-convexity Slack variable [17] Quadratic stability [29] 0.8 λ [-] 0.6 ǫ=0 0.4 ǫ = 0.01 ǫ = 0.02 0.2 ǫ = 0.03 ǫ = 0.04 0 10−5 10−4 10−3 10−2 10−1 100 101 102 δkmax [-] Figure 1: Maximum of λ to guarantee AQS w.r.t. λP under time-invariant c (δcmax = 0) and time-varying k, where ǫ indicates the guaranteed rate of convergence of the state, i.e., kxt k22 ≤ ab (1 − ǫ)t kx0 k22 for all t > 0. The orange area indicates numerical problems with the partial-convexity method using ǫ = 0. Partial-convexity Slack variable [17] ǫ = 0.0357 102 ǫ = 0.025 γ [-] ǫ = 0.0321 ǫ = 0.0286 101 ǫ = 0.02 ǫ = 0.01 ǫ=0 100 10−5 10−4 10−3 10−2 10−1 100 101 102 δkmax [-] Figure 2: Minimum of the L2 -gain performance bound γ with time-invariant c (δcmax = 0) and time-varying k. The dots indicate the last point of feasibility. 0.8 λ [-] where k0 = 1, c0 = 1, P = [−1, 1] × [−1, 1], and V = [−δkmax , δkmax ] × [−δcmax , δcmax ]. The following three experiments are performed: 1) For time-invariant c (δcmax = 0) and time-varying k, the parameter box λP := {λp : p ∈ P} is uniformly expanded with 0 < λ ≤ 1 to find the maximum λ for which stability is guaranteed. This is done with respect  to values of δkmax ∈ 10−5 , 102 and ǫ ∈ [0, 1]. The results are shown in Fig. 1. 2) For time-invariant c (δcmax = 0) and time-varying k, the performance gain for 0.2P. This is done  γ is computed  w.r.t. δkmax ∈ 10−5 , 102 and ǫ ∈ [0, 1]. The results are shown in Fig. 2. 3) For time-varying k and c, the parameter box λP is expanded to find the maximum λ for which  −5 stability  is 2 guaranteed. This is done w.r.t. δk ∈ 10 , 10 and max   δcmax ∈ 10−4 , 102 . The results are shown in Fig. 3. Note that the case of time-invariant k (δkmax = 0) is not considered, as it is pointed out in [11]: ‘the stability region seems to be essentially determined by δkmax ’. Fig. 1 shows that the slack variable method [17] is indeed more conservative (in line with [17, Thm. 1]). This difference is clearly visible for small δkmax . For larger values of δkmax , the maximum parameter box size coincides with the quadratic stability test (δkmax = ∞), as expected. Furthermore, in the region δkmax ∈ [0.03, 0.5], the slack variable method seems to outperform the proposed partial-convexity argument based method. Our method experiences numerical problems in the orange area for ǫ = 0, see Fig. 1. In this area, neither feasibility or infeasibility can be concluded. Hence, for the proposed method, more research needs to be performed to improve numerical properties, but it is unclear if the slack variable method really outperforms the partial-convexity argument in that orange area. A similar result is also obtained for the L2 gain analysis in Fig. 2 (the area indicating numerical problems is not displayed in the figure). Fig. 1 is similar to [11, Fig. 1] (CT case) in terms of the shape, as expected. However, the domain where the magnitude of λ decreases is shifted by a factor 10, which is due to the discretization of the model. Furthermore, Fig. 3 shows that the maximum size of the parameter box is almost independent on δcmax , as has also been seen for the CT case [11]. 1 0.6 VII. C ONCLUSION In this paper, we have proposed an LMI-based analysis for robust stability, robust state convergence, and robust performance of linear systems against uncertain and/or time-varying parameters. Affine quadratic stability is certified by finding a Lyapunov function, which is affine in the parameter. In order to get a tractable solution, the partial-convexity argument of [11] is extended for third-order terms to handle the discretetime case. In our simulation example, the partial-convexity 10−4 101 10−2 δkmax −1 10 100 102 10−3 δcmax Figure 3: Maximum of λ to guarantee AQS w.r.t. λP for a time-varying k and c with the partial-convexity method. 8 argument seems to be less conservative than the quadratic stability or the slack variable approach. For future research, the DT results can be extended to Lyapunov functions with quadratic dependence on the scheduling signal, similar to the CT case in [30]. Alternatively, the DT result can be extended to the incremental stability framework for LPV systems with bounded rates of variations [31]. R EFERENCES [1] J. S. Shamma, Analysis and design of gain scheduled control systems. PhD thesis, Massachusetts Institute of Technology, 1988. [2] J. Mohammadpour and C. Scherer, eds., Control of Linear Parameter Varying Systems with Applications. Springer, 2012. [3] C. Briat, Linear Parameter-Varying and Time-Delay Systems: Analysis, Observation, Filtering & Control. Springer, 2015. [4] K. Zhou, J. C. Doyle, and K. Glove, Robust and Optimal Control. Prentice hall, 1996. [5] Y. Ebihara, D. Peaucelle, and D. Arzelier, S-Variable Approach to LMIBased Robust Control. Springer London, 2015. [6] A. Megretski and A. Rantzer, “System analysis via integral quadratic constraints,” IEEE Trans. on Automatic Control, vol. 42, no. 6, pp. 819– 830, 1997. [7] A. Helmersson, “An IQC-based stability criterion for systems with slowly varying parameters,” in Proc. of the 14th IFAC World Congress, (Beijing, China), Jun. 1999. [8] V. Powers and B. Reznick, “A new bound for Pólya’s Theorem with applications to polynomials positive on polyhedra,” J. of Pure and Applied Algebra, vol. 164, pp. 221–229, 2001. [9] A. P. Molchanov and D. Liu, “Robust absolute stability of time-varying nonlinear discrete-time systems,” IEEE Trans. on Circuits and Systems I: Fundamental Theory and Applications, vol. 49, no. 8, pp. 1129–1137, 2002. [10] H. Köroğlu and C. W. Scherer, “Robust performance analysis for structured linear time-varying perturbations with bounded rates-of-variation,” IEEE Trans. on Automatic Control, vol. 52, no. 2, pp. 197–211, 2007. [11] P. Gahinet, P. Apkarian, and M. Chilali, “Affine parameter-dependent Lyapunov functions and real parametric uncertainty,” IEEE Trans. on Automatic Control, vol. 41, no. 3, pp. 436–442, 1996. [12] M. Chilali, P. Gahinet, and P. Apkarian, “Robust pole placement in LMI regions,” IEEE Trans. on Automatic Control, vol. 44, no. 12, pp. 2257– 2270, 1999. [13] M. S. Mahmoud, “Discrete-time systems with linear parameter-varying: stability vand H∞ ,” J. of Mathematical Analysis and Applications, vol. 269, no. 1, pp. 369–381, 2002. [14] M. C. de Oliveira, J. C. Geromel, and Liu Hsu, “LMI characterization of structural and robust stability: the discrete-time case,” Linear Algebra and its Applications, vol. 296, pp. 27–38, 1999. [15] F. Blanchini and S. Miani, “A new class of universal Lyapunov functions for the control of uncertain linear systems,” IEEE Trans. on Automatic Control, vol. 44, no. 3, pp. 641–647, 1999. [16] J. Daafouz and J. Bernussou, “Parameter dependent Lyapunov functions for discrete time systems with time varying parametric uncertainties,” Systems & Control Letters, vol. 43, no. 5, pp. 355–359, 2001. [17] C. E. de Souza, K. A. Barbosa, and A. T. Neto, “Robust H∞ filtering for discrete-time linear systems with uncertain time-varying parameters,” IEEE Trans. on Signal Processing, vol. 54, no. 6, pp. 2110–2118, 2006. [18] F. Amato, M. Mattei, and A. Pironti, “Gain scheduled control for discrete-time systems depending on bounded rate parameters,” Int. J. of Robust and Nonlinear Control, vol. 15, no. 11, pp. 473–494, 2005. [19] T. Iwasaki and G. Shibata, “LPV system analysis via quadratic separator for uncertain implicit systems,” IEEE Trans. on Automatic Control, vol. 46, no. 8, pp. 1195–1208, 2001. [20] D. Peaucelle, D. Arzelier, D. Henrion, and F. Gouaisbaut, “Quadratic separation for feedback connection of an uncertain matrix and an implicit linear transformation,” Automatica, vol. 43, pp. 795–804, 2007. [21] C.-P. Wei and L. Lee, “Stability analysis of discrete LPV systems subject to rate-bounded parameters,” in Proc. of the 17th IFAC World Congress, (Seoul, Korea), pp. 6383–6388, Jul. 2008. [22] M. C. de Oliveira and R. E. Skelton, “Stability tests for constrained linear systems,” in Perspectives in Robust Control (S. Reza Moheimani, ed.), ch. 15, pp. 241–257, Springer London, 2001. [23] C. W. Scherer, “LMI relaxations in robust control,” European J. of Control, vol. 12, pp. 3–29, 2006. [24] J. Veenman, C. W. Scherer, and H. Köroğlu, “Robust stability and performance analysis based on integral quadratic constraints,” European J. of Control, vol. 31, pp. 1–32, 2016. [25] H. K. Khalil, Nonlinear Systems. Prentice Hall, 3th ed., 2002. [26] J. B. Rawlings and D. Q. Mayne, Model Predictive Control: Theory and Design. Nob Hill Publishing, fifth ed., 2015. [27] C. Scherer and S. Weiland, “Linear matrix inequalities in control.” Lecture Notes for a course of the Dutch Institute of Systems and Control, Mar. 2015. [28] R. Tóth, Modeling and Identification of Linear Parameter-Varying Systems. Springer, 2010. [29] M. C. de Oliveira, J. Bernussou, and J. C. Geromel, “A new discretetime robust stability condition,” Systems & Control Letters, vol. 37, no. 4, pp. 261–265, 1999. [30] A. Trofino and C. E. de Souza, “Biquadratic stability for uncertain linear systems,” IEEE Trans. on Automatic Control, vol. 46, no. 8, pp. 1303– 1307, 2001. [31] G. Scorletti, V. Fromion, and S. de Hillerin, “Toward nonlinear tracking and rejection using LPV control,” in Proc. of the 1st IFAC Workshop on Linear Parameter Varying Systems, (Grenoble, France), pp. 13–18, Oct. 2015. A PPENDIX ∗ For sufficiency, let p = (p∗1 , . . . , p∗np ) be the global maximizer of L() over P. Assume that p∗i is not at a vertex of the hyper-rectangle, i.e., pi < p∗i < pi , then g(pi ) = L(p∗1 , . . . , p∗i−1 , pi , p∗i+1 , . . . , p∗np ) = F0,i + pi F1,i + p2i F2,i + Qi,i,i p3i , (43) where F0,i = Q0 + np X Qj p∗j + j=1 j6=i np np X Qj,k p∗j p∗k + j,k=1 j,k6=i np X Qj,k,l p∗j p∗k p∗l , j,k,l=1 j,k,l6=i  X (Qi,j + Qj,i )p∗j + F1,i = Qi + j=1 j6=i np X  (Qi,j,k + Qj,i,k + Qj,k,i )p∗j p∗k , j,k=1 j,k6=i np   X (Qj,i,i + Qi,j,i + Qi,i,j )p∗j . F2,i = Qi,i + j=1 j6=i Since p∗ is the global maximizer of L(), it holds that y⊤g(p∗i )y ≥ max(y⊤g(pi )y, y⊤g(pi )y), (44) where y 6= 0. On the other hand, Condition (11) imposes convexity of 2 g(pi ) g(pi ) on [pi , pi ], i.e., 21 ∂ ∂p = F2,i +3Qi,i,i pi  0 is implied 2 i by (11). Therefore its maximum on that interval is on the edges pi , pi . So, y⊤g(p∗i )y ≤ max(y⊤g(pi )y, y⊤g(pi )y). (45) Combining (44) and (45) leads to y⊤g(p∗i )y = max(y⊤g(pi )y, y⊤g(pi )y). (46) Concluding, the maximum of g() is obtained at the edges {pi , pi } of pi in case (11) is satisfied. By repeating the same argument for each i implies that the maximum of the function L() is at a vertex of the hyper-rectangle P when Condition (11) is satisfied.
3cs.SY
arXiv:1706.00382v1 [q-bio.NC] 1 Jun 2017 Blind nonnegative source separation using biological neural networks Cengiz Pehlevan1 , Sreyas Mohan1,2 , and Dmitri B. Chklovskii1,3 1 Center for Computational Biology, Flatiron Institute, New York, NY 2 IIT Madras, Chennai, India 3 NYU Medical School, New York, NY Abstract Blind source separation, i.e. extraction of independent sources from a mixture, is an important problem for both artificial and natural signal processing. Here, we address a special case of this problem when sources (but not the mixing matrix) are known to be nonnegative, for example, due to the physical nature of the sources. We search for the solution to this problem that can be implemented using biologically plausible neural networks. Specifically, we consider the online setting where the dataset is streamed to a neural network. The novelty of our approach is that we formulate blind nonnegative source separation as a similarity matching problem and derive neural networks from the similarity matching objective. Importantly, synaptic weights in our networks are updated according to biologically plausible local learning rules. 1 Introduction Extraction of latent causes, or sources, from complex stimuli is essential for making sense of the world. Such stimuli could be mixtures of sounds, mixtures of odors, or natural images. If supervision, or ground truth, about the causes is lacking, the problem is known as blind source separation. The blind source separation problem can be solved by assuming a generative model, wherein the observed stimuli are linear combinations of independent sources, an approach known as Independent Component Analysis (ICA) (Jutten and Herault, 1991; Comon, 1994; Bell and Sejnowski, 1995; Hyvärinen and Oja, 2000). Formally, 1 the stimulus at time t is expressed as a k-component vector xt = Ast , (1) where A is an unknown but time-independent k ×d mixing matrix and st represents the signals of d sources at time t. In this paper we assume that k ≥ d. The goal of ICA is to infer source signals, st , from the stimuli xt . Whereas many ICA algorithms have been developed by the signal processing community (Comon and Jutten, 2010), most of them cannot be implemented by biologically plausible neural networks. Yet, our brains can solve the blind source separation problem effortlessly (Bronkhorst, 2000; Asari et al., 2006; Narayan et al., 2007; Bee and Micheyl, 2008; McDermott, 2009; Mesgarani and Chang, 2012; Golumbic et al., 2013; Isomura et al., 2015). Therefore, discovering a biologically plausible ICA algorithm is an important problem. For an algorithm to be implementable by biological neural networks it must satisfy (at least) the following requirements. First, it must operate in the online (or streaming) setting. In other words, the input dataset is not available as a whole but is streamed one data vector at a time and the corresponding output must be computed before the next data vector arrives. Second, the output of most neurons in the brain (either a firing rate, or the synaptic vesicle release rate) is nonnegative. Third, the weights of synapses in a neural network must be updated using local learning rules, i.e. depend on the activity of only the corresponding pre- and postsynaptic neurons. Given the nonnegative nature of neuronal output we consider a special case of ICA where sources are assumed to be nonnegative, termed Nonnegative Independent Component Analysis (NICA), (Plumbley, 2001, 2002). Of course, to recover the sources, one can use standard ICA algorithms that don’t rely on the nonnegativity of sources, such as fastICA (Hyvärinen and Oja, 1997; Hyvarinen, 1999; Hyvärinen and Oja, 2000). Neural learning rules have been proposed for ICA, e.g. (Linsker, 1997; Eagleman et al., 2001; Isomura and Toyoizumi, 2016) and references within. However, taking into account nonnegativity may lead to simpler and more efficient algorithms (Plumbley, 2001, 2003; Plumbley and Oja, 2004; Oja and Plumbley, 2004; Yuan and Oja, 2004; Zheng et al., 2006; Ouedraogo et al., 2010; Li et al., 2016). While most of the existing NICA algorithms have not met the biological plausibility requirements, in terms of online setting and local learning rules, there are two notable exceptions. First, Plumbley (2001) succesfully simulated a neural network on a small dataset, yet no theoretical analysis was given. Second, Plumbley (2003) and Plumbley and Oja (2004) proposed a nonnegative PCA algorithm for a streaming setting, however its neural implementation requires nonlocal learning rules. Further, this algorithm requires prewhitened data (see also below), yet no streaming whitening algorithm was given. 2 Here, we propose a biologically plausible NICA algorithm. The novelty of our approach is that the algorithm is derived from the similarity matching principle which postulates that neural circuits map more similar inputs to more similar outputs (Pehlevan et al., 2015). Previous work proposed various objective functions to find similarity matching neural representations and solved these optimization problems with biologically plausible neural networks (Pehlevan et al., 2015; Pehlevan and Chklovskii, 2015a, 2014; Hu et al., 2014; Pehlevan and Chklovskii, 2015b). Here we apply these networks to NICA. The rest of the paper is organized as follows: In Section 2, we show that blind source separation, after a generalized prewhitening step, can be posed as a nonnegative similarity matching (NSM) problem (Pehlevan and Chklovskii, 2014). In Section 3, using results from (Pehlevan and Chklovskii, 2015a, 2014) we show that both the generalized prewhitening step and the NSM step can be solved online by neural networks with local learning rules. Stacking these two networks leads to the two-layer NICA network. In Section 4, we compare the performance of our algorithm to other ICA and NICA algorithms for various datasets. 2 Offline NICA via NSM In this section, we first review Plumbley’s analysis of NICA and then reformulate NICA as an NSM problem. 2.1 Review of Plumbley’s analysis When source signals are nonnegative, the source separation problem simplifies. It can be solved in two straightforward steps: noncentered prewhitening and orthonormal rotation (Plumbley, 2002). d Noncentered prewhitening transforms x to h := D Fx, where h ∈ R E and F > 1 is a d × k whitening matrix , such that Ch := (h − hhi) (h − hhi) = Id , where angled brackets denote an average over the source distribution and Id is the d × d identity matrix. Note that the mean of x is not removed in the tranformation, otherwise one would not be able to use the constraint that the sources are nonnegative (Plumbley, 2003). Assuming that sources have unit variance2 , D E Cs := (s − hsi) (s − hsi)> = Id , 1 (2) In his analysis Plumbley (Plumbley, 2002) assumed k = d (mixture channels are the same as source channels) but this assumption can be relaxed as shown. 2 Without loss of generality, a scalar factor that multiplies a source can always be absorbed into the corresponding column of the mixing matrix 3 Mixtures Sources s2 4 x2 2 6 4 h2 2 0 0 -6 Prewhitened 6 6 -4 -2 0 s1 2 4 6 -6 4 2 0 -4 -2 0 x1 2 4 6 -6 -4 -2 0 h1 2 4 Figure 1: Illustration of the NICA algorithm. Two source channels (left) are linearly transformed to a two-dimensional mixture (middle). Prewhitening (right) gives an orthogonal transformation of the sources. Sources are then recovered by solving the NSM problem (7). Green and red plus signs track two source vectors across mixing and prewhitening stages. the combined effect of source mixing and prewhitening FA (h = Fx = FAs) is an orthonormal rotation. To see this, note that, by definition, Ch = (FA) Cs (FA)> = (FA) (FA)> and Ch = Id . The second step of NICA relies on the following observation (Plumbley, 2002): Theorem 1 (Plumbley). Suppose sources are independent, nonnegative and wellgrounded, i.e. Prob(si < δ) > 0 for any δ > 0. Consider an orthonormal transformation y = Qs. Then Q is a permutation matrix with probability 1, if and only if y is nonnegative. In the second step, we look for an orthonormal Q such that y = Qh is nonnegative. When found, Plumbley’s theorem guarantees that QFx is a permutation of the sources. Several algorithms have been developed based on this observation (Plumbley, 2003; Plumbley and Oja, 2004; Oja and Plumbley, 2004; Yuan and Oja, 2004). Note that only the sources s but not necessarily the mixing matrix A must be nonnegative. Therefore, NICA allows generative models, where features not only add up but also cancel each other, as in the presence of a shadow in an image (Plumbley, 2002). In this respect, NICA is more general than Nonnegative Matrix Factorization (NMF) (Lee and Seung, 1999; Paatero and Tapper, 1994) where both the sources and the mixing matrix are required to be nonnegative. 2.2 NICA as NSM Next we reformulate NICA as a NSM problem. This reformulation will allow us to derive an online neural network for NICA in Section 3. Our main departure from 4 6 Plumbley’s analysis is to work with similarity matrices rather than covariance matrices and finite number of samples rather than the full probability distribution of the sources. First, let us switch to the matrix notation, where data matrices are formed by concatenating data column vectors, e.g. X = [x1 , x2 , ..., xt ] so that X ∈ Rk×t , and S = [s1 , s2 , ..., st ] so that S ∈ Rd×t . In this notation, we introduce a time-centering operation δ such that, for example, time-centered stimuli are δX := X − X̄ where X̄ := X 1t 11> and 1 is a t dimensional column vector whose elements are all 1’s. Our goal is to recover S from X = AS, where A is unknown. We make the following two assumptions: First, sources are nonnegative and decorrelated, 1 δS δS> = Id . Note that while general ICA and NICA problems are stated with t the independence assumption on the sources, for our purposes, it is sufficient that they are only decorrelated. Second, the mixing matrix, A ∈ Rk×d (k ≥ d), is full-rank. We propose that the source matrix, S, can be recovered from X in the following two steps, also illustrated in Fig. 1: 1. Generalized Prewhitening: Transform X to H = FX, where F is l × k with l ≥ d, so that 1t δH δH> has d unit eigenvalues and l − d zero eigenvalues. When l = d, H is whitened, otherwise channels of H are correlated. Such prewhitening is useful because it implies H> H = S> S according to the following theorem. Theorem 2. If F ∈ Rl×k (l ≥ k) is such that H = FX obeys 1 > δH δH> = UH ΛH UH , t (3)   an eigenvalue decomposition with ΛH = diag 1, . . . , 1, 0, . . . , 0 , then | {z } | d {z l−d } H> H = S> S. (4) Proof. To see why (3) is sufficient, first note that 1t δH δH> = (FA) (FA)> . This follows from the definition of H and (2). If (3) holds, then > (FA) (FA)> = UH ΛH UH . (5) In turn, this is sufficient to prove that (FA)> (FA) = Id . To see that, assume an > > SVD decomposition of (FA) = UF A ΛF A VF A . (5) implies that ΛF A ΛF A = ΛH , i.e. that the d diagonal elements of ΛF A ∈ Rl×d are all 1’s. Then, (FA)> (FA) = Id . This gives us the desired results H> H = S> (FA)> (FA) S = S> S. 5 (6) Remark 1. If l > d, the channels of H are correlated, except in the special case UH = Id . The whitening used in Plumbley’s analysis (Plumbley, 2002) requires l = d. 2. NSM: Solve the following optimization problem: Y∗ = arg min H> H − Y> Y Y, Y≥0 2 F (7) , where the optimization is performed over nonnegative Y := [y1 , . . . , yt ] i.e. yi ∈ Rd+ . We call (7) the NSM cost function (Pehlevan and Chklovskii, 2014). Because inner products quantify similarities we call H> H and Y> Y input and output similarity matrices, i.e. their elements hold the pairwise similarities between input and the pairwise similarities between output vectors, respectively. Then, the cost function (7) preserves the input similarity structure as much as possible under the nonnegativity constraint. Variants of (7) has been considered in applied math literature under the name “nonnegative symmetric matrix factorization” for clustering applications, e.g. (Kuang et al., 2012, 2015). Now we make our key observation. Using Theorem 2, we can rewrite (7) as Y∗ = arg min S> S − Y> Y Y, Y≥0 2 F (8) . Since both S and Y are nonnegative, rank-d matrices, Y∗ = PS, where P is a permutation matrix, is a solution to this optimization problem and the sources are successfully recovered. Uniqueness of the solutions (up to permutations) is hard to establish. While both sufficient conditions, and necessary and sufficient conditions for uniqueness exist, these are non-trivial to verify and usually the verification is NP-complete (Donoho and Stodden, 2003; Laurberg et al., 2008; Huang et al., 2014). A review of related uniqueness results can be found in (Huang et al., 2014). A necessary condition for uniqueness given in (Huang et al., 2014) states that, if the factorization of S> S to Y> Y is unique (up to permutations), then each row of S contains at least one element that is equal to 0. This necessary condition is similar to Plumbley’s well-groundedness requirement used in proving Theorem 1. The NSM problem can be solved by projected gradient descent,     Y ←− max Y + η YH> H − YY> Y , 0 , (9) where the max operation is applied elementwise, and η is the size of the gradient step. Other algorithms can be found in (Kuang et al., 2012, 2015; Huang et al., 2014). 6 3 Derivation of NICA neural networks from similarity matching objectives Our analysis in the previous section revealed that the NICA problem can be solved in two steps: generalized prewhitening and nonnegative similarity matching. Here, we derive neural networks for each of these steps and stack them to give a biologically plausible two-layer neural network that operates in a streaming setting. In a departure from the previous section, the number of output channels is reduced to the number of sources at the prewhitening stage rather than the later NSM stage (l = d). This assumption simplifies our analysis significantly. The full problem is addressed in Appendix B. 3.1 Noncentered prewhitening in a streaming input setting To derive a neurally plausible online algorithm for prewhitening, we pose generalized prewhitening, Eq. (3), as an optimization problem. Online minimization of this optimization problem gives an algorithm that can be mapped to the operation of a biologically plausible neural network. Generalized prewhitening solves a constrained similarity alignment problem:  max Tr δX> δX δH> δH  δH s.t. δH> δH  tIt , (10) where δX is the k × t centered mixture of d independent sources and δH is a d × t matrix, constrained such that tIt − δH> δH is positive semidefinite. The solution of this objective aligns similarity matrices δX> δX and δH> δH so that their right singular vectors are the same (Pehlevan and Chklovskii, 2015a). Then, the objective under the trace diagonalizes and its value is the sum of eigenvalue pair products. Since the eigenvalues of δH> δH are upper bounded by t, the objective (10) is maximized by setting the eigenvalues of δH> δH that pair with the top d eigenvalues of δX> δX to t, and the rest to zero. Hence, the optimal δH satisfies the generalized prewhitening condition (3)(Pehlevan and Chklovskii, 2015a). More formally, Theorem 3 (Modified from (Pehlevan and Chklovskii, 2015a)). Suppose an eigen> decomposition of δX> δX is δX> δX = VX ΛX VX , where eigenvalues are sorted in decreasing order. Then, all optimal δH of (10) have an SVD decomposition of the form √ 0 > δH∗ = UH t ΛH VX , (11) 0 where ΛH is d × t with d ones on top of the diagonal and zeros on the rest of the diagonal. 7 The theorem implies that, first, 1t δH∗ δH∗ > = Id , and hence δH satisfies the generalized prewhitening condition (3). Second, F, the linear mapping between δH∗ and δX, can be constructed using an SVD decomposition of δX and (11). The constraint in (10) can be introduced into the objective function using as a Lagrange multiplier the Grassmanian of matrix δG ∈ Rm×t with (m ≥ d):   min max Tr −δX> δX δH> δH + δG> δG δH> δH − tIt δH  δG (12) , This optimization problem (Pehlevan and Chklovskii, 2015a) will be used to derive an online neural algorithm. Whereas the optimization problem (12) is formulated in the offline setting, i.e. outputs are computed only after receiving all inputs, to derive a biologically plausible algorithm, we need to formulate the optimization problem in the online setting, i.e. the algorithm receives inputs sequentially, one at a time, and computes an output before the next input arrives. Therefore, we optimize (12) only for the data already received and only with respect to the current output:   {δht , δgt } ←− arg min arg max Tr −δX> δX δH> δH + δH> δH δG> δG − t δG> δG . gt δht (13) By keeping only those terms that depend on δht or δgt , we get the following objective: {δht , δgt } ←− arg min arg max L(δht , δgt ), (14) δgt δht where L= −2δxt> t−1 X ! δxt0 δht>0 δht − t kδgt k22 + 2δgt> t0 =1 t−1 X ! δgt0 δht>0 δht t0 =1   + kδgt k22 − kδxt k22 kδht k22 . (15) In the large-t limit, the first three terms dominate over the last term, which we ignore. The remaining objective is strictly concave in δgt and convex in δht . We assume that the matrix 1 t t−1 P t0 =1 δht0 δgt>0 is full-rank. Then, the objective has a unique saddle point : δgt∗ = WtGH δht∗ ,  δht∗ = WtHG WtGH 8 −1 WtHX δxt , (16) where, WtHX := t−1 1X δht0 δxt>0 , t t0 =1 WtGH > WtHG WtHG := t−1 1X δht0 δgt>0 , t t0 =1 0 := −1 1 tX := δgt0 δht>0 . t t0 =1 (17) −1  WtHX can be interpreted as the current estimate of Hence, Ft := WtHG WtGH the prewhitening matrix, F. We solve (14) with a gradient descent-ascent dδht 1 = − ∇δht L = WtHX δxt − WtHG gt , dγ 2t 1 dδgt = ∇δgt L = −δgt + WtGH δht . dγ 2t (18) where γ measures “time” within a single time step of t. Biologically, this is justified if the activity dynamics converges faster than the correlation time of the input data. The dynamics (18) can be proved to converge to the saddle point of the objective (15), see Appendix A. Equation (18) describes the dynamics of a single-layer neural network with two-populations, Fig. 2. WtHX represents the weights of feedforward synaptic connections, WtHG and WtGH represent the weights of synaptic connections between the two populations. Remarkably, synaptic weights appear in the online algorithm despite their absence in the optimization problem formulations (12) and (13). Furthermore, δht neurons can be associated with principal neurons of a biological circuit and δgt neurons with interneurons. Finally, using the definition of synaptic weight matrices (17), we can formulate recursive update rules:  1  δht δxt> − WtHX , t+1  1  = WtHG + δht δgt> − WtHG , t+1  1  GH = Wt + δgt δht> − WtGH . t+1 HX Wt+1 = WtHX + HG Wt+1 GH Wt+1 (19) Equations (18) and (19) define a neural algorithm that proceeds in two phases. After each stimulus presentation, first, (18) is iterated until convergence by the dynamics of neuronal activities. Second, synaptic weights are updated according to local, anti-Hebbian (for synapses from interneurons) and Hebbian (for all other synapses) rules (19). Biologically, synaptic weights are updated on a slower timescale than neuronal activity dynamics. 9 Mixing Prewhitening { s1 { { x1 h1 x2 s2 NSM y1 g1 sd ... ... A gm xk Principal yd hd Hebbian Inter-neurons anti-Hebbian synapses Figure 2: Biologically plausible network for blind source separation. The prewhitening stage is composed of two populations of linear neurons. The NSM stage has a single population of rectifying neurons. Our algorithm can be viewed as a special case of the algorithm proposed in (Plumbley, 1996, 1994). Plumbley analyzed the convergence of synaptic weights (Plumbley, 1994) in a stochastic setting by a linear stability analysis of the stationary point of synaptic weight updates. His results are directly applicable to our algorithm, and show that, if the synaptic weights of our algorithm converge to a stationary state, they whiten the input. Importantly, unlike (Plumbley, 1996, 1994) which proposed the algorithm heuristically, we derived it by posing and solving an optimization problem. 3.1.1 Computing H̄ The optimization problem (12) and the corresponding neural algorithm, Eqs. (18) and (19) almost achieve what is needed for noncentered prewhitening, but we still need to find H̄, since for the NSM step we need H = δH + H̄. We now discuss how H̄ can be learned along with δH using the same online algorithm. Our online algorithm for centered-whitening is of the following form. First, a neural dynamics stage outputs a linear transformation of the input: δht = Ft δxt , (20) and, second, synaptic weights and, hence, Ft are updated: Ft+1 = Ft + δFt (t, δht , δgt , Ft ). (21) We can supplement this algorithm with a running estimate of h̄. Let the running 10 estimate of average stimulus activity be t 1 1 1X xt0 = 1 − x̄t−1 + xt . x̄t = t t0 =1 t t (22) h̄t = Ft x̄t . (23)   Then, Alternatively, (20) and (23) can be combined into a single step: ht = Ft xt , (24) where the network receives uncentered stimuli and prewhitenes it. Note that assignment (24) can still be done by iterating (18), except now the input is xt rather than δxt . However, synaptic weights are still updated using δxt = xt − x̄t , δht = ht − h̄t and δgt = gt − ḡt . Therefore we keep recursive estimates of the means. Substituting (22) into (24) and using (21) 1 1 1 h̄t−1 + 1 − h̄t = 1 − δFt−1 x̄t−1 + ht . t t t      (25)  The term 1 − 1t δFt−1 x̄t−1 requires non-local calculations. Assuming that in the large-t limit updates to F are small, we can ignore this term and obtain a recursion: 1 1 h̄t = 1 − h̄t−1 + ht . t t   (26) Finally, a similar argument can be given for ḡt . We keep a recursive estimate of ḡt :  ḡt = 1 − 1 1 ḡt−1 + gt . t t  (27) To summarize, when a new stimulus xt is observed, the algorithm operates in two steps. In the first step, the following two-population neural dynamics runs until convergence to a fixed point: dht = WtHX xt − WtHG gt , dγ dgt = −gt + WtGH ht , dγ (28) The convergence proof for neural dynamics (18) given in Appendix A also applies here. Besides the synaptic weight, each neuron remembers its own average activity 11 and each synapse remembers average incoming activity. In the second step of the algorithm, the average activities are updated by: 1 1 x̄t−1 + xt , t t  1 1 h̄t = 1 − h̄t−1 + ht , t t  1 1 ḡt = 1 − ḡt−1 + gt . t t Synaptic weight matrices are updated recursively by  x̄t = 1 −  (29)  1  δht δxt> − WtHX , t+1  1  HG Wt+1 = WtHG + δht δgt> − WtHG , t+1  1  GH Wt+1 δgt δht> − WtGH . = WtGH + (30) t+1 Once the synaptic updates are done, the new stimulus, xt+1 , is processed. We note again that all the synaptic update rules are local, and hence are biologically plausible. HX = WtHX + Wt+1 3.2 Online NSM Next, we derive the second-layer network which solves the NSM optimization problem (7) in an online setting (Pehlevan and Chklovskii, 2014). The online optimization problem is: yt ←− arg min H> H − Y> Y yt , yt ≥0 2 F (31) . Proceeding as before, let’s rewrite (31) keeping only terms that depend on yt : yt ←− arg min yt , yt ≥0 2yt> t−1 X ! yt0 yt>0 yt − 4ht> t0 =1 t−1 X ! ht0 yt>0 ! yt + kyt k42 − 2 kht k22 kyt k22 t0 =1 (32) In the large-t limit, the last two terms can be ignored and the remainder is a quadratic form in yt . We minimize it using coordinate descent (Wright, 2015) which is both fast and neurally plausible. In this approach, neurons are updated one-by-one by performing an exact minimization of (32) with respect to yt,i until convergence: yt,i ←−  X max  W Y H ht,j t,ij j 12  YY − Wt,ij yt,j , 0 , (33) . where YH Wt,ij Pt−1 = t0 =1 yt0 ,i ht0 ,j , Pt−1 2 t0 =1 yt0 ,i YY Wt,i,j6 =i Pt−1 yt0 ,i yt0 ,j , 2 t0 =1 yt0 ,i t0 =1 = Pt−1 YY = 0. Wt,ii (34) For the next time step (t + 1), we can update the synaptic weights recursively, giving us the following local learning rules: 2 Dt+1,i = Dt,i + yt,i , YH YH Wt+1,ij = Wt,ij + YY YY Wt+1,i,j6 =i = Wt,ij 1   2 YH yt,i ht,j − yt,i Wt,ij , Dt+1,i  1  2 YY + yt,i yt,j − yt,i Wt,ij , Dt+1,i YY Wt,ii = 0. (35) Interestingly, these update rules are local and are identical to the single-neuron Oja rule (Oja, 1982), except that the learning rate is given explicitly in terms of cumulative activity 1/Dt,i and the lateral connections are anti-Hebbian. After the arrival of each data vector, the operation of the complete two-layer network algorithm, Fig. 2, is as follows. First, the dynamics of the prewhitening network runs until convergence. Then the output of the prewhitening network is fed to the NSM network, and the NSM network dynamics runs until convergence to a fixed point. Synaptic weights are updated in both networks for processing the next data vector. 3.2.1 NICA is a stationary state of online NSM Here we show that the solution to the NICA problem is a stationary synaptic weights state of the online NSM algorithm. In the stationary state the expected updates to synaptic weights are zero, i.e. D E D ∆WijY H = 0, E ∆WijY Y = 0, (36) where we dropped the t index, and brackets denote averages over the source distribution. Suppose the stimuli obey the NICA generative model, Eq. (1), and the observed mixture, xt , is whitened with the exact (generalized) prewhitening matrix F described in Theorem 2. Then, input to the network at time, t, is ht = Fxt = FAst . Our claim is that there exists synaptic weight configurations for which 1) for any mixed input, xt , the output of the network is the source vector, i.e. yt = Pst , where P is a permutation matrix, and 2) this synaptic configuration is a stationary state. 13 We prove our claim by constructing these synaptic weights. For each permutation matrix, we first relabel the outputs such that ith output recovers the ith source and hence P becomes the identity matrix. Then, the weights are: WijY Y = hsi i hsj i , hs2i i WijY H = hsi hj i X hsk i hsi i = (FA)jk + (FA)ji . 2 hsi i hs2i i k6=i (37) Given mixture xt , NSM neural dynamics with these weights converge to yt,i = st,i , which is the the unique fixed point3 . Furthermore, these weights define a stationary state as defined in (36) assuming a fixed learning rate. To see this substitute weights from (37) into the last two equations of (35) and average over the source distribution. The fixed learning rate assumption is valid in the large-t limit when changes to Dt,i become small (O(1/t), see (Pehlevan et al., 2015)). 4 Numerical simulations Here we present numerical simulations of our two-layered neural network using various datasets and compare the results to that of other algorithms. In all our simulations, d = k = l = m, except in Fig. 5B where d = k > l = m. Our networks were initialized as follows: 1. In the prewhitening network, WHX and WHG were chosen to be random > orthonormal matrices. WGH is initialized as WHG because of its definition in Eq. (17) and the fact that this choice guarantees the convergence of the neural dynamics (28) (see Appendix A). 2. In the NSM network, WY H was initialized to a random orthonormal matrix and WY Y was set to zero. The learning rates were chosen as follows: 1. For the prewhitening network, we generalized the time-dependent learning rate (30) to, 1 , a + bt (38) and performed a grid search over a ∈ {10, 102 , 103 , 104 } and b ∈ {10−2 , 10−1 , 1} to find the combination with best performance. Our performance measures will be introduced below. P P Proof: The net input to neuron i at the claimed fixed point is j WijY H ht,j − j6=i WijY Y st,j . Plugging in (37) and ht = FAst , and using (6) one gets that the net input is st,i , which is also the output since sources are nonnegative. This fixed point is unique and globally stable because the NSM neural dynamics is a coordinate descent on a strictly convex cost given by 1 > > yt − ht> hs> yt . 2 yt ss 3 14 2. For the NSM network, we generalized the activity-dependent learning rate (35) to, 1 D̃t+1,i , where   2 , D̃t+1,i = min ã, b̃D̃t+1,i + yt,i (39) and performed a grid search over several values of ã ∈ {10, 102 , 103 , 104 } and b̃ ∈ {0.8, 0.9, 0.95, 0.99, 0.995, 0.999, 0.9999, 1} to find the combination with best performance. The b̃ parameter introduces “forgetting” to the system (Pehlevan et al., 2015). We hypothesized that forgetting will be beneficial in the two-layer setting because the prewhitening layer output changes over time and the NSM layer has to adapt. Further, for comparison purposes, we also implemented this algorithm with a time-dependent learning rate of the form (38) and performed a grid search with a ∈ {102 , 103 , 104 } and b ∈ {10−2 , 10−1 , 1} to find the combination with best performance. For the NSM network, to speed up our simulations we implemented a procedure from (Plumbley and Oja, 2004). At each iteration we checked whether there is any output neuron who has not fired up until that iteration. If so, we flipped the sign of its feedforward inputs. In practice, the flipping only occured within the first ∼10 iterations. For comparison, we implemented five other algorithms. First is the offline algorithm (9), the other two are chosen to represent major online algorithm classes: 1. Offline projected gradient descent: We simulated the projected gradient descent algorithm (9). We used variable stepsizes of the form (38) and performed a grid search with a ∈ {104 , 105 , 106 } and b ∈ {10−3 , 10−2 , 10−1 } to find the combination with best performance. We initialized elements of the matrix, Y, by drawing a Gaussian random variable with zero mean and unit variance and rectifying it. Input dataset was whitened offline before passing to projected gradient descent. 2. fastICA: fastICA (Hyvärinen and Oja, 1997; Hyvarinen, 1999; Hyvärinen and Oja, 2000) is a popular ICA algorithm which does not assume nonnegativity of sources. We implemented an online version of fastICA (Hyvärinen and Oja, 1998) using the same parameters except for feedforward weights. We used the time-dependent learning rate (38) and performed a grid search with a ∈ {10, 102 , 103 , 104 } and b ∈ {10−2 , 10−1 , 1} to find the combination with best performance. fastICA requires whitened and centered input (Hyvärinen and Oja, 1998) and computes a decoding matrix that maps mixtures back to sources. We ran the algorithm with whitened and centered input. To recover nonnegative sources, we applied the decoding matrix to noncentered but whitened input. 15 3. Infomax ICA: Bell and Sejnowski (1995) proposed a blind source separation algorithm that maximizes the mutual information between inputs and outputs, namely the Infomax principle (Linsker, 1988). We simulated an online version due to Amari et al. (1996). We chose cubic neural nonlinearities compatible with sub-Gaussian input sources. This differs from our fastICA implementation where the nonlinearity is also learned online. Infomax ICA computes a decoding matrix using centered, but not whitened, data. To recover nonnegative sources, we applied the decoding matrix to noncentered inputs. Finally, we rescaled the sources so that their variance is 1. We experimented with several learning rate parameters for finding optimal performance. 4. Linsker’s network: Linsker (1997) proposed a neural network with local learning rules for Infomax ICA. We simulated this algorithm with cubic neural nonlinearities and preprocessing and decoding done as in our Infomax ICA implementation. 5. Nonnegative PCA: Nonnegative PCA algorithm (Plumbley and Oja, 2004) solves the NICA task and makes explicit use of the nonnegativity of sources. We use the online version given in (Plumbley and Oja, 2004). To speed up our simulations we implemented a procedure from (Plumbley and Oja, 2004). At each iteration we checked whether there is any output neuron who has not fired up until that iteration. If so, we flipped the sign of its feedforward inputs. For this algorithm, we again used the time-dependent learning rate of (38) and performed a grid search with a ∈ {10, 102 , 103 , 104 } and b ∈ {10−2 , 10−1 , 1} to find the combination with best performance. Nonnegative PCA assumes whitened, but not centered input (Plumbley and Oja, 2004). Next, we present the results of our simulations on three datasets. 4.1 Mixture of random uniform sources The source i.i.d. samplesq were set to zero with probability 0.5 and sampled uniformly from iterval [0, 48/5] with probability 0.5. The dimensions of source vectors were d = {3, 5, 7, 10}. The mixing matrices are given in Appendix C. 105 source vectors were generated for each run. For a sample of the original and mixed signals, see Fig 3A. The inputs to fastICA and Nonnegative PCA algorithms were prewhitened offline, and in the case of fastICA they were also centered. We ran our NSM network both as a single layer algorithm with prewhitening done offline, and as a part of our two-layer algorithm with whitening done online. 16 A Sources Mixtures 4 2 2 1 0 4 0 2 2 0 0 4 -2 4 2 2 0 99980 Sample Number Error 2 0 4 2 0 -2 2 100000 99980 10 10 0 10 -1 10 -1 10 -2 10 -2 10 -3 10 -3 10 -4 10 -4 10 -5 10 -5 10 2 10 4 10 5 d=7 10 2 10 10 3 10 0 10 10 0 10 -1 10 -1 10 -2 10 -2 10 -3 10 -3 10 -4 10 -4 10 -5 10 -5 10 1 10 2 10 3 10 4 Sample # or Gradient Step 10 5 10 2 10 3 10 4 10 5 10 4 10 5 d=10 1 10 0 10 0 10 1 10 2 1 100000 1 10 0 10 1 99990 Sample Number d=5 10 2 1 10 0 0 100000 99980 99990 Sample Number d=3 10 2 Error 0 4 Sample Number B 10 2 2 0 -2 99990 Recovered 4 2 0 -2 0 100000 99980 99990 Whitened 10 0 Online fastICA Infomax ICA Linsker’s network Nonnegative PCA NSM (time-dependent) NSM (activity-dependent) Two layer network Offline projected gradient descent 10 1 10 2 10 3 Sample # or Gradient Step Figure 3: Performance of our algorithms when presented with a mixture of random uniform sources: A) Sample source, mixture, whitened and recovered signals for a d = 3 task, performed by our two-layer algorithm. The whitened signal is the output of the first layer, while the recovered signal is the output of second layer. 17 B) Performance comparison of the online algorithms presented in this paper with projected gradient descent, Online fastICA, Infomax ICA, Linsker’s network and Nonnegative PCA. Curves show averages over 10 simulations. Error bars not shown for visual clarity. Learning rate parameters are given in Appendix D. To quantify the performance of tested algorithms, we used the mean-squarederror: Et = t 1X kst0 − Pyt0 k22 , t t0 =1 (40) where P is a permutation matrix that is chosen to minimize the mean-squared-error at t = 105 . The learning rate parameters of all networks were optimized by a grid search using E105 as the performance metric. In Fig. 3B, we show the performances of all algorithms we implemented. Our algorithms perform as well or better than others, especially as dimensionality of the input increases. Offline whitening is better than online whitening, however, as dimensionality increases, online whitening becomes competitive with offline whitening. In fact, our two-layer and single-layer networks perform better than Online fastICA and Nonnegative PCA for which whitening was done offline. We also simulated a fully offline algorithm by taking projected gradient descent steps until the residual error plateaued (Fig. 3B). The performance of the offline algorithm quantifies two important metrics. First, it establishes the loss in performance due to online (as opposed to offline) processing. Second, it establishes the lowest error that could be achieved by the NSM method for the given dataset. The lowest error is not necessarily zero due to the finite size of the dataset. This method is not perfect because the projected gradient descent may get stuck in a local minimum of Eq. (7). We also tested whether the learned synaptic weights of our network match our theoretical predictions. In Fig. 4A, we show examples of learned feedforward and recurrent synaptic weights at t = 105 , and what is expected from our theory (37). We observed an almost perfect match between the two. In Fig. 4B, we quantify the convergence of simulated synaptic weights to the theoretical prediction by plotting a normalized error metric defined by Et = kWt,simulation − Wtheory k2F / kWtheory k2F . 4.2 Mixture of random uniform and exponential sources Our algorithm can demix sources sampled from different statistical distributions. To illustrate this point, we generated a dataset with two uniform and three exponential source channels. The uniform sources were sampled as before. The exponential sources were either zero (with probability 0.5) or sampled from an exponential distribution, scaled so that the variance of the channel is 1. In Fig. 5A, we show that the algorithm succesfully recovers sources. To test denoising capabilities of our algorithm, we created a dataset where source signals are accompanied by background noise. Sources to be recovered were three exponential channels, which were sampled as before. Background noises were two uniform channels which were sampled as before, except scaled to have 18 A WYH WYY Theory (Eq. (36))     0 0.3742 0.3742  0.3742 0 0.3742  0.3742 0.3742 0 Simulation (t = 105)   1.1005 0.6545  0.8473 −0.2526 −0.0202 1.1012  −0.6795 0.6217 0.6637  0.1800 0.7107 0.8583 −0.2558 −0.0227  −0.6768 0.6228 0.1845 0.7179 B   0 0.3742 0.3702  0.3670 0 0.3736  0.3604 0.3709 0 WYH WYY 10 0 Error Error 10 0 10 -1 10 -2 10 0 d=3 d=5 d=7 d=10 10 1 10 -1 10 -2 10 2 10 3 10 4 10 5 Sample # 10 0 10 1 10 2 10 3 10 4 Sample # Figure 4: Theoretical predictions of learned synaptic weights match simulations: A) Example synaptic weight matrices predicted from theory (37) compared to results from an example simulation (t = 105 ). B) Convergence of simulated network synaptic weights to theoretical predictions. For this figure, inputs were whitened offline and the NSM network was run with time-dependent learning rates. Shaded bars show standard error over 10 simulations. 19 10 5 A 10 B 1 10 1 Error 10 0 10 0 10 -1 10 -2 10 -1 10 -3 10 0 10 1 10 2 10 3 10 4 10 5 Sample # 10 0 10 1 10 2 10 3 10 4 Sample # Figure 5: Performance of our two layer algorithm when presented with a mixture of random uniform and exponential sources. A) Recovery of a mixture of three exponential and two uniform sources. B) Recovery of three exponential sources corrupted by two background noise channels. Learning rate parameters are given in Appendix D. variance 0.1. To denoise the resulting five dimensional mixture, the prewhitening layer reduced its five input dimensions to three. Then, the NSM layer succesfully recovered sources, Fig. 5B. Hence, the prewhitening layer can act as a denoising stage. 4.3 Mixture of natural scenes Next, we consider recovering images from their mixtures, Fig. 6A, where each image is treated as one source. Four image patches of size 252 × 252 pixels were chosen from a set of images of natural scenes which were previously used in (Hyvärinen and Hoyer, 2000; Plumbley and Oja, 2004). The preprocessing was as in (Plumbley and Oja, 2004): 1) Images were downsampled by a factor of 4 to obtain 63 × 63 patches, 2) Pixel intensities were shifted to have a minimum of zero and 3) Pixel intensities were scaled to have unit variance. Hence, in this dataset, there are d = 4 sources, corresponding image patches, and a total of 63 × 63 = 3969 samples. These samples were presented to the algorithm 5000 times with randomly permuted order in each presentation. The 4 × 4 mixing matrix, which was generated randomly, is given in Appendix C. In Fig. 6B, we show the performances of all algorithms we implemented in this task. We see that our algorithms, when compared to fastICA and Nonnegative 20 10 5 A Source Images Mixtures Recovered Images B Online fastICA Nonnegative PCA NSM (activity-dependent) 10 2 10 Two layer network 1 10 0 10 -1 10 0 10 1 10 2 10 3 10 4 10 5 10 6 10 7 Sample # Figure 6: Performance of our algorithm when presented with a mixture of natural images: A) Sample source, mixture, and recovered images, performed by our two-layer algorithm. B) Performance comparison of our online algorithms with Online fastICA and Nonnegative PCA. Shaded bars show standard error over 10 simulations. Learning rate parameters are listed in Appendix D. PCA, perform much better. 5 Discussion In this paper we presented a new neural algorithm for blind nonnegative source separation. We started by assuming the nonnegative ICA generative model (Plumbley, 2001, 2002) where inputs are linear mixtures of independent and nonnegative sources. We showed that the sources can be recovered from inputs by two sequential steps, 1) generalized whitening and 2) NSM. In fact, our argument requires sources to be only uncorrelated, and not necessarily independent. Each of the two steps can be performed online with single-layer neural networks with local learning rules (Pehlevan and Chklovskii, 2014, 2015a). Stacking these two networks yields a two-layer neural network for blind nonnegative source separation (Fig. 2). Numerical simulations show that our neural network algorithm performs 21 10 8 well. Because our network is derived from optimization principles, its biologically realistic features can be given meaning. The network is multi-layered, because each layer performs a different optimization. Lateral connections create competition between principal neurons forcing them to differentiate their outputs. Interneurons clamp the activity dimensions of principal neurons (Pehlevan and Chklovskii, 2015a). Rectifying neural nonlinearity is related to nonnegativity of sources. Synaptic plasticity (Malenka and Bear, 2004), implemented by local Hebbian and anti-Hebbian learning rules, achieves online learning. While Hebbian learning is famously observed in neural circuits (Bliss and Lømo, 1973; Bliss and Gardner-Medwin, 1973), our network also makes heavy use of anti-Hebbian learning, which can be interpreted as the long-term potentiation of inhibitory postsynaptic potentials. Experiments show that such long-term potentiation can arise from pairing action potentials in inhibitory neurons with subthreshold depolarization of postsynaptic pyramidal neurons (Komatsu, 1994; Maffei et al., 2006). However, plasticity in inhibitory synapses does not have to be Hebbian, i.e. require correlation between pre- and postsynaptic activity (Kullmann et al., 2012). For improved biological realism, the network should respond to a continuous stimulus stream by continuous and simultaneous changes to its outputs and synaptic weights. Presumably, this requires neural time scales to be faster and synaptic time scales to be slower than that of changes in stimuli. To explore this possibility, we simulated some of our datasets with limited number of neural activity updates (not shown) and found that ∼10 updates per neuron is sufficient for successful recovery of sources without significant loss in performance. With a neural time scale of 10ms, this should take about 100ms, which is sufficiently fast given that, for example, the temporal autocorrelation time scale of natural image sequences is about 500ms (David et al., 2004; Bull, 2014). It is interesting to compare the two-layered architecture we present to the multilayer neural networks of deep learning approaches (LeCun et al., 2015). 1) For each data presentation, our network performs recurrent dynamics to produce an output, while the deep networks have feedforward architecture. 2) The first layer of our network has multiple neuron types, principal and interneurons, and only principal neurons project to the next layer. In deep learning, all neurons in a layer project to the next layer. 3) Our network operates with local learning rules, while deep learning uses backpropagation, which is not local. 4) We derived the architecture, the dynamics, and the learning rules of our network from a principled cost function. In deep learning, the architecture and the dynamics of a neural network are designed by hand, only the learning rule is derived from a cost function. 5) Finally, in building a neural algorithm, we started with a generative model of inputs, from which we inferred algorithmic steps to recover latent sources. These algorithmic steps guided us in deciding which single-layer networks to stack. 22 In deep learning, no such generative model is assumed and network architecture design is more of an art. We believe starting from a generative model might lead to a more systematic way of network design. In fact, the question of generative model appropriate for deep networks is already being asked (Patel et al., 2016). Acknowledgments We thank Andrea Giovannucci, Eftychios Pnevmatikakis, Anirvan Sengupta and Sebastian Seung for useful discussions. DC is grateful to the IARPA MICRONS program for support. 23 A Convergence of the gradient descent-ascent dynamics Here we prove that the neural dynamics (18) converges to the saddle point of the objective function (15). Here we assume that WHG is full-rank and l = d. First, note that the optimum of (15) is also the fixed point of (18). Since the neural dynamics (18) is linear, the fixed point is globally convergent if and only if the eigenvalues of the matrix " 0 −WHG WGH −I # (41) have negative real parts. The eigenvalue equation is " 0 −WHG WGH −I #" x1 x2 # " =λ x1 x2 # , (42) which implies −WHG x2 = λx1 , WGH x1 = (λ + 1) x2 . (43) Using these relations, we can solve for all the d + m eigenvalues. There are two cases: 1. λ = −1. This implies that WGH x1 = 0 and WHG x2 = x1 . x1 is in the null-space of WGH . Since WGH is m × d with m ≥ d, the null-space is m − d dimensional, and one has m − d degenerate λ = −1 eigenvalues. 2. λ 6= −1. Substituting for x2 in the first equation of (43), this implies that WHG WGH x1 = −λ (λ + 1) x1 . Hence, x1 is an eigenvector of WHG WGH . HG GH For each eigenvalue q λw of W W , there are two corresponding eigenvectors λ = − 12 ± 14 − λw . x2 can be solved uniquely from the first equation in (43). Hence, there are m − dqdegenerate λ = −1 eigenvalues and d pairs of conjugate eigenvalues λ = − 21 ± 14 − λw , one pair for each eigenvaleue λw of WHG WGH . Since {λw } are real and positive (we assume WHG is full-rank and by definition > WHG = WGH ), real parts of all {λ} are negative and hence the neural dynamics (18) is globally convergent. 24 B Modified objective function and neural network for generalized prewhitening While deriving our online neural algorithm, we assumed that the number of output channels is reduced to the number of sources at the prewhitening stage (l = d). However, our offline analysis did not need such reduction, one could keep l ≥ d for generalized prewhitening. Here we provide an online neural algorithm that allows l ≥ d. First, we point out why the prewhitening algorithm given in the main text is not adequate for l > d. In Appendix A, we proved that the neural dynamics described by (18) converges to the saddle point of the objective function (15). This proof assumes that WHG is full-rank. However, if l > d, this assumption breaks down as the network learns because perfectly prewhitened δH has rank d (low-rank) and a perfectly prewhitening network would have WHG = δHδG> which would also be low-rank. We simulated this network with l > d and observed that the condition number of WHG WGH increased with t and the neural dynamics took longer time to converge. Even though the algorithm was still functioning well for practical purposes, we present a modification that fully resolves the problem. We propose a modified offline objective function (Pehlevan and Chklovskii, 2015a) and a corresponding neural network. Consider the following:   min max Tr −δX> δX δH> δH + δH> δH δG> δG + αt δH> δH − t δG> δG , δH δG (44) where δX is a k × t centered mixture of d independent sources, δH is now an l × t matrix with l ≥ d, δG is an m × t matrix with m ≥ d and α is a positive parameter. Notice the additional α-dependent term compared to (12). If α is less than the lowest eigenvalue of 1t δXδX> , optimal δH is a linear transform of X and satisfies the generalized prewhitening condition (3)(Pehlevan and Chklovskii, 2015a). More precisely, Theorem 4 (Modified from (Pehlevan and Chklovskii, 2015a)). Suppose an eigen> decomposition of δX> δX is δX> δX = VX ΛX VX , where eigenvalues are sorted in order of magnitude. If α is less than the lowest eigenvalue of 1t δXδX> , all optimal δH of (12) have an SVD decomposition of the form √ 0 > δH∗ = UH t ΛH VX , (45) 0 where ΛH is l × t with ones at top d diagonals and zeros at rest. Using this cost function, we will derive a neural algorithm which does not suffer from the described convergence issues, even if l > d. On the other hand, we 25 now need to choose the parameter α, and for that we need to know the spectral properties of δX. To derive an online algorithm, we repeat the steps taken before: {δht , δgt } ←− arg min arg max L(δht , δgt ), (46) δgt δht where L= −2δxt> t−1 X ! δxt0 δht>0 δht − t kδgt k22 + 2δgt> t0 =1 t−1 X ! δgt0 δht>0 δht + αt kδht k22 t0 =1   + kδgt k22 − kδxt k22 kδht k22 . (47) In the large-t limit, the first four terms dominate over the last term, which we ignore. The remaining objective is strictly concave in δgt and strictly convex in δht . Note that (15) was only convex in δht but not strictly convex. The objective has a unique saddle point, even if 1 t t−1 P t0 =1 δht0 δgt>0 is not full-rank: δgt∗ = WtGH δht∗ ,  δht∗ = αI + WtHG WtGH −1 WtHX δxt , (48) where W matrices are defined as before and I is the identity matrix. We solve (46) with gradient descent-ascent 1 dδht = − ∇δht L = −αδht + WtHX δxt − WtHG gt , dγ 2t 1 dδgt = ∇δgt L = −δgt + WtGH δht . dγ 2t (49) where γ is time measured within a single time step of t. The dynamics (18) can be proved to converge to the saddle point (48) modifying the proof in Appendix A4 . Synaptic weight updates are the same as before (19). Finally, this network can be modified to also compute H̄ following the steps before. 4 The fixed point is globally convergent if and only if the eigenvalues of the matrix   −αI −WHG WGH −I (50) have negative real parts. One can show that l − d eigenvalues are −α, m − d q eigenvalues are −1, and for each positive eigenvalue, λw of WHG WGH one gets a pair − 1+α 2 ± All eigenvalues have negative real parts. 26 (1+α)2 4 − α − λw . C Mixing matrices for numerical simulations For the random source dataset, the d = 3 mixing matrix was:   0.031518 0.38793 0.061132   A =  −0.78502 0.16561 0.12458  , 0.34782 0.27295 0.67793 (51) We do not list the mixing matrices for d = {5, 7, 10} cases for space-saving purposes, however they are available from authors upon request. For the natural scene dataset, the mixing matrix was   A=   0.33931 0.3282 0.41516 −0.1638 −0.077079 −0.29768 0.076562 −0.28153   . −0.14119 −0.41709 0.14842 0.57009  −0.40483 0.21922 0.082336 0.18027  27 (52) D Learning rate parameters for numerical simulations For Figs. 3, 4, 5 and 6 the following parameters were found to be best performing as a result of our grid search: fastICA NPCA NSM (activity) NSM (time) d=3 (10, 0.01) (10, 0.1) (10, 0.8) (10, 0.1) d = 5 (100, 0.01) (10, 0.01) (10, 0.9) (10, 0.01) d = 7 (100, 0.01) (100, 0.01) (10, 0.9) (10, 0.1) d = 10 (100, 0.01) (1000, 0.01) (10, 0.9) (10, 0.01) Images (104 , 0.01) (1000, 0.01) (100, 0.9) NA d=3 d=5 d=7 d = 10 Images Two-layer Offline (100, 1, 10, 0.8) (106 , 0.001) (100, 1, 10, 0.9) (106 , 0.001) (100, 1, 10, 0.9) (106 , 0.01) (100, 1, 10, 0.9) (106 , 0.01) (100, 1, 100, 0.9) NA 28 Infomax ICA (1000, 0.2) (1000, 0.2) (1000, 0.2) (1000, 0.2) NA Linsker’s Algorithm (1000, 0.2) (1000, 0.2) (1000, 0.2) (1000, 0.2) NA References Amari, S., Cichocki, A., and Yang, H. (1996). A new learning algorithm for blind signal separation. Advances in neural information processing systems, 8:757–763. Asari, H., Pearlmutter, B. A., and Zador, A. M. (2006). Sparse representations for the cocktail party problem. Journal of Neuroscience, 26(28):7477–7490. Bee, M. A. and Micheyl, C. (2008). The cocktail party problem: what is it? how can it be solved? and why should animal behaviorists study it? Journal of comparative psychology, 122(3):235. Bell, A. J. and Sejnowski, T. J. (1995). An information-maximization approach to blind separation and blind deconvolution. Neural computation, 7(6):1129–1159. Bliss, T. V. and Gardner-Medwin, A. (1973). Long-lasting potentiation of synaptic transmission in the dentate area of the unanaesthetized rabbit following stimulation of the perforant path. The Journal of physiology, 232(2):357. Bliss, T. V. and Lømo, T. (1973). Long-lasting potentiation of synaptic transmission in the dentate area of the anaesthetized rabbit following stimulation of the perforant path. The Journal of physiology, 232(2):331–356. Bronkhorst, A. W. (2000). The cocktail party phenomenon: A review of research on speech intelligibility in multiple-talker conditions. Acta Acustica united with Acustica, 86(1):117–128. Bull, D. R. (2014). Communicating pictures: A course in Image and Video Coding. Academic Press. Comon, P. (1994). Independent component analysis, a new concept? processing, 36(3):287–314. Signal Comon, P. and Jutten, C. (2010). Handbook of Blind Source Separation: Independent component analysis and applications. Academic press. David, S. V., Vinje, W. E., and Gallant, J. L. (2004). Natural stimulus statistics alter the receptive field structure of v1 neurons. Journal of Neuroscience, 24(31):6991–7006. Donoho, D. and Stodden, V. (2003). When does non-negative matrix factorization give a correct decomposition into parts? In Advances in neural information processing systems, page None. 29 Eagleman, D. M., Coenen, O. J.-M. D., Mitsner, V., Bartol, T. M., Bell, A. J., and Sejnowski, T. J. (2001). Cerebellar glomeruli: Does limited extracellular calcium implement a sparse encoding strategy? In Proceedings of the 8th Annual Joint Symposium on Neural Computation. Golumbic, E. M. Z., Ding, N., Bickel, S., Lakatos, P., Schevon, C. A., McKhann, G. M., Goodman, R. R., Emerson, R., Mehta, A. D., Simon, J. Z., et al. (2013). Mechanisms underlying selective neuronal tracking of attended speech at a “cocktail party”. Neuron, 77(5):980–991. Hu, T., Pehlevan, C., and Chklovskii, D. B. (2014). A hebbian/anti-hebbian network for online sparse dictionary learning derived from symmetric matrix factorization. In Asilomar Conference on Signals, Systems and Computers, pages 613–619. IEEE. Huang, K., Sidiropoulos, N., and Swami, A. (2014). Non-negative matrix factorization revisited: Uniqueness and algorithm for symmetric decomposition. Signal Processing, IEEE Transactions on, 62(1):211–224. Hyvarinen, A. (1999). Fast and robust fixed-point algorithms for independent component analysis. IEEE transactions on Neural Networks, 10(3):626–634. Hyvärinen, A. and Hoyer, P. (2000). Emergence of phase-and shift-invariant features by decomposition of natural images into independent feature subspaces. Neural computation, 12(7):1705–1720. Hyvärinen, A. and Oja, E. (1997). A fast fixed-point algorithm for independent component analysis. Neural computation, 9(7):1483–1492. Hyvärinen, A. and Oja, E. (1998). Independent component analysis by general nonlinear hebbian-like learning rules. Signal Processing, 64(3):301–313. Hyvärinen, A. and Oja, E. (2000). Independent component analysis: algorithms and applications. Neural networks, 13(4):411–430. Isomura, T., Kotani, K., and Jimbo, Y. (2015). Cultured cortical neurons can perform blind source separation according to the free-energy principle. PLoS Comput Biol, 11(12):e1004643. Isomura, T. and Toyoizumi, T. (2016). A local learning rule for independent component analysis. Scientific Reports, 6. Jutten, C. and Herault, J. (1991). Blind separation of sources, part i: An adaptive algorithm based on neuromimetic architecture. Signal processing, 24(1):1–10. 30 Komatsu, Y. (1994). Age-dependent long-term potentiation of inhibitory synaptic transmission in rat visual cortex. Journal of Neuroscience, 14(11):6488–6499. Kuang, D., Park, H., and Ding, C. H. (2012). Symmetric nonnegative matrix factorization for graph clustering. In SDM, volume 12, pages 106–117. SIAM. Kuang, D., Yun, S., and Park, H. (2015). Symnmf: nonnegative low-rank approximation of a similarity matrix for graph clustering. Journal of Global Optimization, 62(3):545–574. Kullmann, D. M., Moreau, A. W., Bakiri, Y., and Nicholson, E. (2012). Plasticity of inhibition. Neuron, 75(6):951–962. Laurberg, H., Christensen, M. G., Plumbley, M. D., Hansen, L. K., and Jensen, S. H. (2008). Theorems on positive data: On the uniqueness of nmf. Computational intelligence and neuroscience, 2008. LeCun, Y., Bengio, Y., and Hinton, G. (2015). 521(7553):436–444. Deep learning. Nature, Lee, D. D. and Seung, H. S. (1999). Learning the parts of objects by non-negative matrix factorization. Nature, 401(6755):788–791. Li, Y., Liang, Y., and Risteski, A. (2016). Recovery guarantee of non-negative matrix factorization via alternating updates. arXiv preprint arXiv:1611.03819. Linsker, R. (1988). Self-organization in a perceptual network. Computer, 21(3):105– 117. Linsker, R. (1997). A local learning rule that enables information maximization for arbitrary input distributions. Neural Computation, 9(8):1661–1665. Maffei, A., Nataraj, K., Nelson, S. B., and Turrigiano, G. G. (2006). Potentiation of cortical inhibition by visual deprivation. Nature, 443(7107):81–84. Malenka, R. C. and Bear, M. F. (2004). Ltp and ltd: an embarrassment of riches. Neuron, 44(1):5–21. McDermott, J. H. (2009). 19(22):R1024–R1027. The cocktail party problem. Current Biology, Mesgarani, N. and Chang, E. F. (2012). Selective cortical representation of attended speaker in multi-talker speech perception. Nature, 485(7397):233–236. 31 Narayan, R., Best, V., Ozmeral, E., McClaine, E., Dent, M., Shinn-Cunningham, B., and Sen, K. (2007). Cortical interference effects in the cocktail party problem. Nature neuroscience, 10(12):1601–1607. Oja, E. (1982). Simplified neuron model as a principal component analyzer. J Math Biol, 15(3):267–273. Oja, E. and Plumbley, M. (2004). Blind separation of positive sources by globally convergent gradient search. Neural Computation, 16(9):1811–1825. Ouedraogo, W. S. B., Souloumiac, A., and Jutten, C. (2010). Non-negative independent component analysis algorithm based on 2d givens rotations and a newton optimization. In Latent Variable Analysis and Signal Separation, pages 522–529. Springer. Paatero, P. and Tapper, U. (1994). Positive matrix factorization: A non-negative factor model with optimal utilization of error estimates of data values. Environmetrics, 5(2):111–126. Patel, A. B., Nguyen, M. T., and Baraniuk, R. (2016). A probabilistic framework for deep learning. In Advances in Neural Information Processing Systems, pages 2550–2558. Pehlevan, C. and Chklovskii, D. (2014). A hebbian/anti-hebbian network derived from online non-negative matrix factorization can cluster and discover sparse features. In Asilomar Conference on Signals, Systems and Computers, pages 769–775. IEEE. Pehlevan, C. and Chklovskii, D. (2015a). A normative theory of adaptive dimensionality reduction in neural networks. In Advances in Neural Information Processing Systems, pages 2260–2268. Pehlevan, C. and Chklovskii, D. (2015b). Optimization theory of hebbian/antihebbian networks for pca and whitening. In 2015 53rd Annual Allerton Conference on Communication, Control, and Computing (Allerton), pages 1458–1465. IEEE. Pehlevan, C., Hu, T., and Chklovskii, D. (2015). A hebbian/anti-hebbian neural network for linear subspace learning: A derivation from multidimensional scaling of streaming data. Neural Computation, 27:1461–1495. Plumbley, M. (1994). A subspace network that determines its own output dimension. Tech. Rep. 32 Plumbley, M. (1996). Information processing in negative feedback neural networks. Network-Comp Neural, 7(2):301–305. Plumbley, M. (2002). Conditions for nonnegative independent component analysis. Signal Processing Letters, IEEE, 9(6):177–180. Plumbley, M. D. (2001). Adaptive lateral inhibition for non-negative ica. In Proceedings of the international Conference on Independent Component Analysis and Blind Signal Separation (ICA2001), pages 516–21. Plumbley, M. D. (2003). Algorithms for nonnegative independent component analysis. Neural Networks, IEEE Transactions on, 14(3):534–543. Plumbley, M. D. and Oja, E. (2004). A "nonnegative pca" algorithm for independent component analysis. Neural Networks, IEEE Transactions on, 15(1):66–76. Wright, S. J. (2015). Coordinate descent algorithms. Mathematical Programming, 151(1):3–34. Yuan, Z. and Oja, E. (2004). A fastica algorithm for non-negative independent component analysis. In Independent Component Analysis and Blind Signal Separation, pages 1–8. Springer. Zheng, C.-H., Huang, D.-S., Sun, Z.-L., Lyu, M. R., and Lok, T.-M. (2006). Nonnegative independent component analysis based on minimizing mutual information technique. Neurocomputing, 69(7):878–883. 33
9cs.NE
1 Delay Performance of MISO Wireless Communications arXiv:1707.08089v1 [cs.IT] 25 Jul 2017 Jesús Arnau, Member, IEEE, and Marios Kountouris, Senior Member, IEEE Abstract Ultra-reliable, low latency communications (URLLC) are currently attracting significant attention due to the emergence of mission-critical applications and device-centric communication. URLLC will entail a fundamental paradigm shift from throughput-oriented system design towards holistic designs for guaranteed and reliable end-to-end latency. A deep understanding of the delay performance of wireless networks is essential for efficient URLLC systems. In this paper, we investigate the network layer performance of multiple-input, single-output (MISO) systems under statistical delay constraints. We provide closed-form expressions for MISO diversity-oriented service process and derive probabilistic delay bounds using tools from stochastic network calculus. In particular, we analyze transmit beamforming with perfect and imperfect channel knowledge and compare it with orthogonal space-time codes and antenna selection. The effect of transmit power, number of antennas, and finite blocklength channel coding on the delay distribution is also investigated. Our higher layer performance results reveal key insights of MISO channels and provide useful guidelines for the design of ultra-reliable communication systems that can guarantee the stringent URLLC latency requirements. Index Terms URLLC, 5G systems, MIMO, diversity, stochastic network calculus, finite blocklength channel coding, queueing analysis. I. I NTRODUCTION Data traffic has been growing tremendously over the last decade, fueled by the ubiquity of smart mobile devices and bandwidth-demanding applications. In order to handle the everincreasing traffic load, existing wireless networks have typically been designed and planned The authors are with the Mathematical and Algorithmic Sciences Lab, France Research Center, Huawei Technologies France SASU, 20 Quai du Point du Jour, 92100 Boulogne-Billancourt, France. Email: ({jesus.arnau,marios.kountouris}@huawei.com). 2 with a focus on improving spectral efficiency and increasing coverage. The latency requirements of different applications have mostly been an after-thought. Ultra-high reliability and low latency have not been in the mainstream in most wireless networks, due to the focus on humancentric communications, delay-tolerant content and reliability levels in the order of 95-99%. However, a plethora of socially useful applications and new uses of wireless communication are currently envisioned in areas such as industrial control, smart cities, augmented and virtual reality (AR/VR), automated driving or flying, robotics, telemedicine, algorithmic trading and tactile Internet. In response, new releases of mobile cellular networks (mainly 5G new radio and beyond) are envisaged to support ultra-reliable, low latency communications (URLLC) scenarios with strict requirements in terms of latency (ranging from 1 ms to few milliseconds end-to-end latency depending on the use cases) and reliability (higher than 99.9999%). Another new feature is the support of machine-type communications (MTC), where a massive number of connected devices transmit reliably a relatively low volume of non-delay-sensitive payload. Information theory and communication engineering have been instrumental in boosting spectral efficiency and approaching the capacity limits. Nevertheless, URLLC and device-centric communication pose significant theoretical and practical challenges, requiring a departure from capacity-oriented system design towards a holistic view (network architecture, control, and data) for guaranteed and reliable end-to-end latency. Applying information theory to the design of low latency networks has been a long-standing challenge [1]. Information theory mostly focuses on asymptotic limits, which can be achieved with arbitrarily small probability of error using long codewords, hence arbitrarily large coding delays. Despite recent development on the block error rates for finite blocklength codes [2], more work is needed to better understand the non-asymptotic fundamental tradeoffs between delay, reliability and throughput, including both coding delays and queueing delays. In addition, the highly variable and delay-sensitive nature of network traffic together with the associated overhead (metadata) should be incorporated in the conventional communication theoretic framework. Reliable communication is a well-studied problem, dating back to Shannon’s landmark paper [3], and diversity-achieving techniques are usually employed to increase reliability by combating or exploiting channel variations. Several schemes have been developed, including error correction codes, the use of multiple antennas, and space/frequency diversity at the physical layer, as well as automatic repeat-request (ARQ), opportunistic scheduling, and erasure coding at higher layers. Among them, multiple-input multiple-output (MIMO) systems have received 3 great interest due to their potential to combat fading, increase spectral efficiency, and reduce interference. MIMO techniques can be used for beam steering, diversity, spatial multiplexing and interference cancellation. Diversity-achieving techniques increase reliability by combating or exploiting channel variations, while beam steering techniques increase received signal quality by focusing desired energy or attenuating undesired interference. Spatial multiplexing increases the data rate by transmitting independent data symbols across the antennas. In this work, we focus on diversity and beam steering techniques, as being more relevant for reliable communications. In particular, we consider maximum ratio transmission (MRT), a transmit beamforming technique that maximizes the received signal and realizes diversity exploiting channel state information (CSI) at the transmitter. There have been several attempts at addressing latency considerations in the physical layer, including error exponents [4], delay-limited capacity [5], outage capacity [6], throughput-delay tradeoff curves [7], and finite blocklength channel coding [2]. In networking, delay is a key performance measure and queueing theory has been instrumental in providing exact solutions for backlog and delays in packet-switched networks. However, queueing network analysis is largely restricted to single-queue networks, few interacting (coupled) queues, small topologies and Poisson arrivals. Classical queueing models typically allow the analysis of average delay, failing to characterize delay quantiles (worst-case delay) and distributions, which are of cardinal importance in mission-critical applications. Recent efforts to combine queueing with communication theory, such as stochastic network calculus [8]–[10], timely throughput [11], effective bandwidth [8], and effective capacity [12] to name a few, take on a different approach and compute performance bounds for a wide range of stochastic processes. These approaches promise significant performance gains - in terms of latency, reliability and throughput - and crisp insights for the design of low latency communication systems. In this work, we employ stochastic network calculus - a probabilistic extension of (deterministic) network calculus [13] - which allows non-asymptotic stochastic bounds on network performance metrics, such as maximum delay, for broad classes of arrival, scheduling, and service processes. Despite the extended literature on MIMO techniques at the physical layer, only few attempts have been made to characterize the upper layer performance of multi-antenna techniques taking into account the queueing effects. In [14] the service process of an adaptive MIMO system with Poisson arrivals is characterized. Bounds on the delay violation probability have been derived for MIMO multiple access with bursty traffic in [15], while [16] provides an asymptotic 4 analysis of the diversity-multiplexing tradeoff for MIMO systems with bursty and delay-limited information. Using large deviations, [17] analyzes the queueing performance of queue-aware scheduling in multiuser MIMO systems. Bounds on the tail of delay of MIMO communication systems have been derived using the effective capacity framework [18]–[20]. Nevertheless, these approximations are only valid for large delays and under constant bit rate processes. Using Markov chains to reproduce the state of Gilbert-Elliott fading channels, the flow-level performance of MIMO spatial multiplexing has been analyzed using stochastic network calculus in [21], [22]. Nevertheless, none of these works considered the delay performance of MIMO schemes using stochastic network calculus for wireless fading channels. In this work, we study the upper layer delay performance of multiple input, single output (MISO) diversity communication in the presence of statistical delay constraints. We consider MRT transmit beamforming at the physical layer and derive probabilistic delay bounds using tools from stochastic network calculus. For that, we provide a closed-form characterization of the cumulative service process for MISO beamforming channels with both perfect and imperfect CSI. For the analysis, we use the (min,×) network calculus methodology for fine-grained wireless network delay analysis [23]. The impact of transmit antennas, signal-to-noise ratio (SNR), and imperfect CSI on the delay distribution of MISO MRT systems is characterized. We then show that our mathematical framework can be applied to the statistical characterization of various MIMO service processes, including MIMO eigen-beamforming, orthogonal space-time block coding (OSTBC), antenna selection, and Nakagami-m fading channels. This allows us to compare the delay performance of transmit beamforming with alternative diversity-achieving techniques that rely on very low rate CSI (transmit antenna selection) or no CSI (OSTBC). Interestingly, MISO MRT is shown to reduce the delay violation probability as compared to single-antenna transmissions even with imperfect CSI. The derived delay bounds enable us to assess the robustness of MISO MRT delay performance with respect to channel imperfections. Our results also show under which operating parameters other diversity-techniques are preferable than MRT in terms of delay violation probability. In addition, we provide an asymptotic statistical characterization of the service process in the low/high SNR regime and for large number of antennas. Finally, extending [24] to MISO systems, we study the effect of finite blocklength channel coding on the queueing delay performance. Our results quantify the performance loss due to finite blocklength and characterize the tradeoff between data rate and the error probability with respect to the delay performance. Our results can provide useful insights and guidelines for 5 the design of ultra-reliable wireless systems that can satisfy and guarantee the stringent URLLC latency requirements. The rest of the paper is organized as follows: In Section II, we provide our system model and in Section III, a brief background on the (min,×) network calculus is presented. In Section IV, the delay performance analysis of MISO diversity systems is derived. Section V provides the delay performance in asymptotic regimes and Section VI shows the effect of finite blocklength on the delay performance. Numerical results are presented in Section VII, followed by conclusions in Section VIII. II. S YSTEM MODEL We consider data transmission over a point-to-point vector communication channel. Time is divided into time slots of duration T (discrete-time model), and at each slot i, the source generates ai data bits and stores them in a queue. The transmitter (source) has M transmit antennas and sends the queued data bits to a single-antenna receiver over a frequency-flat Rayleigh fading channel. We assume a block-fading model, where the channel remains constant during one slot and varies independently from slot to slot. Each slot contains n + nm symbols, where n denotes the complex data symbols and nm the metadata (headers, training, estimation, acknowledgments, etc.). A. Signal model The received downlink signal yi ∈ C at slot i in a MISO wireless channel is given by yi = √ snr · hH i x i + ni (1) where hi ∈ CM ×1 is the flat-fading channel between the transmitter and the receiver at the i-th slot, which is circularly-symmetric complex Gaussian distributed h ∼ CN (0, 1). The transmitted vector is denoted by xi ∈ CM ×1 , and ni ∼ CN (0, 1) is the additive background noise that may also include (Gaussian) interference from neighboring systems. We consider one of the most prominent multi-antenna diversity technique, namely transmit beamforming, which refers to sending linearly weighted versions of the same signal on each antenna. The transmitted signal can be written as xi = wi si , where si is the zero-mean data signal at slot i with power E [|s|2 ] = 1, and wi ∈ CM ×1 is the unit-norm beamforming vector. Note that, since noise is assumed to have 6 unit power, snr represents the average received SNR, whereas the instantaneous SNR in the i-th 2 slot is given by γi = snr|hH i wi | . B. Transmission mode A natural signaling strategy for the MISO channel will be to maximize SNR over a specific channel, which can be achieved by sending information only in the direction of the channel vector h, as information sent in any orthogonal direction will be nulled out by the channel anyway. We thus consider the so-called maximum ratio transmission (MRT) [25], which is equivalent to eigen-beamforming since beamforming along the dominant (and only) eigenmode of the M × 1 vector channel is performed1 . Assuming that both transmitter and receiver have perfect CSI, the MRT beamforming vector is given by wi = hi . khi k In that case, the instantaneous SNR is γi = snrkhi k2 , which is gamma distributed with shape parameter M and scale parameter snr, i.e. γi ∼ Gamma(M, snr). When the transmitter does not fully know the actual channel vector h (imperfect CSI), we can model its channel knowledge as ĥ = h + e, where e ∼ CN (0, σe2 I). MRT is then performed based ĥ . Particularizing [26, Eq. 7] to the MISO case, the kĥk instantaneous SNR is gamma distributed with shape parameter M and scale parameter ζ, i.e. −1  1 + σe2 2 . (2) γi ∼ Gamma(M, ζ) with ζ = σe + snr on the channel estimate, so that w = This additive error model is consistent with time-divison duplex (TDD) operation, where uplink and downlink transmissions take place at the same frequency, in different time instants; assuming they fall within the coherence interval of the channel, then channel reciprocity can be used to estimate the downlink channel from uplink pilot signals. This model also applies to frequencydivision duplex (FDD) operation with analog feedback [27]. We only account for the effect of CSI error in MISO beamforming, which reduces the achieved SNR (SNR loss) because of not transmitting exactly in the direction of the actual channel; as we explain in the next subsection there could be another penalty in the rate selection process. 1 It can be shown that MRT is the transmission scheme that maximizes both the capacity and the service rate with sum power constraint, Gaussian input signaling, and perfect CSI. This is not necessarily true for arbitrary inputs, where the transmission scheme may depend on the delay constraints. 7 C. Data transmission A codeword of length n symbols (corresponding to n channel uses) and rate Ri (in bits per symbol) is transmitted at each slot i. The transmitter selects a rate adapted to γi and we consider the following two cases: 1) Asymptotically large blocklength: If the blocklength is large enough, no errors occur and the achievable rate is equal to the Shannon capacity of the channel, Ri = log2 (1 + γi ). 2) Finite blocklength: At finite blocklength, a transmission error can occur with probability  > 0 and the maximum coding rate Ri (n, ) is lower than the Shannon rate. Tight non asymptotic upper and lower bounds on the maximum coding rate are given in [2]. Furthermore, for AWGN channels an asymptotic approximation has been established and shown accurate for packet sizes as small as 100 [2], [28], [29]. The coding rate Ri (n, ) = k/n to transmit k information bits using coded packets spanning n channel uses is given by r log2 n V (γi ) −1 Q () + + O(1) Ri (n, ) ≈ log2 (1 + γi ) − n 2n (3) where Q−1 (·) is the inverse of the Gaussian Q function and V (γi ) is the channel dispersion given by V (γi ) = γi (γi + 2) log22 e. (1 + γi )2 (4) Using this approximation, the coding rate and the packet error probability are related as ! n log2 (1 + γi ) − k + 0.5 log2 n p =Q . (5) V (γi )n The above approximation is valid for MISO systems with knowledge of the fading coefficients of the vector channel and the SNR realization at each slot, which makes the MISO channel behaving equivalently to an AWGN channel with SNR snrkhk2 . We should remark that so far throughout this section we have assumed perfect knowledge of the SNR realization, so that the transmitter can adapt the rate to it with no errors. Thus, we only account for the channel estimation error as an SNR penalty, as described in Sec. II-B. The case of imperfect rate selection in MISO systems, which goes beyond the scope of this work, can be analyzed using techniques recently developed in [30]. In that case, channel estimation errors will be approximated by Gaussian variations in the SNR and the Gaussian variations in the capacity due to finite blocklength in [2] will be transformed into Gaussian errors in the SNR. 8 D. Queuing model For the analysis of queuing systems, we consider a stochastic system-theoretic model as in [23], which is widely used in the stochastic network calculus methodology. Stochastic network calculus considers queuing systems and networks of systems with stochastic arrival, departure, and service processes, as the ones below. For an in-depth description of the topic, the interested reader may refer to [9], [10], [23], [31]–[33]. The arrival process ai , introduced in Sec. II, models the number of bits that arrive at the queue at a discrete time instant i. For successful transmissions, the service process si is equal to: (i) nRi for asymptotically large blocklength, (ii) nRi (n, ) with finite blocklength; in case of transmission errors, the service is considered to be zero as no data is removed from the queue. Finite blocklength channel coding affects the reliability of the physical layer, which in turn causes additional delay as data needs to be buffered until successfully transmitted. The departure process di describes the number of bits that arrive successfully at the destination and depends on both the service process and the number of bits waiting in the queue. Note that acknowledgments and feedback messages are assumed to be instantaneous and error-free. We further define the cumulative arrival, service and departure processes as A(τ, t) = t−1 X i=τ ai , S(τ, t) = t−1 X i=τ si , D(τ, t) = t−1 X di . (6) i=τ For lossless first-in first-out queuing systems, the delay W (t) at time t, i.e. the number of slots it takes for an information bit arriving at time t to be received at the destination, is defined as W (t) = inf{u > 0 : A(0, t)/D(0, t + u) ≤ 1}. (7) and the delay violation probability is given by Λ(w, t) = P [W (t) > w]. Using the dynamic server property (i.e. D(0, t) ≥ A ∗ S(0, t) where the (min, +) convolution operator ’*’ is defined as f ∗ g(τ, t) = inf τ ≤u≤t f (τ, t) + g(u, t) [8]), the delay can be characterized through the cumulative arrival and service processes, which we have so far described in the so-called bit domain. As it is more convenient for the analysis of wireless fading channels, we follow [23] and analyze these processes in the exponential (or SNR) domain. 9 III. S TOCHASTIC N ETWORK C ALCULUS IN THE SNR D OMAIN A remarkable feature of stochastic network calculus in the SNR domain is that it allows to obtain bounds on the delay violation probability based on simple statistical characterizations of the arrival and service processes in terms of their Mellin transforms. We will briefly review this result in this section. Let us start by converting the cumulative processes in the bit domain through the exponential function. The corresponding processes in the SNR domain, denoted by calligraphic letters, are A(τ, t) = eA(τ,t) , D(τ, t) = eD(τ,t) , S(τ, t) = eS(τ,t) . (8) From these definitions, an upper bound on the delay violation probability can be computed by means of the Mellin transforms of A(τ, t) and S(τ, t): pv (w) = inf {K(s, −w)} ≥ Λ(w) s>0 (9) where K(s, −w) is the so-called steady-state kernel, defined as K(s, −w) = lim t→∞ t X MA (1 + s, u, t)MS (1 − s, u, t + w). (10) u=0 where MX (s) = E [X s−1 ] denotes the Mellin transform of a nonnegative random variable X for any s ∈ C for which the expectation exists. We restrict our derivations in this work to s ∈ R and we recall that, for a continuous probability density function (pdf) fX (x) on (0, ∞), if there fX (x) exists δ > 0 such that lim+ δ+θ−1 < ∞, then E[X −θ ] < ∞. Alternatively, E[X −θ ] < ∞ if and x→0 x Z ∞ FX (x) dx < ∞. only if xθ+1 0 A. Mellin transform of arrival and service processes Assuming that A(τ, t) has stationary and independent increments, the Mellin transforms become independent of the time instance, as follows:  !s−1  t−1 Y  MA (s, τ, t) = E  eai (11) i=τ  t−τ = E ea(s−1) (12) = Mα (s)t−τ (13) 10 where we have defined α = ea , the non-cumulative arrival process in the SNR domain. We consider the traffic class of (z(s), ρ(s))-bounded arrivals, whose moment generating function in the bit domain is bounded by [8] 1 log E[esA(τ,t) ] ≤ ρ(s) · (t − τ ) + z(s) s (14) for some s > 0. Restricting ourselves to the case where ρ is independent of s and z(s) = 0, we have [24], [34] Mα (s) = eρ(s−1) . (15) For the service process, we start by rewriting si = B log g(γ), where B = n/ log 2. Since the different si are independent and identically distributed (i.i.d.), we can express the Mellin transform of the cumulative service as  MS (s, τ, t) = E  t−1 Y !s−1  g(γ)B (16)  i=τ  t−τ = E g(γ)B(s−1) (17) = Mg(γ) (1 + B(s − 1))t−τ . (18) B. Delay Bound Plugging (15) and (16) into (10) and following [23], the steady-state kernel can be finally rewritten as K(s, −w) = Mg(γ) (1 − B · s)w , 1 − Mα (1 + s)Mg(γ) (1 − B · s) (19) for any s > 0 under the stability condition Mα (1 + s)MS (1 − s) < 1. The delay bound (9) thus reduces to  pv (w) = inf s>0 Mg(γ) (1 − B · s)w 1 − Mα (1 + s)Mg(γ) (1 − B · s)  . (20) IV. D ELAY WITH L ARGE B LOCKLENGTH : E XACT A NALYSIS In this section, we derive exact closed-form expressions for the steady-state kernel K(s, −w) of MISO diversity schemes when the blocklength is infinitely large. We start by providing a general result on the Mellin transform of the service process when the instantaneous SNR is gamma distributed. Obtaining the steady-state kernel for MRT beamforming with both perfect 11 and imperfect CSI is a particularization of this result, which is shown to apply, as a byproduct, for obtaining the performance of other diversity techniques, including MISO OSTBC, antenna selection, and MIMO MRT/MRC. Consider the instantaneous SNR to be a gamma distributed random variable γ ∼ Gamma(M, ζ) with shape parameter M , scale parameter ζ and pdf x xM −1 e− ζ fγ (x) = , Γ(M )ζ M where Γ(t) = R∞ 0 x≥0 (21) xt−1 e−x dx is the (complete) gamma function; we have dropped the subindex since SNRs are independent and ergodic. First, we derive the Mellin transform of g(γ), i.e. Mg(γ) (s) = E [g(γ)s−1 ]. For notation convenience, in the remainder we assume B = n/ log 2 = 1, however in Sec. VII we give again relevant values to this parameter in order to obtain meaningful numerical results. Theorem 1. The Mellin transform of g(γ) = 1 + γ, where γ ∼ Gamma(M, ζ) with M ∈ N+ and ζ > 0, is given by Mg(γ) (s) = ζ −M · U (M, M + s, ζ −1 ) (22) where U (a, b, z) is Tricomi’s confluent hypergeometric function [35, Eq. 13.2.5] (also called confluent hypergeometric function of the second kind and denoted by Ψ(a; b; z)). Proof: See Appendix A. A. MISO MRT The Mellin transform derived above applies directly to the service process with MISO MRT transmission. Using this expression together with the transform of the arrival process, we obtain the kernel and consequently the bound on the delay violation probability as follows ( ) w MMRT g(γ) (1 − B · s) pv (w) = inf s>0 1 − Mα (1 + s)MMRT g(γ) (1 − B · s) ( w ) ζ −M · U (M, M + 1 − s, ζ −1 ) = inf . s>0 1 − eρs ζ −M · U (M, M + 1 − s, ζ −1 ) (23) Although U (a, b, z) is implemented in standard software for mathematical calculations, we provide below an alternative expression for the Mellin transform in terms of the simpler upper 12 incomplete gamma function. Theorem 2. The Mellin transform of g(γ) from Theorem 1 can be given as 1  M −1  X eζ M −1 Mg(γ) (s) = M (−1)M −1−j · ζ j+s · Γ(j + s, ζ −1 ) ζ Γ(M ) j=0 j 1 = eζ M −1 X (−1)M −1−j · ζ j+s−M j=0 where Γ(s, z) = R∞ z Γ(j + s, ζ −1 ) Γ(M − j)Γ(j + 1) (24) (25) ts−1 e−t dt is the upper incomplete gamma function. Proof: See Appendix B. Remark 1. For the SISO case, letting M = 1 and ζ = snr in (24) we obtain Mg(γ) (s) = 1 e snr · snrs−1 · Γ(s, snr−1 ) which is the same expression reported in [23]. The above expressions allows us to obtain bounds on the delay violation probability for different system parameters without resorting to Monte Carlo simulations. However, due to the complexity of the kernel function, no closed-form solution for the minimum s can be found, and we must resort to numerical methods. In some asymptotic cases, we can have simpler expressions of the Mellin transform that make this process easier, as we will show later in Section V. B. Other MISO Diversity Techniques So far, we have considered that the transmitter performs MRT based on perfect or imperfect CSI. In this section, and for means of comparison, we study two alternative multi-antenna diversity techniques, namely OSTBC and transmit antenna selection, which rely on no and very low-resolution CSI, respectively. 1) OSTBC: Orthogonal space-time block coding has been a very successful transmit diversity technique because it can achieve full diversity without CSI at the transmitter and need for joint decoding of multiple symbols. It is characterized by the number of independent symbols Ns transmitted over T time slots; the code rate is Rc = Ns /T . When the transmitter uses OSTBC with M transmit antennas, code parameter T , and the receiver performs MRC with N antennas, the equivalent SNR γ = snr kHk2F M is gamma distributed with shape parameter M N and scale parameter (snr/M )−1 [36, Eq. 3.43]; here H denotes the MIMO channel matrix of N × M 13 complex Gaussian entries. Particularizing (22) for the case of MISO OSTBC, we have the following result. Corollary 1. The Mellin transform of the service process of a MISO system employing OSTBC is given by MOSTBC g(γ) (s) =  snr −M M · U (M, M + s, M/snr) . (26) 2) Antenna Selection: Antenna selection is a low-complexity, low-rate feedback diversity technique, in which the transmitter and/or the receiver select a subset of transmit/receive antennas for transmission/reception. It can be used in conjunction with other diversity techniques and can improve the performance of open-loop MIMO at the expense of very low amount of feedback. We consider here transmit antenna selection (TAS), in which the transmitter selects to transmit on the antenna (one of M ) that maximizes the instantaneous SNR. The amount of CSI required to be fed back to the transmitter is dlog2 M e bits (index of best antenna), where dxe denotes the smallest integer larger than x. The instantaneous SNR can be expressed as γTAS = snrγmax , where γmax is the largest channel gain, i.e. γmax = max |hi |2 . Since hi ∼ CN (0, 1), we have 1≤i≤M that |hi |2 is exponentially distributed with unit mean and pdf f|hi |2 (x) = e−x . Theorem 3. The Mellin transform for a MISO system employing TAS is given by TAS Mg(γ) (s) = M ζ s−1 k+1    ζ k+1 M −1 k e Γ s, . (−1) (k + 1)s ζ k M −1  X k=0 (27) Proof: See Appendix C. C. Other applications of Theorem 1 In this section we briefly point out towards other possible applications of Theorem 1. 1) SISO case with Nakagami-m fading: Theorem 1 could easily be used to analyze the SISO case with Nakagami-m fading. The Nakagami-m distribution includes as special cases Rayleigh (m = 1), no fading (m → ∞), and the Ricean distribution for m = (K + 1)2 /(2K + 1) where K is the Ricean factor. When the envelope of the received signal is Nakagami-m distributed, the instantaneous SNR is gamma distributed with shape parameter m and rate parameter snr−1 , thus its Mellin transform is simply Mg(γ) (s) = snr−m · U (m, s + m, snr−1 ). 2) MIMO eigen-beamforming: Consider now that the receiver is equipped with N receive antennas and we perform eigen-beamforming at both transmitter and receiver ends. In order 14 to maximize the SNR at the receiver, the transmit weighting vector w is selected to be the eigenvector of the Wishart matrix HH H which corresponds to the largest eigenvalue φmax of HH H, i.e. γmimo = snrφmax . Corollary 2. The Mellin transform of the service process in the case of MIMO MRT in Rayleigh fading is given by MIMO Mg(γ) (s) = R )i−2i N (M +N X X i=1 2 m=M −N  m+1 1 m! · ci,m · U (m + 1, m + 1 + s, i/ζ) ζ (28) Q −1 where R = ( N and coefficients ci,m can be obtained from [26]; for the k=1 (N − k)!(M − k)!) perfect CSI case, they have been tabulated for some values of {N, M } [37, Table I-IV]. This result is a direct consequence of [26, Eq. 8] and (22). Note that since the largest eigenvalue of the complex Wishart matrix (or equivalently the maximum singular value of H) is bounded by kHk2F min(M,N ) ≤ φmax ≤ kHk2F and kHk2F ∼ Gamma(M N, 1), simple upper and lower bounds for the Mellin transform of MIMO eigen-beamforming can be obtained particularizing Theorem 1. V. D ELAY WITH L ARGE B LOCKLENGTH : A SYMPTOTIC A NALYSIS In the previous section, we have provided analytical expressions for the Mellin transform of the service process and the kernel for various multi-antenna diversity techniques. The exact results are mainly given in terms of special functions and alternating series. To explore further the delay performance of MISO MRT, we derive in this section simplified expressions for various asymptotic regimes: low/high SNR and large M . Additionally, we obtain a general result for a Gaussian distributed service process; as we will show, the MISO MRT service process converges to this distribution as M grows large. A. High SNR regime We study here how latency constraints affect the MISO performance at high SNR. We assume this implies also large ζ, which is true as long as σe2 does not increase2 with the SNR (see (2)). 2 As a matter of fact, most frequently and in practice σe2 ∝ 1/snr. 15 Corollary 3. In the high SNR regime, the Mellin transform of the service process scales as   s−1 Γ(s+M −1)  s>1−M  Γ(M )  ζ ) (29) MHg(γ) (s) = ζ −M Γ(1−s−M s≤1−M Γ(1−s)     ζ −M log ζ−ψ(M ) s = 1 − M Γ(M ) where ψ(x) denotes the Digamma function [35, Sec. 6.3]. Proof: The three branches are obtained after direct application of the asymptotic properties of the U (a, b, z) function listed in [35, Sec. 13.5]. The first branch can be also derived by considering the approximated service process si ≈ log(γi ), which gives that MHg(γ) (s) = ζ s−1 Γ(s+M −1) for s + M > 1. B. Low SNR regime At low SNR, the service process can be approximated as si ≈ γi and the following result is obtained. Corollary 4. In the low SNR regime, the Mellin transform of the service process is approximately given as MLg(γ) (s) = (1 − (s − 1)ζ)−M , s < ζ −1 − 1. (30) Proof: At low SNR, we use the first order Taylor series expansion log(1 + x) ≈ x. In that case, the service process can be approximated as si ≈ γi , which gives that g(γ) ≈ eγ , and in consequence h i MLg(γ) (s) = E eγ (s−1) = (1 − (s − 1)ζ)−M (31) using the moment generating function (MGF) of a gamma random variable. C. Large antenna regime The distribution of the mutual information of a Rayleigh fading MIMO system is generally rather complicated. For this reason, approximations have been used in the literature. For example, in the large antenna regime (M → ∞) and using the Central Limit Theorem (CLT), it can be shown that the distribution of the mutual information I converges to a Gaussian distribution; see for instance [38] and references therein. Using similar arguments here, we can obtain simpler 16 expressions for the Mellin transform of the service process. In general, we can obtain results of the form Mα I −µ d → N (0, 1) σM (32) where convergence is in distribution, µ = E(I), σM is a variance term, and α is a measure of the convergence speed (normally 0.5). This means that, for large M , an accurate approximation 2 of the distribution is given by I ∼ N (µ, σ 2 ) with σ 2 = σM /M α . The mean and the variance terms can be obtained in closed form from [39]. Note that, for brevity, throughout this section we will use the natural logarithm, and thus all rates are in nats. Thanks to the CLT arguments and the Gaussian approximation of the service process, i.e. si ≈ Ii , we arrive at the following result. Theorem 4. The Mellin transform of a service process with rate following a Gaussian distribution with mean µ and variance σ 2 is given by 2 σ2 2 Masg(γ) (s) = e(s−1)µ+(s−1) . (33) Proof: The service is given in terms of log(g(γ)) (bit domain), thus we have that g(γ) = eIi , and the result follows immediately by solving   Masg(γ) (s) = E e(s−1)Ii Z ∞ e(s−1)x fI (x) dx = (34) (35) −∞ 2 σ2 2 = e(s−1)µ+(s−1) . (36) Theorem 5. For the MISO MRT case, as the number of antennas grows large, we have lim Masg(γ) (s) → (1 + ζM )s−1 . M →∞ (37) Proof: The mutual information can be written as I = log(1 + γ). Rewriting (33) and 17 applying Jensen’s inequality Masg(γ) (s) 2 σ2 2 ≈ e(s−1) E[log(1+γ)] · e(s−1) ≤ e(s−1) log(1+E[γ]) · e(s−1) = (1 + ζM )s−1 · e(s−1) (40) (1 + ζM )s−1 (41) M →∞ = 2 σ2 2 2 σ2 2 (38) (39) where the last equality follows from the fact that lim σ 2 = 0 [38], [39]. M →∞ It can be shown that the bound is asymptotically tight (using Prohorov-Le Cam theorem, continuous mapping theorem, and Chebyshev inequality), but the proof is standard and is omitted for the sake of brevity. Furthermore, the asymptotic convergence can be obtained without resorting to the Gaussian approximation by showing that convergence in distribution implies convergence in Mg(γ) (s). Let y1 , y2 , . . . be a sequence of positive random variables that converges in distribution to a positive random variable y. For s > 0, we have lim Myi (s) = My (s). By Lebesgue’s dominated convergence theorem and P khk2 → E[khk2 ] M →∞ 1, we have that lim Mg(γ) (s) = (1 + ρM )s−1 . M →∞ s−1 Interestingly, we observe that for large M , Mas , which is related to the sog(γ) (s) ∼ (ζM ) called channel hardening effect, i.e. the channel behaves equivalently to an AWGN channel with SNR ζM . In the low SNR regime, the number of transmit antennas affects linearly the service process, while at high SNR, the Mellin transform of the service process grows superlinearly with M (for s > 1). The approximation si ∼ N (µ, σ 2 ) allows us to simplify the delay violation probability expression (23), however its relevance and applicability goes beyond, as it allows analyzing the delay violation probability of any system whose service rate can be approximated by a Gaussian random variable. Additionally, it provides very simple expressions for the effective capacity, as we show next. D. Effective Capacity Effective capacity is defined as the maximum constant arrival rate that a system can support given a QoS requirement θ [12]. A byproduct of the delay analysis using MGF-based stochastic network calculus is that we can obtain expressions for the effective capacity R by noticing that 1 · R(θ) = − log Mg(γ) (1 − θ), θ θ > 0. (42) 18 As an example, taking the normalized logarithm in (22), we can recover the effective capacity results in [19]. However, to assess the effect of multiple antennas in the delay-constrained performance, simpler expressions would be beneficial. We thus focus on the Gaussian approximation in Sec. V-C and obtain θ Ras (θ) = µ − σ 2 2 (43) = E [log(1 + γ)] − θ Var[log(1 + γ)] . 2 (44) As expected, the effective capacity converges to the ergodic capacity in the absence of delay constraints (θ = 0). For general θ, there is a penalty on the achievable rate that is proportional to the variance of the instantaneous rate log(1 + γ). This implies that, as the number of antennas tends to infinity, such penalty vanishes because the variance of the rate tends to zero [38] and the effective capacity does not decay as θ increases. VI. D ELAY A NALYSIS WITH F INITE B LOCKLENGTH We investigate now the effect of finite blocklength in the service process and the delay performance. As explained in Sec. II, at finite blocklength there is always a probability of error  and a rate loss as compared to Shannon capacity; in case of transmission errors, the offered service is zero. Therefore, the service process can be modeled as si = Ri (n, ) · Zi , where the coding rate Ri (n, ) is approximated using (3) and Zi is a Bernoulli random variable, being one in case of successful transmission (with probability 1 − ), and zero otherwise; in this work, we assume independence between Zi and γi (i.e. non-varying  with SNR). Using (3) and lower bounding the achievable rate by zero (for very low SNR values), the Mellin transform of g(γi , Zi ) is given by MFB g(γi ,Zi ) (s) = (1 − )Mq(γi ) (s) + , where q(γi ) = max  √1+γi e V (γi )F (45)  , 1 with F = n−1/2 Q−1 (), and Mq(γi ) (s) is given by " Mq(γi ) (s) = E max Z = e φ V (γi )F Z fγ (x)dx + 0 = s−1 # 1 + γi √ ,1  φ ∞  1+γ √ i e V (γ)F γ(M, φ/snr) + I(c, s, F ) Γ(M ) s−1 fγ (x)dx (46) 19 0 where φ = eF − 1 is the point where max q(γi ) > 1. The major difficulty in deriving Mq(γi ) (s) is the fact that the channel dispersion V (γ) depends p on γi . In [24], an infinite-order Taylor series expansion for V (γ) and the series expansion of the exponential function are used. These results can be easily extended in the MISO case, however the expression would be even more involved due to gamma distributed channel gains, providing little or no insight. For that, we numerically evaluate the integral when required and focus on a simpler asymptotic expression at high SNR. A. High SNR regime At high SNR, the channel dispersion can be approximated as V (γ) ≈ 1 and the Mellin transform of q(γi ) is approximately "  s−1 # 1 + γi Mq(γi ) (s) ≈ E max ,1 eF s−1 Z eF −1 Z ∞  1 + γi = fγ (x)dx + fγ (x)dx eF 0 eF −1 γ(M, (eF − 1)/snr) Γ(M )  M −1   e1/ζ ζ −M X M − 1 + (−1)M −1−j ζ j+s Γ j + s, eF ζ −1 F (s−1) Γ(M )e j j=0 = (47) where for the last equality we have followed the same procedure used to obtain Theorem 2 (see Appendix B). Note that for F = 0, we recover the Mellin transform of the service process with infinite blocklength. This approximation, which requires only widely used standard special functions, is easier to evaluate numerically. In Section VII we show that its accuracy is satisfactory even for moderate values of SNR. VII. N UMERICAL R ESULTS In this section, we provide numerical evaluation of the performance of MISO communication systems based on the above analysis. Unless otherwise stated, the duration of a slot is set to T = 1 ms, the overhead is disregarded (nm → 0), and the blocklength is assumed to be n = 168; consequently B = n/ log 2 6= 1, and we reincorporate this parameter into the equations. We start by validating our analysis with Monte Carlo simulations. In Figure 1, we compare the delay violation probability and its bound with ρ = 24 kbps and snr = −2 dB. We corroborate 20 10 P(delay > ω) 10 0 Bounds Monte Carlo -1 10-2 M=1 10 -3 10 -4 M=2 10-5 10 -6 0 1 2 ω (ms) 3 4 Figure 1. Delay violation probability and associated bounds as a function of the target dealy, ρ = 24 kbps and snr = −2 dB. that the bounds follow the trend of the original curve, and we point out that the maximum difference in the x-axis seems to be of about 1 ms. Figure 2 plots the violation bound for MISO MRT as a function of the target delay w with ρ = 24 kbps and snr = 5 dB. The plot on the left shows the effect of varying the number of antennas and the accuracy of the CSI. We observe the strong decrease of the delay violation probability when increasing the number of antennas: with perfect CSI, the probability of exceeding 1 ms delay roughly decreases by three orders of magnitude when adding an extra antenna. On the other hand, the plot on the right depicts the difference between assuming finite and infinite blocklength; similar to [24], we can see that such difference is remarkable, and that the Shannon model substantially overestimates the performance of the system. In Figure 3, we compare the delay performance of MISO MRT with OSTBC and TAS. We can see that MRT generally performs better when the quality of the CSI is good: above a certain value of σe2 , TAS and OSTBC outperform MRT. The values at which this change takes place seem to be dependent on the number of antennas. To obtain results with finite blocklength we must set an error probability . In the experiment above, we have used  = 10−2 for M = 1,  = 10−4 for M = 2, and  = 10−5 for M = 3; these parameters have been set with the inspiration of Figure 4, which illustrates the importance of choosing wisely  depending not only on the SNR but also on the number of antennas. 21 100 100 M=1 M=1, FB M=2 M=2, FB M=3 M=3, FB σ2e = 0 10-2 σ2e = 0.1 10-2 2 σe = 0.25 10 10-4 σ2e = 0.4 p v(ω) pv (ω) -4 10-6 10-6 M=1 -8 10-8 10 M=2 M=3 -10 10 0 1 2 3 4 5 10-10 0 1 2 ω (ms) 3 4 5 ω (ms) Figure 2. Delay violation probability bound as a function of the target delay, ρ = 24 kbps and snr = 5 dB. Curves labeled FB have been obtained using finite blocklength expressions. 100 σ2e = 0 10-2 σ2e = 0.25 σ2e = 0.4 -4 OSTBC TAS pv (ω) 10 10-6 10-8 M=2 M=4 -10 10 0 0.5 1 1.5 ω 2 2.5 3 Figure 3. Delay violation probability bound as a function of the target delay for different diversity techniques, ρ = 24 kbps and snr = 5 dB. In Figure 5, we investigate further the effect of adding antennas, and compare it to that of increasing the power. For a target delay of 1 ms at 0 dB, we can see that going from three to four antennas seems to have only slightly less impact than doubling the power; at 5 dB, however, this is not the case anymore: 3 dB of extra power decrease the violation probability by one order of magnitude, but adding one antenna decreases it by two orders of magnitude. As explained in Section IV, it is important to have simple expressions of the kernel when 22 100 pv (3 ms) M=1 M=2 10-5 -10 M=3 10 10-5 10-4 10-3 ǫ ζ = 2 dB ζ = 5 dB 10-2 10-1 Figure 4. Bound on the probability of exceeding 3 ms of delay as a function of the block error rate , finite blocklength analysis, ρ = 24 kbps. Circles mark the minimum of each curve. 100 ζ = 0 dB ζ = 3 dB ζ = 5 dB ζ = 8 dB ζ = 15 dB -2 10 p v (1 ms) 10-4 10-6 10-8 10-10 10-12 2 4 6 8 10 M Figure 5. Bound on the probability of exceeding 1 ms delay as a function of the number of antennas, asymptotically large blocklength, ρ = 256 kbps. 23 100 105 100 -4 10 K(s) Mg (1-sB) 10-2 10-6 10-8 10-10 10-5 10-5 Exact Gaussian approx. -4 10 -3 10 s Exact Gaussian approx. -2 10 10-10 -1 10 0 0.2 0.4 0.6 0.8 s Figure 6. Mellin transform (left) and kernel (right) as a function of s, M = 3, ρ = 20 kbps, ζ = 0 dB, w = 1. 100 105 Exact Gaussian approx. -2 100 ρ= 540 kbps -4 10 K(s) Mg (1-sB) 10 10-5 10-6 10-8 10-10 Exact Gaussian approx. ρ= 240 kbps -10 10 10-5 -15 10-4 10-3 s 10-2 10-1 10 0 0.05 0.1 0.15 s Figure 7. Mellin transform (left) and kernel (right) as a function of s, M = 10, ζ = 0 dB, w = 1. possible. In Figure 6 and Figure 7, we illustrate the accuracy of the Gaussian approximation for M = 3 and M = 10; as expected, the error is large for the former and negligible for the latter. This justifies the use of the much simpler expression (33) whenever M is relatively large. In Figure 8 (left) we test the accuracy of the high and low SNR approximations derived for the Shannon model in Section VI-A and Section V-B. We can see that the high SNR approximation becomes asymptotically tight as the SNR increases, and that, remarkably, the low SNR approximation is reasonably accurate for most SNR values; this makes the low SNR approximation particularly interesting given its simplicity, see (30). Similarly, in Figure 8 (right) we show the accuracy of the high SNR approximation derived for the finite blocklength model 24 100 100 M=1 M=2 M=3 10-2 M=1 -5 pv (2 ms) pv (2 ms) 10 M=2 -10 10-4 10-6 10 High SNR approx. Exact Low SNR approx. 10-15 -5 0 5 ζ (dB) 10-8 M=3 10 15 10-10 HSNR approx. Exact -5 0 5 ζ (dB) 10 15 Figure 8. Bound on the probability of exceeding 2 ms delay, asymptotically large blocklength (left) and finite blocklength (right) analysis, ρ = 200 kbps. 100 M=1 10-4 v p (2 ms) 10-2 M=2 10-6 Infinite blocklength Finite blocklength -8 10 0 100 200 300 400 500 Blocklength n Figure 9. Bound on the probability of exceeding 2 ms delay as a function of the blocklength n, ρ = 150 kbps, ζ = 10 dB. Circles mark the minimum of each curve. in Section VI-A. Finally, we show the effect of varying the blockelength n. We assume now a constant overhead of nm = 64 symbols, so that in each time slot a total of nm + n symbols are transmitted. The duration a time slot is now (n+nm )/168 ms. As we can see from Figure 9, the delay performance heavily depends on the blocklength chosen, and the optimum value changes with the number of antennas. 25 VIII. C ONCLUSIONS In this work, we characterized the delay performance of MISO diversity communications under statistical delay constraints. Using stochastic networks calculus, we derived a statistical characterization of the service process in multi-antenna fading channels and provided probabilistic delay bounds. We showed how the number of transmit antennas and transmit SNR may affect the delay performance. We also investigated the impact of imperfect CSI at the transmitter and finite blocklength channel coding on the delay performance of MISO transmit beamforming. MISO MRT is shown to reduce the delay violation probability as compared to single-antenna transmissions even with imperfect CSI. Nevertheless, as channel imperfections increase, other diversity-techniques, such as OSTBC and antenna selection, perform better than MRT in terms of delay violation probability. Future work could consider the effect of imperfect CSI at the receiver and limited feedback in FDD MIMO systems. Further extensions of this framework may include the analysis of MIMO spatial multiplexing, MIMO channels with co-channel interference, and multiuser MIMO systems. A PPENDIX A P ROOF OF T HEOREM 1 −x Recall that γ is gamma distributed with pdf fγ (x) = xM −1 e ζ Γ(M )ζ M , x ≥ 0. Then, we have that   · Mg(γ) (s) = E (1 + γ)s−1 Z ∞ = (1 + x)s−1 fγ (x) dx 0 Z ∞ 1 = (1 + x)s−1 xM −1 e−x/ζ dx M ζ Γ(M ) 0 (a) = ζ −M U (M, M + s, ζ −1 ) (48) (49) (50) (51) where (a) follows from the definition of Tricomi’s confluent hypergeometric function [35, Eq. 13.2.5] −1 Z U (a, b, z) = Γ(a) 0 ∞ e−zt ta−1 (t + 1)b−a−1 dt. (52) 26 A PPENDIX B P ROOF OF T HEOREM 2 Equation (50) can be rewritten as 1 Mg(γ) (s) = M ζ Γ(M ) 1 eζ = M ζ Γ(M ) Z ∞ (1 + x)s−1 xM −1 e−x/ζ dx (53) (t − 1)M −1 ts−1 e−t/ζ dt (54) 0 Z ∞ 1 by applying change of variables t = 1 + x. Now, since M is a positive integer, we can use the binomial theorem to obtain 1  Z ∞ M −1  X eζ M −1 M −1−j Mg(γ) (s) = M (−1) · ts+j−1 e−t/ζ dt j ζ Γ(M ) j=0 1 1  M −1  X eζ M −1 = M (−1)M −1−j · ζ j+s · Γ(j + s, ζ −1 ). ζ Γ(M ) j=0 j (55) (56) Or, alternatively, 1 Mg(γ) (s) = e ζ M −1 X (−1)M −1−j · ζ j+s−M j=0 Γ(j + s, ζ −1 ) . Γ(M − j)Γ(j + 1) (57) A PPENDIX C P ROOF OF T HEOREM 3 Suppose that X1 , . . . , Xn are n independent continuous variates, each with cdf F (x) and pdf f (x). The pdf of the r-th order statistic X(r) , r = 1, . . . , n is given by [40] f(r) (x) = 1 F r−1 (x)[1 − F (x)]n−r f (x). B(r, n − r + 1) (58) 27 Therefore, the pdf of γmax = γ(M ) is given by fγmax (x) = M fγ (x)FγM −1 (x). Since γ ∼ Exp(1) in the case of TAS with pdf fγ (x) = e−x , we have that   · s−1 MTAS g(γ) (s) = E (1 + ζγmax ) Z ∞ = (1 + ζx)s−1 fγmax (x)dx 0 Z ∞ (1 + ζx)s−1 fγ (x)FγM −1 (x)dx = M Z0 ∞ (1 + ζx)s−1 e−x (1 − e−x )M −1 dx = M 0 M −1  X  Z ∞ M −1 k (1 + ζx)s−1 e−x(k+1) dx = M (−1) k 0 k=0 k+1    M −1  X ζ M −1 k+1 s−1 k e = Mζ (−1) Γ s, k (k + 1)s ζ k=0 (a) (59) (60) (61) (62) (63) (64) where (a) follows from applying binomial theorem. R EFERENCES [1] A. Ephremides and B. Hajek, “Information theory and communication networks: an unconsummated union,” IEEE Trans. Inf. Theory, vol. 44, no. 6, pp. 2416–2434, Oct. 1998. [2] Y. Polyanskiy, H. V. Poor, and S. Verdu, “Channel coding rate in the finite blocklength regime,” IEEE Trans. Inf. Theory, vol. 56, no. 5, pp. 2307–2359, May 2010. [3] C. E. Shannon, “A mathematical theory of communication,” The Bell System Technical Journal, vol. 27, no. 3, pp. 379–423, July 1948. [4] R. G. Gallager, Information Theory and Reliable Communication. New York, NY, USA: John Wiley & Sons, Inc., 1968. [5] S. V. Hanly and D. N. C. Tse, “Multiaccess fading channels-part II: Delay-limited capacities,” IEEE Trans. Inf. Theory, vol. 44, no. 7, pp. 2816–2831, Nov. 1998. [6] L. H. Ozarow, S. Shamai, and A. D. Wyner, “Information theoretic considerations for cellular mobile radio,” IEEE Trans. Veh. Technol., vol. 43, no. 2, pp. 359–378, May 1994. [7] A. E. Gamal, J. Mammen, B. Prabhakar, and D. Shah, “Throughput-delay trade-off in wireless networks,” in Proc. IEEE INFOCOM, Mar. 2004. [8] C.-S. Chang, Performance Guarantees in Communication Networks. [9] Y. Jiang and Y. Liu, Stochastic Network Calculus. London, UK: Springer-Verlag, 2000. London, UK: Springer-Verlag, 2008. [10] M. Fidler and A. Rizk, “A guide to the stochastic network calculus,” IEEE Commun. Surveys Tuts., vol. 17, no. 1, pp. 92–105, First quarter 2015. [11] I. H. Hou, V. Borkar, and P. R. Kumar, “A theory of QoS for wireless,” in Proc. IEEE INFOCOM, Apr. 2009, pp. 486–494. [12] D. Wu and R. Negi, “Effective capacity: a wireless link model for support of quality of service,” IEEE Trans. Wireless Commun., vol. 2, no. 4, pp. 630–643, July 2003. [13] R. L. Cruz, “A calculus for network delay, part I: Network elements in isolation,” IEEE Trans. Inf. Theory, vol. 37, no. 1, pp. 114–131, Jan. 1991. 28 [14] S. Zhou, K. Zhang, Z. Niu, and Y. Yang, “Queuing analysis on MIMO systems with adaptive modulation and coding,” in Proc. IEEE Inter. Conf. on Commun. (ICC), May 2008, pp. 3400–3405. [15] S. Kittipiyakul and T. Javidi, “Optimal operating point for MIMO multiple access channel with bursty traffic,” IEEE Trans. Wireless Commun., vol. 6, no. 12, pp. 4464–4474, Dec. 2007. [16] S. Kittipiyakul, P. Elia, and T. Javidi, “High-SNR analysis of outage-limited communications with bursty and delay-limited information,” IEEE Trans. Inf. Theory, vol. 55, no. 2, pp. 746–763, Feb. 2009. [17] J. Chen and V. K. N. Lau, “Large deviation delay analysis of queue-aware multi-user MIMO systems with two-timescale mobile-driven feedback,” IEEE Trans. Signal Process., vol. 61, no. 16, pp. 4067–4076, Aug. 2013. [18] M. C. Gursoy, “MIMO wireless communications under statistical queueing constraints,” IEEE Trans. Inf. Theory, vol. 57, no. 9, pp. 5897–5917, Sep. 2011. [19] M. Matthaiou, G. C. Alexandropoulos, H. Q. Ngo, and E. G. Larsson, “Analytic framework for the effective rate of MISO fading channels,” IEEE Trans. Commun., vol. 60, no. 6, pp. 1741–1751, Jun. 2012. [20] M. You, H. Sun, J. Jiang, and J. Zhang, “Unified framework for the effective rate analysis of wireless communication systems over MISO fading channels,” IEEE Trans. Commun., vol. 65, no. 4, pp. 1775–1785, Apr. 2017. [21] K. Mahmood, A. Rizk, and Y. Jiang, “On the flow-level delay of a spatial multiplexing MIMO wireless channel,” in Proc. IEEE Inter. Conf. on Commun. (ICC), June 2011, pp. 1–6. [22] K. Mahmood, M. Vehkapera, and Y. Jiang, “Delay constrained throughput analysis of a correlated MIMO wireless channel,” in Proc. 20th Inter. Conf. on Comp. Commun. and Netw. (ICCCN), July 2011, pp. 1–7. [23] H. Al-Zubaidy, J. Liebeherr, and A. Burchard, “A (min, x) network calculus for multi-hop fading channels,” in Proc. IEEE INFOCOM, April 2013, pp. 1833–1841. [24] S. Schiessl, J. Gross, and H. Al-Zubaidy, “Delay analysis for wireless fading channels with finite blocklength channel coding,” in Proc. 18th ACM Inter. Conf. on Model., Anal. and Simul. of Wirel. and Mob. Systems (MSWiM ’15), Nov. 2015. [25] T. K. Y. Lo, “Maximum ratio transmission,” IEEE Trans. Commun., vol. 47, no. 10, pp. 1458–1461, Oct. 1999. [26] Y. Chen and C. Tellambura, “Performance analysis of maximum ratio transmission with imperfect channel estimation,” IEEE Commun. Lett., vol. 9, no. 4, pp. 322–324, Apr. 2005. [27] G. Caire, N. Jindal, M. Kobayashi, and N. Ravindran, “Multiuser MIMO achievable rates with downlink training and channel state feedback,” IEEE Trans. Inf. Theory, vol. 56, no. 6, pp. 2845–2866, Jun. 2010. [28] W. Yang, G. Durisi, T. Koch, and Y. Polyanskiy, “Quasi-static multiple-antenna fading channels at finite blocklength,” IEEE Trans. Inf. Theory, vol. 60, no. 7, pp. 4232–4265, July 2014. [29] M. Hayashi, “Information spectrum approach to second-order coding rate in channel coding,” IEEE Trans. Inf. Theory, vol. 55, no. 11, pp. 4947–4966, Nov. 2009. [30] S. Schiessl, H. Al-Zubaidy, M. Skoglund, and J. Gross, “Analysis of wireless communications with finite blocklength and imperfect channel knowledge,” 2016. [Online]. Available: http://arxiv.org/abs/1608.08445 [31] Y. Jiang and P. J. Emstad, Analysis of Stochastic Service Guarantees in Communication Networks: A Server Model, H. de Meer and N. Bhatti, Eds. Berlin, Heidelberg: Springer, 2005. [32] M. Fidler, “An end-to-end probabilistic network calculus with moment generating functions,” in Proc. 14th IEEE Inter.Workshop on Quality of Service, June 2006, pp. 261–270. [33] ——, “A network calculus approach to probabilistic quality of service analysis of fading channels,” in Proc. IEEE Global Commun. Conf. (Globecom), Nov. 2006. [34] N. Petreska, H. Al-Zubaidy, and J. Gross, “Power minimization for industrial wireless networks under statistical delay constraints,” in Proc. 26th International Teletraffic Congress (ITC), Sep. 2014. 29 [35] M. Abramowitz and I. A. Stegun, Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables. New York: Dover, 1964. [36] A. Paulraj, R. Nabar, and D. Gore, Introduction to Space-Time Wireless Communications, 1st ed. New York, NY, USA: Cambridge University Press, 2003. [37] P. A. Dighe, R. K. Mallik, and S. S. Jamuar, “Analysis of transmit-receive diversity in Rayleigh fading,” IEEE Trans. Commun., vol. 51, no. 4, pp. 694–703, Apr. 2003. [38] B. M. Hochwald, T. L. Marzetta, and V. Tarokh, “Multiple-antenna channel hardening and its implications for rate feedback and scheduling,” IEEE Trans. Inf. Theory, vol. 50, no. 9, pp. 1893–1909, Sep. 2004. [39] M. R. McKay, P. J. Smith, H. A. Suraweera, and I. B. Collings, “On the mutual information distribution of OFDM-based spatial multiplexing: Exact variance and outage approximation,” IEEE Trans. Inf. Theory, vol. 54, no. 7, pp. 3260–3278, July 2008. [40] H. A. David and H. N. Nagaraja, Order Statistics. Hoboken, NJ, USA: John Wiley & Sons, Inc., 2005.
7cs.IT
Actors without Borders: Amnesty for Imprisoned State Elias Castegren Tobias Wrigstad Uppsala University, Sweden In concurrent systems, some form of synchronisation is typically needed to achieve data-race freedom, which is important for correctness and safety. In actor-based systems, messages are exchanged concurrently but executed sequentially by the receiving actor. By relying on isolation and non-sharing, an actor can access its own state without fear of data-races, and the internal behavior of an actor can be reasoned about sequentially. However, actor isolation is sometimes too strong to express useful patterns. For example, letting the iterator of a data-collection alias the internal structure of the collection allows a more efficient implementation than if each access requires going through the interface of the collection. With full isolation, in order to maintain sequential reasoning the iterator must be made part of the collection, which bloats the interface of the collection and means that a client must have access to the whole data-collection in order to use the iterator. In this paper, we propose a programming language construct that enables a relaxation of isolation but without sacrificing sequential reasoning. We formalise the mechanism in a simple lambda calculus with actors and passive objects, and show how an actor may leak parts of its internal state while ensuring that any interaction with this data is still synchronised. 1 Introduction Synchronisation is a key aspect of concurrent programs and different concurrency models handle synchronisation differently. Pessimistic models, like locks or the actor model [1] serialise computation within certain encapsulated units, allowing sequential reasoning about internal behavior. In the case of the actor model, for brevity including also active objects (which carry state, which actor’s traditionally do not), if a reference to an actor A’s internal state is accessible outside of A, operations inside of A are subject to data-races and sequential reasoning is lost. The same holds true for operations on an aggregate object behind a lock, if a subobject is leaked and becomes accessible where the appropriate lock is not held. In previous work, we designed Kappa [4], a type system in which the boundary of a unit of encapsulation can be statically identified. An entire encapsulated unit can be wrapped inside some synchronisation mechanism, e.g., a lock or an asynchronous actor interface, and consequently all operations inside the boundary are guaranteed to be data-race free. An important goal of this work is facilitating object-oriented reuse in concurrent programming: internal objects are oblivious to how their data-race freedom is guaranteed, and the building blocks can be reused without change regardless of their external synchronisation. This extended abstract explores two extensions to this system, which we explain in the context of the actor model (although they are equally applicable to a system using locks). Rather than rejecting programs where actors leak internal objects, we allow an actor to bestow its synchronisation mechanism upon the exposed objects. This allows multiple objects to effectively construct an actor’s interface. Exposing internal operations externally makes concurrency more fine-grained. To allow external control of the possible interleaving of these operations, we introduce an atomic block that groups them together. The following section motivates these extensions. V.T. Vasconcelos and P. Haller (Eds.): Workshop on Programming Language Approaches to Concurrency- and Communication-cEntric Software (PLACES’17) EPTCS 246, 2017, pp. 10–20, doi:10.4204/EPTCS.246.4 E. Castegren & T. Wrigstad class Node[t] var next : Node[t] var elem : t // getters and setters omitted actor List[t] var first : Node[t] def getFirst() : Node[t] return this.first def get(i : int) : t var current = this.first while i > 0 do current = current.next i = i - 1 return current.elem (a) 11 class Iterator[t] var current : Node[t] def init(first : Node[t]) : void this.current = first def getNext() : t val elem = this.current.elem this.current = this.current.next return elem def hasNext() : bool return this.current != null actor List[t] def getIterator() : Iterator[t] val iter = new Iterator[t] iter.init(this.first) return iter (b) Figure 1: (a) A list implemented as an actor. (b) An iterator for that list. 2 Breaking Isolation: Motivating Example We motivate breaking isolation in the context of an object-oriented actor language, with actors serving as the units of encapsulation, encapsulating zero or more passive objects. Figure 1a shows a Kappa program with a linked list in the style of an actor with an asynchronous external interface. For simplicity we allow asynchronous calls to return values and omit the details of how this is accomplished (e.g., by using futures, promises, or by passing continuations). Clients can interact with the list for example by sending the message get with a specified index. With this implementation, each time get is called, the corresponding element is calculated from the head of the list, giving linear time complexity for each access. Iterating over all the elements of the list has quadratic time complexity. To allow more efficient element access, the list can provide an iterator which holds a pointer to the current node (Figure 1b). This allows constant-time access to the current element, and linear iteration, but also breaks encapsulation by providing direct access to nodes and elements without going through the list interface. List operations are now subject to data-races. A middle ground providing linear time iteration without data-races can be implemented by moving the iterator logic into the list actor, so that the calls to getNext and hasNext are synchronised in the message queue of the actor. This requires a more advanced scheme to map different clients to different concurrent iterators, clutters the list interface, creates unnecessary coupling between List and Iterator, and complicates support of e.g., several kinds of iterators. Another issue with concurrent programs is that interleaving interaction with an actor makes it hard to reason about operations that are built up from several smaller operations. For example, a client might want to access two adjacent nodes in the list and combine their elements somehow. When sending two get messages, there is nothing that prevents other messages from being processed by the list actor after the first one, possibly removing or changing one of the values. 12 Actors without Borders: Amnesty for Imprisoned State actor List[t] ... def getIterator() : B(Iterator[t]) val iter = new Iterator[t] iter.init(this.first) return bestow iter val iter = list!getIterator() while iter!hasNext() do val elem = iter!getNext() ... Figure 2: A list actor returning a bestowed iterator, and the code for a client using it Again, unless the list actor explicitly provides an operation for getting adjacent values, there is no way for a client to safely express this operation. 3 Bestowing and Grouping Activity Encapsulating state behind a synchronisation mechanism allows reasoning sequentially about operations on that state. However, since Kappa lets us identify the encapsulation boundary of the data structure [4], it is possible to bestow objects that are leaked across this boundary with a synchronisation wrapper. Statically, this means changing the type of the returned reference to reflect that operations on it may block. Dynamically it means identifying with what and how the leaked object shall synchronise. For clarity, we explicate this pattern with a bestow operation. In the case of actors, an actor a that performs bestow on some reference r creates a wrapper around r that makes it appear like an actor with the same interface as r, but asynchronous. Operations on the bestowed reference will be relayed to a so that the actor a is the one actually performing the operation. If r was leaked from an enclosure protected by a lock l, r’s wrapper would instead acquire and release l around each operation. Figure 2 shows the minimal changes needed to the code in Figure 1b, as well as the code for a client using the iterator. The only change to the list is that getIterator() returns a bestowed iterator (denoted by wrapping the return type in B(...)1 ), rather than a passive one. In the client code, synchronous calls to hasNext() and getNext() become asynchronous message sends. These messages are handled by the list actor, even though they are not part of its interface. This means that any concurrent usages of iterators are still free from data-races. It is interesting to ponder the difference between creating an iterator inside the list and bestowing it, or creating an iterator outside the list, and bestowing each individual list node it traverses. In the former case, getNext() is performed without interleaved activities in the same actor. In the latter case, it is possible that the internal operations are interleaved with other operations on list. The smaller the object returned, the more fine-grained is the concurrency. Sometimes it is desirable that multiple operations on an object are carried out in a noninterleaved fashion. For this purpose, we use an atomic block construct that operates on a an actor or a bestowed object, cf. Figure 3. In the case of operations on an actor, message sends inside an atomic block are batched and sent as a single message to the receiver. In the case of operations on an object guarded by a lock, we replace each individual lock–release by a single lock–release wrapping the block. It is possible to synchronise across multiple locked objects in a single block. 1 If desired, this type change can be implicit through view-point adaptation [9]. E. Castegren & T. Wrigstad class Iterator[t] var current : B(Node[t]) def getNext() : t val elem = this.current ! elem() // Possible interleaving of other messages this.current = this.current ! next() return elem 13 class Iterator[t] var current : B(Node[t]) def getNext() : t atomic c <- this.current val elem = c ! elem() this.current = c ! next() return elem Figure 3: Fine-grained (left) and coarse-grained (right) concurrency control. An atomic block allows a client to express new operations by composing smaller ones. The situation sketched in § 2, where a client wants to access two adjacent nodes in the list actor without interleaving operations from other clients is easily resolved by wrapping the two calls to get (or getNext, if the iterator is used) inside an atomic block. This will batch the messages and ensure that they are processed back to back: atomic it <- list ! getIterator() val e1 <- it.getNext() val e2 <- it.getNext() 4 =⇒ (e1, e2) = list ! λ {val it val e1 val e2 return this . = this.getIterator(); = it.getNext(); = it.getNext(); (e1, e2)} Formalism To explain bestow and atomic we use a simple lambda calculus with actors and passive objects. We abstract away most details that are unimportant when describing the behavior of bestowed objects. For example, we leave out classes and actor interfaces and simply allow arbitrary operations on values. By disallowing sharing of (non-bestowed) passive objects, we show that our language is free from data-races (cf. § 4.4). The syntax of our calculus is shown in Figure 4. An expression e is a variable x, a function application e e0 or a message send e!v. Messages are sent as anonymous functions, which are executed by the receiving actor. We abstract updates to passive objects as e.mutate(), which has no actual effect in the formalism, but is reasoned about in § 4.4. A new object or actor is created with new τ and a passive object can be bestowed by the current actor with bestow e. We don’t need a special atomic construct in the formalism as this can be modeled by composing operations in a single message as sketched in the end of the previous section. Statically, values are anonymous functions or the unit value (). Dynamically, id is the identifier of an actor, ι is the memory location of a passive object, and ιid is a passive object ι bestowed by the actor id. A type is an active type α, a passive type p, a function type τ → τ , or the Unit type. An active type is either an actor type c or a bestowed type B(p). Note that for simplicity, e v ::= ::= x | e e | e!v | e.mutate() | new τ | bestow e | v λx : τ.e | () | id | ι | ιid τ α ::= ::= α | p | τ → τ | Unit c | B(p) Figure 4: The syntax of a simple lambda calculus with actors, bestow and atomic. 14 Actors without Borders: Amnesty for Imprisoned State p and c are not meta-syntactic variables; every passive object has type p, every actor has type c, and every bestowed object has type B(p). Γ`e:τ (Expressions) e - a p p ly e - va r Γ(x) = τ Γ`x :τ Γ ` e : τ0 → τ Γ ` e0 : τ 0 Γ ` e e0 : τ e - n e w - pa s s i v e e - n e w - ac t o r Γ ` new p : p Γ ` new c : c e-send e - m u tat e Γ`e:p Γ ` e. mutate() : Unit e-fn Γ, x : τ ` e : τ 0 Γ ` (λx : τ.e) : τ → τ 0 Γα , x : p ` e 0 : τ 0 6 ∃ ι . ι ∈ e0 Γ ` e!λx : p.e 0 : Unit Γ`e:α e - b e s t ow Γ`e:p Γ ` bestow e : B(p) e-unit e-loc e-id e - b e s t ow e d Γ ` () : Unit Γ`ι:p Γ ` id : c Γ ` ιid : B(p) Figure 5: Static semantics. Γ maps variables to types. Γα contains only the active types α of Γ. 4.1 Static Semantics The typing rules for our formal language can be found in Figure 5. The typing context Γ maps variables to types. The “normal” lambda calculus rules E - VA R and E - A P P LY are straightforward. The new keyword can create new passive objects or actors ( E - N E W - * ) . Passive objects may be mutated ( E - M U TAT E ) , and may be bestowed activity ( E - B E S T OW ) . Message sends are modeled by sending anonymous functions which are run by the receiver ( E - S E N D ) . The receiver must be of active type (i.e., be an actor or a bestowed object), and the argument of the anonymous function must be of passive type p (this can be thought of as the this of the receiver). Finally, all free variables in the body of the message must have active type to make sure that passive objects are not leaked from their owning actors. This is captured by Γα which contains only the active mappings _ : α of Γ. Dynamically, the body may not contain passive objects ι. Typing values is straightforward. 4.2 Dynamic Semantics Figure 6 shows the small-step operational semantics for our language. A running program is a heap H, which maps actor identifiers id to actors (ι, L, Q, e), where ι is the this of the actor, L is the local heap of the actor (a set containing the passive objects created by the actor), Q is the message queue (a list of lambdas to be run), and e is the current expression being evaluated. An actor whose current expression is a value may pop a message from its message queue and apply it to its this ( E VA L - AC T O R - M S G ) . Any actor in H may step its current expression, possibly also causing some effect on the heap ( E VA L - AC T O R - RU N ) . The relation id ` hH, ei ,→ hH 0 , e0 i denotes actor id evaluating heap H and expression e one step. E. Castegren & T. Wrigstad 15 H ,→ H 0 (Evaluation) e va l - ac t o r - ru n e va l - ac t o r - m s g H (id) = (ι, L, Q, e) id ` hH , ei ,→ hH 0 , e 0 i 0 H (id) = (ι, L0 , Q 0 , e) H 00 = H 0 [id 7→ (ι, L0 , Q 0 , e 0 )] H ,→ H 00 0 H (id) = (ι, L, Q v , v) H = H [id 7→ (ι, L, Q, v 0 ι)] H ,→ H 0 0 id ` hH, ei ,→ hH 0 , e0 i (Evaluation of expressions) e va l - s e n d - ac t o r H (id 0 ) = (ι, L, Q, e) H 0 = H [id 0 7→ (ι, L, v Q, e)] id ` hH , id 0 !vi ,→ hH 0 , ()i e va l - a p p ly e 0 = e[x 7→ v] id ` hH , (λx : τ.e) vi ,→ hH , e 0 i e va l - n e w - pa s s i v e H (id) = (ι, L, Q, e) ι0 fresh 0 0 H = H [id 7→ (ι, L ∪ {ι }, Q, e)] id ` hH , new pi ,→ hH 0 , ι0 i e va l - s e n d - b e s t ow e d H (id 0 ) = (ι0 , L, Q, e) H 0 = H [id 0 7→ (ι0 , L, (λx : p.v ι) Q, e)] id ` hH , ιid 0 !vi ,→ hH 0 , ()i e va l - m u tat e e va l - b e s t ow id ` hH , ι. mutate()i ,→ hH , ()i id ` hH , bestow ιi ,→ hH , ιid i e va l - n e w - ac t o r id 0 fresh ι0 fresh 0 0 H = H [id 7→ (ι , {ι0 }, , ())] id ` hH , new αi ,→ hH 0 , id 0 i 0 e va l - c o n t e x t id ` hH , ei ,→ hH 0 , e 0 i id ` hH , E[e]i ,→ hH 0 , E[e 0 ]i E[•] ::= • e | v • | • !v | • .mutate() | bestow • Figure 6: Dynamic semantics. Sending a lambda to an actor prepends this lambda to the receiver’s message queue and results in the unit value ( E VA L - S E N D - AC T O R ) . Sending a lambda v to a bestowed value instead prepends a new lambda to the queue of the actor that bestowed it, which simply applies v to the underlying passive object ( E VA L - S E N D - B E S T OW E D ) . Function application replaces all occurrences of the parameter x in its body by the argument v ( E VA L - A P P LY ) . Mutation is a no-op in practice ( E VA L - M U TAT E ) . Bestowing a passive value ι in actor id creates the bestowed value ιid ( E VA L - B E S T OW ) . Creating a new object in actor id adds a fresh location ι0 to the set of the actors passive objects L and results in this value ( E VA L - N E W - PA S S I V E ) . Creating a new actor adds a new actor with a fresh identifier to the heap. Its local heap contains only the fresh this, its queue is empty, and its current expression is the unit value ( E VA L - N E W - AC T O R ) . We handle evaluation order by using an evaluation context E ( E VA L - C O N T E X T ) . 4.3 Well-formedness A heap H is well-formed if all its actors are well-formed with respect to H, and the local heaps Li and Lj of any two different actors are disjoint ( W F - H E A P ) . We use LH(H(id)) to denote the local heap of actor id. An actor is well-formed if its this is in its local heap L and its message 16 `H Actors without Borders: Amnesty for Imprisoned State H ` (ι, L, Q, e) H `Q (Well-formedness) w f - ac t o r ι∈ L wf-heap ∀id 1 6= id 2 . LH(H (id 1 )) ∩ LH(H (id 2 )) = ∅ ∀id ∈ dom (H ) . H ` H (id) `H H;L ` Q `e:τ ∀ι ∈ e . ι ∈ L ∀id ∈ e . id ∈ dom (H ) ∀ιid ∈ e . ι ∈ LH(H (id)) H ` (ι, L, Q, e) w f - q u e u e - m e s s ag e H;L ` Q x :p`e:τ ∀ι ∈ e . ι ∈ L ∀id ∈ e . id ∈ dom (H ) ∀ιid ∈ e . ι ∈ LH(H (id)) H ; L ` (λx : p.e) Q wf-queue-empty H;L `  Figure 7: Well-formedness rules. LH gets the local heap from an actor: LH((ι, L, Q, e)) = L queue Q is well-formed. The current expression e must be typable in the empty environment, and all passive objects ι that are subexpressions of e must be in the local heap L. Similarly, all actor identifiers in e must be actors in the system, and all bestowed objects must belong to the local heap of the actor that bestowed it ( W F - AC T O R ) . A message queue is well-formed if all its messages are well-formed ( W F - Q U E U E - * ) . A message is well-formed if it is a well-formed anonymous function taking a passive argument, and has a body e with the same restrictions on values as the current expression in an actor. 4.4 Meta Theory We prove soundness of our language by proving progress and preservation in the standard fashion: Progress: A well-formed heap H can either be evaluated one step, or only has actors with empty message queues and fully reduced expressions: ` H =⇒ (∃H 0 . H ,→ H 0 ) ∨ (∀id ∈ dom(H) . H(id) = (ι, L, , v)) Preservation: Evaluation preserves well-formedness of heaps: ` H ∧ H ,→ H 0 =⇒ ` H 0 Both properties can be proven to hold with straightforward induction. The main property that we are interested in for our language is data-race freedom. As we don’t have any actual effects on passive objects, we show this by proving that if an actor is about to execute ι.mutate(), no other actor will be about to execute mutate on the same object: Data-race freedom: Two actors will never mutate the same active object   id1 6= id2   0  ∧ H(id1 ) = (ι1 , L1 , Q1 , ι.mutate())  =⇒ ι 6= ι ∧ H(id2 ) = (ι2 , L2 , Q2 , ι0 .mutate()) E. Castegren & T. Wrigstad 17 This property is simple to prove using two observations on what makes a well-formed heap: 1. An actor will only ever access passive objects that are in its local heap 2. The local heaps of all actors are disjoint ( W F - H E A P ) . ( W F - AC T O R ) . The key to showing preservation of the first property is in the premise of rule E - S E N D which states that all free variables and values must be active objects (Γα , x : p ` e0 : τ 0 and 6 ∃ι . ι ∈ e0 ). This prevents sending passive objects between actors without bestowing them first. Sending a message to a bestowed object will always relay it to the actor that owns the underlying passive object (by the premise of W F - AC T O R : ∀ιid ∈ e . ι ∈ LH(H(id))). Preservation of the second property is simple to show since local heaps grow monotonically, and are only ever extended with fresh locations ( E VA L - N E W - PA S S I V E ) . Having made these observations, it is trivial to see that an actor in a well-formed heap H that is about to execute ι.mutate() must have ι in its own local heap. If another actor is about to execute ι0 .mutate(), ι0 must be in the local heap of this actor. As the local heaps are disjoint, ι and ι0 must be different. Since well-formedness of heaps are preserved by evaluation, all programs are free from data-races. 5 Related Work An important property of many actor-based systems is that a single actor can be reasoned about sequentially; messages are exchanged concurrently but executed sequentially by the receiving actor. For this property to hold, actors often rely on actor isolation [10], i.e., that the state of one actor cannot be accessed by another. If this was the not the case, concurrent updates to shared state could lead to data-races, breaking sequential reasoning. Existing techniques for achieving actor isolation are often based on restricting aliasing, for example copying all data passed between actors [2], or relying on linear types to transfer ownership of data [3, 5, 6, 10]. Bestowed objects offer an alternative technique which relaxes actor isolation and allows sharing of data without sacrificing sequential reasoning. Combining bestowed objects with linear types is straightforwand and allows for both ownership transfer and bestowed sharing between actors in the same system. Miller et al.propose a programming model based on function passing, where rather than passing data between concurrent actors, functions are sent to collections of stationary and immutable data called silos [7]. Bestowed objects are related in the sense that sharing them doesn’t actually move data between actors. In the function passing model, they could be used to provide an interface to some internal part of a silo, but implicitly relay all functions passed to it to its owning silo. While the formalism in § 4 also works by passing functions around, this is to abstract away from unimportant details, and not a proposed programming model. References to bestowed objects are close in spirit to remote references in distributed programming or eventual references in E [8]. In the latter case, the unit of encapsulation, e.g., an actor or an aggregate object protected by a lock, acts similar to a Vat in E, but with an identifiable boundary and an identity with an associated interface. By bestowing and exposing sub-objects, a unit of encapsulation can safely delegate parts of its interface to its inner objects, which in turn need not be internally aware of the kind of concurrency control offered by their bestower. 18 6 Actors without Borders: Amnesty for Imprisoned State Discussion Although our formal description and all our examples focus on actors, bestow also works with threads and locks. An object protected by a lock can share one of its internal objects while requiring that any interaction with this object also goes via this lock. We believe there is also a straightforward extension to software transactional memory. In the future, we would like to study combinations of these. Bestowed objects lets an actor expose internal details about its implementation. Breaking encapsulation should always be done with care as leaking abstractions leads to increased coupling between modules and can lead to clients observing internal data in an inconsistent state. The latter is not a problem for bestowed objects however; interactions with bestowed objects will be synchronised in the owning actor’s message queue, so as long as data is always consistent between messages, we can never access data in an inconsistent state (if your data is inconsistent between messages, you have a problem with or without bestowed objects). Sharing bestowed objects may increase contention on the owner’s message queue as messages to a bestowed object are sent to its owner. Similarly, since a bestowed object is protected by the same lock as its owner, sharing bestowed objects may lead to this lock being polled more often. As always when using locks there is a risk of introducing deadlocks, but we do not believe that bestowed objects exacerbate this problem. Deadlocks caused by passing a bestowed object back to its owner can be easily avoided by using reentrant locks (as accessing them both would require taking the same lock twice). When using locks, atomic blocks are very similar to Java’s synchronized-blocks. With actors, an atomic block groups messages into a single message. For fairness, it may make sense to only allow atomic blocks that send a limited number of messages. It is possible to synchronise on several locked objects by simply grabbing several locks. Synchronising on several actors is more involved, as it requires actors to wait for each other and communicate their progress so that no actor starts or finishes before the others. The canonical example of this is atomically withdrawing and depositing the same amount from the accounts of two different actors. Interestingly, if the accounts are bestowed objects from the same actor (e.g., some bank actor), this atomic transaction can be implemented with the message batching approach suggested in this paper. We leave this for future work. 6.1 Implementation We are currently working on implementing bestowed objects and atomic blocks in the context of Encore [3], which uses active objects for concurrency. In Encore, each object (passive or active) has an interface defined by its class, and only the methods defined therein may be invoked. Thus it does not follow the formal model from § 4, where message passing is implemented by sending anonymous functions. It does however use the same approach for the implementation of bestowed objects and atomic blocks. We extend each active class with an implicit method perform which takes a function, applies it to the this of the receiver, and returns the result wrapped in a future. A bestowed object is logically implemented as an object with two fields owner and object. A message send x ! foo() to a bestowed object is translated into the message send x.owner ! perform((λ _ . x.object.foo())). The atomic block can be implemented as sketched in the end of § 3, where messages are batched and sent as a single message: E. Castegren & T. Wrigstad atomic x <- e x ! foo(42) x ! bar(-42) 19 =⇒ e ! perform(λ this . {this.foo(42); this.bar(-42)}) This implementation works for the use-cases discussed here, but is somewhat limiting as it doesn’t allow the caller to react to intermediate values. We are therefore exploring an alternative approach where we temporarily switch the message queue of an active object to one that only the caller can submit messages to. Other messages passed to the active object will end up in the original message queue, and will be processed first when the atomic block finishes. Each active object would implicitly be extended with two methods override, which switches the current message queue to a new one, and resume, which discards the temporary queue and resumes execution with the original queue. Logically, the translation could look like this: val q = new MessageQueue() atomic x <- e e ! override(q) // 1 val v1 = x ! foo(42) val v1 = q.enqueue(("foo", [42])) =⇒ val v2 = this.bar(v1) val v2 = this.bar(v1) x ! baz(v2) q.enqueue(("baz", [v2])) q.enqueue(("resume", [])) // 2 When the message at 1 is processed by receiver, it stops reading from its regular message queue and instead starts using the queue provided by the caller. Rather than sending messages normally, the caller interacts with x through this queue (waiting for responses if necessary). When the message at 2 has been processed by the receiver, it goes back to reading messages normally. 6.2 Abstracting Over Synchronisation Methods Finally, we note the connection to the safe type qualifier introduced by the Kappa type system [4], which ranges over both actors and locks (and immutables etc.). A value with a safe type can be accessed concurrently without risk of data-races, but how this is achieved depends on the type of the value at runtime. Let x have the type safe τ . Now, z = x.foo() is equivalent to z = x!foo().get() when x is an actor returning a future value, and get() is a blocking read on the future. When x is protected by a lock l, the same access is equivalent to lock(l); z = x.foo(); unlock(l);. When x is immutable, no special synchronisation is needed. Consequently, the safe qualifier can be used to express operations on objects with concurrency control abstracted out, without losing safety. An atomic block can be used to atomically compose operations on a safe object, and the choice of concurrency control mechanism can be relegated to the runtime. Similarly, bestowed objects internally has no knowledge about their own concurrency control. Thus, when a bestowed object is used as a safe object, neither the object itself nor its client needs knows how the interaction is made safe. 7 Conclusion Actor isolation is important to maintain sequential reasoning about actors’ behavior. By bestowing activity on its internal objects, an actor can share its representation without losing sequential reasoning and without bloating its own interface. With atomic blocks, a client can create new behavior by composing smaller operations. The bestowed objects themselves do not need to know why access to them is safe. They can just trust the safety of living in a world where actors have no borders. 20 Actors without Borders: Amnesty for Imprisoned State References [1] G. Agha (1986): Actors: a Model of Concurrent Computation in Distributed Systems, Series in Artificial Intelligence. MIT Press 11. [2] J. Armstrong (2007): A History of Erlang. In: HOPL III, doi:10.1145/1238844.1238850. [3] S Brandauer et al. (2015): Parallel Objects for Multicores: A Glimpse at the Parallel Language Encore. In: Formal Methods for Multicore Programming, doi:10.1007/978-3-319-18941-3_1. [4] E. Castegren & T. Wrigstad (2016): Reference Capabilities for Concurrency Control. In: ECOOP, doi:10.4230/LIPIcs.ECOOP.2016.5. [5] S. Clebsch, S. Drossopoulou, S. Blessing & A. McNeil (2015): Deny Capabilities for Safe, Fast Actors. In: AGERE, doi:10.1145/b2824815.2824816. [6] P. Haller & M. Odersky (2010): Capabilities for Uniqueness and Borrowing. In: ECOOP, doi:10.1007/978-3-642-14107-2_17. [7] Heather Miller, Philipp Haller, Normen Müller & Jocelyn Boullier (2016): Function Passing: A Model for Typed, Distributed Functional Programming. In: Onward!, doi:10.1145/2986012.2986014. [8] M. Miller (2006): Robust Composition: Towards a Unified Approach to Access Control and Concurrency Control. Ph.D. thesis, Johns Hopkins University, USA. [9] P. Müller (2002): Modular Specification and Verification of Object-oriented Programs. Springer-Verlag, Berlin, Heidelberg, doi:10.1007/3-540-45651-1. [10] S. Srinivasan & A. Mycroft (2008): Kilim: Isolation-Typed Actors for Java. In: ECOOP, doi:10.1007/978-3-540-70592-5_6.
6cs.PL
arXiv:1804.02482v1 [math.ST] 6 Apr 2018 High-dimensional Adaptive Minimax Sparse Estimation with Interactions Chenglong Ye, Yuhong Yang School of Statistics University of Minnesota 313 Ford Hall, 224 Church St SE Minneapolis, MN 55455, USA e-mail: [email protected]; [email protected] Abstract: High-dimensional linear regression with interaction effects is broadly applied in research fields such as bioinformatics and social science. In this paper, we first investigate the minimax rate of convergence for regression estimation in high-dimensional sparse linear models with two-way interactions. We derive matching upper and lower bounds under three types of heredity conditions: strong heredity, weak heredity and no heredity. From the results: (i) A stronger heredity condition may or may not drastically improve the minimax rate of convergence. In fact, in some situations, the minimax rates of convergence are the same under all three heredity conditions; (ii) The minimax rate of convergence is determined by the maximum of the total price of estimating the main effects and that of estimating the interaction effects, which goes beyond purely comparing the order of the number of non-zero main effects r1 and non-zero interaction effects r2 ; (iii) Under any of the three heredity conditions, the estimation of the interaction terms may be the dominant part in determining the rate of convergence for two different reasons: 1) there exist more interaction terms than main effect terms or 2) a large ambient dimension makes it more challenging to estimate even a small number of interaction terms. Second, we construct an adaptive estimator that achieves the minimax rate of convergence regardless of the true heredity condition and the sparsity indices r1 , r2 . MSC 2010 subject classifications: Primary 62C20; secondary 62J05. Keywords and phrases: Minimax rate of convergence, sparsity, highdimensional regression, quadratic model, interaction selection, heredity condition, hierarchical structure, adaptive estimation. 1. Introduction High-dimensional data are increasingly prevalent in various areas such as bioinformatics, astronomy, climate science and social science. When the number of variables p is larger than the sample size n in the linear regression setting, statistical estimation of the regression function often requires some crucial conditions. One common condition is the sparsity of the data generating model, under which only a small portion of the variables are important to affect the response variable. Under this condition, both sparse estimation of high-dimensional linear regression functions and variable selection have been well studied with fruitful theoretical understandings in the recent decade. Minimax estimation of the regression function with main effects only are well investigated under lq 1 C. Ye and Y. Yang/Adaptive Minimax Estimation with Interactions 2 sparsity constraints with 0 ≤ q ≤ 1 (e.g., van de Geer 2007, Candes & Tao 2007, Bunea et al. 2007, Zhang & Huang 2008, van de Geer 2008, van de Geer & Bhlmann 2009, Bickel et al. 2009, Zhang 2010a, Knight & Fu 2000, Raskutti et al. 2011, Rigollet & Tsybakov 2011, Wang et al. 2014); model selection consistency results are also obtained for various model selection procedures (e.g., Fan & Li 2001, Zhao & Yu 2006, Zhang & Huang 2008, Zou & Yuan 2008, Lv & Fan 2009). However, models with only main effects are often not adequate to fully capture the nature of the data. Interaction terms may be necessary to not only improve the prediction performance but also enhance the understanding of the relationships among the variables, especially in areas such as genetics, medicine and behavioristics, where interaction effects between the covariates are of enormous interest. Hierarchical constraints are often imposed to describe the underlying structure of models with interaction effects, such as the marginality principle (Nelder 1977), the effect heredity principle (Hamada & Wu 1992) and the “well-formulated models” (Peixoto 1987). We follow a popular naming convention of heredity conditions as adopted in Chipman (1996): strong heredity and weak heredity. Strong heredity assumes that if an interaction term is in the model, then both of its corresponding main effects should also be included, while weak heredity only requires that at least one of its main effects should be included. In practice, it is possible that, compared to the interaction terms, some main effects are so small that including them in modeling may not be beneficial from the perspective of estimation variability. Thus, in this work we take into consideration the additional case where no heredity condition is imposed at all, also for the purpose of theoretical comparison with the other two heredity conditions. Many approaches are proposed for interaction selection, most of which can be categorized into two types: joint selection and stage-wise selection. The joint selection approach selects the main and interaction terms simultaneously by searching over all possible models with interactions. A typical way of joint selection is to use regularization methods with specially designed penalty terms. For example, Yuan et al. (2009) introduced a family of shrinkage estimators, which incorporate the hierarchical structures through linear equality constraints on the coefficients and possess both selection consistency and root-n estimation consistency under fixed p. Choi et al. (2010) re-parameterized the regression model with interactions and applied an adaptive L1 -norm penalty. The estimators have the oracle property (Fan & Li 2001) when p = o(n1/10 ). Hao et al. (2017) proposed a computationally efficient regularization algorithm under marginality principle (RAMP) that simultaneously selects the main effects, interaction effects and quadratic effects for high-dimensional data p ≫ n. They also verified the interaction selection consistency property of the two-stage LASSO under some sensible conditions. The stage-wise selection procedure first performs a main effect selection (by excluding the interaction terms) to reduce the dimension of variables and then carries out a joint selection on the reduced dimension of variables, which is computationally feasible and effective. For example, viewing the sliced inverse regression (Li 1991) from a likelihood perspective, Jiang & Liu (2014) suggested a stage-wise variable selection algorithm (SIRI) C. Ye and Y. Yang/Adaptive Minimax Estimation with Interactions 3 via inverse regression, which is able to detect higher order interactions without imposing any hierarchical structures. Hao & Zhang (2014) proposed two stagewise interaction selection procedures, IFORT and IFORM, both of which enjoy sure screening property in the first stage. Fan et al. (2016) proposed a method, named the interaction pursuit, that incorporates both screening and variable selection in ultra-high dimensions. The method possesses both the sure screening property and the oracle property in the two stages respectively. For some other works on interaction selection, see Zhao et al. 2009, Li et al. 2012, Bien et al. 2013, Hall & Xue 2014. While having the aforementioned good properties, both types of interaction selection approaches have their own disadvantages as well. The joint selection is usually computational infeasible (insufficient storage) when p is large; the stage-wise selection, as pointed out in Hao & Zhang (2014), may be very difficult to be theoretically justified under general conditions. Although there have been many novel developments on selection of interaction terms as described above, little work has been done on the estimation of the regression function when interactions exist. In this paper, we present some theoretical results on the minimax rate of convergence for estimating the high-dimensional regression function with interaction terms under three different hierarchical structures. Regardless of the heredity condition, our results show that the minimax rate is determined by the maximum of the total estimation price of the main effects and that of the interaction effects. Heredity conditions enter the minimax rate of convergence in terms of the estimation price of the interaction effects, namely r2 (1 + log(K/r2 ))/n, where r2 is the number of nonzero interaction effects and K is the number of eligible candidate interaction terms under the different heredity conditions. Consequently, a stronger heredity condition leads to possibly faster minimax rate of convergence. For example, when the underlying model has no more than r1 non-zero main effects, at most K = r21 interaction terms are allowed to enter the model under strong heredity, compared to K = r1 (pn − (r1 + 1)/2) under weak heredity. As will be seen, only in certain situations is the minimax rate improved by imposing the strong heredity, although strong heredity allows fewer eligible interaction terms than the other two heredity conditions. Also, from the perspective of estimation, there may be no difference in rate of convergence between weak heredity and no heredity in many situations. Our results provide a complete characterization and comparison of the minimax rates of convergence under the three heredity conditions. In real applications, since one does not know the true heredity condition behind the data (or practically the best heredity condition to describe the data at the given sample size), it is desirable to construct an estimator that performs optimally no matter which of the three heredity conditions holds. Such an estimator that adapts to the true heredity condition as well as the unknown number of main and interaction effects will be obtained in this paper. The remainder of the paper is organized as follows. In Section 2, we introduce the model setup, the loss function and the heredity conditions for the problem. In Section 3, after stating the required assumption, we present our main results of the minimax rate of convergence under strong heredity. The theoretical results C. Ye and Y. Yang/Adaptive Minimax Estimation with Interactions 4 under weak heredity and no heredity are presented in Section 4. Section 5.1 provides detailed rates of convergence under different heredity conditions in relation to the sparsity indices, the ambient dimension and the sample size, followed by Section 5.2 where we present some interesting implications of the detailed results. In Section 6, we extend our results to quadratic models in which both quadratic and interaction effects are considered. In Section 7, we construct an adaptive estimator that achieves the minimax rate of convergence without knowledge of the type of the heredity condition or the sparsity indices (r1 and r2 ). The proofs of our results and some technical tools are presented in the Appendix. 2. Preliminaries Model Setup Suppose the dataset is composed of (X, Y), where X = (x1 , ..., xp ) is a n × p matrix with n observations on p covariates and Y = (y1 , ..., yn )T is the response vector. We start by considering a linear regression model with both main effects and two-way interaction effects: Y = Zβ + ǫ, (2.1) where β = ((β (1) )T , (β (2) )T )T is the overall coefficient vector, Z = (X, [XX]) ∈ p2 +p Rn×( 2 ) is the full design matrix, and the random noise vector ǫ ∼ N (0, σ 2 In ) p with known σ. More specifically, β (1) ∈ Rp and β (2) ∈ R(2) are the coefficients of the main effects and the two-way interaction effects respectively. Here we define  [XX] = (x1 ◦ x2 , ..., x1 ◦ xp , ..., xp−1 ◦ xp )T as the n × p2 matrix that contains all the two-way interaction terms, where ◦ denotes the point-wise product of two vectors. In this paper, our focus is on the fixed design, i.e., the covariates are considered given. Our goal is to estimate the mean regression function by a linear combination of the covariates and interaction terms. 2 Loss Function Denote h(·) : R(p +p)/2 → R as the mean regression function, 2 i.e., h(z) = zT β for z ∈ R(p +p)/2 . Denote ĥ(z) = zT β̂ as an estimated function of h(z). In our fixed design setting, we focus on the prediction loss (or the Averaged Squared Error) L(h, ĥ) := n1 ||Zβ − Zβ̂||22 , where k·k2 is the Euclidean norm. Set the index sets for the main effects and the interaction effects as Imain = {1, ..., p} and Iint = {(i, j) : 1 ≤ i < j ≤ p} respectively. Let I = (I1 , I2 ) ⊂ Imain  Iint ( is the Cartesian product) be the index set of a model with |I1 | non-zero main effects and |I2 | non-zero interaction effects. In this paper, we consider the data generating model (2.1) with at least two main effects and one interaction effect purely for convenience, which does not affect the conclusions. Let ZI be the n × |I| submatrix of Z that corresponds to the model index I. Its corresponding least squares estimator PI Y is used to estimate Zβ, where PI is the projection matrix onto the column space of ZI . The loss function of using model I is denoted as L(I) := n1 ||PI Y − Zβ||22 . C. Ye and Y. Yang/Adaptive Minimax Estimation with Interactions Heredity Conditions Denote the space of all the p+ with a hierarchical notation of the subscripts as 5  -dimensional vectors p 2 p R̈p = {β ∈ Rp+(2) |β = (β1 , ..., βp , β1,2 , ..., βp−1,p )}. We refer to β (1) = (β1 , ..., βp ) as the subvector consisting of the first p elements in β, and β (2) = (β1,2 , ..., βp−1,p ) as the subvector containing the rest of the elements. We introduce the following two vector spaces: o n R̈pweak = β ∈ R̈p |1βi,j 6=0 ≤ 1βi 6=0 ∨ 1βj 6=0 , 1 ≤ i < j ≤ p and o n R̈pstrong = β ∈ R̈p |1βi,j 6=0 ≤ 1βi 6=0 · 1βj 6=0 , 1 ≤ i < j ≤ p . The space R̈pstrong captures the strong heredity condition that if the interaction term is in the model, then both of its corresponding main effects should also be included. The space R̈pweak characterizes the weak heredity condition that if the interaction is in the model, then at least one of its main effects should be included. As pointed out in Hao & Zhang (2016), the sign of the main effect coefficients are not invariant of linear transformation of the covariates individually due to the existence of the interaction terms. Heredity conditions are consequently meaningless without the specification of the model parametrization. In our paper, we stick to the parameterization Z and include the no heredity condition by considering the vector space R̈p . Define the l0 -normP of a vector p a = (a1 , ..., ap ) as the number of its non-zero elements, i.e., kak = 0 i=1 1ai 6=0 . n o For a vector space S ∈ R̈pstrong , R̈pweak , R̈p , define the corresponding l0 -ball and l0 -hull of S as o n (2.2) B0 (r1 , r2 ; S) = β = (β (1) , β (2) ) ∈ S, β (1) ≤ r1 , β (2) ≤ r2 0 and 0  F0 (r1 , r2 ; S) = h : h(z) = zT β, β ∈ B0 (r1 , r2 ; S) respectively. Note that B0 (r1 , r2 ; S) represents the collection of coefficients β with at most r1 non-zero main effects and r2 non-zero interaction effects under a certain hierarchical constraint S. And F0 (r1 , r2 ; S) denotes the collection of linear combinations of the covariates with coefficients β ∈ B0 (r1 , r2 ; S). Throughout this paper, we assume that r1 + r2 ≤ n (otherwise the minimax risk may not converge or the rate may not be optimal), r1 ≥ 2 and r2 ≥ 1. Minimax Risk It is helpful to consider the uniform performance of a modeling procedure when we have plentiful choices of modeling procedures during the analysis of a statistical problem. The minimax framework seeks an estimator that minimizes the worst performance (in statistical risk) assuming that the truth belongs to a function class W. The minimax risk we consider is min max EL(ĥ, h), ĥ h∈W C. Ye and Y. Yang/Adaptive Minimax Estimation with Interactions 6 where ĥ is over all estimators, and min and max may refer to inf and sup, more formally speaking. In our work, we assume that the true mean regression function has a hierarchical structure by imposing W = F0 (r1 , r2 ; S), with S ∈ n o R̈pstrong , R̈pweak , R̈p . In this paper, we will use the notation bn  an or an  bn to represent an = O(bn ). If both bn  an and an  bn hold, we denote an ≍ bn to indicate that an and bn are of the same order. If an  bn holds without an ≍ bn , we use the notation an ≻ bn or bn ≺ an . 3. Minimax Rate of Convergence under Strong Heredity 3.1. Assumption We start by stating an assumption required for our result of the minimax rate of convergence under strong heredity. In this paper, we use pn to indicate that the number of main effects p can go to infinity as n increases. We also allow r1 and r2 to increase with the sample size n as well. Sparse Reisz Condition (SRC) For some l1 , l2 > 0, there exist constants b1 , b2 > 0 (not depending on n) such that for any β = (β (1) , β (2) ) with β (1) 0 ≤  min(2l1 , pn ) and β (2) 0 ≤ min 2l2 , p2n , we have 1 b1 kβk2 ≤ √ kZβk2 ≤ b2 kβk2 . n (3.1) The SRC assumption requires that the eigenvalues of ZTI ZI for any sparse submatrix ZI of Z are bounded above and away from 0. It was first proposed by Zhang & Huang (2008). It is similar to the sparse eigenvalue conditions in Zhang (2010b), Raskutti et al. (2011), quasi-isometry condition in Rigollet & Tsybakov (2011); it is also related to the more stringent restricted isometry property (which requires the constants b1 , b2 are close to 1) in Candes & Tao (2007). Such assumptions are standard in the l1 regularization analysis like LASSO and the Dantzig selector. See Bickel et al. (2009), Meinshausen & Yu (2009), van de Geer (2007), Koltchinskii (2009) for more references. 3.2. Minimax Rate Now we present our main result of the minimax rate of convergence under strong heredity. A simple estimator an effective minimax upper Pn is enoughI for 2 (Y − Ŷ ) be the model that minimizes bound. Let Î = arg minI∈Istrong i i i=1 r1 ,r2 the residual sum of squares over all the models that have exactly r1 non-zero main effects and r2 non-zero interaction effects under strong heredity, denoted I as Istrong r1 ,r2 , where Ŷ = PI Y is the projection of Y onto the column space of C. Ye and Y. Yang/Adaptive Minimax Estimation with Interactions 7 the design matrix ZI . For lower bounding the minimax risk, the informationtheoretical tool of using Fano’s inequality with metric entropy understanding (Yang & Barron 1999) plays an important role in the proof. Theorem  3.1. Under the Sparse Reisz Condition with l1 = r1 ≤ pnn∧ n, l2 = r2 ≤ r21 ∧ n and the strong heredity condition W = F0 (r1 , r2 ; R̈pstrong ), the minimax risk is upper bounded by  !!   r1 cσ 2 pn 2 min max EL(ĥ, h) ≤ sup E(L(Î)) ≤ r1 1 + log + r2 1 + log , n r1 r2 ĥ h∈W h∈W (3.2) where c is a pure constant; the minimax risk is lower bounded by  !!   r1 pn σ2 2 r1 1 + log ∨ r2 1 + log (3.3) min max EL(ĥ, h) ≥ c1 n r1 r2 ĥ h∈W for some positive constant c1 that only depends on the constants b1 and b2 in the SRC assumption. From the theorem, under the SRC and the strong heredity condition, the min2 imax rate of convergence scales as: minĥ maxh∈W EL(ĥ, h) ≍ σn (r1 (1 + log prn1 )∨  r2 (1 + log( r21 /r2 ))). Remark 1. The term r1 (1 + log(pn /r1 ))/n = rn1 + rn1 log(pn /r1 ) reflects two aspects in the estimation of the main effects: the price of searching among prn1 possible models, which is of order r1 log(pn /r1 )/n, and the price of estimating the r1 main effect coefficients after the search. Thus r1 (1 + log(pn /r1 ))/n is the total price of estimating the main effects. Similarly, r2 1 + log r21 /r2 /n is the total price of estimating the interaction effects. Remark 2. Our result of the upper bound is general and does not require the sparsity condition of r1 ≺ pn , although it may be needed for fast rate of convergence. 4. Minimax Rate of Convergence under Weak Heredity and No Heredity Similar results are obtained under weak heredity and no heredity. The minimax rate of convergence is still determined by the maximum of the total price of estimating the main effects and that of the interaction effects. When the heredity condition changes, the total price of estimating the interaction effects may differ, possibly substantially. Theorem 4.1. Under the Sparse Reisz Condition with l1 = r1 ≤ pn ∧ n, l2 = n ), the r2 ≤ (r1 pn ) ∧ n and the weak heredity condition W = F0 (r1 , r2 ; R̈pweak minimax risk is of order      σ2 pn r1 · pn min max EL(ĥ, h) ≍ r1 1 + log ∨ r2 1 + log . (4.1) n r1 r2 ĥ h∈W C. Ye and Y. Yang/Adaptive Minimax Estimation with Interactions 8 Theorem  4.2. Under the Sparse Reisz Condition with l1 = r1 ≤ pn ∧ n, l2 = r2 ≤ p2n ∧ n and the no heredity condition W = F0 (r1 , r2 ; R̈pn ), the minimax risk is of order  !!   pn pn σ2 2 r1 1 + log ∨ r2 1 + log . (4.2) min max EL(ĥ, h) ≍ n r1 r2 ĥ h∈W 5. Comparisons and Insights In this section, we summarize the consequences of our main results in three scenarios for an integrated understanding. For brevity, we introduce the following notation. For a, b ∈ N+ and a ≥ b, define the quantity ξba := b(1 + log(a/b)). The total price of estimating the main effects and the interaction effects are then denoted as σ 2 ξrp1n /n and σ 2 ξrK2 /n respectively, where K depends on pn , r1 and the heredity condition. We also use the notation KS (7.5) to indicate that K depends on the heredity condition S. Let M(S) := min max EL(ĥ, h) ĥ h∈F0 (r1 ,r2 ;S) denote the minimax risk under the heredity condition S. 5.1. Detailed Rates of Convergence Since the minimax rate of convergence depends on the maximum of ξrp1n and ξrK2 , we discuss the cases where one of the two quantities is greater than the other. Scenario 1: r2  r1 When there are more main effects than interaction effects in the sense that r2  r1 , the minimax rate of convergence is not affected by the heredity conditions. When log(pn /r1 )  log r1 , we always have ξrp1n  ξrK2 regardless of the heredity conditions. When log(pn /r1 ) ≺ log r1 , it depends on the order of r2 to further decide which estimation price is larger. When log(pn /r1 ) ≺ log r1 , let r∗ be such r2 that ξrp1n ≍ ξr∗1 . If r∗  r2 , we have ξrp1n  ξrK2 ; otherwise ξrp1n ≺ ξrK2 . In summary, given that r2  r1 , the minimax risk is of order ( 2 2 σ r1 ξ , if r∗  r2  r1 and log prn1 ≺ log r1 , M(S) ≍ σn2 rp2 n n ξr1 , otherwise, n o for S ∈ R̈pstrong , R̈pweak , R̈p . Remark 3. This scenario also includes the special case when pn = O(1), where we must have r1 = O(1) and r2 = O(1). The minimax rate of convergence is of the standard parametric order 1/n regardless of the heredity conditions. C. Ye and Y. Yang/Adaptive Minimax Estimation with Interactions 9 Scenario 2: r1  r2 and log pn  r1 When there exist more interaction terms, i.e., r1  r2 , under weak or no heredity, the quantity ξrK2 is always no less than (in order) ξrp1n . For strong heredity, we discuss case by case. When log(pn /r1 ) ≺ log r1 , we r2 always have ξrp1n  ξr21 . When log(pn /r1 )  log r1 , it depends on the order of r2 to decide which estimation price is larger in terms of order. When log(pn /r1 )  r2 r2 log r1 , let r∗′ be such that ξrp1n ≍ ξr∗′1 . If r2  r∗′ , we have ξrp1n  ξr21 ; otherwise r2 ξrp1n ≻ ξr21 . In summary, given that r1  r2 and log pn  r1 , the minimax risk is of order ( σ2 pn if r1  r2  r∗′ and log prn1  log r1 , n ξr1 , pn 2 M(R̈strong ) ≍ σ2 r1 n ξ(r2 ∧r 2 ) , otherwise, 1 n )≍ M(R̈pweak σ 2 r1 pn , ξ n (r2 ∧r1 pn ) M(R̈pn ) ≍ σ 2 p2n ξ . n (r2 ) K Remark 4. The term ξ(r deals with the case where r2 is inactive in the 2 ∧K) sense that r exceeds K under the specific heredity condition. For example, with  2 r2 ≥ r21 , the upper bound r2 in (2.2) does not provide any new information of the number of non-zero interaction effects for strong heredity. Thus  the l0 -ball B0 (r1 , r2 ; R̈pstrong ) is automatically reduced to a subset B0 (r1 , r21 ; R̈pstrong ). Scenario 3: r1  r2 and log pn  r1 When the number of the main effects pn is at least exponentially as many as the non-zero main effects in the sense that log pn  r1 , ξrp1n is always no less than ξrK2 in terms of order. In fact, in this scenario, the results of the minimax rates under weak or no heredity are exactly the same as those in Scenario 2. For completeness, we still present the results. Specifically, the minimax risk is of order n M(R̈pstrong )≍ n )≍ M(R̈pweak σ 2 pn ξ , n r1 σ 2 r1 pn , ξ n (r2 ∧r1 pn ) M(R̈pn ) ≍ σ 2 p2n ξr . n 2 5.2. Interesting Implications 1. Comparing the results for weak heredity and no heredity, we may or may not have distinct rates of convergence. When there exists a small constant c > 0 such that log r2 ≤ (1 − c) · log(r1 pn ) for large enough n, there is C. Ye and Y. Yang/Adaptive Minimax Estimation with Interactions 2. 3. 4. 5. 6. 10 no difference between weak heredity and no heredity from the perspective of rate of convergence in estimation. It still remains an open question how they are different for the problem of model identification. Without the above relationship between r1 and r2 , there is no guarantee that the rates of convergence are the same under weak heredity and no heredity. For example, when r2 = r1 pn / log r1 , if in addition we have r1 = pn ≤ n1/2 , the minimax rates are the same under weak and no heredity, at n ) ≍ M(R̈pn ) ≍ r1 pn log log r1 /(n log r1 ). In contrast, if instead M(R̈pweak √ n )≍ we have r1 = pn , then the minimax rates are different, with M(R̈pweak pn r1 pn log log r1 /(n log r1 ) and M(R̈ ) ≍ r1 pn /n. Heredity conditions do not affect the rates of convergence in some situations. For example, when there exist more main effects than interaction effects (Scenario 1), the minimax rates of convergence are the same under all three heredity conditions. From the detailed rates of convergence, under any of the three heredity conditions, the estimation of the interaction terms ξrK2 /n may become the dominating part. There are two different reasons why the price of estimating the interaction terms becomes higher than that for the main effect terms. One is that the number of interaction terms is more than that of the main effect terms. The other reason is that although the main effect terms outnumber the interaction terms, the ambient dimension is so large that even estimating a small number of the interaction terms is more challenging than estimating the main effects. How much can the rate of convergence be improved by imposing strong heredity? We quantify this improvement by taking the ratio of two minimax rates of convergence given the ambient dimension pn , i.e., n n n M(R̈pstrong ) and M(R̈pstrong )/M(R̈pweak )/M(R̈pn ). In Scenario 2 (r1  r2 pn n and log pn  r1 ), we have M(R̈strong )/M(R̈pweak )  log pn /pn , where the maximal improvement happens when r1 ≍ log pn and r2 ≍ r1 pn . That is, the minimax rate of convergence under strong heredity is up to log pn /pn times faster than that under weak heredity. Similarly we n )/M(R̈pn )  log2 pn /p2n , where the maximal improvement have M(R̈pstrong log2 pn /p2n happens at r1 ≍ log pn and r2 ≍ p2n . In Scenario 3 (r1  r2 and log pn  r1 ), the improvement n n )  log pn /pn , where the maximal improvement )/M(R̈pweak M(R̈pstrong happens when r2  r1 pn . In this scenario, the maximal improvement of the minimax rate from weak heredity to strong heredity depends on the ambient dimension pn . In other words, the larger the ambient dimension is, the more improvement of minimax rate of convergence we have from weak n )/M(R̈pn )  heredity to strong heredity. Similarly we have M(R̈pstrong 2 2 log pn /pn , where the equality holds if r1 = O(1) and r2 ≍ pn .  If r2 is active for all three heredity conditions, i.e., r2 ≤ r21 , the maximal improvement of minimax rate from weak/no heredity to strong n n heredity turns out to be consistent. That is, M(R̈pstrong ) ≍ )/M(R̈pweak pn pn M(R̈strong )/M(R̈ )  1/ log pn , where the maximal improvement hap- C. Ye and Y. Yang/Adaptive Minimax Estimation with Interactions 11 pens at r1 ≍ log pn and r2 ≍ r12 . 6. Extension to Quadratic Models Our aforementioned results do not consider quadratic effects. When both quadratic and two-way interaction effects are included in a model (called a quadratic model), it is easy to see the rates of convergence in the theorems still apply under both strong heredity and weak heredity. However, in the case of no heredity, the number of quadratic terms enters into the minimax rate. Assume one model has at most r3 extra non-zero quadratic terms. We need the following assumption. Sparse Reisz Condition 2 (SRC2) For some l1 , l2 , l3 > 0, there exist constants b1 , b2 > 0 (not depending on n) such that for any β = (β (1) , β (2) , β (3) ) with β (1) 0 ≤ min(2l1 , pn ), β (2) 0 ≤ min(2l2 , p2n ) and β (3) 0 ≤ min(2l3 , pn ), we have 1 b1 kβk2 ≤ √ kZ∗ βk2 ≤ b2 kβk2 , n where Z∗ = (X, [XX], X2 ) is the new design matrix, with X2 representing the n × p matrix that contains all the quadratic terms. Next we state the minimax results for quadratic models. Strong heredity and weak heredity are exactly the same condition since a quadratic term has only one corresponding main effect term. That is, both strong and weak heredity require that if a quadratic term X12 has a non-zero coefficient, then X1 must also have a non-zero coefficient. Similarly, under SRC2 with l1 = r1 , l2 = r2 , l3 = r3 , the minimax rate of convergence under strong/weak heredity for the quadratic model stays the order  ! r1 pn σ2 2 r1 (1 + log ) ∨ r2 (1 + log ) ; (6.1) n r1 r2 under no heredity, its order becomes σ2 n  ! pn pn 2 r̄(1 + log ) ∨ r2 (1 + log ) , r̄ r2 (6.2) where r̄ = r1 ∨ r3 . 7. Adaptation to Heredity Conditions and Sparsity Indices In the previous sections, we have determined the minimax rates of convergence for estimating the linear regression function with interactions under different sizes of sparsity indices r1 , r2 and heredity conditions S. These results assume C. Ye and Y. Yang/Adaptive Minimax Estimation with Interactions 12 that r1 , r2 and S are known. However, in practice, we usually have no prior information about the underlying heredity condition nor the sparsity constraints. Thus it is necessary and appealing to build an estimator that adaptively achieves the minimax rate of convergence without the knowledge of S, r1 and r2 . We construct such an adaptive estimator as below. To achieve our goal, we consider one specific model and three types of models together as the candidate models: no weak F̄ = {Ipn ,(p2n −pn )/2 } ∪ {Istrong k1 ,k2 } ∪ {Ik1 ,k2 } ∪ {Ik1 ,k2 },  where Ipn ,(p2n −pn )/2 denotes the full model with pn main effects and all the p2n interaction effects. It is included so that the risk of our estimator will not be worse than order RZ /n, in which RZ is the rank of the full design matrix. With weak no a slight abuse of the notation, we use Istrong k1 ,k2 , Ik1 ,k2 and Ik1 ,k2 to represent a model with k1 main effects and k2 interaction effects under strong heredity, weak heredity and no heredity respectively. Note that some models appear more than once in F̄ , which does not cause any problem for the goal of estimating the regression function. The details of the range of k1 and k2 for each model class are shown in (7.2), (7.3) and (7.4). To choose a model from the candidate set, we apply the ABC criterion in Yang (1999). For a model I in F̄ , the criterion value is ABC(I) = n X i=1 (Yi − ŶiI )2 + 2rI σ 2 + λσ 2 CI , (7.1) where ŶI = PI Y is the projection of Y onto the column space of the design matrix ZI with rank rI , CI is the descriptive complexity of model I and λ > 0 is a constant. The model descriptive complexity satisfies CI > 0 and P I∈F̄ exp(−CI ) ≤ 1. The model descriptive complexity is crucial in building the adaptive model. Let π0 , π1 , π2 , π3 ∈ (0, 1) be four constants such that π0 + π1 + π2 + π3 = 1. Set CIpn ,(p2 −pn )/2 = − log π0 for the full model, n  k1       pn k1 2 +log ∧ n +log (7.2) CIstrong = − log π1 +log(pn ∧n)+log k1 ,k2 k1 k2 2  for 1 ≤ k1 ≤ pn ∧ n and 0 ≤ k2 ≤ k21 ∧ n, = − log π2 + log(pn ∧ n) + log (K ∧ n) + log CIweak k ,k 1 2 1 2  (7.3) − k1 for 1 ≤ k1 ≤ pn ∧ n and 0 ≤ k2 ≤ K ∧ n, and  pn       pn pn 2 +log ∧ n +log , (7.4) = − log π3 +log(pn ∧n)+log k1 k2 2 with K = k1 pn − CIno k ,k k1 2     K pn + log k1 k2 C. Ye and Y. Yang/Adaptive Minimax Estimation with Interactions 13  for 1 ≤ k1 ≤ pn ∧n and 0 ≤ k2 ≤ p2n ∧n. This complexity assignment recognizes that there are three types of models under the different heredity conditions. Let Î = arg minI∈F̄ ABC(I) denote the model that minimizes the ABC criterion over the candidate model set F̄ and ŶÎ := PÎ Y denote the least squares estimate of Y using the model Î. Then we have the following oracle inequality. Theorem 7.1. When λ ≥ 5.1/ log 2, the worst risk of the ABC estimator ŶÎ is upper bounded by       pn KS cσ 2 RZ ∧ r1 1 + log + r2 1 + log , sup E(L(Î)) ≤ n r1 r2 h∈F0 (r1 ,r2 ;S) with     , KS = r1 pn ,   pn  2 , r1 2 if S = R̈pstrong , if S = R̈pweak , if S = R̈p , (7.5) where RZ is the rank of the full design matrix Z and the constant c only depends on the constant λ. From the theorem, without any prior knowledge of the sparsity indices, the constructed ABC estimator adaptively achieves the minimax upper bound regardless of the heredity conditions. The result also indicates a major difference between estimation and model identification. For estimation, from the result, we are able to achieve adaptation with respect to the heredity condition without any additional assumption. For model identification, although we are not aware of any work that addresses the task of adaptation over the unknown heredity nature, it seems certain that much stronger assumptions than those for consistency under an individual heredity condition will be necessary to achieve adaptive selection consistency. Achieving adaptive model selection consistency under different types of conditions remains an important open problem on model selection theory and methodology. Remark 5. We do not require any assumptions on the relationship among the variables for the upper bound in the theorem. In particular, the variables may be arbitrary correlated. Remark 6. The order RZ /n is achievable when we use the projection estimator from the full model. Thus the minimax rate of convergence is no slower than the order RZ /n. As is known, the rank of the design matrix plays an important role in determining the minimax rate of convergence under fixed design (Yang 1999, Rigollet & Tsybakov 2011, Wang et al. 2014). For our result, when pn , r1 and r2 together make the total estimation price of the true model small enough, the upper  bound will be improved from RZ /n to (r1 (1 + log(pn /r1 )) ∨ r2 (1 + log( r21 /r2 )))/n. Remark 7. The ABC estimator may not be practical when pn is large. In such case, stochastic search instead of all subset selection can be used for implementation. C. Ye and Y. Yang/Adaptive Minimax Estimation with Interactions 14 Remark 8. The term “RZ ∧ ” automatically applies to the lower bound under whichever heredity condition, since under the  SRC assumption, it intrinsically requires that r1 (1+log(pn /r1 ))∨r2 (1+log( r21 /r2 )) is no larger than RZ in terms of order. Otherwise, the lower bound (r1 (1+log(pn /r1 ))∨r2 (1+log( r21 /r2 )))/n by our proof will exceed the upper bound RZ /n, which leads to a contradiction. We give a specific example in Appendix F to illustrate this requirement. Appendix A: Proof of the upper bound in Theorem 3.1 Proof of (3.2) Recall that h(z) = zT β and ĥ(z) = zT β̂. Set hI := PI h as the estimator by model I, where we use the bold-face h = (h(zT1 ), ..., h(zTn ))T to denote the mean regression function vector and zi is the i-th row of the full design matrix Z. We first prove that Î is equivalently an ABC estimator over the candidate set we consider. The SRC assumption with l1 = r1 , l2 = r2 assures that r1 + r2 ≤ n. It follows that, for any model I = (I1 , I2 ) with |I1 |0 = r1 , |I2 |0 = r2 , the corresponding submatrix ZI is full rank, i.e., rI = r1 + r2 . Thus, Î = arg min I∈F n X i=1 n X (Yi − ŶiI )2 (Yi − ŶiI )2 + 2rI σ 2 + λσ 2 CI = arg min = arg min ABC(I), I∈F i=1 I∈F where F is the collection of models that have r1 non-zero main effects and r2 non-zero interaction effects with 0 ≤ r1 ≤ pn , 1 ≤ r2 ≤ r21 , and all the models in F share the same model descriptive complexity  r1    pn 2 + log = log . CIstrong r1 ,r2 r1 r2 The ABC criterion and the model descriptive complexity are introduced near (7.1). Therefore, Î is an ABC estimator over the candidate set F . Next we prove the upper bound. Since Î is an ABC estimator over the candidate set F , by Theorem 1 in Yang (1999), we have:   σ 2 rI λσ 2 CI 1 2 , (A.1) khI − hk2 + + E(L(Î)) ≤ c inf I∈F n n n where c is a positive constant that depends on the constant λ only. When n ), there exists a specific model in F such that the h ∈ W = F0 (r1 , r2 ; R̈pstrong projection estimator of this model is equal to h. We consider the RHS of (A.1) C. Ye and Y. Yang/Adaptive Minimax Estimation with Interactions 15 evaluated at such a model, where we still denote it as Ir1 ,r2 for convenience. Thus, ! λσ 2 CIr1 ,r2 σ 2 rIr1 ,r2 2 + E(L(Î)) ≤ c hIr1 ,r2 − h + n n  c 2 σ rIr1 ,r2 + λσ 2 CIr1 ,r2 . = |n {z } (i) The term (i) is bounded as follows:    r1   pn c1 λ 2 1 2 (i) ≤ σ (r1 + r2 ) + log + log r1 r2 n λ  !!   r1 c1 λ 2 1 pn ≤ + r2 1 + log 2 σ (r1 + r2 ) + r1 1 + log n λ r1 r2 !!    r1 pn c2 2 + r2 1 + log 2 . σ r1 1 + log ≤ n r1 r2 Therefore, c2 · σ 2 E(L(Î)) ≤ n   pn r1 1 + log + r2 r1 1 + log r1 2  !! r2 . Thus we have c2 · σ 2 min max EL(ĥ, h) ≤ max E(L(Î)) ≤ h∈W n ĥ h∈W   pn r1 1 + log + r2 r1 1 + log r1 2  !! r2 where the above c1 , c2 are universal constants. Appendix B: Proof of the lower bound in Theorem 3.1 Before stating the proof of (3.3), we introduce the local metric entropy, two important sets that aid the understanding of the metric entropy of the regression function space, together with the lemmas in relation to these two sets. B.1. Metric Entropy Metric entropy plays a central role in minimax theory, through the concepts of packing and covering. It provides a way to understand the “cardinality” of a set with infinitely many elements. In deriving the lower bound, information theoretic techniques play a key role, such as the local metric entropy, Fano’s inequality, Shannon’s mutual information and Kullback–Leibler divergence. We begin by introducing the definition of the local metric entropy. , C. Ye and Y. Yang/Adaptive Minimax Estimation with Interactions 16 Definition 1 (Local Metric Entropy). Given a metric space (X , ρ), let B(x, ǫ) = {x′ ∈ X |ρ(x, x′ ) ≤ ǫ} be a ǫ-ball around x. For 0 < a < 1, the a-local ǫ-entropy at x, denoted as log Mxa (ǫ; X , ρ), is defined as the aǫ-packing entropy of B(x, ǫ). a The a-local ǫ-entropy, denoted as log Mlocal (ǫ; X , ρ), is then defined as the maximum (or supremum if maximum does not exist) of log Mxa (ǫ; X , ρ) over all a x in X , i.e., log Mlocal (ǫ; X , ρ) = max log Mxa (ǫ; X , ρ). x∈X B.2. Important Subsets Set the Hamming distance between any two vectors v, v ′ ∈ Rd as ρH (v, v ′ ) = Pd ′ i=1 1vi 6=vi . Consider the set n pn n H = β ∈ R̈pstrong : β ∈ {−1, 0, 1}pn+( 2 ) , β (1) 0 ≤ r1 , β (2) 0 ≤ r2 o and let H1 denote a subset of H where the the first r1 coordinates are fixed, i.e.,       H1 = β ∈ H : β (1) = (1, ..., 1, 0, ..., 0), β (2) = r2 . | {z } | {z }   0   r1 pn −r1 Let H2 denote another subset of H where no interaction effect exists, i.e., n o H2 = β ∈ H : β (1) = r1 , β (2) = 0 , 0 0 The following two lemmas of the metric entropy of the subsets H1 and H2 are needed in the proof of (3.3).  exists a subset of H1 with its cardinality Lemma 1. If r2≤ 32 r21 , then there  r1 −r /2 ) ( 2 such that the pairwise Hamming distance of no less than exp r22 log 2 r2 the points in this subset is greater than r2 /2. Proof. The proof is presented in Appendix B.4. Lemma 2. If r1 ≤ 2pn /3, then there exists a subset of H2 with its cardinality 1 /2 such that the pairwise Hamming distance of no less than exp r21 log pn −r r1 the points in this subset is greater than r1 /2. Proof. The proof is similar to that of Lemma 1. B.3. Proof of (3.3)    r1 r1 2 /4. Since r (1 + log( It suffices to prove under r ≤ r − r /r )) ≍ for 2 2 1 2 1 2 2   r1 1 r1 risk in the function class 2 2 ≤ r2 ≤ 2 , the monotonicity of the minimax  reduces the proof to the case r2 ≤ r12 − r1 /4. Similarly it suffices to prove under r1 ≤ pn /2. C. Ye and Y. Yang/Adaptive Minimax Estimation with Interactions n Recall that B0 (r1 , r2 ; R̈pstrong )= n n β ∈ R̈pstrong : β (1) 0 ≤ r1 , β (2) 17 0 ≤ r2 o n is the coefficient space of interest and F0 (r1 , r2 ; R̈pstrong ) = o n pn T is the mean regression function h : h(z) = z β, β ∈ B0 (r1 , r2 ; R̈strong ) space. For convenience, let hθ , hϑ denote the regression functions with coefficents θ, ϑ respectively, i.e., hθ (z) = zT θ, hϑ (z) = zT ϑ. Let o n n n ), kβk2 ≤ ǫ )(ǫ) = β : β ∈ B0 (r1 , r2 ; R̈pstrong B0 (r1 , r2 ; R̈pstrong n be an l2 -ball of radius ǫ around 0 in B0 (r1 , r2 ; R̈pstrong ) and n o n n ), d(h′ , h) ≤ ǫ0 )(h, ǫ0 ) = h′ : h′ (z) = zT β, β ∈ B0 (r1 , r2 ; R̈pstrong F0 (r1 , r2 ; R̈pstrong be the ball of radius ǫ0 around the underlying regression function h. Without loss of generality, we assume h = 0. The square root of the empirical l2 -norm loss q P n 1 d(hθ , hϑ ) := n i=1 (hθ (zi ) − hϑ (zi ))2 = √1n kZ(θ − ϑ)k2 is used to measure the distance between any two functions hθ , hϑ . We prove the following two cases separately.  Case 1: r21 log((pn − r1 /2)/r1 ) ≤ r22 log(( r21 − r2 /2)/r2 ). We consider the n )(ǫ), where ◦ is the subset H1′ = {ǫ ◦ β : β ∈ H1 } of the l2 -ball B0 (r1 , r2 ; R̈pstrong point-wise product of two vectors, √ √ √ √ ǫ ǫ = √ (1/ r1 , ..., 1/ r1 , 1/ r2 , ..., 1/ r2 ) {z } | {z } 2 | pn and H1 =      (p2n −pn )/2 β ∈ H : β (1) = (1, ..., 1, 0, ..., 0), β (2) | {z } | {z } r1 pn −r1 0 = r2      . From Lemma 1, there exists a subset Hsub of H1 such that |Hsub | ≥ (r1 )−r2 /2 exp( r22 log 2 r2 ) and the pairwise Hamming distance of the elements within ′ Hsub is greater than r2 /2. Set Hsub := {ǫ ◦ β : β ∈ Hsub }. For any θ′ , ϑ′ ∈ ′ Hsubp , there exist θ, ϑ ∈p Hsub such that kθ′ − ϑ′ k2 = kǫ ◦ θ − ǫ ◦ ϑk2 ≥ ǫ ′ √ǫ | = |Hsub | since ρH (θ, ϑ) ≥ √2r r2 /2 = 2ǫ . We also have |Hsub 2r2 2 ′ ′ it is a one-to-one mapping from Hsub to Hsub . Thus, we have Hsub ⊆ pn ′ is B0 (r1 , r2 ; R̈strong )(ǫ) and the pairwise l2 -distance of the elements in Hsub greater than ǫ/2. n ′ )(ǫ), let hθ′ , hϑ′ be such that For any θ′ , ϑ′ ∈ Hsub ⊆ B0 (r1 , r2 ; R̈pstrong T ′ T ′ hθ′ (z) = z θ , hϑ′ (z) = z ϑ . By SRC assumption with l1 = r1 , l2 = r2 , we have ǫ b1 ≤ b1 k(θ′ − ϑ′ )k2 ≤ d(hθ′ , hϑ′ ) 2 d(h, hϑ′ ) ≤ b2 k(0 − ϑ′ )k2 ≤ b2 ǫ. C. Ye and Y. Yang/Adaptive Minimax Estimation with Interactions 18 n )(h, ǫ0 ) has a subset Let ǫ0 = b2 ǫ, it follows that F0 (r1 , r2 ; R̈pstrong  ′ Fsub := h′ : h′ (z) = zT β, β ∈ Hsub , d(h′ , h) ≤ ǫ0 , in which the pairwise distance (in terms of d) of the functions are no b1 b1 ǫ0 . This implies that the 2b -local ǫ0 -packing entropy of less than 2b 2 2 pn ′ F0 (r1 , r2 ; R̈strong )(h, ǫ0 ) is lower bounded by log |Fsub | = log |Hsub | ≥ r1 −r /2 (2) 2 b1 /(2b2 ) r2 n ) is no less than . So log Mlocal (ǫ0 ) of F0 (r1 , r2 ; R̈pstrong 2 log r2 r2 2 Yang & Barron (1999), the minimax log((r − r − r )/2r ). Then by (7) in 1 2 2 1 2 risk is lower bounded by c1 σ 2 r22 log( r12 −r1 −r2 ) 2r2 n σ2 = c1 n r1 pn − r1 /2 r2 ∨ log log 2 r1 2 r1 2  − r2 /2 r2 ! , where c1 > 0 is a constant that depends on b1 and  b2 only. Case 2: r21 log((pn − r1 /2)/r1 ) ≥ r22 log(( r21 − r2 /2)/r2 ). We consider the √ n )(ǫ), where ǫ′1 = ǫ/ r1 and subset H2′ = ǫ′1 H2 of B0 (r1 , r2 ; R̈pstrong n H2 := β ∈ H : β (1) 0 = r1 , β (2) 0 o =0 . Following the same arguments above, we conclude that the minimax is lower bounded by !  r1 σ 2 r1 pn − r1 /2 pn − r1 /2 r2 σ 2 r1 2 − r2 /2 , = c2 ∨ log log log c2 n 2 r1 n 2 r1 2 r2 where c2 > 0 is a constant that depends on b1 and b2 only. 1 (1 + log(p Notice that when pn /r1 ≥ 2, we have log(pn /r1 − 12 ) ≥10  n /r1 )). r1 r1 1 1 Similarly, we have log 2 /r2 − 2 ≥ 10 1 + log 2 /r2 when r21 /r2 ≥ 2. Together with the fact that the lower bounds for the two cases are the same, the minimax risk is lower bounded by  ! r1 pn σ2 2 r1 (1 + log( )) ∨ r2 (1 + log ) . c n r1 r2 Thus the desired lower bound holds. Remark 9. One way to interpret the imposition of the SRC assumption 2 is that kZθ − Zβk2 is indeed up to a constant of the Kullback-Leibler divergence between two joint densities (the joint distribution of the response variable y under fixed design) parameterized with θ and β respectively. To see this, let Q zi be the i-th row of Z and we have the joint density Pθ = n (2π)−n/2 σ −n i=1 exp(− 12 (yi − zi θ)2 /σ 2 ) with parameter θ. The K-L distance Pn 2 is then D(Pθ ||Pβ ) = 2σ1 2 i=1 (zi β − zi θ)2 = 2σ1 2 kZθ − Zβk2 . C. Ye and Y. Yang/Adaptive Minimax Estimation with Interactions 19 B.4. Proof of Lemma 1  r 2 1 )/2 2 2 since the main effects are fixed. Fix z ∈ H1 , First we have |H1 | = (r1 −r r2 let A denote the collection of all the points in H1 that are within r22 Hamming distances to z, i.e., A = {z ′ ∈ H1 : ρH (z, z ′ ) ≤ r2 /2}. It follows that the cardinality of A is bounded above:  r1   2 3r2 /2 . |A| ≤ r2 /2 For this upper bound, since the main effects are fixed for any point in H1 , we only need to pick r2 /2 positions of the interaction effects where z ′ is different from z. In the remaining interaction effect positions, z ′ is the same as z. It r1   gives us at most r( 2/2) possible choices of the r2 /2 positions out of the r21 2 coordinates. For these r2 /2 positions, z ′ can take any values in {−1, 1, 0}, thus the desired upper bound follows. r1  r1  Let B be a subset of H such that |B| ≤ m := ( 2 ) / ( 2 ) . Consider the 1 r2 r2 /2 collection of the points in H1 that are within r2 /2 Hamming distance to some element in B, i.e., {z ∈ H1 : ρH (z, z ′ ) ≤ r22 f or some z ′ ∈ B}. We have o n r2 f or some z ′ ∈ B z ∈ H1 : ρH (z, z ′ ) ≤ 2 ≤ |B| |A| (r21 )  r1   r2 2 3r2 /2 · ≤ (r21 )  r2 /2 r2 /2  r1  2 < 2 r2 r2 = |H1 | . The strictly less inequality implies that for any set B ⊂ H1 with |B| ≤ m, ∃z ∈ H1 such that ρH (z, z ′ ) > 21 r2 for all z ′ ∈ B. By induction, we can create a set B ⊂ H1 with |B| > m such that Hamming distance between any two elements in B exceeds 12 r2 . Next, we introduce one useful inequality. When 0 ≤ B ≤ 23 A for A, B ∈ N, we have  A B  A B 2 = B/2 B/2 Y A−B + Y A−B +j (A − B2 )!( B2 )! ≥ = B B B (A − B)!(B)! 2 +j 2 + 2 j=1 j=1 B 2 When r2 ≤ (r12 − r1 )/3, we have m = (r21 ) r2 ≥ (r1 )  2 r2 /2 r1 2  − r2 /2 r2 !r2 /2 . =( A− B B 2 B/2 ) . C. Ye and Y. Yang/Adaptive Minimax Estimation with Interactions 20 Thus, log m ≥ r2 log 2 r1 2  − r2 r2 2 . The desired result follows. Appendix C: Proof of Theorem 4.1 Proof. The proofs are similar to the arguments for strong heredity with slight differences. To prove the upper bound heredity, we instead consider the Pn under weak I 2 (Y − Ŷ ) that minimizes the residual sum of model Î = arg minI∈Iweak i i i=1 r1 ,r2 squares over all the models that have r1 non-zero main effects and r2 non-zero interaction effects under weak heredity. The model descriptive complexity is  thus  K pn with + log different from the strong heredity. In this case, CIweak = log r1 r1 ,r2  r2 r1 K = r1 (pn − (r1 + 1)/2) for 1 ≤ r1 ≤ pn ∧ n and 0 ≤ r2 ≤ (r1 pn − 2 − r1 ) ∧ n. The ABC criteria for the models are defined as in (7.1). The same arguments in the proof of (3.2) can then be used. To prove the lower bound under weak heredity, we consider the set o n pn n : β ∈ {−1, 0, 1}pn+( 2 ) , β (1) ≤ r1 , β (2) ≤ r2 . Hweak = β ∈ R̈pweak 0 0 Then the two important subsets are instead    H1 = β ∈ Hweak : β (1) = (1, ..., 1, 0, ..., 0), β (2) | {z } | {z }   r1 and n H2 = β ∈ Hweak : β (1) 0 0 = r2 pn −r1 = r1 , β (2) 0 o =0 .      Similar metric entropy results of the above two subsets can be derived in the same fashion as in Lemmas 1 and 2. Other arguments are the same as in the proof of (3.3). Appendix D: Proof of Theorem 4.2 Proof. For theP upper bound under no heredity, we consider the model Î = n I 2 = arg minI∈Ino i=1 (Yi − Ŷi ) with the model descriptive complexity CIno r1 ,r2 r1 ,r2   pn  p pn log r1 + log ( r22 ) for 1 ≤ r1 ≤ pn ∧ n and 0 ≤ r2 ≤ 2n ∧ n. The ABC criteria for the models are defined as in (7.1). For the lower bound under no heredity, we consider the set o n pn Hno = β ∈ R̈pn : β ∈ {−1, 0, 1}pn+( 2 ) , β (1) ≤ r1 , β (2) ≤ r2 . 0 0 C. Ye and Y. Yang/Adaptive Minimax Estimation with Interactions Then the two important subsets are instead    H1 = β ∈ Hno : β (1) = (1, ..., 1, 0, ..., 0), β (2) | {z } | {z }   r1 and n H2 = β ∈ Hno : β (1) 0 0 = r2 pn −r1 = r1 , β (2) 0 o =0 . 21      Similar metric entropy results of the above two subsets can be derived in the same fashion as Lemmas 1 and 2. Other arguments are the same as in the proofs of (3.2) and (3.3). Appendix E: Proof of Theorem 7.1 The model descriptive complexity term λσ 2 CI plays a fundamental role in model selection theory (Barron & Cover 1991, Barron et al. 1999, Yang 1999, Wang et al. 2014). Since we are considering models with interaction terms, the model descriptive complexity CI reflects our comprehension of the model complexity other than the total number of parameters only. The detailed designation of the descriptive complexity usually depends on the class of models of interest. Instead of interpreting CI as the code length (or description length) of describing the model index, one can also treat exp(−CI ) as the prior probability assigned to the model from a Bayesian viewpoint. Proof. The candidate set can be represented as the union of the candidate sets under three heredity conditions, i.e., F̄ = Fstrong ∪ Fweak ∪ Fno , with Fstrong := {Ipn ,(p2n −pn )/2 } ∪ {Istrong k1 ,k2 }, Fweak := {Ipn ,(p2n −pn )/2 } ∪ {Iweak k1 ,k2 }, Fno := {Ipn ,(p2n −pn )/2 } ∪ {Ino k1 ,k2 }. n When h ∈ F0 (r1 , r2 ; R̈pstrong ), there exists a specific model in Fstrong such that the projection estimator of this model is equal to h. Also, the projection of h onto the full design matrix is still h. We denote the two models as Ir1 ,r2 and C. Ye and Y. Yang/Adaptive Minimax Estimation with Interactions 22 Ipn ,(pn )(pn −1)/2 respectively. It follows that E(L(Ŷ )) ≤ F̄ ≤ ≤ =  σ 2 rI λσ 2 CI 1 2 khI − hk2 + + c inf n n n I∈F̄   2 1 σ rI λσ 2 CI 2 c inf (E.1) khI − hk2 + + I∈Fstrong n n n ! σ 2 rIr1 ,r2 λσ 2 CIr1 ,r2 2 c hIr1 ,r2 − h + + n n   σ 2 RZ −λσ 2 log π0 2 ∧ c hIpn ,pn (pn −1)/2 − h + + n n   c c 2 σ rIr1 ,r2 + λσ 2 CIr1 ,r2 ∧ σ 2 RZ − λσ 2 log π0 , (E.2) n n | {z } | {z }  (i) (ii) where RZ is the rank of the full design matrix, the first inequality follows from (A.1), the second inequality follows from Fstrong ⊆ F̄ and the third inequality results from the evaluation of (E.1) at Ir1 ,r2 and Ipn ,pn (pn −1)/2 . The two terms (i) and (ii) are bounded as follows:     r1    pn c1 λ 2 r1 + r2 r1 2 + log + log σ − log π1 + log pn + log (i) ≤ r1 n λ r2 2  c1 λ 2 r1 + r2 pn ≤ σ − log π1 + r1 (1 + log ) n λ r1  ! r1 p n + log r12 + r1 (1 + log ) + r2 (1 + log 2 ) r1 r2 !  r1 c2 2 pn 2 ≤ ) , σ r1 (1 + log ) + r2 (1 + log n r1 r2 and  c 2 σ RZ − λσ 2 log π0 n c3 2 σ RZ . n (ii) ≤ ≤ Therefore, we have max(c2 , c3 ) · σ 2 E(L(Ŷ F̄ )) ≤ n " #  ! r1 pn 2 r1 (1 + log ) + r2 (1 + log ) ∧ RZ , r1 r2 where c1 , c2 , c3 are some constants that depend only on the constant λ. Thus the desired minimax upper bounded follows. n ) or h ∈ F0 (r1 , r2 ; R̈pn ), with I ∈ Fweak or I ∈ Fno When h ∈ F0 (r1 , r2 ; R̈pweak replacing I ∈ Fstrong in (E.1), the quantity (i) in (E.2) will instead be no greater C. Ye and Y. Yang/Adaptive Minimax Estimation with Interactions 23 than      r1 + r2 K pn + log − log π2 + log pn + log K + log λ r1 r2  n with K = r1 pn − r21 − r1 under weak heredity h ∈ F0 (r1 , r2 ; R̈pweak ), or  pn       pn pn c1 λ 2 r1 + r2 2 + log + log σ − log π3 + log pn + log (i) ≤ r1 r2 n λ 2 c1 λ 2 σ n under no heredity h ∈ F0 (r1 , r2 ; R̈pn ). The different constants π2 , π3 does not affect the conclusion in terms of order. Following the same arguments in the proof of strong heredity, the desired results follow when the underlying heredity condition is weak heredity or no heredity. Appendix F: An Example When SRC is not Satisfied For simplicity, let us consider an example where the regression mean function includes only one main effect term, i.e., r1 = 1, r2 = 0. The corresponding SRC assumption with l1 = r1 = 1, l2 = r2 = 0 will be that there exist constants b1 , b2 > 0 (not depend on n) such that for any β ∈ Rpn with kβk0 ≤ 2, we have 1 b1 kβk2 ≤ √ kZβk2 ≤ b2 kβk2 , n (F.1) where the design matrix Z = X is the matrix that contains the main effects. Assume the first RZ columns of Z are linearly independent and denote Z = (Z1 , Z2 ), where Z1 = (Z1 , ..., ZRZ ) is the n×RZ submatrix with rank(Z1 ) = RZ . Suppose the submatrix Z1 satisfies the SRC assumption. Assume that √ kZi k2 = f (n) for 1 ≤ i ≤ pn . For the purpose of illustration, we set f (n) = n. Let A be the collection of all columns in Z2 : A = {z|z = Z1 α, α ∈ RZ R , kzk2 = f (n)}. Then A should satisfy that ∀z, z ′ ∈ A, we have b1 ≤ √1 ka1 z + a2 z ′ k ≤ b2 for all a1 , a2 ∈ R and a2 + a2 = 1. We know 1 2 2 n 1 1 √ ka1 z + a2 z ′ k2 = √ n n q 2 2 a21 kzk2 + a22 kz ′ k2 + 2a1 a2 kzk2 kz ′ k2 cos θ, where θ is the angle between two n-dimensional vectors z and z ′ . Thus we have q 1 2 2 √ a21 kzk2 + a22 kz ′ k2 + 2a1 a2 kzk2 kz ′ k2 cos θ n q f (n) a21 + a22 + 2a1 a2 cos θ = √ n p 1 + 2a1 a2 cos θ. = √ Then 1 + 2a1 a2 cos θ ≥ b1 for all a21 + a22 = 1 (otherwise √1n ka1 z + a2 Zi k2 is less than b1 , which violates the SRC assumption). Since −1 ≤ 2a1 a2 ≤ 1 C. Ye and Y. Yang/Adaptive Minimax Estimation with Interactions 24 p for a21 + a22 = 1, we have b1 ≤ 1 − |cos θ|, which implies |cos θ| ≤ 1 − b21 . That means the p between any two elements in A should be √ pairwise l2 distance greater than 2b1 and less than 4 − 2b21 . It is well known that the ǫ-covering entropy of the RZ -dimensional unit ball √ B is of order RZ log(1/ǫ). We denote √ √ nB as a ball of radius n. Let ǫ = 2b1 /2, constant √ √ √ there exists a positive c1 such that log N (ǫ; nB, l2 ) ≤ c1 RZ log( n/ǫ) √ = c1 RZ log( 2n/b1 ). Since A is a 2ǫ-packing set √ of a ball of radius f (n) = n, its cardinality satisfies log |A| ≤ log M (2ǫ; nB, l2 ). The covering number and the packing number are closely related as in the well-known inequality ( 2ǫ ; X , ρ) ≤ √ M (ǫ; X , ρ) ≤ N √ ǫ M ( 2 ; X , ρ). Thus we have log |A| ≤ log M (2ǫ; nB, l2 ) ≤ log N (ǫ; nB, l2 ) ≤ √ √ c 1 RZ c1 RZ log( 2n/b1 ), which implies A has at most elements under 1) √ ( 2n/b c 1 RZ , the SRC assumption the SRC assumption. Thus, as long as pn > ( 2n/b1 ) will not be satisfied because the SRC assumption requires that (F.1) must hold for any pair of columns in Z. In this case, the lower bound r1 (1 + log(pn /r1 ))/n in our theorems does not apply. References Barron, A., Birgé, L. & Massart, P. (1999), ‘Risk bounds for model selection via penalization’, Probability theory and related fields 113(3), 301–413. Barron, A. R. & Cover, T. M. (1991), ‘Minimum complexity density estimation’, IEEE transactions on information theory 37(4), 1034–1054. Bickel, P. J., Ritov, Y. & Tsybakov, A. B. (2009), ‘Simultaneous analysis of lasso and dantzig selector’, The Annals of Statistics pp. 1705–1732. Bien, J., Taylor, J. & Tibshirani, R. (2013), ‘A lasso for hierarchical interactions’, Annals of statistics 41(3), 1111. Bunea, F., Tsybakov, A. B., Wegkamp, M. H. et al. (2007), ‘Aggregation for gaussian regression’, The Annals of Statistics 35(4), 1674–1697. Candes, E. & Tao, T. (2007), ‘The dantzig selector: Statistical estimation when p is much larger than n’, The Annals of Statistics pp. 2313–2351. Chipman, H. (1996), ‘Bayesian variable selection with related predictors’, The Canadian Journal of Statistics / La Revue Canadienne de Statistique 24(1), 17–36. Choi, N. H., Li, W. & Zhu, J. (2010), ‘Variable selection with the strong heredity constraint and its oracle property’, Journal of the American Statistical Association 105(489), 354–364. Fan, J. & Li, R. (2001), ‘Variable selection via nonconcave penalized likelihood and its oracle properties’, Journal of the American statistical Association 96(456), 1348–1360. Fan, Y., Kong, Y., Li, D. & Lv, J. (2016), ‘Interaction pursuit with feature screening and selection’, arXiv preprint arXiv:1605.08933 . Hall, P. & Xue, J.-H. (2014), ‘On selecting interacting features from highdimensional data’, Computational Statistics & Data Analysis 71, 694–708. Hamada, M. & Wu, C. J. (1992), ‘Analysis of designed experiments with complex aliasing’, Journal of Quality Technology;(United States) 24(3). C. Ye and Y. Yang/Adaptive Minimax Estimation with Interactions 25 Hao, N., Feng, Y. & Zhang, H. H. (2017), ‘Model Selection for High Dimensional Quadratic Regression via Regularization’, Journal of the American Statistical Association 24(4), 0–0. Hao, N. & Zhang, H. H. (2014), ‘Interaction Screening for UltrahighDimensional Data’, Journal of the American Statistical Association 109(507), 1285–1301. Hao, N. & Zhang, H. H. (2016), ‘A note on high dimensional linear regression with interactions’, The American Statistician (just-accepted). Jiang, B. & Liu, J. S. (2014), ‘Variable selection for general index models via sliced inverse regression’, The Annals of Statistics 42(5), 1751–1786. Knight, K. & Fu, W. (2000), ‘Asymptotics for lasso-type estimators’, Annals of statistics pp. 1356–1378. Koltchinskii, V. (2009), ‘The dantzig selector and sparsity oracle inequalities’, Bernoulli 15(3), 799–828. Li, K.-C. (1991), ‘Sliced inverse regression for dimension reduction’, Journal of the American Statistical Association 86(414), 316–327. Li, R., Zhong, W. & Zhu, L. (2012), ‘Feature screening via distance correlation learning’, Journal of the American Statistical Association 107(499), 1129– 1139. Lv, J. & Fan, Y. (2009), ‘A unified approach to model selection and sparse recovery using regularized least squares’, The Annals of Statistics pp. 3498– 3528. Meinshausen, N. & Yu, B. (2009), ‘Lasso-type recovery of sparse representations for high-dimensional data’, The Annals of Statistics pp. 246–270. Nelder, J. A. (1977), ‘A Reformulation of Linear Models’, Journal of the Royal Statistical Society. Series A (General) 140(1), 48–31. Peixoto, J. L. (1987), ‘Hierarchical variable selection in polynomial regression models’, The American Statistician 41(4), 311–313. Raskutti, G., Wainwright, M. J. & Yu, B. (2011), ‘Minimax rates of estimation for high-dimensional linear regression over ℓq -balls’, IEEE transactions on information theory 57(10), 6976–6994. Rigollet, P. & Tsybakov, A. (2011), ‘Exponential screening and optimal rates of sparse estimation’, Annals of Statistics 39(2), 731–771. van de Geer, S. A. (2007), The deterministic lasso. van de Geer, S. A. (2008), ‘High-dimensional generalized linear models and the lasso’, Ann. Statist. 36(2), 614–645. van de Geer, S. A. & Bhlmann, P. (2009), ‘On the conditions used to prove oracle results for the lasso’, Electron. J. Statist. 3, 1360–1392. Wang, Z., Paterlini, S., Gao, F. & Yang, Y. (2014), ‘Adaptive minimax regression estimation over sparse lq-hulls.’, Journal of Machine Learning Research 15(1), 1675–1711. Yang, Y. (1999), ‘Model selection for nonparametric regression’, Statistica Sinica pp. 475–499. Yang, Y. & Barron, A. (1999), ‘Information-theoretic determination of minimax rates of convergence’, The Annals of Statistics 27(5), 1564–1599. Yuan, M., Joseph, V. R. & Zou, H. (2009), ‘Structured variable selection and C. Ye and Y. Yang/Adaptive Minimax Estimation with Interactions 26 estimation’, The Annals of Applied Statistics pp. 1738–1757. Zhang, C.-H. (2010a), ‘Nearly unbiased variable selection under minimax concave penalty’, Ann. Statist. 38(2), 894–942. Zhang, C.-H. & Huang, J. (2008), ‘The sparsity and bias of the lasso selection in high-dimensional linear regression’, The Annals of Statistics pp. 1567–1594. Zhang, T. (2010b), ‘Analysis of multi-stage convex relaxation for sparse regularization’, Journal of Machine Learning Research 11(Mar), 1081–1107. Zhao, P., Rocha, G. & Yu, B. (2009), ‘The composite absolute penalties family for grouped and hierarchical variable selection’, The Annals of Statistics pp. 3468–3497. Zhao, P. & Yu, B. (2006), ‘On model selection consistency of lasso’, Journal of Machine learning research 7(Nov), 2541–2563. Zou, H. & Yuan, M. (2008), ‘Composite quantile regression and the oracle model selection theory’, Ann. Statist. 36(3), 1108–1126.
10math.ST
k-NN Estimation of Directed Information Yonathan Murin Department of Electrical Engineering, Stanford University, USA arXiv:1711.08516v1 [cs.IT] 22 Nov 2017 [email protected] Abstract This report studies data-driven estimation of the directed information (DI) measure between twoem discrete-time and continuous-amplitude random process, based on the k-nearest-neighbors (k-NN) estimation framework. Detailed derivations of two k-NN estimators are provided. The two estimators differ in the metric based on which the nearest-neighbors are found. To facilitate the estimation of the DI measure, it is assumed that the observed sequences are (jointly) Markovian of order m. As m is generally not known, a data-driven method (that is also based on the k-NN principle) for estimating m from the observed sequences is presented. An exhaustive numerical study shows that the discussed k-NN estimators perform well even for relatively small number of samples (few thousands). Moreover, it is shown that the discussed estimators are capable of accurately detecting linear as well as non-linear causal interactions. 1 Introduction Detection and estimation of causality relationships between two random processes is a fundamental problem in many natural and social sciences [1]. This task is in particular challenging as in many real-life scenarios one does not have a good underlying statistical model for the considered process, e.g., in the fields of neuroscience, financial markets, meteorology, etc. For such scenarios it is desirable to use a non-parametric estimator for the causal influence between two observed timeseries. The common approach for quantifying the causal influence between two time-series dates back to the seminal work of Granger [2] where {Xn } is said to have a Granger-causal influence on {Yn } if: Given the past of Yn , the past of Xn helps in predicting future samples of Yn , e.g., Yn+1 . While this approach is indeed general, the common formulation of Granger causality (GC) assumes that the time-series obey a linear structure, and therefore it does not follow the non-parametric approach mentioned above. A possible alternative to GC is the information theoretic measure of directed information (DI) [3, 4], which is closely related to the transfer entropy (TE) functional [5]. In this report we discuss the estimation of DI between two discrete-time and continuous-amplitude sequences (time-series). The estimated DI can then be used as a measure of the causal influence between the random processes underlying the observed sequences.1 Note that DI is a deterministic function of the joint density of the underlying random processes. Therefore, the DI can be estimated by first estimating the (local) joint densities, and then using these densities to estimate the DI. This approach was taken in [7] where it was proposed to use a kernel density estimator (KDE) for estimating the local densities, and in [8] that suggested to estimate the local the densities using 1 Note that the work [6] presented scenarios where DI (or TE) fail to detect or quantify the causal influence between a pair of time-series. The conclusions of [6] also hold for the GC measure. 1 correlation integrals. On the other hand, the estimation method we discuss in the current report is based on the k-nearest-neighbors (k-NN) principle. Before delving into the technical details of estimating the DI functional, we emphasize that when estimating statistical functionals it is common to assume that the underlying process are stationary, ergodic, and smooth. In the rest of this report we build upon these assumptions without verifying their validity. The rest of this report is organized as follows: In Section 2 we discuss k-NN estimation of differential entropy. This estimation approach is extended to estimating the mutual information (MI) functional in Section 3. Estimating the DI is discussed in Section 4, and a numerical study is presented in Section 5. Notation: We denote random variables (RVs) by upper case letters, X, and their realizations with the corresponding lower case letters. We use the short-hand notation X1n to denote the sequence {X1 , X2 , . . . , Xn }. We denote random processes using boldface letters, e.g., X. We denote sets by calligraphic letters, e.g., S, where R denotes the set of real numbers. fX (x) denotes the probability density function (PDF) of a continuous RV X on R, and log(·) denotes the natural basis logarithm. Finally, we use h(·) and I(·; ·) to denote differential entropy and mutual information as defined in [9, Ch. 8]. 2 k-NN Estimation of Differential Entropy We introduce the concept of k-NN estimation of information theoretic measures by first discussing the estimation of differential entropy. A detailed discussion regarding methods (including k-NN) for estimating differential entropy, MI, and the Kullback–Leibler (KL) divergence is provided in [10]. A popular approach for estimating information theoretic functionals is the re-substitution method where first the density is locally (around each of the data points) estimated, and then the functional is estimated via empirical averaging [10, Sec. 2.2.1]. Specifically, let Xi ∈ Rd , i = 1, 2, . . . , N , be independent and identically distributed (i.i.d.) samples of X with PDF fX (x), and consider estimating the differential entropy of X from X1N . Let fˆX (Xi ), i ∈ {1, 2, . . . , N }, be a local estimation of the density around the ith sample. Recalling that the differential entropy is defined as h(X) , −E{log fX (x)}, see [9, Ch. 8], the re-substitution estimator ĥ(X) of h(X) is given by: ĥ(X) = − N 1 X log fˆX (Xi ). N i=1 (1) While there are several popular techniques for estimating the local density, e.g., kernel density estimation [11] and correlation integrals [12], in this report we focus on estimation algorithms based on the k-NN principle. Before presenting the estimation strategy, we provide several definitions. Let p ≥ 1. For x ∈ Rd , the `p -norm of x is defined as: ||x||p , d X ! p1 |xi |p , i=1 where the `p -distance between xi ∈ Rd and xj ∈ Rd is defined as dp (xi , xj ) , ||xi − xj ||p . Let n sort(x),  x ∈ R , denotethe sorted version of the vector x, in ascending order, and define ρi,p , sort {dp (xi , xj )}N j=1,j6=i to be the (sorted) vector of distances, in `p -norm, of all the samples from xi . In particular, ρk,i,p denotes the distance from xi to its k-NN.2 2 Unless otherwise stated, in this report we assume that k is a fixed and relatively small number (independent of N ) at the range 4, 5, . . . , 10. 2 Assuming a uniform local density in a small environment around each of the samples (this assumption implies that the density fX (x) is smooth), ρk,i,p can be used to estimate fX (Xi ). Let Γ(a) denote the Euler’s gamma function [13, eq. (5.2.1)], and let cd,p denote the volume of the unit lp -ball in d dimensions, given by [14]: cd,p = 2d (Γ(1 + p1 ))d Γ(1 + p1 ) . Since in the ball of radius ρk,i,p there are k samples out of N in total, we can approximate the local density via: fˆX (Xi ) ≈ k . N cd,p (ρk,i,p )d (2) Substituting (2) into (1) we obtain the following entropy estimator:   N 1 X N cd,p (ρk,i,p )d ĥ(X) = . log N i=1 k (3) The work [15], by Kozachenko and Leonenko (KL), showed that the simple estimator (3) is biased, and suggested the following bias-corrected estimator:    N  N cd,p (ρk,i,p )d 1 X ĥKL (X) = log + log(k) − ψ(k) N i=1 k N d X log(ρk,i,p ), = log(N ) − ψ(k) + log(cd,p ) + N i=1 (4) where ψ(k) is the digamma function [13, Ch. 5.4]. Remark 1 (The case of k dependent of N ). If k is chosen as a function of N , then ψ(k) converges to log(k) and no bias-correction is required to obtain a consistent estimator. On the other hand, if k is fixed, then the correction term log(k) − ψ(k) is crucial for consistency. Next, we discuss k-NN estimation of mutual information (MI). 3 From Entropy to Mutual Information Consider two RVs X ∈ Rdx and Y ∈ Rdy . Observing N i.i.d pairs (Xi , Yi ) from the joint density fX,Y (x, y), we are interested in estimating the MI I(X; Y ) = h(X) + h(Y ) − h(X, Y ). Fixing k and estimating each of the entropy terms via ĥKL (·), one obtains the following consistent estimator (the consistency follows from the consistency of the ĥKL (·) estimator), denoted by Iˆ3KL (X; Y ): Iˆ3KL (X; Y ) = ĥKL (X) + ĥKL (Y ) − ĥKL (X, Y ). (5) Note that in the estimator (5) each entropy term is estimated separately, with a different k-NN distance. Thus, even though the estimator (5) is consistent, since the estimators are not coupled, for a finite number of samples the bias can be non-negligible. This motivated the work of Kraskov, Stögbauer and Grassberger (KSG) [16], that presented a modification of the Iˆ3KL (X; Y ) estimator, and empirically showed that this modification improves performance (higher accuracy) when the number of samples is finite. In the following we refer to this estimator as IˆKSG (X; Y ). 3 The main idea behind IˆKSG (X; Y ) is to modify the estimators of the individual entropy terms, h(X) and h(Y ), such that their correlation with the estimator of the joint entropy h(X, Y ) term will be higher, leading to a smaller bias. This interpretation was recently presented in [17]. Let ρk,i,p (X, Y ) denote the distance from the pair (Xi , Yi ) to its k-NN. Further define I(·) to be the PN indicator function and let nx,i,p , j=1,j6=i I(dp (xi , xj ) ≤ ρk,i,p (X, Y )). ny,i,p is defined similarly. Note that nx,i,p is the number of samples which are within a distance ρk,i,p (X, Y ) from Xi , where the distance is measured in the X-plane. Thus, as this places no limitation on the distance in the Y -plane, it follows that nx,i,p ≥ k. Using these definitions, and setting p = ∞, the KSG estimator is given by: N 1 X ˆ (ψ(nx,i,∞ + 1) + ψ(ny,i,∞ + 1)). IKSG (X; Y ) = ψ(k) + log(N ) − N i=1 (6) Note that when p = ∞, then dX,Y = dX + dY , cdX,Y ,∞ = cdX ,∞ · cdY ,∞ , and ρk,i,∞ (X, Y ) = max{ρk,i,∞ (X), ρk,i,∞ (Y )}. Hence, the KSG estimator in (6) estimates the individual entropy h(X) via: ĥKSG (X) = log(N ) + log(cdX ,∞ ) + N 1 X (dX log(ρk,i,∞ (X, Y )) − ψ(nx,i,∞ + 1)) , N i=1 (7) which is sample dependent. On the other hand, the estimation of the joint entropy term is identical to the one in (4). The work [17] showed that IˆKSG (X; Y ) is consistent and derived the order of its bias. Remark 2 (The inherent bias in (7)). The estimator (6) uses a hyper-cube of radius ρk,i,p (X, Y ) around each sample point. Since ρk,i,∞ (X, Y ) = max{ρk,i,∞ (X), ρk,i,∞ (Y )}, it follows that for one of the individual terms, e.g., X, ρk,i,∞ (X, Y ) is exactly the distance to the (nx,i,∞ + 1)th -NN, while for the other term this is not the case, see [16, Fig. 1] for illustration of this observation. Thus, letting (Xi , Yi )k be the k−NN of (Xi , Yi ), and assuming that (Xi , Yi )k lies on the X-boundary of the 1 hyper-cube around (Xi , Yi ), the bias of the estimator (7) is of the order of ny,i,∞ . This inherent bias is partially addressed in the second estimator introduced in [16, eqn. (9)]. This estimator uses a hyper-rectangle instead of a hyper-cube, yet, using hyper-rectangles requires other approximations. Thus, none of the two estimators presented in [16] is uniformly better than the other. We refer the reader to [16, Fig. 3] for a detailed discussion regarding the approximations used as apart of the second estimator of [16]. Motivated by the idea of using the sample dependent nx,i,∞ and ny,i,∞ , the work [17] proposed a different method to tackle the inherent bias discussed in Remark 2. The idea is to use an `2 ball instead of the `∞ ball used in (6). With this choice ρk,i,2 (X, Y ) is not the X-boundary distance nor the Y -boundary distance, see [17, Fig. 5]. However, when the Euclidean norm is used, namely p = 2, a new relationship should be derived between nx,i,2 (number of points in the X-space) and fX (x). Such a relationship is formulated in [17, Thm. 9], which essentially states the following approximation: E{nx,i,2 } ≈ N fX (x)cdX ,2 (ρk,i,2 (X, Y ))dX . (8) This approximation motivates estimating log fX (x) via: log\ fX (x) = log(nx,i,2 ) − log N − log cdX ,2 − dX log ρk,i,2 (X, Y ). 4 (9) Plugging this estimation to the re-substitution (1) results in the Gao-Oh-Viswanath (GOV) entropy estimator: ĥGOV (X) = log(N ) + log(cdX ,2 ) + N 1 X (dX log(ρk,i,2 (X, Y )) − log(nx,i,2 )) . N i=1 (10) Finally, to obtain an estimator for the MI, we recall that dX,Y = dX + dY and cdX,Y ,2 = cdX +dY ,2 . Using the estimator (4) to estimate the joint entropy and the estimators (10) for the individual entropy terms one obtains: IˆGOV (X; Y ) = log(N ) + ψ(k) + log Comparing (11) and (6), log   cdX ,2 ·cdY ,2 cdX +dY ,2 cdX ,2 · cdY ,2 cdX +dY ,2  − N 1 X (log(nx,i,2 ) + log(ny,i,2 )). N i=1 (11)  can be viewed as a correction term for using the Euclidean norm. Finally, we note that the consistency of IˆGOV (X; Y ) is stated in [17, Thm. 10]. 4 4.1 Directed Information Definitions and Background Let X and Y be arbitrary discrete-time continuous-amplitude random processes, and let X N ∈ RN and Y N ∈ RN , be N -length sequences. The directed information from X N to Y N is defined as [3]: I(X N → Y N ) , n X I(X1i ; Yi |Y1i−1 ) i=1 = N X h(Yi |Y1i−1 ) − h(Yi |Y1i−1 , X1i ) i=1 (a) = h(Y N ) − h(Y N ||X N ), (12) PN where (a) follows by defining h(Y N ||X N ) , i=1 h(Yi |Y1i−1 , X1i ), and h(·) is the differential entropy. This definition implies that I(X N → Y N ) = 0 when Yi is independent of X1i , given Y1i−1 . DI can be viewed as quantifying the causal influence of the sequence X N on the sequence Y N . Therefore, it is not surprising that in contrast to MI, DI is not symmetric. The directed information rate [4] between the processes X and Y is defined as: 1 I(X N → Y N ), N →∞ N I(X → Y) , lim (13) provided that this limit exists. We now make the following assumptions regarding the processes X and Y. A1) The random processes X and Y are assumed to be stationary, ergodic, and Markovian of order m in the observed sequences. The stationarity assumption implies that the statistics of the considered random processes is constant throughout the observed sequences. Note that formally speaking, the random processes X and Y should be stationary in order to ensure the existence of the DI rate. From practical perspective, it is required that the sequences X N and Y N will be stationary to ensure that the causal influence does not change over 5 the observed sequences. Ergodicity is assumed to ensure that the observed sequences truly represent the underlying processes. Finally, the Markovity assumption is common in modeling real-life systems which have finite memory. For example, [18, 19, 7] used Markov models in analysis of neural recordings, [20] and [21] used Markov models in financial modeling, and [22]–[23] in social networks dynamics. We formulate the assumption of Markovity of order m in the observed sequences via: i−1 i−1 i−1 ∀i > m, f (yi |Y1i−1 ) = f (yi |Yi−m ) and f (yi |Y1i−1 , X1i ) = f (yi |Yi−m , Xi−m ). (14) In (14) we use the simplifying assumption that the dependence of yi on past samples of Y1i−1 and X1i is of the same order. These definitions and the estimation methods defined in the sequel can be easily extended to two different orders. Moreover, in (14) we implicitly assume i−1 i−1 that given (Yi−m , Xi−m ), yi is independent of Xi which reflects a setting where Xi and Yi are simultaneously measured. A2) The entropy of the first sample y1 exists, i.e., |h(Y1 )| < ∞. A3) The following conditional entropy exists: |h(Ym+1 |Y1m , X1m )| < ∞. Assumptions A2) and A3) are required to mathematically insure that the DI rate exists and is equal to a simple expression that depends on the finite memory length m. Moreover, Assumptions A2) and A3) prevent the degenerate case of deterministic Y1 or deterministic relationship between Ym+1 and Y1m , X1m (this is one of the scenarios discussed in [6]). Under these assumptions, [7, Lemmas 3.1 and 3.2] imply that I(X → Y) exists and is equal to: i−1 i−1 I(X → Y) = I(Xi−m ; Yi |Yi−m ), i > m, (15) In view of (15), I(X → Y) can be given the following interpretation: Given the past of the sequence Y , namely Y1i−1 , how much the past of the sequence X, namely helps in predicting the next sample of Y , Yi ? It can be observed that (15) is a function of m, the Markov order. When one is interested in a data-driven estimator of the DI, m is unknown and must be estimated from the observed sequences. X1i−1 , 4.2 Estimating the Markov Order m While it is a reasonable assumption that the observed time-series have finite memory and thus obey a Markov model, the order m should be estimated from the data. A possible approach for estimating m is to choose the value that facilitates the best prediction of future samples (see [24] and references therein). Specifically, let M be a (finite) set of candidate Markov orders. m̂ is estimated to be the value in this set that minimizes a pre-defined loss function in predicting the next sample of Y1N from m̂ previous samples. While in [5] it was proposed to use the prediction method of [25], i.e., use k-NN prediction of the next sample in Y1N based on the past samples of Y1N , this approach ignores the dependency between Y1N and X1N . To account for this dependency, we propose to predict the next sample of Y1N based on the past m̂ samples of both Y1N and X1N . i−1 i−1 Let ϕ : R2M → R be a prediction function that predicts Yi+1 from (Yi−m , Xi−m ). To measure the quality of prediction we use the `2 -loss (or distance), e.g., mean-square-error. Thus, the model order is estimated via:  i−1 i−1 m̂ = argmin E d2 (Yi+1 , ϕ((Yi−m , Xi−m )) , (16) m∈M 6 Figure 1: 3-NN prediction. Illustration of 3-NN prediction of y4 , assuming m = 3. where the expectation averages over everything that is random, and can be approximated via averaging. Note that any prediction method can be used in (16). In fact, in [24] it was proposed to use an ensemble of predictors in order to increase the prediction power. Yet, this comes at the cost of much higher computational complexity. Moreover, the numerical study in [24] indicates that when the Markov order m is small, k-NN is a very efficient predictor that out-performs significantly more complicated models such as support-vector-regression and regression based on non-linear terms. On the other hand, when m is large (and N is fixed), k-NN suffers from the curse of dimensionality [26, Section 6.3] and performs poorly. Note that, as stated in [27, Sec. V.E], the number of samples required for accurate estimation of DI grows exponentially with the Markov order m (this follows as increasing m can be viewed as increasing the state space). Therefore, as in many practical settings the number of samples is limited [7, 28, 29], we focus on settings where m is relatively small.3 . Fig. 1 illustrates the procedure for estimating y4 , for k = 3 and m = 3. The estimator first finds the k = 3 tuples that are nearest to the tuple (x1 , x2 , x3 , y1 , y2 , y3 ). Each of these tuples has a response variable; y12 , y13 and y20 in Fig. 1. These responses are used to predict y4 , resulting in the loss δ4 . Note that instead of averaging one can use weighted averaging based on the distances from (x1 , x2 , x3 , y1 , y2 , y3 ). This procedure is repeated for every tuple (note that we do not search NN among the tuples that overlap with the current tuple). The calculated loss values δi are averaged resulting in ∆m , m ∈ M. This procedure is repeated for all m ∈ M, and the value that minimize the average loss is declared as m̂. Next, we discuss the estimation of the DI measure, while assuming that the Markov order m was correctly estimated. 4.3 Estimating Directed Information i−1 i−1 To simplify the notation we let Xi− , Xi−m denote the past of Xi , and Yi− , Yi−m denote the past of Yi . Using this notation, we write (15) as: i−1 i−1 I(X → Y) = I(Xi−m ; Yi |Yi−m ) = h(Y, Y − ) − h(Y − ) − h(Y, Y − , X − ) + h(Y − , X − ). (17) 3 When this does not hold one can either down-sample the observed sequences or decimate (Y i−1 , X i−1 ) when estii−m i−m mating the DI, see the discussion in [7] 7 4.3.1 The KSG Estimator We begin with an estimator that extends the approach used to estimate MI in (6). This estimator was presented in [5] for estimating the TE measure. Let ρk,i,p (X − , Y − , Y ) denote the distance from the tuple (Xi− , Yi− , Yi ) to its k-NN. In the following we refer to this distance as ρk,i,p . Recalling that the dimensions of Xi− and Yi− are m, we note that ρk,i,p is calculated in a space with dimension 2m + 1. Similarly to (7), the individual entropies are estimated using ρk,i,p , the distance calculated in the largest space (Xi− , Yi− , Yi ). The resulting estimators of the individual entropy terms are then given by: ĥKSG (Y − ) = ĥKSG (Y − , Y ) = N X  1 log N + log cm,∞ + m log ρk,i,∞ − ψ(nY − ,i,∞ + 1) N − m i=m+1 (18a) N X 1 log N + log(cm,∞ · c1,∞ ) N − m i=m+1 + (m + 1) log ρk,i,∞ − ψ(n(Y − ,Y ),i,∞ + 1) ĥKSG (Y − , X − ) =  N X 1 log N + log(cm,∞ · cm,∞ ) N − m i=m+1 + 2m log ρk,i,∞ − ψ(n(Y − ,X − ),i,∞ + 1) ĥKSG (Y − , X − , Y ) = (18b)  (18c) N X 1 log N + log(cm,∞ · cm,∞ · c1,∞ ) N − m i=m+1  + (2m + 1) log ρk,i,∞ − ψ(k) . (18d) Combining the entropy estimators in (18) we obtain: IˆKSG (X → Y) = ψ(k)+ N X  1 ψ(nY − ,i,∞ +1)−ψ(n(Y − ,Y ),i,∞ +1)−ψ(n(Y − ,X − ),i,∞ +1) . (19) N −m i=m+1 Similarly to the KSG estimator for MI in (6), the joint entropy h(Y − , X − , Y ) is estimated using the KL estimator, see (18d), while the other entropy terms are estimated using sample dependent expressions, see (18a)–(18c). 4.3.2 The GOV Estimator The second DI estimator extends the approach used to estimate MI in (11). Following the steps leading to (4) and (10), we obtain the following estimators: N X  1 ĥGOV (Y ) = log N +log cm,2 +m log ρk,i,2 −log(nY − ,i,2 ) N −m i=m+1 − ĥGOV (Y − , Y ) = N X  1 log N +log(cm+1,2 )+(m+1) log ρk,i,2 −log(n(Y − ,Y ),i,2 ) N −m i=m+1 8 (20a) (20b) N X  1 ĥGOV (Y , X ) = log N +log(c2m,2 )+2m log ρk,i,2 −log(n(Y − ,X − ),i,2 ) N −m i=m+1 − − ĥGOV (Y − , X − , Y ) = N X  1 log N +log(c2m+1,2 )+(2m+1) log ρk,i,2 −ψ(k) . N −m i=m+1 (20c) (20d) Combining the entropy estimators in (20) we obtain: cm+1,2 · c2m,2 IˆGOV (X → Y) = ψ(k)+log c2m+1,2 · c1,2 + 4.3.3 N X  1 log(nY − ,i,2 )−log(n(Y − ,Y ),i,2 )−log(n(Y − ,X − ),i,2 ) . N −m i=m+1 (21) On the Statistical Significance of the Estimated DI Since I(X → Y) is estimated from a finite number of samples, one may want to assess the statistical significance of this estimation. A lack of statistical significance may imply that there is no causal influence between the underlying random processes, and the estimated values are due to either noise or estimation error. In such a case one may choose to set the estimated DI to zero. While for estimating GC there are known methods for quantifying the statistical significance via the respective null-distribution [30, Sec. 2.5], the null-distribution is not known for non-parametric estimation of DI from continuous alphabet sequences. An alternative method for evaluating the statistical significance is via a non-parametric bootstrapping procedure in the spirit of [31]. Specifically, the idea is to randomly shuffle and re-sample X1N such that the causal interactions from X to Y are destroyed (Y is not changed). We repeat this shuffle and re-sample procedure L times and for each l ∈ {1, 2, . . . , L} we estimate the DI I(X(l) → Y), where X(l) denotes the shuffled sequence. Since this construction destroys the causal influence, the L new estimated DI values are assumed to be taken from the null-distribution of no causal influence. The statistical significance is then determined by the resulting P-value with parameter εp . Finally, we note that the main drawback of such a bootstrapping procedure is the significant increase in computational complexity, since applying such a procedure amounts to multiplying the computational complexity by a factor of at least 20 (for the common value of εp = 0.05). 4.3.4 The JVHW Estimator The above KSG and GOV estimators allow for a continuous input alphabet. A different approach is to first quantize the observed sequences into only a few bins in order to estimate an empirical probability mass functions (PMFs), and then estimate the DI from these PMFs. Such an estimator was developed by Jiao, Venkat, Han, and Weissman (JVHW) [32], based on min-max optimal estimation of the entropy of discrete distributions [27]. Specifically, the estimator uses the relationship (17) to independently estimate each of the entropy terms. Its main advantages are the proven optimality in estimating the entropy terms (of the discrete distributions) as well as its linear time complexity (in contrast to the universal estimators detailed in [33]). On the other hand, when the number of available samples is small, quantizing the input sequences can lead to significant performance degradation (see the numerical study in Section 5). To quantize the observed sequences one may use the optimal Lloyd-Max scalar quantizer. Our numerical study showed that when the cardinality of the discrete alphabet is large enough, Lloyd-Max quantization yields performance very similar to a naive quantization based on equal-size bins.4 4 Here we assumed that the probability of observing samples with very large magnitude is negligible. 9 To evaluate the statistical significance of the estimated values we use the same bootstrapping procedure discussed in the previous section. Note that while for discrete-alphabet samples the work [34] derived the asymptotic (N → ∞) null-distribution, this result may not be used when the number of samples is small. 5 Numerical Study In this section we examine the performance of the discussed estimators in several simulated scenarios. We also consider an estimation of the GC via the toolbox [30]. This is motivated by the fact that GC is widely used to quantify causal influence, and in particular when X and Y are generated through a multivariate auto-regressive process, then GC is equal to twice the DI [35]. We consider linear as well as non-linear scenarios, where some of the scenarios were taken from [7], and focus on the regime where N is at the order of few thousands (in contrast to [7] that focused on the case of N = 105 ). Relatively small values of N are motivated by practical applications where the number of samples is limited, e.g., [28, 36]. Our simulation results indicate that the discussed k-NN estimators (KSG and GOV) achieve roughly the same accuracy as the estimator presented in [7], but with an order of magnitude less samples. 5.1 Linear Interaction Let xi , zi , i = 1, 2, . . . , N , be i.i.d. zero-mean and unit-variance Gaussian RVs, where xi is independent of zi . We generate the sequence {yi }N i=1 via: yi = β1 xi−1 + β2 xi−2 + zi , 0 ≤ β ≤ 1. (22) Observe that in (22) X causally influence Y while Y has no causal influence on X. As was shown in [7, Appendix B], when β1 , β2 6= 0 then I(X → Y) is given by:   2  β1 + β22 + 1 1 −1 . (23) I(X → Y) = log2 (e) log (|β1 β2 |) + cosh 2 2|β1 β2 |  When β1 = 0, β2 6= 0, then I(X → Y) = 21 log2 1 + β22 , and when β1 6= 0, β2 = 0, then I(X → Y) = 21 log2 1 + β12 . Here, the DI is measured in bits. Fig. 2 depicts the mean of the estimated DIs versus the value of β1 , for β2 = β1 and for β2 = 1 − β1 , where β1 ∈ {0, 0.1, . . . , 1}. The DI values were estimated from N = 3000 samples, and the mean was calculated over 48 independent (with different random generator seeds) trials. For both plots in Fig. 2, the average standard deviation for the GC estimator is about 0.01 for I(X → Y) and 0.0006 for I(Y → X); the average standard deviation for the JVHW estimator is about 0.05 for I(X → Y) and 0.03 for I(Y → X); the average standard deviation for the KSG estimator is about 0.02 for I(X → Y) and 0.006 for I(Y → X); and, the average standard deviation for the GOV estimator is about 0.02 for I(X → Y) and 0.002 for I(Y → X). The statistical significance of the estimated values was evaluated using the approach discussed in Section 4.3.3 (for the GC estimates we used the null-distribution as stated in [30, Sec. 2.5]). For β2 = β1 and I(X → Y), when β1 ≥ 0.5, all the estimators yield significant estimations in all trials. While the GC estimator yield significant estimations in all trials when β1 ≥ 0.1, the KSG and GOV estimators yield significant estimations in all trials when β1 ≥ 0.3. For β1 = 0.1 and β1 = 0.2 the KSG and GOV estimators yield significant estimations in about 20% and 90% of the trials, respectively. The significance of the JVHW estimator gradually increases to 100% in the range 0 ≤ β1 ≤ 0.5. For β2 = β1 and I(X → Y), as the true DI values are relatively large, all the estimators yield significant estimations in all the trials. 10 0.6 0.8 Theory X → Y JVHW X → Y JVHW Y → X 2GC X → Y 2GC Y → X KSG X → Y KSG Y → X GOV X → Y GOV Y → X Average DI 0.6 0.5 0.5 0.4 Average DI 0.7 Theory X → Y JVHW X → Y JVHW Y → X 2GC X → Y 2GC Y → X KSG X → Y KSG Y → X GOV X → Y GOV Y → X 0.4 0.3 0.3 0.2 0.2 0.1 0.1 0 0 0.2 0.4 β1 0.6 0.8 0 1 (a) 0 0.2 0.4 β1 0.6 0.8 1 (b) Figure 2: Average DI estimates versus β1 for the interaction (23), N = 3000. Four quantization levels are used in the JVHW estimator. In the KSG and GOV estimators K = 8. In sub-figure (a) β2 = β1 while in sub-figure (b) β2 = 1 − β1 . Comparing the estimation results in Fig. 2 to the estimation results reported in [7, Fig. 2], one can observe that the curves are very similar (KSG and GOV versus the KDE estimator of [7]). Yet, there is a fundamental difference between the estimators: in [7, Fig. 2] the number of samples is N = 105 , while in the above Fig. 2 the number of samples is N = 3000. Thus, in the considered scenario, to achieve the same accuracy the KSG and GOV estimators require an order of magnitude less samples compared to the KDE estimator. To explore the performance of the discussed estimators when N is larger, we repeated the experiment specified in (22) when N = 20000, and β2 = β1 . The results are depicted in Fig. 3. Observing Fig. 3a we note that the accuracy of the KSG and GOV estimator is significantly higher (compared to Fig. 2) when β1 ≥ 0.4. Moreover, the standard deviations of the estimated values are smaller by about an order of magnitude. On the other hand, for 0.1 ≤ β1 ≤ 0.3, one can observe an apparent bias. This bias is due to an inaccurate estimation of the Markov order. When β1 ≤ 0.3 the noise level is significantly higher than the signal level and the estimation method discussed in Section 4.2 under estimates the true Markov order. To verify this observation, in Fig. 3b we present the average estimated DI, for the KSG estimator, and for several alternatives for the Markov order estimation: • The approach discussed in Section 4.2. The corresponding curve is denoted by “Baseline”. • The approach proposed in [25] where a k-NN estimator is used to estimate the Markov order based only on the past samples of Y, ignoring the past samples of X. The corresponding curve is denoted by “Ragwitz”. • Fixing the Markov order to the correct order according to (22), i.e., setting m = 2. The corresponding curve is denoted by “m = 2”. • Setting the Markov order to m = 4. The corresponding curve is denoted by “m = 4”. It can be observed that the method by [25] performs much worse than the method discussed in Section 4.2. In fact, the curve corresponding to the “Ragwitz” method is almost identical to a curve generated by setting m = 1. Setting m = 2, the true order, leads to almost no errors comparing to the theoretical values. Finally, setting m = 4 works better for small values of β1 (when the problem 11 0.7 0.5 0.4 0.5 0.3 0.4 0.3 0.2 0.2 0.1 0.1 0 0 0.2 Theory X → Y m = 2, X → Y m = 2, Y → X Baseline X → Y Baseline Y → X Ragwitz X → Y Ragwitz Y → X m = 4, X → Y m = 4, Y → X 0.6 Average DI 0.6 Average DI 0.7 Theory X → Y JVHW X → Y JVHW Y → X 2GC X → Y 2GC Y → X KSG X → Y KSG Y → X GOV X → Y GOV Y → X 0.4 β1 0.6 0.8 0 1 0 0.2 (a) 0.4 β1 0.6 0.8 1 (b) Figure 3: Average DI estimates versus β1 for the interaction (22), N = 20000. Six quantization levels are used in the JVHW estimator. In the KSG and GOV estimators K = 8. (a) Average estimated DI of the JVHW, GC, KSG, and GOV estimators, when β2 = β1 . (b) Average estimated DI, of the KSG estimator with different Markov order estimation methods, when β2 = β1 of estimating the Markov order is very challenging), yet a significant performance degradation can be observed for larger values of β1 . 5.2 Quadratic Interaction Next, we consider a quadratic dependency between X and Y. Again, we let xi , zi , i = 1, 2, . . . , N be i.i.d. zero-mean and unit-variance Gaussian RVs, where xi is independent of zi . We generate the sequence {yi }N i=1 via: yi = β1 x2i−1 + β2 x2i−2 + zi . (24) A similar model was studied in [7, Sec. V.B]. Similarly to Section 5.1, we consider two scenarios: β2 = β1 and β2 = 1 − β1 . When β2 = β1 we expect I(X → Y) to increase monotonically with β1 , and when β2 = 1 − β1 we expect to observe a “U” shape as in Fig. 2b. Similarly to Fig. 2 there should be no causal influence from Y to X. We note that calculating the theoretical DI values of this model seems intractable. Fig. 4 depicts the mean of the estimated DIs versus the value of β1 , for β2 = β1 and for β2 = 1 − β1 . N = 3000 samples were used to estimated the DI values. The mean values reported in Fig. 4 were calculated over 48 independent trials. Similarly to the linear scenario, for both plots the average standard deviation for the GC estimator is about 0.001 for I(X → Y) and 0.0008 for I(Y → X); the average standard deviation for the JVHW estimator is about 0.04 for I(X → Y) and 0.03 for I(Y → X); the average standard deviation for the KSG estimator is about 0.02 for I(X → Y) and 0.006 for I(Y → X); and, the average standard deviation for the GOV estimator is about 0.02 for I(X → Y) and 0.002 for I(Y → X). Except the GC estimator, the statistical significance is also similar to the linear scenario. It can be observed that as expected when β2 = β1 , the estimated DI monotonically increases with β1 . Moreover, the results are similar to [7, Fig. 3], again with the exception that significantly smaller number of samples was used for estimation (N = 3000 versus N = 105 ). Finally, Fig. 4 indicates that the JVHW estimator is able to capture the causal influence from X to Y, although the estimated values are smaller than those estimated 12 0.6 0.6 JVHW X → Y JVHW Y → X 2GC X → Y 2GC Y → X KSG X → Y KSG Y → X GOV X → Y GOV Y → X Average DI 0.4 0.5 0.4 Average DI 0.5 0.3 0.3 0.2 0.2 0.1 0.1 0 0 0.2 JVHW X → Y JVHW Y → X 2GC X → Y 2GC Y → X KSG X → Y KSG Y → X GOV X → Y GOV Y → X 0.4 β1 0.6 0.8 0 1 0 0.2 0.4 0.6 0.8 1 β1 (a) (b) Figure 4: Average DI estimates versus β1 for the interaction (24), N = 3000. Four quantization levels are used in the JVHW estimator. In the KSG and GOV estimators K = 8. In sub-figure (a) β2 = β1 while in sub-figure (b) β2 = 1 − β1 . by the k-NN estimators. On the other hand, as expected and as indicated in [7], GC is not able to capture the causal influence from X to Y. This follows as GC is based on a linear model while (24) obeys a quadratic one. Next, we discuss two non-linear coupling maps that were discussed in [37]. 5.3 Noisy Hénon Map We first study a model that consists of unidirectional coupling via the Hénon map [38]. Let x̃j , ỹj ∼ U(0, 1), j = 1, 2, and let Ñ = 105 + 3000. We generate the sequence {ỹi , x̃i }Ñ i=3 via: x̃i+2 = 1.4 − x̃2i+1 + 0.3x̃i , ỹi+2 = 1.4 − (β x̃i+1 + (1 − β)ỹi+1 )ỹi+1 + 0.3ỹi , (25) for 0 ≤ β ≤ 1. Next, let zx,i , zy,i , i = 1, 2, . . . , Ñ be i.i.d. zero-mean and unit-variance Gaussian RVs, where zx,i is independent of zy,i . We generate the sequence {yi , xi }Ñ i=1 via: yi = ỹi + γ · zy,i , xi = x̃i + γ · zx,i , (26) where γ is a gain parameter that sets the signal-to-noise-ratio. The DI is estimated from the last N = 3000 samples of the sequences {yi , xi }. We first note that in (25) the parameter β controls the strength of coupling between the two sequences. Moreover, (25) indicates that X causally influences Y, and this influence should increase with β. On the other hand, based on (25) we do not expect any causal influence from Y to X. As discussed in [37], for the noiseless scenario, namely γ = 0, when β > 0.7, then X and Y are fully synchronized and the two sequences are indistinguishable. Thus, in this case the causal flow of information is zero. Fig. 5a, that considers the almost noiseless setting,5 indicates that the KSG estimator indeed estimates an increasing causal influence from X to Y for β < 0.7. Moreover, this causal influence drops to almost zero when β is increased beyond 0.7, indicating on the (almost) 5 Here we do not set γ to exactly zero in order not to violate Assumption A3), and to prevent numerical instabilities when estimating GC. 13 1.4 1 JVHW X → Y JVHW Y → X 2GC X → Y 2GC Y → X KSG X → Y KSG Y → X GOV X → Y GOV Y → X 0.5 0.4 Average DI 1.2 Average DI 0.6 JVHW X → Y JVHW Y → X 2GC X → Y 2GC Y → X KSG X → Y KSG Y → X GOV X → Y GOV Y → X 0.8 0.6 0.3 0.2 0.4 0.1 0.2 0 0 0.2 0.4 β 0.6 0.8 0 1 0 0.2 (a) 0.4 β 0.6 0.8 1 (b) Figure 5: Average DI estimates versus β for the interaction (25)–(26), N = 3000. Four quantization levels are used in the JVHW estimator. In the KSG and GOV estimators K = 8. (a) γ = 0.001. (b) γ = 0.3. deterministic relationship between X and Y. This result is in full correspondence to [37, Figs. 2a and 2b]. Fig. 5a also indicates that the KSG estimator correctly infers a negligible causal influence from Y to X for all values of β. It can further be observed from Fig. 5a that the curve corresponding to the GOV estimator is biased, and that the JVHW estimator misses the drop in causal influence for β > 0.7. In Fig. 5a we consider the case of γ = 0.3. It can be observed that for the KSG estimator the results are similar to the case of γ = 0.001, with the exception that the DI, in both directions, is significantly larger than zero for β > 0. This exactly matches the desired behavior as indicated in [37, Figs. 4a and 4b]. For this setting, the GOV estimator seems to be less biased, while the JVHW still misses the decrease in causal influence for β > 0.7. Finally, we note that for both γ = 0.001 and γ = 0.3, GC fails to infer any significant causal influence from X to Y or from Y to X. 5.4 Sigmoid Coupling In this sub-section we discuss a scenario where X drives Y through a sigmoid function [37, Sec. E], defined as: Sigmoid(θ) = 1 . 1 + exp{−θ} Let x1 , y1 ∼ U(0, 1). We generate the sequence {yi , xi }N i=2 via: 25xi + 2 cos(1.2 · i) + zx,i , 4(x2i + 1)  = 0.1yi2 − β Sigmoid(xi )2 − 0.3 + zy,i , xi+1 = 0.125xi + yi+1 (27) where 0 ≤ β ≤ 1, and zx,i , zy,i , i = 2, 3, . . . , N , are i.i.d. zero-mean and unit-variance Gaussian RVs (zx,i is independent of zy,i ). (27) indicates that X causally influences Y, and this influence should increase with β. On the other hand, based on (27) we do not expect any causal influence from Y to X. 14 0.1 JVHW X → Y JVHW Y → X 2GC X → Y 2GC Y → X KSG X → Y KSG Y → X GOV X → Y GOV Y → X 0.09 0.08 AverageDI 0.07 0.06 0.05 0.04 0.03 0.02 0.01 0 0 0.2 0.4 β 0.6 0.8 1 Figure 6: Average DI estimates versus β for the interaction (27), N = 3000. Four quantization levels are used in the JVHW estimator. In the KSG and GOV estimators K = 8. Fig. 6 depicts the average estimated DI versus β. It can be observed that for all four estimators ˆ to Y) increases with β. We note here that the curve (KSG, GOV, GC, and JVHW) the average I(X corresponding to the GC estimator is somewhat surprising as the interaction (27) is clearly nonˆ linear. When examining the average I(Y to X) it can be observed that both GOV and JVHW find a non-negligible causal influence (which does not exist according to (27) and [37, Sec. E]). On the other hand, the KSG estimator estimates a negligible amount of causal influence from Y to X. Thus, the KSG estimator is the only one to follow the expected results as indicated in [37, Figs. 11a and 11c]. References [1] K. Hlavackova-Schindler, M. Palus, M. Vejmelka, and J. Bhattacharya, “Causality detection based on information-theoretic approaches in time series analysis,” Physics Reports, vol. 441, pp. 1–46, 2007. [2] C. W. J. Granger, “Investigating causal relations by econometric models and cross-spectral methods,” Econometrica, vol. 37, no. 3, pp. 424–438, 1969. [3] J. L. Massey, “Causality, feedback, and directed information,” in Proc. Int. Symp. Inf. Theory Appl., Waikiki, HI, USA, 1990, pp. 303–305. [4] G. Kramer, “Directed information for channels with feedback,” Ph.D. dissertation, Swiss Federal Institute of Technology, 1998. [5] M. Wibral, R. Vicente, and M. Lindner, “Transfer entropy in neuroscience,” Directed Information Measures in Neuroscience, Understanding Complex Systems, pp. 3–36, 2014. [6] D. Janzing, D. Balduzzi, M. Grosse-Wentrup, and B. Scholkopf, “Quantifying causal influences,” The Annals of Statistics, vol. 41, no. 5, pp. 2324–2358, 2013. 15 [7] R. Malladi, G. Kalamangalam, N. Tandon, and B. Aazhang, “Identifying seizure onset zone from the causal connectivity inferred using directed information,” IEEE Jour. of Sel. Topics in Sig. Proc., vol. 10, no. 7, pp. 1267–1283, 2016. [8] S. Sabesan, L. B. Good, K. S. Tsakalis, A. Spanias, D. M. Treiman, and L. D. Iasemidis, “Information flow and application to epileptogenic focus localization from intracranial eeg,” IEEE Trans. Neural Syst. Rehabil. Eng., vol. 17, no. 3, pp. 244–253, 2009. [9] T. M. Cover and J. A. Thomas, Elements of Information Theory 2nd Edition, 2nd ed. Interscience, 2006. Wiley- [10] Q. Wang, S. R. Kulkarni, and S. Verduú, “Universal estimation of information measures for analog sources,” Foundations and Trends in Communications and Information Theory, vol. 5, no. 3, pp. 265–353, 2008. [11] Y. Moon, B. Rajagopalan, and U. Lall, “Estimation of mutual information using kernel density estimators,” Physical Review E, vol. 52, no. 3, pp. 2318–2321, 1995. [12] P. Grassberger and I. Procaccia, “Measuring of strangeness of strange attractors,” Physica D, vol. 9, no. 1-2, pp. 189–208, 1983. [13] F. W. J. Olver, D. W. Lozier, R. F. Boisvert, and C. W. Clark, Eds., NIST Handbook of Mathematical Functions, 1st ed. Cambridge University Press, 2010. [14] X. Wang, “Volumes of generalized unit balls,” Mathematics Magazine, vol. 78, no. 5, pp. 390– 395, 2005. [15] L. F. 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. [16] A. Kraskov, H. Stögbauer, and P. Grassberger, “Estimating mutual information,” Physical Review E, vol. 69, no. 6, 2004. [17] W. Gao, S. Oh, and P. Viswanath, “Demystifying fixed k-nearest neighbor information estimators,” 2016, available at https://arxiv.org/abs/1604.03006. [18] D. Lederman and J. Tabrikian, “Classification of multichannel eeg patterns using parallel hidden markov models,” Medical & Biological Engineering & Computing, vol. 50, no. 4, pp. 319– 328, Apr. 2012. [19] T. Wissel, T. Pfeiffer, R. Frysch, R. T. Knight, E. F. Chang, H. Hinrichs, J. W. Rieger, , and G. Rose, “Hidden markov model and support vector machine based decoding of finger movements using electrocorticography,” Journal of Neural Engineering, vol. 10, no. 5, Oct. 2013. [20] C. Erlwein, “Applications of hidden markov models in financial modelling,” Ph.D. dissertation, Brunel University, 2008. [21] J. G. Dias, J. K. Vermunt, and S. Ramos, “Mixture hidden markov models in finance research,” Advances in Data Analysis, Data Handling and Business Intelligence, pp. 451–459, Jul. 2009. [22] T. A. B. Snijders, “The statistical evaluation of social network dynamics,” Sociological Methodology, vol. 31, no. 1, pp. 361–395, 2001. [23] C. Heaukulani and Z. Ghahramani, “Dynamic probabilistic models for latent feature propagation in social networks,” in Proc. 30th Int. Conf. Machine Learning, Atlanta, GA, USA, 2013, pp. 275–283. 16 [24] Y. Murin, A. Goldsmith, and B. Aazhang, “Estimating the memory order of electrocorticography recordings,” To be submitted to IEEE Transactions on Biomedical Engineering, 2017. [25] M. Ragwtiz and H. Kantz, “Markov models from data by simple nonlinear time series predictors in delay embedding spaces,” Physical Review E, vol. 65, no. 5, pp. 1–12, 2002. [26] T. Hastie, R. Tibshirani, and J. Friedman, The Elements of Statistical Learning, 2nd ed. Springer, 2009. [27] J. Jiao, K. Venkat, Y. Han, and T. Weissman, “Minimax estimation of functionals of discrete distributions,” IEEE Transactions on Information Theory, vol. 61, no. 5, pp. 2835–2885, May 2015. [28] Y. Murin, J. Kim, J. Parvizi, and A. Goldsmith, “Sozrank: A new approach for localizing the epileptic seizure onset zone,” Submitted to PLoS Comput. Biol., 2017. [29] Y. Murin, J. Kim, and A. Goldsmith, “Tracking epileptic seizure activity via information theoretic graphs,” in Asilomar Conference on Signals, Systems and Computers, Pacific Grove, CA, USA, 2016. [30] L. Barnett and A. Sheth, “The MVGC multivariate Granger causality toolbox: A new approach to Granger-causal inference,” Journal of Neuroscience Methods, vol. 223, pp. 50–68, 2014. [31] C. Diks and J. DeGoede, A general nonparametric bootstrap test for Granger causality. Institute of Physics Publishing, 2001, in Global Analysis of Dynamical Systems. [32] “The Jiao–Venkat–Han–Weissman (JVHW) shannon entropy, renyi entropy, and mutual information estimator,” http://web.stanford.edu/∼tsachy/index jvhw.html, accessed: 2017-0913. [33] J. Jiao, H. H. Permuter, L. Zhao, Y.-H. Kim, and T. Weissman, “Universal estimation of directed information,” IEEE Transactions on Information Theory, vol. 59, no. 10, pp. 6220–6242, Oct. 2013. [34] I. Kontoyiannis and M. Skoularidou, “Estimating the directed information and testing for causality,” IEEE Transactions on Information Theory, vol. 62, no. 11, pp. 6053–6067, Nov. 2016. [35] N. Soltani, Inferring signaling structures in the brain via directed information. Doctoral Thesis, Stanford University, 2015. [36] T. Diamandis, Y. Murin, and A. Goldsmith, “Ranking causal influence of financial markets via directed information graphs,” in 52nd Annual Conference on Information Sciences and Systems, Princeton, NJ, USA, 2018, to be submitted to. [37] K. Ishiguro, N. Otsu, M. Lungarella, and Y. Kuniyoshi1, “Comparison of nonlinear granger causality extensions for low-dimensional systems,” Physical Review E, vol. 77, no. 3, 2008. [38] M. Hénon, “A two-dimensional mapping with a strange attractor,” Communications in Mathematical Physics, vol. 50, no. 1, pp. 69–77, 1976. 17
7cs.IT
Message Passing and Combinatorial Optimization by Siamak Ravanbakhsh A thesis submitted in partial fulfillment of the requirements for the degree of Doctor of Philosophy Department of Computing Science University of Alberta c Siamak Ravanbakhsh, 2015 Abstract Graphical models use the intuitive and well-studied methods of graph theory to implicitly represent dependencies between variables in large systems. They can model the global behaviour of a complex system by specifying only local factors.This thesis studies inference in discrete graphical models from an “algebraic perspective” and the ways inference can be used to express and approximate NP-hard combinatorial problems. We investigate the complexity and reducibility of various inference problems, in part by organizing them in an inference hierarchy. We then investigate tractable approximations for a subset of these problems using distributive law in the form of message passing. The quality of the resulting message passing procedure, called Belief Propagation (BP), depends on the influence of loops in the graphical model. We contribute to three classes of approximations that improve BP for loopy graphs (I) loop correction techniques; (II) survey propagation, another message passing technique that surpasses BP in some settings; and (III) hybrid methods that interpolate between deterministic message passing and Markov Chain Monte Carlo inference. We then review the existing message passing solutions and provide novel graphical models and inference techniques for combinatorial problems under three broad classes: (I) constraint satisfaction problems (CSPs) such as satisfiability, coloring, packing, set / clique-cover and dominating / independent set and their optimization counterparts; (II) clustering problems such as hierarchical clustering, K-median, K-clustering, K-center and modularity optimization; (III) problems over permutations including (bottleneck) assignment, graph “morphisms” and alignment, finding symmetries and (bottleneck) traveling salesman problem. In many cases we show that message passing is able to find solutions that are either near optimal or favourably compare with today’s state-of-the-art approaches. ii To the memory of my grandparents. iii Acknowledgements Many have helped me survive and grow during my graduate studies. First, I would like to thank my supervisor Russell Greiner, for all I have learned from him, most of all for teaching me the value of common sense in academia and also for granting me a rare freedom in research. During these years, I had the chance to learn from many great minds in Alberta and elsewhere. It has been a pleasure working with David Wishart, Brendan Frey, Jack Tuszynski and Barnabás Póczos. I am also grateful to my committee members, Dale Schuurmans, Csaba Szepesvári, Mohammad Salavatipour and my external examiner Cristopher Moore for their valuable feedback. I have enjoyed many friendly conversations with colleagues: Babak Alipanahi, Nasimeh Asgarian, Trent Bjorndahl, Kit Chen, Andrew Delong, Jason Grant, Bret Hoehn, Sheehan Khan, Philip Liu, Alireza Makhzani, Rupasri Mandal, James Neufeld, Christopher Srinivasa, Mike Wilson, Chun-nam Yu and others. I am thankful to my friends: Amir, Amir-Mashoud, Amir-Ali, Amin, Arash, Arezoo, Azad, Babak(s), Fariba, Farzaneh, Hootan, Hossein, Kent, Kiana, Maria, Mariana, Meys, Meysam, Mohsen, Mohammad, Neda, Niousha, Pirooz, Sadaf, Saeed, Saman, Shaham, Sharron, Stuart, Yasin, Yavar and other for all the good time in Canada. Finally I like to thank my family and specially Reihaneh and Tare for their kindness and constant support. Here, I acknowledge the help and mental stimulation from the playful minds on the Internet, from Reddit to stackexchange and the funding and computational/technical support from computing science help desk, Alberta Innovates Technology Futures, Alberta Innovates Center for Machine Learning and Compute Canada. iv Contents Abstract ii Acknowledgements iv Contents v List of tables x List of figures xi General notation xii Introduction I 1 Contributions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Inference by message passing 6 1 Representation, complexity and reducibility 8 1.1 The problem of inference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 1.2 The inference hierarchy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 1.2.1 Single marginalization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 1.2.2 Complexity of general inference classes . . . . . . . . . . . . . . . . . . . . . . . . 18 1.2.3 Complexity of the hierarchy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 Polynomial-time inference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 1.3 v 1.4 Reductions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 1.4.1 Marginalization and integration . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 Marginalization reduces to integration . . . . . . . . . . . . . . . . . . . . . . . . 26 Integration reduces to marginalization . . . . . . . . . . . . . . . . . . . . . . . . 27 Min-max reductions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 Min-max reduces to min-sum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 Min-max reduces to sum-product . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 1.4.2 2 Approximate inference 2.1 2.2 Belief Propagation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 2.1.1 Computational Complexity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 2.1.2 The limits of message passing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 Tractable factors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 2.2.1 Sparse factors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 K of N factors for sum-product . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 K of N factors for min-sum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 Large number of constraint factors . . . . . . . . . . . . . . . . . . . . . . . . . . 42 Inference as optimization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 2.3.1 Sum-product BP and friends . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 2.3.2 Min-sum message passing and LP relaxation . . . . . . . . . . . . . . . . . . . . 46 2.3.3 Min-max and other families . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 Loop corrections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 2.4.1 Short loops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 2.4.2 Long loops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 2.4.3 Both message dependencies and short loops . . . . . . . . . . . . . . . . . . . . . 52 Message region-graphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 Experiments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 Grids . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 2.2.2 2.3 2.4 34 2.4.4 vi 2.5 2.6 Regular Graphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 Survey Propagation: semirings on semirings . . . . . . . . . . . . . . . . . . . . . . . . . 56 2.5.1 Decomposition of the integral . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 2.5.2 The new factor-graph and semiring . . . . . . . . . . . . . . . . . . . . . . . . . . 62 2.5.3 The new integral and marginals . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 2.5.4 Counting survey propagation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 Messages and particles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 2.6.1 Markov Chain Monte Carlo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 Metropolis-Hasting Algorithm and Gibbs sampling . . . . . . . . . . . . . . . . . 67 2.6.2 Hybrid methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 2.6.3 Perturbed Belief Propagation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 Combining the operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 Experiments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 Perturbed survey propagation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 2.6.4 II Combinatorial problems 73 3 Constraint satisfaction 3.1 75 Phase transitions in random CSPs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79 3.1.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81 Revisiting survey propagation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81 3.2.1 Flavours of SP-guided decimation . . . . . . . . . . . . . . . . . . . . . . . . . . 82 3.2.2 Computational Complexity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 3.2.3 Perturbed survey propagation for CSP . . . . . . . . . . . . . . . . . . . . . . . . 83 3.3 Satisfiability and coloring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84 3.4 Clique-cover problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 3.5 Dominating set and set cover . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88 3.5.1 89 3.2 Pitfalls of decimation Factor-graph and complexity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii 3.6 3.7 Clique problem, independent set and sphere packing . . . . . . . . . . . . . . . . . . . . 90 3.6.1 Binary variable factor-graph . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91 3.6.2 Categorical variable factor-graph . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 3.6.3 Efficient Sphere packing with Hamming distance . . . . . . . . . . . . . . . . . . 95 Optimization variations of CSPs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98 4 Clustering 4.1 K-medians . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 4.1.1 4.2 100 Facility location problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101 Hierarchical clustering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102 4.2.1 Spanning and Steiner trees . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102 4.3 K-clustering problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103 4.4 K-center problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104 4.5 Modularity maximization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106 4.5.1 The Potts model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 4.5.2 Clique model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 Factor-graph representation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 Simplified message update and augmentation . . . . . . . . . . . . . . . . . . . . 109 Experiments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109 5 Permutations 5.1 5.2 112 Matching and permanent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112 5.1.1 Factor-graph and complexity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113 5.1.2 Arbitrary graphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114 Traveling salesman problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115 5.2.1 Augmentative approach . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116 Simplified messages Augmentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118 Experiments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120 viii 5.2.2 5.3 Using pairwise factors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121 Graph matching problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124 5.3.1 Sub-graph isomorphism . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124 5.3.2 Subgraph monomorphism and supermorphism 5.3.3 Graph homomorphism . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127 . . . . . . . . . . . . . . . . . . . 126 Reduction to other CSPs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129 5.3.4 Finding symmetries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129 5.3.5 Graph alignment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131 Conclusion 136 Future work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138 References 139 ix List of tables 2.1 The correspondence between BP and SP . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 3.1 Comparison of different methods for K-satisfiability and K-coloring. . . . . . . . . . . . 87 4.1 Comparison of different modularity optimization methods. . . . . . . . . . . . . . . . . . 110 5.1 Summary of message-passing solutions to combinatorial problems. . . . . . . . . . . . . 137 x List of figures 1.1 A factor-graph with variables as circles and factors as squares. . . . . . . . . . . . . . . 11 2.1 Belief Propagation on a loop-free factor-graph . . . . . . . . . . . . . . . . . . . . . . . . 35 2.2 Illustration of distributions used for loop correction. . . . . . . . . . . . . . . . . . . . . 51 2.3 An example for generalized loop correction method. . . . . . . . . . . . . . . . . . . . . 53 2.4 Run-time and accuracy at different levels of difficult for various loop correction methods. 57 2.5 Run-time versus accuracy over different problem sizes for various loop correction methods. 58 2.6 Survey propagation factor-graph. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 2.7 Comparison of marginalization accuracy for BP, Gibbs sampling and Perturbed BP. . . 71 3.1 Factor-graph and set of solutions for a simple 3-SAT problem. . . . . . . . . . . . . . . . 75 3.2 Comparison of perturbed BP and BP-dec on real-world benchmark CSPs. . . . . . . . . 79 3.3 A schematic view of phase transitions in rCSPs . . . . . . . . . . . . . . . . . . . . . . . 80 3.4 Condensation phase and perturbed BP’s behaviour. . . . . . . . . . . . . . . . . . . . . 81 3.5 comparison of different methods on K-satisfiability and K-coloring . . . . . . . . . . . . 85 3.6 An example of induced set cover and its factor-graph. . . . . . . . . . . . . . . . . . . . 88 3.7 Example of message passing for K-packing. . . . . . . . . . . . . . . . . . . . . . . . . . 93 3.8 The factor-graph for sphere-packing with Hamming distances, where the distance factors are white squares and z-factors are in black. . . . . . . . . . . . . . . . . . . . . . . . . . 96 4.1 experimental results for K-clustering. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104 4.2 The factor-graph for K-center clustering. . . . . . . . . . . . . . . . . . . . . . . . . . . . 105 xi 4.3 Experimental results for K-center clustering and min-max facility location. 4.4 Example of maximum Modularity clustering by message passing. . . . . . . . . . . . . . 110 5.1 The factor-graph for max-weighted matching . . . . . . . . . . . . . . . . . . . . . . . . 114 5.2 An example of application of augmentative message passing to solve TSP. . . . . . . . . 118 5.3 Experimental results for TSP using message passing on various benchmark instances. . . 119 5.4 Experimental results for bottleneck TSP. . . . . . . . . . . . . . . . . . . . . . . . . . . . 123 5.5 Quality of BP marginals and integral in graph endomorphism. . . . . . . . . . . . . . . . 128 5.6 Counter-example for relaxed conditions of conjecture 5.3.4. . . . . . . . . . . . . . . . . 130 5.7 An example of finding approximate symmetry using endomorphism marginals. . . . . . 131 5.8 An example of sparse graph matching by message passing. . . . . . . . . . . . . . . . . . 135 xii . . . . . . . 106 Introduction Many complicated systems can be modeled as a graphical structure with interacting local functions. Many fields have (almost independently) discovered this: graphical models have been used in bioinformatics (protein folding, medical imaging and spectroscopy, pedagogy trees, regulatory networks [27, 178, 224, 255, 323]), neuroscience (formation of associative memory and neuroplasticity [10, 65]), communication theory (low density parity check codes [106, 290]), statistical physics (physics of dense matter and spin-glass theory [211]), image processing (inpainting, stereo/texture reconstruction, denoising and super-resolution [98, 101]), compressed sensing [84], robotics [294] (particle filters), sensor networks [76, 143], social networks [203, 307], natural language processing [200], speech recognition [73, 131], artificial intelligence (artificial neural networks, Bayesian networks [244, 316]) and combinatorial optimization. This thesis is concerned with the application of graphical models in solving combinatorial optimization problems [122, 222, 287], which broadly put, seeks an “optimal” assignment to a discrete set of variables, where a brute force approach is infeasible. To see how the decomposition offered by a graphical model can model a complex system, consider a joint distribution over 200 binary variables. A naive way to represent this would require a table with 2200 entries. However if variables are conditionally independent such that their dependence structure forms a tree, we can exactly represent the joint distribution using only 200 × 22 values. Operations such as marginalization, which require computation time linear in the original size, are now reduced to local computation in the form of message passing on this structure (i.e., tree), which in this case, reduces the cost to linear in the new exponentially smaller size. It turns out even if the dependency structure has loops, we can use message passing to perform “approximate” inference. Moreover, we approach the problem of inference from an algebraic point of view [7]. This is in contrast to the variational perspective on local computation [303]. These two perspectives are to some extent “residuals” from the different origins of research in AI and statistical physics. In the statistical study of physical systems, the Boltzmann distribution relates the probability of each state of a physical system to its energy, which is often decomposed due to local interactions [208, 211]. These studies have been often interested in modeling systems at the thermodynamic limit of infinite variables and the average behaviour through the study of random ensembles. Inference techniques with this origin (e.g., mean-field and cavity methods) are often asymptotically exact under these assumptions. 2 Most importantly these studies have reduced inference to optimization through the notion of free energy –a.k.a. variational approach. In contrast, graphical models in the AI community have emerged in the study of knowledge representation and reasoning under uncertainty [245]. These advances are characterized by their attention to the theory of computation and logic [17], where interest in computational (as opposed to analytical) solutions has motivated the study of approximability, computational complexity [74, 267] and invention of inference techniques such as belief propagation that are efficient and exact on tree structures. Also, these studies have lead to algebraic abstractions in modeling systems that allow local computation [185, 279]. The common foundation underlying these two approaches is information theory, where derivation of probabilistic principles from logical axioms [146] leads to notions such as entropy and divergences that are closely linked to their physical counter-parts i.e., entropy and free energies in physical systems. At a less abstract level, it was shown that inference techniques in AI and communication are attempting to minimize (approximations to) free energy [6, 326]. Another exchange of ideas between the two fields was in the study of critical phenomenon in random constraint satisfaction problems by both computer scientists and physicists [103, 215, 216]; satisfiability is at the heart of theory of computation and an important topic to investigate reasoning in AI. On the other hand, the study of critical phenomena and phase transitions is central in statistical physics of disordered systems. This was culminated when a variational analysis lead to discovery of survey propagation [213] for constraint satisfaction, which significantly advanced the state-of-the-art in solving random satisfiability problems. Despite this convergence, variational and algebraic perspectives are to some extent complementary – e.g., the variational approach does not extend beyond (log) probabilities, while the algebraic approach cannot justify application of message passing to graphs with loops. Although we briefly review the variational perspective, this thesis is mostly concerned with the algebraic perspective. In particular, rather than the study of phase transitions and the behaviour of the set of solutions for combinatorial problems, we are concerned with finding solutions to individual instances. Part I starts by expressing the general form of inference, proposes a novel inference hierarchy and studies its complexity in chapter 1. Here, we also show how some of these problems are reducible to others and introduce the algebraic structures that make efficient inference possible. The general form of notation and the reductions that are proposed in this chapter are used in later chapters. Chapter 2 studies some forms of approximate inference, by first introducing belief propagation. It then considers the problems with intractably large number of factors and factors with large cardinality, then proposes/reviews solutions to both problems. We then study different modes of inference as optimization and review alternatives such as convergent procedures and convex and linear programming relaxations for some inference classes in the inference hierarchy. Standard message passing using belief propagation is only guaranteed to be exact if the graphical structure has no loops. This optimization 3 perspective (a.k.a. variational perspective) has also led to design of approximate inference techniques that account for short loops in the graph. A different family of loop correction techniques can account for long loops by taking message dependencies into account. This chapter reviews these methods and introduces a novel loop correction scheme that can account for both short and long loops, resulting in more accurate inference over difficult instances. Message passing over loopy graphs can be seen as a fixed point iteration procedure, and the existence of loops means there may be more than one fixed point. Therefore an alternative to loop correction is to in some way incorporate all fixed points. This can be performed also by a message passing procedure, known as survey propagation. The next section of this chapter introduces survey propagation from a novel algebraic perspective that enables performing inference on the set of fixed points. Another major approach to inference is offered by Markov Chain Monte Carlo (MCMC) techniques. After a minimal review of MCMC, the final section of this chapter introduces a hybrid inference procedure, called perturbed belief propagation that interpolates between belief propagation and Gibbs sampling. We show that this technique can outperform both belief propagation and Gibbs sampling in particular settings. Part II of this thesis uses the inference techniques derived in the first part to solve a wide range of combinatorial problems. We review the existing message passing solutions and provide novel formulations for three broad classes of problems: 1) constraint satisfaction problems (CSPs), 2) clustering problems and 3) combinatorial problems over permutations. In particular, in chapter 3 we use perturbed belief propagation and perturbed survey propagation to obtain state-of-the-art performance in random satisfiability and coloring problems. We also introduce novel message passing solutions and review the existing methods for sphere packing, set-cover, cliquecover, dominating-set and independent-set and several of their optimization counterparts. By applying perturbed belief propagation to graphical representation of packing problem, we are able to compute long “optimal” nonlinear binary codes with large number of digits. Chapter 4 proposes message passing solutions to several clustering problems such as K-clustering, K-center and Modularity optimization and shows that message passing is able to find near-optimal solutions on moderate instances of these problems. Here, we also review the previous approaches to K-median and hierarchical clustering and also the related graphical models for minimum spanning tree and prize-collecting Steiner tree. Chapter 5 deals with combinatorial problems over permutations, by first reviewing the existing graphical models for matching, approximation of permanent, and graph alignment and introducing two novel message passing solutions for min-sum and min-max versions of traveling salesman problem (a.k.a. bottleneck TSP). We then study graph matching problems, including (sub-)graph isomorphism, monomorphism, homomorphism, graph alignment and “approximate” symmetries. In particular, in the study of graph homomorphism we show that its graphical model generalizes that of of several other problems, including Hamiltonian cycle, clique problem and coloring. We further show how graph 4 homomorphism can be used as a surrogate for isomorphism to find symmetries. Contributions and acknowledgment The results in this thesis are a joint work with my supervisor Dr. Greiner and other researchers. In detail, the algebraic approach to inference is presented in [256]; the loop correction ideas are published in [254]; perturbation schemes for CSP are presented in [253]; performing min-max inference was first suggested by Dr. Brendan Frey and Christopher Srinivasa, and many of the related ideas including min-max reductions are presented in our joint paper [258]. Finally, the augmentation scheme for TSP and Modularity maximization is discussed in [257]. The contribution of this thesis, including all the published work is as follows: – Generalization of inference problems in graphical models including: • The inference hierarchy. • The limit of distributive law on tree structures. • All the theorems, propositions and claims on complexity of inference, including ◦ NP-hardness of inference in general commutative semirings. – A unified treatment of different modes of inference over factor-graphs and identification of their key properties (e.g., significance of inverse operator) in several settings including: • Loop correction schemes. • Survey propagation equations. – Reduction of min-max inference to min-sum and sum-product inference. – Simplified form of loop correction in Markov networks and their generalization to incorporate short loops over regions. – A novel algebraic perspective on survey propagation. – Perturbed BP and perturbed SP and their application to constraint satisfaction problems. – Factor-graph augmentation for inference over intractably large number of constraints. – Factor-graph formulation for several combinatorial problems including • Clique-cover. • Independent-set, set-cover and vertex cover. • Dominating-set and packing (the binary-variable model) • Packing with hamming distances • K-center problem, K-clustering and clique model for modularity optimization. • TSP and bottleneck TSP. – The general framework for study of graph matching, including • Subgraph isomorphism.1 1 Although some previous work [44] claim to address the same problem, we note that their formulation is for sub-graph monomorphism rather than isomorphism. 5 • Study of message passing for Homomorphism and finding approximate symmetries. • Graph alignment with a diverse set of penalties. Part I Inference by message passing 7 This part of the thesis first studies the representation formalism, hierarchy of inference problems, reducibilities and the underlying algebraic structure that allows efficient inference in the form of message passing in graphical models, in chapter 1. By viewing inference under different lights, we then review/introduce procedures that allow better approximations in chapter 2. Chapter 1 Representation, complexity and reducibility In this chapter, we use a simple algebraic structure – i.e., commutative semigroup – to express a general form for inference in graphical models. To this end, we first introduce the factor-graph representation and formalize inference in section 1.1. Section 1.2 focuses on four operations defined by summation, multiplication, minimization and maximization, to construct a hierarchy of inference problems within PSPACE, such that the problems in the same class of the hierarchy belong to the same complexity class. Here, we encounter some new inference problems and establish the completeness of problems at lower levels of hierarchy w.r.t. their complexity classes. In section 1.3 we augment our simple structures with two properties to obtain message passing on commutative semirings. Here, we also observe that replacing a semigroup with an Abelian group, gives us normalized marginalization as a form of inference inquiry. Here, we show that inference in any commutative semiring is NP-hard and postpone further investigation of message passing to the next chapter. Section 1.4 shows how some of the inference problems introduced so far are reducible to others. 1.1 The problem of inference We use commutative semigroups to both define what a graphical model represents and also to define inference over this graphical model. The idea of using structures such as semigroups, monoids and semirings in expressing inference has a long history[33, 185, 275]. Our approach, based on factorgraphs [181] and commutative semigroups, generalizes a variety of previous frameworks, including Markov networks [68], Bayesian networks [243], Forney graphs [100], hybrid models [83], influence diagrams [137] and valuation networks [278]. In particular, the combination of factor-graphs and semigroups that we consider here generalizes the plausibility, feasibility and utility framework of Pralet et al. [250], which is explicitly reduced to the 1.1. THE PROBLEM OF INFERENCE 9 graphical models mentioned above and many more. The main difference in our approach is in keeping the framework free of semantics (e.g., decision and chance variables, utilities, constraints), that are often associated with variables, factors and operations, without changing the expressive power. These notions can later be associated with individual inference problems to help with interpretation. Definition 1.1.1. A commutative semigroup is a pair G = (Y ∗ , ⊗), where Y ∗ is a set and ⊗ : Y ∗ × Y ∗ → Y ∗ is a binary operation that is (I) associative: a ⊗ (b ⊗ c) = (a ⊗ b) ⊗ c and (II) commutative: a ⊗ b = b ⊗ a for all a, b, c ∈ Y ∗ . A commutative monoid is a commutative semigroup plus an identity ⊗ ⊗ element 1 such that a ⊗ 1 = a. If every element a ∈ Y ∗ has an inverse a−1 (often written a1 ), such that ⊗ ⊗ a ⊗ a−1 = 1, and a ⊗ 1 = a, the commutative monoid is an Abelian group. Here, the associativity and commutativity properties of a commutative semigroup make the operations invariant to the order of elements. In general, these properties are not “vital” and one may define inference starting from a magma.1 Example 1.1.1. Some examples of semigroups are: – The set of strings with the concatenation operation forms a semigroup with the empty string as the identity element. However this semigroup is not commutative. – The set of natural numbers N with summation defines a commutative semigroup. – Integers modulo n with addition defines an Abelian group. – The power-set 2S of any set S, with intersection operation defines a commutative semigroup with S as its identity element. – The set of natural numbers with greatest common divisor defines a commutative monoid with 0 as its identity. In fact any semilattice is a commutative semigroup [79]. – Given two commutative semigroups on two sets Y ∗ and Z ∗ , their Cartesian product is also a commutative semigroup. Let x = (x1 , . . . , xN ) be a tuple of N discrete variables xi ∈ Xi , where Xi is the domain of xi and x ∈ X = X1 × . . . × XN . Let I ⊆ N = {1, 2, . . . , N } denote a subset of variable indices and xI = {xi | i ∈ I} ∈ XI be the tuple of variables in x indexed by the subset I. A factor fI : XI → YI is a function over a subset of variables and YI = {fI (xI ) | xI ∈ XI } is the range of this factor. Definition 1.1.2. A factor-graph is a pair (F, G ) such that • F = {fI } is a collection of factors with collective range Y = S I YI . • |F| = Poly(N ). 1 A magma [247] generalizes a semigroup, as it does not require associativity property nor an identity element. Inference in graphical models can be also extended to use magma (in definition 1.1.2). For this, the elements of Y ∗ and/or X should be ordered and/or parenthesized so as to avoid ambiguity in the order of pairwise operations over the set. Here, to avoid unnecessary complications, we confine our treatment to commutative semigroups. 10 CHAPTER 1. REPRESENTATION, COMPLEXITY AND REDUCIBILITY • fI has a polynomial representation in N and it is possible to evaluate fI (xI ) ∀I, xI in polynomial time. • G = (Y ∗ , ⊗) is a commutative semigroup, where Y ∗ is the closure of Y w.r.t. ⊗. The factor-graph compactly represents the expanded (joint) form q(x) = O fI (xI ) (1.1) I Note that the connection between the set of factors F and the commutative semigroup is through the “range” of factors. The conditions of this definition are necessary and sufficient to 1) compactly represent a factor-graph and 2) evaluate the expanded form, q(x), in polynomial time. A stronger condition to ensure that a factor has a compact representation is |XI | = Poly(N ), which means fI (xI ) can be explicitly expressed for each xI ∈ XI as an |I|-dimensional array. F can be conveniently represented as a bipartite graph that includes two sets of nodes: variable nodes xi , and factor nodes I. A variable node i (note that we will often identify a variable xi with its index “i”) is connected to a factor node I if and only if i ∈ I –i.e., I is a set that is also an index. We will use ∂ to denote the neighbours of a variable or factor node in the factor graph – that is ∂I = {i | i ∈ I} (which is the set I) and ∂i = {I | i ∈ I}. Also, we use ∆i to denote the Markov blanket of node xi – i.e., ∆i = {j ∈ ∂I | I ∈ ∂i, j 6= i}. Example 1.1.2. Figure 1.1 shows a factor-graph with 12 variables and 12 factors. Here x = (xi , xj , xk , xe , xm , xo , xr I = ∂I = {i, j, k}, xK = x{k,w,v} and ∂j = {I, V, W}. Assuming Ge = (R, min), the expanded form represents q(x) = min{fI (xI ), fJ (xJ ), . . . , fZ (xZ )}. Now, assume that all variables are binary – i.e., X = {0, 1}12 and q(x) is 12-dimensional hypercube, with one assignment at each corner. Also assume all the factors count the number of nonzero variables – e.g., for z W = (1, 0, 1) ∈ XW we have fW (z W ) = 2. Then, for the complete assignment z = (0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1) ∈ X , it is easy to check that the expanded form is q(z) = min{2, 0, 1, . . . , 1} = 0. A marginalization operation shrinks the expanded form q(x) using another commutative semigroup with binary operation ⊕. Inference is a combination of an expansion and one or more marginalization operations, which can be computationally intractable due to the exponential size of the expanded form. Definition 1.1.3. Given a function q : XJ → Y, and a commutative semigroup G = (Y ∗ , ⊕), where Y ∗ is the closure of Y w.r.t. ⊕, the marginal of q for I ⊂ J is q(xJ\I ) def = M xI q(xJ ) (1.2) 1.1. THE PROBLEM OF INFERENCE 11 Figure 1.1: A factor-graph with variables as circles and factors as squares. where L xI q(xJ ) is short for L xI ∈XI q(xJ\I , xI ), and it means to compute q(xJ\I ) for each xJ\I , one should perform the operation ⊕ over the set of all the assignments to the tuple xI ∈ XI . We can think of q(xJ ) as a |J|-dimensional tensor and marginalization as performing ⊕ operation over the axes in the set I. The result is another |J \ I|-dimensional tensor (or function) that we call the marginal. Here if the marginalization is over all the dimensions in J, we denote the marginal by q(∅) instead of q(x∅ ) and call it the integral of q. Now we define an inference problem as a sequence of marginalizations over the expanded form of a factor-graph. Definition 1.1.4. An inference problem seeks q(xJ0 ) = M −1 M M M xJ M xJ ... M −1 1 M O xJ 1 fI (xI ) I where 1 M • Y ∗ is the closure of Y (the collective range of factors), w.r.t. ⊕, . . . , ⊕ and ⊗. m • Gm = (Y ∗ , ⊕) ∀1 ≤ m ≤ M and Ge = (Y ∗ , ⊗) are all commutative semigroups. • J0 , . . . , JL partition the set of variable indices N = {1, . . . , N }. • q(xJ0 ) has a polynomial representation in N – i.e., |XJ0 | = Poly(N ) (1.3) 12 CHAPTER 1. REPRESENTATION, COMPLEXITY AND REDUCIBILITY 1 M Note that ⊕, . . . , ⊕ refer to potentially different operations as each belongs to a different semigroup. When J0 = ∅, we call the inference problem integration (denoting the inquiry by q(∅)) and otherwise we call it marginalization. Here, having a constant sized J0 is not always enough to ensure that q(xJ0 ) has a polynomial representation in N . This is because the size of q(xJ0 ) for any individual xJ0 ∈ XJ0 may grow exponentially with N (e.g., see Claim 1.2.1). In the following we call Ge = (Y ∗ , ⊗) the m expansion semigroup and Gm = (Y ∗ , ⊕) ∀1 ≤ m ≤ M the marginalization semigroup. Example 1.1.3. Going back to example 1.1.3, the shaded region in figure 1.1 shows a partitioning of the variables that we use to define the following inference problem: q(xJ0 ) = max xJ 3 X min min fI (xI ) xJ xJ 1 I 2 We can associate this problem with the following semantics: we may think of each factor as an agent, where fI (xI ) is the payoff for agent I, which only depends on a subset of variables xI . We have adversarial variables (xJ1 ), environmental or chance variables (xJ2 ), controlled variables (xJ3 ) and query variables (xJ0 ). The inference problem above for each query xJ0 seeks to maximize the expected minimum payoff of all agents, without observing the adversarial or chance variables, and assuming the adversary makes its decision after observing control and chance variables. Example 1.1.4. A “probabilistic” graphical model is defined using a expansion semigroup Ge = (R≥0 , ×) and often a marginalization semigroup Gm = (R≥0 , +). The expanded form represents the unQ normalized joint probability q(x) = I fI (xI ), whose marginal probabilities are simply called marginals. Replacing the summation with marginalization semigroup Gm = (R≥0 , max), seeks the maximum probQ ability state and the resulting integration problem q(∅) = maxx I fI (xI ) is known as maximum a posteriori (MAP) inference. Alternatively by adding a second marginalization operation to the summation, we get the marginal MAP inference q(xJ0 ) = max xJ 2 XY xJ 1 where here N = fI (xI ). (1.4) I 1 2 Q L P L , = and = max. If the object of interest is the negative log-probability (a.k.a. energy), the product expansion semigroup is replaced by Ge = (R, +). Instead of sum marginalization semigroup, we can use the log-sumdef exp semigroup, Gm = (R, +) where a ⊕ b = log(e−a + e−b ). The integral in this case is the log-partition function. If we change the marginalization semigroup to Gm = (R, min), the integral is the minimum energy (corresponding to MAP). A well-known example of a probabilistic graphical model is the Ising model of ferromagnetism. This model is an extensively studied in physics, mainly to model the phase transition in magnets. The 1.2. THE INFERENCE HIERARCHY 13 model consists of binary variables (xi ∈ {−1, 1}) – denoting magnet spins – arranged on the nodes of a graph G = (V, E) (usually a grid or Cayley tree). The energy function (i.e., Hamiltonian) associated with a configuration x is the joint form e(x) = q(x) = − X xi Jij xj − X hi (1.5) i∈V (i,j)∈E Variable interactions are denoted by J and h is called the local field. Here each Ji,j defines a factor over xi , xj : f{i,j} (x{i,j} ) = −xi Jij xj and local fields define local factors f{i} (xi ) = −hi xi . Depending on the type of interactions, we call the resulting Ising model: • ferromagnetic, if all Jij > 0. In this setting, neighbouring variables are likely to take similar values. • anti-ferromagnetic, if all Jij < 0. • non-ferromagnetic, if both kind of interactions are allowed. In particular, if the ferromagnetic and anti-ferromagnetic interactions have comparable frequency, the model is called spin-glass. This class of problem shows most interesting behaviours, which is not completely understood [212]. As we will see, the studied phenomena in these materials have important connections to difficult inference problems including combinatorial optimization problems. Two well studied models of spin glass are EdwardAnderson (EA [93]) and Sherrington-Kirkpatrick (SK [280]) models. While the EA model is defined on a grid (i.e., spin-glass interactions over a grid), the SK model is a complete graph. 1.2 The inference hierarchy Often, the complexity class is concerned with the decision version of the inference problem in definition 1.1.4. The decision version of an inference problem asks a yes/no question about the integral: ? q(∅) ≥ q for a given q. Here, we produce a hierarchy of inference problems in analogy to polynomial [288], the counting [302] and arithmetic [264] hierarchies. To define the hierarchy, we assume the following in definition 1.1.4: l l+1 – Any two consecutive marginalization operations are distinct (⊕ = 6 ⊕ ∀1 ≤ l < M ). – The marginalization index sets Jl ∀1 ≤ l ≤ M are non-empty. Moreover if |Jl | = O(log(N )) we call this marginalization operation a polynomial marginalization as here |XJl | = Poly(N ). – In defining the factor-graph, we required each factor to be polynomially computable. In building the hierarchy, we require the operations over each semigroup to be polynomially computable as well. To this end we consider the set of rational numbers Y ∗ ⊆ Q≥0 ∪{±∞}. Note that this automatically eliminates semigroups that involve operations such as exponentiation and logarithm (because Q is not closed under these operations) and only consider summation, product, minimization and maximization. 14 CHAPTER 1. REPRESENTATION, COMPLEXITY AND REDUCIBILITY We can always re-express any inference problem to enforce the first two conditions and therefore they do not impose any restriction. In the following we will use the a language to identify inference problems for an arbitrary set of factors F = {fI }. For example, sum-product refers to the inference ? P Q problem x I fI (xI ) ≥ q. In this sense the rightmost “token” in the language (here product) identifies Q the expansion semigroup Ge = (Q, ) and the rest of tokens identify the marginalization semigroups over Q in the given order. Therefore, this minimal language exactly identifies the inference problem. The only information that affects the computational complexity of an inference problem but is not specified in this language is whether each of the marginalization operations are polynomial or exponential. We define five inference families: Σ, Π, Φ, Ψ, ∆. The families are associated with that “outermost” M marginalization operation – i.e., ⊕ in definition 1.1.4). Σ is the family of inference problems where M ⊕ = sum. Similarly, Π is associated with product, Φ with minimization and Ψ with maximization. ∆ is the family of inference problems where the last marginalization is polynomial (i.e., |JM | = O(log(N )) M regardless of ⊕). Now we define inference classes in each family, such that all the problems in the same class have the same computational complexity. Here, the hierarchy is exhaustive – i.e., it includes all inference problems with four operations sum, min, max and product whenever the integral q(∅) has a polynomial representation (see Claim 1.2.1). Moreover the inference classes are disjoint. For this, each family is parameterized by a subscript M and two sets S and D (e.g., ΦM (S, D) is an inference “class” in family Φ). As before, M is the number of marginalization operations, S is the set of indices of the (exponential) sum-marginalization and D is the set of indices of polynomial marginalizations. Example 1.2.1. Sum-min-sum-product identifies the decision problem X xJ 3 min xJ 2 XY xJ 1 ? fI (xI ) ≥ q I where J1 , J2 and J3 partition N . Assume J1 = {2, . . . , N2 }, J2 = { N2 + 1, . . . , N } and J3 = {1}. Since we have three marginalization operations M = 3. Here the first and second marginalizations are exponential and the third one is polynomial (since |J3 | is constant). Therefore D = {3}. Since the only 1 L P exponential summation is x = x , S = {1}. In our inference hierarchy, this problem belongs to the class ∆3 ({1}, {3}). J1 J1 Alternatively, if we use different values for J1 , J2 and J3 that all linearly grow with N , the corresponding inference problem becomes a member of Σ3 ({1, 3}, ∅). Remark 1. Note that arbitrary assignments to M , S and D do not necessarily define a valid inference class. For example we require that S ∩ D = ∅ and no index in D and S are is larger than M . Moreover, the values in S and D should be compatible with the inference class. For example, for inference class ΣM (S, D), M is a member of S. For notational convenience, if an inference class notation is invalid we 1.2. THE INFERENCE HIERARCHY 15 equate it with an empty set – e.g., Ψ1 ({1}, ∅) = ∅, because S = {1} and M = 1 means the inference class is Σ rather than Ψ. In the definition below, we ignore the inference problems in which product appears in any of the marginalization semigroups (e.g., product-sum). The following claim, explains this choice. Claim 1.2.1. For ⊕M = prod, the inference query q(xJ0 ) can have an exponential representation in N. Proof. The claim states that when the product appears in the marginalization operations, the marginal (and integral) can become very large, such that we can no longer represent them in polynomial space in N . We show this for an integration problem. The same idea can show the exponential representation of a marginal query. To see why this integral has an exponential representation in N , consider its simplified form q(∅) = Y q(xI ) xI M where q(x) here is the result of inference up to the last marginalization step ⊕, which is product, where XI grows exponentially with N . Recall that the hierarchy is defined for operations on Q≥0 . Since q(xI ) for each xI ∈ XI has a constant size, say c, the size of representation of q(∅) using a binary scheme is  dlog2 (q(∅))e =  log2  Y xI    X   q(xI )  c =  = dc|XI |e   xI  which is exponential in N . Define the base members of families as def def def def Σ0 (∅, ∅) = {sum} Φ0 (∅, ∅) = {min} (1.6) Ψ0 (∅, ∅) = {max} Π0 (∅, ∅) = {prod} def ∆0 (∅, ∅) = ∅ ∆1 (∅, {1}) = {sum − sum, min − min, max − max} where the initial members of each family only identify the expansion semigroup – e.g., sum in Σ0 (∅, ∅) P identifies q(x) = I fI (xI ). Here, the exception is ∆1 (∅, {1}), which contains three inference problems.2 Let ΞM (S, D) denote the union of corresponding classes within all families: ΞM (S, D) = ΣM (S, D) ∪ ΠM (S, D) ∪ ΦM (S, D) ∪ ΨM (S, D) ∪ ∆M (S, D) 2 We treat M = 1 for ∆ specially as in this case the marginalization operation can not be polynomial. This is because if |J1 | = O(log(N )), then |J0 | = Ω(N ) which violates the conditions in the definition of the inference problem. 16 CHAPTER 1. REPRESENTATION, COMPLEXITY AND REDUCIBILITY Now define the inference family members recursively, by adding a marginalization operation to all the problems in each inference class. If this marginalization is polynomial then the new class belongs to the ∆ family and the set D is updated accordingly. Alternatively, if this outermost marginalization is exponential, depending on the new marginal operation (i.e., min, max, sum) the new class is defined to be a member of Φ, Ψ or Σ. For the case that the last marginalization is summation set S is updated. • Adding an exponential marginalization ∀ |XJM | = Poly(N ), M > 0 def  ΣM +1 (S ∪ {M + 1}, D) = sum − ξ | ξ ∈ ΞM (S, D) \ ΣM (S, D)} def  ΦM +1 (S, D) = min −ξ | ξ ∈ ΞM (S, D) \ ΦM (S, D) def  ΨM +1 (S, D) = max −ξ | ξ ∈ ΞM (S, D) \ ΨM (S, D) (1.7) def ΠM +1 (S, D) = ∅ • Adding a polynomial marginalization def ∆M +1 (S, D ∪ {M + 1}) = 1.2.1  ∀ |XJM | = Poly(N ), M > 1 ⊕ −ξ | ξ ∈ ΞM (S, D) , ⊕ ∈ {min, max, sum} (1.8) Single marginalization The inference classes in the hierarchy with one marginalization are ∆1 (∅, {1}) = {min − min, max − max, sum − sum} (1.9) Ψ1 (∅, ∅) = {max − min, max −sum, max −prod} (1.10) Φ1 (∅, ∅) = {min − max, min −sum, min −prod} (1.11) Σ1 ({1}, ∅) = {sum − prod, sum − min, sum − max} (1.12) Now we review all the problems above and prove that ∆1 , Ψ1 , Φ1 and Σ1 are complete w.r.t. P, NP, coNP and PP respectively. Starting from ∆1 : Proposition 1.2.2. sum-sum, min-min and max-max inference are in P. Proof. To show that these inference problems are in P, we provide polynomial-time algorithms for them: • sum − sum is short for q(∅) = XX x fI (xI ) I which asks for the sum over all assignments of x ∈ X , of the sum of all the factors. It is easy to see that each factor value fI (xI ) ∀I, XI is counted |X\I | times in the summation above. Therefore we can 1.2. THE INFERENCE HIERARCHY 17 rewrite the integral above as q(∅) = X X |X\I |  fI (xI ) xI I where the new form involves polynomial number of terms and therefore is easy to calculate. • min − min (similar for max − max) is short for q(∅) = min min fI (xI ) x I where the query seeks the minimum achievable value of any factor. We can easily obtain this by seeking the range of all factors and reporting the minimum value in polynomial time. Max-sum and max-prod are widely studied and it is known that their decision version are NPcomplete [281]. By reduction from satisfiability we can show that max-min inference [258] is also NP-hard. ? Proposition 1.2.3. The decision version of max-min inference that asks maxx minI fI (xI ) ≥ q is NPcomplete. Proof. Given x it is easy to verify the decision problem, so max-min decision belongs to NP. To show NP-completeness, we reduce the 3-SAT to a max-min inference problem, such that 3-SAT is satisfiable iff the max-min value is q(∅) ≥ 1 and unsatisfiable otherwise. Simply define one factor per clause of 3-SAT, such that fI (xI ) = 1 if xI satisfies the clause and any number less than one otherwise. With this construction, the max-min value maxx minI∈F fI (xI ) is one iff the original SAT problem was satisfiable, otherwise it is less than one. This reduces 3-SAT to Max-Min-decision. This means all the problems in Ψ1 (∅, ∅) are in NP (and in fact are complete w.r.t. this complexity class). In contrast, problems in Φ1 (∅, ∅) are in coNP, which is the class of decision problems in which the “NO instances” result has a polynomial time verifiable witness or proof. Note that by changing the ? ? decision problem from q(∅) ≥ q to q(∅) ≤ q, the complexity classes of problems in Φ and Ψ family are reversed (i.e., problems in Φ1 (∅, ∅) become NP-complete and the problems in Ψ1 (∅, ∅) become coNPcomplete). Among the members of Σ1 ({1}, ∅), sum-product is known to be PP-complete [194, 267]. It is easy to show the same result for sum-min (sum-max) inference. Proposition 1.2.4. The sum-min decision problem P x minI fI (xI ) ? ≥ q is PP-complete for Y = {0, 1}. PP is the class of problems that are polynomially solvable using a non-deterministic Turing machine, where the acceptance condition is that the majority of computation paths accept. 18 CHAPTER 1. REPRESENTATION, COMPLEXITY AND REDUCIBILITY Proof. To see that P ? x minI fI (xI ) ≥ q is in PP, enumerate all x ∈ X non-deterministically and for each assignment calculate minI fI (xI ) in polynomial time (where each path accepts iff minI fI (xI ) = 1) and accept iff at least q of the paths accept. Given a matrix A ∈ {0, 1}N ×N the problem of calculating its permanent perm(A) = N X Y Ai,zi z∈SN i=1 where SN is the set of permutations of 1, . . . , N is #P-complete and the corresponding decision problem is PP-complete [297]. To show completeness w.r.t. PP it is enough to reduce the problem of computing the matrix permanent to sum-min inference in a graphical model. The problem of computing the permanent has been reduced to sum-product inference in graphical models [139]. However, when fI (xI ) ∈ {0, 1} ∀I, sum-product is isomorphic to sum-min. This is because y1 × y2 = min(y1 , y2 )∀yi ∈ {0, 1}. Therefore, the problem of computing the permanent for such matrices reduces to sum-min inference in the factor-graph of [139]. 1.2.2 Complexity of general inference classes Let f(.) denote the complexity class of an inference class in the hierarchy. In obtaining the complexity class of problems with M > 1, we use the following fact, which is also used in the polynomial hierarchy: A A PNP = PcoNP [14]. In fact PNP = PcoNP , for any oracle A. This means that by adding a polynomial marginalization to the problems in ΦM (S, D) and ΨM (S, D), we get the same complexity class f(∆M +1 (S, D ∪ {M + 1})). The following gives a recursive definition of complexity class for problems in the inference hierarchy.3 Note that the definition of the complexity for each class is very similar to the recursive definition of members of each class in equations (1.7) and (1.8) Theorem 1.2.5. The complexity of inference classes in the hierarchy is given by the recursion f(ΦM +1 (S, D)) = coNPf(ΞM (S,D)\ΦM (S,D)) (1.13) f(ΨM +1 (S, D)) = NPf(ΞM (S,D)\ΨM (S,D)) (1.14) f(ΣM +1 (S ∪ {M + 1}, D)) = PPf(ΞM (S,D)\ΣM (S,D)) (1.15) f(∆M +1 (S, D ∪ {M + 1})) = Pf(ΞM (S,D)) (1.16) where the base members are defined in equation (1.6) and belong to P. Proof. Recall that our definition of factor graph ensures that q(x) can be evaluated in polynomial time and therefore the base members are in P (for complexity of base members of ∆ see proposition 1.2.2). 3 We do not prove the completeness w.r.t. complexity classes beyond the first level of the hierarchy and only assert the membership. 1.2. THE INFERENCE HIERARCHY We use these classes as the base of our induction and assuming the complexity classes above are correct for M we show that are correct for M + 1. We consider all the above statements one by one: • Complexity for members of ΦM +1 (S, D): Adding an exponential-sized min-marginalization to an inference problem with known complexity A, requires a Turing machine to non-deterministically enumerate z JM ∈ XJM possibilities, then call the A oracle with the “reduced factor-graph” – in which xJM is clamped to z JM – and reject iff any of the calls to oracle rejects. This means f(ΦM +1 (S, D)) = coNPA . Here, equation (1.13) is also making another assumption expressed in the following claim. Claim 1.2.6. All inference classes in ΞM (S, D) \ ΦM (S, D) have the same complexity A. • M = 0: the fact that q(x) can be evaluated in polynomial time means that A = P. • M > 0: ΞM (S, D) \ ΦM (S, D) only contains one inference class – that is exactly only one of the following cases is correct: – M ∈ S ⇒ ΞM (S, D) \ ΦM (S, D) = ΣM (S, D) – M ∈ D ⇒ ΞM (S, D) \ ΦM (S, D) = ∆M (S, D) – M∈ / S ∪ D ⇒ ΞM (S, D) \ ΦM (S, D) = ΨM (S, D). (in constructing the hierarchy we assume two consecutive marginalizations are distinct and the current marginalization is a minimization.) But if ΞM (S, D) \ ΦM (S, D) contains a single class, the inductive hypothesis ensures that all problems in ΞM (S, D) \ ΦM (S, D) have the same complexity class A. This completes the proof of our claim. • Complexity for members of ΨM +1 (S, D): Adding an exponential-sized max -marginalization to an inference problem with known complexity A, requires a Turing machine to non-deterministically enumerate z JM ∈ XJM possibilities, then call the A oracle with the reduced factor-graph and accept iff any of the calls to oracle accepts. This means f(ΨM +1 (S, D)) = NPA . Here, an argument similar to that of Claim 1.2.6 ensures that ΞM (S, D) \ ΨM (S, D) in equation (1.14) contains a single inference class. • Complexity for members of ΣM +1 (S ∪ {M + 1}, D): Adding an exponential-sized sum-marginalization to an inference problem with known complexity A, requires a Turing machine to non-deterministically enumerate z JM ∈ XJM possibilities, then call the A oracle with the reduced factor-graph and accept iff majority of the calls to oracle accepts. This means f(ΨM +1 (S, D)) = PPA . • M = 0: the fact that q(x) can be evaluated in polynomial time means that A = P. • M > 0: 19 20 CHAPTER 1. REPRESENTATION, COMPLEXITY AND REDUCIBILITY – M ∈ D ⇒ ΞM (S, D) \ ΣM (S, D) = ∆M (S, D). – M ∈ / D∪S ⇒ ΞM (S, D) \ ΣM (S, D) = ΨM (S, D) ∪ ΦM (S, D): despite the fact that A = f(ΨM (S, D)) is different from A0 = f(ΦM (S, D)), since PP is closed under complement, which means PPA = PPA and the recursive definition of complexity equation (1.15) remains correct. • Complexity for members of ∆M +1 (S, D ∪ {M + 1}): Adding a polynomial-sized marginalization to an inference problem with known complexity A, requires a Turing machine to deterministically enumerate z JM ∈ XJM possibilities in polynomial time, and each time call the A oracle with the reduced factor-graph and accept after some polynomial-time calculation. This means f(ΨM +1 (S, D)) = PA . Here, there are three possibilities: • M = 0: here again A = P. • M ∈ S ⇒ ΞM (S, D) = ΣM (S, D). • M ∈ D ⇒ ΞM (S, D) = ∆M (S, D). B B • M ∈ / D ∪ S ⇒ ΞM (S, D) = ΨM (S, D) ∪ ΦM (S, D), in which case since PPNP = PPcoNP , the recursive definition of complexity in equation (1.16) remains correct. Example 1.2.2. Consider the marginal-MAP inference of equation (1.4). The decision version of this ? problem, q(∅) ≥ q, is a member of Ψ2 ({1}, ∅) which also includes max −sum−min and max −sum−max. The complexity of this class according to equation (1.14) is f(Ψ2 ({1}, ∅)) = NPPP . However, marginalMAP is also known to be “complete” w.r.t. NPPP [241]. Now suppose that the max-marginalization over xJ2 is polynomial (e.g., |J2 | is constant). Then marginal-MAP belongs to ∆2 ({1}, {2}) with complexity PPP . This is because a Turing machine can enumerate all z J2 ∈ XJ2 in polynomial time and call its PP oracle to see if ? where q(xJ0 | z J2 ) ≥ q XY q(xJ0 | z J2 ) = fI (xI\J2 , z I∩J2 ) xJ 2 I and accept if any of its calls to oracle accepts, and rejects otherwise. Here, fI (xI\J2 , z I∩J2 ) is the reduced factor, in which all the variables in xJ2 are fixed to z J2 ∩I . The example above also hints at the rationale behind the recursive definition of complexity class for each inference class in the hierarchy. Consider the inference family Φ: Here, Toda’s theorem [296] has an interesting implication w.r.t. the hierarchy. This theorem states that PP is as hard as the polynomial hierarchy, which means min − max − min − . . . − max inference for 1.2. THE INFERENCE HIERARCHY 21 an arbitrary, but constant, number of min and max operations appears below the sum-product inference in the inference hierarchy. 1.2.3 Complexity of the hierarchy By restricting the domain Y ∗ to {0, 1}, min and max become isomorphic to logical AND (∧) and OR (∨) respectively, where 1 ∼ = true, 0 ∼ = false. By considering the restriction of the inference hierarchy to these two operations we can express quantified satisfiability (QSAT) as inference in a graphical model, where ∧ ∼ = ∀ and ∨ ∼ = ∃. Let each factor fI (xI ) be a disjunction –e.g., f(xi,j,k ) = xi ∨ ¬xj ∨ ¬xk . Then we have ∀xJ ∃xJ M M −1 . . . ∃xJ ∀xJ 2 ^ 1 fI (xI ) ∼ = min max . . . max min min fI (xI ) xJ I M xJ xJ M −1 2 xJ 1 I By adding the summation operation, we can express the stochastic satisfiability [194] and by generalizing the constraints from disjunctions we can represent any quantified constraint problem (QCP) [36]. QSAT, stochastic SAT and QCPs are all PSPACE-complete, where PSPACE is the class of problems that can be solved by a (non-deterministic) Turing machine in polynomial space. Therefore if we can show that inference in the inference hierarchy is in PSPACE, it follows that inference hierarchy is in PSPACEcomplete as well. Theorem 1.2.7. The inference hierarchy is PSPACE-complete. Proof. (theorem 1.2.7) To prove that a problem is PSPACE-complete, we have to show that 1) it is in PSPACE and 2) a PSPACE-complete problem reduces to it. We already saw that QSAT, which is PSPACE-complete, reduces to the inference hierarchy. But it is not difficult to show that inference hierarchy is contained in PSPACE. Let q(xJ0 ) = M −1 M M M xJ M xJ ... M −1 1 M O xJ 1 fI (xI ) I be any inference problem in the hierarchy. We can simply iterate over all values of z ∈ X in nested loops or using a recursion. Let (i) : {1, . . . , N } → {1, . . . , M } be the index of the marginalization that involves xi – that is i ∈ J(i) . Moreover let i1 , . . . , iN be an ordering of variable indices such that (ik ) ≤ (ik+1 ). Algorithm 1 uses this notation to demonstrate this procedure using nested loops. Note that here we loop over individual domains Xik rather than XJm and track only temporary tuples qik , so that the space complexity remains polynomial in N . 22 CHAPTER 1. REPRESENTATION, COMPLEXITY AND REDUCIBILITY input : M −1 L M L xJ xJ M ... 1 L xJ M −1 N I fI (xI ) 1 output: q(xJ0 ) for each z J0 ∈ XJ0 do // loop over the query domain for each ziN ∈ XiN do // loop over XiN . . . for each zi1 ∈ Xi1 do // loop over Xi1 N q1 (zi1 ) := I fI (z I ); end (i L1 ) qi2 (zi2 ) := xi q1 (xi1 ) 1 . . . qN (ziN ) := (iL N −1 ) xiN −1 qN −1 (xiN −1 ) end q(z J0 ) := (i N) L xiN qN (xiN ) end Algorithm 1: inference in PSPACE 1.3 Polynomial-time inference Our definition of inference was based on an expansion operation ⊗ and one or more marginalization 1 M operations ⊕, . . . , ⊕. If we assume only a single marginalization operation, polynomial time inference is still not generally possible. However, if we further assume that the expansion operation is distributive over marginalization and the factor-graph has no loops, exact polynomial time inference is possible. Definition 1.3.1. A commutative semiring S = (Y ∗ , ⊕, ⊗) is the combination of two commutative semigroups Ge = (Y ∗ , ⊗) and Gm = (Y ∗ , ⊕) with two additional properties ⊕ ⊗ ⊕ ⊗ ⊕ • identity elements 1 and 1 such that 1 ⊕ a = a and 1 ⊗ a = a. Moreover 1 is an annihilator for ⊕ ⊕ Ge = (⊗, Y ∗ ): a ⊗ 1 = 1 ∀a ∈ Y ∗ .4 • distributive property: a ⊗ (b ⊕ c) = (a ⊗ b) ⊕ (a ⊗ b) ∀a, b, c ∈ Y ∗ 4 ⊕ That is when dealing with reals, this is 1 = 0; this means a × 0 = 0. 1.3. POLYNOMIAL-TIME INFERENCE 23 The mechanism of efficient inference using distributive law can be seen in a simple example: instead of calculating min(a + b, a + c), using the fact that summation distributes over minimization, we may instead obtain the same result using a + min(b, c), which requires fewer operations. Example 1.3.1. The following are some examples of commutative semirings: – Sum-product (R≥0 , +, ×). – Max-product (R≥0 ∪ {−∞}, max, ×) and ({0, 1}, max, ×). – Min-max (S, min, max) on any ordered set S. – Min-sum (R ∪ {∞}, min, +) and ({0, 1}, min, +). – Or-and ({true, false}, ∨, ∧). – Union-intersection (2S , ∪, ∩) for any power-set 2S . – The semiring of natural numbers with greatest common divisor and least common multiple (N , lcm, gcd). – Symmetric difference-intersection semiring for any power-set (2S , ∇, ∩). Many of the semirings above are isomorphic –e.g., y 0 ∼ = − log(y) defines an isomorphism between min-sum and max-product. It is also easy to show that the or-and semiring is isomorphic to minsum/max-product semiring on Y ∗ = {0, 1}. The inference problems in the example above have different properties indirectly inherited from their commutative semirings: for example, the operation min (also max) is a choice function, which means ∈ A. The implication is that if sum of the semiring is min (or max), we can replace it with N max and (if required) recover q(∅) using q(∅) = I fI (x∗ ) in polynomial time. mina∈A a argxJ M As another example, since both operations have inverses, sum-product is a field [247]. The availability of inverse for ⊗ operation – i.e., when Ge is an Abelian group – has an important implication for inference: the expanded form of equation (1.1) can be normalized, and we may inquire about normalized marginals p(xJ ) M = p(x) (1.17) x\J where p(x) O  1 ⊗ fI (xI ) q(∅) def = ⊕ if q(∅) 6= 1 (1.18) I p(x) def = ⊕ ⊕ 1 if q(∅) = 1 (1.19) where p(x) is the normalized joint form. We deal with the case where the integral evaluates to the annihilator as a special case because division by annihilator may not be well-defined. This also means, ⊗ L when working with normalized expanded form and normalized marginals, we always have x p(xJ ) = 1 J Example 1.3.2. Since Ge = (R>0 , ×) and Ge = (R, +) are both Abelian groups, min-sum and sumsum product inference have normalized marginals. For min-sum inference this means minxJ p(xJ ) = 1 = 0. However, for min-max inference, since (S, max) is not Abelian, normalized marginals are not defined. 24 CHAPTER 1. REPRESENTATION, COMPLEXITY AND REDUCIBILITY We can apply the identity and annihilator of a commutative semiring to define constraints. ⊗ ⊕ Definition 1.3.2. A constraint is a factor fI : XI → { 1, 1} whose range is limited to identity and annihilator of the expansion monoid.5 ⊕ ⊗ Here, fI (x) = 1 iff x is forbidden and fI (x) = 1 iff it is permissible. A constraint satisfaction problem (CSP) is any inference problem on a semiring in which all factors are constraints. Note that this allows definition of the “same” CSP on any commutative semiring. The idea of using different semirings to define CSPs has been studied in the past [33], however its implication about inference on commutative semirings has been ignored. Theorem 1.3.1. Inference in any commutative semiring is NP-hard under randomized polynomial-time reduction. ⊕ ⊗ Proof. To prove that inference in any semiring S = (Y ∗ , 1, 1) is NP-hard under randomized polynomial reduction, we deterministically reduce unique satisfiability (USAT) to an inference problems on any semiring. USAT is a so-called “promise problem”, that asks whether a satisfiability problem that is promised to have either zero or one satisfying assignment is satisfiable. Valiant and Vazirani [298] prove that a polynomial time randomized algorithm (RP) for USAT implies a RP=NP. For this reduction consider a set of binary variables x ∈ {0, 1}N , one per each variable in the given ⊗ instance of USAT. For each clause, define a constraint factor fI such that fI (xI ) = 1 if xI satisfies ⊕ that clause and fI (xI ) = 1 otherwise. This means, x is a satisfying assignment for USAT iff q(x) = ⊗ ⊕ L ⊕ ⊕ N x 1 = 1 (by definition of 1). If the I fI (xI ) = 1. If the instance is unsatisfiable, the integral q(∅) = ⊗ instance is satisfiable there is only a single instance x∗ for which q(x∗ ) = 1, and therefore the integral ⊗ evaluates to 1. Therefore we can decide the satisfiability of USAT by performing inference on any semiring, by only relying on the properties of identities. The satisfying assignment can be recovered using a decimation procedure, assuming access to an oracle for inference on the semiring. Example 1.3.3. Inference on xor-and semiring ({true, false}, xor, ∧), where each factor has a disjunction form, is called parity-SAT, which asks whether the number of SAT solutions is even or odd. A corollary to theorem 1.3.1 is that parity-SAT is NP-hard under randomized reduction, which is indeed the case [298]. 5 Recall that a monoid is a semigroup with an identity. The existence of identity here is a property of the semiring. 1.4. REDUCTIONS 25 We find it useful to use the same notation for the identity function 1(condition): def 1(cond.) =      cond. = true     cond. = false (+, ×) (min, +) (min, max) 1 0 −∞ 0 +∞ +∞ (1.20) where the intended semiring for 1(.) function will be clear from the context. 1.4 Reductions Several of the inference problems over commutative semirings are reducible to each other. Section 1.4.1 reviews the well-known reduction of marginalization to integration for general commutative semirings. We use this reduction to obtain approximate message dependencies in performing loop corrections in section 2.4. In equation (1.22), we introduce a procedure to reduce integration to that of finding normalized marginals. The same procedure, called decimation, reduces sampling to marginalization. The problem of sampling from a distribution is known to be almost as difficult as sum-product integration [151]. As we will see in chapter 3, constraint satisfaction can be reduced to sampling and therefore marginalization. In section 2.6.3 we introduce a perturbed message passing scheme to perform approximate sampling and use it to solve CSPs. Some recent work perform approximate sampling by finding the MAP solution in the perturbed factor-graph, in which a particular type of noise is added to the factors [125, 239]. Approximate sum-product integration has also been recently reduced to MAP inference [96, 97]. In section 2.3, we see that min-max and min-sum inference can be obtained as limiting cases of min-sum and sum-product inference respectively. Section 1.4.2 reduces the min-max inference to min-sum also to a sequence of CSPs (and therefore sum-product inference) over factor-graphs. This reduction gives us a powerful procedure to solve minmax problems, which we use in part II to solve bottleneck combinatorial problems. In contrast to this type of reduction between various modes of inference, many have studied reductions of different types of factor-graphs [90]. Some examples of these special forms are factor-graphs with: binary variables, pairwise interactions, constant degree nodes, and planar form. For example Sanghavi et al. [274] show that min-sum integration is reducible to maximum independent-set problem. However since a pairwise binary factor-graph can represent a maximum independent-set problem (see section 3.7), this means that min-sum integration in any factor-graph can be reduced to the same problem on a pairwise binary model. These reductions are in part motivated by the fact that under some further restrictions the restricted factor-graph allows more efficient inference. For example, (I) it is possible to calculate the sum-product integral of the planar spin-glass Ising model (see example 1.1.4) in polynomial time, in the absence of 26 CHAPTER 1. REPRESENTATION, COMPLEXITY AND REDUCIBILITY local fields [99]; (II) the complexity of the loop correction method that we study in section 2.4.2 grows exponentially with the degree of each node and therefore it may be beneficial to consider reduced factorgraph where |∂i| = 3; and (III) if the factors in a factor-graphs with pairwise factors satisfy certain metric property, polynomial algorithms can obtain the exact min-sum integral using graph-cuts [41]. 1.4.1 Marginalization and integration This section shows how for arbitrary commutative semirings there is a reduction from marginalization to integration and vice versa. Marginalization reduces to integration For any fixed assignment to a subset of variables xA = z A (a.k.a. evidence), we can reduce all the factors fI (xI ) that have non-empty intersection with A (i.e., I ∩ A 6= ∅) accordingly: fI\A (xI\A | z A ) def M = fI (xI ) ⊗ 1(xI∩A = z I∩A ) ∀I s.t. A ∩ I 6= ∅ (1.21) xI∩A where the identity function 1(.) is defined by equation (1.20). The new factor graph produced by clamping all factors in this manner, has effectively accounted for the evidence. Marginalization or integration, can be performed on this reduced factor-graph. We use similar notation for the integral and marginal in the new factor graph – i.e., q(∅ | xA ) and q(xB | xA ). Recall that the problem of integration is that of calculating q(∅). We can obtain the marginals q(z A ) by integration on reduced factor-graphs for all z A ∈ XA reductions. Claim 1.4.1. q(z A ) = q(∅ | z A ) (1.22) Proof. q(z A ) = MO x\A fI (xI\A , z A∩I ) I  M O = 1(xA = z A ) ⊗ fI (xI\A , z A∩I ) x I  MO = fA (xA ) ⊗ 1(xI∩A = z I∩A ) x = I MO x I fI\A (xI\A | z A ) = q(∅ | z A ) 1.4. REDUCTIONS 27 where we can then normalize q(xI ) values to get p(xI ) (as defined in equation (1.17)). Integration reduces to marginalization Assume we have access to an oracle that can produce the normalized marginals of equation (1.17). We show how to calculate q(∅) by making N calls to the oracle. Note that if the marginals are not L normalized, the integral is trivially given by q(∅) = x q(xJ ) J Start with t = 1, B(t = 0) = ∅ and given the normalized marginal over a variable p(xi(t) ), fix the xi(t) to an arbitrary value zi(t) ∈ Xi(t) . Then reduce all factors according to equation (1.21). Repeat this process of marginalization and clamping N times until all the variables are fixed. At each point, B(t) denotes the subset of variables fixed up to step t (including i(t)) and p(xi(t) | z B(t−1) ) = q(xi(t) |z B(t−1) ) q(∅|z B(t−1) ) refers to the new marginal. Note that we require i(t) ∈ / B(t − 1) – that is at each step we fix a different variable. ⊕ ⊕ We call an assignment to xi(t) = zi(t) invalid, if p(zi(t) | z B(t) ) = 1. This is because 1 is the annihilator of the semiring and we want to avoid division by the annihilator. Using equations (1.17) to (1.19), it is ⊕ L easy to show that if q(∅) 6= 1, a valid assignment always exists (this is because xi(t) p(xi(t) | z B(t−1) ) = ⊗ ⊕ 1). Therefore if we are unable to find a valid assignment, it means q(∅) = 1. Let z = z B(N +1) denote the final joint assignment produced using the procedure above. Proposition 1.4.2. The integral in the original factor-graph is given by ! q(∅) = O I fI (z I ) −1  O ⊗ p(zi(t) | z B(t−1) ) (1.23) 1≤t≤N where the inverse is defined according to ⊗-operation. Proof. First, we derive the an equation for “conditional normalized marginals” for semirings where ⊗ defines an inverse. Claim 1.4.3. For any semiring with normalized joint form we have p(x) = p(xi ) ⊗ p(x\i | xi ) where p(x\i | xi ) = q(x\i |xi ) q(∅|xi ) To arrive at this equality first note that since x = x\i , xi , q(x\i | xi ) = q(x). Then multiply both 28 CHAPTER 1. REPRESENTATION, COMPLEXITY AND REDUCIBILITY sides by q(xi ) = q(∅ | xi ) (see Claim 1.4.1) to get q(x) ⊗ q(∅ | xi ) = q(xi ) ⊗ q(x\i | xi ) ⇒ q(x) q(xi ) q(x\i | xi ) = ⊗ q(∅) q(∅) q(∅ | xi ) ⇒ p(x) = p(xi ) ⊗ p(x\i | xi ) where we divided both sides by q(∅) and moved a term from left to right in the second step. Now we can apply this repeatedly to get a chain rule for the semiring: p(x) = p(xi1 ) ⊗ p(xi2 | xi1 ) ⊗ p(xi3 | x{i1 ,i2 } ) ⊗ . . . ⊗ p(xiN | x{i1 ,...,iN −1 } ) which is equivalent to p(x) = p(xi(1) ) ⊗ p(xi(2) | xB(1) ) ⊗ . . . ⊗ p(xi(N ) | xB(N −1) ) = O p(xi(t) | xB(t−1) ) 1≤t≤N Simply substituting this into definition of p(x) (equation (1.18)) and re-arranging we get O 1≤t≤N q(∅) 1 O fI (xI ) ⇒ q(∅) I∈F −1 !  O O fI (z I ) ⊗  p(zi(t) | z B(t−1) ) p(xi(t) | xB(t−1) ) = I = 1≤t≤N The procedure of incremental clamping is known as decimation, and its variations are typically used for two objectives: (I) recovering the MAP assignment from (max) marginals (assuming a maxproduct semiring). Here instead of an arbitrary z J ∈ XJ , one picks z J = argxJ max p(xJ ). (II) producing an unbiased sample from a distribution p(.) (i.e., assuming sum-product semiring). For this we sample from p(xI ): z J ∼ p(xJ ). 1.4.2 Min-max reductions The min-max objective appears in various fields, particularly in building robust models under uncertain and adversarial settings. In the context of probabilistic graphical models, several min-max objectives different from inference in min-max semiring have been previously studied [140, 162] (also see section 2.1.2). In combinatorial optimization, min-max may refer to the relation between maximization and minimization in dual combinatorial objectives and their corresponding linear programs [276], or it may refer to min-max settings due to uncertainty in the problem specification [5, 16]. 1.4. REDUCTIONS 29 In part II we will see that several problems that are studied under the class of bottleneck problems can be formulated using the min-max semiring. Instances of these problems include bottleneck traveling salesman problem [242], K-clustering [119], K-center problem [87, 164] and bottleneck assignment problem [121]. Edmonds and Fulkerson [92] introduce a bottleneck framework with a duality theorem that relates the min-max objective in one problem instance to a max-min objective in a dual problem. An intuitive example is the duality between the min-max cut separating nodes a and b – the cut with the minimum of the maximum weight – and min-max path between a and b, which is the path with the minimum of the maximum weight [104]. Hochbaum and Shmoys [136] leverages the triangle inequality in metric spaces to find constant factor approximations to several NP-hard min-max problems under a unified framework. The common theme in a majority of heuristics for min-max or bottleneck problems is the relation of the min-max objective to a CSP [136, 237]. We establish a similar relation within the context of factor-graphs, by reducing the min-max inference problem on the original factor-graph to inference over a CSP factor-graph (see section 1.3) on the reduced factor-graph in equation (1.25). In particular, since we use sum-product inference to solve the resulting CSP, we call this reduction, sum-product reduction of min-max inference. Min-max reduces to min-sum Here, we show that min-max inference reduces to min-sum, although in contrast to the sum-product reduction of the next subsection, this is not a polynomial time reduction. First, we make a simple S observation about min-max inference. Let Y = I∈F YI denotes the union over the range of all factors. The min-max value belongs to this set maxI∈F fI (x∗I ) ∈ Y. In fact for any assignment x, maxI∈F fI (xI ) ∈ Y. Now we show how to manipulate the factors in the original factor-graph to produce new factors over the same domain such that the min-max inference on the former corresponds to the min-sum inference on the later. Lemma 1.4.4. Any two sets of factors, {fI } and {gI }, over the identical domains {XI } have identical min-max solutions argx min max fI (xI ) = argx min max gI (xI ) I I if ∀I, J ∈ F, xI ∈ XI , xJ ∈ XJ fI (xI ) < fJ (xJ ) ⇔ gI (xI ) < gJ (xJ ) 30 CHAPTER 1. REPRESENTATION, COMPLEXITY AND REDUCIBILITY Proof. Assume they have different min-max assignments6 –i.e., x∗ = argx min maxI fI (xI ), x0∗ = argx min maxI gI (xI and x∗ 6= x0∗ . Let y ∗ and y 0∗ denote the corresponding min-max values. Claim 1.4.5. y ∗ > max fI (x0∗ I ) I ∗ y < max fI (x0∗ I ) I ⇔ ⇔ y 0∗ < max gI (x∗I ) I 0∗ y > max fI0 (x∗I ) I This simply follows from the condition of the Lemma. But in each case above, one of the assignments y∗ or y 0∗ is not an optimal min-max assignment as there is an alternative assignment that has a lower maximum over all factors. This lemma simply states that what matters in the min-max solution is the relative ordering in the factor-values. Let y[1] ≤ . . . ≤ y[|Y|] be an ordering of elements in Y, and let r(fI (xI )) denote the rank in {1, . . . , |Y|} of yI = fI (xI ) in this ordering. Define the min-sum reduction of {fI }I∈F as gI (xI ) = 2r(fI (xI )) ∀I ∈ F Theorem 1.4.6. argx min X gI (xI ) = I argx min max fI (xI ) I where {gI }I is the min-sum reduction of {fI }I . Proof. First note that since g(z) = 2z is a monotonically increasing function, the rank of elements in the range of {gI }I is the same as their rank in the range of {fI }I . Using Lemma 1.4.4, this means argx min max gI (xI ) I Since 2z > Pz−1 l=0 argx min max fI (xI ). I (1.24) 2l , by definition of {gI } we have max gI (xI ) > I∈F 6 = X gI (xI ) where I∗ = argI max gI (xI ) I∈F \I∗ For simplicity, we are assuming each instance has a single min-max assignment. In case of multiple assignments there is a one-to-one correspondence between them. Here the proof instead starts with the assumption that there is an assignment x∗ for the first factor-graph that is different from all min-max assignments in the second factor-graph. 1.4. REDUCTIONS 31 It follows that for x1 , x2 ∈ X , max gI (x1I ) < max gI (x2I ) I X ⇔ I gI (x1I ) < X I gI (x2I ) I Therefore argx min max gI (xI ) argx min = I X gI (xI ). I This equality, combined with equation (1.24), prove the statement of the theorem. An alternative approach is to use an inverse temperature parameter β and re-state the min-max objective as the min-sum objective at the low temperature limit lim argx min X β→+∞ fIβ (xI ) = argx min max fI (xI ) I I (1.25) Min-max reduces to sum-product S Recall that Y = I∈F YI denote the union over the range of all factors. For any y ∈ Y, we reduce the original min-max problem to a CSP using the following reduction. Definition 1.4.1. For any y ∈ Y, py -reduction of the min-max problem: x∗ = argx min max fI (xI ) I∈F (1.26) is given by py (x) def = 1 Y 1(fI (xI ) ≤ y) qy (∅) (1.27) I∈F where qy (∅) is the normalizing constant.7 This distribution defines a CSP over X , where py (x) > 0 iff x is a satisfying assignment. Moreover, qy (∅) gives the number of satisfying assignments. The following theorem is the basis of our reduction. Theorem 1.4.7. Let x∗ denote the min-max solution and y ∗ be its corresponding value –i.e., y ∗ = maxI fI (x∗I ). Then py (x) is satisfiable for all y ≥ y ∗ (in particular py (x∗ ) > 0) and unsatisfiable for all y < y∗. 7 To always have a well-defined probability, we define 0 def = 0 0. 32 CHAPTER 1. REPRESENTATION, COMPLEXITY AND REDUCIBILITY Proof. (A) py for y ≥ y ∗ is satisfiable: It is enough to show that for any y ≥ y ∗ , py (x∗ ) > 0. But since py (x∗ ) 1 Y 1(fI (x∗I ) ≤ y) qy (∅) = I and fI (x∗I ) ≤ y ∗ ≤ y, all the indicator functions on the rhs evaluate to 1, showing that py (x∗ ) > 0. (B) py for y < y ∗ is not satisfiable: Towards a contradiction assume that for some y < y ∗ , py is satisfiable. Let x denote a satisfying assignment –i.e., py (x) > 0. Using the definition of py -reduction, this implies that 1(fI (xI ) ≤ y) > 0 for all I ∈ F. However this means that maxI fI (xI ) ≤ y < y ∗ , which means y ∗ is not the min-max value. This theorem enables us to find a min-max assignment by solving a sequence of CSPs. Let y[1] ≤ . . . ≤ y[|Y|] be an ordering of y ∈ Y. Starting from y = y[dN/2e], if py is satisfiable then y ∗ ≤ y. On the other hand, if py is not satisfiable, y ∗ > y. Using binary search, we need to solve log(|Y|) CSPs to find the min-max solution. Moreover at any time-step during the search, we have both upper and lower bounds on the optimal solution. That is y < y ∗ ≤ y, where py is the latest unsatisfiable and py is the latest satisfiable reduction. However, finding an assignment x∗ such that py (x∗ ) > 0 or otherwise showing that no such assignment exists, is in general, NP-hard. Instead, we can use an incomplete solver [160], which may find a solution if the CSP is satisfiable, but its failure to find a solution does not guarantee unsatisfiability. By using an incomplete solver, we lose the lower bound y on the optimal min-max solution.8 However the following theorem states that, as we increase y from the min-max value y ∗ , the number of satisfying assignments to py -reduction increases, making it potentially easier to solve. Proposition 1.4.8. y1 < y2 ⇒ qy1 (∅) ≤ qy2 (∅) ∀y1 , y2 ∈ Y where qy (∅) ( i.e., partition function) is the number of solutions of py -reduction. Proof. Recall the definition qy (∅) = fI (xI ) ≤ y1 → P Q x I 1(fI (xI ) ≤ y). For y1 < y2 we have: fI (xI ) ≤ y2 1(fI (xI ) ≤ y1 ) ≤ 1(fI (xI ) ≤ y2 ) XY XY 1(fI (xI ) ≤ y1 ) ≤ 1(fI (xI ) ≤ y2 ) x I x I qy1 (∅) ≤ qy2 (∅) 8 To maintain the lower bound one should be able to correctly assert unsatisfiability. ⇒ ⇒ ⇒ 1.4. REDUCTIONS This means that the sub-optimality of our solution is related to our ability to solve CSP-reductions – that is, as the gap y − y ∗ increases, the py -reduction potentially becomes easier to solve. 33 Chapter 2 Approximate inference 2.1 Belief Propagation A naive approach to inference over commutative semirings q(xJ ) = MO x\J fI (xI ) (2.1) I or its normalized version (equation (1.17)), is to construct a complete N -dimensional array of q(x) using N the tensor product q(x) = I fI (xI ) and then perform ⊕-marginalization. However, the number of elements in q(x) is |X |, which is exponential in N , the number of variables. If the factor-graph is loop free, we can use distributive law to make inference tractable. Assuming q(xK ) (or q(xk )) is the marginal of interest, form a tree with K (or k) as its root. Then starting from the leaves, using the distributive law, we can move the ⊕ inside the ⊗ and define “messages” from leaves towards the root as follows: qi→I (xi ) = O qJ→i (xi ) (2.2) J∈∂i\I qI→i (xi ) = M x\i fI (xI ) O qj→I (xj ) (2.3) j∈∂I\i where equation (2.2) defines the message from a variable to a factor, closer to the root and similarly equation (2.3) defines the message from factor I to a variable i closer to the root. Here, the distributive law allows moving the ⊕ over the domain XI\i from outside to inside of equation (2.3) – the same way ⊕ moves its place in (a ⊗ b) ⊕ (a ⊗ c) to give a ⊗ (b ⊕ c), where a is analogous to a message. By starting from the leaves, and calculating the messages towards the root, we obtain the marginal 2.1. BELIEF PROPAGATION 35 Figure 2.1: The figure shows a loop-free factor-graph and the direction of messages sent between variable and factor nodes in order to calculate the marginal over the grey region. over the root node as the product of incoming messages q(xk ) = O qI→k (xk ) (2.4) I∈∂k In fact, we can assume any subset of variables xA (and factors within those variables) to be the root. Then, the set of all incoming messages to A, produces the marginal  q(xA )  O =  fI (xI )  I⊆A  O qJ→i (xi ) i∈A,J∈∂i,J6⊆A Example 2.1.1. Consider the joint form represented by the factor-graph of figure 2.1 q(x) O = fA (xA ) A∈{I,J,K,L,O,T,U,V,W,X,Y,Z} and the problem of calculating the marginal over x{i,j,k} (i.e., the shaded region). q(x{i,j,k} ) = M O fA (xA ) x\{i,j,k} A∈{I,J,K,L,O,T,U,V,W,X,Y,Z} We can move the ⊕ inside the ⊗ to obtain q(x{i,j,k} ) = fI (xI ) ⊗ qL→i (xi ) ⊗ qK→i (xi ) ⊗ qV→j (xj ) ⊗ qW→j (xj ) ⊗ qK→k (xk ) (2.5) 36 CHAPTER 2. APPROXIMATE INFERENCE where each term qA→i factors the summation on the corresponding sub-tree. For example qL→i = M fL (xL ) xw Here the message qW→j is itself a computational challenge qW→j = M O fA (xA ) x\j A∈{W,U,Y,X,O,T,Z} However we can also decompose this message over sub-trees qW→j = M fA (xA ) ⊗ qe→W (xe ) ⊗ qr→W (xr ) x\j where again using distributive law qe→W and qr→W further simplify based on the incoming messages to the variable nodes xr and xe . This procedure is known as Belief Propagation (BP), which is sometimes prefixed with the corresponding semiring e.g., sum-product BP. Even though BP is only guaranteed to produce correct answers when the factor-graph is a tree (and few other cases [8, 22, 310, 313]), it performs surprisingly well when applied as a fixed point iteration to graphs with loops [106, 225]. In the case of loopy graphs the message updates are repeatedly applied in the hope of convergence. This is in contrast with BP on trees, where the messages – from leaves to the root – are calculated only once. The message update can be applied to update the messages either synchronously or asynchronously and the update schedule can play an important role in convergence (e.g., [94, 173]). Here, for numerical stability, when the ⊗ operator has an inverse, the messages are normalized. We use ∝ to indicate this normalization according to the mode of inference b pI→i (xi ) ∝ M fI (xI ) x\i b pi→I (xi ) ∝ O b pj→I (xj ) ∝ PI→i (b p∂I\i→I )(xi ) (2.6) ∝ Pi→I (b p∂i\I→i )(xi ) (2.7) j∈∂I\i O b pJ→i (xi ) J∈∂i\I b p(xI ) ∝ fI (xI ) ∝ O O b piI(xi ) (2.8) i∈∂I b p(xi ) b pI→i (xi ) (2.9) I∈∂i Here, for general graphs, b p(xi ) and b p(xI ) are approximations to p(xi ) and p(xI ) of equation (1.17). The functionals Pi→I (b p∂i\I→i )(.) and PI→i (b p∂I\i→I )(.) cast the BP message updates as an operator on a subset of incoming messages – i.e., b p∂i\I→i = {b pJ→i | J ∈ ∂i \ I}. We use these functional notation in 2.1. BELIEF PROPAGATION 37 presenting the algebraic form of survey propagation in section 2.5. Another heuristic that is often employed with sum-product and min-sum BP is the Damping of messages. This often improves the convergence when BP is applied to loopy graphs. Here a damping parameter λ ∈ (0, 1] is used to partially update the new message based on the old one – e.g., for sum-produt BP we have b pI→i (xi ) ∝ λb pI→i (xi ) + (1 − λ) X fI (xI ) x\i b pi→I (xi ) ∝ λb pi→I (xi ) + (1 − λ)  Y  Y b pj→I (xj ) (2.10) j∈∂I\i  b pJ→i (xi ) (2.11) J∈∂i\I (2.12) where as an alternative one may use the more expensive form of geometric damping (where λ appears in the power) or apply damping to either variable-to-factor or factor-to-variable messages but not both. Currently – similar to several other ideas that we explore in this thesis – damping is a “heuristic”, which has proved its utility in applications but lacks theoretical justification. 2.1.1 Computational Complexity The time complexity of a single variable-to-factor message update (equation (2.2)) is O(|∂i| |Xi |). To save on computation, when a variable has a large number of neighbouring factors, and if none of the ⊕ message values is equal to the annihilator 1 (e.g., zero for the sum-product), and the inverse of ⊗ is defined, we can derive the marginals once, and produce variable-to-factor messages as b pi→I (xi ) = b p(xi ) ⊗ (b pI→i (xi ))−1 ∀I ∈ ∂i (2.13) This reduces the cost of calculating all variable-to-factor messages leaving a variable from O(|Xi | |∂i|2 ) to O(|Xi | |∂i|). We call this type of BP update, variable-synchronized (v-sync) update. Note that since max is not Abelian on any non-trivial ordered set, min-max BP does not allow this type of variablesynchronous update. This further motivates using the sum-product reduction of min-max inference. The time complexity of a single factor-to-variable message update (equation (2.3)) is O(|XI |). However as we see in section 2.2, sparse factors allow much faster updates. Moreover in some cases, we can reduce the time-complexity by calculating all the factor-to-variable messages that leave a particular factor at the same time (e.g., section 5.2). We call this type of synchronized update, factor-synchronized (f-sync) update. 38 CHAPTER 2. APPROXIMATE INFERENCE 2.1.2 The limits of message passing By observing the application of distributive law in semirings, a natural question to ask is: can we use distributive law for polynomial time inference on loop-free graphical models over any of the inference problems at higher levels of inference hierarchy or in general any inference problem with more than one marginalization operation? The answer to this question is further motivated by the fact that, when loops exists, the same scheme may become a powerful approximation technique. When we have more than one marginalization operations, a natural assumption in using distributive law is that the expansion operation distributes over all the marginalization operations – e.g., as in min-max-sum (where sum distributes over both min and max), min-max-min, xor-or-and. Consider the simplest case with three 1 2 1 2 1 M O operators ⊕, ⊕ and ⊗, where ⊗ distributes over both ⊕ and ⊕. Here the integration problem is q(∅) 2 M = xJ xJ 2 1 fI (xI ) I where J1 and J2 partition {1, . . . , N }. 1 2 In order to apply distributive law for each pair (⊕, ⊗) and (⊕, ⊗), we need to be able to commute 1 2 ⊕ and ⊕ operations. That is, we require 1 M 2 M xA xB g(xA∪B ) = 2 1 M M xB xA g(xA∪B ). for the specified A ⊆ J1 and B ⊆ J2 . Now, consider a simple case involving two binary variables xi and xj , where g(x{i,j} ) is xj xi 0 1 0 a b 1 c d Applying equation (2.14) to this simple case (i.e., A = {i}, B = {j}), we require 1 2 1 (a⊕b)⊕(c⊕d) = 2 1 2 (a⊕b)⊕(c⊕d). The following theorem leads immediately to a negative result: Theorem 2.1.1. [91]: 1 2 1 2 1 2 (a⊕b)⊕(c⊕d) = (a⊕b)⊕(c⊕d) ⇔ 1 2 ⊕=⊕ ∀a, b, c (2.14) 2.2. TRACTABLE FACTORS 39 which implies that direct application of distributive law to tractably and exactly solve any inference problem with more than one marginalization operation is unfeasible, even for tree structures. This limitation was previously known for marginal MAP inference [241]. Min and max operations have an interesting property in this regard. Similar to any other operations for min and max we have min max g(xI∪J ) 6= max min g(xI∪J ) xJ However, xI xI xJ if we slightly change the inference problem (from pure assignments xJl ∈ XJl to a distribution over assignments; a.k.a. mixed strategies), as a result of the celebrated minimax theorem [300], the min and max operations commute – i.e., min max s(xJ ) s(xI ) X s(xJ )g(xI∪J )s(xI ) xI∪J = max min s(xI ) s(xJ ) X s(xI )g(xI∪J )s(xJ1 ) xI∪J where s(xJ1 ) and s(xJ2 ) are mixed strategies. This property has enabled addressing problems with min and max marginalization operations using message-passing-like procedures. For example, Ibrahimi et al. [140] solve this (mixed-strategy) variation of min-max-product inference. Message passing procedures that operate on graphical models for game theory (a.k.a. “graphical games”) also rely on this property [161, 232]. 2.2 Tractable factors The applicability of graphical models to discrete optimization problems is limited by the size and number of factors in the factor-graph. In section 2.2.1 we review some of the large order factors that allow efficient message passing, focusing on the sparse factors used in part II to solve combinatorial problems. In section 2.2.2 we introduce an augmentation procedure similar to cutting plane method to deal with large number of “constraint” factors. 2.2.1 Sparse factors The factor-graph formulation of many interesting combinatorial problems involves sparse (high-order) factors. Here, either the factor involves a large number of variables, or the variable domains, Xi , have large cardinality. In all such factors, we are able to significantly reduce the O(|XI |) time complexity of calculating factor-to-variable messages. Efficient message passing over such factors is studied by several works in the context of sum-product and min-sum inference classes [123, 249, 269, 291, 292]. Here we confine our discussion to some of the factors used in part II. The application of such sparse factors are common in vision. Many image labelling solutions to problems such as image segmentation and stereo reconstruction, operate using priors that enforce sim- 40 CHAPTER 2. APPROXIMATE INFERENCE ilarity of neighbouring pixels. The image processing task is then usually reduced to finding the MAP solution. However pairwise potentials are insufficient for capturing the statistics of natural images and therefore higher-order-factors have been employed [168–170, 174, 183, 234, 268]. The simplest form of sparse factor in combinatorial applications is the Potts factor, f{i,j} (xi , xj ) = 1(xi = xj ). This factor assumes the same domain for all the variables (Xi = Xj ∀i, j) and its tabular form is non-zero only across the diagonal. It is easy to see that this allows the marginalization of equation (2.3) to be performed in O(|Xi |) rather than O(|Xi | |Xj |). Another factor of similar form is the inverse Potts factor, f{i,j} (xi , xj ) = 1(xi 6= xj ), which ensures xi 6= xj . In fact any pair-wise factor that is a constant plus a band-limited matrix allows O(|Xi |) inference (e.g., factors used for bottleneck TSP in section 5.2.2). Another class of sparse factors is the class of cardinality factors, where Xi = {0, 1} and the factor P is defined based on only the number of non-zero values –i.e., fI (xI ) = g( i∈∂I xi ). Gail et al. [105] P proposes a simple O(|∂I| K) method for f(xI ) = 1(( i∈∂I xi ) = K). We refer to this factor as K-of-N P factor and use similar algorithms for at-least-K-of-N fI (xI ) = 1(( i∈∂I xi ) ≥ K) and at-most-K-of-N P fI (xI ) = 1(( i∈∂I xi ) ≤ K) factors. An alternative is the linear clique potentials of Potetz and Lee [249]. O(|∂I| |Xi The authors propose a |2 ) (assuming all variables have the same domain Xi ) marginalization scheme for a general P family of factors, called linear clique potentials, where fI (xI ) = g( i∈∂I xi wi ) for a nonlinear gI (.). For sparse factors with larger non-zero values (i.e., larger k), more efficient methods evaluate the sum of pairs of variables using auxiliary variables forming a binary tree and use the Fast Fourier Transform to reduce the complexity of K-of-N factors to O(|∂I| log(|∂I|)2 ) (see [292] and references in there). Here for completeness we provide a brief description of efficient message passing through at-leastK-of-N factors for sum-product and min-sum inference. K of N factors for sum-product Since variables are binary, it is convenient to assume all variable-to-factor messages are normalized such that b pj→I (0) = 1. Now we calculate b pI→i (0) and b pI→i (1) for at-least-K-of-N factors, and then normalize them such that b pI→i (0) = 1. In deriving b pI→i (0), we should assume that at least K other variables that are adjacent to the factor fI are nonzero and extensively use the assumption that b pj→I (0) = 1. The factor-to-variable message of equation (2.6) becomes b pI→i (0) =  Y X  X b 1 ( xj ) ≥ K pj→I (xj ) x\i j∈∂I\i = X Y A⊆∂I\i, |A|≥K j∈A j∈∂I\i b pj→I (1) (2.15) 2.2. TRACTABLE FACTORS 41 where the summation is over all subsets A of ∂I \ i that have at least K members. pI→i  Then, to calculate b  (1) we follow the same procedure, except that here the factor is replaced by P 1 ( j∈∂I\i xj ) ≥ K − 1 . This is because here we assume xi = 1 and therefore it is sufficient for K − 1 other variables to be nonzero. Note that in equation (2.15), the sum iterates over “all” A ⊆ ∂I \ i of size at least K. For high-order factors fI (where |I| is large), this summation contains an exponential number of terms. Fortunately, we can use dynamic programming to perform this update in O(|∂I| K). The basis for the recursion of dynamic programming is that, starting from B = I \ i, a variable xk ∈ xK can be either zero or one X Y b pj→I (1) = A∈{K⊆B,|K|≥k} j∈A  X Y b pj→I (1) + b pk→I (1)  A∈{K⊆B\k, |K|≥K} j∈A  X Y b pj→I (1) A∈{K⊆B\k, |A|≥K−1} j∈A where each summation on the r.h.s. can be further decomposed using similar recursion. Here, dynamic program reuses these terms so that each is calculated only once. K of N factors for min-sum Here again, it is more convenient to work with normalized variable-to-factor messages such that b pj→I (0) = ⊗ 1 = 0. Moreover in computing the factor-to-variable message b pI→i (xi ) we also normalize it such that b pI→i (0) = 0. Recall the objective is to calculate b pI→i (xi ) =  X  X b pj→I (xj ) xj ) = K min 1 ( x\i j∈∂I j∈∂I\i for xi = 0 and xi = 1. We can assume the constraint factor is satisfied, since if it is violated, the identity function evaluates to +∞ (see equation (1.20)). For the first case, where xi = 0, K out of |∂I \ i| neighbouring variables P to factor I should be non-zero (because 1(( j∈∂I xj ) = K) and xi = 0). The minimum is obtained if we assume the neighbouring variables with smallest b pj→I (1) are non-zero and the rest are zero. For xi = 1, only K − 1 of the remaining neighbouring variables need to be non-zero and therefore we need to find K − 1 smallest of incoming messages (b pj→I (1) ∀j ∈ ∂I \ i) as the rest of messages are zero due to normalization. By setting the b pI→i (0) = 0, and letting A(K) ⊂ ∂I \ i identify the set of K smallest incoming 42 CHAPTER 2. APPROXIMATE INFERENCE messages to factor I, the b pI→i (1) is given by b pI→i (1) =  X   b pj→I (1) − j∈A(K) X  b pj→I (1) = b pj K →I (1) j∈A(K−1) where j K is the index of K th smallest incoming message to I, excluding b pi→I (1). A similar procedure can give us the at-least-K-of-N and at-most-K-of-N factor-to-variable updates. If K is small (i.e., a constant) we can obtain the K th smallest incoming message in O(K |∂I|) time, and if K is in the order of |∂I| this requires O(|∂I| log(|∂I|)) computations. For both min-sum and sum-product, we incur negligible additional cost by calculating “all” the outgoing messages from factor I simultaneously (i.e., f-sync update). 2.2.2 Large number of constraint factors We consider a scenario where an (exponentially) large number of factors represent hard constraints (see definition 1.3.2) and ask whether it is possible to find a feasible solution by considering only a small fraction of these constraints. The idea is to start from a graphical model corresponding to a computationally tractable subset of constraints, and after obtaining a solution for a sub-set of constraints (e.g., using min-sum BP), augment the model with the set of constraints that are violated in the current solution. This process is repeated in the hope that we might arrive at a solution that does not violate any of the constraints, before augmenting the model with “all” the constraints. Although this is not theoretically guaranteed to work, experimental results suggest this can be very efficient in practice. This general idea has been extensively studied under the term cutting plane methods in different settings. Dantzig et al. [77] first investigated this idea in the context of TSP and Gomory et al. [118] provided a elegant method to identify violated constraints in the context of finding integral solutions to linear programs (LP). It has since been used to also solve a variety of nonlinear optimization problems. In the context of graphical models, Sontag and Jaakkola [284] (also [286]) use cutting plane method to iteratively tighten the marginal polytope – that enforces the local consistency of marginals; see section 2.3 – in order to improve the variational approximation. Here, we are interested in the augmentation process that changes the factor-graph (i.e., the inference problem) rather than improving the approximation of inference. The requirements of the cutting plane method are availability of an optimal solver – often an LP solver – and a procedure to identify the violated constraints. Moreover, they operate in real domain Rd ; hence the term “plane”. However, message passing can be much faster than LP in finding approximate MAP assignments for structured optimization problems [325]. This further motivates using augmentation in the context of message passing. In sections 4.5 and 5.2, we use this procedure to approximately solve TSP and graph-partitioning respectively. Despite losing the guarantees that make cutting plane method very powerful, augmentative 2.3. INFERENCE AS OPTIMIZATION 43 message passing has several advantages: First, message passing is highly parallelizable. Moreover by directly obtaining integral solutions, it is much easier to find violated constraints. (Note the cutting plane method for combinatorial problems operates on fractional solutions, whose rounding may eliminate its guarantees.) However, due to non-integral assignments, cutting plane methods require sophisticated tricks to find violations. For example, see [12] for application of cutting plane to TSP. 2.3 Inference as optimization The variational approach is concerned with probabilities, and therefore this section is limited to operations on real domain. In the variational approach, sum-product inference is expressed as b p = argbp min D(b p | pβ ) (2.16) where D(b p | pβ ) is the KL-divergence between our approximation b p and the true distribution p at inverse temperature β (see example 1.1.4). Here b p is formulated in terms of desired marginals. Expanding the definition of KL-divergence and substituting p from equation (1.18), equation (2.16) becomes b p = argbp min X x x argbp min X X b p(x) log(b p(x)) − β X b p(x) log(p(x)) ≡ (2.17) ! b p(x) log(b p(x)) − β x X b p(x) x log(fI (xI )) (2.18) I  P Q β from equation (2.17) where we have removed the log partition function log(q(∅, β)) = log f (x ) I I x I because it does not depend on b p. This means that the minimum of equation (2.18) is log(q(∅, β)), which appears when D(b p | pβ ) = 0 – i.e., b p = pβ . The quantity being minimized in equation (2.18), known as variational free energy, has two terms: the (expected) energy term ! def U(b p, p) = − X b p(x) x X log(fI (xI )) I and the entropy term H(b p) = − X b p(x) log(b p(x)) . x Different families of representations for b p(.) (in terms of its marginals) produces different inference procedures such as BP, Generalized BP and Mean-field method [303]. Max-product (or min-sum) inference is retrieved as zero-temperature limit of sum-product infer- 44 CHAPTER 2. APPROXIMATE INFERENCE ence: argbp min βU(b p, p) − H(b p) X X  b ≡ argbp min − p(x) log(fI (xI )) b p(.) = lim β→+∞ x (2.19) I where the energy term is linear in b p and therefore the optima will be at a corner of probability simplex, reproducing the MAP solution. Here by defining f 0 (x) ← 1 f(x) , we get the min-sum form X b p(.) = argbp min b p(xI ) X x log(fI0 (xI )  I We observe that using a second parameter α, min-max inference is also retrievable1 b p(.) = lim α→+∞ argbp min ≡ argbp min X X b p(x) x X log(fI (xI ))α  I  b p(xI ) max log(fI (xI )) (2.20) I x where again due to the linearity of the objective in b p, the optima are at the extreme points of the probability simplex. To retrieve sum-product BP update equations from divergence minimization of equation (2.16), we p(xi ). Here, we present this reparametrization will reparameterize b p using its marginals b p(xI ) and b in a more general form, as it holds for a any commutative semiring where (Y ∗ , ⊗) is an abelian group. Proposition 2.3.1. If the ⊗ operator of the semiring has an inverse and the factor-graph is loop-free, we can write p(x) as N b p(x) = N i p(xI ) Ib (2.21)  b p(xi ) (|∂i| − 1) def where the inverse is w.r.t ⊗ and the exponentiation operator is defined as a b = |a ⊗ .{z . . ⊗ a}. b times Proof. For this proof we use the exactness of BP on trees and substitute BP marginals equation (2.9) 1 Here we assume there are no ties at the min-max solution i.e., fI (x∗I ) > fJ (x∗J ) ∀J 6= I. 2.3. INFERENCE AS OPTIMIZATION 45 into equation (2.21): N N p(xI ) Ib =  p(xi ) (|∂i| − 1) i b N N pi→I (xi ) I fI (xI ) i∈∂I b  N N pi→I (xi ) i I∈∂i b N I fI (xI ) pi→I (xi ) i∈∂I b =  pI→i (xi ) (|∂i| − 1) I∈∂i b N N i = N O I fI (xI ) = p(x) where we substituted the variable-to-factor messages in the denominator with factor-to-variable mes⊗ sages according to equation (2.2) and used the definition of inverse (i.e., a ⊗ a−1 = 1) to cancel out the denominator. Intuitively, the denominator is simply cancelling the double counts – that is since b p(xi ) is counted once for any I ∈ ∂i in the nominator, the denominator removes all but one of them. 2.3.1 Sum-product BP and friends Q Rewriting equation (2.21) for sum-product ring b p(x) = Q energy minimization, we get b p argbp min = β X p(xI ) Ib p(xi )|∂i|−1 ib and replacing b p in the variational b p(xI )fI (xI ) (2.22) I  −  XX I such that X b p(xI )) − p(xI ) log(b xI b p(xI ) = b p(xi ) ! X i ∀i, I ∈ ∂i (1− | ∂i |) X b p(xi ) log(b p(xi )) (2.23) xi (2.24) x\i X b p(xi ) = 1 (2.25) xi where the energy term equation (2.22) is exact and the quantity that is minimized is known as Bethe free energy [30, 328]. The constraints equations (2.24) and (2.25) ensure that marginals are consistent and sum to one. Following the lead of Yedidia et al. [328], Heskes [132] showed that stable fixed points of sum-product BP are local optima of Bethe free energy. The optimization above approximates the KL-divergence minimization of equation (2.18) in two ways: (I) While the marginal constraint ensure local consistency, for general factor-graphs there is no guarantee that even a joint probability b p with such marginals exists (i.e., local consistency conditions outer-bound marginal polytope; the polytope of marginals realizable by a join probability p(x)). (II) Bethe entropy is not exact for loopy factor-graphs. Using the method of Lagrange multipliers to enforce the local consistency constraints and setting the derivatives of equation (2.23) w.r.t. b p to zero, recovers sum-product BP updates [327, 328]. This optimization view of inference has inspired many 46 CHAPTER 2. APPROXIMATE INFERENCE sum-product inference techniques with convex entropy approximations and convergence guarantees [113, 126, 134, 206, 293, 304, 319, 329]. 2.3.2 Min-sum message passing and LP relaxation LP relaxation of min-sum problem seeks marginals b p(xI )∀I b p = X argbp min b p(xI )fI (xI ) (2.26) ∀i, I ∈ ∂i (2.27) I such that X b p(xI ) = b p(xi ) x\i X b p(xi ) = 1 xi If integral (i.e., b p(xi ) = 1(xi = x∗i ) for some x∗ = {x∗1 , . . . , x∗N }), this LP solution is guaranteed to be optimal (i.e., identical to equation (2.19)). Taking the zero temperature limit (lim β → ∞) of the Bethe free energy of equations (2.22) and (2.23), for any convex entropy approximation [126, 133, 304, 305], ensures that sum-product message passing solution recovers the Linear Programming (LP) solution [311]. Moreover, replacing the summation with maximization (which again corresponds to temperature limit) in the resulting convex message passing, produces the convex min-sum message passing, which agrees with LP relaxations, under some conditions (e.g., when there are no ties in beliefs). The general interest in recovering LP solutions by message passing is to retain its optimality guarantees while benefiting from the speed and scalability of message passing that stems from exploitation of graphical structure [324]. One may also interpret some of these convex variations as replicating variables and factors while keeping the corresponding messages identical over the replicates [271]. After obtaining message updates, the number of replicates are allowed to take rational values (Parisi introduced a similar trick for estimation of the partition function using replica trick [55, 211]). Another notable variation for approximate MAP inference is max-product-linear-program , which performs block coordinate descend in the space of duals for equation (2.26). MPLP is guaranteed to converge and is often able to recover LP solution [114, 285]. Finally dual (and primal) decomposition methods minimize factors separately and combine their estimates in a way that agrees with sub-gradient in each iteration [42, 155, 175, 176]. 2.3.3 Min-max and other families By rephrasing the variational min-max inference of equation (2.20) b p = argbp min X x  b p(xI ) max log(fI (xI )) I 2.4. LOOP CORRECTIONS 47 in terms of marginals b p(xI ) and enforcing marginal consistency constraints, we obtain the following LP relaxation b p = such that argbp min y X b p(xI )fI (xI ) ≤ y (2.28) ∀I xI X ∀i, I ∈ ∂i b p(xi ) p(xI ) = b x\i X b p(xi ) = 1 xi which surprisingly resembles our sum-product reduction of min-max inference in equation (1.25). Here P p(xI )fI (xI ) ≤ y is a relaxation of our sum-product factor 1(fI (xI ) ≤ y) in equation (1.27). x b I Claim 2.3.2. y in equation (2.28) lower bounds the min-max objective y ∗ . Moreover, if b p is integral, then y = y ∗ and x∗ is the optimal min-max assignment. Proof. The integral solution b p, corresponds to the following optimization problem x∗ such that = argx min y (2.29) fI (xI ) ≤ y ≡ argx min max fI (xI ) I which is the exact min-max inference objective. Therefore, for integral b p, we obtain optimal min-max solution. On the other hand by relaxing the integrality constraint, because of the optimality guarantee of LP, the LP solution y can not be worse than the integral solution and its corresponding value y ∗ . This lower bound complements the upper bound that we obtain using a combination of sum-product reduction and an incomplete solver (such as perturbed BP of section 2.6.3) and can be used to assess the optimality of a min-max solution. The only other extensively studied inference problem in the inference hierarchy of section 1.2 is maxsum-product (a.k.a. marginal MAP) inference [80, 152, 202]. In particular variational formulation of max-sum-product inference [195], substitutes the entropy term in equation (2.17) with conditional entropy. 2.4 Loop corrections In this section we first review the region-based methods that account for short loops in section 2.4.1 and then show how to perform loop correction by taking into account the message dependencies in section 2.4.2. In section 2.4.3 we introduce a loop correction method that can benefit from both types 48 CHAPTER 2. APPROXIMATE INFERENCE of loop corrections, producing more accurate marginals. While the region-based techniques can be used to directly estimate the integral, the approximation techniques that take message dependencies into account are only applied for estimation of marginals. 2.4.1 Short loops We consider a general class of methods that improve inference in a loopy graphical model by performing exact inference over regions that contain small loops. The earliest of such methods is junction-tree [148, 186], which performs exact inference with computation cost that grows exponentially in the size of largest region –i.e., tree width [57]. Here, regions form a tree and the messages are passed over regional intersections. While this algorithm is still popular in applications that involve certain class of graphs [35] or when the exact result is required, most graphs do not have a low tree width [157, 167]. An extension to junction tree is the junction graph method [6] that removes the requirement for the regions to form a tree. For this, the proxy between two regions is a subset of their intersection (rather than the whole intersection) and one still requires the regions that contain a particular variable to form a tree. Similar ideas are discussed under the name of cluster graphs in [171]. Inspired by the connection between Bethe free energy and belief propagation (see section 2.3), Yedidia et al. [328] proposed Generalized BP that minimizes Kikuchi approximation to free energy (a.k.a. Cluster Variational Method [165, 246]). Here the entropy approximation is obtained from a region-graph. A region ρ is a collection of connected variables V(ρ) and a set of factors F(ρ) such that each participating factor depends only on the variables included in the region. To build the CVM regiongraph2 , one starts with predefined top (or outer) regions such that each factor is included in at least one region. Then, we add the intersection of two regions (including variables and factors) recursively until no more sub(inner)-region can be added. Each region is then connected to its immediate parent. A region-graph, reparameterizes b p(.) in terms of its marginals over the regions b p(x) = Y b p(xV(ρ) )c(ρ) (2.30) ρ where c(ρ) is the counting number for region ρ and ensures that each variable and factor is counted only once. This number is recursively defined by Möbius formula for inner regions: c(ρ) = 1 − X c(ρ) ρ0 ⊃ρ where ρ0 is an ancestors of ρ in the region graph.3 2 3 Here we are making a distinction between a general region graph and a CVM region-graph. More accurately V(ρ) ⊆ V(ρ0 ). (2.31) 2.4. LOOP CORRECTIONS 49 Similar to BP, by substituting the reparametrization of equation (2.30) into the variational free energy minimization of equation (2.18) we get  b p = argbp min s.t. X X c(ρ)  ρ  X b p(xV(ρ) )  xV(ρ) b p(xV(ρ0 ) ) = b p(xV(ρ) ) X   fI (xI ) − b p(xV(ρ) ) log(b p(xV(ρ) )) I∈F (ρ) ∀ρ ⊂ ρ0 (2.32) x\V(ρ) which is known as Kikuchi approximation to free energy [165]. The constraints of equation (2.32) ensure that marginals are consistent across overlapping regions. Solving this constraint optimization using the method of Lagrange multipliers, yields a set of recursive equations that are known as Generalized BP equations [328]. Again a region-based approximation is exact only if the region-graph has no loops. A region-graph without restrictions on the choice of regions generalizes junction-graph method as well. The general construction of the region graph only requires that the counting numbers of all the regions to which a variable (or a factor) belong, sum to 1 [327]. For different criteria on the choice of regions see also [235, 314, 317]. 2.4.2 Long loops In graphical models with long-range correlation between variables, region-based methods are insufficient. This is because their complexity grows exponentially with the number of variables in each region and therefore they are necessarily inefficient account for long loops in the graph. A class of methods for reducing long-range correlations are methods based on cut-set conditioning [245], where a subset of variables are clamped, so as to remove the long-range correlations that are formed through the paths that include the cut-set. For example, consider a Markov network in the form of a cycle. By fixing any single variable, the reduced factor graph becomes a tree and therefore allows exact inference. Several works investigate more sophisticated ideas in performing better inference by clamping a subset and the resulting theoretical guarantees [78, 89, 312]. A closely related idea is RaoBlackwellization (a.k.a. collapsed MCMC; see section 2.6.1), a hybrid approach to inference [108] where particles represent a partial assignment of variables and inference over the rest of variables is performed using a deterministic method. The deterministic inference method such as BP is used to calculate the value of the partition function, for each possible joint assignment of the variables that are not collapsed. Then collapsed particles are sampled accordingly. This process in its general form is very expensive, but one could reduce the cost, depending on the structure of the network [32]. The loop calculus of Chertkov [60][61] expands the free energy around the Bethe approximation, with one term per each so-called generalized loop in the graph. Since the number of loops grows exponentially in the number of variables, this expansion does not provide a practical solution. Some 50 CHAPTER 2. APPROXIMATE INFERENCE attempts have been made to to make this method more practical by truncating the loop series [117]. While the original loop series was proposed for binary valued and pairwise factors, it has been generalized to arbitrary factor-graphs [315, 320] and even region-graphs [334]. Another class of approximate inference methods perform loop correction by estimating the message dependencies in a graphical model [217, 220, 262]. These methods are particularly interesting as they directly compensate for the violated assumption of BP – i.e., corresponding to independent set of incoming messages. For the benefit of clarity, we confine the loop correction equations in this section and its generalization in the next section to Markov networks (i.e., |∂I| = 2); see [254] for our factor-graph versions. Although the previous works on loop corrections have been only concerned with sum-product inference, here we present loop corrections for a general commutative semiring (Y ∗ , ⊕, ⊗) in which the operation ⊗ has an inverse (i.e., (Y ∗ , ⊗) is a group). In particular this means these loop corrections may be used for min-sum class of inference. Here we rewrite BP update equations (2.2) and (2.3) for Markov networks4 b pi→j (xi ) ∝ M O f{k,i} (x{k,i} ) ⊗ b pk→i (xk ) (2.33) \xi k∈∆i\j b p(xi ) ∝ MO f{k,i} (xk,i ) b pk→i (xk ) (2.34) \xi k∈∆i Figure 2.2(left) shows the BP messages on a part of Markov network. Here if the Markov network is a tree, BP’s assumption that b ps→i , b po→i and b pn→i are independent is valid, because these messages summarize the effect of separate sub-trees on the node i. However if the graph has loops, then we use b h(x∆i\j ) to denote message dependencies. If we had access to this function, we could easily change the BP message update of equation (2.33) to b pi→j (xi ) ∝ b h(x∆i\j ) ⊗ M O f{k,i} (x{k,i} ) ⊗ b pk→i (xk ) \xi k∈∆i\j Since it is not clear how to estimate h(x∆i\j ), we follow a different path, and instead estimate the so-called cavity distribution, which we denote by b h(x∆i ), which is simply the joint marginal over the Markov blanket after making a cavity – i.e., removing a variable i and its neighbouring factors fI ∀I ∈ ∂i. However, since the missing information is the “dependence” between the messages, b h(x∆(i) ) has a degree N of freedom w.r.t. individual marginals – i.e., it can be inaccurate by a factor of j∈∆(i) gj (xj ) for some gj ∀j, without affecting the loop-corrected message passing procedure. This degree of freedom is essentially equivalent to the freedom in initialization of BP messages. In the following, we show the resulting loop-corrected message passing. But first we write BP updates in a different form. 4 Note that b pi→j (xi ) is over Xi rather the conventional way of defining it on Xj . This formulation is the same as original BP equation for Markov network if the graph does not have a loop of size two. 2.4. LOOP CORRECTIONS 51 Figure 2.2: (left) BP messages on a Markov network and the ideal way dependencies should be taken into account. (right) BP marginal over extended Markov blanket ∇j for node j and the message dependencies over the Markov blanket ∆i for node i. Define the extended Markov blanket ∇i = ∆i ∪ {i} be the Markov blanket of i plus i itself, see figure 2.2 (right). We can write BP marginals over ∇i b p(x∇i ) ∝ O f{i,k} (x{i,k} ) ⊗ b pk→i (xk ) (2.35) M b p(x∇i )/f{i,j} (x{i,j} ) (2.36) b p(x∇i ) (2.37) k∈∆i Using this, equation (2.33) simplifies to: b pi→j (xi ) ∝ \xi b p(xk ) ∝ M \xi Now assume we are given the dependency between the messages b pk→i (xk ) ∀k ∈ ∆i in the form of b h(x∆i ). This means we can re-express equation (2.35) as b p(x∇i ) ∝ b h(x∆i ) O f{i,k} (x{i,k} ) ⊗ b pk→i (xk ) (2.38) k∈∆i By enforcing the marginal consistency of b p(x∇i ) and b p(x∇j ) over xi (and xj ) M x\i,j b p(x∇i )/f{i,j} (xi , xj ) = M b p(x∇j )/f{i,j} (xi , xj ) x\i,j we retrieve a message update similar to that of BP (in equation (2.33)) that incorporates the dependency 52 CHAPTER 2. APPROXIMATE INFERENCE between BP messages (t+1) b pi→j (xi ) L ∝L \xi b p(x∇i )/f{i,j} (x{i,j} ) p(x∇j )/f{i,j} (x{i,j} ) \xi b (t) ⊗b pi→j (xi ) (2.39) It is easy to verify that this update reduces to BP updates (equation (2.33)) when b h(x∂i ) is uniform – that is we do not have any dependency between messages. The loop-correction method of Mooij et al. [220] is similar, however this interpretation does not apply to their updates for factor graphs. We extend the same idea to perform loop-correction for overlapping regions of connected variables in section 2.4.3 where we pass the messages from one region to the outer boundary of another region. The main computational cost in these loop correction methods is estimating b h(x ), the message ∆i dependencies. We use clamping to perform this task. For this we remove xi and all the immediately depending factors from the graph. Then we approximate the marginal b h(x∆i ) by reduction to integrab tion; see section 1.4.1. Note that the h(x ) obtained this way contains not only dependencies but also ∆i the individual marginals in the absence of node i (b h(xj ) ∀j ∈ ∆i). However since the messages updates for b pj→i (xj ) ∀j ∈ ∆i, perform “corrections” to this joint probability, we do not need to divide b h(x∆i ) by the individual marginals. 2.4.3 Both message dependencies and short loops Section 2.4.1 presented loop correction methods that improve loopy BP by considering interactions within small clusters of variables, thus taking small loops within these clusters into account. The previous section showed how to account for dependency between BP messages – thus taking long-range correlations into account. In this section we introduce a generalization that performs both types of loop correction. The basic idea is to form regions, and perform exact inference over regions, to take short loops into account. However in performing message passing between these regions, we introduce a method to perform loop correction over these messages. We start by defining a region ρ = {i, . . . , l} as a set of connected variables. Note that this definition is different from definition of region for region-based methods as it only specifies the set of variables, and not factors. Let ∆ρ = {i ∈ ∆j, i 6∈ ρ | j ∈ ρ} be the Markov blanket of region ρ, and as before let ∇ρ = ρ ∪ ∆ρ. def Region ρ1 is a neighbour of ρ2 with neighbourhood ρ1:2 iff ρ1:2 = (∆ρ1 )∩ρ2 6= ∅ – i.e., the Markov blanket of ρ1 intersects with ρ2 (note that ρ1:2 is different from ρ2:1 ). The messages are exchanged on these neighbourhoods and b p1→2 (xρ1:2 ) is a message from region ρ1 to ρ2 . Example 2.4.1. Figure 2.3 shows a set of neighbouring regions (indexed by 1, 2, 3, 4, 5, 6 and 7). Here the region ρ1 receives “overlapping” messages from four other regions. For example the message b p6→1 (xd,i ) overlaps with the message b p5→1 (xd,e ) as well as b p7→1 (xh,i ). Therefore simply writing p(x∇ρ ) 2.4. LOOP CORRECTIONS Figure 2.3: (top) seven regions ρ1 , . . . , ρ7 and the domain of messages sent from each region to ρ1 . Here ρ5:1 is the domain of message from region 5 to region 1. (bottom) the message region-graph shows how these overlapping messages are combined to prevent double-counts. in terms of the factors inside ∇ρ and the incoming messages (as in equation (2.5)) will double-count some variables. Message region-graphs Here, similar to section 2.4.1, we construct a region-graph to track the double-counts. However, here we have one message-region-graph per region ρ. The construction is similar to that of cluster variational methods; we start with the original message-domains (e.g., ρ2:1 ) and recursively add the intersections, until no more message-region γ can be added. Each message-region γ is connected to its immediate parent. figure 2.3 shows the two-layered message-region-graph for region ρ1 . Here, for discussions around a particular message-region-graph we will drop the region-index 1. def Let m(xγ ) = b pπ→1 (xρπ:1 ) ∀π be the top regions in the region-graph, consisting of all the incoming messages to region of interest ρ1 . The Möbius formula (equation (2.31)) gives counting number for message-region (here again the top regions’ counting number is one). A downward pass, starting from top regions, calculates the belief m(xγ ) over each message-region, as the average of beliefs over its parents. 53 54 CHAPTER 2. APPROXIMATE INFERENCE Example 2.4.2. In figure 2.3 the belief m(xe ) is the average of beliefs over m(x{d,e} ) = b p5→1 (xρ5:1 ) and m(x{e,h} ) = b p4→1 (xρ4:1 ) when marginalized over xe . Here the counting number of xe is c({e}) = 1 − (1 + 1) = −1. We require the ⊗ operator of the semiring to have an inverse. Recall the power operator def y k = y ⊗ . . . ⊗ y . For sum-product and min-sum semirings, this operator corresponds to exponentiation and | {z } k times product respectively and it is well-defined also for rational numbers k. Now define the average as def avg({y1 , . . . , yk }) = O  1 yi k (2.40) i Using Pa(γ) to denote the parents of region γ, in the downward pass m(xγ ) ∝ O M avg( m(γ 0 )) γ 0 ∈Pa(γ) (2.41) x\γ where m(xγ ) for top regions are just the incoming messages. N Let fA (xA ) = I⊆A fI (xI ) be the semiring-product of all the factors defined over a subset of A. For example in figure 2.3, f∇ρa (x∇ρa ) is the product of 9 pairwise factors (i.e., all the edges in the figure). After a downward pass, the belief over ∇ρ (analogous to equation (2.35)): ∝ b p(x∇ρ ) f∇ρ (x∇ρ ) ⊗ O  m(xγ ) c(γ) (2.42) ρ that is b p(x∇ρ ) is the semiring product of all the factors inside this region and all the beliefs over messageregions inside its message-region-graph, where double counts are taken into account. For our example, assuming sum-product ring,   −1 −1 b p(x∇ρa ) = f∇ρa (x∇ρa )m(x4,5 ) . . . m(x9,4 ) m(x4 ) . . . m(x9 ) where the semiring-product and inverse are product and division on real domain. At this point we can also introduce an estimate for message dependencies b h(x∂ρ ) into the equation above, and generalize the update of equation (2.39) to L (t+1) b pb→a (xρb:a ) ∝ L \xρ b:a \xsρb:a b p(x∇ρb )/f∇ρa ∩∇ρb (x∇ρa ∩∇ρb ) b p(x∇ρa )/f∇ρa ∩∇ρb (x∇ρa ∩∇ρb ) (t) ⊗ p̃b→a (xρb:a ) (2.43) (t) One last issue to resolve is to define the “effective” message p̃b→a (xρb:a ), which is different from (t) (t) b pb→a (xρb:a ). Since we did not directly use b pb→a (xρb:a ) in the previous iteration, we should not include it directly in this update. Instead we use the message region-graph for region a to calculate the effective 2.4. LOOP CORRECTIONS 55 message: p̃b→a (xρb:a ) = O m(xγ ) c(γ)  (2.44) γ⊆ρb:a The effective message, as defined above (equation (2.44)), can be efficiently calculated in an upward pass in the message region-graph. Starting from the parents of the lowest regions, update the belief m(xγ ) obtained in downward pass equation (2.41) using the new beliefs over its children: m̃(xγ ) = m(xγ ) O L γ 0 ∈Ch(γ) m̃(xγ 0 ) x 0 m(xγ ) (2.45) \γ where Ch(γ) is the set of children of γ in the message region-graph. After the upward pass, the new beliefs over top regions gives us the effective messages p̃a→b (xρa:b ) = m̃(xρa:b ) (2.46) Example 2.4.3. In our example of figure 2.3(bottom), assuming a sum-product ring, since the messageregion-graph only has two layers, we can write the effective message p̃h→a (x{4,9} ) as m(x4 )m(x9 ) P p̃h→a (x{4,9} ) = b ph→a (x{4,9} ) P b ph→a (x{4,9} )) ( x4 ph→a (x{4,9} ))( x9 b (2.47) This form of loop correction, which we call Generalized Loop Correction (GLC), generalizes both correction schemes of sections 2.4.1 and 2.4.2. The following theorem makes this relation to generalized BP more explicit. Theorem 2.4.1. 5 For Markov networks, if the regions {ρ} partition the variables, then any Generalized BP fixed point of a particular region-graph construction is also a fixed point for GLC, when using uniform message dependencies ( i.e., b h(x ) ∝ 1 ∀i, x ). ∆i 2.4.4 ∆i Experiments This section compares different variations of our generalized loop correction method (GLC) for sumproduct ring against BP as well as Cluster Variational Method (CVM; section 2.4.1), loop correction of [220] (LCBP), which does not exactly account for short loops and the Tree Expectation Propagation (TreeEP) [214] method, which also performs some kind of loop correction. For CVM, we use the doubleloop algorithm [133], which is slower than Generalized BP but has better convergence properties.6 We 5 See [254] for the proof. All methods are applied without any damping. We stop each method after a maximum of 1E4 iterations or if the change in the probability distribution (or messages) is less than 1E-9. 6 56 CHAPTER 2. APPROXIMATE INFERENCE report the time in seconds and the error for each method as the average of absolute error in single P P variable marginals – i.e., N1 i \xi | b p(xi ) − p(xi ) |. For each setting, we report the average results over 10 random instances of the problem. We experimented with grids and 3-regular random graphs.7 Both LCBP and GLC can be used without any information on message dependencies. with an initial cavity distribution estimated via clamping cavity variables. In the experiments, full means message dependencies b h was estimated while uniform means b h was set to uniform distribution (i.e., loopcorrection was over the regions only). We use GLC to denote the case where the regions were selected such that they have no overlap (i.e., ρa ∩ ρb = ∅ ∀a, b) and GLC+ when overlapping clusters of some form are used. For example, GLC+(Loop4, full) refers to a setting with message dependencies that contains all overlapping loop clusters of length up to 4. If a factor does not appear in any loops, it forms its own cluster. The same form of clusters are used for CVM. Grids We experimented with periodic spin-glass Ising grids of example 1.1.4. In general, smaller local fields and larger variable interactions result in more difficult problems. We sampled local fields independently from N (0, 1) and interactions from N (0, β 2 ). Figure 2.4a summarizes the results for 6x6 grids for different values of β. We also experimented with periodic grids of different sizes, generated by sampling all factor entries independently from N (0, 1). Figure 2.5a compares the computation time and error of different methods for grids of sizes that range from 4x4 to 10x10. Regular Graphs We generated two sets of experiments with random 3-regular graphs (all nodes have degree 3) over 40 variables. Here we used Ising model when both local fields and couplings are independently sampled from N (0, β 2 ). Figure 2.4b shows the time and error for different values of β. Figure 2.5b shows time versus error for graph size between 10 to 100 nodes for β = 1. Our results suggest that by taking both long and short loops into account we can significantly improve the accuracy of inference at the cost of more computation time. In fact both plots in figure 2.5 show a log-log trend in time versus accuracy which suggests that taking short and long loops into account has almost independently improved the quality of inference. 2.5 Survey Propagation: semirings on semirings Survey propagation (SP) was first introduced as a message passing solution to satisfiability [48] and was later generalized to general CSP [47] and arbitrary inference problems over factor-graphs [208]. Several 7 The evaluations are based on implementation in libdai inference toolbox [221]. 2.5. SURVEY PROPAGATION: SEMIRINGS ON SEMIRINGS (a) spin-glass Ising grid (b) spin-glass Ising model on a 3-regular graph Figure 2.4: Average Run-time and accuracy for 6x6 spinglass Ising grids and 3-regular Ising model for different values of β. Variable interactions are sampled from N (0, β 2 ) and local fields are sampled from N (0, 1). 57 58 CHAPTER 2. APPROXIMATE INFERENCE (a) spin-glass Ising grid (b) spin-glass Ising model on 3-regular graph Figure 2.5: Time vs error for Ising grids and 3-regular Ising models with local field and interactions sampled from a standard normal. Each method in the graph has 10 points, each representing an Ising model of different size (10 to 100 variables). works offer different interpretations and generalizations of survey propagation [46, 177, 199]. Here, we propose a generalization based the same notions that extends the application of BP to arbitrary commutative semirings. Our derivation closely follows and generalizes the variational approach of Mézard and Montanari [208], in the same way that the algebraic approach to BP (using commutative semirings) generalizes the variational derivation of sum-product and min-sum BP. As a fixed point iteration procedure, if BP has more than one fixed points, it may not converge at all. Alternatively, if the messages are initialized properly BP may converge to one of its fixed points. SP equations, take “all” BP fixed points into account. In our algebraic perspective, this accounting of _ _ all fixed points is using a third operation ⊕. In particular, we require that ⊗ also distribute over ⊕, forming a second commutative semiring. We refer to the this new semiring as SP semiring. Let b p·→· be a BP fixed point – that is b p·→· = {∀i, I ∈ ∂i b pi→I = Pi→I (b p∂i\I→i ), b pI→i = PI→i (b p∂I\i→I )} and denote the set of all such fixed points by P. Each BP fixed point corresponds to an approximation to the q(∅), which we denote by Q(b p·→· )(∅) – using this functional form is to emphasize the dependence of this approximation on BP messages. Recall that in the original problem, X is the domain of assignments, q(x) is the expanded form and ⊕-marginalization is (approximately) performed by BP. In the case of survey propagation, P is domain of assignments and the integral Q(b p·→· )(∅) evaluates a particular 2.5. SURVEY PROPAGATION: SEMIRINGS ON SEMIRINGS 59 Table 2.1: The correspondence between BP and SP Belief Propagation Survey Propagation domain: x ∀i b p·→· xi b pi→I , b pI→i X P ∀i, I ∈ ∂i expanded form: q(x) Q(b p·→· )(∅) x q(x) Q(∅)(∅) = marginalization: L p(xi ) ∝ x\i p(x) S(b pI→i ) ∝ integration: q(∅) = L _ L p·→· )(∅) b p·→· Q(b _ L p·→· ) \b pI→i P(b factors: ∀I fI (xI ) e I (b e i (b e i↔I (b P p∂I→I )(∅), P p∂i\I→i )(∅) and P pi→I , b pI→i )(∅)−1 ∀i, I ∈ ∂i p·→· )(∅) is the new expanded form. assignment b p·→· to all the messages – i.e., Q(b _ In this algebraic perspective, SP efficiently performs a second integral using ⊕ over all fixed points: Q(∅)(∅) = _ M b p·→· ∈P Q(q·→· )(∅) (2.48) Table 2.1 summarizes this correspondence. Our derivation requires (Y ∗ , ⊗) to be an Abelian group (i.e., every element of Y ∗ has an inverse w.r.t. ⊗). The requirement for invertablity of ⊗ is because we need to work with normalized BP and SP messages. In section 2.5.4 we introduce another variation of SP that simply counts the BP fixed points and relaxes this requirement. 2.5.1 Decomposition of the integral In writing the normalized BP equations in section 2.1, we hid the normalization constant using ∝ sign. Here we explicitly define the normalization constants or local integrals by defining unnormalized 60 CHAPTER 2. APPROXIMATE INFERENCE messages, based on their normalized version e pI→i (xi ) def M = fI (xI ) x\i e pi→I (xi ) def def b pj→I (xj ) = e I→i (b P p∂I\i→I )(xi ) (2.49) e i→I (b P p∂i\I→i )(xi ) (2.50) j∈∂I\i O = O def b pJ→i (xi ) = J∈∂i\I e pI (xI ) def = fI (xI ) def O O def b pi→I (xi ) = e I (b P p∂I→I )(xI ) (2.51) e i (b P p∂i→i )(xi ) (2.52) i∈∂I e pi (xi ) = def b pI→i (xi ) = I∈∂i where each update also has a functional form on the r.h.s. In each case, the local integrals are simply L pI→i (xi ). the integral of unnormalized messages or marginals – e.g., e pI→i (∅) = xi e e Define the functional Pi↔I (b pi→I , b pI→i ) as the product of messages from i to I and vice versa def e pi↔I (xi ) b pi→I (xi ) ⊗ b pI→i (xi ) = def = e i↔I (b P pi→I , b pI→i )(xi ) (2.53) Theorem 2.5.1. If the factor-graph has no loops and (Y ∗ , ⊗) is an Abelian group, the global integral decomposes to local BP integrals as −1  q(∅) = O e pI (∅) O e pi (∅)  i I O e pi↔I (∅) (2.54) i,I∈∂i or in other words q(∅) = Q(b p·→· )(∅) where −1  Q(b p·→· )(∅) = O e I (b P p∂I→I )(∅) O e i (b P p∂i→i )(∅)  i I O e i↔I (b P pi→I , b pI→i )(∅) (2.55) i,I∈∂i Proof. For this proof we build a tree around an root node r that is connected to one factor. (Since the factor-graph is a tree such a node always exists.) Send BP messages from the leaves, up towards the root r and back to the leaves. Here, any message qi→I (xi ), can give us the integral for the sub-tree that L contains all the nodes and factors up to node i using qi→I (∅) = xi qi→I (xi ). Noting that the root is connected to exactly one factor, the global integral is M xr q(xr ) = M O xr I∈∂r qI→r (xr ) = qI→r (∅) (2.56) On the other hand, We have the following relation between qi→I and b pi→I (also corresponding 2.5. SURVEY PROPAGATION: SEMIRINGS ON SEMIRINGS 61 factor-to-variable message) qi→I (xi ) = b pi→I (xi ) ⊗ qi→I (∅) ∀i, I ∈ ∂i (2.57) qI→i (xi ) = b pI→i (xi ) ⊗ qI→i (∅) ∀i, I ∈ ∂i (2.58) Substituting this into BP equation (2.2) we get qi→I (xi ) O = qJ→i (∅)b pJ→i (xi ) (2.59) J∈∂i\I qI→i (xi ) M = O fI (xI ) x\i qj→I (∅)b pj→I (xj ) (2.60) j∈∂I\i By summing over both l.h.s and r.h.s in equations above and substituting from equation (2.50) we get  M xi qi→I (xi ) =  O  qJ→i (∅) ⊗    M J∈∂i\I qi→I (∅) = O e pi→I (∅) xi O b pJ→i (xi ) → J∈∂i\I qJ→i (∅) (2.61) J∈∂i\I and similarly for equation (2.60) using integration and substitution from equation (2.49) we have  M xi qI→i (xi ) =   O M b fI (xI ) pj→I (xj ) → qj→I (∅) ⊗   O  xI j∈∂I\i qI→i (∅) = e pI→i (∅) O j∈∂I\i qj→I (∅) (2.62) j∈∂I\i Equation (2.61) and 2.61 are simply recursive integration on a tree, where the integral up to node i (i.e., qi→I (∅) in equation (2.61)) is reduced to integral in its sub-trees. By unrolling this recursion we see that qi→I (∅) is simply the product of all e pI→i (∅) and e pI→i (∅) in its sub-tree, where the messages are towards the root. Equation (2.56) tells us that the global integral is not different. Therefore, equation (2.61) we can completely expand the recursion for the global integral. For this, let ↑ i restrict the ∂i to the factor that is higher than variable i in the tree (i.e., closer to the root r). Similarly let ↑ I be the variable that is closer to the root than I. We can write the global integral as q(∅) = O i,I=↑i O e pi→I (∅) I,i=↑I e pI→i (∅) (2.63) Proposition 2.5.2 shows that these local integrals can be written in terms of local integrals of interest 62 CHAPTER 2. APPROXIMATE INFERENCE – i.e., e pI→i (∅) = e pI (∅) e pi↔I (∅) and e pi→I (∅) e pi (∅) e pi↔I (∅) = Substituting from the equations above into equation (2.63) we get the equations of theorem 2.5.1. Proof. (proposition 2.5.2) By definition of e pI (xI ) and b pi→I (xi ) in equation (2.49) e pI (xi ) = e pI→i (xi ) ⊗ b pi→I (xi ) M  e b pI (∅) = e pI→i (∅) ⊗ pI→i (xi ) ⊗ b pi→I (xi ) xi → M → e pI (∅) = e pI→i (∅) ⊗ e pi↔I (∅) xi e pI (xi ) = M xi e pI→i (xi ) ⊗ b pi→I (xi ) → where in the last step we used equation (2.53). Similarly for the second statement of the proposition we have e pi (xi ) = e pi→I (xi ) ⊗ b pI→i (xi ) M  e b pi (∅) = e pi→I (∅) ⊗ pI→i (xi ) ⊗ b pi→I (xi ) xi 2.5.2 M → M → e pi (∅) = e pi→I (∅) ⊗ e pi↔I (∅) xi e pi (xi ) = xi e pi→I (xi ) ⊗ b pI→i (xi ) → The new factor-graph and semiring The decomposition of integral in theorem 2.5.1 means Q(b p·→· )(∅) has a factored form. Therefore, a factor-graph with b p·→· as the set of variables and three different types of factors corresponding to e I (b e i (b e i↔I (b different terms in the decomposition – i.e., P p )(∅), P p )(∅) and P pi→I , b pI→i )(∅)−1 can ∂I→I ∂i\I→i represent Q(b p·→· )(∅). Figure 2.6 shows a simple factor-graph and the corresponding SP factor-graph. The new factor-graph has one variable per each message in the original factor-graph and three types of factors as discussed above. Survey propagation is simply belief propagation applied to the this new factor-graph using the new semiring. As before BP messages are exchanged between variables and factors. But here, we can simplify BP messages by substitution and only keep two types of factor-to-factor messages. We use Si→I and SI→i to denote these two types of SP messages. These messages are exchanged between two types e I (b e i (b e i↔I (b of factors, namely P p∂I→I )(∅) and P p∂i\I→i )(∅). Since the third type of factors P pi→I , b pI→i )(∅)−1 are always connected to only two variables, b pi→I and b pI→i , we can simplify their role in the SP message 2.5. SURVEY PROPAGATION: SEMIRINGS ON SEMIRINGS 63 Figure 2.6: Part of a factor-graph (left) and the corresponding SP factor-graph on the right. The variables in e I (.)(∅), SP factor-graph are the messages in the original graph. The SP factor-graph has three type of factors: (I)P −1 e i (.)(∅) and (III)P e i↔I (.)(∅) . As the arrows suggest, SP message updates are simplified so that only two (II) P type of messages are exchanged: Si→I and SI→i between factors of type (I) and (II). update to get Si→I (b pi→I , b pI→i ) ∝ SI→i (b pi→I , b pI→i ) ∝ _ M e i (b P p∂i→i )(∅) \b pi→I ,b pI→i _ M ! O J∈∂i\I e i↔I (b P pi→I , b pI→i )(∅) e I (b O )(∅) P p ∂I→I \b pi→I ,b pI→i e i↔I (b P pi→I , b pI→i )(∅) j∈∂I\i SJ→i (b pi→J , b pJ→i ) (2.64) ! Sj→I (b pj→I , b pI→j ) (2.65) where in all cases we are assuming the messages b p·→· ∈ P are consistent with each other – i.e., satisfy BP equations on the original factor-graph. Note that, here again we are using the normalized BP message update and the normalization factor is hidden using ∝ sign. This is possible because we assumed ⊗ has an inverse. We can further simplify this update using the following proposition. Proposition 2.5.2. for b p·→· ∈ P e i (b P p∂i→i )(∅) e i↔I (b P pI→i , b pi→I )(∅) e i→I (b = P p∂i\I→i )(∅) (2.66) and e I (b P p∂I→I )(∅) e i↔I (b P pI→i , b pi→I )(∅) e I→i (b = P p∂I\i→I )(∅) (2.67) 64 CHAPTER 2. APPROXIMATE INFERENCE Proof. By definition of e pI (xI ) and b pi→I (xi ) in equation (2.49) e pI (xi ) = e pI→i (xi ) ⊗ b pi→I (xi ) M  e b pI (∅) = e pI→i (∅) ⊗ pI→i (xi ) ⊗ b pi→I (xi ) xi M → M → e pI (∅) = e pI→i (∅) ⊗ e pi↔I (∅) xi e pI (xi ) = xi e pI→i (xi ) ⊗ b pi→I (xi ) → where in the last step we used equation (2.53). Similarly for the second statement of the proposition we have e pi (xi ) = e pi→I (xi ) ⊗ b pI→i (xi ) M  e b pi (∅) = e pi→I (∅) ⊗ pI→i (xi ) ⊗ b pi→I (xi ) xi → M → e pi (∅) = e pi→I (∅) ⊗ e pi↔I (∅) xi e pi (xi ) = M e pi→I (xi ) ⊗ b pI→i (xi ) xi → The term on the l.h.s. in the proposition above appear in equation (2.64) and the terms on the r.h.s are local message integrals given by equation (2.49). We can enforce b p·→· ∈ P, by enforcing BP pI→i = PI→i (b p∂I\→I ) “locally”, during the message updates in the updates b pi→I = Pi→I (b p∂i\I→i ) and b new factor-graph. Combining this constraint with the simplification offered by proposition 2.5.2 gives us the SP message updates  _ M Si→I (b pi→I ) ∝ O  1 b pi→I = Pi→I (b p∂i\I→i ) ⊗ Pi→I (b p∂i\I→i )(∅)  J∈∂i\I SJ→i (b pJ→i ) (2.68)  Sj→I (b pj→I ) (2.69) b p ∂i\I→i  _ M SI→i (b pI→i ) ∝ pI→i 1 b O  p∂I\i→I )(∅) = PI→i (b p∂I\i→I ) ⊗ PI→i (b j∈∂I\i b p ∂I\i→I ⊗ _ ⊕ where 1(.) is the identity function on the SP semiring, where 1(true) = 1 and 1(false) = 1. Here each SP message is a functional over all possible BP messages between the same variable and factor. However, in updating the SP messages, the identity functions ensure that only the messages that locally satisfy BP equations are taken into account. Another difference from the updates of equation (2.64) is that SP messages have a single argument. This is because the new local integrals either depend on b pi→I or b pI→i , and not both. Example 2.5.1. In variational approach, survey propagation comes in two variations: entropic SP(ξ) and energetic SP(y) [208]. For the readers familiar with variational derivation of SP, here we express the relation to the algebraic approach. According to the variational view, the partition function of the P entropic SP is bp eξ log(Q(bp·→· )(∅)) , where Q(b p·→· )(∅) is the partition function for the sum-product ·→· semiring. The entropic SP has an inverse temperature parameter, a.k.a. Parisi parameter, ξ ∈ R. It _ is easy to see that ξ = 1 corresponds to ⊕ = +, ⊕ = + and ⊗ = × in our algebraic approach. The 2.5. SURVEY PROPAGATION: SEMIRINGS ON SEMIRINGS 65 _ limits of ξ → ∞ corresponds to ⊕ = max. On the other hand, the limit of ξ → 0 amounts to ignoring Q(b p·→· )(∅) and corresponds to the counting SP; see section 2.5.4. P The energetic SP(y) is different only in the sense that Q(b p·→· )(∅) in bp e−y log(Q(bp·→· )(∅)) is the ·→· _ P ground state energy. This corresponds to ⊕ = +, ⊕ = max and ⊗ = , and the limits of the inverse _ P temperature parameter y → ∞ is equivalent to ⊕ = min, ⊕ = min and ⊗ = . By taking an algebraic view we can choose between both operations and domains. For instance, an implication of algebraic view is that all the variations of SP can be applied to the domain of complex numbers Y ∗ = C. 2.5.3 The new integral and marginals Once again we can use theorem 2.5.1, this time to approximate the SP integral Q(∅)(∅) = _ L p·→· )(∅) b p·→· Q(b using local integral of SP messages. The SP marginal over each BP message b pi→I or b pI→i is the same as the corresponding SP message – i.e., S(b pi→I ) = Si→I (b pi→I ). To see this in the factor-graph of figure 2.6, note that each message variable is connected to two factors, and both of these factors are already contained in calculating one SP messages. Moreover, from the SP marginals over messages we can recover the SP marginals over BP marginals which we denote by S(b p)(xi ). For this, we simply need to enumerate all combinations of BP messages that produce a particular marginal S(b p)(xi ) ∝ 2.5.4 _ M b p∂i→i O 1(b p(xi ) = P(b p∂i→i )(xi )) I∈∂i SI→i (b pI→i ) (2.70) Counting survey propagation Previously we required the ⊗ operator to have an inverse, so that we can decompose the BP integral q(∅) into local integrals. Moreover, for a consistent decomposition of the BP integral, SP and BP semiring previously shared the ⊗ operation.8 Here, we lift these requirements by discarding the BP integrals altogether. This means SP semiring could be completely distinct from BP semiring and (Y ∗ , ⊗) does not have to be an Abelian group. This setting is particularly interesting when the SP semiring is sum-product over real domain Si→I (b pi→I ) ∝ X  Y 1 b pi→I = Pi→I (b p∂i\I→i ) SJ→i (b pJ→i ) b p∂i\I→i SI→i (b pI→i ) ∝ X b p∂I\i→I 8 _ (2.71) J∈∂i\I 1 b pI→i = PI→i (b p∂I\i→I )  Y Sj→I (b pj→I ) (2.72) j∈∂I\i This is because if the expansion operation ⊗ was different from the expansion operation of BP, ⊗, the expanded form Q(b p·→· ) in the SP factor-graph would not evaluate the integral q(∅) in the BP factor-graph, even in factor-graphs without any loops. 66 CHAPTER 2. APPROXIMATE INFERENCE Here, the resulting SP integral Q(b p·→· ) = P b p·→· 1(b p·→· ∈ P) simply “counts” the number of BP fixed points and SP marginals over BP marginals (given by equation (2.70)) approximates the frequency of a particular marginal. The original survey propagation equations in [48], that are very successful in solving satisfiability correspond to counting SP applied to the or-and semiring. Example 2.5.2. Interestingly, in all min-max problems with discrete domains X , min-max BP messages can only take the values that are in the range of factors – i.e., Y ∗ = Y. This is because any ordered set is closed under min and max operations. Here, each counting SP message Si→I (b pi→I ) : Y |Xi | → R is a discrete distribution over all possible min-max BP messages. This means counting survey propagation where the BP semring is min-max is computationally “tractable”. In contrast (counting) SP, when applied to sum-product BP over real domains is not tractable. This is because in this case each SP message is a distribution over a uncountable set: Si→I (b pi→I ) : R|Xi | → R. In practice, (counting) SP is only interesting if it remains tractable. The most well-known case corresponds to counting SP when applied to the or-and semiring. In this case the factors are constraints and the domain of SP messages is {true, false}|Xi | . Our algebraic perspective extends this set of tractable instances. For example, it show that counting SP can be used to count the number of fixed points of BP when applied to xor-and or min-max semiring. 2.6 Messages and particles The contrasting properties of stochastic and deterministic approximations make a general hybrid method desirable. After reviewing the basics of MCMC in section 2.6.1, we discuss some particle-based approaches to message passing and introduce our hybrid inference method that combines message passing and Gibbs sampling in section 2.6.3. The discussions of this section are limited to sum-product inference. 2.6.1 Markov Chain Monte Carlo Markov Chain Monte Carlo (MCMC) is a technique to produce samples from a target distribution p, by exploring a Markov Chain which is constructed such that more probable areas are visited more often [11, 227, 263]. A Markov Chain is a stochastic process x(0) , . . . , x(t) in which: p(x(t) | x(t−1) , . . . , x(1) ) = kt (x(t) , x(t−1) ) that is the current state x(t) is independent of all the history, given only the previous state x(t−1) . a homogeneous Markov chain, the transition kernel kt and under some 9 assumptions9 , (x(t) , x(t−1) ) (2.73) For is the same for all t. In this case starting from any arbitrary distribution x(0) ∼ p(0) (x) after at least Tmix The assumptions are: (I) Irreducibility: There is a non-zero probability of reaching all states starting with any arbitrary state and (II) Aperiodicity: The chain does not trap in cycles. 2.6. MESSAGES AND PARTICLES 67 transitions by the chain, we have x(Tmix ) ∼ p(x). Given a set of particles x[1], . . . , x[L] sampled from p(x), we can estimate the marginal probabilities (or any other expectation) as L b p(xi ) 1X 1(x[n]i = xi ) L ∝ (2.74) n=1 For a given transition kernel, the following condition, known as detailed balance, identifies the stationary distribution p: p(x(t) )k(x(t) , x(t−1) ) = p(x(t) ) = p(x(t−1) )k(x(t−1) , x(t) ) X p(x) k(x(t) ; x) ⇒ (2.75) x which means that p(.) is the left eigenvector of k(., .) with eigenvalue 1. All the other eigenvalues are less than one and the mixing time, Tmix , of the chain depends on the second largest eigenvalue; the smaller it is, the faster consecutive transition by k(., .) shrinks the corresponding components, retaining only p. Metropolis-Hasting Algorithm and Gibbs sampling Many important MCMC algorithms can be interpreted as a special case of Metropolis-Hasting (MH) [124, 207]. Similar to importance sampling, MH uses proposal distribution m(x(t) | x(n−1) ), but in this case, the proposal distribution is to help with the design of transition kernel k(., .). After sampling x(t) from the proposal x(t) ∼ m(x), it is accepted with probability ( min 1 , m(x(t) p(x(t) )/p(x(t−1) ) | x(t−1) )/m(x(t−1) | x(t) ) ) (2.76) where, if the proposed sample is not accepted, x(t) = x(t−1) . The kernel resulting from this procedure admits the detailed balance condition w.r.t. the stationary distribution p(x). An important feature of MCMC, which allows for its application in graphical models, is the possibility of building valid transition kernels as the mixtures and cycles of other transition kernels. If p, is the stationary distribution for k1 and k2 , then it is also the stationary distribution for k1 k2 (cycle) and λk1 + (1 − λ)k2 , 0 ≤ λ ≤ 1 (mixture) [295]. Cycling of kernels gives us Gibbs sampling in graphical models [109], when kernels are (t) (t−1) ki (xi , x∆i ) = (t) (t−1) p(xi | x∆i ) ∀i (2.77) where as before ∆i is the Markov blanket of node i. It is also possible to use block MH-kernels with graphical models. In MH-samplers, when highly correlated variables are blocked together, mixing 68 CHAPTER 2. APPROXIMATE INFERENCE properties improve. In fact, the Gibbs sampler is such a method, with the proposal distribution that results in acceptance with probability 1. Similar to the general MH-methods, Gibbs sampling can fail if the kernel does not mix properly. This could happen if variables are strongly correlated. In principle one can assemble neighbouring variables into blocks and update them as one [147]. However in difficult regimes the number of variables that should be flipped to move from one local optima to another, is in the order of total number of variables [208], which makes this approach intractable. Mixture of kernels can be used to combine a global proposal with a local proposal (e.g., [81, 88]). In fact if we could view a message passing operator as a transition kernel (at least when message passing is exact), then the mixture of kernels – e.g., with Gibbs sampling – could produce interesting hybrid methods. In section 2.6.3, by combining BP and Gibbs sampling operator (when rephrased as message update) we introduce a new hybrid method. 2.6.2 Hybrid methods Stochastic methods are slow in convergence but they are guaranteed to converge. Even if the kernel is reducible, samples will cover a subset of the true support – i.e., MCMC still converges to a single sub-measure when the Gibbs measure is not unique. On the other hand, deterministic approximations are fast but non-convergent in difficult regimes. Modifications that result in convergence are either generally intractable (e.g., SP), slow (e.g., loop corrections and the methods that tighten a bound over the free energy) and/or degrade the quality of solutions. Moreover, sampling methods are flexible in representing distributions. This has motivated growing interest in nonparametric approach to variational inference [110] and in particular variations of Belief Propagation [141, 142, 144, 172, 231, 282, 283]. However, in the sense that these methods do not rely on a Markov chain for inference, they are closer to variational inference than MCMC methods. To better appreciate this distinction, consider two closely related methods: Gibbs Sampling and hard-spin mean-field [10], that uses the following update equation b p(xi ) ∝ XY fI (xI\i , xi ) x\i I∈∂i Y b p(xj ) j∈I\i Interestingly, the detailed balance condition of equation (2.75) for Gibbs sampler gives us the same equation: b p(xi ) ∝ XY x\i I∈∂i b p(xi | xI\i ) Y b p(xj ) j∈I\i However, given enough iterations, Gibbs Sampling can be much more accurate than hard-spin mean 2.6. MESSAGES AND PARTICLES 69 field method. Here the difference is that, with Gibbs sampler, this equation is enforced by the chain rather than explicit averaging of distributions, which means the correlation information is better taken into account. 2.6.3 Perturbed Belief Propagation Consider a single particle x̂ = x[1] in Gibbs Sampling. At any time-step t, x̂i is updated according to (t) x̂i ∼ b p(xi ) Y ∝ (t−1) fI (xi , x̂∂I\i ) (2.78) I∈∂i Here we establish a correspondence between a particle in Gibbs Sampling and a set of variable-topi→I (.)}i,I∈∂i , by defining all the messages leaving variable xi as a factor messages in BP –i.e., x̂ ⇔ {b delta-function b pi→I (xi ) def = def 1(xi = x̂i ) = Gi→I (b p∆i→∂i )(xi ) ∀I ∈ ∂i (2.79) where Gi→I (b p∆i→∂i ) is the Gibbs sampling operator that defines variable-to-factor message b pi→I as a function of all the messages from Markov blanket of i (∆i) to its adjacent factors (∂i). To completely define this random operator, note that x̂i is a sample from the conditional distribution of Gibbs sampling x̂i ∼ b p(xi ) Y ∝ fI (xi , x̂∂I\i ) J∈∂i ∝ YX fI (xI ) I∈∂i x\i Y b pj→I (xj ) (2.80) j∈∂I\i Combining the operators Now, lets write the BP updates for sum-product semiring once again; by substituting the factor-tovariable messages (equation (2.6)) into variable-to-factor messages and the marginals (equations (2.7) and (2.9)) we get b pi→I (xi ) ∝ Y X fJ (xJ ) J∈∂i\I X∂J\i b p(xi ) ∝ Y X I∈∂i X∂I\i fI (xI ) Y b pj→J (xj ) ∝ Pi→I (b p∆i→∂i )(xi ) (2.81) j∈∂J\i Y b pj→I (xj ) (2.82) j∈∂I\i where, similar to equation (2.7), Pi→I (.) denotes the message update operator, with the distinction that here, the arguments are also variable-to-factor messages (rather than factor-to-variable messages). By this rewriting of BP updates, the BP marginals equation (2.82) are identical in form to the Gibbs sampling distribution of equation (2.80). This similar form allows us to combine the operators linearly 70 CHAPTER 2. APPROXIMATE INFERENCE to get perturbed BP operator: def Xi→I (b p∆i→∂i ) = γ Gi→I (b p∆i→∂i ) + (1 − γ)Pi→I (b p∆i→∂i ) ∀i, I ∈ ∂i (2.83) The Perturbed BP operator Xi→I (.) updates each message by calculating the outgoing message according to BP and GS operators and linearly combines them to get the final massage. During T iterations of Perturbed BP, the parameter γ is gradually and linearly changed from 0 towards 1.10 Algorithm 2 summarizes this procedure. Note that the updates of perturbed BP are compatible with variable synchronous message update (see section 2.1.1). input : a factor graph, number of iterations T. output: a sample x̂. Initialize messages γ←0 repeat for each variable xi do calculate b p(xi ) using equation (2.80) calculate BP messages b pi→I (.) using equation (2.81) ∀I ∈ ∂i sample x̂i ∼ b p(xi ) combine BP and Gibbs sampling messages: b pi→I (xi ) ← γ b pi→I (xi ) + (1 − γ) 1(xi = x̂i ) (2.84) end 1 γ ← γ + T −1 until T iterations return x̂ Algorithm 2: Perturbed Belief Propagation Experiments Perturbed BP is most successful in solving CSPs; see chapter 3. However we can also use it for marginalization by sampling (equation (2.74)). Here we use the spin-glass Ising model on 8 × 8 grids and Erdős-Rény (ER) random graphs with N = 50 and 150 edges. We sampled local fields independently from N (0, 1) and interactions from N (0, θ2 ), where we change θ to control the problem difficulty – higher values correspond to more difficult inference problems. We then compared the average of the logarithm 10 Perturbed BP updates can also be used with any fixed γ ∈ [0, 1]. 2.6. MESSAGES AND PARTICLES 71 (base 10) of mean (over N variables) marginal error log( 1 X |p(xi ) − b p(xi )|) N (2.85) i,xi (a) Ising grid (b) Random ER graph Figure 2.7: Log mean marginal error (x and y axes) comparison between Perturbed BP, BP and Gibbs sampling for (left) 8x8 periodic Ising grid; (right) random graph with 50 variables, 150 edges and spin-glass interactions. The size of each circle is proportional to the difficulty of that problem. Figure 2.7 compares perturbed BP, Gibbs sampling and BP where larger circles correspond to more difficult instances θ ∈ {0.5, 1, 2, 4, 8}. All methods are given a maximum of 10, 000 iterations. Perturbed BP and Gibbs sampling use T = 100 iterations to obtain each sample, while BP is ran once until convergence or until the maximum number of iterations is reached. The results shows that Perturbed BP as a sampling method is generally better than Gibbs Sampling. Also, for some cases in which BP’s result is very close to random (i.e., ∼ −.3 in log marginal error), Perturbed BP produces relatively better results. Note that for difficult instances, increasing T even by 100 folds does not significantly improve the results for either Gibbs sampling or perturbed BP. For Gibbs sampling, this can be explained by formation of pure states that result in exponential mixing time [192, 208]. 2.6.4 Perturbed survey propagation _ _ When the SP operators are sum-product – i.e., ⊕ = sum and ⊗ = prod – we can apply a perturbation scheme similar to perturbed BP. Recall that sum-product SP defines a distribution over BP fixed point. Therefore sampling from this distribution amounts to randomly selecting a single BP fixed point. This corresponds to sampling a single message b pi→I [1] ∼ Si→I (b pi→I )11 and bias the SP message Si→I (.) towards this random choice – 11 Recall that the SP marginal over each message b pi→I is identical to the corresponding message Si→I (b pi→I ). 72 CHAPTER 2. APPROXIMATE INFERENCE i.e., (analogous to equation (2.84) in algorithm 2) Si→I (b pi→I ) ← γ Si→I (b pi→I ) + (1 − γ)1(b pi→I = b pi→I [1]) (2.86) where b pi→I [1] ∼ Si→I (b pi→I ) An alternative form of perturbation is to perturb SP messages using implicit SP marginals. Recall that in using counting SP, the SP marginals over BP marginals (S(b p)(xi ); see equation (2.70)) are simply the frequency of observing a particular marginal in BP fixed points. This implicitly defines SP marginal over the original domains Xi ; ∀i, which we denote by S(xi ) S(xi ) ∝ X S(b p)(xi ) (2.87) b p After obtaining a sample x̂i ∼ S(xi ), we bias all the outgoing SP messages accordingly Si→I (b pi→I ) where ←  γ Si→I (b pi→I ) + (1 − γ) 1 b pi→I (.) = 1(x̂i , .) ∀I ∈ ∂i (2.88) x̂i ∼ Si (xi ) where, similar to perturbed BP, γ is gradually increased from 0 to 1 during T iterations of Perturbed SP. We use this form of perturbation in section 3.3 to obtain a satisfying assignment x̂, to CSPs. We show that although computationally more expensive than perturbed BP, this method often outperforms all the other well-known methods in solving random CSPs. Part II Combinatorial problems 74 Message Passing algorithms of different semirings are able to solve a variety of combinatorial problems: (I) To solve constraint satisfaction problems (CSPs) the sum-product message passing is often used, where p(x) defines a uniform distribution over solutions and the objective is to produce a single assignment x∗ s.t. p(x∗ ) > 0. (II) Here the estimates of the partition function, either using the approximation given by the Bethe free energy (section 2.3.1) or the decomposition of integral in section 2.5.1, is used for approximate counting of the number of solutions. This estimate to the partition function is also used for integration problems such approximating the permanent of a matrix (see chapter 5). (III) The min-sum semiring is often used for (constrained) optimization and we formulate (IV) bottleneck problems as min-max inference. This part of the thesis studies the message passing solutions to combinatorial problems under three broad categories. (1) Chapter 3 studies the constraint satisfaction problems, where we use perturbed message passing (section 2.6.3 and 2.6.4) to produce state-of-the-art results in solving random instances of satisfiability and coloring problems in section 3.3. This chapter then studies several other NP-hard problems including set-cover, independent set, max-clique, clique-cover and packing for construction of non-linear codes. (2) Chapter 4 studies variations of clustering problems including k-median, k-center, k-clustering, hierarchical clustering and modularity optimization. (3) In chapter 5 we study problems that involve enumeration, constraint satisfaction or constrained optimization over permutations. This includes (bottleneck) travelling salesman problem, matching, graph alignment, graph isomorphism and finding symmetries. Note that this classification of combinatorial problems into three categories is superficial and is made solely to provide some organization. In several places we violate this categorization in favour of better flow. For example we study some constraint satisfaction problems such as (sub)-graph isomorphism and Hamiltonian cycle in chapter 5 rather than chapter 3. We investigate the “optimization” counterpart of some CSPs in chapter 3 and review message passing solutions to finding trees rather than clusters in chapter 4. Moreover, many of the graphical models presented here are proposed by other researchers and they are included here only for completeness. As a final remark, we note that many of the statements in the following are assuming P 6= NP. Chapter 3 Constraint satisfaction We saw in section 1.3 that “any” semiring can formulate Constraint Satisfaction Problems (CSPs). In particular, as we saw in section 1.3, several semirings are isomorphic to the and-or ({false, true}, ∨, ∧) semiring and therefore result in equivalent BP procedures. The BP message update over the and-or semiring is called warning propagation (WP). WP marginals indicate whether or not a particular assignment to each variable is allowed, and therefore indicate a cluster of solutions. However, the success of warning propagation highly depends on initialization of messages. In contrast, if convergent, the fixed points of BP on the sum-product semiring (R≥0 , +, ×) are less dependent on initialization. Example 3.0.1. K-coloring: Given a graph G = (V, E), the K-coloring (K-COL) problem asks whether it is possible to assign one color (out of K) to each node s.t. no two adjacent nodes have the same color. Here, xi ∈ Xi = {1, . . . , q} is a K-ary variable for each i ∈ N , and we have M = |E| constraints; each constraint fi,j (xi , xj ) = 1(xi 6= xj ) depends only on two variables and is satisfied iff the two variables have different values. Here the identity function 1(xi 6= xj ) depends on the semiring (see section 1.3). Figure 3.1: (a) The set of all possible assignments to 3 variables. The solutions to the 3-SAT problem of equation (3.1) are in white circles. (b) The factor-graph corresponding to the 3-SAT problem of equation (3.1). Here each factor prohibits a single assignment. 76 CHAPTER 3. CONSTRAINT SATISFACTION Example 3.0.2. K-Satisfiability (K-SAT): Given a conjunction of disjunctions with K literals, K-satisfiability seeks an assignment that evaluates to true. Here, all variables are binary (Xi = {true, false}) and each clause (factor fI ) depends on K =| ∂I | variables. A clause evaluates to zero only for a single assignment out of 2K possible assignment of variables [107]. Consider the following (or-and semiring formulation of) 3-SAT problem over 3 variables with 5 clauses: q(x) = (¬xi ∨ ¬xj ∨ xk ) ∧ (¬xi ∨ xj ∨ xk ) ∧ (xi ∨ ¬xj ∨ xk ) ∧ {z } | {z } | {z } | fI fJ (3.1) fK (¬xi ∨ xj ∨ ¬xk ) ∧ (xi ∨ ¬xj ∨ ¬xk ) | {z } | {z } fL fH ⊗ The factor fI corresponding to the first clause takes the value 1 (for or-and semiring this corresponds ∧ ⊕ ∨ to 1 = true), except for xI = (true, true, false), in which case it is equal to 1 (1 = false). Figure 3.1 shows this factor-graph and its set of solutions:  S = (true, true, true), (false, false, false), (false, false, true) . When using sum-product semiring, where fI (x) ∈ YI = {0, 1}, p(x) (equation (1.17)) defines a uniform distribution over the set of solutions and the partition function q(∅) counts the number of solutions. The challenge is then to sample from this distribution (or estimate q(∅)). The common approach to sample from p(x) is to use decimation (see equation (1.22)). Here one repeatedly applies sum-product BP to estimate marginals b p(xi ). Then one fixes a subset of variables xA according to their marginals. For this one may sample x∗i ∼ b p(xi ) or select xi with maximum marginal x∗i = p(xi ). Sum-product BP is then applied to the reduced factor-graph in which fI (xI ) is replaced argxi max b by fI (xI )1(xI∩A = x∗I∩A ). This process, called sum-product BP-guided-decimation (BP-dec), is repeated to obtain a complete joint assignment x∗ . However, using BP-guided-decimation is solving a more difficult problem of marginalization. In fact, in equation (1.22) we showed how using decimation one may estimate the partition function (which is a #P problem). This suggests that decimation may not be the most efficient approach to solving NPcomplete CSPs. Here, instead we consider using the perturbed belief propagation (section 2.6.3) to sample from the set of solutions, where the semiring used by perturbed BP is the same as sum-product BP-dec. To better understand warning propagation, sum-product BP-dec, and perturbed BP, when applied to CSPs, consider the following examples. Example 3.0.3. Here we apply three different message passing methods to solve the simple 3-SAT example of figure 3.1. 77 (I) Warning Propagation: We use the max-product semiring ({0, 1}, max, prod) version of warning propagation for this example. As figure 3.1 suggests, the set of solutions S clusters into two subsets {{true, true, true}} and {{false, false, false}, {false, false, true} . Here, each of the clusters is a fixed point for WP – e.g., the cluster with two solutions corresponds to the following fixed point b pi→A (true) = b p(xi = true) = 0 ∀A ∈ ∂i b pi→A (false) = b p(xi = false) = 1 b pj→A (true) = b p(xj = true) = 0 b pj→A (false) = b p(xj = false) = 1 ∀A ∈ ∂j b pk→A (true) = b p(xk = true) = 1 b pk→A (false) = b p(xk = false) = 1 ∀A ∈ ∂k where the messages indicate the allowed assignments within this particular cluster of solutions. Depending on the initialization, WP messages may converge to any of its fixed points that also include the trivial cluster, where all (alternatively none) of the assignments are allowed. (II) BP-dec: Applying BP to this 3-SAT problem (starting from uniform messages) takes 20 iterations to converge – i.e., for the maximum change in the marginals to be below  = 10−9 . Here the message, b pI→i (xi ), from fI to xi is: b pI→1 (xi ) ∝ X pj→I (xj ) b pk→I (xk ) fI (x1,2,3 ) b xj,k Similarly, the message in the opposite direction, b pk→I (xi ) is b pi→I (xi ) ∝ b pJ→i (xi ) b pK→i (xi ) b pL→i (xi ) b pH→i (xi ) Here BP gives us the following approximate marginals: b p(xi = true) = b p(xj = true) = .319 and b p(xk = true) = .522. From the set of solutions, we know that the correct marginals are p(xi = true) = p(xj = true) = 1/3 and p(xk = true) = 2/3. The error of BP is caused by influential loops in the factor-graph of figure 3.1(b). Here the error is rather small; it can be arbitrarily large in some instances; sometimes it ca prevent converging at all. By fixing the value of xi to false, the SAT problem of equation (3.1) collapses to: SAT (x{j,k} | xi = false) = (¬xj ∨ xk ) ∧ (¬xj ∨ ¬xk ) (3.2) 78 CHAPTER 3. CONSTRAINT SATISFACTION BP-dec applies BP again to this reduced problem, which give b p(xj = true) = .14 (note here that p(xj = true) = 0) and b p(xk = true) = 1/2. By fixing xj to false, another round of decimation yields a solution x∗ = {false, false, true}. (III) Perturbed Belief Propagation: Perturbed BP can find a solution in T = 4 iterations (see algorithm 2). Our implementation shuffles the order of updates for variables in each iteration. In the first iteration, γ = 0, which means updates are the same as that of sum-product BP. In the second iteration, the order of updates is xj , xk , xi and γ = 1/3. At the end of this iteration b p(t=2) (xj = true) = .38. Perturbed BP then samples x̂j = false from this marginal. This sample influences the outgoing message according to the perturbed BP update equation (2.84), which in turn influences the beliefs for xi and xk . At the end of this iteration b p(t=2) (xi = true) = .20 and b p(t=2) (xk = true) = .53. At the final iteration γ = 1 and the order of updates is xi , xj and xk . At this point b p(t=3) (xi = true) = .07 and the sample x̂i = false. This means the outgoing message is deterministic (i.e., b pi→A (false) = 1 and b pi→A (true) = 0, for all A ∈ ∂i). This choice propagates to select x̂j = (t=3) false. Finally b p (xk = true) = b p(t=3) (xk = true) = .5, which correctly shows that both choices for x̂k produce a solution. To compare the performance of sum-product BP-dec and Perturbed BP on general CSPs, we considered all CSP instances from XCSP repository [189, 270], that do not include global constraints or complex domains. All instances with intensive constraints (i.e., functional form) were converted into extensive format for explicit representation using dense factors. We further removed instances containing constraints with more that 106 enteries in their tabular form. We also discarded instances that collectively had more than 108 enteries in the dense tabular form of their constraints.1 Figure 3.2(a,b) compares the time and iterations of BP-dec and Perturbed BP for successful attempts where both methods satisfied an instance. 2 Overall Perturbed BP, with 284 solved instances, is more successful than BP-dec with 253 successful runs. On the other hand, the average number of iterations for successful instances of BP-dec is 41, 284, compared to 133 iterations for Perturbed BP. This makes Perturbed BP 300 times more efficient than BP-dec. 1 3 Since our implementation represents all factors in a dense tabular form, we had to remove many instances because of their large factor size. We anticipate that Perturbed BP and BP-dec could probably solve many of these instances using a sparse representation of factors. 2 We used a convergence threshold of  = .001 for BP and terminated if the threshold was not reached after T = 10 × 210 = 10, 240 iterations. To perform decimation, we sort the variables according to their bias and fix ρ fraction of the most biased variables in each iteration of decimation. This fraction, ρ, was initially set to 100%, and it was divided by 2 each time BP-dec failed on the same instance. BP-dec was repeatedly applied using the reduced ρ, at most 10 times, unless a solution was reached – i.e., ρ = .1% at final attempt. For Perturbed BP, T = 10 at the starting attempt, which was increased by a factor of 2 in case of failure. This was repeated at most 10 times which means Perturbed BP used T = 10, 240 at its final attempt. Note that Perturbed BP at most uses the same number of iterations as the maximum iterations per single iteration of decimation in BP-dec. 3 We also ran BP-dec on all the benchmarks with maximum number of iterations set to T = 1000 and T = 100 3.1. PHASE TRANSITIONS IN RANDOM CSPS 79 103 102 101 103 Perturbed BP (time) Perturbed BP (iters) 104 102 101 100 10-1 10-2 100 0 10 101 102 104 103 BP-dec (iters) 105 106 107 10-3 10-4 -4 10 10-3 10-2 10-1 100 101 BP-dec (time) 102 103 104 105 Figure 3.2: Comparison of number of iterations (left) and time (right) used by BP-dec and Perturbed BP in benchmark instances where both methods found satisfying assignments. 3.1 Phase transitions in random CSPs Random CSP (rCSP) instances have been extensively used in order to study the properties of combinatorial problems [1, 103, 179, 215] as well as in analysis and design of algorithms [213, 277]. Studies of rCSP, as a critical phenomena, focus on the geometry of the solution space as a function of the problem’s difficulty, where rigorous [2, 70] and non-rigorous [209, 210] analyses have confirmed the same geometric picture. When working with large random instances, a scalar α associated with a problem instance, a.k.a. control parameter – e.g., the clause to variable ratio in SAT– can characterize that instance’s difficulty (i.e., larger control parameter corresponds to a more difficult instance) and in many situations it characterizes a sharp transition from satisfiability to unsatisfiability [59]. Example 3.1.1. Random K-satisfiability Random K-SAT instance with N variables and M = αN constraints are generated by selecting K variables at random for each constraint. Each constraint is set to zero (i.e., unsatisfied) for a single random assignment (out of 2K ). Here α is the control parameter. Example 3.1.2. Random K-coloring The control parameter for a random K-COL instances with N variables and M constraints is its average degree α = 2M N . We consider Erdős-Rény random graphs and generate a random instance by sequentially selecting two distinct variables out of N at random to generate each of M edges. For large N , this is equivalent to selecting each possible factor with a fixed probability, which means the nodes have Poisson degree distribution Pr(|∂i| = d) ∝ e−α αd . iterations. This reduced the number of satisfied instances to 249 for T = 1000 and 247 for T = 100, but also reduced the average number of iterations to 1570 and 562 respectively, which are still several folds more expensive than Perturbed BP. see Appendix xyz for more details on these results. 80 CHAPTER 3. CONSTRAINT SATISFACTION While there are tight bounds for some problems [3], finding the exact location of this transition for different CSPs is still an open problem. Besides transition to unsatisfiability, these analyses have revealed several other (phase) transitions [179]. Figure 3.3(a)-(c) shows how the geometry of the set of solutions changes by increasing the control parameter. Here we enumerate various phases of the problem for increasing values of the control parameter: (a) In the so-called Replica Symmetric (RS) phase, the symmetries of the set of solutions (a.k.a. ground states) reflect the trivial symmetries of problem wrt variable domains. For example, for K-COL the set of solutions is symmetric wrt swapping all red and blue assignment. In this regime, the set of solutions form a giant cluster (i.e., a set of neighboring solutions), where two solutions are considered neighbors when their Hamming distance is one [2] (or non-divergent with number of variables [210]. Local search methods (e.g., [277]) and BP-dec can often efficiently solve random CSPs that belong to this phase. Figure 3.3: A 2-dimensional schematic view of how the set of solutions of CSP varies as we increase the control parameter α from (left) replica symmetric phase to (middle) clustering phase to (right) condensation phase. Here small circles represent solutions and the bigger circles represent clusters of solutions. Note that this view is very simplistic in many ways – e.g., the total number of solutions and the size of clusters should generally decrease from left to right. (b) In clustering or dynamical transition (1dRSB4 ), the set of solutions decomposes into an exponential number of distant clusters. Here two clusters are distant if the Hamming distance between their respective members is divergent (e.g., linear) in the number of variables. (c) In the condensation phase transition (1sRSB5 ), the set of solutions condenses into a few dominant clusters. Dominant clusters have roughly the same number of solutions and they collectively contain almost all of the solutions. While SP can be used even within the condensation phase, BP usually fails to converge in this regime. However each cluster of solutions in the clustering and condensation phase is a valid fixed-point of BP. (d) A rigidity transition (not included in figure 3.3) identifies a phase in which a finite portion of variables are fixed within dominant clusters. This transition triggers an exponential decrease in the total number of solutions, which leads to (e) unsatisfiability transition.6 This rough 4 1st order dynamical RSB. Symmetry Breaking is a general term indicating a phenomenon during which a system is breaking the symmetry that governs its behaviour by selecting a particular branch. The term Replica Symmetry Breaking (RSB) originates from the technique –i.e., Replica trick ([211])– that was first used to analyze this setting. According to RSB, the trivial symmetries of the problem do not characterize the clusters of solution. 5 1st order static RSB. 6 In some problems, the rigidity transition occurs before condensation transition. 3.2. REVISITING SURVEY PROPAGATION Figure 3.4: This schematic view demonstrates the clustering during condensation phase. Here assume x and y axes correspond to xi and xj . Considering the whole space of assignments, xi and xj are highly correlated. The formation of this correlation between distant variables on a factor-graph breaks BP. Now assume that Perturbed BP messages are focused on the largest shaded ellipse. In this case the correlation is significantly reduced. picture summarizes first order Replica Symmetry Breaking’s (1RSB) basic assumptions [208]. 3.1.1 Pitfalls of decimation Previously we gave an argument against decimation, based on the complexity of marginalization and integration. Some recent analyses draw similarly negative conclusions on the effect of decimation [71, 218, 261]. The general picture is that at some point during the decimation process, variables form long-range correlations such that fixing one variable may imply an assignment for a portion of variables that form a loop, potentially leading to contradictions. Alternatively the same long-range correlations result in BP’s lack of convergence and error in marginals that may lead to unsatisfying assignments. Perturbed BP avoids the pitfalls of BP-dec in two ways: (I) Since many configurations have non-zero probability until the final iteration, perturbed BP can avoid contradictions by adapting to the most recent choices. This is in contrast to decimation in which variables are fixed once and are unable to change afterwards. Some backtracking schemes [240] attempt to fix this problem with decimation. (II) We speculate that simultaneous bias of all messages towards sub-regions, prevents the formation of long-range correlations between variables that breaks BP in 1sRSB; see figure 3.4. 3.2 Revisiting survey propagation SP is studied on random (hyper) graphs representing CSPs at thermodynamic limit (i.e., as N → ∞). Large random graphs are locally tree-like, which means the length of short loops are typically in the order of log(N ) [145]. This ensures that, in the absence of long-range correlations, BP is asymptotically exact, as the set of messages incoming to each node or factor are almost independent. Although BP messages remain uncorrelated until the condensation transition [179], the BP equations do not completely characterize the set of solutions after the clustering transition. This inadequacy is indicated 81 82 CHAPTER 3. CONSTRAINT SATISFACTION by the existence of a set of several valid fixed points (rather than a unique fixed-point) for WP as an instance of BP. For a better intuition, consider the cartoons of figure 3.3(middle) and (right). During the clustering phase (middle), xi and xj (corresponding to the x and y axes) are not highly correlated, but they become correlated during and after condensation (right). This correlation between variables that are far apart in the factor-graph results in correlation between BP messages. This is because it implies that even if loops are long, they remain influential. This violates BP’s assumption that messages are uncorrelated, which results in BP’s failure in this regime. This is where survey propagation comes into the picture in solving CSPs. Going back to our algebraic notation for SP, using counting SP with warning propagation semiring ({0, 1}, max, prod) as the initial semiring and sum-product (R≥0 , sum, prod) as the SP semiring, is computationally tractable. This is because Y ∗ = {0, 1} in the initial semiring is finite, and therefore each message can have finite number of 2|Xi | values  b pi→I (xi ), b pI→i (.) ∈ (0, . . . , 0), (0, . . . , 0, 1), (0, . . . , 1, 0), . . . , (1, . . . , 0), . . . , (1, . . . , 1) ∀i, I ∈ ∂i |Xi | This means each SP message is a distribution over these possibilities Si→I (b pi→I ) ∈ R2 . However since (0, . . . , 0) indicates an unfeasible case, where no assignment is allowed, we explicitly ignore it in SP message updates. This gives us the following update equations and marginals for SP when applied to CSPs Si→I (b pi→I ) ∝ X b p∂i\I→i SI→i (b pI→i ) ∝ Y 1 b pi→I (.) = X J∈∂i\I 1 b pI→i (.) = X S(b pi ) = b p∂i→i _ 1 (b pi (.) = Y fI (xI ) SI→i ((0, . . . , 0)) = 0 Y  SJ→i (b pJ→i )  b pj→I (.) j∈∂I\i Y b pI→i (.)) I∈∂i Y ∀i, I ∈ ∂i (3.3) J∈∂i\I x\i b p∂I\i→I X  b pJ→i (.) Y  Sj→I (b pj→I ) (3.4) j∈∂I\i SI→i (b pI→i ) (3.5) I∈∂i and Si→I ((0, . . . , 0)) = 0 Example 3.2.1. Consider the SP message Si→I (b pi→I ) in factor-graph of figure 3.1. Here the summation in equation (3.3) is over all possible combinations of max-product BP messages b pJ→ib pK→i ,b pL→i ,b pH→i . Since each of these messages can assume one of the three valid values – e.g., b pJ→i (xi ) ∈ {(0, 1), (1, 0), (1, 1)} 4 – for each particular assignment of b pi→I , a total of 3 possible combinations are enumerated in the summations of equation (3.3). However only the combinations that form a valid max-product message update have non-zero contribution in calculating Si→I . 3.2.1 Flavours of SP-guided decimation The SP-marginal over WP marginals (equation (3.5)) also implies a distribution S(xi ) over the original domain (see equation (2.87)). Similar to BP-dec we can use either the implicit marginals of equa- 3.2. REVISITING SURVEY PROPAGATION 83 tion (2.87) or the SP marginals of equation (3.5) to perform decimation. In the former case, which we call SP-dec(S) we select x∗i = argxi max S(xi ) during decimation, and in the later case, which we call SP-dec(C), we clamp b p∗i = argbpi max S(b pi ). This means all the outgoing messages from this variable node in the factor-graph are clamped in the same way – i.e., Si→I (b pi→I ) = b p∗i ∀I ∈ ∂i. In the first case, SP-dec(S), we expect a single assignment x∗ , while for SP-dec(C) at the end of decimation we should obtain a cluster of solutions, where a subset of assignments is allowed for each xi . However, during the decimation process (in both SP-dec(S) and SP-dec(C) ), usually after fixing a subset of variables, SP marginals, S(xi ), become close to uniform, indicating that clusters of solution have no preference over particular assignment of the remaining variables. The same happens when we apply SP to random instances in RS phase (figure 3.3(left)). At this point (a.k.a. paramagnetic phase) solutions form a giant cluster and a local search method or BP-dec can often efficiently find an assignment to the variables that are not yet fixed by decimation. The original decimation procedure for K-SAT [48] corresponds to SP-dec(S). SP-dec(C) for CSP with Boolean variables is only slightly different, as SP-dec(C) can choose to fix a cluster to b pi = (1, 1) in addition to the options of b pi = (1, 0) and b pi = (0, 1) (corresponding to xi = 0 and xi = 1 respectively), available to SP-dec(S). However, for larger domains (e.g., K-COL), SP-dec(C) has a clear advantage. For example, in 3-COL, SP-dec(C) may choose to fix a variable to b pi→I = (0, 1, 1) (i.e., the first color is not allowed) while SP-dec(S) can only choose between b pi ∈ {(0, 0, 1), (0, 1, 0), (1, 0, 0)}. This significant difference is also reflected in their comparative success-rate on K-COL. 3.2.2 7 (See section 3.3) Computational Complexity The computational complexity of each SP update of equation (3.4) is O(2|Xi | −1)|∂I| as for each particular value b pi→I , SP needs to consider every combination of incoming messages, each of which can take 2|Xi | values (minus the empty set). Similarly, using a naive approach the cost of update of equation (3.3) is O(2|Xi | − 1)|∂i| . However by considering incoming messages one at a time, we can perform the same exact update in O(|∂i| 22|Xi | ). In comparison to the cost of BP updates (i.e., O(|∂i| |Xi |) and O(|XI |) for two types of message update; see section 2.1), we see that SP updates are substantially more expensive for large domains |Xi | and higher order factors with large |∂I|. 3.2.3 Perturbed survey propagation for CSP Similar to SP, we use perturbed SP with ({0, 1}, max, prod) as the first semiring and (R, sum, prod) as the second semiring. Since perturbed SP seeks a single assignment, rather than a cluster of solutions, it can find satisfying solutions to paramagnetic instances. This is in contrast to SP-dec, which in paramagnetic cases returns a trivial WP fixed point in which all assignment are allowed. This means as opposed to SP-dec, which is mostly applied to random CSPs in the clustering and condensation phase, 7 Previous applications of SP-dec to K-COL by [49] used a heuristic for decimation that is similar SP-dec (C). 84 CHAPTER 3. CONSTRAINT SATISFACTION perturbed SP can be used to solve non-random and also random instances in RS phase. To demonstrate this, we applied perturbed SP to benchmark CSP instances of figure 3.2, in which the maximum number of elements in the factor was less than 10.8 Here perturbed SP solved 80 instances out of 202 cases, in comparison to perturbed BP that solved 78 instances, making perturbed SP slightly better, also in solving real-world problems. 3.3 Satisfiability and coloring In examples 3.1.1 and 3.1.2, we introduced the random procedures that are often used to produce instances of K-satisfiability and K-coloring problems. Here we report the results on K-SAT for K ∈ {3, 4} and K-COL for K ∈ {3, 4, 9}. We used the procedures to produce 100 random instances with N = 5, 000 variables for each control parameter α and here report the probability of finding a satisfying assignment for different methods – i.e., the portion of 100 instances that were satisfied by each method.9 Figure 3.5(first row) visualizes the success rate of different methods on 3-SAT (right) and 3-COL (left). figure 3.5(second row) reports the number of variables that are fixed by SP-dec(C) and (S) before calling BP-dec as local search. The third row shows the average amount of time that is used to find a satisfying solution. This does not include the failed attempts. For SP-dec variations, this time includes the time used by local search. The final row of figure 3.5 shows the number of iterations used by each method at each level of difficulty over the successful instances. Note that this does not include the iterations of local search for SP-dec variations. Here the area of each disk is proportional to the frequency of satisfied instances with particular number of iterations for each control parameter and inference method10 . Here we make the following observations: (I) Perturbed BP is much more effective than BP-dec, while remaining ten to hundreds of time more efficient. (II) As the control parameter grows larger, the chance of requiring more iterations to satisfy the instance increases for all methods. (III) Although computationally very inefficient, BP-dec is able to find solutions for instances with larger control parameter than suggested by previous results (e.g., [208]). (IV) For many instances where SP-dec(C) and (S) use few iterations, the variables are 8 The number of iterations and other settings for perturbed SP were identical to the ones used to compare BP-dec and perturbed BP. 9 For coloring instances, to help decimation, we break the initial symmetry of the problem by fixing a single variable to an arbitrary value. For BP-dec and SP-dec, we use a convergence threshold of  = .001 and fix ρ = 1% of variables per iteration of decimation. Perturbed BP and Perturbed SP use T = 1000 iterations. Decimation-based methods use a maximum of T = 1000 iterations per iteration of decimation. If any of the methods failed to find a solution in the first attempt, T was increased by a factor of 4 at most 3 times – i.e., in the final attempt T = 64, 000. To avoid blow-up in run-time, for BP-dec and SP-dec, only the maximum iteration, T , during the first iteration of decimation, was increased (this is similar to the setting of [48] for SP-dec). For both variations of SP-dec (see section 3.2.1) after each decimation step, if maxi,xi b p(xi ) − |X1i | < .01 (i.e., marginals are close to uniform) we consider the instance para-magnetic, and run BP-dec (with T = 1000,  = .001 and ρ = 1%) on the simplified instance. 10 The number of iterations are rounded to the closest power of two. 3.3. SATISFIABILITY AND COLORING 85 100 100 3-SAT 3-COL 80 0 BP-dec SP-dec (C) SP-dec (S) Perturbed BP Perturbed SP(S) 4000 2000 0 5000 2000 0 20000 3-SAT 3-COL 5000 15000 3000 2000 satisfiability rigidity satisfiability 4000 10000 5000 1000 0 0 5 105 104 satisfiability satisfiability iters when successful 3000 1000 1000 10 40 4000 rigidity satisfiability 3000 60 20 3-SAT 3-COL 0 time when successful (sec) BP-dec SP-dec (C) SP-dec (S) Perturbed BP Perturbed SP(S) satisfiability 40 satisfiability 60 20 avg. nontrivial fixes rigidity satisfiability success rate 80 103 102 104 103 BP-dec SP-dec (C) Perturbed BP Perturbed SP(S) 4.1 4.0 4.2 4.4 4.3 avg. node degree 4.5 4.6 4.7 4.10 4.15 4.20 clause to variable ratio BP-dec SP-dec (S) Perturbed BP Perturbed SP(S) 102 4.25 4.30 Figure 3.5: (first row) Success-rate of different methods for 3-COL and 3-SAT for various control parameters. (second row) The average number of variables (out of N = 5000) that are fixed using SP-dec (C) and (S) before calling local search, averaged over 100 instances. (third row) The average amount of time (in seconds) used by the successful setting of each method to find a satisfying solution. For SP-dec(C) and (S) this includes the time used by local search. (forth row) The number of iterations used by different methods at different control parameters, when the method was successful at finding a solution. The number of iterations for each of 100 random instances is rounded to the closest power of 2. This does not include the iterations used by local search after SP-dec. 86 CHAPTER 3. CONSTRAINT SATISFACTION fixed to a trivial cluster b pi = (1, 1, . . . , 1), in which all assignments are allowed. This is particularly pronounced for 3-COL. For instances in which non-trivial fixes are zero, the success rate is solely due to local search (i.e., BP-dec). (V) While SP-dec(C) and SP-dec(S) have a similar performance for 3-SAT, SP-dec(C) significantly outperforms SP-dec(S) for 3-COL. Table 3.1 reports the success-rate as well as the average of total iterations in the successful attempts of each method, where the number of iterations for SP-dec(C) and (S) is the sum of iterations used by the method plus the iterations of the following BP-dec. Here we observe that perturbed BP can solve most of easier instances using only T = 1000 iterations (e.g., see perturb BP’s result for 3-SAT at α = 4., 3-COL at α = 4.2 and 9-COL at α = 33.4). The results also show that most difficult instances (that require more time/iterations) for each method approximately correspond to the control parameter for which half of the instances are satisfied. Larger control parameters usually result in early failure in satisfiability. Table 3.1 suggests that, as we speculated in section 3.2, SP-dec(C) is in general preferable to SPdec(S), in particular when applied to the coloring problem. The most important advantage of Perturbed BP over SP-dec and Perturbed SP is that it can be applied to instances with large factor cardinality (e.g., 10-SAT) and variable domains (e.g., 9-COL). For example for 9-COL, the cardinality of each SP message is 29 = 512, which makes SP-dec and Perturbed SP impractical. Here BP-dec is not even able to solve a single instance around the dynamical transition (as low as α = 33.4) while perturbed BP satisfies all instances up to α = 34.1.11 3.4 Clique-cover problem The K-clique-cover C = {C1 , . . . , CK } for a graph G = (V, E) is a partitioning of V to at most K cliques – i.e., ∀i, j, k i, j ∈ Ck ⇒ (i, j) ∈ E. NP-completeness of K-clique-cover can be proved by reduction from K-coloring [159]: A K-cliquecover for G 0 , the complement of G (i.e., G 0 = (V, E 0 = {(i, j) | (i, j) ∈ / E})), is a K-coloring for G, where all the nodes in the same clique of G 0 are allowed to have the same color in G. The relation between K-clique-cover and K-coloring extends to their factor-graphs. While in Kcoloring, factors f{i,j} (xi , xj ) = 1(xi 6= xj ) ∀(i, j) ∈ E ensure that the connected nodes have different colors, for k-clique-cover factors f{i,j} (xi , xj ) = 1(xi 6= xj ) ∀(i, j) ∈ / E ensure that nodes that are not connected can not belong to the same clique. Here xi ∈ {1, . . . , K} represents the clique of node i. The factors, f{i,j} (xi , xj ) = 1(xi 6= xj ), in both K-clique-cover and K-coloirng are inverse Potts factors that allow efficient O(K) calculation (see section 2.2.1). Using E(i, ·) = {(i, j) ∈ E} to denote the set of edges adjacent to node i, the following claim states the complexity of BP updates. 11 Note that for 9-COL condensation transition happens after rigidity transition. So if we were able to find solutions after rigidity, it would have implied that condensation transition marks the onset of difficulty. However, this did not occur and similar to all other cases, Perturbed BP failed before rigidity transition. 3.4. CLIQUE-COVER PROBLEM 87 Table 3.1: Comparison of different methods on {3, 4}-SAT and {3, 4, 9}-COL. For each method the success-rate and the average number of iterations (including local search) on successful attempts are reported. The approximate location of phase transitions are from [219, 330] . 3.86 3-SAT 4-SAT success rate avg. iters. success rate avg. iters. success rate avg. iters. success rate avg. iters. avg. iters. Perturbed SP dynamical and condensation transition 85405 99% 102800 100% 96475 100% 1301 100% 1211 100% 104147 83% 118852 100% 111754 96% 5643 95% 1121 100% 4.2 93904 28% 118288 65% 113910 64% 19227 53% 3415 87% 4.22 100609 12% 112910 33% 114303 36% 22430 28% 8413 69% 4.23 123318 5% 109659 36% 107783 36% 18438 16% 9173 58% 4.24 165710 1% 126794 23% 118284 19% 29715 7% 10147 41% 4.25 N/A 0% 123703 9% 110584 8% 64001 1% 14501 18% 4.26 37396 1% 83231 6% 106363 5% 32001 3% 22274 11% 4.268 satisfiability transition 9.38 dynamical transition 9.547 condensation transition 9.73 134368 8% 119483 32% 120353 35% 25001 43% 11142 86% 9.75 168633 5% 115506 15% 96391 21% 36668 27% 9783 68% N/A 0% 83720 9% 139412 7% 34001 12% 11876 37% 9.88 rigidity transition 9.931 satisfiability transition dynamical and condensation transition 4.2 24148 93% 25066 94% 24634 94% 1511 100% 1151 100% 4.4 51590 95% 52684 89% 54587 93% 1691 100% 1421 100% 4.52 61109 20% 68189 63% 54736 1% 7705 98% 2134 98% 4.56 N/A 0% 63980 32% 13317 1% 28047 65% 3607 99% 4.6 N/A 0% 74550 2% N/A 0% 16001 1% 18075 81% 4.63 N/A 0% N/A 0% N/A 0% 48001 3% 29270 26% N/A 0% N/A 0% N/A 0% 40001 2% 88% 71214 93% 1931 100% 1331 4.66 4.66 rigidity transition N/A 0% 4.687 satisfiability transition 8.353 dynamical transition 8.4 9-COL Perturbed BP 4.15 4 4-COL SP-dec(S) 4.1 9.78 3-COL SP-dec(C) success rate ctrl param α Problem BP-dec 8.46 64207 92% 72359 100% dynamical transition 8.55 77618 13% 60802 13% 62876 9% 3041 100% 5577 100% 8.7 N/A 0% N/A 0% N/A 0% 50287 14% N/A 0% 8.83 rigidity transition 8.901 satisfiability transition 33.45 dynamical transition 33.4 N/A 0% N/A N/A N/A N/A 1061 100% N/A N/A 33.9 N/A 0% N/A N/A N/A N/A 3701 100% N/A N/A 34.1 N/A 0% N/A N/A N/A N/A 12243 100% N/A N/A 34.5 N/A 0% N/A N/A N/A N/A 48001 6% N/A N/A 35.0 N/A 0% N/A N/A N/A N/A N/A 0% N/A N/A 39.87 rigidity transition 43.08 condensation transition 43.37 satisfiability transition 88 CHAPTER 3. CONSTRAINT SATISFACTION Claim 3.4.1. Each iteration of BP with variable-synchronous message update for K-clique-cover factorP graph is O(K(N 2 − |E|)), while asynchronous message update is O(K i∈V (N − |E(i, ·)|)2 ). Proof. Here the complexity of calculating factor-to-variable message (b p{i,j}→i ) is O(K). Since there are N 2 − E factors (one for each edge in G 0 ) the total cost of factor-to-variable messages becomes O(K(N 2 − |E|)). The time complexity of each variable-to-factor message (b pi→{i,j} ) is O(K|∆i|), where ∆i, Markov blanket of i in the factor-graph, is the set of nodes in V that are not adjacent to i in G – i.e., |∆i| = N − E(i, ·). Using variable-synchronous update the total cost of variable-to-factor messages becomes P O(K i∈V N − |E(i, ·)|) = O(K(N 2 − 2|E|)). This means the cost of all messages in BP update is in the order of O(K(N 2 − |E|)). However, using asynchronous update, at each node i, we have to calculate N − |E(i, ·)| messages. Since each of them is O(N − |E(i, ·)|), the total cost of variable-to-factor dominates the cost of BP P update which is O(K i∈V (N − |E(i, ·)|)2 ). Our experimental results for K-clique-cover are within the context of a binary-search scheme, as the sum-product reduction of the min-max formulation of K-clustering. 3.5 Dominating set and set cover The K-dominating set of graph G = (V, E) is a subset of nodes D ⊆ V of size |D| = K such that any node in V \ D is adjacent to at least one member of D – i.e., ∀i ∈ V \ D ∃j ∈ D s.t. (i, j) ∈ E. The dominating set problem is NP-complete [107] and has simple reductions to and from set cover problem [158]. As we see, the factor-graph formulations of these problems are also closely related. Figure 3.6: (left) an induced 2-set-cover problem and the solution D = {i, k}. (right) The factor-graph representation of the same problem, where leader factors are grey squares, consistency factors are in black and the K-of-N factor is in white. 3.5. DOMINATING SET AND SET COVER 89 Given universe set V and a set of its subsets S = {V1 , . . . , VM } s.t. Vm ⊆ V, we say C ⊆ S covers S V iff each member of V is present in at least one member of C –i.e., Vm ∈C Vm = V. Now we consider a natural set-cover problem induced by any directed graph. for each node i ∈ V, define a subset Vi = {j ∈ V Given a directed-graph G = (V, E), | (j, i) ∈ E} as the set of all nodes that are connected to i. Let S = {V1 , . . . , VN } denote all such subsets. An induced K-set-cover of G is a set C ⊆ S of size K that covers V. Equivalently, The induced K-set-cover of G = (V, E) is a subset of vertices D ⊆ V, with |D| = K, such that every node not in D is connected to at least one node in D. For example in figure 3.6(left), S = {{n, m, i}, {i, j}, {j, k, l}, {l, m, n}, {n}} and its induced solution C = {{n, m, i}, {j, k, l}} is indicated by grey nodes D = {i, k}. If we consider an undirected graph G as a directed graph with edges in both directions, then Kdominating set of G is equivalent to an induced K-set-cover problem on G. Moreover given any K-setcover problem instance S = {V1 , . . . , Vm }, we can construct a directed graph G such that the “induced” S K-set-cover on G is equivalent to the given K-set-cover problem. For this, let V = ( Vm ∈S Vm ) ∪ {u1 , . . . , uM } be the collection of nodes in S plus one node um per each subset Vm ∈ S. Now define the directed edges in E to connect every i ∈ Vm to its representative um . Moreover connect all representatives to each other in both directions – i.e., E = {(i, um ) | ∀m, i ∈ Vm } ∪ {(um , um0 ) | ∀m 6= m0 }. It is easy to show that the induced K-set-cover on this directed graph defines a set-cover for S. 3.5.1 Factor-graph and complexity For both problems we have one variable per edge xi:j ∈ {0, 1} ∀(i, j) ∈ E. Note that the G for induced K-set-cover problem is a directed graph, while the G for the K-dominating-set is undirected. This is the only difference that affects the factor-graph representation of these two problems. Here, xi:j = 1 indicates that node j ∈ D and node i is associated with node j. Three types of constraint factors ensure the assignments to xi:j define a valid solution to K-dominating-set and induced K-set-cover: • Leader factors ensure that each node i is associated with at least one node j (where j = i is admissible). Let E + (i, ·) = {(i, j) ∈ E} ∪ {(i, i)} be the set of edges leaving node i plus (i, i). Then fE + (i,·) (xE + (i,·) ) = 1(( X xi:j ) ≥ 1) ∀i ∈ V (3.6) (i,j)∈E + (i,·) is the leader factor associated with node i. • Consistency factors ensure that if node j is selected as the leader by node i, node j also selects itself as leader: f{i:j,j:j} (xi:j , xj:j ) = 1(xi:j = 0 ∨ xj:j = 0) ∀(i, j) ∈ E (3.7) An alternative form of this factor is a high-order factor that allows efficient O(|E(·, i)|) factor-to- 90 CHAPTER 3. CONSTRAINT SATISFACTION variable update fE(·,i) (xE(·,i) ) = 1(xi:i = 1 ∨ X xj:i = 0) ∀i ∈ V (3.8) (i,j)∈E(·,i) • At most K-of-N factor ensures that at most K nodes are selected as leaders (|D| ≤ K): f{i:i,j:j,...,l:l} (x{i:i,j:j,...,l:l} ) = 1( X xi:i ≤ K) (3.9) i∈V Figure 3.6 shows an example of induced K-set-cover problem and its corresponding factor-graph. In section 2.2.1 we saw that it is possible to calculate sum-product factor-to-variable BP messages for leader factors in O(|E(i, ·)|) and each at-most-K-of-N factor in O(KN ). This cost for consistency factors is O(1) for the pairwise and O(|E(·, i)|) for the alternative formulation. Claim 3.5.1. The time-complexity of message passing for the factor-graph above depending on the update schedule is O(|E| + KN ) for factor-synchronous (f-sync; see section 2.1.1) update and O(KN 2 + P 2 2 i∈V |E(i, ·)| + |E(·, i)| ) for asynchronous update. Proof. We assume the consistency factors are in the higher order form of equation (3.8). Here, each variable xi:j is connected to at most three factors and therefore the cost of variable-to-factor messages is P O(1). If we calculate factor-to-variable messages simultaneously, the cost is O( i∈V |E(i, ·)|) for leader P and O( i∈V |E(·, i)|), giving a total of O(|E|). Adding this to the cost of K-of-N factor the total cost per iteration of BP is O(|E| + KN ). On the other hand, if we update each factor-to-variable separately, the previous costs are multiplied P by |∂I|, which gives O(KN 2 + i∈V |E(i, ·)|2 + |E(·, i)|2 ). 3.6 Clique problem, independent set and sphere packing Given graph G, the K-clique problem asks whether G contains a clique of size at least K. The Kclique problem is closely related to K-independent-set. Given graph G = (V, E), the K-independent set problem asks whether V contains a subset of size at least K, s.t. there is no connection between nodes in D – i.e., ∀i, j ∈ D (i, j) ∈ / E. The relation between K-clique problem and K-independent-set is analogous to the connection between K-coloring and K-clique-cover problems: the K-clique problem on G is equivalent to K-independent-set problem on its complement G 0 . K-independent-set is in turn equivalent to (N-K)-vertex cover problem. A vertex cover D0 ⊆ V is a subset of nodes such that each edge is adjacent to at least one vertex in D0 . It is easy to see that D is an independent set iff D0 = V \ D is a vertex cover. Therefore our solution here for independent set directly extends to vertex cover. 3.6. CLIQUE PROBLEM, INDEPENDENT SET AND SPHERE PACKING 91 K-packing is a special case of sub-graph isomorphism, which asks whether a graph G1 is a sub-graph of G2 . For packing, G2 is the main graph (G) and G1 is the complete graph of size K (see section 5.3) Kindependent-set and K-clique problems are also closely related to sphere packing and finding nonlinear codes. To better motivate these problems, here we start with the problem of K-packing formulated as min-max problem in (several) factor-graphs. We then show that the sum-product reduction of K-packing is K-independent-set and K-clique problems. By doing this we simultaneously introduce message passing solutions to all three problems. Given a symmetric distance matrix A ∈ RN ×N between N data-points and a number of codewords K, the K-packing problem is to choose a subset of K points such that the minimum distance Ai,j between any two code-words is maximized. Here we introduce two different factor-graphs such that min-max inference obtains the K-packing solution. In order to establish the relation between the min-max problem and the CSPs above, we need the notion of y-neighbourhood graph Definition 3.6.1. The y-neighborhood graph for (distance) matrix A ∈ RN ×N is defined as the graph G(A, y) = (V, E), where V = {1, . . . , N } and E = {(i, j) | Ai,j ≤ y}. 3.6.1 Binary variable factor-graph Let binary variables x = {x1 , . . . , xN } ∈ {0, 1}N indicate a subset of variables of size K that are selected as code-words. We define the factors such that the min-max assignment x∗ = argx min max fI (xI ) I∈F is the K-packing solution. Define the factor-graph with the following two types of factors: • K-of-N factor (section 2.2.1) fN (x) = 1(( X xi ) = K) i∈N ensures that K code-words are selected. Recall that definition of 1(.) depends on the semiring (equation (1.20)). The K-packing problem is defined on the min-max semiring. However, since we plan to solve the min-max inference by sum-product reductions, it is important to note that the py reduction of 1(.) for any y is 1(.) as defined for sum-product ring. • Pairwise factors are only effective if both xi and xj are non-zero f{i,j} (xi , xj ) = min 1(xi = 0 ∨ xj = 0), max 1(xi = 1 ∧ xj = 1), −Ai,j where the tabular form is simply  ∀i, j (3.10) 92 CHAPTER 3. CONSTRAINT SATISFACTION xj xi 0 1 0 −∞ −∞ 1 −∞ −Ai,j Here the use of −Ai,j is to convert the initial max-min objective to min-max.12 Recall that G(A, y) defines a graph based on the distance matrix A, s.t. two nodes are connected iff their distance is “not larger than” y. This means G(−A, −y) corresponds to a graph in which the connected nodes have a distance of “at least” y. Proposition 3.6.1. The py -reduction of the K-packing factor-graph above for the distance matrix A ∈ RN ×N defines a uniform distribution over the cliques of G(−A, −y) of size K. Proof. Since py (x) is uniform over its domain it is enough to show that: • Every clique of size K in G(−A, −y) corresponds to a unique assignment x∗ with py (x∗ ) > 0: Given a clique C ⊆ V of size K in G(−A, −y) = (V, {(i, j) | Ai,j ≥ y}), define x∗ = {xi = ident(i ∈ C) | i ∈ V}. It is easy to show that py (x∗ ) > 0. For this we need to show that all the constraint factors in py are satisfied. The K-of-N factor is trivially satisfied as |C| = K. The py -reduction of the pairwise factor of equation (3.10) becomes  f{i,j} (xi , xj ) = 1(xi = 0 ∨ xj = 0) + 1(xi = 1 ∧ xj = 1)1(−Ai,j ≤ −y) ∀i, j (3.11) where we replaced min and max with + and . operators of the sum-product semiring and thresholded −Ai,j by −y. To see that all pairwise constraint factors are satisfied consider two cases: (I) nodes i, j ∈ C, and therefore x∗i = x∗j = 1. This also means i and j are connected and definition of G(−A, −y), this implies Ai,j ≥ y. Therefore the second term in factor above evaluates to one. (II) either i or j are not in C, therefore the first term evaluates to one. Since both pairwise factors and the K-of-N factors for x∗ are non-zero py (x∗ ) > 0. • every assignment x∗ with py (x∗ ) > 0 corresponds to a unique clique of size K in G(−A, −y): equation (3.11) implies xi = 1 ∧ xj = 1 ⇒ Ai,j ≥ y. On the other hand, py (x) > 0 means K-of-N factor is satisfied and therefore exactly K variables xi are nonzero. Therefore the index of these variables identifies subset of nodes in G(−A, −y) that are connected (because Ai,j ≥ y), forming a clique. Claim 3.6.2. The time-complexity of each iteration of sum-product BP for the factor-graph above is – O(N K + |E|) for variable and factor synchronous update. – O(N 2 K) for factor-synchronous (f-sync) message update. – O(N 3 ) for completely asynchronous update. 12 The original objective is max-min because it aims to maximize the minimum distance between any two code-words. 3.6. CLIQUE PROBLEM, INDEPENDENT SET AND SPHERE PACKING 93 Figure 3.7: Using message passing to choose K = 30 out of N = 100 random points in the Euclidean plane to maximize the minimum pairwise distance (with T = 500 iterations for PBP). Touching circles show the minimum distance Proof. The cost of f-sync calculation of factor-to-variable messages for the K-of-N factor is O(N K) and the cost of factor-to-variable messages for pairwise factors is O(1). Since there are |E| such factor, this cost evaluates to O(N K + |E|). Since each node is adjacent to |E(i, ·)| other nodes, the variableP synchronous update of variable-to-factor messages is O( i∈V |E(i, ·)|) = O(|E|), which gives a total time-complexity of O(N K + |E|). In asynchronous update, the cost of factor-to-variable messages for the K-of-N factor is O(N 2 K) as we need to calculate each message separately. Moreover, updating each variable-to-factor message P is O(|E(i, ·)), resulting a total of O( i∈V |E(i, ·)|2 ) = O(N 3 ). Since K ≤ N , when all the updates are asynchronous, this cost subsumes the factor-to-variable cost of O(N 2 K). A corollary is that the complexity of finding the approximate min-max solution by sum-product reduction is O((N K + |E|) log(N )) using synchronous update. Figure 3.7 shows an example of the solution found by message passing for K-packing with Euclidean distance. 3.6.2 Categorical variable factor-graph Define the K-packing factor-graph as follows:Let x = {x1 , . . . , xK } be the set of K variables where xi ∈ {1, . . . , N }. For every two distinct points 1 ≤ i < j ≤ K define the factor  f{i,j} (xi , xj ) = max − Axi ,xj , 1(xi 6= xj ) (3.12) Here each variable represents a code-word and this factor ensures that code-words are distinct. Moreover if xi and xj are distinct, f{i,j} (xi , xj ) = −Axi ,xj is the distance between the nodes that xi and xj 94 CHAPTER 3. CONSTRAINT SATISFACTION represent. The tabular form of this factor is xj xi 1 2 ··· N −1 N 1 ∞ −A1,2 ··· −A1,N −1 −A1,N 2 −A2,1 .. . ∞ .. . ··· .. . −A2,N −1 .. . −A2,N .. . −AN −1,1 −AN −1,2 ··· ∞ −AN −1,N −AN,1 −AN,2 ··· −AN,N −1 ∞ ··· N −1 N The following proposition relates this factor-graph to K-clique problem. Proposition 3.6.3. The py -reduction of the K-packing factor-graph above for the distance matrix A ∈ RN ×N defines a uniform distribution over the cliques of G(−A, −y) of size K. Proof. Since py defines a uniform distribution over its support, it is enough to show that any clique of size K over G(−A, −y) defines a unique set of assignments all of which have nonzero probability (py (x) > 0) and any assignment x with py (x) > 0 defines a unique clique of size at least K on G(−A, −y). First note that the basic difference between G(A, y) and G(−A, −y) is that in the former all nodes that are connected have a distance of at most y while in the later, all nodes that have a distance of at least y are connected to each other. Consider the py -reduction of the pairwise factor of equation (3.12) f{i,j} (xi , xj ) = 1 max(−Axi ,xj , 1(xi 6= xj )) ≤ y  (3.13) = 1(−Axi ,xj ≤ y ∧ xi 6= xj ) where, basically, we have replaced max from min-max semiring with ⊗ operator of the sum-product semiring and thresholded Axi ,xj . • Any clique of size K in G(−A, −y), defines K unique assignments, such that for any such assignment x∗ , py (x∗ ) > 0: For a clique C = {c1 , . . . , cK } ⊆ V of size K, define x∗i = cπ(i) , where π : {1, . . . , K} → {1, . . . , K} is a permutation of nodes in clique C. Since there are K such permutations we may define as many assignments x∗ . Now consider one such assignment. For every two nodes x∗i and x∗j , since they belong to the clique C in G(−A, −y), they are connected and Axi ,xj ≥ y. This means that all the pairwise factors defined by equation (3.13) have non-zero values and therefore py (x) > 0. • Any assignment x∗ with py (x∗ ) > 0 corresponds to a unique clique of size K in G(−A, −y): Let C = {x∗1 , . . . , x∗K }. Since py (x∗ ) > 0, all pairwise factors defined by equation (3.13) are non-zero. Therefore ∀i, j 6= i Ax, xj ≥ y, which means all xi and xj are connected in G(−A, −y), forming a clique of size K. 3.6. CLIQUE PROBLEM, INDEPENDENT SET AND SPHERE PACKING 95 To put simply, in acquiring the py -reduction, we set the values in the table form above to zero if their value is less than y and set them to one otherwise. The resulting factor-graph, defines a distribution py (x), s.t. py (x) > 0 means x defines a clique of size K in a graph G(−A, −y) which connects nodes with distance larger than y. Claim 3.6.4. Each iteration of BP for this factor-graph with pairwise factors is O(N 2 K 2 ), for synchronized update and O(N 2 K 3 ) for asynchronous update. Using the sum-product reduction of min-max inference this suggests a O(N 2 K 2 log(N )) (for sync. update) and O(N 2 K 3 log(N )) (for asynchronous update) procedure for K-packing problem. Proof. (Claim 3.6.4) Since the factors are not sparse, the complexity of calculating a single factor-tovariable message is O(|XI |) = O(N 2 ), resulting in O(N 2 K 2 ) cost per iteration of variable-synchronous update for BP. However if we update each message separately, since each message update costs O(N 2 K), the total cost of BP per iteration is O(N 2 K 3 ) Since the diversity of pairwise distances is that of elements in A – i.e., |Y| = O(N 2 ) – the general cost of finding an approximate min-max solution by message passing is O(N 2 K 2 log(N )) for sync. message update and O(N 2 K 3 log(N )) for async. update. The py -reduction of our second formulation was first proposed by [252] to find non-linear binary codes. The authors consider the Hamming distance between all binary vectors of length n (i.e., N = 2n ) to obtain binary codes with known minimum distance y. As we saw, this method is O(N 2 K 2 ) = O(22n K 2 ) –i.e., grows exponentially in the number of bits n. In the following section, we introduce a factor-graph formulation specific to categorical variables with Hamming distance whose message passing complexity is polynomial in n = log(N ). Using this formulation we are able find optimal binary and ternary codes where both n and y are large. 3.6.3 Efficient Sphere packing with Hamming distance Our factor-graph defines a distribution over the K binary vectors of length n such that the distance between every pair of binary vectors is at least y. 13 To better relate this to K-clique problem, consider 2n binary code-words of length n as nodes of a graph and connect two nodes iff their Hamming distance is at least y. Finding a K-clique in this graph is equivalent to discovery of so-called nonlinear binary codes – a fundamental problem in information theory (e.g., see [75, 193]). Here assuming y is an odd number, if at most y−1 2 digits of a code-word are corrupted (e.g., in communication), since every pair of codes are at least y digits apart, we can still recover the uncorrupted code-word. The following is a collection of K = 12 ternary code-words of length n = 16, obtained using the factor-graph that we discuss in this section, where every pair of code-words are different in at least y = 11 digits. 13 For convenience we restrict this construction to the case of binary vectors. A similar procedure may be used to find maximally distanced ternary and q-ary vectors, for arbitrary q. 96 CHAPTER 3. CONSTRAINT SATISFACTION Figure 3.8: The factor-graph for sphere-packing with Hamming distances, where the distance factors are white squares and z-factors are in black. 2 1 2 1 0 1 1 2 2 1 2 1 2 1 0 2 1 1 1 2 1 0 0 2 2 1 1 1 0 2 1 0 0 0 1 2 0 1 2 0 2 1 2 2 1 0 2 0 0 0 0 2 1 0 1 2 1 0 1 0 2 1 0 1 2 2 0 2 2 2 1 1 2 0 2 2 1 2 1 2 0 2 0 0 0 2 0 2 0 0 2 1 0 0 0 0 1 1 2 0 0 1 2 2 0 0 1 0 1 2 2 1 2 0 2 0 2 1 0 1 1 2 0 1 1 1 2 0 0 2 1 1 1 1 1 1 0 1 0 0 0 0 1 2 1 0 0 1 0 2 0 0 1 2 0 0 2 2 1 2 1 2 2 1 1 0 2 1 1 2 2 2 2 0 2 1 1 0 1 0 2 2 2 1 0 1 1 2 2 1 0 2 The construction of this factor-graph is more involved than our previous constructions. The basic idea to avoid the exponential blow up is to have one variable per digit of each code-word (rather than one variable per code-word). Then for each pair of code-words we define an auxiliary binary vector of the same length, that indicates if the two code-words are different in each digit. Finally we define an at-least-y-of-n constraint over each set of auxiliary vectors that ensures every two pair of code-words are at least different in y digits. Figure 3.8 shows this factor-graph. More specifically, let x = {x1:· , . . . , xK:· } be a set of binary vectors, where xi:· = {xi:1 , . . . , xi:n } represents the ith binary vector or code-word. Additionally for each two code-words 1 ≤ i < j ≤ K, define an auxiliary binary vector z i:j:· = {zi:j:1 , . . . , zi:j:n } of length n. For each distinct pair of binary vectors xi:· and xj:· , and a particular digit 1 ≤ k ≤ n, the auxiliary variable is constrained to be zi:j:k = 1 iff xi:k 6= xj:k . Then we define an at-least-y-of-n factor over z i:j:· for every pair of code-words, to ensure that they differ in at least y digits. 3.6. CLIQUE PROBLEM, INDEPENDENT SET AND SPHERE PACKING The factors are defined as follows • Z-factors: For every 1 ≤ i < j ≤ K and 1 ≤ k ≤ n, define f{i:k,j:k,i:j:k} (xi:k , xj:k , zi:j:k ) = 1   (xi:k 6= xj:k ) ∧ zi:j:k = 1 ∨ (xi:k = xj:k ) ∧ zi:j:k = 0 This factor depends on three binary variables, therefore we can explicitly define its tabular form containing 23 = 8 possible inputs. Here the only difference between binary and ternary (and q-ary) codes in general is in the tabular form of this factor. For example for ternary codes, the tabular for of this factor is a 3 × 3 × 2 array (zi:j:k is always binary). • Distance-factors: For each z i:j:· define at-least-y-of-n factor (section 2.2.1): fi:j:· (z i:j:· ) = 1( X zi:j:k ≥ y) 1≤k≤n Claim 3.6.5. Each iteration of sum-product BP over this factor-graph is – O(K 2 ny) for variable and factor synchronous update. – O(K 2 n2 y) for variable-sync update. – O(K 3 n + K 2 n2 y) for completely asynchronous BP update. Proof. (Claim 3.6.5) We first consider the complexity of variable-to-factor updates: Each auxiliary variable zi:j:k is connected to three factors and each xi:j is connected to O(K) z-factors. Since there are O(nK), xi:j variables a variable-sync. update of variable-to-factor messages is O(nK 2 ), while async. update is O(nK 3 ). Next we consider two possibilities of factor-to-variable updates: We have O(nK 2 ) z-factors, and factor-to-variable update for each of them is O(1), this cost is subsumed by the minimum variable-tofactor cost. The factor-graph also has O(K 2 ) distance factors, where the cost of each factor-to-variable update is O(ny). Since |∂I| = K for a distance factor, a factor-sync. update is O(K 2 ny) in total, while an async. update is O(K 2 n2 y). Adding the cost of variable-to-factor and factor-to-variable in different scenarios we get the timecomplexities stated in the claim. The following table reports some optimal binary codes (including codes with large number of bits n) from [193], recovered using this factor-graph. We used Perturbed BP with variable-sync update and T = 1000 iterations to find an assignment x∗ , z ∗ with p(x∗ , z ∗ ) > 0. 97 98 CHAPTER 3. CONSTRAINT SATISFACTION n 3.7 K y n K y n K y n K y 8 4 5 11 4 7 14 4 9 16 6 9 17 4 11 19 6 11 20 8 11 20 4 13 23 6 13 24 8 13 23 4 15 26 6 15 27 8 15 28 10 15 28 5 16 26 4 17 29 6 17 29 4 19 33 6 19 34 8 19 36 12 19 32 4 21 36 6 21 38 8 21 39 10 21 35 4 23 39 6 23 41 8 23 39 4 25 43 6 23 46 10 25 47 12 25 41 4 27 46 6 27 48 8 27 50 10 27 44 4 29 49 6 29 52 8 29 53 10 29 Optimization variations of CSPs This section briefly reviews the optimization variations of the CSPs, we have studied so far. The optimization version of satisfiability is known as max-SAT or maximum weighted SAT, where each clause has a weight, and the objective is to maximize the weighted sum of satisfied clauses. Here, simply using factors fI (xI ) : XI → {0, −wI }, where wI is the positive weight of clause I, min-sum BP will attempt to find the max-SAT solution. Note that here fI is not a “constraint” factor anymore (see definition 1.3.2). Alternative approaches using variations of energetic survey propagation has also been used to improve max-SAT results [63, 64]. A less studied optimization variation of satisfiability is adversarial SAT which corresponds to min-max-sum inference [54]. For minimum coloring – a.k.a. chromatic number – and minimum clique-cover problem, since the optimal value 1 ≤ K ∗ ≤ Kmax is bounded, by access to an oracle for the decision version (or an incomplete solver [160] such as message passing), we can use binary search to find the minimum K in O(τ log(Kmax )) time, where the decision problem has a O(τ ) time-complexity. In particular, since the chromatic number is bounded by the maximum degree [51], approximating the chromatic number using binary search and message passing gives a O(log(maxi (|E(i, ·)|)) maxi (|E(i, ·)|) |E|) time procedure. The same binary-search approach can be used for minimum dominating-set, minimum set-cover, maximum clique, maximum independent set and minimum vertex cover. However, these optimization variations also allow a more efficient and direct approach. Note that both min-max variation and the minimization (or maximization) variations of these problems use binary search. For example both minimum clique-cover and K-clustering (see section 4.3) can be solved using binary-search over Kclique-cover decision problem. The parameter of interest for binary search is K in the former case, and y in the later case, where y is a threshold distance that defines connectivity in G (see definition 3.6.1). However, often both variations (i.e., min-max and minimization or maximization over K) also allow direct message passing solutions. For minimum dominating-set and set-cover, we replace the sum-product semiring with min- 3.7. OPTIMIZATION VARIATIONS OF CSPS 99 sum semiring and drop the K-of-N factor. Instead, a local factor fi:i (xi:i ) = −xi:i wi gives a weight to each node i ∈ V. Here, the min-sum inference seeks a subset of nodes that form a dominating set and have P the largest sum of weights i∈D wi . Also note that by changing the semiring to min-sum, the identity functions 1(.) change accordingly so that the leader factor and consistency constraints remain valid. This gives an efficient O(|E|) synchronous procedure for minimum set-cover and minimum dominatingset. This problem and the resulting message passing solution are indeed a variation of K-medians and affinity propagation respectively (see section 4.1). The same idea applies to maximum clique and maximum independent set: as an alternative to fixing or maximizing the “size” of a clique or an independent set, we may associate each node with a weight wi ∀i ∈ V and seek a subset of nodes that form an independent set (or a clique) with maximum weight. Sanghavi et al. [274] study the max-product message passing solution to this problem and its relation to its LP-relaxation. In particular they show that starting from uniform messages, if BP converges, it finds the solution to LP relaxation. Here we review their factor-graph for maximum independent set using min-sum inference. Let x = {x1 , . . . , xN } ∈ {0, 1}N be a set of binary variables, one for each node in V, where xi = 1 means i ∈ D, the independent set. • Local factors capture the cost (negative weight) for each node and is equal to −wi if xi = 1 and zero otherwise fi (xi ) min(−wi , 1(xi = 0)) ∀i ∈ V = • Pairwise factors ensure that if (i, j) ∈ E, then either xi = 0 or xj = 0 f{i,j} (x{i,j} ) = 1(xi = 0 ∨ xj = 0) ∀(i, j) ∈ E It is easy to see that using a variable synchronous update, message passing can be performed very efficiently in O(|E|). Weigt and Zhou [309] (also see [333]) propose an interesting approach to minimum vertex cover using energetic survey propagation. Here, again x = {x1 , . . . , xN } ∈ {0, 1}N has one binary variable per node i ∈ V and a pairwise factor ensure that all edges are covered by at least one node in the cover f{i,j} (x{i,j} ) = 1(xi = 1 ∨ xj = 1) ∀(i, j) ∈ E Using the xor-and semiring, the resulting fixed points of warning propagation reveal minimal (but not necessarily optimal) vertex covers. The authors then suggest using survey propagation, and decimation to find the warning propagation fixed points with lowest energy (i.e., smallest size of cover). Chapter 4 Clustering Clustering of a set of data-points is a central problem in machine learning and data-mining [4, 102, 180, 184, 191, 230, 236, 248, 251, 266, 318, 322]. However many interesting clustering objectives, including the problems that we consider in this section are NP-hard. In this section we present message passing solutions to several well-known clustering objectives including K-medians, K-clustering, K-centers and modularity optimization. Message passing has also been used within Expectation Maximization to obtain some of the best results in learning stochastic block models (a hidden variable model for clustering) [82]. The message passing solution to K-medians and its generalization, clustering by shallow trees are proposed by other researchers. However, for completeness, we review their factor-graphs in sections 4.1 and 4.2. expressing K-clustering and Kcenters problems as min-max inference problems on factor-graphs in sections 4.3 and 4.4. 4.1 K-medians Given a symmetric matrix of pairwise distances A ∈ RN ×N between N data-points, and a number of clusters K, K-medians seeks a partitioning of data-points into K clusters, each associated with a cluster center, s.t. the sum of distances from each data-point to its cluster center is minimized. This problem is NP-hard; however, there exists several approximation algorithms for metric distances [15, 58]. Here we present the binary variable factor-graph [112] for a slightly different version of this objective, proposed by Frey and Dueck [102]. The simplified form of min-sum BP messages in this factor-graph is known as affinity propagation. Here, instead of fixing the number of clusters, K, the objective is modified to incorporate each cluster’s cost to become a center. This cost is added to the sum of distances between the data-points and their cluster centers and used to decide the number of clusters at run-time. Let A be the distance matrix of a directed graph G = (V, E), where (i, j) ∈ / E ⇔ Ai,j = ∞. Moreover let Ai,i denote the willingness of node i to be the center of a cluster. A simple heuristic is to set this 4.1. K-MEDIANS 101 value uniformly to mediani6=j Ai,j . Define x = {xi:j , ∀ (i, j) ∈ E} as a set of binary variables – one per each directed edge (i, j) – where xi:j ∈ {0, 1} indicates whether node i follows node j as its center. Here node i can follow itself as center. The following factors define the cost and constraints of affinity propagation: • Leader factors ensure that each node selects exactly one cluster center. fE + (i,·) (xE(i,·) ) = 1(( X xi:j ) = 1) ∀i ∈ V (i,j)∈E + (i,·) where as before E + (i, .) = {(i, j) ∈ E} ∪ {(i, i)} is the set of edges leaving node i. • Consistency factors as defined by equation (3.8) ensure that if any node i ∈ E(., j) selects node j as its center of cluster, node j also selects itself as the center At this point we note that we used both of these factor-types for set-cover and dominating set problem in section 3.5. The only addition (except for using a different semiring) is the following factors. • Local factors take distances and the willingness to become a center into account  fi:j (x(i,j) ) = min Ai,j , 1(xi:j = 0) ∀(i, j) ∈ E ∪ {(i, i) | i ∈ V} where in effect fi:j (xi:j ) is equal to Ai,j if xi:j = 1 and 0 otherwise See equation (1.20) for definition of 1(.) in min-sum semiring and note the fact that ⊕ = min in this case. This means extensions to other semirings (e.g., min-max) need only to consider a different 1(.) and use their own ⊕ operator. However, direct application of min-max inference to this factor-graph is problematic for another reason: since the number of clusters K is not enforced, as soon as node i becomes center of a cluster, all nodes j with Aj,j ≤ Ai,i can become their own centers without increasing the min-max value. In section 4.4, we resolve this issue by enforcing the number of clusters K and use inference on min-max semiring to solve the corresponding problem known as K-center problem. The complexity of min-sum BP with variable and factor synchronous message update is O(|E|) as each leader and consistency factor allows efficient O(|E(., j)|) and O(|E(i, .)|) calculation of factor-tovariable messages respectively. Moreover, all variable-to-factor messages leaving node i can be calculated simultaneously in O(|E(i, .)|) using variable-synchronous update of equation (2.13). 4.1.1 Facility location problem A closely related problem to K-medians is the facility location problem, where a matrix A ∈ R|V1 |×|V2 | specifies the pairwise distance between two parts of bipartite graph G = (V = (V1 , V2 ), E). The goal is to select a sub-set of facilities D ⊂ V1 to minimize the sum of distances of each customer i ∈ V2 to its associated facility in D. The uncapacitated version of this problem (no restriction on |D|) can be solved as special K-median problem where Ai,i = ∞ ∀i ∈ V2 . Message passing solution for min-sum variations of this problem are 102 CHAPTER 4. CLUSTERING discussed in [187, 188]. We discuss the min-max facility location as a special case of k-center problem in section 4.4. 4.2 Hierarchical clustering By adding a dummy node ∗ and connecting all the cluster centers to this node with the cost Ai,∗ = Ai,i , we can think of the K-median clustering of previous section as finding a minimum cost tree of depth two with the dummy node as its root. The shallow trees of Bailly-Bechet et al. [18] generalize this notion by allowing more levels of hierarchy. The objective is to find a tree of maximum depth d, that minimizes the sum over all its edges. An alternative approach to hierarchical clustering based on nested application of affinity propagation is discussed in [111, 289]. Previously we presented the binary-variable model for affinity propagation. However, it is possible to obtain identical message updates using categorical variables [102]. Here x = {x1 , . . . , xN }, where xi ∈ Xi = {j | (i, j) ∈ E} selects one of the neighbouring nodes as the center of the cluster for node i. In this case we can ignore the leader factors and change the consistency and local factors accordingly. The idea in building hierarchies is to allow each node i to follow another node j even if i itself is followed by a third node k (i.e., dropping the consistency factors). Also xi = i is forbidden. However, this creates the risk of forming loops. The trick used by Bailly-Bechet et al. [18] is to add an auxiliary “depth” variable zi ∈ {0, . . . , d} at each node. Here, the depth of the dummy node ∗ is zero and the depth factors ensure that if i follows j then zi = zj + 1:   fi,j (xi , z i,j ) = 1 zi = zj + 1 ∨ xi 6= j 4.2.1 Spanning and Steiner trees Although finding trees is not a clustering problem, since one could use the same techniques used for clustering by shallow trees, we include it in this section. Given a graph G = (V, E), a penalty wi:j < 0 per edge (i, j) ∈ E and a prize wi > 0 per node i ∈ V, the prize-collecting Steiner tree’s objective is to select a connected sub-graph G 0 = (V 0 ⊆ V, E 0 ⊆ E) with maximum sum of prizes P P i∈V 0 wi + (i,j)∈E 0 wi:j . Since the optimal sub-graph is always a tree, a construction similar to that of shallow trees (with min-sum BP) finds high-quality solutions to depth-limited versions of this problem in O(d|E|) [19, 20, 23, 31]. The main difference with factor-graph of shallow trees is that here the root node is a pre-determined member of V and several tricks are used to find best (set of) root(s). However, since the |V 0 | may be smaller than |V|, a different dummy node ∗ is introduced, with zero cost of connection to all nodes i ∈ V s.t. xi = ∗ means node i is not a part of the Steiner tree (i ∈ V \ V 0 ). Alternatively, if we do not introduce this dummy node such that V 0 = V and moreover, set the node penalties to zero, the result is a depth limited spanning tree. Bayati et al. [24] show that if the 4.3. K-CLUSTERING PROBLEM 103 maximum depth is large enough (e.g., d = N ) and BP is convergent, it will find the minimum spanning tree. 4.3 K-clustering problem Given a symmetric matrix of pairwise distances A ∈ RN ×N between N data-points, and a number of clusters K, K-clustering (a.k.a. min-max clustering) seeks a partitioning of data-points that minimizes the maximum distance between all the pairs in the same partition. We formulate this problem as min-max inference problem in a factor-graph. Let x = {x1 , . . . , xN } with xi ∈ {1, . . . , K} be the set of variables, where xi = k means, point i belongs to cluster k. The Potts factor f{i,j} (xi , xj ) = min 1(xi 6= xj ), Ai,j  ∀1 ≤ i < j ≤ N (4.1) is equal to Ai,j if two nodes are in the same cluster and −∞ otherwise. It is easy to see that using min-max inference on this factor graph, the min-max solution x∗ (equation (1.26)) defines a clustering that minimizes the maximum of all inter-cluster distances. Recall that the y-neighborhood graph (definition 3.6.1) for a distance matrix A is the graph G(A, y) = (V, E(A, y) = {(i, j) | Ai,j ≤ y}). Claim 4.3.1. The py -reduction of the min-max clustering factor-graph above is identical to K-cliquecover factor-graph of section 3.4 for G(A, y). Proof. The py -reduction of the K-clustering factor (equation (4.1)) is   f{i,j} (xi , xj ) = 1 min 1(xi 6= xj ), Ai,j ≤ y = 1(xi 6= xj ∨ Ai,j ≤ y) Recall that the K-clique-cover factor-graph, defines a pairwise factor between any two nodes i and j whenever (i, j) ∈ / E(A, y), – i.e., whenever Ai,j ≤ y it does not define a factor. However, Ai,j ≤ y means that the reduced constraint factor above is satisfied and therefore we only need to consider the cases where Ai,j > y. This gives f{i,j} (xi , xj ) = 1(xi 6= xj ), which is the K-clique-cover factor between two nodes i and j s.t. (i, j) ∈ / E(A, y). We use binary-search over sum-product reductions to approximate the min-max solution (see equation (1.25)). Considering the O(N 2 K) cost of message passing for K-clique-cover, this gives O(N 2 K log(N 2 )) = O(N 2 K log(N )) cost for K-clustering, where the log(N 2 ) is the cost of binary search over the set of all possible pairwise distance values in A. 104 CHAPTER 4. CLUSTERING Figure 4.1 compares the performance of min-max clustering using message passing to that of Furthest Point Clustering (FPC) [119] which is 2-optimal when the triangle inequality holds. Note that message passing solutions are superior even when using Euclidean distance. Figure 4.1: Min-max clustering of 100 points with varying numbers of clusters (x-axis). Each point is an average over 10 random instances. The y-axis is the ratio of the min-max value obtained by sum-product reduction (and using perturbed BP with T = 50 to find satisfying assignments ) divided by the min-max value of Furthest Point Clustering (FPC). (left) Clustering of random points in 2D Euclidean space. The red line is the lower bound on the optimal result based on the worst case guarantee of FPC. (right) Using symmetric random distance matrix where Ai,j = Aj,i ∼ U (0, 1). 4.4 K-center problem Given a pairwise distance matrix D ∈ RN ×N , the K-center problem seeks a partitioning of nodes, with one center per partition such that the maximum distance from any node to the center of its partition is minimized. This problem is known to be NP-hard, even for Euclidean distance matrices [201], however Kcenter has some approximation algorithms that apply when the distance matrix satisfies the triangle inequality [87, 135]. The method of Dyer and Frieze [87] is very similar to furthest point clustering and extends to weighted K-center problem in which the distance from any point to all the other points is scaled by its weight. The more general case of asymmetric distances does not allow any constant-factor approximation (however o(log(N ))-approximation exists [66, 237]). Here we define a factor-graph, whose min-max inference results in the optimal solution for K-center problem. For this consider the graph G(V, E) induced by the distance matrix A s.t. V = {1, . . . , N } and Ai,j = ∞ ⇔ (i, j) ∈ / E. Let x = {xi:j | (i, j) ∈ E} be the set of variables, where xi:j ∈ {0, 1} indicates whether j is the center of cluster for i. Define the following factors: 4.4. K-CENTER PROBLEM 105 Figure 4.2: The factor-graph for K-center problem, where the local factors are black squares, the leader factors are light grey, consistency factors are white and K-of-N factor is dark grey. • Local factors:  f(i,j) (xi:j ) = min Ai,j , 1(xi:j = 0) ∀(i, j) ∈ E • Leader, Consistency and at-most-K-of-N factors as defined for the sum-product case of induced K-set-cover and K-independent set (section 3.5). Here we need to replace sum-product 1(.) with the min-max version (equation (1.20)). For variants of this problem such as the capacitated K-center, additional constraints on the maximum/minimum points in each group may be added as the at-least/at-most K-of-N factors. Claim 4.4.1. The py -reduction of the K-center clustering factor-graph above is identical to K-set-cover factor-graph of section 3.5 for G(A, y). Proof. Leader, consistency and at-most-K-of-N factors are identical to the factors used for K-set-cover (which is identical to their py -reduction), where the only difference is that here we have one variable per each (i, j) ∈ E whereas in K-set-cover for G(A, y) we have one variable per (i, j) ∈ E | Ai,j ≤ y. By considering the py -reduction of the local factors   fi:j (xi:j ) = 1 min Ai,j , 1(xi:j) = 0) ≤ y = 1(Ai,j ≤ y ∨ xi:j = 0) we see that we can assume that for Aij > 0, xi:j = 0 and we can drop these variables from the factorgraph. After this we can also omit the py -reduction of the local factors as they have no effect. This gives us the factor-graph of section 3.5 for set-cover. Similar to the K-clustering problem, we use the sum-product reduction to find near-optimal solutions 106 CHAPTER 4. CLUSTERING Figure 4.3: (left) K-center clustering of 50 random points in a 2D plane with various numbers of clusters (x-axis). The y-axis is the ratio of the min-max value obtained by sum-product reduction (T = 500 for perturbed BP) over the min-max value of 2-approximation of [87]. (right) Min-max K-facility location formulated as an asymmetric K-center problem and solved using message passing. Yellow squares indicate 20 potential facility locations and small blue circles indicate 50 customers. The task is to select 5 facilities (red squares) to minimize the maximum distance from any customer to a facility. The radius of circles is the min-max value. to this problem. The binary search seeks the optimal y ∈ Y (where Y is the collective range of all the factors). Here, since only local factors take values other than ±∞, the search is over their range, which is basically all the values in A. This adds an additional log(N ) multiplicative factor to the complexity of K-set-cover (which depends on the message update). We can significantly reduce the number of variables and the complexity by bounding the distance to the center of the cluster y. Given an upper bound y, we may remove all the variables xi:j where Ai,j > y from the factor-graph. Assuming that at most R nodes are at distance Ai,j ≤ y from every node j, the complexity of min-max inference with synchronous update drops to O(N R2 log(N )). This upper bound can be obtained for example by applying approximation algorithms. Figure 4.3(left) compares the performance of message-passing and the 2-approximation of [87] when triangle inequality holds. The min-max facility location problem can also be formulated as an asymmetric K-center problem where the distance to all customers is ∞ and the distance from a facility to another facility is −∞ (figure 4.3(right)). 4.5 Modularity maximization A widely used objective for clustering (or community mining) is Modularity maximization [229]. However, exact optimization of Modularity is NP-hard [45]. Modularity is closely related to fully connected Potts graphical models [259, 332]. Many have proposed various other heuristics for modularity optimization [34, 67, 228, 259, 265]. Here after a brief review of the Potts model in section 4.5.1, we introduce a factor-graph representation of this problem that has a large number of factors in section 4.5.2. We then use the augmentation technique (section 2.2.2) to incrementally incorporate violated constraints 4.5. MODULARITY MAXIMIZATION 107 in these models. 4.5.1 The Potts model Let G = (V, E) be an undirected graph, with M = |E|, N = |V| and the adjacency matrix B ∈ RN ×N , P where Bi,j 6= 0 ⇔ (i, j) ∈ E. Let A be the normalized adjacency matrix where i<j A = 1. Also def P let AE(i,·) = j Ai,j denote the normalized degree of node vi . Graph clustering using modularity optimization seeks a partitioning of the nodes into unspecified number of clusters C = {C1 , . . . , CK }, maximizing def m(C) = X Ci ∈C  X  Ai,j − ζAE(i,·) AE(j,·) (4.2) i,j∈Ci The first term of modularity is proportional to within-cluster edge-weights. The second term is proportional to the expected number of within cluster edge-weights for a null model with the same weighted node degrees for each node i. Here the null model is a fully-connected graph. The resolution parameter ζ – which is by default set to one – influences the size of communities, where higher resolutions motivates a larger number of clusters. In the Potts model, each node i ∈ V is associated with a variable xi ∈ {1, . . . , Kmax }, where Kmax is an upper bound on the number of clusters. Here, each pair of variables have a pairwise interaction f{i,j} (x{i,j} ) =   ζ(A E(i,·) AE(j,·) ) − Ai,j  0 xi = xj (4.3) xi 6= xj where min-sum inference on this fully connected factor-graph gives an assignment of each node to a cluster so as to maximize the modularity. 4.5.2 Clique model Here, we introduce an alternative factor-graph for modularity optimization. Before introducing our factor-graph representation, we suggest a procedure to stochastically approximate the null model using a sparse set of interactions. We generate a random sparse null model with M null < αM weighted edges (E null ), by randomly p sampling two nodes, each drawn independently from Pr(i) ∝ AE(i,·) , and connecting them with a p weight proportional to Bnull ∝ AE(i,·) AE(j,·) . If they have been already connected, this weight is i,j added to their current weight. We repeat this process αM times, however since some of the edges are repeated, the total number of edges in the sparse null model may be less than αM . Finally the 108 CHAPTER 4. CLUSTERING normalized edge-weight in the sparse null model is def Bnull i,j null . k,l Bk,l Anull = P i,j It is easy to see that this generative process in expectation produces the fully connected null model.1 Factor-graph representation Here we use the following binary-valued factor-graph formulation. Let x = {xi:j ∈ {0, 1} | (i, j) ∈ E ∪ E null } be a set of binary variables, and let L denote the cardinality of E ∪ E null . The variable xi:j is equal to one means the corresponding edge, (i, j), is present in the final model, where our goal is to define the factor-graph such that the final model consists of cliques. For this, define the factors as follows: • Local factor for each variable are equal to the difference between the weighted adjacency and the null model if an edge is present (i.e., xi:j = 1)   null fi:j (xi:j ) = min 1(xi:j = 0), Ai,j − Ai,j (4.4) By enforcing the formation of cliques, while minimizing the sum of local factors the negative sum of local factors evaluates to modularity (equation (4.2)): • For each three edges (i, j), (j, k), (i, k) ∈ E ∪ E null , i < j < k that form a triangle, define a clique factor as f{i:j,j:k,i:k} (xi:j , xj:k , xi:k ) = 1(xi:j + xj:k + xi:k 6= 2) (4.5) These factors ensure the formation of cliques – i.e., if two edges that are adjacent to the same node are present (i.e., xi:i = 1 and xi:k = 1), the third edge in the triangle should also be present (i.e., xj:k = 1). The computational challenge here is the large number of clique constraints. For the fully connected null model, we need O(N 3 ) such factors and even using the sparse null model – assuming a random edge 3 3 L L 3 probability a.k.a. Erdos-Reny graph – there are O( N 6 N ) = O( N 3 ) triangles in the graph (recall that L = |E ∪ E null |). Brandes et al. [45] first introduced an LP formulation with similar form of constraints. However, since they include all the constraints from the beginning and the null model is fully connected, their method is only applied to small toy problems. 1 The choice of using square root of weighted degrees for both sampling and weighting is to reduce the variance. One may also use pure importance sampling (i.e., use the product of weighted degrees for sampling and set the edge-weights in the null model uniformly), or uniform sampling of edges, where the edge-weights of the null model are set to the product of weighted degrees. 4.5. MODULARITY MAXIMIZATION 109 Simplified message update and augmentation Here, we give technical details as how to simplify the min-sum BP message update for this factor-graph. The clique factor is satisfied only if either zero, one, or all three of the variables in its domain are non-zero. Therefore, in order to derive message updates b p{i:j,j:k,i:k}→i:j from the clique factor f{i:j,j:k,i:k} to variable xi:j for a particular value of xi:j (e.g., xi:j = 0), we apply ⊕ operator (i.e., minimize) over all the valid cases of incoming messages (e.g., when xi:k and xj:k in clique factor f{i:j,j:k,i:k} are zero). This gives the simplified factor-to-variable messages b p{i:j,j:k,i:k}→i:j (0) = min{0, b pj:k→{i:j,j:k,i:k} , b pi:k→{i:j,j:k,i:k} } b p{i:j,j:k,i:k}→i:j (1) = min{0, b pj:k→{i:j,j:k,i:k} + b pi:k→{i:j,j:k,i:k} } (4.6) where for xi:j = 0, the minimization is over three feasible cases (a) xj:k = xi:k = 0, (b) xj:k = 1, xi:k = 0 and (c) xj:k = 0, xi:k = 1. For xi:j = 1, there are two feasible cases (a) xj:k = xi:k = 0 and (b) xj:k = xi:k = 1. Here we work with normalized messages, such that b pI→i (0) = 0 2 and use b pI→i to denote b pI→i (1). The same applies to the marginal b pi:j , which is a scalar called bias. Here b pi:j > 0 means b pi:j (1) > b pi:j (0) and shows a preference for xi:j = 1. Normalizing clique-factor messages above we get the following form of simplified factor-to-variable messages for clique constraints b p{i:j,j:k,i:k}→i:j = min{0, b pj:k→{i:j,j:k,i:k} + b pi:k→{i:j,j:k,i:k} }− (4.7) min{0, b pj:k→{i:j,j:k,i:k} , b pi:k→{i:j,j:k,i:k} }. In order to deal with large number of factors in this factor-graph, we use the augmentation approach of section 2.2.2. We start with no clique-factors, and run min-sum BP to obtain a solution (which may even be unfeasible). We then find a set of clique constraints that are violated in the current solution and augment the factor-graph with factors to enforce these constraints. In order to find violated constraints in the current solution, we simply look at pairs of positively fixed edges (xi:j = 1 and xi:k = 1) around each node i and if the third edge of the triangle is not positively fixed (xj:k = 0), we add the corresponding clique factor (f{i:j,j:k,i:k} ) to the factor-graph. See algorithm 3 (in the appendix) for details of our message-passing for Modularity maximization. Experiments We experimented with a set of classic benchmarks3 . Since the optimization criteria is modularity, we compared our method only against best known “modularity optimization” heuristics: (a) FastModularity[67], 2 3 Note that this is different from the standard normalization for min-sum semiring in which minxi b pI→i (xi ) = 0. Obtained form Mark Newman’s website: http://www-personal.umich.edu/~mejn/netdata/ 110 CHAPTER 4. CLUSTERING Figure 4.4: (left) Clustering of power network (N = 4941) by message passing. Different clusters have different colors and the nodes are scaled by their degree. (right) Clustering of politician blogs network (N = 1490) by message passing and by meta-data – i.e., liberal or conservative. Table 4.1: Comparison of different modularity optimization methods. 13.55% 0.506 .04 0.525 1.648 0.467 0.179 0.501 0.643 0.489 0.03 5635 17.12% 0.594 0.14 0.601 0.87 0.487 0.151 0.548 0.08 0.602 0.019 wkarate n 34 78 562 12.34% 0.431 0 431 15.14% 0.401 0 0.444 0.557 0.421 0.095 0.410 0.085 0.443 0.027 netscience n 1589 2742 NA NA NA NA 53027 .0004% 0.941 2.01 0.907 8.459 0.889 0.303 0.926 0.154 0.948 0.218 dolphins y 62 159 1892 14.02% 0.508 0.01 1269 6.50% 0.521 0.01 0.523 0.728 0.491 0.109 0.495 0.107 0.517 0.011 lesmis n 77 254 2927 5.14% 0.531 0 1601 1.7% 0.534 0.01 0.529 1.31 0.483 0.081 0.472 0.073 0.566 0.011 celegansneural n 297 2359 43957 16.70% 0.391 10.89 21380 3.16% 0.404 2.82 0.406 5.849 0.278 0.188 0.367 0.12 0.435 0.031 polblogs y 1490 19090 NA NA NA 156753 .14% 0.411 32.75 0.427 67.674 0.425 0.33 0.427 0.305 0.426 0.099 karate y 34 78 562 14.32% 0.355 17.54% 0.390 0 0.417 0.531 0.393 0.086 0.380 0.079 0.395 0.009 Time 3624 0.41 Modularity .07 0.591 423 Modularity 0.511 27.85% Time 5.68% 6554 0 Modularity 5461 615 Time Time 441 115 NA Modularity Modularity 105 y Time Cost y football L Time polbooks L Modularity Louvian Cost FastGreedy Edges L-Eigenvector Nodes Spin-glass Weighted? message passing (sparse) Problem message passing (full) 4.5. MODULARITY MAXIMIZATION (b) Louvain [34], (c) Spin-glass [259] and (d) Leading eigenvector [228]. 111 4 table 4.1 summarizes our results (see also Figure 4.4). Here for each method and each data-set, we report the time (in seconds) and the Modularity of the communities found by each method. The table include the results of message passing for both full and sparse null models, where we used a constant α = 20 to generate our stochastic sparse null model. For message passing, we also included L = |E + E null | and the saving in the cost using augmentation. This column shows the percentage of the number of all the constraints considered by the augmentation. For example, the cost of .14% for the polblogs data-set shows that augmentation and sparse null model meant using .0014 times fewer clique-factors, compared to the full factor-graph. Overall, the results suggest that our method is comparable to state-of-the-art in terms both time and quality of clustering. Although, we should note that the number of triangle constraints in large and dense graphs increases very quickly, which deteriorates the performance of this approach despite using the augmentation. Despite this fact, our results confirm the utility of augmentation by showing that it is able to find feasible solutions using a very small portion of the constraints. 4 For message passing, we use λ = .1, max = median{|Ai,j − Anull i,j |}(i,j)∈E∪E null and Tmax = 10. Here we do not perform any decimation and directly fix the variables based on their bias b pi:j > 0 ⇔ xi:j = 1. Chapter 5 Permutations 5.1 Matching and permanent The integration and maximization problems over unrestricted permutations define several important combinatorial problems. Two notable examples of integration problems are permanent and determinant of a matrix. Determinant of matrix A ∈ RN ×N is defined as det(A) = X x∈SN sign(x) N Y Ai,xi i=1 where SN is the set of all permutations of N elements (a.k.a. symmetric group) and xi ∈ {1, . . . , N } is the index of ith element in particular permutation x. Here the sign(.) classifies permutations as even (sign(x) = 1) and odd (sign(x) = −1), where we can perform an even (odd) permutation by even (odd) number of pairwise exchanges. The only difference in definition of permanent is removal of the sign function perm(A) = N X Y Ai,xi x∈SN i=1 Here, we see that both permanent and determinant are closely related with two easy combinatorial problems on graphs – i.e., perfect matching and spanning sub-tree. While calculating the permanent for A ∈ {0, 1}N ×N is #P-hard [297], the determinant can be obtained in O(N 3 ) [116]. The matrix-tree theorem states that the number of spanning trees in a graph with adjacency matrix A is equal to det(L(i, i)) for an arbitrary 1 ≤ i ≤ N . Here L = A − D is the Laplacian of A, P where D is a diagonal matrix with degree of each node on the diagonal (i.e., Di,i = j Ai,j ) and L(i, i) is the (N − 1) × (N − 1) sub-matrix of L in which row and column i are removed. An intermediate step in representing the permutation as a graphical model is to use a bipartite 5.1. MATCHING AND PERMANENT 113 graph G = (V = (V1 , V2 ), E), where |V1 | = |V2 | = N and the edge-set E = {(i, j) | i ∈ V1 , j ∈ V2 }. A perfect matching is a one to one mapping of elements of V1 to V2 and can be represented using the corresponding edges E 0 ⊂ E. It is easy to see that any perfect matching E 0 ⊂ E identifies a permutation x. Here the maximum weighted matching (a.k.a. assignment problem) problem is to QN find a perfect matching x∗ = argx∈SN max i=1 Ai,xi , while the bottleneck assignment problem seeks x∗ = argx∈SN min maxN i=1 Ai,xi . The factor-graph representation of the next section shows that bipartite matching and bottleneck assignment problems correspond to the max-product (min-sum) and min-max inference, and computation of permanent corresponds to sum-product inference over the same factor-graph. Interestingly min-sum and min-max inference in this setting are in P [121, 182] while sum-product is in #P. Indeed the application of max-product BP to find the maximum weighted matching [22] (and its generalization to maximum weighted b-matching [138]) is one of the few cases in which loopy BP is guaranteed to be optimal. Although MCMC methods (section 2.6.1) can provide polynomial time approximation schemes for permanent [150] (and many other combinatorial integration problems [149]), they are found to be slow in practice [139]. This has motivated approximations using deterministic variational techniques [62, 308] and in particular BP [139], which is guaranteed to provide a lower bound on the permanent [301]. 5.1.1 Factor-graph and complexity Here we review the factor-graph of Bayati et al. [22] for maximum bipartite matching. Given the bipartite graph G = ((V1 , V2 ), E) and the associated matrix A ∈ RN ×N with non-negative entries, define two sets of variables x = {xi ∈ V2 | i ∈ V1 } and z = {zj ∈ V1 | j ∈ V2 }, where xi = j and zj = i both mean node i is connected to node j. Obviously this representation is redundant and for (i, j) ∈ E a pairwise factor should ensure xi and zi are consistent: • Consistency factors ensure the consistency of x and z f{i,j} (xi , zj ) = 1 (xi = j ∧ zj = i) ∨ (xi 6= j ∧ zj 6= i)  ∀(i, j) ∈ E • Local factors represent the cost of a matching ∀i ∈ V1 f{i} (xi ) = Ai,xi where if i and j are connected in a matching, two local factors f{i} (xj ) = p p Ai,j and f{j} (xi ) = Ai,j account for Ai,j . Figure 5.1 shows this factor-graph. It is easy to see that the joint form q(x, z) is equal to NN for any consistent assignment P to x, z and it is equal to 1 otherwise. Therefore sum-product and max-product (i.e., x,z q(x, z) and ⊕ i=1 Ai,xi 114 CHAPTER 5. PERMUTATIONS Figure 5.1: The factor-graph for matching where the local factors are black and consistency factors are white squares. maxx,z q(x, z)) produce the permanent and max-weighted matching respectively. The cost of each iteration of both max-product and sum-product BP in the factor-graph above is O(N 2 ). Moreover, for max-product BP, if the optimal solution is unique, BP is guaranteed to converge ∗ to this solution after O( Ny ) iterations, where  is the difference between the cost of first and second best matchings and y ∗ is the cost of best matching [22]. An alternative is to use a binary variable model in which each edge of the bipartite graph is associated with a binary variable and replace the consistency factors with degree constraint to ensure that each node is matched to exactly one other node. However this model results in BP updates equivalent to the one above (the simplification of updates discussed in [25] is exactly the updates of binary variable model). For min-max semiring, q(x, z) = maxN i=1 Ai,xi for a consistent assignment to x, z and it evaluates to min 1 = ∞. Therefore min-max inference here seeks an assignment that minimizes the maximum matching cost – a.k.a. bottleneck assignment problem. 5.1.2 Arbitrary graphs We can also use message passing to solve max-weighted matching in an arbitrary graph G = (V, E) with adjacency matrix A. Zdeborová and Mézard [331] proposed a factor-graph for the related task of counting of the perfect matchings in an arbitrary graph. For this, each edge (i, j) ∈ E is assigned to one binary variable xi:j ∈ {0, 1} and the degree factors on each node restrict the number of non-zero values to one fE(i,.) (xE(i,.) ) = 1(( X (i,j)∈E(i,.) xi:j ) ≤ 1) 5.2. TRAVELING SALESMAN PROBLEM 115 where E(i, .) is the set of all the edges adjacent to node i. Sanghavi [273] consider the problem of maximum weighted b-matching in arbitrary graphs by changing the degree factor to fE(i,.) (xE(i,.) ) = 1(( X xi:j ) ≤ b) (i,j)∈E(i,.) and also local factor fi:j (xi:j ) = xi:j Ai,j that takes the weights into account. They show that if the solution to the corresponding LP relaxation is integral then BP converges to the optimal solution. Moreover, BP does not converge if the LP solution is not integral. Matchings in an arbitrary graph G is also related to the permanent and also (vertex disjoint) cycle covers; a set of directed cycles in G that cover all of its nodes exactly once. The number of such cycle covers in an un-weighted graph is equal to perm(A), which is in turn equal to the square of number of perfect matchings [222, ch. 13]. In fact a directed cycle cover with maximum weight is equivalent to the maximum weighted bipartite matching in the construction of the previous section. In section 5.2 below we will use message passing to obtain a minimum weighted “undirected” cycle cover and further restrict these covers to obtain a minimum weighted cover with a single cycle – i.e., a minimum tour for TSP. 5.2 Traveling salesman problem A Traveling Salesman Problem (TSP) seeks the minimum length tour of N cities that visits each city exactly once. TSP is NP-hard and for general distances, no constant factor approximation to this problem is possible [238]. The best known exact solver, due to Held and Karp [128], uses dynamic programming to reduce the cost of enumerating all orderings from O(N !) to O(N 2 2N ). The devel- opment of many (now) standard optimization techniques are closely linked with advances in solving TSP. Important examples are simulated annealing [56, 166], mixed integer linear programming [118], dynamic programming [28], ant colony optimization [85] and genetic algorithms [115, 120]. Since Dantzig et al. [77] manually applied the cutting plane method to 49-city problem, a combination of more sophisticated cuts, used with branch-and-bound techniques [21, 233] has produced the state-ofthe-art TSP-solver, Concorde [13]. Other notable results on very large instances have been reported by Lin-Kernigan heuristic [130] that continuously improves a solution by exchanging nodes in the tour. For a readable historical background of the state-of-the-art in TSP and its applications, see [12]. The search over the optimal tour is a search over all permutations of N cities that contains no sub-tours – that is the permutation/tour is constrained such that we dot not return to the starting city without visiting all other cities. Producing the permutation with minimum cost that may include sub-tours is called the (vertex disjoint) cycle-cover and is in P (see section 5.1.2). We provide two approaches to model TSP: section 5.2.1 presents the first approach, which ignores the 116 CHAPTER 5. PERMUTATIONS subtour constraints – i.e., finds cycle covers – and then “augment” the factor-graph with such constraints when they become violated. This augmentation process is repeated until a feasible solution is found. The second approach, presented in section 5.2.2, is to use the variables that represent the time-step in which a node is visited. By having the same number of time-steps as cities, the subtour constraint is automatically enforced. This second formulation, which is computationally more expensive, is closely related to our factor-graph for sub-graph isomorphism (see section 5.3). This is because one can think of the problem of finding a Hamiltonian cycle in G as finding a sub-graph of G that is isomorphic to a loop of size |V|. 5.2.1 Augmentative approach Let G = (V, E) denote a graph of our problem with the positively weighted symmetric adjacency matrix A, s.t. Ai,j = 0 ⇔ (i, j) ∈ / E. The objective is to select a subset of E that identifies shortest tour of N cities. Let x = {xi:j | (i, j) ∈ E} be a set of M binary variables (i.e., xi:j ∈ {0, 1}), one for each edge in the graph (i.e., M = |E|) where xi:j = 1 means (i, j) is in the tour. We use xi:j and xj:i to refer to the same variable. Recall that for each node i, E(i, ·) denotes the edges adjacent to i. Define the factors of the factor-graph as follows • Local factors represent the cost associated with each edge fi:j (xi:j ) = min 1(xi:j = 0), Ai,j  ∀(i, j) ∈ E (5.1) where fi:j (xi:j ) is either Ai,j or zero. Any valid tour satisfies the following necessary and sufficient constraints – a.k.a. Held-Karp constraints [127]: • Degree factors ensure that exactly two edges that are adjacent to each vertex are in the tour X fE(i,·) (xE(i,·) ) = 1 (  xi:j ) = 2 (5.2) (i,j)∈E(i,·) • Subtour factors ensure that there are no short-circuits – i.e., there are no loops that contain strict def subsets of nodes. To enforce this, for each S ⊂ V, define E(S, .) = {(i, j) ∈ E | i ∈ S, j ∈ / S} to be the set of edges, with one end in S and the other end in V \ S. We need to have at least two edges leaving each subset S. The following set of factors enforce these constraints fE(S,·) (xE(S,·) ) = 1 ( X xi:j ) ≥ 2  ∀ S ⊂ V, S = 6 ∅ (5.3) (i,j)∈E(S,·) These three types of factors define a factor-graph, whose minimum energy configuration is the smallest tour for TSP. Therefore we can use min-sum inference to obtain the optimal tour. Note that both 5.2. TRAVELING SALESMAN PROBLEM 117 subtour and degree constraints depend on large number of variables, however, due to sparsity they allow efficient linear time calculation of factor-to-variable messages; see equation (5.3). The more significant computational challenge is that the complete TSP factor-graph has O(2N ) subtour factors, one for each subset of variables. In figure 5.2 we address this problem using factor-graph augmentation. Simplified messages In section 2.2.1, we introduced the K-of-N factors for min-sum inference. Both degree and subtour factors are different variations of this types of factor. For simplicity we work with normalized message b pI→i:j = b pI→i:j (1) − b pI→i:j (0), which is equivalent to assuming b pI→i:j (0) = 0 ∀I, i : j ∈ ∂I. The same notation is used for variable-to-factor message, and marginal belief. As before, we refer to the normalized marginal belief, b pi:j = b p(xi:j = 1) − b p(xi:j = 0) as bias. Recall that a degree constraint for node i (fE(i,·) ) depends on all the variables xi:j for edges (i, j) that are adjacent to i. Here we review the factor-to-variable message for min-sum BP b pE(i,·)→i:j (xi:j ) = X min fE(i,·) (xE(i,·) ) x\i:j b pi:k→E(i,·) (xi:k ) (5.4)  (5.5) (i,k)∈E(i,·)\(i,j) We show that this message update simplifies to b pE(i,·)→i:j (1) b pE(i,·)→i:j (0) = = min b pi:k→E(i,·) | (i, k) ∈ E(i, ·) \ (i, j) min b pi:k→E(i,·) + b pi:l→E(i,·) ∀i ∈ V  | (i, k), (i, l) ∈ E(i, ·) \ (i, j) (5.6) where for xi:j = 1, in order to satisfy degree constraint fE(i,·) (xE(i,·) ), only one other xi:k for (i, k) ∈ E(i, ·) \ (i, j) should be non-zero. On the other hand, we know that messages are normalized such that b pi:j→E(i,·) (0) = 0, which means they can be ignored in the summation of equation (5.4). For xi:j = 0, in order to satisfy the constraint factor, two of the adjacent variables should have a non-zero value. Therefore we seek two such incoming messages with minimum values. Let mink A denote the k th smallest value in the set A – i.e., min A ≡ min1 A. We combine the updates above to get a “normalized message”, b pE(i,·)→i:j , which is simply the negative of the second largest incoming message (excluding b pE(i,·)→i:j ) to the degree factor fE(i,·) : 2 b pE(i,·)→i:j = b pE(i,·)→i:j (1) − b pE(i,·)→i:j (0) = − min{b pi:k→E(i,·) | (i, k) ∈ E(i, ·) \ (i, j)} (5.7) Following a similar procedure, factor-to-variable messages for subtour factors is given by   2 b pE(S,·)→i:j = − max 0, min{b pi:k→E(S,·) | (i, k) ∈ E(S, ·) \ (i, j)} (5.8) While we are searching for the minimum incoming message, if we encounter two messages with 118 CHAPTER 5. PERMUTATIONS negative or zero values, we can safely assume b pE(S,·)→i:j = 0, and stop the search. This results in significant speedup in practice. Note that both equation (5.7) and equation (5.8) only need to calculate the second smallest incoming message to their corresponding factors, less the current outgoing message. In the asynchronous calculation of messages, this minimization should be repeated for each outgoing message. However in a factor-synchronous update, by finding three smallest incoming messages to each factor, we can calculate all the factor-to-variable messages at the same time. iteration 1 iteration 3 iteration 5 iteration 11 Figure 5.2: The message passing results after each augmentation step for the complete graph of printing board instance from [260]. The blue lines in each figure show the selected edges at the end of message passing. The pale red lines show the edges with the bias that, although negative (b pi:j < 0), were close to zero. Augmentation To deal with the exponentially large number of subtour factors, we use the augmentation procedure of section 2.2.2. Starting with a factor-graph with no subtour factor, we find a solution x∗ using min-sum BP. If the solution is feasible (has no subtours) we are done. Otherwise, we can find all subtours in O(N ) by finding connected components. We identify all the variables in each subtour as S ⊂ V and add a subtour factor fE(S,·) to ensure that this constraint is satisfied in the next iteration of augmentation. Here to speed up the message passing we reuse the messages from the previous augmentation step. Moreover in obtaining x∗ from min-sum BP marginals b p(xi ), we ensure that no degree constraint is violated (i.e., each node has two neighbouring edges in x∗ ). Figure 5.2 shows iterations of augmentation over a print board TSP instance from [260]. Algorithm 4 in the appendix gives details of our message passing solution to TSP, which also uses several other minor tricks to speed up the BP message updates. 5.2. TRAVELING SALESMAN PROBLEM nodes 102 1.08 101 100 10-1 10-2 103 nodes 103 4000 3500 3000 2500 1500 1000 2000 augmentation iters. 101 102 nodes 103 subtour factors. 103 100 102 nodes 103 102 101 100 1 10 102 nodes 103 103 101 100 10-1 1 10 102 100 1 10 103 101 augmentation iters. nodes 3500 10-2 3000 10-1 nodes 10 2500 100 102 Random Distance2 Matrix 1500 optimality 101 4.5 4.0 3.5 3.0 2.5 2.0 1.5 1.0 2000 2 102 500 nodes 103 100 10-1 1 10 1000 102 nodes 1000 10-3 1 10 4000 10-2 103 101 103 101 10-1 1 10 102 nodes 102 100 1 10 103 10 800 10-1 102 nodes Correlation Distance 2 600 100 1.8 1.7 1.6 1.5 1.4 1.3 1.2 1.1 1.0 nodes 400 1 optimality time (sec) 1000 1.02 102 10-3 1 10 800 1.06 1.04 0.98 103 1 10 200 nodes 10 103 103 Hamming Distance 2 1.00 102 102 100 1 10 augmentation iters. 1.10 10 400 nodes 103 10 600 1.0 103 200 102 nodes optimality time (sec) 10-3 1 10 10-3 1 10 augmentation iters. 1.1 10-2 time (sec) 1.2 500 10 -1 102 nodes 104 10 subtour factors. optimality 100 101 100 1 10 103 Random 2D Euclidean Distance 3 1.3 102 subtour factors. 1.4 101 102 nodes subtour factors. 2 101 103 subtour factors. 1.5 102 100 1 10 1000 103 103 10 time (sec) 102 nodes augmentation iters. 10-3 1 10 800 10-2 104 10 BP NN greedy 600 100 10-1 TSPLIB Instances 3 400 101 optimality time (sec) 102 1.8 1.7 1.6 1.5 1.4 1.3 1.2 1.1 1.0 200 103 119 102 nodes 103 102 101 100 1 10 102 nodes 103 Figure 5.3: Results of message passing for TSP on different benchmark problems. From left to right, the plots show: (a) running time, (b) optimality ratio (compared to Concorde), (c) iterations of augmentation and (d) number of subtours constraints – all as a function of number of nodes. The optimality is relative to the result reported by Concorde. Note that all plots except optimality are log-log plots where a linear trend shows a monomial relation (y = axm ) between the values on the x and y axis, where the slope shows the power m. 120 CHAPTER 5. PERMUTATIONS Experiments Here we evaluate our method over five benchmark datasets1 : (I) TSPLIB, which contains a variety of real-world benchmark instances, the majority of which are 2D or 3D Euclidean or geographic distances.2 (II) Euclidean distance between random points in 2D. (III) Random (symmetric) distance matrices. (IV) Hamming distance between random binary vectors with fixed length (20 bits). This appears in applications such as data compression [153] and radiation hybrid mapping in genomics [29]. (V) Correlation distance between random vectors with 5 random features (e.g., using TSP for gene co-clustering [69]). In producing random points and features as well as random distances (in (III)), we used uniform distribution over [0, 1]. For each of these cases, we report the (a) run-time, (b) optimality, (c) number of iterations of augmentation and (d) number of subtour factors at the final iteration. In all of the experiments, we use Concorde [13] with its default settings to obtain the optimal solution.3 The results in figure 5.3 (2nd column from left) reports the optimality ratio – i.e., ratio of the tour found by message passing, to the optimal tour. To demonstrate the non-triviality of these instance, we also report the optimality ratio for two heuristics that have (1 + dlog2 (N )e)/2- optimality guarantees for metric instances [154]: (a) nearest neighbour heuristic (O(N 2 )), which incrementally adds to any end of the current path the closest city that does not form a loop; (b) greedy algorithm (O(N 2 log(N ))), which incrementally adds a lowest cost edge to the current edge-set, while avoiding subtours. All the plots in figure 5.3, except for the second column, are in log-log format. When using log-log plot, a linear trend shows a monomial relation between x and y axes – i.e., y = axm . Here m indicates the slope of the line in the plot and the intercept corresponds to log(a). By studying the slope of the linear trend in the run-time (left column) in figure 5.3, we observe that, for almost all instances, message passing seems to grow with N 3 (i.e., slope of ∼ 3). Exceptions are TSPLIB instances, which seem to pose a greater challenge, and random distance matrices which seem to be easier for message passing. A similar trend is suggested by the number of subtour factors and iterations of augmentation, which has a slope of ∼ 1, suggesting a linear dependence on N . Again the exceptions are TSPLIB instances that grow faster than N and random distance matrices that seem to grow sub-linearly. Overall, we observe that augmentative message-passing is able to find near-optimal solutions in polynomial time. Although powerful branch-and-cut methods, such as Concorde, are able to exactly solve instances with several thousands of variables, their general run-time on random benchmark instances 1 In all experiments, we used the full graph G = (V, E), which means each iteration of message passing is O(N 2 τ ), where τ is the number of subtour factors. All experiments use Tmax = 200 iterations, max = median{Ai,j | i, j} and damping with λ = .2. We used decimation, and fixed 10% of the remaining variables (out of N ) per iteration of decimation. Note that here we are only fixing the top N variables with positive bias. The remaining M − N variables are automatically clamped to zero. This increases the cost of message passing by an O(log(N )) multiplicative factor, however it often produces better results. 2 Geographic distance is the distance on the surface of the earth as a large sphere. 3 For many larger instances, Concorde (with default setting and using CPLEX as LP solver) was not able to find the optimal solution. Nevertheless we used the upper bound on the optimal produced by Concord in evaluating our method. 5.2. TRAVELING SALESMAN PROBLEM 121 remains exponential [13, p495], while our approximation on random instances appears to be O(N 3 ). 5.2.2 Using pairwise factors Here we present an alternative factor-graph for finding permutations without subtours. This formulation has O(N 2 ) factors and therefore the complete factor-graph remains tractable. However in practice, the min-sum inference over this factor-graph is not as effective as the augmentation approach. Therefore, here we use this factor-graph to solve min-max version of TSP, known as bottleneck TSP through sum-product reductions.4 Given an asymmetric distance matrix A ∈ RN ×N , the task in the Bottleneck Traveling Salesman Problem (BTSP) is to find a tour of all N points such that the maximum distance between two consecutive cities in the tour is minimized [156]. Any constant-factor approximation for arbitrary instances of this problem is NP-hard [242]. Let x = {x1 , . . . , xN } denote the set of variables where xi ∈ Xi = {0, . . . , N − 1} represents the time-step at which node i is visited. We assume modular arithmetic (module N ) on members of Xi – e.g., N ≡ 0 mod N and 1 − 2 ≡ N − 1 mod N . For each pair xi and xj of variables, define the factor   f{i,j} (xi , xj ) = min 1(|xi − xj | > 1), max(Ai,j , 1(xi = xj − 1)), max(Aj,i , 1(xj = xi − 1)) (5.9) where the tabular form is xj xi 0 1 ··· N −2 N −1 0 ∞ Ai,j −∞ ··· −∞ −∞ Dj,i 1 Aj,i ∞ Ai,j ··· −∞ −∞ −∞ 2 .. . −∞ .. . Ai,j .. . ∞ .. . ··· .. . −∞ .. . −∞ .. . −∞ .. . N −3 −∞ −∞ −∞ ··· ∞ Ai,j −∞ N −2 −∞ −∞ −∞ ··· Aj,i ∞ Ai,j N −1 Ai,j −∞ −∞ ··· −∞ Aj,i ∞ ⊗ Here, 1 = ∞ on diagonal enteries ensures that xi 6= xj . Moreover |xi − xj | > 1 means cities i and ⊕ j are not visited consecutively, so this factor has no effect ( 1 = −∞). However if two cities are visited one after the other, depending on whether i was visited before j or vicee-versa, Ai,j or Aj,i represent the distance between them. This factor can be easily converted to min-sum domains by replacing 4 A binary-variable formulation with similar symantics is proposed in [306]. However the authors applied their message passing solution to an instance with only five cities. 122 CHAPTER 5. PERMUTATIONS the identity values −∞, +∞ with −∞, 0 in the tabular form above. Alternatively we can replace the identity, min and max operations in equation (5.9) with their corresponding min-sum functions. Here we relate the min-max factor-graph above to a uniform distribution over Hamiltonian cycles and use its sum-product reduction to find solutions to Bottleneck TSP. Recall G(A, y) is a graph in which there is a connection between node i and j iff Ai,j ≤ y. Proposition 5.2.1. For any distance matrix A ∈ RN ×N , the py -reduction of the BTSP factor-graph above, defines a uniform distribution over the (directed) Hamiltonian cycles of G(A, y). Proof. First note that py defines a uniform distribution over its support as its unnormalized value is only zero or one. Here w.l.o.g we distinguish between two Hamiltonian cycles that have a different starting point but otherwise represent the same tour. Consider the py -reduction of the pairwise factor of equation (5.9) f{i,j} (xi , xj ) = 1(|xi − xj | > 1) + 1(xi = xj − 1 ∧ Ai,j ≤ y) + 1(xi = xj + 1 ∧ Aj,i ≤ y) (5.10) (5.11) • Every Hamiltonian cycle over G(A, y), defines a unique assignments x with py (x) > 0: Given the Hamiltonian cycle H = h0 , h2 , . . . , hN −1 where hi ∈ {1, . . . , N } is the ith node in the path, for each i define xi = j s.t. hj = i. Now we show that all pairwise factors of equation (5.10) are non-zero for x. Consider two variables xi and xj . If they are not consecutive in the Hamiltonian cycle then f{i,j} (xi , xj ) = 1(|xi − xj | > 1) > 0. Now w.l.o.g. assume i and j are consecutive and xi appears before xj . This means (i, j) ∈ E and therefore Ai,j ≤ y, which in turn means f{i,j} (xi , xj ) = 1(xi = xj − 1 ∧ Ai,j ≤ y) > 0 Since all pairwise factors are non-zero, py (x) > 0. • Every x for which py (x) > 0, defines a unique Hamiltonian path over G(A, y): Given assignment x, construct H = h0 , . . . , hN −1 where hi = j s.t.xj = i. Now we show that if p(x) > 0, H defines a Hamiltonian path. If p(x) > 0, for every two variables xi and xi , one of the indicator functions of equation (5.10) should evaluate to one. This means that first of all, xi 6= xj for i 6= j, which implies H is well-defined and hi 6= hj for i 6= j. Since all xi ∈ {0, . . . , N − 1} values are distinct, for each xi = s there are two variables xj = s − 1 and xk = s + 1 (recall that we are using modular arithmetic) for which the pairwise factor of equation (5.10) is non-zero. This means Aj,i ≤ y and Ai,k ≤ y and therefore (j, i), (i, k) ∈ E (the edge-set of G(A, y)). But by definition of H, hs = i, hs−1 = j and hs+1 = k are consecutive nodes in H and therefore H is a Hamiltonian path. This proposition implies that we can use the sum-product reduction of this factor-graph to solve Hamiltonian cycle problems. The resulting factor-graph for Hamiltonian cycle problem is an special case of our graph-on-graph technique, where the adjacency matrix of one graph is directly used to build factors in a second graph. Here, as the tabular form of the factor above suggests, the second graph is a simple loop of length N (see section 5.3). 5.2. TRAVELING SALESMAN PROBLEM 123 Figure 5.4: The min-max solution (using sum-product reduction) for Bottleneck TSP with different number of cities (x-axis) for 2D Euclidean space (left) as well as asymmetric random distance matrices (right) with T = 5000 for Perturbed BP. The error-bars in all figures show one standard deviation over 10 random instances. As expected, due to sparse form of this pairwise factor, we can perform BP updates efficiently. Claim 5.2.2. The factor-to-variable BP messages for the sum-product reduction of factor of equation (5.9) can be obtained in O(N ). Proof. The py -reduction of the min-max factors of equation (5.9) is given by: f{i,j} (xi , xj ) = 1(f{i,j} (xi , xj ) ≤ y) (5.12) = 1(|xi − xj | > 1) + 1(xi = xj − 1 ∧ Ai,j ≤ y) (5.13) + 1(xi = xj + 1 ∧ Aj,i ≤ y) (5.14) The matrix-form of this factor (depending on the order of Ai,j , Aj,i , y) takes several forms all of which P are band-limited. Assuming the variable-to-factor messages are normalized (i.e., xi b pj→I (xi ) = 1) the factor-to-variable message is given by b p{i,j}→i (xi ) = 1 − b pj→{i,j} (xi )+ 1(Ai,j ≤ y)(1 − b pj→{i,j} (xi − 1))+ 1(Aj,i ≤ y)(1 − b pj→{i,j} (xi + 1)) Therefore the cost of calculating factor-to-variable message is that of normalizing the variable-tofactor message, which is O(N ). Since there are N 2 pairwise factors, this gives O(N 3 ) time-complexity for each iteration of sumproduct BP in solving the Hamiltonian cycle problem (i.e., the sum-product reduction) and O(N 3 log(N )) for bottleneck-TSP, where the log(N ) factor is the cost of binary search (see equation (1.25)). 124 CHAPTER 5. PERMUTATIONS Figure 5.4 reports the average performance of message passing (over 10 instances) as well as a lower bound on the optimal min-max value for tours of different length (N ). Here we report the results for random points in 2D Euclidean space as well as asymmetric random distance matrices. For Euclidean problems, the lower bound is the maximum over j of the distance of two closest neighbors to each node j. For the asymmetric random distance matrices, the maximum is over all the minimum length incoming edges and minimum length outgoing edges for each node.5 5.3 Graph matching problems Consider two graphs G = (V, E) and G 0 = (V 0 , E 0 ), with (weighted) adjacency matrices A, A0 respectively. Here we enumerate several of the most important problems over permutations based on two graphs [72]. Section 5.3.1 introduces the graphical model for the problems of (sub-graph) isomorphism and monomorphism. Then we study the message passing solution to graph homomorphism, use it to find symmetries in graphs. In section 5.3.5 we introduce a general factor-graph for graph alignment based on the previous work of Bradde et al. [44] and show how it can model other problems such as quadratic assignment problem and maximum common subgraph. The common idea in all these settings is that a “variation” of the adjacency matrix A0 of graph G 0 is used as a pairwise factor over the edges (or/and non-edges) of graph G (with adjacency A), defining a Markov network (a factor-graph with pairwise factors). 5.3.1 Sub-graph isomorphism The graph isomorphism problem asks whether G = (V, E) and G 0 = (V 0 , E 0 ) are identical up to a permutation of nodes (written as G ∼ = G 0 ). That is, it seeks a one-to-one mapping π : V → V 0 such that (i, j) ∈ E ⇔ (π(i), π(j)) ∈ E 0 . With some abuse of notation we also write π(G) = G 0 . Although, there have been polynomial time solutions to special instances of graph isomorphism problem [95], the general case has remained elusive. So much so that we do not know whether the problem is NP-complete (e.g., see [222]). A permutation π ∈ SN (recall SN is the symmetric group) such that π(G) ∼ = G is called an automorphism. The automorphisms of G, under composition form a group, called the automorphism group Aut(G). The automorphism group also defines a natural notion of symmetry on the nodes of graphs. Here, the orbit of each node, is the set of nodes that are mapped to i in any automorphism – def i.e., orbit(i) = {π(i) | π ∈ Aut(G)}. The orbits partition the set of nodes V into group of nodes that are in a sense symmetric, which makes them a prime candidate for defining symmetry in complex networks [198, 321]. 5 If for one node the minimum length in-coming and out-going edges point to the same city, the second minimum length in-coming and out-going edges are also considered in calculating a tighter bound. 5.3. GRAPH MATCHING PROBLEMS 125 Sub-graph isomorphism asks whether G 0 is isomorphic to a vertex induced subgraph of G. – i.e., it seeks an injective mapping π : V 0 → V where (π(i), π(j)) ∈ E ⇔ (i, j) ∈ E 0 ∀i, j ∈ V 0 When dealing with sub-graph morphisms, we assume that the mapping is from the smaller graph to the larger graph and therefore |V| ≤ |V 0 |. The factor-graph for subgraph isomorphism is defined as follows: We have one variable per i ∈ V, where the domain of each variable xi is V 0 – i.e., x = {xi ∈ V 0 | i ∈ V}. The factor-graph has two types of pairwise factors: • Edge factors: ensure that each edge in G = (V, E) is mapped to an edge in G 0 = (V 0 , E 0 ) f{i,j} (x{i,j} ) = 1((xi , xj ) ∈ E 0 ) ∀(i, j) ∈ E (5.15) where assuming the tabular form of this factor for sum-product semiring is simply the adjacency matrix A0 ∈ {0, 1}|V 0 |×|V 0 | of G 0 . • Non-edge factors: ensure that each non-edge in G = (V, E) is mapped to a non-edge in G 0 = (V 0 , E 0 ) f{i,j} (x{i,j} ) = 1((xi , xj ) ∈ / E 0 ∧ xi 6= xj ) ∀i, j ∈ V, i 6= j, (i, j) ∈ /E (5.16) where again for sum-product semiring, the tabular form takes a simple form w.r.t. the binary valued adjacency matrix of G 0 – i.e., 1 − A0 . Using sum-product semiring, this fully connected Markov network defines a uniform distribution over the (subgraph) isomorphisms from G to G 0 . We could use sumproduct BP with decimation or perturbed BP to sample individual assignments x∗ ∼ p(x). Here, each assignment x ≡ π is an (injective) mapping from V to V 0 , where xi = j 0 means node i ∈ V is mapped to node j 0 ∈ V 0 . In particular, for G = G 0 , the integral is equal to the cardinality of the automorphism group q(∅) = |Aut(G)| and two nodes i, j ∈ V are in the same orbit iff the have the same marginals – i.e., p(xi ) = p(xj ) ⇔ i ∈ orbit(j) This also suggests a procedure for finding (approximate) symmetries in graphs. We can use sum-product BP to find marginals and group the nodes based on the similarity of their marginals. However, the cost of message passing in this graphical model is an important barrier in practice. Claim 5.3.1. Assuming |V| ≤ |E| ≤ |V|2 and |V 0 | ≤ |E 0 | ≤ |V 0 |2 and using variable synchronous update, the time complexity of each iteration of sum-product BP for subgraph isomorphism is O(|V|2 |E 0 |). Proof. First, we calculate the cost of sending sum-product BP messages through the edge and non-edge factors. For the edge factors (A0 ), we can go through each row of the tabular form of the factor and multi- 126 CHAPTER 5. PERMUTATIONS ply the non-zero entries with corresponding message – i.e., g{i,j} (xi , xj ) = b pi→{i,j} (xi )f{i,j} (xi , xj ). Then P we add the values in each column, to obtain the outgoing message – i.e., b p{i,j}→j (xj ) = xi g{i,j} (xi , xj ). This procedure depends on the number of non-zero entries – i.e., O(|E 0 |). The procedure is similar for non-edge factors. Therefore the overall cost of sending sum-product BP messages through all O(|V|2 ) factors is O(|E 0 | |V|2 ). Using variable synchronous update, calculating all variable-to-factor messages takes O(|V|2 |V 0 |). Using the assumption of the claim, the overall cost is therefore O(|E 0 | |V|2 ). However it is possible to improve this complexity by considering sparse mappings. For example, we can restrict the domain of each variable xi to all the nodes j 0 ∈ V 0 that have the same degree with node i, or furthermore to all the nodes that also have neighbours with same degree as the neighbours of node i. 5.3.2 Subgraph monomorphism and supermorphism Sub-graph monomorphism relaxes the constraint of the subgraph isomorphism to (i, j) ∈ E ⇒ (π(i), π(j)) ∈ E 0 ∀i, j ∈ V (5.17) where π : V 0 → V has to be injective – i.e., nodes in V 0 are mapped to distinct nodes in V. However, G 0 is allowed to cover a “subset” of edges in an induced subgraph of G. We note here that previous graphical models introduce in [43, 44] for isomorphism in fact define monomorphism. The only difference between this factor-graph and that of sub-graph isomorphism is that the non-edge factors are replaced by the following uniqueness factors. • Uniqueness factors are inverse Potts factors that ensure disconnected nodes are mapped to different nodes (– i.e., the mapping is injective) /E f{i,j} (x{i,j} ) = 1(xi 6= xj ) ∀i.j ∈ V, j 6= i, (i, j) ∈ (5.18) Despite this difference, when G = G 0 – that is when we are interested in automorphisms – or more generally when |E| = |E 0 | and |V| = |V 0 |, the distribution defined by the monomorphism factor-graph is identical to that of isomorphism factor-graph. Claim 5.3.2. Assuming |V| ≤ |E| ≤ |V|2 and |V 0 | ≤ |E 0 | ≤ |V 0 |2 , using variable synchronous update, the time complexity of each iteration of sum-product BP for sub-graph monomorphism O(|E| |E 0 | + |V 0 | |V|2 ).6 Proof. The complexity of sending sum-product BP messages through the edge factors is O(|E 0 |) (see proof of Claim 5.3.1). However, the uniqueness factors are inverse Potts factors and allow O(|V 0 |) Bradde et al. [44] suggest a trick to reduce this time-complexity to O((|E| |V|)|V 0 |), but unfortunately details are omitted and we are unable to follow their route. 6 5.3. GRAPH MATCHING PROBLEMS 127 calculation of messages. This means the overall cost of sending messages through all the factors is O(|E| |E 0 | + |V 0 | |V|2 ). The cost of calculating variable-to-factor messages using variable-synchronous update is also O(|V|2 |V 0 |), which gives the overall complexity of O(|E| |E 0 | + |V 0 | |V|2 ) per BP iteration. So far we have seen two variations of mapping a graph G to a subgraph of G 0 . In subgraph isomorphism, the image of G strictly agrees with a sub-graph of G 0 . In monomorphism, the image is contained within a sub-graph. A third possibility is to ask for a mapping such that the image of G “contains” a sub-graph G 0 : (i, j) ∈ E ⇐ (π(i), π(j)) ∈ E 0 ∀i, j ∈ V (5.19) where again π : V 0 → V has to be injective. Due to lack of a better name, we call this mapping subgraph supermorphism. The factor-graph for sub-graph supermorphism has two types of factors, both of which we have seen before: 1) The non-edge factors between non-edges (equation (5.16)) ensure that the image contains a sub-graph of G 0 while 2) uniqueness factors between the edges (i, j) ∈ E ensure that the mapping is injective. Claim 5.3.3. Assuming |V| ≤ |E| ≤ |V|2 and |V 0 | ≤ |E 0 | ≤ |V 0 |2 , using variable synchronous update, the time complexity of each iteration of sum-product BP for subgraph supermorphism is O((|V 2 |−|E|) |E 0 | + |V 0 | |V|2 ) Proof. The complexity of sending sum-product BP messages through the non-edge factors is O(|E 0 |) (see proof of Claim 5.3.1) and each uniqueness factor require O(|V 0 |) computation. This means the overall cost of sending messages through all the factors is O((|V 2 | − |E|) |E 0 | + |V 0 | |E|). The cost of calculating variable-to-factor messages using variable-synchronous update is also O(|V|2 |V 0 |), which gives the overall complexity of O((|V 2 | − |E|) |E 0 | + |V 0 | |V|2 ) per BP iteration. 5.3.3 Graph homomorphism Graph homomorphism [129] further relaxes the constraint of the sub-graph monomorphism such that a homomorphic mapping can map two distinct nodes in V to the same node in V 0 . However, equation (5.17) should hold, and therefore if two nodes in V 0 are adjacent, they should still be mapped to distinct and adjacent nodes in V. Compared to other areas of graph theory, the study of rich structure and surprising properties of homomorphisms is relatively recent. Study of graph homomorphisms covers diverse areas including property testing [9], graph sequences and limits [37, 39, 40, 197] and constraint satisfaction problems [223]. Many of these areas are interested in “counting” the number of homomorphisms [38] from a graph G to G 0 . As we see shortly, graph homomorphism reduces to many interesting CSPs and therefore it is not hard to show that it is NP-complete. Moreover, counting the number of 128 CHAPTER 5. PERMUTATIONS Figure 5.5: (left) The number of endomorphisms for all distinct graphs up to 8 nodes compared to the BP integral. Here, larger disks represent graphs with smaller number of nodes. (right) Comparison of normalized BP marginals and the exact marginals for endomorphism graphical model. homomorphisms is #P-complete [86]. The set of all homomorphisms π of a graph G to itself –i.e., its endomorphisms – under composition form endomorphism monoid (see definition 1.1.1 for monoid). Here, the identity element simply maps each element to itself. Our interest in endomorphism is because through the conjecture 5.3.4, we can use it (instead of automorphism) to approximate symmetries in graphs. The graphical model representation of homomorphism has been investigated in different contexts [50, 52], but to our knowledge, message passing has not been previously used for counting and finding homomorphisms. The Markov network for homomorphism resembles that of isomorphism and monomorphism: The variables are x = {xi | i ∈ V} where xi ∈ V 0 , and the factor-graph only contains edge-factors of equation (5.15). Assuming |V 0 | ≤ |E 0 | and |V| ≤ |E|, it is easy to see that the complexity of variablesynchronous message passing is O(|E| |E 0 |), which makes this method very efficient for sparse graphs. This graphical model can be extended to represent homomorphism in weighted graphs [38]. For this define the edge-factors as A0x f{i,j} (x{i,j} ) = Ai,j i ,xj ∀i, j ∈ V, i 6= j, Ai,j > 0 For small graphs we can exactly count the number of homomorphisms and endomorphisms. To evaluate the accuracy of message passing, we compared the BP estimates with the exact number of endomorphisms, for all isomorphically distinct graphs with |V| < 9 (i.e., > 13, 000 instances); Figure 5.5 reports this result as well as the accuracy of BP marginals, suggesting that despite existence of short loops in these graphs BP estimates are relatively accurate. 5.3. GRAPH MATCHING PROBLEMS 129 Reduction to other CSPs The relation between homomorphism and other CSPs is well-known [223]. Here, we review this relation between the factor-graphs of this section and other CSP factor-graphs we encountered in this thesis. Coloring and clique cover: (see example 3.0.1 and section 3.4) K-coloring of G corresponds to finding a homomorphism from G to KK , the complete graph of order K. Similarly the homomorphism from the complement of G to Kk corresponds to K-clique-cover. The relation is also reflected in the corresponding factor-graphs as the adjacency matrix for KK is the inverse Potts model, used in K-coloring. Clique problem and independent-set: (see section 3.6) Recall that K-clique problem corresponds to finding a clique of size K in G. This is a special case of sub-graph isomorphism from KK to G which is in this case identical to sub-graph monomorphism and homomorphism from KK to G. The (sum-product reduction of the) categorical-variable model of section 3.6.2 is a fully connected Markov network with edge factors that we used for isomorphism, monomorphism and homomorphism equation (5.15). Similarly, the K-independent set problem is equivalent to finding homomorphisms from KK to the complement of G. Independent set has an alternative relation with graph homomorphism: any homomorphism from G to a graph with two connected nodes and a self-loop on one of the nodes defines an independent set for G. Hamiltonian cycle problem corresponds to sub-graph monomorphism from C|V| , the cycle of length |V|, to G. Alternatively, we can formulate it as subgraph supermorphism from G to C|V| . The sum-product reduction of our min-max formulation for bottleneck TSP in section 5.2.2 is indeed the factor-graph of sub-graph supermorphism from G to C|V| . 5.3.4 Finding symmetries One may characterize a graph G using the “number” of homomorphism from/to other graphs G 0 . This characterization is behind the application of graph homomorphism in property testing and definition of graph sequences. Let Hom(H, G) be the set of homomorphism from H to G – i.e., the set of all assignments x where p(x) > 0. Let H1 , . . . , HM be the sequence of all graphs whose number of nodes is at most |V|. Then, the Lovász vector of G which is defined as v(G) = (|Hom(H1 , G)|, |Hom(H2 , G)|, . . . , |Hom(HM , G)|) (5.20) uniquely identifies G up to an isomorphism [196]. Here, rather than identifying a particular graph G within the set of all graphs, we are interested in identifying a node i ∈ V of a single graph G within the set of all nodes V. Note that here both identifications are up to an isomorphism. Our objective is equivalent to finding the orbits of G and our approach in finding the orbits using graph homomorphism (rather than isomorphism) is founded on the following conjecture. 130 CHAPTER 5. PERMUTATIONS Figure 5.6: The table on the right shows the unnormalized endomorphism marginals for the graph on the left. Here row i corresponds to q(xi ) (normalization of which gives p(xi )), and the number at row i and column j is the number of times node i is mapped to j in an endomorphism. The total number of endomorphisms for this graph is q(∅) = 78. Here, the orbits are {2, 3}, {5, 6}, {1, 7}, {4}. However, q(x1 ) = q(x7 ) = q(x4 ) – that is node 4 maps “to” other nodes with the same frequency as nodes 1 and 7. However, the mappings to node 4 ( i.e., the 4th column of the table) remains different from the mappings to 1 and 7. Here, as predicted by conjecture 5.3.4, nodes with similar rows and columns belong to the same orbit. Conjecture 5.3.4. Given the uniform distribution over the endomorphisms of G: p(x) ∝ Y 1((xi , xj ) ∈ E) (i,j)∈E the necessary and sufficient condition for i and j to be in the same orbit is p(xi ) = p(xj ) and ∀k ∈ V : p(xk = i) = p(xk = j) ⇔ orbit(i) = orbit(j) Note that p(xi = k) is simply the relative frequency of mapping of node i to node k in an endomorphism. Therefore this conjecture simply states that for node i and j to be equivalent up to an automorphism of G, it is necessary and sufficient for them to have the same frequency of mapping to/from all other nodes of G. While it is trivial to prove necessity (⇐), we found it difficult to prove the statement in the other direction. Therefore, similar to other related conjectures [163, 204], we turn to computational verification. For this, we experimented with distinct graphs with up to 9 nodes (i.e., > 286, 000 instances). Here, we obtained the exact marginals p(xi ) ∀i ∈ V and constructed the orbits as suggested by conjecture 5.3.4. We then obtained the exact orbits using the software of McKay and Piperno [205]. In all cases two partitioning of the nodes to orbits were identical. We also note that in conjecture 5.3.4 restricting the condition to p(xi ) = p(xj ) – i.e., similar frequency of mappings “to” other nodes – is not sufficient. Figure 5.6 shows a counter-example for this weaker condition. Example 5.3.1. In figure 5.7(left) we used the homomorphism marginals to find approximate symmetries in a graph with visible symmetries, known as Thomassen graph. Here, after obtaining the marginals we used Principle Component Analysis (PCA) with whitening [226] to extract three values 5.3. GRAPH MATCHING PROBLEMS 131 Figure 5.7: Coloring of nodes by reducing the dimensionality of marginals to three dimensions of RGB using PCA with whitening. (left) The marginals are calculated using sum-product BP. (right) The marginals of the Kronecker graph is obtained using Gibbs sampling and annealing. The graph in the middle is the product of two graphs on the top and right – i.e., G = G1 × G2 . Two nodes in G are connected iff the corresponding nodes in G1 and G2 are connected. Note that the product of each two colors produces the same color in the product graph and similarly colored nodes have similar neighbours. for RGB colors. As the figure suggests, this approach is able to identify similar nodes with similar colors. For dense graphs, message passing is no longer accurate. In figure 5.7(right) we use Gibbs sampling with annealing to estimate the endomorphism marginals in Kronecker product[190] of two random graphs. Here again, we use PCA to color the nodes. Note that the algorithm is unaware of the product format. The choice of the product graph is to easily observe the fact that the product of similarly colored nodes produce similarly colored nodes in the product graph. An alternative is to use spectral clustering on the matrix of marginals to obtain clusters. In a related context Krzakala et al. [180] use the matrix of non-backtracking random-walks to find symmetric clusters in stochastic block models. Note that the basic difference with our approach is the matrix used with the spectral clustering. Other notable matrices that are used within this context are the Laplacian matrix [299], the modularity matrix [228] and the Bethe hessian [272]. The relation between the clustering (in its conventional sense) and orbits of a graph is better understood in the extreme case: when clusters form isolated cliques, they are identical to orbits. 5.3.5 Graph alignment The graph alignment problem can be seen as the optimization counterpart of the decision problems of isomprphism, monomorphism and homomorphism. In the past, different methods have tried to optimize 132 CHAPTER 5. PERMUTATIONS a variety of different objectives [53, 72]. In the context of message passing two distinct approaches have been used: 1) Bayati et al. [26] propose a factor-graph for “sparse” graph alignment and show that it scales to very large instances. Here the term sparsity both refers to the number of edges of G and G 0 and also to the restricted possibility of matching nodes of V to V 0 – i.e., each node in V can match only a few predetermined nodes in V 0 . The factor-graph used by the authors resembles the binary version of the maximum bipartite matching factor-graph of section 5.1.1. 2) Bradde et al. [44] used the min-sum BP to minimize the number of misalignment in a factor-graph similar to that of graph monomorphism above. Here we follow their route, with the distinction that we suggest using the min-sum semiring with “sub-graph isomorphism” factor-graph and account for different matching costs using several tricks. Here we consider a general objective function that evaluates the mapping π : V 0 → V ∪ {null}. We then show how to optimize this objective using max-sum inference in a factor-graph. • Node matching preference for matching node i ∈ V to j 0 ∈ V 0 : ϕ(i, j 0 ) : V × V 0 → R. • Edge matching preference for matching (i, j) ∈ E to (i0 , j 0 ) ∈ E 0 : ς((i, j), (k 0 , l0 )) : E × E 0 → R. • Node merging preference for mapping nodes i, j ∈ V to the same node k ∈ V 0 : ϑ(i, j, k 0 ) : V × V × V 0 → R. • Node deletion preference δ(i) : V → R, is the penalty for ignoring the node i ∈ V – i.e., mapping it to the null node. • Edge deletion preference is the preference for dropping (i, j) ∈ E: $(i, j) : E → R. • Edge insertion preference is the preference for adding an edge (i0 , j 0 ) ∈ E 0 , when it is not matched against any edge in E: υ(i0 , j 0 ) : E 0 → R. We can define these preferences in such a way that the optimal solution is also a solution to an interesting decision problem. Example 5.3.2. The optimal alignments with the following parameters reproduce Hom(G, G 0 ): • node matching ϕ(i, j 0 ) = 0 ∀ i ∈ V, j 0 ∈ V 0 • edge matching ς((i, j), (k 0 , l0 )) = 1 • node merging ϑ(i, j, k 0 ) = 0 • node deletion δ(i) = −∞ ∀ (i, j) ∈ E, (k 0 , l0 ) ∈ E 0 ∀ i, j ∈ V, k 0 ∈ V 0 ∀i∈V • edge deletion $(i, j) = −∞ ∀ (i, j) ∈ E • edge insertion υ(k 0 , l0 ) = 0 ∀ (k 0 , l0 ) ∈ E 0 Alternatively, using positive and uniform node and edge matching preferences, if we set the merge cost to −∞ and allow node deletion at zero cost, the optimal solution will be the maximum common subgraph. In particular, for maximum-edge common subgraph we use • node matching ϕ(i, j 0 ) = 0 ∀ i ∈ V, j 0 ∈ V 0 • edge matching ς((i, j), (k 0 , l0 )) = 1 ∀ (i, j) ∈ E, (k 0 , l0 ) ∈ E 0 5.3. GRAPH MATCHING PROBLEMS 133 • node merging ϑ(i, j, k 0 ) = −∞ ∀ i, j ∈ V, k 0 ∈ V 0 • node deletion δ(i) = 0 ∀ i ∈ V • edge deletion $(i, j) = 0 ∀ (i, j) ∈ E • edge insertion υ(k 0 , l0 ) = 0 ∀ (k 0 , l0 ) ∈ E 0 Given two weighted adjacency matrices A and A0 (for G and G 0 respectively), where Ai,j is the “flow” between the facilities i and j, while A0k0 ,l0 is the “distance” between the locations k 0 and l0 , the quadratic assignment problem, seeks a one-to-one mapping π ∗ : V → V 0 of facilities to locations in order to optimize the flow π ∗ = argπ max X Ai,j A0π(i),π(j) i,j∈V Here w.l.o.g. we assume all weights are positive and set the alignment preferences so as to optimize the quadratic assignment problem: • node matching ϕ(i, j 0 ) = 0 ∀ i ∈ V, j 0 ∈ V 0 • edge matching ς((i, j), (k 0 , l0 )) = Ai,j A0k0 ,l0 • node merging ϑ(i, j, k 0 ) = −∞ • node deletion δ(i) = −∞ ∀ (i, j) ∈ E, (k 0 , l0 ) ∈ E 0 ∀ i, j ∈ V, k 0 ∈ V 0 ∀i∈V • edge deletion $(i, j) = −∞ • edge insertion υ(k 0 , l0 ) = −∞ ∀ (i, j) ∈ E ∀ (k 0 , l0 ) ∈ E 0 Now we define the factors based on various alignment preferences. The factor-graph has one variable per node i ∈ V: x = {xi | i ∈ V}, where xi ∈ V 0 ∪ {null}. Here, xi = null corresponds to ignoring this node in the mapping. The alignment factor-graph has three type of factors: • Local factors: take the node matching preferences and node deletion preference into account:   δ(i) xi = null fi (xi ) =  ϕ(i, x ) otherwise i ∀i ∈ V • Edge factors: are defined for each edge (i, j) ∈ E and partly account for edge matching, node merging and edge deletion:    0      ϑ(i, j, x ) i fi (xi , xj ) =   ς((i, j), (xi , xj ))      $(i, j) xi = null ∨ xj = null xi = xj (xi , xj ) ∈ E 0 otherwise ∀(i, j) ∈ E 134 CHAPTER 5. PERMUTATIONS • Non-edge factors: are defined for non-existing edge i, j 6= i ∈ V, (i, j) ∈ / E and partly account for node merging and edge insertion:    0      ϑ(i, j, x ) i fi (xi , xj ) =   υ(xi , xj )      0 xi = null ∨ xj = null xi = xj (xi , xj ) ∈ E 0 ∀i, j 6= i ∈ V, (i, j) ∈ /E otherwise This factor-graph in its general form is fully connected. The cost of max-sum message-passing through each of these factors is O(|V 0 | log(V 0 |)), which means each iteration of variable synchronous max-sum BP is O(|V|2 |V 0 | log(V 0 |)). However, if the matching candidates are limited (a.k.a. sparse alignment), and the graphs G and G 0 are sparse, this cost can be significantly reduced in practice. Example 5.3.3. Figure 5.8 shows a matching of E-coli metabolic network against a distorted version, where 50% of edges were removed and the same number of random edges were added. Then we generated 10 matching candidate for each node of the original graph, including the correct match and 9 other randomly selected nodes. We used graph alignment with the following preferences to match the original graph against the distorted version7 • node matching ϕ(i, j 0 ) = 0 ∀ i ∈ V, j 0 ∈ V 0 • edge matching ς((i, j), (k 0 , l0 )) = 1 ∀ (i, j) ∈ E, (k 0 , l0 ) ∈ E 0 • node merging ϑ(i, j, k 0 ) = −∞ • node deletion δ(i) = −∞ ∀ i, j ∈ V, k 0 ∈ V 0 ∀i∈V • edge deletion $(i, j) = 0 ∀ (i, j) ∈ E • edge insertion υ(k 0 , l0 ) = 0 ∀ (k 0 , l0 ) ∈ E 0 We observed that message passing using our factor-graph was able to correctly match all the nodes in two graphs. 7 We used T = 100 initial iterations with damping parameter λ = .2. After this, we used decimation and fixed ρ = 1% of variables after each T = 50 iterations. The total run-time was less than 5 minutes. 5.3. GRAPH MATCHING PROBLEMS 135 Figure 5.8: Matching the E-coli metabolic network against a highly distorted version using message passing. Here 50% of |E| = 4306 edges in the original network (left) are removed and the same number of random edges are added, to produce the distorted network ( i.e., |E 0 | = |E|). Each node had 10 random candidates for matching (including the correct choice) and message passing was able to identify the correct matching with 100% accuracy. Conclusion This thesis studied a general form of inference in graphical models with an emphasis on algebraic abstractions. We organized an important subset of these inference problems under an inference hierarchy and studied the settings under which distributive law allows efficient approximations in the form of message passing. We investigated different methods to improve this approximation in loopy graphs using 1) variational formulation and loop correction; 2) survey propagation; 3) hybrid techniques. We then studied graphical modelling of combinatorial optimization problems under different modes of inference. As with any other inference and optimization framework, graphical modeling has its pros and cons. The cons of using graphical models for combinatorial optimization are twofold a) implementing message passing procedures, when compared to other standard techniques such as using Integer Programming solvers, is more complex and time consuming. This is further complicated by b) the fact that there is no standard guideline for designing a factor-graph representation, so as to minimize the computational complexity or increase the quality of message passing solution. Indeed we used many tricks to efficiently approximate the solution to our problems; example include simplification of BP messages through alternative normalization, augmentation, variable and factor-synchronous message update, introduction of auxiliary variables, using damping and decimation etc. On the other hand, when dealing with large scale and difficult optimization problems, one has to resort to conceptual and computational decomposition, and graphical modelling and message passing techniques are the immediate candidates. Message passing is mass parallelizable, scalable and often finds high-quality solutions. By providing factor-graphs for a diverse set of combinatorial problems, this thesis also was an attempt to establish the universality of message passing. Of course some of these problems better lend themselves to graphical modelling than some others, resulting in better computational complexity and quality of results. Table 5.1 summarizes some important information about the message passing solutions to combinatorial problems that are proposed or reviewed in this thesis. 5.3. GRAPH MATCHING PROBLEMS 137 Table 5.1: Summary of message-passing solutions to combinatorial problems. The time complexity is for one iteration of message passing. We report different costs for different update schedules for the same problem. See the text for references. Here, N is the number of nodes and M is the number of constraints/factors. Problem Belief Propagation Semiring ops. * not (min, max) * Perturbed BP Survey Propagation K-satisfiability K-coloring K-clique-cover (+, ×) * (+, ×) min set-cover K-independent-set max independent set async. async. reduces to BP async. - v-sync. O(KM ) P (f,v)-sync. (+, ×) O(K(N 2 − |E|)) P O(KN 2 + i∈V |E(i, ·)|2 + |E(·, i)|2 ) v-sync. O(KN + |E|) f-sync. (+, ×) async. a-sync. async. K-clique-cover ≡ to K-coloring on G c - (min, +) O(|E|) (f,v)-sync. similar to K-median (+, ×) O(N 3 ) async. binary var. model f-sync. ≡ K-independent-set on G c O(KN 2 ) O(KN + |E|) (f,v)-sync. (min, max) O(log(N )(KN + |E|)) (f,v)-sync. (+, ×) reduction ≡ K-independent-set (min, max) O(KN + |E|) (f,v)-sync. min-max BP (+, ×) (min, max) (max, +) O(K 3 N 2 ) async. categorical var. model O(K 2 N 2 ) v-sync. ≡ K-independent-set on G c O(K 2 N 2 log(N )) v-sync. (+, ×) reduction ≡ K-independent-set O(|E|) (f,v)-sync. ≡ max independent-set & min vertex cover sphere-packing reduces to Gibbs samp. & BP v-sync. v-sync. & K-clique K-packing f-sync. O(K 2 M ) 2 i |E(i, ·)| ) relation to others - v-sync. O(K|E|) P O(K i (N − |E(i, ·))|2 ) & K-clique K-packing async. O(K & K-set-cover K-independent-set Schedule (+, ×) (+, ×) K-dominating-set Complexity P P O( i |Xi ||∂i|2 + I |XI ||∂I|) P P O( i |Xi ||∂i| + I |XI ||∂I|) P P O( i |Xi ||∂i| + I |XI |) P P 2 O( i |Xi ||∂i| + I |XI ||∂I|) P P O( i |Xi ||∂i| + I |XI ||∂I|) P P O( i 2|Xi | |∂i|2 + I 2|XI | |∂I|) P O(K 2 M + i |∂i|2 ) (+, ×) (Hamming) n: digits y: min dist. O(K 2 22n ) v-sync. O(K 3 n + K 2 n2 y) async. O(K 2 n2 y) v-sync. O(K 2 ny) (f,v)-sync. K-medians (min, +) O(|E|) f-sync. facility location (min, +) O(|E|) f-sync. d-depth min span. tree (min, +) O(d|E|) v-sync. prize-coll. Steiner tree (min, +) O(d|E|) v-sync. - a.k.a. affinity propagation K-clustering (min, max) O(KN 2 log(N )) v-sync. (+, ×) reduction ≡ K-clique-cover K-center (min, max) O(log(N )(KN + |E|)) f-sync. (+, ×) reduction ≡ K-set-cover O(KN + |E|) Modularity max (min, +) min-max BP - clique model, using augmentation O(Kmax N 2 ) max matching (min, +) O(N 2 ) Potts model v-sync - - - v-sync - & cycle cover bottleneck assignment (min, max) - max b-matching (min, +) O(bN 2 ) TSP (min, +) O(N 2 τ ) or ∼ N 3 bottleneck TSP (min, max) O(N 3 log(N )) (f,v)-sync async (+, ×) reduction ≡ Hamiltonian cycle subgraph isomorphism (+, ×) O(|V|2 |E 0 |) v-sync. G → G0 subgraph monomorphism (+, ×) O(|V|2 |V 0 | + |E| |E 0 |) v-sync. G → G0 subgraph supermorphism (+, ×) O((|V 2 | − |E|) |E 0 | + |V 0 | |V|2 ) v-sync. G → G0 homomorphism (+, ×) O(|E| |E 0 |) v-sync. G → G0 graph alignment (max, +) O(|V|2 |V 0 | log(|V 0 |)) v-sync. G → G 0 with general costs max common sub-graph a variation of graph alignment quadratic assignment a variation of graph alignment 138 CHAPTER 5. PERMUTATIONS Future work Due to breadth of the models and problems that we covered in this thesis, our investigation lacks the deserved depth in many cases. This is particularly pronounced in the experiments. Moreover, we encountered many new questions and possibilities while preparing this thesis. Here, we enumerate some of the topics that demand a more in depth investigation in the future work • Many of the problems that we discussed also have efficient LP relaxations that some times come with approximation guarantees. A comprehensive experimental comparison of message passing and LP relaxations for these problems, both in terms of speed and accuracy is highly desirable. • Our algebraic approach to inference suggests that all message passing procedures discussed here, including survey propagation, are also applicable to the domain of complex numbers. Extensions to this domain not only may allow new applications (e.g., using Fourier coefficients as factors) but may also produce better solutions to many problems that we have studied here (e.g., in solving CSPs). • Our study of using graph homomorphism and its application to finding symmetries is a work in progress. In particular its relation to other methods such as stochastic block models and spectral techniques needs further investigation. • Although some preliminary results on Ising model suggested that using sum-product reductions for min-max inference performs much better than direct min-max message passing, an extensive comparison of these two approaches to min-max inference is missing in our analysis. • In section 3.7, we noted that several optimization counterparts to CSPs allow using binary-search in addition to a direct optimization approach. While using binary search is more expensive for these problems, we do not know which approach will performs better in practice. References [1] D. Achioptas and G. B. Sorkin. Optimal myopic algorithms for random 3-sat. In Foundations of Computer Science, 2000. Proceedings. 41st Annual Symposium on, pages 590–600. IEEE, 2000. 79 [2] D. Achlioptas and A. Coja-Oghlan. Algorithmic barriers from phase transitions. arXiv:0803.2122, Mar. 2008. 79, 80 [3] D. Achlioptas, A. Naor, and Y. Peres. Rigorous location of phase transitions in hard optimization problems. Nature, 435(7043):759–764, June 2005. 80 [4] Y. Ahn, J. Bagrow, and S. Lehmann. Link communities reveal multiscale complexity in networks. Nature, 2010. 100 [5] H. Aissi, C. Bazgan, and D. Vanderpooten. Min–max and min–max regret versions of combinatorial optimization problems: A survey. European J Operational Research, 197(2):427–438, 2009. 28 [6] S. Aji and R. McEliece. The Generalized distributive law and free energy minimization. In Allerton Conf, 2001. 2, 48 [7] S. M. Aji and R. J. McEliece. The generalized distributive law. Information Theory, IEEE Transactions on, 46(2):325–343, 2000. 1 [8] S. M. Aji, G. B. Horn, and R. J. McEliece. On the Convergence of iterative decoding on graphs with a single cycle. In Proc 1998 IEEE Int Symp Information Theory, 1998. 36 [9] N. Alon and A. Shapira. Homomorphisms in graph property testing. In Topics in discrete mathematics, pages 281–313. Springer, 2006. 127 [10] D. J. Amit. Modeling brain function: The world of attractor neural networks. Cambridge University Press, 1992. 1, 68 [11] C. Andrieu, N. de Freitas, A. Doucet, and M. Jordan. An introduction to MCMC for machine learning. Machine Learning, 2003. 66 [12] D. Applegate. The traveling salesman problem: a computational study. Princeton, 2006. 43, 115 [13] D. Applegate, R. Bixby, V. Chvatal, and W. Cook. Concorde TSP solver, 2006. 115, 120, 121 140 APPENDIX . REFERENCES [14] S. Arora and B. Barak. Computational complexity: a modern approach. Cambridge University Press, 2009. 18 [15] S. Arora, P. Raghavan, and S. Rao. Approximation schemes for euclidean k-medians and related problems. In Proceedings of the thirtieth annual ACM symposium on Theory of computing, pages 106–113. ACM, 1998. 100 [16] I. Averbakh. On the complexity of a class of combinatorial optimization problems with uncertainty. Mathematical Programming, 90(2):263–272, 2001. 28 [17] F. Bacchus. Representing and reasoning with probabilistic knowledge: a logical approach to probabilities. MIT press, 1991. 2 [18] M. Bailly-Bechet, S. Bradde, et al. Clustering with shallow trees. J Statistical Mechanics, 2009. 102 [19] M. Bailly-Bechet, A. Braunstein, and R. Zecchina. A prize-collecting steiner tree approach for transduction network inference. In Computational Methods in Systems Biology, pages 83–95. Springer, 2009. 102 [20] M. Bailly-Bechet, C. Borgs, et al. Finding undetected protein associations in cell signaling by belief propagation. PPNAS, 2011. 102 [21] E. Balas and P. Toth. Branch and bound methods. The traveling salesman problem, 1985. 115 [22] M. Bayati, D. Shah, and M. Sharma. Maximum weight matching via max-product belief propagation. In ISIT, pages 1763–1767. IEEE, 2005. 36, 113, 114 [23] M. Bayati, C. Borgs, A. Braunstein, J. Chayes, A. Ramezanpour, and R. Zecchina. Statistical mechanics of steiner trees. Physical review letters, 101(3):037208, 2008. 102 [24] M. Bayati, A. Braunstein, and R. Zecchina. A rigorous analysis of the cavity equations for the minimum spanning tree. Journal of Mathematical Physics, 49(12):125206, 2008. 102 [25] M. Bayati, D. Shah, and M. Sharma. Max-product for maximum weight matching: Convergence, correctness, and lp duality. Information Theory, IEEE Transactions on, 54(3):1241–1251, 2008. 114 [26] M. Bayati, D. F. Gleich, A. Saberi, and Y. Wang. Message-passing algorithms for sparse network alignment. ACM Transactions on Knowledge Discovery from Data (TKDD), 7(1):3, 2013. 132 [27] M. J. Beal, F. Falciani, Z. Ghahramani, C. Rangel, and D. L. Wild. A Bayesian approach to reconstructing genetic regulatory networks with hidden factors. Bioinformatics, 21(3):349–356, 2005. 1 [28] R. Bellman. Dynamic programming treatment of the travelling salesman problem. JACM, 1962. 115 [29] A. Ben-Dor and B. Chor. On constructing radiation hybrid maps. J Computational Biology, 1997. 120 [30] H. A. Bethe. Statistical theory of superlattices. Proceedings of the Royal Society A Mathematical Physical and Engineering Sciences, 150(871):552–575, 1935. 45 141 [31] I. Biazzo, A. Braunstein, and R. Zecchina. Performance of a cavity-method-based algorithm for the prizecollecting steiner tree problem on graphs. Physical Review E, 86(2):026706, 2012. 102 [32] B. Bidyuk and R. Dechter. Cutset sampling for Bayesian networks. Journal of Artificial Intelligence Research, 28(3):1–48, 2007. 49 [33] S. Bistarelli, U. Montanari, F. Rossi, T. Schiex, G. Verfaillie, and H. Fargier. Semiring-based csps and valued csps: Frameworks, properties, and comparison. Constraints, 4(3):199–240, 1999. 8, 24 [34] V. Blondel, J. Guillaume, et al. Fast unfolding of communities in large networks. J Statistical Mechanics, 2008. 106, 111 [35] H. L. Bodlaender. Classes of graphs with bounded tree-width, 1986. 48 [36] L. Bordeaux and E. Monfroy. Beyond np: Arc-consistency for quantified constraints. In Principles and Practice of Constraint Programming-CP 2002, pages 371–386. Springer, 2002. 21 [37] C. Borgs, J. Chayes, L. Lovász, V. T. Sós, B. Szegedy, and K. Vesztergombi. Graph limits and parameter testing. In Proceedings of the thirty-eighth annual ACM symposium on Theory of computing, pages 261–270. ACM, 2006. 127 [38] C. Borgs, J. Chayes, L. Lovász, V. T. Sós, and K. Vesztergombi. Counting graph homomorphisms. In Topics in discrete mathematics, pages 315–371. Springer, 2006. 127, 128 [39] C. Borgs, J. T. Chayes, L. Lovász, V. T. Sós, and K. Vesztergombi. Convergent sequences of dense graphs i: Subgraph frequencies, metric properties and testing. Advances in Mathematics, 219(6):1801–1851, 2008. 127 [40] C. Borgs, J. T. Chayes, L. Lovász, V. T. Sós, and K. Vesztergombi. Convergent sequences of dense graphs ii. multiway cuts and statistical physics. Annals of Mathematics, 176(1):151–219, 2012. 127 [41] E. Boros and P. L. Hammer. Pseudo-boolean optimization. Discrete applied mathematics, 123(1):155–225, 2002. 26 [42] S. Boyd and L. Vandenberghe. Convex Optimization, volume 25. Cambridge University Press, 2010. 46 [43] S. Bradde. Statistical physics of subgraph identification problem. PhD thesis, SISSA, 2010. 126 [44] S. Bradde, A. Braunstein, H. Mahmoudi, F. Tria, M. Weigt, and R. Zecchina. Aligning graphs and finding substructures by a cavity approach. EPL (Europhysics Letters), 89(3):37009, 2010. 4, 124, 126, 132 [45] U. Brandes, D. Delling, et al. on clustering. IEEE KDE, 2008. 106, 108 [46] A. Braunstein and R. Zecchina. Survey propagation as local equilibrium equations. mat/0312483, Dec. 2003. J. Stat. Mech., P06007 (2004). 58 arXiv:cond- [47] A. Braunstein, M. Mezard, M. Weigt, and R. Zecchina. Constraint satisfaction by survey propagation. Physics, (2):8, 2002. 56 142 APPENDIX . REFERENCES [48] A. Braunstein, M. Mezard, and R. Zecchina. Survey propagation: an algorithm for satisfiability. Random Structures and Algorithms, 27(2):19, 2002. 56, 66, 83, 84 [49] A. Braunstein, R. Mulet, A. Pagnani, M. Weigt, and R. Zecchina. Polynomial iterative algorithms for coloring and analyzing random graphs. Physical Review E, 68(3):036702, 2003. 83 [50] G. R. Brightwell and P. Winkler. Graph homomorphisms and phase transitions. Journal of combinatorial theory, series B, 77(2):221–262, 1999. 128 [51] R. L. Brooks. On colouring the nodes of a network. In Mathematical Proceedings of the Cambridge Philosophical Society, volume 37, pages 194–197. Cambridge Univ Press, 1941. 98 [52] A. Bulatov and M. Grohe. The complexity of partition functions. Theoretical Computer Science, 348(2): 148–186, 2005. 128 [53] H. Bunke. On a relation between graph edit distance and maximum common subgraph. Pattern Recognition Letters, 18(8):689–694, 1997. 132 [54] M. Castellana and L. Zdeborová. Adversarial satisfiability problem. Journal of Statistical Mechanics: Theory and Experiment, 2011(03):P03023, 2011. 98 [55] T. Castellani and A. Cavagna. Spin-glass theory for pedestrians. Journal of Statistical Mechanics: Theory and Experiment, 2005(05):P05012, May 2005. 46 [56] V. Černỳ. Thermodynamical approach to the traveling salesman problem: An efficient simulation algorithm. J Optimization theory and Applications, 1985. 115 [57] V. Chandrasekaran and N. Srebro. Complexity of inference in graphical models. UAI, 2008. 48 [58] M. Charikar, S. Guha, É. Tardos, and D. B. Shmoys. A constant-factor approximation algorithm for the k-median problem. In Proceedings of the thirty-first annual ACM symposium on Theory of computing, pages 1–10. ACM, 1999. 100 [59] P. Cheeseman, B. Kanefsky, and W. M. Taylor. Where the really hard problems are. In Proceedings of the 12th IJCAI - Volume 1, IJCAI’91, pages 331–337, San Francisco, CA, USA, 1991. Morgan Kaufmann Publishers Inc. 79 [60] M. Chertkov. Loop series for discrete statistical models on graphs. {. . . } of Statistical Mechanics: Theory and {. . . }, 2006. 49 [61] M. Chertkov and V. Y. Chernyak. Loop calculus in statistical physics and information science. Physical Review E - Statistical, Nonlinear and Soft Matter Physics, 73(6 Pt 2):4, 2006. 49 [62] M. Chertkov and A. B. Yedidia. Approximating the permanent with fractional belief propagation. J. Mach. Learn. Res., 14(1):2029–2066, Jan. 2013. 113 [63] H. L. Chieu and W. S. Lee. Relaxed survey propagation: A sum-product algorithm for max-sat. In AAAI, pages 247–252, 2008. 98 143 [64] H. L. Chieu, W. S. Lee, and Y. W. Teh. Cooled and relaxed survey propagation for mrfs. In Advances in Neural Information Processing Systems, pages 297–304, 2007. 98 [65] P. S. Churchland and T. J. Sejnowski. The computational brain. The MIT press, 1992. 1 [66] J. Chuzhoy, S. Guha, E. Halperin, S. Khanna, G. Kortsarz, R. Krauthgamer, and J. S. Naor. Asymmetric k-center is log* n-hard to approximate. JACM, 2005. 104 [67] A. Clauset. Finding local community structure in networks. Physical Review E, 2005. 106, 109 [68] P. Clifford. Markov random fields in statistics. Disorder in physical systems, pages 19–32, 1990. 8 [69] S. Climer and W. Zhang. Take a walk and cluster genes: A TSP-based approach to optimal rearrangement clustering. In ICML, 2004. 120 [70] S. Cocco, O. Dubois, J. Mandler, and R. Monasson. Rigorous decimation-based construction of ground pure states for spin glass models on random lattices. arXiv:cond-mat/0206239, June 2002. 79 [71] A. Coja-Oghlan. On belief propagation guided decimation for random k-sat. In Proceedings of the TwentySecond Annual ACM-SIAM Symposium on Discrete Algorithms, SODA ’11, pages 957–966. SIAM, 2011. 81 [72] D. Conte, P. Foggia, C. Sansone, and M. Vento. Thirty years of graph matching in pattern recognition. International journal of pattern recognition and artificial intelligence, 18(03):265–298, 2004. 124, 132 [73] M. Cooke, J. R. Hershey, and S. J. Rennie. Monaural speech separation and recognition challenge. Computer Speech & Language, 24(1):1–15, 2010. 1 [74] G. Cooper. The computational complexity of probabilistic inference using Bayesian belief networks. Artificial Intelligence, 42, 1990. 2 [75] T. M. Cover and J. A. Thomas. Elements of Information Theory, volume 6 of Wiley Series in Telecommunications. Wiley, 1991. 95 [76] C. Crick and A. Pfeffer. Loopy belief propagation as a basis for communication in sensor networks. In Proceedings of the Nineteenth conference on Uncertainty in Artificial Intelligence, pages 159–166. Morgan Kaufmann Publishers Inc., 2002. 1 [77] G. Dantzig, R. Fulkerson, and S. Johnson. Solution of a large-scale traveling-salesman problem. J Operations Research society of America, 1954. 42, 115 [78] A. Darwiche. Recursive conditioning. Artificial Intelligence, 126(1):5–41, 2001. 49 [79] B. A. Davey and H. A. Priestley. Introduction to lattices and order. Cambridge university press, 2002. 9 [80] C. P. De Campos. New complexity results for map in Bayesian networks. In IJCAI, volume 11, pages 2100–2106, 2011. 47 144 APPENDIX . REFERENCES [81] N. De Freitas, P. Hø jen Sø rensen, M. Jordan, and S. Russell. Variational MCMC. In Proceedings of the, pages 120–127. Morgan Kaufmann Publishers Inc., 2001. 68 [82] A. Decelle, F. Krzakala, C. Moore, and L. Zdeborová. Asymptotic analysis of the stochastic block model for modular networks and its algorithmic applications. Physical Review E, 84(6):066106, 2011. 100 [83] R. Dechter and D. Larkin. Hybrid processing of beliefs and constraints. In Proceedings of the Seventeenth conference on Uncertainty in artificial intelligence, pages 112–119. Morgan Kaufmann Publishers Inc., 2001. 8 [84] D. L. Donoho, A. Maleki, and A. Montanari. Message-passing algorithms for compressed sensing. Proceedings of the National Academy of Sciences, 106(45):18914–18919, 2009. 1 [85] M. Dorigo and L. Gambardella. Ant colony system: a cooperative learning approach to the traveling salesman problem. IEEE Evolutionary Computation, 1997. 115 [86] M. Dyer and C. Greenhill. The complexity of counting graph homomorphisms. Random Structures and Algorithms, 17(3-4):260–289, 2000. 128 [87] M. E. Dyer and A. M. Frieze. A simple heuristic for the p-centre problem. Operations Research Letters, 3 (6):285–288, 1985. 29, 104, 106 [88] D. J. Earl and M. W. Deem. Parallel Tempering: Theory, Applications, and New Perspectives. Physical Chemistry Chemical Physics, 7(23):21, 2005. 68 [89] F. Eaton and Z. Ghahramani. Choosing a variable to clamp. In International Conference on Artificial Intelligence and Statistics, pages 145–152, 2009. 49 [90] F. Eaton and Z. Ghahramani. Model reductions for inference: Generality of pairwise, binary, and planar factor graphs. Neural computation, 25(5):1213–1260, 2013. 25 [91] B. Eckmann and P. J. Hilton. Group-like structures in general categories (I) multiplications and comultiplications. Mathematische Annalen, 145(3):227–255, 1962. 38 [92] J. Edmonds and D. Fulkerson. Bottleneck extrema. J Combinatorial Theory, 1970. 29 [93] S. F. Edwards and P. W. Anderson. Theory of spin glasses. Journal of Physics F Metal Physics, 5(5): 965–974, 1975. 13 [94] G. Elidan and I. McGraw. Residual belief propagation: Informed scheduling for asynchronous message passing. In Proceedings of the Twenty- {. . . }, 2006. 36 [95] D. Eppstein. Subgraph isomorphism in planar graphs and related problems. In Proceedings of the sixth annual ACM-SIAM symposium on Discrete algorithms, pages 632–640. Society for Industrial and Applied Mathematics, 1995. 124 [96] S. Ermon, C. P. Gomes, A. Sabharwal, and B. Selman. Optimization with parity constraints: From binary codes to discrete integration. arXiv preprint arXiv:1309.6827, 2013. 25 145 [97] S. Ermon, C. Gomes, A. Sabharwal, and B. Selman. Low-density parity constraints for hashing-based discrete integration. In Proceedings of The 31st International Conference on Machine Learning, pages 271–279, 2014. 25 [98] P. F. Felzenszwalb and D. P. Huttenlocher. Efficient belief propagation for early vision. International journal of computer vision, 70(1):41–54, 2006. 1 [99] M. E. Fisher. On the dimer solution of planar ising models. Journal of Mathematical Physics, 7(10): 1776–1781, 1966. 26 [100] G. D. Forney Jr. Codes on graphs: normal realizations. Information Theory, IEEE Transactions on, 47(2): 520–548, 2001. 8 [101] W. T. Freeman, E. C. Pasztor, and O. T. Carmichael. Learning low-level vision. International journal of computer vision, 40(1):25–47, 2000. 1 [102] B. Frey and D. Dueck. Clustering by passing messages between data points. Science, 2007. 100, 102 [103] Y. Fu and P. W. Anderson. Application of statistical mechanics to NP-complete problems in combinatorial optimisation. Journal of Physics A: Mathematical and General, 19(9):1605–1620, June 1986. 2, 79 [104] D. Fulkerson. Flow networks and combinatorial operations research. The American Mathematical Monthly, 73(2):115–138, 1966. 29 [105] M. H. Gail, J. H. Lubin, and L. V. Rubinstein. Likelihood calculations for matched case-control studies and survival studies with tied death times. Biometrika, 68(3):703–707, 1981. 40 [106] R. G. Gallager. Low-density parity-check codes. Information Theory, IRE Transactions on, 8(1):21–28, 1962. 1, 36 [107] M. R. Garey and D. S. Johnson. Computers and Intractability: A Guide to the Theory of NP-Completeness, volume 44 of A Series of Books in the Mathematical Sciences. W. H. Freeman, 1979. 76, 88 [108] A. E. Gelfand and A. F. M. Smith. Sampling-Based Approaches to Calculating Marginal Densities. Journal of the American Statistical Association, 85(410):398–409, 1990. 49 [109] S. Geman and D. Geman. Stochastic Relaxation, Gibbs Distributions, and the Bayesian Restoration of Images. IEEE Transactions on Pattern Analysis and Machine Intelligence, PAMI-6(6):721–741, 1984. 67 [110] S. Gershman, M. Hoffman, and D. Blei. Nonparametric variational inference. June 2012. 68 [111] I.-E. Givoni. Beyond Affinity Propagation: Message Passing Algorithms for Clustering. PhD thesis, University of Toronto, 2012. 102 [112] I. E. Givoni and B. J. Frey. A binary variable model for affinity propagation. Neural computation, 21(6): 1589–1600, 2009. 100 [113] A. Globerson and T. Jaakkola. Approximate inference using conditional entropy decompositions. In International Conference on Artificial Intelligence and Statistics, pages 130–138, 2007. 46 146 APPENDIX . REFERENCES [114] A. Globerson and T. S. Jaakkola. Fixing max-product: Convergent message passing algorithms for map lp-relaxations. In Advances in neural information processing systems, pages 553–560, 2008. 46 [115] D. E. Goldberg and R. Lingle. Alleles, loci, and the traveling salesman problem. In Genetic algorithms and Applications, 1985. 115 [116] G. H. Golub and C. F. Van Loan. Matrix computations, volume 3. JHU Press, 2012. 112 [117] V. Gomez, J. M. Mooij, and H. J. Kappen. Truncating the loop series expansion for belief propagation. Journal of Machine Learning Research, 8:1987–2016, Sept. 2007. 50 [118] R. E. Gomory et al. Outline of an algorithm for integer solutions to linear programs. Bulletin of the American Mathematical Society, 64(5):275–278, 1958. 42, 115 [119] T. F. Gonzalez. Clustering to minimize the maximum intercluster distance. Theoretical Computer Science, 38:293–306, 1985. 29, 104 [120] J. Grefenstette, R. Gopal, B. Rosmaita, and D. Van Gucht. Genetic algorithms for the traveling salesman problem. In Genetic algorithms and Applications, 1985. 115 [121] O. Gross. The bottleneck assignment problem. Technical report, DTIC Document, 1959. 29, 113 [122] M. Grotschel and L. Lovász. Combinatorial optimization. Handbook of combinatorics, 2:1541–1597, 1995. 1 [123] R. Gupta, A. A. Diwan, and S. Sarawagi. Efficient inference with cardinality-based clique potentials. In Proceedings of the 24th international conference on Machine learning, pages 329–336. ACM, 2007. 39 [124] W. K. Hastings. Monte Carlo sampling methods using Markov chains and their applications. Biometrika, 57(1):97–109, 1970. 67 [125] T. Hazan and T. Jaakkola. On the partition function and random maximum a-posteriori perturbations. arXiv preprint arXiv:1206.6410, 2012. 25 [126] T. Hazan and A. Shashua. Convergent Message-Passing Algorithms for Inference over General Graphs with Convex Free Energies. Science, 51(11):264–273, 2008. 46 [127] M. Held and R. Karp. The traveling-salesman problem and minimum spanning trees. Operations Research, 1970. 116 [128] M. Held and R. M. Karp. A dynamic programming approach to sequencing problems. Journal of the Society for Industrial & Applied Mathematics, 10(1):196210, 1962. 115 [129] P. Hell and J. Nesetril. Graphs and homomorphisms. Oxford University Press, 2004. 127 [130] K. Helsgaun. General k-opt submoves for the lin–kernighan tsp heuristic. Mathematical Programming Computation, 2009. 115 147 [131] J. R. Hershey, S. J. Rennie, P. A. Olsen, and T. T. Kristjansson. Super-human multi-talker speech recognition: A graphical modeling approach. Computer Speech & Language, 24(1):45–66, 2010. 1 [132] T. Heskes. Stable fixed points of loopy belief propagation are minima of the Bethe free energy. Advances in Neural Information Processing Systems NIPS2002, 14:343–350, 2003. 45 [133] T. Heskes. Convexity arguments for efficient minimization of the Bethe and Kikuchi free energies. JAIR, 26, 2006. 46, 55 [134] T. Heskes. Convexity Arguments for Efficient Minimization of the Bethe and Kikuchi Free Energies, 2006. 46 [135] D. S. Hochbaum and D. B. Shmoys. A best possible heuristic for the k-center problem. Mathematics of operations research, 10(2):180–184, 1985. 104 [136] D. S. Hochbaum and D. B. Shmoys. A unified approach to approximation algorithms for bottleneck problems. Journal of the ACM (JACM), 33(3):533–550, 1986. 29 [137] R. A. Howard and J. E. Matheson. Influence diagrams. Decision Analysis, 2(3):127–143, 2005. 8 [138] B. Huang and T. Jebara. Loopy belief propagation for bipartite maximum weight b-matching. In AI and Statistics, 2007. 113 [139] B. Huang and T. Jebara. Approximating the permanent with belief propagation. arXiv:0908.1769, 2009. 18, 113 arXiv preprint [140] M. Ibrahimi, A. Javanmard, Y. Kanoria, and A. Montanari. Robust max-product belief propagation. In Signals, Systems and Computers (ASILOMAR), 2011 Conference Record of the Forty Fifth Asilomar Conference on, pages 43–49. IEEE, 2011. 28, 39 [141] A. Ihler. Particle belief propagation. {. . . } Conference on Artificial Intelligence and Statistics, 2009. 68 [142] A. Ihler and M. David. Nonparametric belief propagation. 2003. 68 [143] A. T. Ihler, J. W. Fisher, R. L. Moses, and A. S. Willsky. Nonparametric belief propagation for selflocalization of sensor networks. Selected Areas in Communications, IEEE Journal on, 23(4):809–819, 2005. 1 [144] M. Isard. PAMPAS: real-valued graphical models for computer vision, 2003. 68 [145] S. Janson, T. Luczak, and V. F. Kolchin. Random graphs. Bull. London Math. Soc, 33:363383, 2001. 81 [146] E. T. Jaynes. Probability theory: the logic of science. Cambridge university press, 2003. 2 [147] C. S. Jensen, A. Kong, and U. Kjaerulff. Blocking-Gibbs Sampling in Very Large Probabilistic Expert Systems. International Journal of Human-Computer Studies, 42:647–666, 1995. 68 [148] F. V. Jensen, S. L. Lauritzen, and K. G. Olesen. Bayesian updating in causal probabilistic networks by local computations. Computational Statistics Quarterly, 4(4):269–282, 1990. 48 148 APPENDIX . REFERENCES [149] M. Jerrum and A. Sinclair. The markov chain monte carlo method: an approach to approximate counting and integration. Approximation algorithms for NP-hard problems, pages 482–520, 1996. 113 [150] M. Jerrum, A. Sinclair, and E. Vigoda. A polynomial-time approximation algorithm for the permanent of a matrix with nonnegative entries. Journal of the ACM (JACM), 51(4):671–697, 2004. 113 [151] M. R. Jerrum, L. G. Valiant, and V. V. Vazirani. Random generation of combinatorial structures from a uniform distribution. Theoretical Computer Science, 43:169–188, 1986. 25 [152] J. Jiang, P. Rai, and H. Daume. Message-passing for approximate map inference with latent variables. In Advances in Neural Information Processing Systems, pages 1197–1205, 2011. 47 [153] D. Johnson, S. Krishnan, J. Chhugani, S. Kumar, and S. Venkatasubramanian. Compressing large Boolean matrices using reordering techniques. In VLDB, 2004. 120 [154] D. S. Johnson and L. A. McGeoch. The traveling salesman problem: A case study in local optimization. Local search in combinatorial optimization, page 215310, 1997. 120 [155] V. Jojic, S. Gould, and D. Koller. Accelerated dual decomposition for map inference. In Proceedings of the 27th International Conference on Machine Learning (ICML-10), pages 503–510, 2010. 46 [156] S. N. Kabadi and A. P. Punnen. The bottleneck tsp. In The Traveling Salesman Problem and Its Variations, pages 697–735. Springer, 2004. 121 [157] M. Kaminski, V. V. Lozin, and M. Milanic. Recent developments on graphs of bounded clique-width. Discrete Applied Mathematics, 157(12):2747–2761, 2009. 48 [158] V. Kann. On the approximability of NP-complete optimization problems. PhD thesis, Royal Institute of Technology Stockholm, 1992. 88 [159] R. M. Karp. Reducibility among combinatorial problems. Springer, 1972. 86 [160] H. A. Kautz, A. Sabharwal, and B. Selman. Incomplete algorithms., 2009. 32, 98 [161] M. Kearns. Graphical games. Algorithmic game theory, 3:159–180, 2007. 39 [162] M. Kearns, M. L. Littman, and S. Singh. Graphical models for game theory. In Proceedings of the Seventeenth conference on UAI, pages 253–260. Morgan Kaufmann Publishers Inc., 2001. 28 [163] P. J. Kelly et al. A congruence theorem for trees. Pacific J. Math, 7(0957):961–968, 1957. 130 [164] S. Khuller and Y. J. Sussmann. The capacitated k-center problem. SIAM Journal on Discrete Mathematics, 13(3):403–418, 2000. 29 [165] R. Kikuchi. A Theory of Cooperative Phenomena. Physical Review, 81(6):988–1003, 1951. 48, 49 [166] S. Kirkpatrick, M. Vecchi, et al. Optimization by simmulated annealing. Science, 1983. 115 [167] T. Kloks and H. L. Bodlaender. Only few graphs have bounded treewidth. RUUCS, 1992. 48 149 [168] P. Kohli and P. H. S. Torr. Graph Cuts for Minimizing Robust Higher Order Potentials. Computing, 24 (7):996–1000, 2008. 40 [169] P. Kohli, M. P. Kumar, and P. H. S. Torr. P3 & Beyond: Solving Energies with Higher Order Cliques. 2007 IEEE Conference on Computer Vision and Pattern Recognition, pages 1–8, 2007. 40 [170] P. Kohli, L. Ladický, and P. H. S. Torr. Robust Higher Order Potentials for Enforcing Label Consistency. International Journal of Computer Vision, 82(3):302–324, Jan. 2009. 40 [171] D. Koller and N. Friedman. Probabilistic Graphical Models: Principles and Techniques, volume 2009 of Adaptive Computation and Machine Learning. The MIT Press, 2009. 48 [172] D. Koller, U. Lerner, and D. Angelov. A general algorithm for approximate inference and its application to hybrid bayes nets. pages 324–333, July 1999. 68 [173] V. Kolmogorov. Convergent tree-reweighted message passing for energy minimization. Pattern Analysis and Machine Intelligence, IEEE Transactions on, 28(10):1568–1583, 2006. 36 [174] N. Komodakis. Beyond pairwise energies: Efficient optimization for higher-order MRFs. computer.org, 2009. 40 [175] N. Komodakis and N. Paragios. Mrf energy minimization and beyond via dual decomposition. IEEE Transactions on Pattern {. . . }, 2010. 46 [176] N. Komodakis, N. Paragios, and G. Tziritas. Mrf optimization via dual decomposition: Message-passing revisited. In Computer Vision, 2007. ICCV 2007. IEEE 11th International Conference on, pages 1–8. IEEE, 2007. 46 [177] L. Kroc, A. Sabharwal, and B. Selman. Survey Propagation Revisited. 23rd UAI, pages 217–226, 2002. 58 [178] A. Krogh, B. Larsson, G. Von Heijne, and E. L. Sonnhammer. Predicting transmembrane protein topology with a hidden markov model: application to complete genomes. Journal of molecular biology, 305(3): 567–580, 2001. 1 [179] F. Krzakala, A. Montanari, F. Ricci-Tersenghi, G. Semerjian, and L. Zdeborova. Gibbs states and the set of solutions of random constraint satisfaction problems. Proceedings of the National Academy of Sciences of the United States of America, 104(25):1031810323, 2007. 79, 80, 81 [180] 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 Sciences, 110(52):20935–20940, 2013. 100, 131 [181] F. R. Kschischang and B. J. Frey. Factor graphs and the sum-product algorithm. Information Theory, IEEE, 2001. 8 [182] H. W. Kuhn. The hungarian method for the assignment problem. Naval research logistics quarterly, 2(1-2): 83–97, 1955. 113 150 APPENDIX . REFERENCES [183] X. Lan, S. Roth, D. Huttenlocher, and M. J. Black. Efficient Belief Propagation with Learned Higher-Order Markov Random Fields. Computer VisionECCV 2006, 3952:269–282, 2006. 40 [184] A. Lancichinetti and S. Fortunato. Community detection algorithms: A comparative analysis. Physical Review E, 80(5):056117, 2009. 100 [185] S. L. Lauritzen and F. V. Jensen. Local computation with valuations from a commutative semigroup. Annals of Mathematics and Artificial Intelligence, 21(1):51–69, 1997. 2, 8 [186] S. L. Lauritzen and D. J. Spiegelhalter. Local computations with probabilities on graphical structures and their application to expert systems. Journal of the Royal Statistical Society Series B Methodological, 50(2): 157–224, 1988. 48 [187] N. Lazic. Message Passing Algorithms for Facility Location Problems. PhD thesis, University of Toronto, 2011. 102 [188] N. Lazic, B. J. Frey, and P. Aarabi. Solving the uncapacitated facility location problem using message passing algorithms. In International Conference on Artificial Intelligence and Statistics, pages 429–436, 2010. 102 [189] C. Lecoutre. A collection of csp benchmark instances., Oct. 2013. 78 [190] J. Leskovec, D. Chakrabarti, J. Kleinberg, C. Faloutsos, and Z. Ghahramani. Kronecker graphs: An approach to modeling networks. The Journal of Machine Learning Research, 11:985–1042, 2010. 131 [191] J. Leskovec, K. Lang, and M. Mahoney. Empirical comparison of algorithms for network community detection. In WWW, 2010. 100 [192] D. A. Levin, Y. Peres, and E. L. Wilmer. Markov chains and mixing times. American Mathematical Soc., 2009. 71 [193] S. Litsyn, R. E, and S. N. The table of nonlinear binary codes. http://www.eng.tau.ac.il/~litsyn/ tableand/, 1999. [Online; accessed Jan 30 2014]. 95, 97 [194] M. L. Littman, S. M. Majercik, and T. Pitassi. Stochastic boolean satisfiability. Journal of Automated Reasoning, 27(3):251–296, 2001. 17, 21 [195] Q. Liu and A. Ihler. Variational algorithms for marginal map. The Journal of Machine Learning Research, 14(1):3165–3200, 2013. 47 [196] L. Lovász. Operations with structures. Acta Mathematica Hungarica, 18(3):321–328, 1967. 129 [197] L. Lovász and B. Szegedy. Limits of dense graph sequences. Journal of Combinatorial Theory, Series B, 96(6):933–957, 2006. 127 [198] B. D. MacArthur, R. J. Sánchez-Garcı́a, and J. W. Anderson. Symmetry in complex networks. Discrete Applied Mathematics, 156(18):3525–3531, 2008. 124 151 [199] E. N. Maneva, E. Mossel, and M. J. Wainwright. A new look at survey propagation and its generalizations. arXiv:cs/0409012, Sept. 2004. 58 [200] C. D. Manning and H. Schütze. Foundations of statistical natural language processing. MIT press, 1999. 1 [201] S. Masuyama, T. Ibaraki, and T. Hasegawa. The computational complexity of the m-center problems on the plane. IEICE TRANSACTIONS (1976-1990), 64(2):57–64, 1981. 104 [202] D. Maua and C. De Campos. Anytime marginal map inference. arXiv preprint arXiv:1206.6424, 2012. 47 [203] A. McCallum, A. Corrada-Emmanuel, and X. Wang. Topic and role discovery in social networks. Computer Science Department Faculty Publication Series, page 3, 2005. 1 [204] B. D. McKay. Small graphs are reconstructible. Australasian Journal of Combinatorics, 15:123–126, 1997. 130 [205] B. D. McKay and A. Piperno. Practical graph isomorphism, {II}. Journal of Symbolic Computation, 60 (0):94 – 112, 2014. 130 [206] O. Meshi, A. Jaimovich, A. Globerson, and N. Friedman. Convexifying the Bethe free energy. AUAI Press, June 2009. 46 [207] N. Metropolis, A. W. Rosenbluth, M. N. Rosenbluth, A. H. Teller, and E. Teller. Equations of state calculations by fast computing machines. Journal of Medical Physics, 21(6):1087–1092, 1953. 67 [208] M. Mézard and A. Montanari. Information, physics, and computation. Oxford, 2009. 1, 56, 58, 64, 68, 71, 81, 84 [209] M. Mezard and G. Parisi. The bethe lattice spin glass revisited. arXiv:cond-mat/0009418, Sept. 2000. Eur. Phys. J. B 20, 217 (2001). 79 [210] M. Mezard and G. Parisi. The cavity method at zero temperature. J. Stat. Phys 111 1, 2003. 79, 80 [211] M. Mezard, G. Parisi, and M. A. Virasoro. Spin Glass Theory and Beyond. Singapore: World Scientific, 1987. 1, 46, 80 [212] M. Mezard, G. Parisi, M. A. Virasoro, and D. J. Thouless. Spin glass theory and beyond. Physics Today, 41:109, 1988. 13 [213] M. Mezard, G. Parisi, and R. Zecchina. Analytic and algorithmic solution of random satisfiability problems. Science, 297(5582):812–815, Aug. 2002. 2, 79 [214] T. Minka and Y. Qi. Tree-structured approximations by expectation propagation. In NIPS, 2003. 55 [215] D. Mitchell, B. Selman, and H. Levesque. Hard and easy distributions of sat problems. In AAAI, volume 92, pages 459–465, 1992. 2, 79 [216] R. Monasson, R. Zecchina, S. Kirkpatrick, B. Selman, and L. Troyansky. Determining computational complexity from characteristic phase transitions. Nature, 400(6740):133–137, 1999. 2 152 APPENDIX . REFERENCES [217] A. Montanari and T. Rizzo. How to Compute Loop Corrections to Bethe Approximation. Journal of Statistical Mechanics: Theory and Experiment, (10):16, 2005. 50 [218] A. Montanari, F. Ricci-Tersenghi, and G. Semerjian. Solving constraint satisfaction problems through belief propagation-guided decimation. arXiv:0709.1667, Sept. 2007. 81 [219] A. Montanari, F. Ricci-Tersenghi, and G. Semerjian. Clusters of solutions and replica symmetry breaking in random k-satisfiability. arXiv:0802.3627, Feb. 2008. J. Stat. Mech. P04004 (2008). 87 [220] J. Mooij. Understanding and improving belief propagation. PhD thesis, Radboud Universiteit Nijmegen, 2008. 50, 52, 55 [221] J. Mooij. libDAI: A free and open source C++ library for discrete approximate inference in graphical models. JMLR, 2010. 56 [222] C. Moore and S. Mertens. The nature of computation. Oxford University Press, 2011. 1, 115, 124 [223] M.-L. Mugnier. Knowledge representation and reasonings based on graph homomorphism. In Conceptual Structures: Logical, Linguistic, and Computational Issues, pages 172–192. Springer, 2000. 127, 129 [224] K. Murphy, S. Mian, et al. Modelling gene expression data using dynamic Bayesian networks. Technical report, Technical report, Computer Science Division, University of California, Berkeley, CA, 1999. 1 [225] K. Murphy, Y. Weiss, and M. Jordan. Loopy-belief Propagation for Approximate Inference: An Empirical Study. In 15, pages 467–475, 1999. 36 [226] K. P. Murphy. Machine learning: a probabilistic perspective. MIT press, 2012. 130 [227] R. M. Neal. Probabilistic inference using markov chain monte carlo methods. 1993. 66 [228] M. Newman. Finding community structure in networks using the eigenvectors of matrices. Physical review E, 2006. 106, 111, 131 [229] M. Newman and M. Girvan. Finding and evaluating community structure in networks. Physical Review E, 2004. 106 [230] A. Y. Ng, M. I. Jordan, Y. Weiss, et al. On spectral clustering: Analysis and an algorithm. Advances in neural information processing systems, 2:849–856, 2002. 100 [231] N. Noorshams and M. J. Wainwright. Belief propagation for continuous state spaces: Stochastic messagepassing with quantitative guarantees. Journal of Machine Learning Research, 14:2799–2835, 2013. 68 [232] L. E. Ortiz and M. Kearns. Nash propagation for loopy graphical games. In Advances in Neural Information Processing Systems, pages 793–800, 2002. 39 [233] M. Padberg and G. Rinaldi. A branch-and-cut algorithm for the resolution of large-scale symmetric traveling salesman problems. SIAM review, 33(1):60–100, 1991. 115 153 [234] R. Paget and I. D. Longstaff. Texture synthesis via a noncausal nonparametric multiscale Markov random field. IEEE Transactions on Image Processing, 7(6):925–931, 1998. 40 [235] P. Pakzad and V. Anantharam. Estimation and Marginalization Using the Kikuchi Approximation Methods. Neural Computation, 17(8):1836–1873, Aug. 2005. 49 [236] G. Palla, I. Derényi, I. Farkas, and T. Vicsek. Uncovering the overlapping community structure of complex networks in nature and society. Nature, 2005. 100 [237] R. Panigrahy and S. Vishwanathan. An o(log*n) approximation algorithm for the asymmetric p-center problem. J Algorithms, 1998. 29, 104 [238] C. H. Papadimitriou. The euclidean travelling salesman problem is np-complete. Theoretical Computer Science, 4(3):237–244, 1977. 115 [239] G. Papandreou and A. L. Yuille. Perturb-and-map random fields: Using discrete optimization to learn and sample from energy models. In Computer Vision (ICCV), 2011 IEEE International Conference on, pages 193–200. IEEE, 2011. 25 [240] G. Parisi. A backtracking survey propagation algorithm for k-satisfiability. Arxiv preprint condmat0308510, page 9, 2003. 81 [241] J. D. Park and A. Darwiche. Complexity results and approximation strategies for map explanations. J. Artif. Intell. Res.(JAIR), 21:101–133, 2004. 20, 39 [242] R. G. Parker and R. L. Rardin. Guaranteed performance heuristics for the bottleneck travelling salesman problem. Operations Research Letters, 2(6):269–272, 1984. 29, 121 [243] J. Pearl. Bayesian networks: a model of self-activated memory for evidential reasoning. 1985. 8 [244] J. Pearl. Probabilistic reasoning in intelligent systems. 1988. 1 [245] J. Pearl. Probabilistic Reasoning in Intelligent Systems: Networks of Plausible Inference, volume 88 of Representation and Reasoning. Morgan Kaufmann, 1988. 2, 49 [246] A. Pelizzola. Cluster Variation Method in Statistical Physics and Probabilistic Graphical Models. Journal of Physics A: Mathematical and General, 38(33):36, 2005. 48 [247] C. C. Pinter. A book of abstract algebra. Courier Dover Publications, 2012. 9, 23 [248] P. Pons and M. Latapy. Computing communities in large networks using random walks. In Computer and Information Sciences-ISCIS 2005, pages 284–293. Springer, 2005. 100 [249] B. Potetz and T. S. Lee. Efficient belief propagation for higher-order cliques using linear constraint nodes. Computer Vision and Image Understanding, 112(1):39–54, 2008. 39, 40 [250] C. Pralet, G. Verfaillie, and T. Schiex. An algebraic graphical model for decision with uncertainties, feasibilities, and utilities. J. Artif. Intell. Res.(JAIR), 29:421–489, 2007. 8 154 APPENDIX . REFERENCES [251] U. N. Raghavan, R. Albert, and S. Kumara. Near linear time algorithm to detect community structures in large-scale networks. Physical Review E, 76(3):036106, 2007. 100 [252] A. Ramezanpour and R. Zecchina. Cavity approach to sphere packing in hamming space. Physical Review E, 85(2):021106, 2012. 95 [253] S. Ravanbakhsh and R. Greiner. Perturbed message passing for constraint satisfaction problems. JMLR, to appear, 2014. 4 [254] S. Ravanbakhsh, R. Greiner, and J. Y. Chun-nam. A generalized loop correction method for approximate inference in graphical models. In Proceedings of the 29th International Conference on Machine Learning (ICML-12), pages 543–550, 2012. 4, 50, 55 [255] S. Ravanbakhsh, P. Liu, R. Mandal, J. R. Grant, M. Wilson, R. Eisner, I. Sinelnikov, X. Hu, C. Luchinat, R. Greiner, et al. Accurate, fully-automated nmr spectral profiling for metabolomics. arXiv preprint arXiv:1409.1456, 2014. 1 [256] S. Ravanbakhsh, R. Rabbany, and R. Greiner. Revisiting algebra and complexity of inference in graphical models. arXiv:1409.7410, 2014. 4 [257] S. Ravanbakhsh, R. Rabbany, and R. Greiner. Augmentative message passing for traveling salesman problem and graph partitioning. NIPS, 2014. 4 [258] S. Ravanbakhsh, C. Srinivasa, B. Frey, and R. Greiner. Min-max problems on factor-graphs. Proceedings of T 31st International Conference on Machine Learning, pp. 1035-1043, 2014. 4, 17 [259] J. Reichardt and S. Bornholdt. Detecting fuzzy community structures in complex networks with a potts model. Physical Review Letters, 93(21):218701, 2004. 106, 111 [260] G. Reinelt. Tspliba traveling salesman problem library. ORSA journal on computing, 3(4):376–384, 1991. 118 [261] F. Ricci-Tersenghi and G. Semerjian. On the cavity method for decimated random constraint satisfaction problems and the analysis of belief propagation guided decimation algorithms. arXiv:0904.3395, Apr. 2009. J Stat. Mech. P09001 (2009). 81 [262] T. Rizzo, B. Wemmenhove, and H. J. Kappen. On Cavity Approximations for Graphical Models. Physical Review E, 76(1):1–9, 2006. 50 [263] C. P. Robert and G. Casella. Monte Carlo Statistical Methods (Springer Texts in Statistics). Springer-Verlag New York, Inc., Secaucus, NJ, USA, 2005. 66 [264] H. Rogers. Theory of recursive functions and effective computability. 1987. 13 [265] P. Ronhovde and Z. Nussinov. Local resolution-limit-free potts model for community detection. Physical Review E, 81(4):046114, 2010. 106 [266] M. Rosvall and C. T. Bergstrom. Maps of random walks on complex networks reveal community structure. PNAS, 2008. 100 155 [267] D. Roth. On the hardness of approximate reasoning. In Proceedings of the 13th international joint conference on Artifical intelligence-Volume 1, pages 613–618. Morgan Kaufmann Publishers Inc., 1993. 2, 17 [268] S. Roth and M. J. Black. Fields of Experts. International Journal of Computer Vision, 82(2):205–229, 2009. 40 [269] C. Rother and P. Kohli. Minimizing sparse higher order energy functions of discrete variables. IEEE Conference on Computer Vision and Pattern Recognition (2009), 0:1382–1389, 2009. 39 [270] O. Roussel and C. Lecoutre. Xml representation of constraint networks: Format xcsp 2.1. arXiv preprint arXiv:0902.2362, 2009. 78 [271] N. Ruozzi and S. Tatikonda. Message-passing algorithms: Reparameterizations and splittings. Information Theory, IEEE Transactions on, 59(9):5860–5881, 2013. 46 [272] A. Saade, F. Krzakala, and L. Zdeborová. Spectral clustering of graphs with the bethe hessian. arXiv preprint arXiv:1406.1880, 2014. 131 [273] S. Sanghavi. Equivalence of lp relaxation and max-product for weighted matching in general graphs. In Information Theory Workshop, 2007. ITW’07. IEEE, pages 242–247. IEEE, 2007. 115 [274] S. Sanghavi, D. Shah, and A. S. Willsky. Message passing for max-weight independent set. In Advances in Neural Information Processing Systems, pages 1281–1288, 2007. 25, 99 [275] T. Schiex, H. Fargier, and G. Verfaillie. Valued constraint satisfaction problems: hard and easy problems. In Proceedings of the 14th international joint conference on Artificial intelligence-Volume 1, pages 631–637. Morgan Kaufmann Publishers Inc., 1995. 8 [276] A. Schrijver. Min-max results in combinatorial optimization. Springer, 1983. 28 [277] B. Selman, H. A. Kautz, and B. Cohen. Noise strategies for improving local search. In AAAI, volume 94, pages 337–343, 1994. 79, 80 [278] P. P. Shenoy. Valuation-based systems: A framework for managing uncertainty in expert systems. In Fuzzy logic for the management of uncertainty, pages 83–104. John Wiley & Sons, Inc., 1992. 8 [279] P. P. Shenoy and G. Shafer. Axioms for probability and belief-function propagation. In Uncertainty in Artificial Intelligence, 1990. 2 [280] D. Sherrington and S. Kirkpatrick. Solvable model of a spin-glass. Physical review letters, 35(26):1792, 1975. 13 [281] S. E. Shimony. Finding maps for belief networks is np-hard. Artificial Intelligence, 68(2):399–410, 1994. 17 [282] L. Song, A. Gretton, and C. Guestrin. Nonparametric Tree Graphical Models. AISTATS 13, pages 765–772, 2010. 68 [283] L. Song, A. Gretton, D. Bickson, Y. Low, and C. Guestrin. Kernel Belief Propagation. Artificial Intelligence, 15(m):11–13, 2011. 68 156 APPENDIX . REFERENCES [284] D. Sontag and T. S. Jaakkola. New outer bounds on the marginal polytope. In Advances in Neural Information Processing Systems, pages 1393–1400, 2007. 42 [285] D. Sontag, T. Meltzer, A. Globerson, T. S. Jaakkola, and Y. Weiss. Tightening lp relaxations for map using message passing. arXiv preprint arXiv:1206.3288, 2012. 46 [286] D. A. Sontag. Cutting plane algorithms for variational inference in graphical models. PhD thesis, Massachusetts Institute of Technology, 2007. 42 [287] K. Steiglitz and C. H. Papadimitriou. Combinatorial optimization: Algorithms and complexity. PrinticeHall, New Jersey, 1982. 1 [288] L. J. Stockmeyer. The polynomial-time hierarchy. Theoretical Computer Science, 3(1):1–22, 1976. 13 [289] J. X. J. W. P. Tan and L. Quan. Joint affinity propagation for multiple view segmentation. 102 [290] R. M. Tanner. A recursive approach to low complexity codes. Information Theory, IEEE Transactions on, 27(5):533–547, 1981. 1 [291] D. Tarlow, I. E. Givoni, and R. S. Zemel. Hop-map: Efficient message passing with high order potentials. In International Conference on Artificial Intelligence and Statistics, pages 812–819, 2010. 39 [292] D. Tarlow, K. Swersky, R. S. Zemel, R. P. Adams, and B. J. Frey. Fast exact inference for recursive cardinality models. arXiv preprint arXiv:1210.4899, 2012. 39, 40 [293] Y. W. Teh and M. Welling. The unified propagation and scaling algorithm. Advances in Neural Information Processing {. . . }, 2002. 46 [294] S. Thrun. Particle filters in robotics. In Proceedings of the Eighteenth conference on Uncertainty in artificial intelligence, pages 511–518. Morgan Kaufmann Publishers Inc., 2002. 1 [295] L. Tierney. Markov chains for exploring posterior distributions. Annals of Statistics, 22(4):1701–1728, 1994. 67 [296] S. Toda. Pp is as hard as the polynomial-time hierarchy. SIAM Journal on Computing, 20(5):865–877, 1991. 20 [297] L. G. Valiant. The complexity of computing the permanent. Theoretical computer science, 8(2):189–201, 1979. 18, 112 [298] L. G. Valiant and V. V. Vazirani. Np is as easy as detecting unique solutions. Theoretical Computer Science, 47:85–93, 1986. 24 [299] U. Von Luxburg. A tutorial on spectral clustering. Statistics and computing, 17(4):395–416, 2007. 131 [300] J. Von Neumann and O. Morgenstern. Theory of Games and Economic Behavior (60th Anniversary Commemorative Edition). Princeton university press, 2007. 39 157 [301] P. O. Vontobel. The bethe permanent of a nonnegative matrix. Information Theory, IEEE Transactions on, 59(3):1866–1901, 2013. 113 [302] K. W. Wagner. The complexity of combinatorial problems with succinct input representation. Acta Informatica, 23(3):325–356, 1986. 13 [303] M. J. Wainwright and M. I. Jordan. Graphical Models, Exponential Families, and Variational Inference. Foundations and Trends in Machine Learning, 1(12):1–305, 2007. 1, 43 [304] M. J. Wainwright, T. S. Jaakkola, and A. S. Willsky. A New Class of Upper Bounds on the Log Partition Function. IEEE Transactions on Information Theory, 51(7):2313–2335, July 2005. 46 [305] M. J. Wainwright, T. S. Jaakkola, and A. S. Willsky. MAP Estimation Via Agreement on Trees: MessagePassing and Linear Programming. IEEE Transactions on Information Theory, 51(11):3697–3717, Nov. 2005. 46 [306] C. Wang, J. Lai, and W. Zheng. Message-passing for the traveling salesman problem. 121 [307] S. Wasserman. Social network analysis: Methods and applications, volume 8. Cambridge university press, 1994. 1 [308] Y. Watanabe and M. Chertkov. Belief propagation and loop calculus for the permanent of a non-negative matrix. Journal of Physics A: Mathematical and Theoretical, 43(24):242002, 2010. 113 [309] M. Weigt and H. Zhou. Message passing for vertex covers. Physical Review E, 74(4):046110, 2006. 99 [310] Y. Weiss. Correctness of belief propagation in Gaussian graphical models of arbitrary topology. Neural computation, (June), 2001. 36 [311] Y. Weiss, C. Yanover, and T. Meltzer. MAP Estimation, Linear Programming and Belief Propagation with Convex Free Energies. Uncertainty in Artificial Intelligence, pages 416–425, 2007. 46 [312] A. Weller and T. Jebara. Clamping variables and approximate inference. In Advances in Neural Information Processing Systems, pages 909–917, 2014. 49 [313] A. Weller and T. S. Jebara. On map inference by mwss on perfect graphs. arXiv preprint arXiv:1309.6872, 2013. 36 [314] M. Welling. On the choice of regions for generalized belief propagation. In Proceedings of the 20th conference on Uncertainty in {. . . }, 2004. 49 [315] M. Welling. A Cluster-Cumulant Expansion at the Fixed Points of Belief Propagation. UAI, (x), 2012. 50 [316] M. Welling, M. Rosen-Zvi, and G. E. Hinton. Exponential family harmoniums with an application to information retrieval. In Advances in neural information processing systems, pages 1481–1488, 2004. 1 [317] M. Welling, T. Minka, and Y. Teh. Structured Region Graphs: Morphing EP into GBP. UAI 2005, (1998): 609–616, 2005. 49 158 APPENDIX . REFERENCES [318] S. White and P. Smyth. A spectral clustering approach to finding communities in graph. In SDM. SIAM, 2005. 100 [319] W. Wiegerinck, T. Heskes, et al. Fractional belief propagation. Advances in Neural Information Processing Systems, pages 455–462, 2003. 46 [320] J.-Q. Xiao and H. Zhou. Partition function loop series for a general graphical model: free energy corrections and message-passing equations. Journal of Physics A: Mathematical and Theoretical, 44(42):12, 2011. 50 [321] Y. Xiao, M. Xiong, W. Wang, and H. Wang. Emergence of symmetry in complex networks. Physical Review E, 77(6):066108, 2008. 124 [322] X. Xu, N. Yuruk, Z. Feng, and T. A. Schweiger. Scan: a structural clustering algorithm for networks. In SIGKDD, 2007. 100 [323] C. Yanover and Y. Weiss. Approximate inference and protein-folding. In Advances in neural information processing systems, pages 1457–1464, 2002. 1 [324] C. Yanover, T. Meltzer, and Y. Weiss. Linear Programming Relaxations and Belief Propagation - an Empirical Study. Journal of Machine Learning Research, 7:1887–1907, 2006. 46 [325] C. Yanover, T. Meltzer, and Y. Weiss. Linear programming relaxations and belief propagation–an empirical study. JMLR, 2006. 42 [326] J. Yedidia and W. Freeman. Generalized belief propagation. Advances in neural information, 2001. 2 [327] J. Yedidia, W. Freeman, and Y. Weiss. Constructing Free-Energy Approximations and Generalized Belief Propagation Algorithms. IEEE Transactions on Information Theory, 51(7):2282–2312, 2005. 45, 49 [328] J. S. Yedidia, W. T. Freeman, and Y. Weiss. Characterization of belief propagation and its generalizations. ITIEEE, 51(TR-2001-15):1–16, 2001. 45, 48, 49 [329] A. L. Yuille. CCCP algorithms to minimize the Bethe and Kikuchi free energies: convergent alternatives to belief propagation. Neural Computation, 14(7):1691–1722, 2002. 46 [330] L. Zdeborova and F. Krzakala. Phase transitions in the coloring of random graphs. Physical Review E, 76 (3):031131, Sept. 2007. 87 [331] L. Zdeborová and M. Mézard. The number of matchings in random graphs. Journal of Statistical Mechanics: Theory and Experiment, 2006(05):P05003, 2006. 114 [332] P. Zhang and C. Moore. Scalable detection of statistically significant communities and hierarchies: messagepassing for modularity. arXiv preprint arXiv:1403.5787, 2014. 106 [333] H. Zhou. Vertex cover problem studied by cavity method: Analytics and population dynamics. The European Physical Journal B-Condensed Matter and Complex Systems, 32(2):265–270, 2003. 99 [334] H. Zhou, C. Wang, J.-Q. Xiao, and Z. Bi. Partition function expansion on region graphs and messagepassing equations. Journal of Statistical Mechanics: Theory and Experiment, 2011(12):L12001, Dec. 2011. 50 Appendix 160 APPENDIX . REFERENCES input : Graph G = (V, E) with normalized (weighted)adjacency A, maximum iterations Tmax , damping λ, threshold max . output: A clustering C = {C1 , . . . , CK } of nodes. construct the null model b pi:j ← 0 ∀(i, j) ∈ E ∪ E null while true do // the augmentation loop  ← 0, T ← 0 while  < max and T < Tmax do // BP loop ←0 for (i, j) ∈ E ∪ E null do b p0i:j ← b pi:j b pi:j ← (Ai,j − Anull i,j ) for I ∈ ∂i : j do // update beliefs calculate b pI→i:j using equation (4.7) b pi:j ← b pi:j + b pI→i:j end  ← max{, |b pi:j − b p0i:j |} for I ∈ ∂i : j do // update msgs. e pi:j→I ← b pi:j − b pI→i:j b pi:j→I ← λe pi:j→I + (1 − λ)b pi:j→I end end T ←T +1 end for i ∈ V do for (i, j), (i, k) ∈ E ∪ E null do if b pi:j > 0 and b pi:k > 0 and b pi:k ≤ 0 then add the corresponding clique factor to the factor-graph end end if no factor was added then break out of the loop else b pi:j→I ← 0 ∀I, i : j ∈ I end C ← ConnectedComponents((V, {(i, j) ∈ E ∪ E null | b pi:j > 0})) Algorithm 3: Message Passing for Modularity Maximization. 161 input : Graph G = (V, E), weighted (symmetric) adjacency matrix A, maximum iterations Tmax , damping λ, threshold max . output: A subset T ⊂ E of the edges in the tour. construct the initial factor-graph initialize the messages for degree constraints b pi:j→E(i,·) ← 0∀i ∈ V, j ∈ E(i, ·) initialize b pi:j ← Ai,j ∀(i, j) ∈ E while true do // the augmentation loop  ← 0, T ← 0 while  < max and T < Tmax do // BP loop ←0 for each fI do // including from this factor) fE(S,·) , fE(i,·) (updates all the outgoing messages find three lowest values in {b pi:j→I | i : j ∈ ∂I} for each i : j ∈ I do calculate e pI→i:j using equation (5.7) I→i:j ← e pI→i:j − b pI→i:j b pI→i:j ← b pI→i:j + λI→i:j b pi:j ← b pi:j + I→i:j  ← max(, |I→e |) end end T ←T +1 end T ← {(i, j) ∈ E | b pi:j > 0} // respecting degree constraints. C ← ConnectedComponents((V, T )) if |C| = 1 then return T else augment the factor-graph with fE(S,·) ∀S ∈ C initialize b pE(S,·)→i:j ← 0 ∀S ∈ C, i : j ∈ E(S, ·) end Algorithm 4: Message Passing for TSP
0math.AC
Concentration behavior of the penalized least squares estimator arXiv:1511.08698v2 [math.ST] 19 Oct 2016 Penalized least squares behavior Alan Muro and Sara van de Geer {muro,geer}@stat.math.ethz.ch Seminar für Statistik, ETH Zürich Rämistrasse 101, 8092 Zürich Abstract Consider the standard nonparametric regression model and take as estimator the penalized least squares function. In this article, we study the trade-off between closeness to the true function and complexity penalization of the estimator, where complexity is described by a seminorm on a class of functions. First, we present an exponential concentration inequality revealing the concentration behavior of the trade-off of the penalized least squares estimator around a nonrandom quantity, where such quantity depends on the problem under consideration. Then, under some conditions and for the proper choice of the tuning parameter, we obtain bounds for this nonrandom quantity. We illustrate our results with some examples that include the smoothing splines estimator. Keywords: Concentration inequalities, regularized least squares, statistical trade-off. 1 Introduction Let Y1 , ..., Yn be independent real-valued response variables satisfying Yi = f 0 (xi ) + i , i = 1, ..., n, where x1 , ..., xn are given covariates in some space X , f 0 is an unknown function in a given space F, and 1 , ..., n are independent standard Gaussian random variables. We assume that f 0 is “smooth” in some sense but that this degree of smoothness is unknown. We will make this clear below. 1 To estimate f 0 , we consider the penalized least squares estimator given by  fˆ := arg min ||Y − f ||2n + λ2 I 2 (f ) , (1) f ∈F where λ > 0 is a tuning parameter and I a given seminorm on F. Here, for a vector u ∈ Rn , we write ||u||2n := uT u/n, and we apply the same notation f for the vector f = (f (x1 ), ..., f (xn ))T and the function f ∈ F. Moreover, to avoid digressions from our main arguments, we assume that expression (1) exists and is unique. For a function f ∈ F, define τ 2 (f ) := ||f − f 0 ||2n + λ2 I 2 (f ). (2) This expression can be seen as a description of the trade-off of f . The term ||f − f 0 ||n measures the closeness of f to the true function, while I(f ) quantifies its “smoothness”. As mentioned above, we only assume that f 0 is not too complex, but that this degree of complexity is not known. This accounts for assuming that I(f 0 ) < ∞, but that an upper bound for I(f 0 ) is unknown. Therefore, we choose as model class F = {f : I(f ) < ∞}. It is important to see that taking as model class F0 = {f : I(f ) ≤ M0 }, for some fixed M0 > 0, instead of F could lead to a model misspecification error if the unknown smoothness of f 0 is large. Estimators with roughness penalization have been widely studied. Wahba (1990) and Green and Silverman (1993) consider the smoothing estimator, which correR 1 (m) splines 2 2 sponds to the solution of (1) when I (f ) = 0 |f (x)| dx, where f (m) denotes the m-th derivative of f . Gu (2002) provides results for the more general penalized likelihood estimator with a general quadratic functional as complexity regularization. If we assume that this functional is a seminorm and that the noise follows a Gaussian distribution, then the penalized likelihood estimator reduces to the estimator in (1). Upper bounds for the estimation error can be found in the literature (see e.g. van der Vaart and Wellner (1996), del Barrio et al. (2007)). When no complexity regularization term is included, the standard method used to derive these is roughly as follows: first, the basic inequality ! n X 2 ||fˆ − f 0 ||2n ≤ sup i (f (xi ) − f 0 (xi )) (3) n f i=1 is invoked. Then, an inequality for the right hand side of (3) is obtained for functions f in {g ∈ F : ||g − f 0 ||n ≤ R} for some R > 0. Finally, upper bounds for the estimation error are obtained with high probability by using entropy computations. When a penalty term is included, a similar approach can be used, but in this case the process 2 in (3) is studied in terms of both ||f − f 0 ||n and the smoothness of the functions considered, i.e., I(f ) and I(f 0 ). A limitation of the approach mentioned above is that it does not allow us to obtain lower bounds. Consistency results have been proved (e.g. van de Geer and Wegkamp (1996)), but it is not clear how to use these to derive explicit bounds. Chatterjee (2014) proposes a new approach to estimate the exact value of the error of least square estimators under convex constraints. It provides a concentration result for the estimation error by relating it with the expected maxima of a Gaussian process. One can then use this result to get both upper and lower bounds. In van de Geer and Wainwright (2016), a more “direct” argument is employed to show that the error for a more general class of penalized least squares estimators is concentrated around its expectation. Here, the penalty is only assumed to be convex. Moreover, the authors also consider the approach from Chatterjee (2014) to derive a concentration result for the trade-off τ (fˆ) for uniformly bounded function classes under general loss functions. The goal of this paper is to contribute to the study of the “behavior” of τ (fˆ) from a theoretical point of view. We consider the approach from Chatterjee (2014) and extend the ideas to the penalized least squares estimator with penalty based on a squared seminorm without making assumptions on the function space. We present a concentration inequality showing that τ (fˆ) is concentrated around a nonrandom quantity R0 (defined below) in the nonparametric regime. Here, R0 depends on the sample size and the problem under consideration. Then, we derive upper and lower bounds for R0 in Theorem 2. These are obtained for the proper choice of λ and two additional conditions, including an entropy assumption. Combining this result with Theorem 1, one can obtain both upper and lower bounds for τ (fˆ) with high probability for a sufficiently large sample size. We illustrate our results with some examples in section 2.2 and observe that we are able to recover optimal rates of convergence for the estimation error from the literature. We now introduce further notation that will be used in the following sections. Denote the minimum of τ over F by Rmin := min τ (f ), f ∈F and let this minimum be attained by fmin . Note that fmin can be seen as the unknown noiseless counterpart of fˆ and that Rmin is a nonrandom unknown quantity. For two vectors u, v ∈ Rn , let hu, vi denote the usual inner product. For R ≥ Rmin and λ > 0, define F(R) := {f ∈ F : τ (f ) ≤ R} , and 3 Mn (R) := sup h, f − f 0 i/n. f ∈F (R) Additionally, we write M (R) := EMn (R), Hn (R) := Mn (R) − R2 , 2 H(R) := EHn (R). Moreover, define the random quantity R∗ := arg max Hn (R), R≥Rmin and the nonrandom quantity R0 := arg max H(R). R≥Rmin From Lemma 1, it will follow that R∗ and R0 are unique. For ease of exposition, we will use the following asymptotic notation throughout this ∞ paper: for two positive sequences {xn }∞ n=1 and {yn }n=1 , we write xn = O(yn ) if lim sup |xn /yn | < ∞ as n → ∞ and xn = o(yn ) if xn /yn → 0 as n → ∞. Moreover, we employ the notation xn  yn if xn = O(yn ) and yn = O(xn ). In addition, we make use of the stochastic order symbols OP and oP . It is important to note that the quantities λ, τ (fˆ), τ (f 0 ), Rmin , M (R), H(R), R∗ , and R0 depend on the sample size n. However, we omit this dependence in the notation to simplify the exposition. 1.1 Organization of the paper First, in section 2.1, we present the main results: Theorems 1 and 2. Note that the former does not require further assumptions than those from section 1, while the latter needs two extra conditions, which will be introduced after stating Theorem 1. Then, in section 2.2, we illustrate the theory with some examples and, in section 2.3, we present some concluding remarks. Finally, in section 3, we present all the proofs. We deferred to the appendix results from the literature used in this last section. 2 2.1 Behavior of τ (fˆ) Main results The first theorem provides a concentration probability inequality for τ (fˆ) around R0 . It can be seen as an extension of Theorem 1.1 from Chatterjee (2014) to the penalized least squares estimator with a squared seminorm on F in the penalty term. 4 Theorem 1. For all λ > 0 and x > 0, we have !  4 √  ˆ τ (f ) x ( nR0 )2 P − 1 ≥ x ≤ 3 exp − . R0 32(1 + x)2 √ Asymptotics. If R0 satisfies 1/( nR0 ) = o(1), then τ (fˆ) − 1 = oP (1). R0 Therefore, the random fluctuations of τ (fˆ) around R0 are of negligible size in comparison with R0 . Moreover, this asymptotic result implies that the asymptotic distribution of τ (fˆ)/R0 is degenerate. In Theorem 2, we will provide bounds for R0 under some additional conditions and observe that R0 satisfies the condition from above. Remark 1. Note that we only consider a square seminorm in the penalty term. A generalization of our results to penalties of the form I q (·), q ≥ 2, is straightforward but omitted for simplicity. The case q < 2 is not considered in our study since our method of proof requires that the square root of the penalty term is convex, as can be observed in the proof of Lemma 1. Before stating the first condition required in Theorem 2, we will introduce the following definition: let S be some subset of a metric space (S, d). For δ > 0, the δ-covering number N (δ, S, d) of S is the smallest value of N such that there exist s1 , ..., sN in S such that min d(s, sj ) ≤ δ, ∀ s ∈ S. j=1,...,N Moreover, for δ >0, the δ-packing number ND (δ, S, d) of S is the largest value of N such that there exist s1 , ..., sN in S with d(sk , sj ) > δ, ∀k 6= j. Condition 1. Let α ∈ (0, 2). For all λ > 0 and R ≥ Rmin , we have α   R/λ , u > 0, log N (u, F(R), || · ||n ) = O u and for some c0 ∈ (0, 2], 1 = O ((c0 λ)α ) . log N (c0 R, F(R), || · ||n ) 5 Condition 1 can be seen as a description of the richness of F(R). We refer the reader to Kolmogorov and Tihomirov (1959) and Birman and Solomjak (1967) for an extensive study on entropy bounds, and to van der Vaart and Wellner (1996) and van de Geer (2000) for their application in empirical process theory. Condition 2. Rmin  τ (f 0 ). Condition 2 relates the roughness penalty of f 0 with the minimum trade-off achieved by functions in F. It implies that our choice of the penalty term is appropriate. In other words, I(fmin ) and I(f 0 ) are not “too far away” from each other when the tuning parameter is chosen properly. Therefore, aiming to mimic the trade-off of fmin points us in the right direction as we would like to estimate f 0 . The following result provides upper and lower bounds for R0 . Note that I(f 0 ) is permitted to depend on the sample size. We assume that I(f 0 ) remains upper bounded and bounded away from zero as the sample size increases. However, we allow these bounds to be unknown. Theorem 2. Assume Conditions 1 and 2, and that I(f 0 )  1. For 1 λ  n− 2+α suitably chosen depending on α, one has 1 R0  n− 2+α . Therefore, we obtain 1 τ (fˆ)  n− 2+α     α α 0 2+α 00 2+α with probability at least 1 − 3 exp −c n − 3 exp −c n , where c0 , c00 denote some positive constants not depending on the sample size. Theorem 2 shows that one can obtain √ bounds for R0 if we choose the tuning parameter properly. Since the condition 1/( nR0 ) = o(1) is satisfied, one obtains then convergence in probability of the ratio τ (fˆ)/R0 to a constant. Moreover, the theorem also provides bounds for the trade-off of fˆ. Note that these hold with probability tending to one. Remark 2. From Theorem 2, one obtains   ||fˆ − f 0 ||2n + λ2 I 2 (fˆ)  min ||f − f 0 ||2n + λ2 I 2 (f ) f ∈F 6 with high probability for a sufficiently large sample size. One can then say that the trade-off of fˆ mimics that of its noiseless counterpart fmin , i.e., fˆ behaves as if there were no noise in our observations. Therefore, our choice of λ allows us to control the random part of the problem using the penalty term and “over-rule” the variance of the noise. Remark 3. From Theorem 2, one can observe that 1 ||fˆ − f 0 ||n = OP (n− 2+α ), I(fˆ) = OP (1). Therefore, we are able to recover the rate of convergence for the estimation error of fˆ. This will be illustrated in section 2.2. Furthermore, we observe that the degree of smoothness of fˆ is bounded in probability. Although we have a lower bound for τ (fˆ), this does neither imply (directly) a lower bound for ||fˆ − f 0 ||n , nor for I(fˆ). 2.2 Examples In the following, we require that the assumptions in Theorem 2 hold. In each example, we provide references to results from the literature where one can verify that Condition 1 is satisfied and refer the interested reader to these for further details. For the lower bounds, one may first note that N (u, F(R), || · ||n )     R R 0 , || · ||n ≥ N u, f ∈ F : ||f − f ||n ≤ √ , I(f ) ≤ √ 2 2λ and additionally insert the results from Yang and Barron (1999), where the authors show that often global and local entropies are of the same order for some f 0 . R1 Example 1. Let X = [0, 1] and I 2 (f ) = 0 |f (m) (x)|2 dx for some m ∈ {2, 3, ...}. Then fˆ is the smoothing spline estimator and can be explicitly computed (e.g. Green and Silverman (1993)). Moreover, it can be shown that in this case Condition 1 holds with α = 1/m under some conditions on the design matrix (Kolmogorov and Tihomirov (1959) and Example 2.1 in van de mGeer (1990)). Therefore from Theorem 2, we have that the standard choice λ  n− 2m+1 yields m R0  n− 2m+1 . Moreover, we obtain upper and lower bounds for τ (fˆ) with high probability for large n. Then by Remark 3, we recover the optimal rate of convergence for ||fˆ−f 0 ||n (Stone (1982)). 7 Now we consider the case where the design points have a larger dimension. Let X = [0, 1]d with d ≥ 2 and define the d-dimensional P index r = (r1 , ..., rd ), where the values ri are non-negative integers. We write |r| = di=1 ri . Furthermore, denote by Dr the differential operator defined by Dr f (x) = ∂ |r| f (x1 , ..., xd ) ∂xr11 · · · ∂xrdd and consider as roughness penalization 2 I (f ) = XZ |Dr f (x)|2 dx, |r|=m with m > d/2. In this case, Condition 1 holds with α = d/m (Birman and Solomjak m − 2m+d we obtain (1967)) Then by Theorem 2, we have that for the choice λ  n m R0  n− 2m+d . Similarly as above, we are able to recover the optimal rate for the estimation error. Example 2. In this example, define the total variation penalty as T V (f ) = n X |f (xi ) − f (xi−1 )|, i=2 where x1 , ..., xn denote the design points. Let X be real-valued and I 2 (f ) = (T V (f ))2 . In this case, Condition 1 is fulfilled for α = 1 (Birman and Solomjak (1967)). The advantage of the total variation penalty over that from Example 1 is that it can be used for unbounded X . 1 Let α = 1 in Theorem 2. For the choice λ  n− 3 , we have 1 R 0  n− 3 , and we also obtain bounds for τ (fˆ) with high probability for large n. By Remark 3, we also recover the optimal upper bound for the estimation error. 2.3 Conclusions Theorem 1 derives a concentration result for τ (fˆ) around a nonrandom quantity rather than just an upper bound. In particular, we√observe that the ratio τ (fˆ)/R0 convergences in probability to 1 if R0 satisfies 1/( nR0 ) = o(1). This condition holds in the nonparametric setting for λ suitably chosen and I(f 0 )  1, as shown in Theorem 2 and in our examples from section 2.2. 8 The strict concavity of H and Hn (Lemma 1) plays an important role in the derivation of both theorems. In our work, the proof of this property requires that the square root of the penalty term is convex. Furthermore, the proof of both Theorems 1 and 2 rely on the fact that the noise vector is Gaussian. This can be seen in Lemma 6, where we invoke a concentration result for functions of independent Gaussian random variables, and in Lemma 4, where we employ a lower bound for the expected value of the supremum of Gaussian processes to bound the function H. 3 Proofs This section is divided in two parts. In section 3.1, we first state and prove the lemmas necessary to prove Theorem 1. These follow closely the proof of Theorem 1.1 from Chatterjee (2014), however, here we include a roughness penalization term for functions in F. At the end of this section, we combine these lemmas to prove the first theorem. In section 3.2, we first prove an additional result necessary to establish Theorem 2. After this, we present the proof of the second theorem. Some results from the literature used in our proofs are deferred to the appendix. 3.1 Proof of Theorem 1 Lemma 1. For all λ > 0, Hn (·) and H(·) are strictly concave functions. Proof. Let λ > 0. Take any two values rs , rb such that Rmin ≤ rs ≤ rb and define Fs,b := {ft = tvs + (1 − t)vb | t ∈ [0, 1], vs ∈ F(rs ), vb ∈ F(rb )}. Take vt ∈ Fs,b and let r = trs + (1 − t)rb . By properties of a seminorm, we have that I(vt ) < ∞, which implies that vt ∈ F. Moreover, we have that p ||vt − f 0 ||2n + λ2 I 2 (vt ) p p ≤ t ||vs − f 0 ||2n + λ2 I 2 (vs ) + (1 − t) ||vb − f 0 ||2n + λ2 I 2 (vb ) ≤ tτ (vs ) + (1 − t)τ (vb ) ≤ trs + (1 − t)rb , p where the first inequality uses the fact that the square root of the penalty term λ2 I 2 (·) is convex. Therefore, vt ∈ F(r). Using these equations, we have τ (vt ) = Mn (r) = sup h, f − f 0 i/n ≥ sup h, f − f 0 i/n f ∈F (r) f ∈Fs,b = sup h, tvs + (1 − t)vb − f 0 i/n vs ,vb ∈F τ (vs )≤rs τ (vb )≤rb = tMn (rs ) + (1 − t)Mn (rb ). 9 (4) Therefore, Mn is concave for all λ > 0. Taking expected value in the equations in (4) 2 yields that M is concave for all λ > 0. Since g(r) := − r2 is strictly concave, then Hn and H are strictly concaves and we have our result. Lemma 2. For all λ > 0, we have that τ (fˆ) = R∗ . Proof. Let f ∗ ∈ F(R∗ ) be such that h, f ∗ − f 0 i/n = sup h, f − f 0 i/n. f ∈F (R∗ ) We will show first that τ (f ∗ ) = R∗ . Suppose τ (f ∗ ) = R̃ for some Rmin ≤ R̃ < R∗ . Note that then Mn (R̃) = Mn (R∗ ), and therefore, we have ! R∗ R̃ Hn (R̃) = Hn (R∗ ) + − > Hn (R∗ ), 2 2 which is a contradiction by definition of R∗ . We must then have that τ (f ∗ ) = R∗ . Now we will prove that τ (fˆ) = τ (f ∗ ). For all λ > 0 and for all f ∈ F, we have ||Y − f ||2n + λ2 I 2 (f ) ( (5) = ||Y − f 0 ||2n − 2 h, f − f 0 i/n − 1 ||f − f 0 ||2n + λ2 I 2 (f ) 2 !) p ≥ ||Y − f 0 ||2n − 2Hn ( ||f − f 0 ||2n + λ2 I 2 (f )) ≥ ||Y − f ∗ ||2n + λ2 I 2 (f ∗ ). In consequence, by definition of fˆ and the inequalities in (5), both fˆ and f ∗ minimize ||Y − f ||2n + λ2 I 2 (f ). and by uniqueness, it follows that τ (fˆ) = τ (f ∗ ). Lemma 3. For x > 0, define s1 := R0 − x, s2 := R0 + x, z := H(R0 ) − x2 /4. Moreover, define the event e = {{Hn (s1 ) < z} ∧ {Hn (s2 ) < z} ∧ {Hn (R0 ) > z}}. We have   n x4 c P (e ) ≤ 3 exp − . 32(R0 + x)2 10 Proof. From the proof of Theorem 1.1 in Chatterjee (2014), one can easily observe that for all λ > 0 and any R we have H(R0 ) − H(R) ≥ (R − R0 )2 . 2 Applying the inequality above to R = s1 and R = s2 , we have that H(si ) + x2 x2 ≤ H(R0 ) − , 4 4 i = 1, 2. By Lemma 6, we have   4 x2 − nx P (Hn (R0 ) ≤ z) = P Hn (R0 ) ≤ H(R0 ) − ≤ e 32(R0 )2 . 4 Therefore, using again Lemma 6 yields   4 x2 − nx ≤ e 32(s1 )2 , P (Hn (s1 ) ≥ z) ≤ P Hn (s1 ) ≥ H(s1 ) + 4 and   4 x2 − nx P (Hn (s2 ) ≥ z) ≤ P Hn (s2 ) ≥ H(s2 ) + ≤ e 32(s2 )2 . 4 By the equations above, we obtain − P (ec ) = P (Hn (s1 ) ≥ z) + P (Hn (s2 ) ≥ z) + P (Hn (R0 ) ≤ z) ≤ 3e n x4 32(s2 )2 . Now we are ready to prove Theorem 1. Proof of Theorem 1. Let λ > 0. First, we note that H is equal to −∞ when R tends to infinity or R < Rmin . Then, by Lemma 1, we know that R0 is unique. For x > 0, define the event e := {{Hn (s1 ) < z} ∧ {Hn (s2 ) < z} ∧ {Hn (R0 ) > z}} , where s1 = R0 − x, s2 = R0 + x, and z = H(R0 ) − x2 /4. Therefore, we have that s1 < R0 < s2 by construction. Moreover, we know that Hn (R∗ ) ≥ Hn (R0 ) by definition of R∗ . Since Hn is strictly concave by Lemma 1, we must have that, in e, s1 < R∗ < s2 . Combining Lemma 2 with equation (6) yields that, in e, τ (fˆ) x −1 < . R0 R0 11 (6) Therefore, by Lemma 3, and letting y = x/R0 , we have !    4 √  τ (fˆ) n y 4 R02 y ( nR0 )2 P − 1 ≥ y ≤ 3 exp − ≤ 3 exp − . R0 32(1 + y)2 32(1 + y)2 3.2 Proof of Theorem 2 For proving Theorem 2, we will need the following result. This lemma gives us bounds for the unknown nonrandom quantity H(R). We note that these bounds can be written as parabolas with maximums and maximizers depending on α, n, and λ. Lemma 4. Assume Condition 1 and let α be as stated there. For some constants C ≥ 1/2, 0 < c0 ≤ 2, c2 > c1 > 0 not depending on the sample size and for all λ > 0, we have R ≥ Rmin , g1 (R) < H(R) < g2 (R), where gi (R) = − 21 (R − Ki )2 + Ki2 , 2 i = 1, 2, with 1−α/2 √ 1/2 1 K1 := K1 (n, λ) := , 2 nλα 1/2 √  4C c2 1 . K2 := K2 (n, λ) := 2 − α nλα c0 c1  Proof of Lemma 4. This proof makes use of known results for upper and lower bounds for the expected maxima of random processes, which can be found in the appendix. We will indicate this below. Let λ > 0 and R ≥ Rmin F(R) and 1 , ..., n standard Gaussian random Pn. For f ∈ √ variables, define Xf := i=1 i f (xi )/ n. Take any two functions f, f 0 ∈ F and note that Xf − Xf 0 follows a Gaussian distribution with expected value E[Xf − Xf 0 ] = 0 and variance V ar(Xf − Xf 0 ) = ||f ||2n + ||f 0 ||2n − 2Cov(Xf , Xf 0 ) = ||f − f 0 ||2n . Therefore {Xf : f ∈ F(R)} is a sub-Gaussian process with respect to the metric d(f, f 0 ) = ||f − f 0 ||n on its index set (see Appendix). Note that, if we define the diameter of F(R) as diamn (F(R)) := supx,y∈F (R) ||x − y||n , then it is not difficult to see that diamn (F(R)) ≤ 2R. Now we proceed to obtain bounds for M (R). By Dudley’s entropy bound (see Lemma 7 in Appendix) and Condition 1, for some constants C ≥ 1/2 and c2 , we have 12 1 M (R) = √ E n " # 2R r log N (u, F(R), || · ||n ) du n 0   √ Z C c2 2R R α/2 ≤ √ du uλ n 0 1/2 √  4C c2 1 ≤ R. 2 − α nλα Z sup Xf − Xf 0 ≤ C f ∈F (R) Moreover, by Sudakov lower bound (see Lemma 8 in Appendix) we have r 1 log ND (, F(R), || · ||n ) sup  ≤ M (R). 2 0<≤diamn (F (R)) n For some 0 < c0 ≤ 2, let diamn (F(R)) = c0 R and take  = c0 R in the last equation. By Condition 1, for some constant c1 we have c0 R 2 r r log ND (c0 R, F(R), || · ||n ) c0 R log N (c0 R, F(R), || · ||n ) ≥ n 2 n  1/2 1−α/2 √ c c1 1 ≥ 0 R. 2 nλα Then, by the equations above and the definition of H(R), we have, for all R ≥ Rmin , 1−α/2 √ c0 2 c1  1 nλα 1/2 1/2 √  4C c2 1 R2 R2 < H(R) < . R− R − 2 2 − α nλα 2 Writing Ki R − R2 /2 = − 12 (R − Ki )2 + Ki2 /2 for i = 1, 2 completes the proof. Now, we are ready to prove Theorem 2. Proof of Theorem 2. By Condition 2 and I(f 0 )  1, we know that there exist constants 0 < b1 < b2 not depending on n such that b1 λ ≤ Rmin ≤ b2 λ. Take 1 (7) 1 c0 n− 2+α ≤ λ ≤ c00 n− 2+α (8) 2   2+α 1−α/2 √ c c with c0 , c00 constants satisfying 0 < c0 < c00 ≤ 0 2b2 1 , where α is as in Condition 1, c0 and c1 are as in Lemma 4, and b2 as in equation (7). 13 First, we will derive bounds for R0 . Let g1 and g2 be as in Lemma 4 and recall that g1 (R) < H(R) < g2 (R) for R ≥ Rmin . Note that g1 (R) ≤ K12 /2 for all R ≥ Rmin and that this upper bound is reached at R = K1 . Moreover, we know that the function g2 attain negative values when R < 0 and when R > 2K2 . Then, by strict concavity of H (Lemma 1), if Rmin ≤ K1 , we must have that R0 ≤ 2K2 . Now, combining equation (7) and the choice in (8), we obtain that Rmin ≤ K1 . Therefore, following the rationale from above and substituting equation (8) into the definition of K2 , we have that there exist some constant a2 > 0 such that 1 R0 ≤ a2 n− 2+α (9) Furthermore, combining again equations (7) and (8), and recalling that Rmin ≤ R0 yields that, for some constant a1 > 0, 1 R0 ≥ a1 n− 2+α (10) Joining equations (9) and (10) gives us the first result in our theorem. We proceed to obtain bounds for τ (fˆ). Let A1 , A2 be some constants such that 0 < A1 < a1 < a2 < A2 . We have     1 1 P τ (fˆ) ≤ A1 n− 2+α = P R0 − τ (fˆ) ≥ R0 − A1 n− 2+α   1 − 2+α ˆ ≤ P R0 − τ (f ) ≥ (a1 − A1 )n ! α (a1 − A1 )4 n 2+α ≤ 3 exp − , 32(a2 + a1 − A1 ) where in the first inequality we used equation (10), and in the second, Theorem 1 and equation (9). Similarly, we have  1 P τ (fˆ) ≥ A2 n− 2+α   1 ≤ P τ (fˆ) − R0 ≥ (A2 − a2 )n− 2+α ! α (A2 − a2 )4 n 2+α ≤ 3 exp − , 32A2  where in the first inequality we use equation (9), and in the second, Theorem 1 and again equation (9). Therefore, we have 14   1 1 P A1 n− 2+α ≤ τ (fˆ) ≤ A2 n− 2+α     1 1 − 2+α − 2+α ˆ ˆ = P τ (f ) ≤ A2 n − P τ (f ) ≤ A1 n ! ! α α (a1 − A1 )4 n 2+α (A2 − a2 )4 n 2+α ≥ 1 − 3 exp − − 3 exp − 32(a2 + a1 − A1 ) 32A2 and the second result of the theorem follows. References Birman, M. Š. and M. Z. Solomjak (1967), Piecewise polynomial approximations of functions of classes Wp α , Matematicheskii Sbornik (N.S.) 73 (115), 331–355. Boucheron, S., G. Lugosi, and P. Massart (2013), Concentration inequalities: a nonasymptotic theory of independence, Oxford University Press. Chatterjee, S. (Dec. 2014), A new perspective on least squares under convex constraint, Annals of Statistics 42.6, 2340–2381. del Barrio, E., P. Deheuvels, and S. van de Geer (2007), Lectures on Empirical Processes: theory and statistical applications, EMS series of lectures in mathematics, European Mathematical Society. Green, P. and B. Silverman (1993), Nonparametric regression and generalized linear models: a roughness penalty approach, Chapman & Hall/CRC Monographs on Statistics & Applied Probability, Taylor & Francis. Gu, C. (2002), Smoothing Spline ANOVA Models, IMA Volumes in Mathematics and Its Applications, Springer. Kolmogorov, A. N. and V. M. Tihomirov (1959), ε-entropy and ε-capacity of sets in function spaces, Uspekhi Matematicheskikh Nauk 14.2 (86), 3–86. Koltchinskii, V. (2011), Oracle inequalities in empirical risk minimization and sparse recovery problems: École d’ Eté de Probabilités de Saint-Flour XXXVIII-2008, Ecole d’Eté de Probabilités de Saint-Flour, Springer. Stone, C. J. (Dec. 1982), Optimal Global Rates of Convergence for Nonparametric Regression, Annals of Statistics 10.4, 1040–1053. van de Geer, S. (2000), Empirical Processes in M-Estimation, Cambridge Series in Statistical and Probabilistic Mathematics, Cambridge University Press. van de Geer, S. (June 1990), Estimating a Regression Function, Annals of Statistics 18.2, 907–924. van de Geer, S. and M. J. Wainwright (2016), On concentration for (regularized) empirical risk minimization, preprint, arXiv:1512.00677. van de Geer, S. and M. Wegkamp (Dec. 1996), Consistency for the least squares estimator in nonparametric regression, Annals of Statistics 24.6, 2513–2523. 15 van der Vaart, A. and J. Wellner (1996), Weak convergence and Empirical Processes, Springer Series in Statistics, Springer. Wahba, G. (1990), Spline models for observational data, CBMS-NSF Regional Conference Series in Applied Mathematics, Society for Industrial and Applied Mathematics. Yang, Y. and A. Barron (Oct. 1999), Information-theoretic determination of minimax rates of convergence, Annals of Statistics 27.5, 1564–1599. A Appendix Lemma 5. [Gaussian Concentration Inequality. See, e.g. Boucheron et al. (2013)] Let X = (X1 , ..., Xn ) be a vector of n independent standard Gaussian random variables. Let f : Rn −→ R denote an L-Lipschitz function. Then, for all t > 0, 2 /(2L2 ) P (f (X) − Ef (X) ≥ t) ≤ e−t . The following lemma applies the Gaussian Concentration Inequality from above to show that the quantities Hn and H are close with exponential probability, as exploited by Chatterjee (2014). Lemma 6. For all λ > 0, R ≥ Rmin , and t > 0, we have 2 /(2R2 ) P (|Hn (R) − H(R)| ≥ t) ≤ 2e−n t . Proof. Let λ > 0. In this proof, we will write Mn (R) = Mn (R, ) = sup h, f − f 0 i/n. f ∈F (R) Let u and v be two n-dimensional standard Gaussian random vectors. By properties of the supremum and by Cauchy-Schwarz inequality, we have |Mn (R, u) − Mn (R, v)| = sup hu, f − f 0 i/n − sup hv, f − f 0 i/n f ∈F (R) ≤ sup f ∈F (R) hu, f − f 0 i/n − hv, f − f 0 i/n f ∈F (R) R ≤ sup ||u − v||n ||f − f 0 ||n ≤ √ n f ∈F (R) 16 n X (ui − vi )2 i=1 !1/2 . √ Therefore, Mn (R, ·) is (R/ n) - Lipschitz in its second argument. By the Gaussian Concentration Inequality (Lemma 5), for every t > 0 and every R ≥ Rmin , we have P (Mn (R, ) − M (R, ) ≥ t) ≤ e−n t 2 /(2R2 ) . Now, take −Mn (R, ). Applying again the Gaussian Concentration Inequality yields 2 /(2R2 ) P (Mn (R, ) − M (R, ) ≤ −t) ≤ e−n t . Combining the last two equations yields the result of this lemma. For the next lemma, we will need the following definition: A stochastic process {Xt : t ∈ T } is called sub-Gaussian with respect to the semimetric d on its index set if P (|Xs − Xt | > x) ≤ 2e − x2 2d2 (s,t) for every s, t ∈ T, x > 0. , Lemma 7. [Dudley’s entropy bound. See, e.g. Koltchinskii (2011) ] If {Xt : t ∈ T } is a sub-Gaussian process with respect to d, then the following bounds hold with some numerical constant C > 0: Z D(T ) p log N (, T, d) d E sup Xt ≤ C t∈T 0 and for all t0 ∈ T Z D(T ) E sup |Xt − Xt0 | ≤ C t∈T p log N (, T, d) d 0 where D(T ) = D(T, d) denotes the diameter of the space T . Lemma 8. [Sudakov Lower Bound. See, e.g. Boucheron et al. (2013) ] Let T be a finite set and let (Xt )t∈T be a Gaussian vector with EXt = 0 ∀t. Then, E sup Xt ≥ t∈T p 1 min0 E[(Xt − Xt0 )2 ] log |T |. 2 t6=t Moreover, let d be a pseudo-metric on T defined by d(t, t0 )2 = E[(Xt − Xt0 )2 ]. For all  > 0 smaller than the diameter of T , the lower bound from above can be rewritten as 1 p E sup Xt ≥  log ND (, T, d). 2 t∈T 17
10math.ST
arXiv:1710.07576v1 [math.PR] 20 Oct 2017 A SHORT SURVEY ON BOUNDING THE UNION PROBABILITY USING PARTIAL INFORMATION JUN YANG, FADY ALAJAJI, AND GLEN TAKAHARA Abstract. This is a short survey on existing upper and lower bounds on the probability of the union of a finite number of events using partial information given in terms of the individual or pairwise event probabilities (or their sums). New proofs for some of the existing bounds are provided and new observations regarding the existing Gallot–Kounias bound are given. Contents 1. Introduction 2. Review of Existing Bounds 3. Observations on the GK Bound References 2 5 14 16 Department of Statistical Sciences, University of Toronto, Canada Department of Mathematics and Statistics, Queen’s University, Canada E-mail addresses: [email protected], [email protected], [email protected]. 1 2 A SHORT SURVEY 1. Introduction Consider a finite family of events {A1 , . . . , AN } in a general probability space (Ω, F , P ), where N is a fixed positive integer. Note that there are only finitely many Boolean atoms1 specified by the the probability of the Ai ’s [DC97]. We are interested S in bounding  N finite union of events, i.e., P i=1 Ai , in terms of partial probabilistic event information such as knowing the individual event probabilities, {P (A1 ), . . . , P (AN )}, and the pairwise event probabilities {P (Ai ∩ Aj ), i 6= j}, or (linear) functions of the probabilities of individual and pairwise events. For example, the well-known union upper bound and the Bonferroni inequality [GS96] are respectively given as follows: ! N N [ X (1) P Ai ≤ P (Ai ), i=1 (2) P N [ Ai i=1 ! ≥ N X i=1 P (Ai ) − i=1 X P (Ai ∩ Aj ). i<j We note that the union upper bound (1) is established in terms of only PN i=1 P (Ai ) so that each of the individual event probability P (Ai ) is actually not needed. However, the Bonferroni lower bound (2) is estabP P lished using two terms, N i=1 P (Ai ) and i<j P (Ai ∩ Aj ). Therefore, the union upper bound (1) and the Bonferroni inequality (2) are established based on different partial information on the event probabilities. In order to distinguish the use of different partial information, we assume that a vector θ = (θ1 , . . . , θm ) ∈ Rm represents partial probaS bilistic information about the union N i=1 Ai . Specifically, we assume that for a given integer m ≥ 1, Θ denotes the range of a function of N P (Ai )’s and P (Ai ∩ Aj )’s, ηm : [0, 1]N +( 2 ) → Rm . Then θ equals to the value of the function ηm for given A1 , . . . , AN . For example, (3) θ = (P (A1), P (A2 ), . . . , P (AN )) , or (4) θ= N X i=1 1The P (Ai ), X i<j ! P (Ai ∩ Aj ) . problem can be directly reduced to the finite probability space case. Thus, we will consider finite probability spaces where ω ∈ Ω denotes an elementary outcome instead of an atom. A SHORT SURVEY 3 Then, we can define a lower bound (and similarly an upper bound) SN on P i=1 Ai that is established using the partial information represented by θ as follows.  S N A Definition 1.1. A lower bound of P i=1 i is a function of θ, ℓ(θ), such that ! N [ (5) P Ai ≥ ℓ(θ), i=1 for any set of events {Ai } that the value of ηm for given {Ai } equals to θ. Note that, for given θ, such as θ = (P (A1 ), . . . , P (AN )), there are multiple functions of θ that are lower bounds, for example, ! N [ P Ai ≥ θ1 = P (A1 ), i=1 (6) P N [ Ai ! ≥ Ai ! ≥ max θi = max P (Ai ). i=1 P N [ i=1 P i θi N i = P i P (Ai ) , N i Therefore, we need to define an optimal lower bound in a general class of lower bounds that are functions of θ.  S N Let LΘ denote the set of all lower bounds on P i=1 Ai that are functions of only θ. Definition 1.2. We say that a lower bound ℓ⋆ ∈ LΘ is optimal in LΘ if ℓ⋆ (θ) ≥ ℓ(θ) for all θ ∈ Θ and ℓ ∈ LΘ . Definition 1.3. We say that a lower bound ℓ ∈ LΘ is achievable if for every θ ∈ Θ, ! N [ Ai = ℓ(θ), (7) inf P A1 ,...,AN i=1 where the infimum ranges over all collections {A1 , . . . , AN }, Ai ∈ F , such that {A1 , . . . , AN } is represented by θ. For bounds in LΘ , the following lemma shows that achievability is equivalent to optimality. 4 A SHORT SURVEY Lemma 1.4. A lower bound ℓ⋆ ∈ LΘ is optimal in LΘ if and only if it is achievable. Proof. Suppose that ℓ⋆ is achievable. Let θ ∈ Θ and ǫ > 0 be given, and let ℓ be any lower bound in LΘ . By achievability there exist sets A1 , . . . , AN in F represented by θ such that ! N [ ℓ⋆ (θ) > P Ai − ǫ ≥ ℓ(θ) − ǫ. (8) i=1 Since this holds for any ǫ we have ℓ⋆ (θ) ≥ ℓ(θ). We prove the converse by the contrapositive. Suppose that ℓ⋆ is not achievable. Then there exists θ′ ∈ Θ such that ! N [ inf P (9) Ai > ℓ⋆ (θ′ ), A1 ,...,AN i=1 where the infimum ranges over all collections {A1 , . . . , AN }, Ai ∈ F , such that {A1 , . . . , AN } is represented by θ′ . Define ℓ by  c if θ = θ′ (10) ℓ(θ) = 0 if θ 6= θ′ , where c satisfies (11) inf A1 ,...,AN P N [ i=1 Ai ! > c > ℓ⋆ (θ′ ). Then ℓ ∈ LΘ and is larger than ℓ⋆ at θ′ . Hence, ℓ⋆ is not optimal.  Using Lemma 1.4, we can therefore prove that a lower bound ℓ(θ) is optimal if for any value of θ ∈ Θ, one can constructa collection of SN ∗ = ℓ(θ). The events {A∗i } that is represented by θ and P i=1 Ai optimal upper bound can also be defined similarly (using a supremum in (7)) and proved by achievability. For example, one can easily verify the following by a construction proof of achievability. S  P N i P (Ai ) • P is the optimal lower bound in the class i=1 Ai ≥ N P forθ = (  i P (Ai )). SN ≥ maxi P (Ai ) is the optimal lower bound in the • P i=1 Ai class . . . , P (AN )). Sfor θ =  (P (A1 ), P N • P ≤ min{ i P (Ai ), 1} is the optimal upper bound i=1 Ai P in the classes for both θ = ( i P (Ai )) and θ = (P (A1 ), . . . , P (AN )). A SHORT SURVEY 5 Furthermore, we can prove that a lower bound is not optimal by showing it is not achievable. For example, in order to show that the in the class of Bonferroni inequality (2) is not an optimal Plower bound  P lower bounds that are functions of θ = P (A ), P (A ∩ A ) , i i j i i<j we only need to show it is not achievable. Note that for N > 3, the lower bound (2) can have negative values. However, according to the definition of achievability, the LHS of (7) can never be negative, which means the lower bound (2) cannot be achievable. Therefore, the Bonferroni inequality (2) is not optimal. Throughout the survey, we mainly focus on lower bounds using different partial probabilistic information. Upper bounds are presented as remarks. 2. Review of Existing Bounds P PWe start from the class of lower bounds in terms of i P (Ai ) and i<j P (Ai ∩ Aj ), for which the Dawson-Sankoff (DS) lower bound [DS67] is known as optimal. P Then we introduce some lower bounds in terms of {P (Ai )} and { j P (Ai ∩ Aj )}, including the D. de Caen (DC) bound [DC97] and the Kuai-Alajaji-Takahara (KAT) bound [KAT00a]. Next, a review of some lower bounds in terms of {P (Ai )} and {P (Ai ∩ Aj )} is given, including the algorithmic stepwise lower bound [KAT00b] and the Gallot-Kounias (GK) bound [Gal66; Kou68; FLS10]. Finally, some existing upper bounds are reviewed, including the Hunter upper bound and the algorithmic greedy upper bound [KAT00b]. We first define the degree of an atom (or outcome in finite probability space) ω ∈ F as follows. Definition 2.1. For each atom ω ∈ F , let the degree of ω, denoted by deg(ω), be the number of Ai ’s that contain ω. S Therefore, the degree of any atom in i Ai equals to an integer in {1, . . . , N}. P P 2.1. Lower Bounds Using P (A ) and i i i<j P (Ai ∩ Aj ). ConP  P sidering θ = i P (Ai ), i<j P (Ai ∩ Aj ) , we note that the Bonferroni inequality (2) is a lower bound in this class. However, we have shown that (2) P is not optimal, P which means there exists another function of only i P (Ai ) and i<j P (Ai ∩ Aj ) that is a lower bound of S  N P A and always sharper than the Bonferroni inequality. i i=1 6 A SHORT SURVEY Defining (12) a(k) := P ( ω⊆ [ Ai , deg(ω) = k i )! , one can easily verify the following identities: ! N N [ X (13) P Ai = a(k), i=1 N X (14) k=1 P (Ai ) = i=1 X (15) ka(k), k=1 P (Ai ∩ Aj ) = i<j X N X N   X k k=2 P (Ai ∩ Aj ) = 2 i,j X 2 a(k), P (Ai ∩ Aj ) + i<j (16) =2 = N X P (Ai ) i=1 N X k(k − 1) k=2 N X 2 a(k) + N X ka(k) k=1 k 2 a(k). k=1 Note that using the above equalities, one can derive a lower bound simply via the Cauchy-Schwarz inequality: ! ! !2 X X X (17) a(k) k 2 a(k) ≥ ka(k) , k k k where equality holds if and only if a(k) > 0 only for a particular k, i.e., all outcomes in the union has the same degree k. The resulting lower bound can be written as ! P N [ ( i P (Ai ))2 . (18) P Ai ≥ P i,j P (Ai ∩ Aj ) i=1 P P P Since i,j P (Ai ∩ Aj ) ≤ i,j P (Ai ) = N i P (Ai ), P P ( i P (Ai ))2 P (Ai ) P ; ≥ i (19) N i,j P (Ai ∩ Aj ) A SHORT SURVEY 7 P P (A ) hence the lower bound (18) is always sharper thanP i N i , which has been shown to be optimal in the class of θ = ( i P (Ai )). This is reasonable since Pthe lower bound (18) is established using more inP (A ) formation than i N i . However, it can be readily shown that the lower bound (18) is not always sharper than the Bonferroni inequality (2). Therefore, it cannot be theoptimal lower bound in the class of P P θ= i<j P (Ai ∩ Aj ) . i P (Ai ), 2.1.1. Dawson-Sankoff (DS) Bound. The is known as the P DS bound P optimal lower bound in terms of only i P (Ai ) and i<j P (Ai ∩ Aj ). P P Denoting θ1 := i P (Ai ) and θ2 := i<j P (Ai ∩ Aj ), the DS bound [DS67] can be written as ! N [ κθ12 (1 − κ)θ12 (20) P Ai ≥ + , (2 − κ)θ + 2θ (1 − κ)θ + 2θ 1 2 1 2 i=1 2 2 − ⌊ 2θ ⌋ and ⌊x⌋ denotes the largest integer less than or where κ = 2θ θ1 θ1 equal to x. We first show that the DS bound is the solution of a linear programming (LP) problem in the following lemma. Lemma 2.2. The DS bound is the solution of the following LP problem. X a(k), ℓDS := min a(k) s.t. (21) k X ka(k) = P (Ai ), i k X X 2 k a(k) = k a(k) ≥ 0, X P (Ai ∩ Aj ), i,j k = 1, . . . , N. Proof. For an LP problem, when a feasible solution exists and when the objective function (which is linear) is bounded, the optimal value of the objective function is always attained on the boundary of the optimal level-set and it is attained on at least one of the vertices of the polyhedron formed by the constraints (which is the set of feasible solutions) [BT97]. Then, the lemma can be readily verified using this fact that one of the optimal feasible points of the LP problem (21) is a vertex. To obtain a vertex, one need to make N − 2 of the inequalities a(k) ≥ 0 active, which means there are only two integers k1 and k2 8 A SHORT SURVEY that 1 ≤ k1 < k2 ≤ N, satisfying min a(k1 ) + a(k2 ), k1 ,k2 s.t. k1 a(k1 ) + k2 a(k2 ) = (22) X P (Ai ), i k12 a(k1 ) + k22 a(k2 ) = X P (Ai ∩ Aj ), i,j a(k1 ) ≥ 0, a(k2 ) ≥ 0. It can be easily shown that the solution of the above problem is achieved P i,j P (Ai ∩Aj ) at k1 = ⌊ P P (Ai ) ⌋ and k2 = k1 + 1. Thus, the solution of (21) is i the DS bound.  The existing proof of the optimality of the DS bound can be seen, e.g., in [GS96, p. 22]. We herein give an alternative and simpler proof by proving it is achievable. Lemma 2.3.The DS bound is optimal inthe class of lower bounds in P P terms of θ = i P (Ai ), i<j P (Ai ∩ Aj ) . Proof. We have shown that the DS bound is the solution of (21) and can be written as ℓDS = a(k1 ) + a(k2 ), for some a(k1 ) ≥ 0, a(k2 ) ≥ 0, and a(k) = 0, k 6= k1 , k 6= k2 . Recalling the definition of a(k), one can construct two outcomes ω1 and ω2 in a finite probability space such that (23) P (ω1) = a(k1 ), P (ω2 ) = a(k2 ). Then consider the following construction of collection of events {A∗i }, A∗i = {ω1 , ω2 }, (24) A∗i A∗i = {ω2 }, if i ≤ k1 , if k1 < i ≤ k2 , = ∅, otherwise. S Then we always have ℓDS = P ( i A∗i ). Therefore, the DS bound is achievable, and hence optimal.  Note that since the DS bound is optimal, it is always sharper than the lower bound in (18). Actually, this can be easily proved since the lower bound in (18) is a lower bound of the objective function of (21) by Cauchy-Schwarz inequality using the two constraints of (21). A SHORT SURVEY 9 P 2.2. Lower Bounds Using {P (Ai )} and { j6=i P (Ai ∩ Aj )}. In this P section, we review the lower bounds in terms of {P (Ai )} and { j6=i P (Ai ∩ Aj )}, including the DC [DC97] and the KAT [KAT00a] bounds. Similar to the definition of a(k), define (25) ai (k) := P ({ω ⊆ Ai : deg(ω) = k}) , i = 1, . . . , N, k = 1, . . . , N. P Then one can verify that i ai (k) = ka(k), i.e., P ai (k) . (26) a(k) = i k For simplicity, we denote (27) X P (Ai ∩ Aj ), αi := P (Ai ), βi := γi := αi + βi = j6=i X P (Ai ∩ Aj ). j We examine lower bounds that of θ = (α1 , . . . , αN , γ1 , . . . , γN ).  S are functions N One can verify that P i=1 Ai , αi and γi can all be written as linear functions of {ai (k)} as follows. ! N [ X X X ai (k) . (28) P Ai = a(k) = k i=1 i k (29) αi = P (Ai ) = X k ai (k), k γi = X j P (Ai ∩ Aj ) = X kai (k). k 2.2.1. D. de Caen (DC) bound. Similar to the lower bound in (18), using the Cauchy-Schwarz inequality !2 ! ! X X X ai (k) ai (k) kai (k) ≥ (30) k k k k for i = 1, . . . , N, and summing over i, one can get the DC bound as follows. (31) ! [ X X ai (k) X  α2  X P (Ai )2 i P = ≥ =: ℓDC . P Ai = k γi j P (Ai ∩ Aj ) i i i i k It is noted by D. de Caen [DC97] that the above lower bound can be (but is not always) sharper than the DS bound. 10 A SHORT SURVEY 2.2.2. The Kuai-Alajaji-Takahara (KAT) bound. Now, we introduce the KAT bound # ) (" γi γi N X − ⌊ ⌋ 1 αi αi αi , (32) ℓKAT := γi − γi γi ⌋ ⌋)(⌊ ⌋) ⌊ (1 + ⌊ αi αi αi i=1 as the solution of an LP problem, which is given in the following Lemma. Lemma 2.4. The KAT bound is the solution of the following LP problem (33) N X N X ai (k) min k {ai (k),i=1,...,N,k=1,...,N } i=1 k=1 s.t. N X ai (k) = αi , N X kai (k) = γi , i = 1, . . . , N, k=1 k=1 ai (k) ≥ 0, i = 1, . . . , N, k = 1, . . . , N, Proof. One can separate each i in the problem (33) and solve N suboptimization problems separately for each i: min {ai (k),k=1,...,N } (34) s.t. N X ai (k) k=1 N X k ai (k) = αi , k=1 ai (k) ≥ 0, N X kai (k) = γi , k=1 k = 1, . . . , N. Each of the sub-problems can be solved using the same method as solving the LP problem (21) for the DS bound. One can see [KAT00a] for details. An alternative proof is given in [Kua99] by solving the dual LP problem of (34).  It has been shown that the KAT bound is always sharper than both the DC bound and the DS bound [KAT00a]. Furthermore, Dembo has shown [Dem] that the KAT bound improves the DC bound by a factor of at most 89 . In the following lemma, we give alternative and simpler proofs of the above results. Lemma 2.5. Comparing with the DC and DS bounds, the KAT bound satisfies 9 (35) max{ℓDC , ℓDS } ≤ ℓKAT ≤ ℓDC . 8 A SHORT SURVEY 11 Proof. First, substituting (26) in (21), one can get that the DS bound is the solution of the following LP problem of {ai (k)} ℓDS = min {ai (k),i=1,...,N,k=1,...,N } (36) s.t. N X N X ai (k) = i=1 k=1 X ai (k) ≥ 0, X i N X N X ai (k) i=1 k=1 αi , k N X N X i=1 k=1 k = 1, . . . , N. kai (k) = X γi , i i Since every feasible point of (33) is also a feasible point of (36). The LP problem (36) is a relaxed problem of (33). Therefore, ℓKAT ≥ ℓDS . Next, it is easy to show that ℓKAT ≥ ℓDC since based on the constraints of (33), one can get the DC bound as a lower bound of the objective function of (33) using the Cauchy-Schwarz inequality. Therefore, ℓKAT is lower bounded by ℓDC . Finally, we prove that ℓKAT ≤ 89 ℓDC . Note that the DC bound (31) P α2 is given by ℓDC = i γii and that the solution of (34) can be written as aik(k11 ) + aik(k22 ) where k2 = k1 + 1. It then suffices to prove for any i = 1, . . . , N and integer k = 1, . . . , N − 1 (37) 9 αi2 ai (k) ai (k + 1) , + ≤ k k+1 8 γi where ai (k) + ai (k + 1) = αi and kai (k) + (k + 1)ai (k + 1) = γi . Denoting x := ai (k) and y := ai (k + 1), one can get    2 y x + k+1 [kx + (k + 1)y] ai (k) ai (k + 1) αi k / + = k k+1 γi αi2 k xy + k+1 xy + y 2 x2 + k+1 1 xy k (38) = = 1+ 2 (x + y) k(k + 1) (x + y)2 1 9 1 1 ≤1+ = . ≤1+ 4 k(k + 1) 8 8 The first equality holds when x = y = α2i and the second equality holds when k = 1. Therefore, the inequality ℓKAT ≤ 89 ℓDC can be active.   S N A Remark 2.6. Finally, we can derive an upper bound for P i i=1 P using {P (Ai )} and { j P (Ai ∩ Aj )} by maximizing the LP problem for the KAT bound. 12 A SHORT SURVEY The following LP problem (39) max {ai (k),i=1,...,N,k=1,...,N } s.t. N X N X ai (k) i=1 k=1 N X k ai (k) = αi , k=1 ai (k) ≥ 0, N X kai (k) = γi , i = 1, . . . , N, k=1 i = 1, . . . , N, k = 1, . . . , N, gives the upper bound ! [ X 1 X P Ai ≤ αi − βi N i i i (40) X 1 X P (Ai ∩ Aj ) =: ~NEW-1 . = P (Ai ) − N j6=i i ⊳ 2.3. Lower Bounds Using {P (Ai )} and {P (Ai ∩ Aj )}. Lower and SN in terms of the individual event probaupper bounds on P i=1 Ai bilities P (Ai )’s and the pairwise event probabilities P (Ai ∩ Aj )’s can be seen as special cases of the Boolean probability bounding problem [Bor+14; Viz04], which can be solved numerically via a linear programming (LP) problem involving 2N variables. Unfortunately, the number of variables for Boolean probability bounding problems increases exponentially with the number of events, N, which makes finding the solution impractical. Therefore, some suboptimal numerical bounds are proposed [Bor+14; Viz04; PG05; GS96] in order to reduce the complexity of the LP problem, for example, by using the dual basic feasible solutions. On the other hand, analytical/algorithmic bounds are particularly important. One can apply an existing bound using {P (Ai ), i ∈ I} and P { j∈I P (Ai ∩ Aj )} as a base bound, and then optimize the bound by choosing the optimal subset I of {1, . . . , N} algorithmically. Note that the bound by optimization via a subset exploits the full information of {P (Ai )} and {P (Ai ∩ Aj )}. Examples of bounds in this class includes the stepwise algorithmic implementation of the Kounias lower bound [KAT00b], the greedy algorithmic implementation of the Hunter upper bound [KAT00b]. Other analytical bounds, like the KAT bound, are also investigated in other works (e.g., see [CS06; Hop06; Hop09; KAT00b; BAL05; BAL07; MCS13]). A SHORT SURVEY 13 P The other class of bounds is established by {P (Ai )} and { j cj P (Ai ∩ Aj )}, where {cj } can be arbitrarily chosen from a continuous set for c = (c1 , . . . , cN )T or computed using {P (Ai )} and {P (Ai ∩ Aj )}. Then the resulting bound also exploits the full information of {P (Ai )} and {P (Ai ∩Aj )}. Typical example of the bounds in this class is the GallotKounias (GK) bound [Gal66; Kou68] (see also [FLS10; MCS13]). 2.3.1. Kounias Lower Bound and Algorithmic Implementation. The Kounias lower bound, which is a Bonferroni-type bound, can be written as ! ( ) N [ X X (41) P Ai ≥ max P (Ai ) − P (Ai ∩ Aj ) , i=1 I i∈I i,j∈I,i<j where I is a subset of the set of indices {1, . . . , N}. However, the computational complexity of the Kounias lower bound is exponential since there are exponential number of subsets of {1, . . . , N}. In order to reduce the computational complexity, an algorithmic algorithm is proposed in [KAT00b] using a stepwise algorithm to find a sub-optimal index set that maximizes the RHS of (41). We will refer to this algorithmic implementation of Kounias lower bound as the stepwise lower bound. 2.3.2. Gallot-Kounias (GK) Bound. RN ×1 and (42)  P (A1 ∩ A1 ) P (A1 ∩ A2 )  P (A2 ∩ A1 ) P (A2 ∩ A2 ) Σ= .. ..  . . P (AN ∩ A1 ) P (AN ∩ A2 ) Let α = (P (A1 ), · · · , P (AN ))T ∈  . . . P (A1 ∩ AN ) . . . P (A2 ∩ AN )   ∈ RN ×N , ..  ... . . . . P (AN ∩ AN ) the GK bound [Gal66; Kou68] is given as ! N [ (43) P Ai ≥ cT Σc, i−1 where Σc = α. Kounias has shown in [Kou68, Lemma 1.1] that the vector α is in the range of Σ, i.e., α is orthogonal to the null space of Σ. As a result, if Σ is singular, one can choose subsets of {A1 , . . . , AN } to compute the corresponding GK bound, which results in the same bound if the rank of the corresponding Σ is the same. Therefore, without loss of generality (WLOG), we assume herein Σ is non-singular, then the solution of Σc = α is unique (44) c̃ = Σ−1 α. 14 A SHORT SURVEY and the GK bound can be written as ! N [ −1 (45) P Ai ≥ c̃T Σc̃ = αT ΣT α = αT Σ−1 α =: ℓGK , i−1 −1 where ΣT = Σ−1 as Σ is symmetric. Furthermore, the GK bound was recently revisited by [FLS10]. The authors in [FLS10] have shown that the GK bound can be reformulated as P [ i ci P (Ai )]2 . (46) ℓGK = max P P c∈RN i k ci ck P (Ai ∩ Ak ) 2.4. Upper Bounds. There are only a few analytical/algorithmic upper bounds in the literature. In the following, we introduce the Hunter bound and its algorithmic implementation by a greedy algorithm. 2.4.1. Hunter Upper Bound and Algorithmic Implementation. The Hunter upper bound, which is a Bonferroni-type bound, can be written as ! N N X [ X (47) P P (Ai ) − max Ai ≤ P (Ai ∩ Aj ), i=1 i=1 T0 ∈T (i,j)∈T0 where T is the set of all trees spanning the N indices, i.e., the trees that include all indices as nodes. However, the computational complexity of finding the optimal spanning tree is exponential via an exhaustive search. In order to reduce the complexity, one algorithmic algorithm is proposed in [KAT00b] using Kruskal’s greedy algorithm for finding a sub-optimal spanning tree for a weighted graph. We will refer to this algorithmic implementation of the Hunter upper bound as the greedy upper bound, ~Greedy . 3. Observations on the GK Bound Finally, we conclude this survey with two observations on the GK bound. 3.1. Applying the GK bound to subsets of events. We note that many existing lower bounds, which do not fully explore available information, can be further improved algorithmically via optimization over subsets, as in [BAL07; Hop06]. However, in this section, we prove that the GK bound cannot be improved by applying it to subsets of {A1 , . . . , AN }. A SHORT SURVEY 15 Lemma 3.1. For any given M ≥ N, the GK bound is the solution of the following problem: min (48) kxk2 {x∈RM ×1 ,A∈RN×M } s.t. Ax = α, AAT = Σ ∈ RN ×N . Proof. We can always write x as x = AT k1 + AT⊥ k2 , (49) where k1 ∈ RN ×1 , k2 ∈ R(M −N )×1 , and A⊥ ∈ R(M −N )×M satisfies T AAT⊥ = 0N ×(M −N ) . Particularly, let LL be the Cholesky decompo sition of Σ, then A = L, 0N ×(M −N ) Q where Q is any orthogonal matrix is the solution of (48). Then (50) kxk2 = k1T AAT k1 + k2T A⊥ AT⊥ k2 = k1T Σk1 + k2T A⊥ AT⊥ k2 . The first constraint Ax = α implies AAT k1 = α, i.e., k1 = Σ−1 α. Therefore, the minimum of kxk2 is achieved at k2 = 0, so that (51) min kxk2 = k1T Σk1 = αT Σ−1 α. k1 ,k2  Theorem 3.2. The GK bound cannot be improved via optimization over subsets of {A1 , A2 , . . . , AN }.  T  a1  aT2   Proof. Denoting A =   ... , the first constraint of (48) is equivalent aTN to N constraints aTi x = αi , i = 1, . . . , N, and the second constraint of (48) is equivalent to N 2 constraints aTi aj = Σij , i = 1, . . . , N, j = 1, . . . , N. By selecting a subset of {1, 2, . . . , N}, the resulting GK bound is the solution of a relaxed problem of (48) with a subset of constraints on x and ai , i = 1, . . . , N. Since the objective value of the relaxed problem must be no more than the original problem (48), the GK bound using a subset cannot be higher than the GK bound using full information.  3.2. Iterative implementation of the GK bound. Theorem 3.3. The GK bound can be computed iteratively. More specifically, for n = 1, . . . , N, denote ℓGK (n) as the GK bound using the information of A1 , . . . , An : αn = (P (A1 ), . . . , P (An ))T , βn = 16 A SHORT SURVEY (P (A1 ∩ An ), . . . , P (An−1 ∩ An ))T and Σn , the n × n upper left submatrix of Σ, then if αn − βnH Σ−1 n−1 βn > 0, we have   1 bn bTn bn T (52) ℓGK (n) = ℓGK (n − 1) + αn αn , bTn 1 αn − βnH Σ−1 n−1 βn where bn = −Σ−1 n−1 βn . The matrix Σn is not invertible if and only if αn − βnH Σ−1 n−1 βn = 0. H −1 The last case αn − βn Σn−1 βn < 0 never happens, i.e., the following inequality holds (53) P (An ) ≥ (P (A1 ∩ An ), . . . , P (An−1 ∩ An )) ·  −1   P (A1 ∩ An ) P (A1 ∩ A1 ) . . . P (A1 ∩ An−1 )  P (A2 ∩ A1 ) . . . P (A2 ∩ An−1 )   P (A2 ∩ An )  ,    .. .. ..     . . . ... P (An−1 ∩ An ) P (An−1 ∩ A1 ) . . . P (AN ∩ An−1 ) for n = 1, . . . , N. Proof. Note that (54) Σn =  Σn−1 βn βnT αn  . and by the matrix inverse lemma for a Hermitian matrix [HJ86], we have     −1 1 bn bTn bn Σn−1 0n −1 + (55) Σn = bTn 1 0Tn 0 αn − βnH Σ−1 n−1 βn Substituting to ℓGK (n) = αn Σ−1 n αn , ℓGK (n) can be computed using ℓGK (n − 1). Since we have proved ℓGK (n) ≥ ℓGK (n − 1) in Theorem 3.2, the inequality is directly from αn − βnH Σ−1 n−1 βn ≥ 0 in (52) of Theorem 3.3.  Recent works: We close this survey by referring the reader to [YAT14; YAT15a; YAT15b; YAT16a; YAT16b] for the most recent works on this topic. References [BAL05] F. Behnamfar, F. Alajaji, and T. Linder. “Tight error bounds for space-time orthogonal block codes under slow Rayleigh flat fading”. IEEE Transactions on Communications 53.6 (2005), pp. 952–956. REFERENCES [BAL07] 17 F. Behnamfar, F. Alajaji, and T. Linder. “An efficient algorithmic lower bound for the error rate of linear block codes”. IEEE Transactions on Communications 55.6 (2007), pp. 1093– 1098. [Bor+14] E. Boros, A. Scozzari, F. Tardella, and P. Veneziani. “Polynomially Computable Bounds for the Probability of the Union of Events”. Mathematics of Operations Research (2014). eprint: http://dx.doi.org/10.1287/moor.2014.0657. [BT97] D. Bertsimas and J. Tsitsiklis. Introduction to Linear Optimization. Athena Scientific, 1997. [CS06] J. T. Chen and E. Seneta. “A Frechet-Optimal Strengthening of the Dawson-Sankoff Lower Bound”. Methodology and Computing in Applied Probability 8.2 (2006), pp. 255–264. [DC97] D De Caen. “A lower bound on the probability of a union”. Discrete Mathematics 169.1 (1997), pp. 217–220. [Dem] A. Dembo. “Unpublished notes”. Communicated by I. Sasson, 2000. [DS67] D. Dawson and D Sankoff. “An inequality for probabilities”. Proceedings of the American Mathematical Society 18.3 (1967), pp. 504–507. [FLS10] C. Feng, L. Li, and J. Shen. “Some inequalities in functional analysis, combinatorics, and probability theory”. The Electronic Journal of Combinatorics 17.R58 (2010), p. 1. [Gal66] S. Gallot. “A bound for the maximum of a number of random variables”. Journal of Applied Probability 3.2 (1966), pp. 556–558. [GS96] J. Galambos and I. Simonelli. Bonferroni-type inequalities with applications. Springer series in statistics: Probability and its applications. Springer, 1996. isbn: 9780387947761. [HJ86] R. A. Horn and C. R. Johnson, eds. Matrix Analysis. New York, NY, USA: Cambridge University Press, 1986. isbn: 0-521-30586-1. [Hop06] F. M. Hoppe. “Improving probability bounds by optimization over subsets”. Discrete Mathematics 306.5 (2006), pp. 526– 530. [Hop09] F. M. Hoppe. “The effect of redundancy on probability bounds”. Discrete Mathematics 309.1 (2009), pp. 123–127. [KAT00a] H Kuai, F Alajaji, and G Takahara. “A lower bound on the probability of a finite union of events”. Discrete Mathematics 215.1-3 (2000), pp. 147–158. 18 REFERENCES [KAT00b] H. Kuai, F. Alajaji, and G. Takahara. “Tight error bounds for nonuniform signaling over AWGN channels”. IEEE Transactions on Information Theory 46.7 (2000), pp. 2712–2718. [Kou68] E. G. Kounias. “Bounds for the Probability of a Union, with Applications”. The Annals of Mathematical Statistics 39.6 (1968), pp. 2154–2158. [Kua99] H. Kuai. “Tight Bounds on The Probability of a Union with Applications to Non-uniform Signaling over AWGN Channels”. MA thesis. Department of Mathematics and Statistics, Queen’s University, 1999. [MCS13] Z. Mao, J. Cheng, and J. Shen. “A new lower bound on error probability for nonuniform signals over AWGN channels”. In: Proc. Wireless Communications and Networking Conference. IEEE. 2013, pp. 3005–3009. [PG05] A. Prékopa and L. Gao. “Bounding the probability of the union of events by aggregation and disaggregation in linear programs”. Discrete Applied Mathematics 145.3 (2005), pp. 444–454. [Viz04] B. Vizvári. “New upper bounds on the probability of events based on graph structures”. RUTCOR Research Report (2004). [YAT14] J. Yang, F. Alajaji, and G. Takahara. “New bounds on the probability of a finite union of events”. In: Proc. IEEE International Symposium on Information Theory. 2014, pp. 1271– 1275. [YAT15a] J. Yang, F. Alajaji, and G. Takahara. “On bounding the union probability”. In: Proc. IEEE International Symposium on Information Theory. IEEE. 2015, pp. 1761–1765. [YAT15b] J. Yang, F. Alajaji, and G. Takahara. “On Bounding the Union Probability Using Partial Weighted Information”. arXiv preprint arXiv:1506.08331 (2015). [YAT16a] J. Yang, F. Alajaji, and G. Takahara. “Lower bounds on the probability of a finite union of events”. SIAM Journal on Discrete Mathematics 30.3 (2016), pp. 1437–1452. [YAT16b] J. Yang, F. Alajaji, and G. Takahara. “On bounding the union probability using partial weighted information”. Statistics & Probability Letters 116 (2016), pp. 38–44.
7cs.IT
arXiv:1709.00164v2 [q-bio.PE] 23 Sep 2017 Whole Genome Phylogenetic Tree Reconstruction Using Colored de Bruijn Graphs Cole A. Lyman∗ , M. Stanley Fujimoto∗ , Anton Suvorov† , Paul M. Bodily∗ , Quinn Snell∗ , Keith A. Crandall‡ , Seth M. Bybee† and Mark J. Clement∗ ∗ Computer Science Department Brigham Young University, Provo, Utah 84602 USA † Department of Biology Brigham Young University, Provo, Utah 84602 USA ‡ Computational Biology Institute George Washington University, Washington, DC 20052 USA Email: [email protected] Abstract—We present kleuren, a novel assembly-free method to reconstruct phylogenetic trees using the Colored de Bruijn Graph. kleuren works by constructing the Colored de Bruijn Graph and then traversing it, finding bubble structures in the graph that provide phylogenetic signal. The bubbles are then aligned and concatenated to form a supermatrix, from which a phylogenetic tree is inferred. We introduce the algorithms that kleuren uses to accomplish this task, and show its performance on reconstructing the phylogenetic tree of 12 Drosophila species. kleuren reconstructed the established phylogenetic tree accurately and is a viable tool for phylogenetic tree reconstruction using whole genome sequences. Software package available at: https://github.com/Colelyman/kleuren. Keywords-phylogenetics; algorithm; whole genome sequence; colored de Bruijn graph I. I NTRODUCTION Whole genome sequences are readily available and affordable like never before [1] due to the advent of highthroughput Next Generation Sequencing (NGS) which has provided researchers with vast amounts of genomic sequencing data that has transformed the landscape of understanding of genomes. The field of phylogenetics, which discovers the evolutionary relationship between taxa, has been no exception to this transformation. Phylogenetics has responded to the copious amounts of high throughput data with novel alignment-free and assembly-free methods [2], [3] that are better suited [4] to handle the large amounts of data more efficiently than the traditional alignment-based phylogenetic methods. The traditional approach to phylogenetic tree reconstruction requires a homology search throughout the genomes of the taxa, a Multiple Sequence Alignment (MSA) of the homologs, and a tree construction from the resulting matrix. Each of these steps can be computationally expensive and may introduce many unnecessary assumptions that can be avoided by using an alignment-free and assembly-free method. Alignment-free and assembly-free methods [5]–[8] don’t come without their disadvantages, one of which being that many of these methods abstract away the source of the phylogenetic signal to a method akin to shared kmer-counting. We propose an assembly-free whole genome phylogenetic tree reconstruction method using the Colored de Bruijn Graph (CdBG) [9], a data structure that is commonly used for detecting variation and comparing genomes. The CdBG is similar to a traditional de Bruijn Graph (dBG) in that the substrings of a certain length, referred to as kmers, of a sequence represent the vertices of the dBG and an edge exists between two vertices if the suffix of the first vertex is the prefix of the second vertex. The CdBG differs from the traditional dBG in that each vertex is associated to an unique color (or set of colors) which could be a differing sample, species, or taxon. We introduce the kleuren (Dutch for ”colors” in tribute of Nicolaas Govert de Bruijn, the de Bruijn graph’s namesake) software package which implements our methods. kleuren works by finding bubble regions [9], [10] of the CdBG, which are where one or more colors diverge at a node, which act as pseudo-homologous regions between the taxa. The sequence for each taxon in each bubble is then extracted and a MSA is performed, then the MSA’s from each bubble are concatenated to form a supermatrix in which a phylogenetic tree of evolution is constructed. II. M ETHODS A. Definitions Given the alphabet Σ = {A, C, G, T } which are nucleotide codes, let a dBG G, be defined as G = (V, E) where V = {v1 , v2 , . . . , vi , . . . , vs } is the set of vertices and where vi is the ith unique sequence of length k of G and where E = {e1 , e2 , . . . , ei , . . . , et } is the set of edges and where ei = (vi , vi+1 ) is an edge connecting two vertices such that the sequence of vi and vi+1 overlap by (k − 1) characters. Let a CdBG, CG, be defined as CG = {G1 , G2 , . . . , Gi , . . . , Gu } for u taxa where Gi = (Vi , Ei ) is the dBG of the ith taxon. We refer to each G ∈ CG as a distinct color or taxon. Furthermore, let a path, P = (v1 , . . . , vw ) in Gi be defined as a sequence of vertices from Vi such that for all subsequences (vj , vj+1 ) of P , the edge (vj , vj+1 ) ∈ Ei . Let a bubble, B, in CG be defined as B = {P1 , . . . , Pz } such that each P ∈ B is associated with one or more colors, that the first and last vertices of ∀P ∈ B are identical, and that 2 ≤ z ≤ u (see Figure 1). Finally, let K be defined as K = {V1 ∪ V2 ∪ . . . ∪ Vi ∪ . . . ∪ Vu } where Vi is the vertices (or the unique kmers) of the ith dBG, Gi . B. Software Architecture We use the dbgfm software package [11] to construct and represent the dBG’s of the individual taxa. kleuren provides an interface to interact with the individual dBG’s to create a CdBG, where each taxon is considered a color. The dbgfm package uses the FM-Index [12], as a space efficient representation of the dBG. C. kleuren Algorithms Algorithm 1 kleuren Algorithm 1: function KLEUREN (K, CG) 2: bubbles ← [ ] . bubbles is initialized to an empty list 3: for all k ∈ K do 4: if k is in c or more colors of CG then 5: endV ertex ← FIND E NDV ERTEX(k, CG) 6: for all color ∈ CG do 7: path ← EXTEND PATH(k, endV ertex, color) 8: add path to bubble 9: end for 10: append bubble to bubbles 11: end if 12: end for 13: alignments ← [ ] 14: for all bubble ∈ bubbles do 15: alignment ← multiple sequence alignment of each path in bubble 16: append alignment to alignments 17: end for 18: supermatrix ← concatenation of alignments 19: end function 1) Overall Algorithm: kleuren works by iterating over the superset of vertices, K, and discovering vertices that could form a bubble. A vertex, s, could form a bubble if s is present in c or more colors of CG, where c is set by the user as a command line parameter. Note that the lower A. Bubble in a Colored de Bruijn Graph Color 1 Color 2 Color 3 Path: ACTGTG Path: ACTAGGTG Path: ACTAGTG B. Paths in the Bubble of Each Color Figure 1. A. An example of a bubble in a Colored de Bruijn Graph with 3 colors (i.e. 3 taxa), and where k = 3. The colors of the vertices represent the following: gray- all colors contain the vertex, purple- Color 2 and Color 3 contain the vertex, yellow- Color 1 contains the vertex, redColor 2 contains the vertex, and blue- Color 3 contains the vertex. In this example ACT is the startVertex and GTG is the endVertex which are both contained in all of the colors. B. The extended paths of each color between the startVertex and endVertex. that c is, the more potential bubbles that may be found, but kleuren will take longer to run because more vertices will be considered as the starting vertex of a bubble. Let s be considered as the starting vertex of the bubble, b; then the end vertex, e, of b is found (see Section II-C2). After the end vertex is found, the path, p, between s and e is found for each color in CG (see Section II-C3). This process is repeated until each vertex in K has been either considered as a starting vertex of a bubble, or has been visited while extending the path between a starting and ending vertex. 2) Finding the End Vertex: The end vertex is found by traversing the path from the startV ertex until a vertex is found that is in at least c colors. The endV ertex is then used in the function to extend the path (see Section II-C3). Algorithm 2 Find End Vertex Function 1: function FIND E NDV ERTEX (startV ertex, CG) 2: endV ertex ← “ ” . endV ertex is initialized to an empty string 3: neighbors ← GET N EIGHBORS(startV ertex) 4: while !IS E MPTY(neighbors) and IS E MPTY (endV ertex) do 5: for all neighbor ∈ neighbors do 6: if k is in c or more colors of CG then 7: endV ertex ← neighbor 8: end if 9: end for 10: end while 11: return endV ertex 12: end function 3) Extending the Path: The main functions that discover the sequences found in a bubble are the Extend the Path Functions (see Section II-C3). To extend the path between the startV ertex and endV ertex we use a recursive function that traverses the dBG for a color in which every possible path between the startV ertex and endV ertex is explored up to the maxDepth (provided as a command line parameter by the user). The maxDepth parameter allows the user to specify how thorough kleuren will search for a bubble; the higher the maxDepth the more bubbles that kleuren will potentially find, but the longer kleuren will take because at each depth there are exponentially more potential paths to traverse. Algorithm 3 Extend the Path Functions 1: function EXTEND PATH (startV ertex, endV ertex, color, maxDepth) 2: path ← “ ” 3: visited ← {} . visited is initialized to the empty set 4: if RECURSIVE PATH(startV ertex, endV ertex, path, color, visited, 0, maxDepth) then 5: return path 6: end if 7: end function 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: D. Data Acquisition 26: To measure the effectiveness of our method we used 12 Drosophila species, obtained from FlyBase [13]. We chose this group of species because there is a thoroughly researched and established phylogenetic tree [14]. 27: 28: 29: 30: 31: function RECURSIVE PATH(currentV ertex, endV ertex, path, color, visited, depth, maxDepth) add currentV ertex to visited if depth >= maxDepth then return f alse end if if currentKmer == endKmer then return true end if neighbors ← NEIGHBORS(currentV ertex, color) for all neighbor ∈ neighbors do if neighbor is in visited then continue end if oldP ath ← path append suffix of currentKmer to path depth ← depth + 1 if !RECURSIVE PATH(neighbor, endV ertex, path, color, visited, depth, maxDepth) then path ← oldP ath else return true end if end for end function E. Tree Construction and Parameters We used the DSK software package [15] to count the kmers present in all of the Drosophila species. To find the bubbles, we used the following parameters: k = 17 (kmer size of 17) and c = 12 (all colors in the CG were required to contain a vertex in order to search for a bubble starting at that vertex) and ran 32 instances of kleuren concurrently for 4 days to find 3, 277 bubbles. When all of the bubbles in the CdBG had been identified, we used MAFFT [16] to perform a MSA for each sequence in every bubble that kleuren identified (see Figure 2 A.). Then each MSA was concatenated to form a supermatrix (see Figure 2 B.) using Biopython [17]. The phylogenetic tree was then inferred from the supermatrix by Maximum Likelihood using IQTREE [18] (see Figure 2 C.). Once the tree was constructed, we used the ETE 3 software package [19] to compare the tree to the established one and Phylo.io [20] to visualize the trees. F. Bubble Assumptions Our method is based on the assumption that bubbles are representative of homologous regions of the taxa genomes. We propose that this assumption is reliable because it has been shown that dBG’s are a suitable method to align sequences [21]–[23], and by identifying the bubbles in the CdBG we find the sections of the graph that contain the most phylogenetic signal. III. R ESULTS kleuren constructed a tree (see Figure 3) consistent with the established tree found in [14] (the Robinson-Foulds distance [24] between the two trees is 0). Even though we Color 1 Color 2 Color 3 Path: ACT--GTG Path: ACTAGGTG Path: ACTA-GTG A. Multiple Sequence Alignment of the Sequences in Bubble (Figure 1) Color 1 Color 2 Color 3 Path: ACT--GTGATT-A... Path: ACTAGGTGATTC-... Path: ACTA-GTGATTCA... B. Supermatrix of Multiple Sequence Alignments concatenated Color 3 Color 2 Color 1 C. Phylogenetic Tree Figure 2. A. The Multiple Sequence Alignment (MSA) of the sequences from the bubble presented in Figure 1. B. The MSA’s from each bubble are concatenated into a supermatrix, from which a phylogenetic tree is constructed. C. The resulting tree from the supermatrix inferred by Maximum Likelihood. ran many concurrent instances of kleuren for multiple days (see Section II-E), not all of the kmers in K were explored for potential bubbles; meaning that many more bubbles could be found in this CdBG which would only make the phylogeny more concrete. Before this final successful run, there were a number of unsuccessful attempts made to construct the tree. Initial attempts were unsuccessful because K (the super-set of kmers) that kleuren uses to find bubbles was semi-sorted (segments of the file were sorted, but all of the kmers in the file were not in lexicographic order) so the vertices that kleuren used to search for bubbles were skewed towards vertices that were lexicographically first. We remedied this issue by shuffling the order of the kmer file so that there was no lexicographic bias towards the bubbles that kleuren finds. A previous attempt resulted in a tree that had a 0.44 normalized Robinson-Fould’s distance from the established tree occurred because there were too few bubbles, and therefore there was not enough phylogenetic signal for the correct tree to be constructed. To find more bubbles, we split up the kmer file into parts so that multiple instances of kleuren could find bubbles concurrently. We also discovered that there was a high frequency of adenines (A) (a frequency around 40% in comparison to the other nucleotides) in the final supermatrix that could skew the final tree because nucleotides have differing mutation rates. We thought this bias towards A was due to the fact that in the recursiveP ath function (see Algorithm 3) the neighbors may be sorted, so the function would traverse the neighbor that started with an A before traversing the other neighbors (see Algorithm 3, line: 18). Similar to the previous sorting problem, we shuffled the order of the neighbors so that the first neighbor that was traversed would not always be lexicographically first. Despite this change, the final supermatrix that produced the true tree still had a bias towards A (see Section V). IV. C ONCLUSION We introduced a novel method of constructing accurate phylogenetic trees using a CdBG. Our method, kleuren, uses whole genome sequences to construct a CdBG representation, then it traverses the CdBG to discover bubble structures which become the basis for phylogenetic signal between taxa and eventually produces a phylogenetic tree. As the NGS era progresses, whole genome sequences are becoming more prevalent for more non-model organisms, in which phylogenies of these organisms have never been constructed. kleuren is a viable method to relatively quickly and accurately construct the phylogenies for these newly sequenced organisms. V. F UTURE W ORK We plan to optimize kleuren so that it can find more bubbles in a shorter amount of time. We will do this by replacing the underlying data structure for how the CdBG is represented. dbgfm, the current method used to represent the dBG in kleuren, sacrifices time efficiency for memory efficiency by storing the FM-Index entirely on disk, thus slowing down queries into the dBG. When kleuren runs faster, more bubbles will be found, and more phylogenetic signal will be present so that a more accurate tree can be constructed. We also plan to investigate the reasons for the high abundance of A’s in the supermatrix (see Section III) further, and balance the frequency of nucleotides in the supermatrix. Furthermore, we would like to look into how kleuren performs when the CdBG is constructed using read sequencing data rather than assembled genomes. ACKNOWLEDGMENT This work was funded through the Utah NASA Space Grant Consortium and EPSCoR and through the BYU Graduate Research Fellowship. The authors would like to thank Kristi Bresciano, Michael Cormier, Justin B. Miller, Brandon Pickett, Nathan Schulzke, and Sage Wright for their thoughts concerning the project. The authors would also like to thank the Fulton Supercomputing Laboratory at Brigham Young University for their work to maintain the super-computer on which these experiments were run. Figure 3. The phylogenetic tree of 12 Drosophila species constructed using kleuren. This tree resulted from using a kmer size of 17 and required all species to contain a vertex in order for the algorithm to search for a bubble starting at that vertex; and this tree is consistent with the established tree for these 12 species. R EFERENCES [1] S. C. Schuster, “Next-generation sequencing transforms today’s biology,” Nature Methods, vol. 5, no. 1, pp. 16– 18, dec 2007. [Online]. Available: https://doi.org/10.1038/ nmeth1156 [2] H. Fan, A. R. Ives, Y. Surget-Groba, and C. H. Cannon, “An assembly and alignment-free method of phylogeny reconstruction from next-generation sequencing data,” BMC Genomics, vol. 16, no. 1, jul 2015. [Online]. Available: https://doi.org/10.1186/s12864-015-1647-5 [3] J. Qi, H. Luo, and B. Hao, “CVTree: a phylogenetic tree reconstruction tool based on whole genomes,” Nucleic Acids Research, vol. 32, no. Web Server, pp. W45–W47, jul 2004. [Online]. Available: https://doi.org/10.1093/nar/gkh362 [4] C. X. Chan and M. A. Ragan, “Next-generation phylogenomics,” Biology Direct, vol. 8, no. 1, jan 2013. [Online]. Available: https://doi.org/10.1186/1745-6150-8-3 [5] B. Haubold, “Alignment-free phylogenetics and population genetics,” Briefings in Bioinformatics, vol. 15, no. 3, pp. 407–418, nov 2013. [Online]. Available: https://doi.org/10. 1093/bib/bbt083 [6] O. Bonham-Carter, J. Steele, and D. Bastola, “Alignmentfree genetic sequence comparisons: a review of recent approaches by word analysis,” Briefings in Bioinformatics, vol. 15, no. 6, pp. 890–905, jul 2013. [Online]. Available: https://doi.org/10.1093/bib/bbt052 [7] C. X. Chan, G. Bernard, O. Poirion, J. M. Hogan, and M. A. Ragan, “Inferring phylogenies of evolving sequences without multiple sequence alignment,” Scientific Reports, vol. 4, no. 1, sep 2014. [Online]. Available: https://doi.org/10.1038/srep06504 [8] H. Yi and L. Jin, “Co-phylog: an assembly-free phylogenomic approach for closely related organisms,” Nucleic Acids Research, vol. 41, no. 7, pp. e75–e75, jan 2013. [Online]. Available: https://doi.org/10.1093/nar/gkt003 [9] Z. Iqbal, M. Caccamo, I. Turner, P. Flicek, and G. McVean, “De novo assembly and genotyping of variants using colored de Bruijn graphs,” Nature Genetics, vol. 44, no. 2, pp. 226–232, jan 2012. [Online]. Available: https: //doi.org/10.1038/ng.1028 [10] G. Peng, P. Ji, and F. Zhao, “A novel codon-based de Bruijn graph algorithm for gene construction from unassembled transcriptomes,” Genome Biology, vol. 17, no. 1, nov 2016. [Online]. Available: https://doi.org/10.1186/ s13059-016-1094-x [11] R. Chikhi, A. Limasset, S. Jackman, J. T. Simpson, and P. Medvedev, “On the representation of de bruijn graphs,” in Research in Computational Molecular Biology: 18th Annual International Conference, RECOMB 2014, Pittsburgh, PA, USA, April 2-5, 2014, Proceedings, R. Sharan, Ed. Cham: Springer International Publishing, 2014, pp. 35–55. [Online]. Available: https://doi.org/10.1007/978-3-319-05269-4 4 [12] P. Ferragina and G. Manzini, “Opportunistic data structures with applications,” in Proceedings of the 41st Annual Symposium on Foundations of Computer Science, ser. FOCS ’00. Washington, DC, USA: IEEE Computer Society, 2000, pp. 390–. [Online]. Available: http://dl.acm.org/citation.cfm? id=795666.796543 [13] L. S. Gramates, S. J. Marygold, G. dos Santos, J.-M. Urbano, G. Antonazzo, B. B. Matthews, A. J. Rey, C. J. Tabone, M. A. Crosby, D. B. Emmert, K. Falls, J. L. Goodman, Y. Hu, L. Ponting, A. J. Schroeder, V. B. Strelets, J. Thurmond, P. Zhou, and FlyBase Consortium, “FlyBase at 25: looking to the future,” Nucleic Acids Research, vol. 45, no. D1, pp. D663–D671, oct 2016. [Online]. Available: https://doi.org/10.1093/nar/gkw1016 [14] M. W. Hahn, M. V. Han, and S.-G. Han, “Gene family evolution across 12 drosophila genomes,” PLoS Genetics, vol. 3, no. 11, p. e197, 2007. [Online]. Available: https://doi.org/10.1371/journal.pgen.0030197 [15] G. Rizk, D. Lavenier, and R. Chikhi, “DSK: k-mer counting with very low memory usage,” Bioinformatics, vol. 29, no. 5, pp. 652–653, jan 2013. [Online]. Available: https://doi.org/10.1093/bioinformatics/btt020 [16] K. Katoh and D. M. Standley, “MAFFT multiple sequence alignment software version 7: Improvements in performance and usability,” Molecular Biology and Evolution, vol. 30, no. 4, pp. 772–780, jan 2013. [Online]. Available: https: //doi.org/10.1093/molbev/mst010 [17] P. J. A. Cock, T. Antao, J. T. Chang, B. A. Chapman, C. J. Cox, A. Dalke, I. Friedberg, T. Hamelryck, F. Kauff, B. Wilczynski, and M. J. L. de Hoon, “Biopython: freely available Python tools for computational molecular biology and bioinformatics,” Bioinformatics, vol. 25, no. 11, pp. 1422–1423, mar 2009. [Online]. Available: https: //doi.org/10.1093/bioinformatics/btp163 [18] L.-T. Nguyen, H. A. Schmidt, A. von Haeseler, and B. Q. Minh, “IQ-TREE: A fast and effective stochastic algorithm for estimating maximum-likelihood phylogenies,” Molecular Biology and Evolution, vol. 32, no. 1, pp. 268–274, nov 2014. [Online]. Available: https://doi.org/10.1093/molbev/msu300 [19] J. Huerta-Cepas, F. Serra, and P. Bork, “ETE 3: Reconstruction, analysis, and visualization of phylogenomic data,” Molecular Biology and Evolution, vol. 33, no. 6, pp. 1635–1638, feb 2016. [Online]. Available: https://doi.org/10.1093/molbev/msw046 [20] O. Robinson, D. Dylus, and C. Dessimoz, “Phylo.io: Interactive viewing and comparison of large phylogenetic trees on the web,” Molecular Biology and Evolution, vol. 33, no. 8, pp. 2163–2166, apr 2016. [Online]. Available: https://doi.org/10.1093/molbev/msw080 [21] B. Raphael, “A novel method for multiple alignment of sequences with repeated and shuffled elements,” Genome Research, vol. 14, no. 11, pp. 2336–2346, nov 2004. [Online]. Available: https://doi.org/10.1101/gr.2657504 [22] I. Minkin, A. Patel, M. Kolmogorov, N. Vyahhi, and S. Pham, “Sibelia: A scalable and comprehensive synteny block generation tool for closely related microbial genomes,” in Algorithms in Bioinformatics: 13th International Workshop, WABI 2013, Sophia Antipolis, France, September 2-4, 2013. Proceedings. Berlin, Heidelberg: Springer Berlin Heidelberg, 2013, pp. 215–229. [Online]. Available: http: //dx.doi.org/10.1007/978-3-642-40453-5 17 [23] I. Minkin, S. Pham, and P. Medvedev, “TwoPaCo: an efficient algorithm to build the compacted de Bruijn graph from many complete genomes,” Bioinformatics, p. btw609, sep 2016. [Online]. Available: https://doi.org/10.1093/bioinformatics/ btw609 [24] D. Robinson and L. Foulds, “Comparison of phylogenetic trees,” Mathematical Biosciences, vol. 53, no. 1-2, pp. 131–147, feb 1981. [Online]. Available: https://doi.org/10. 1016/0025-5564(81)90043-2
8cs.DS
Sending Information Through Status Updates Abdulrahman Baknina1, Omur Ozel2 , Jing Yang3, Sennur Ulukus1 , and Aylin Yener3 1 arXiv:1801.04907v1 [cs.IT] 15 Jan 2018 2 Department of Electrical and Computer Engineering, University of Maryland, College Park, MD 20742 Department of Electrical and Computer Engineering, Carnegie Mellon University, Pittsburgh, PA 15213 3 Department of Electrical Engineering, The Pennsylvania State University, University Park, PA 16802 Abstract— We consider an energy harvesting transmitter sending status updates regarding a physical phenomenon it observes to a receiver. Different from the existing literature, we consider a scenario where the status updates carry information about an independent message. The transmitter encodes this message into the timings of the status updates. The receiver needs to extract this encoded information, as well as update the status of the observed phenomenon. The timings of the status updates, therefore, determine both the age of information (AoI) and the message rate (rate). We study the tradeoff between the achievable message rate and the achievable average AoI. We propose several achievable schemes and compare their rate-AoI performances. I. I NTRODUCTION We consider an energy harvesting transmitter sending status updates to a receiver via status update packets. Each status update packet requires a unit of energy; and the transmitter harvests energy stochastically over time, one unit at a time, at random times.1 In order to minimize the age of information (AoI), the transmitter needs to send frequent and regular (over time) status updates, however, the frequency and regularity of the updates are constrained by the stochastic energy arrival process, which is known only causally at the transmitter. In this paper, different from the existing literature, we consider the scenario where the timings of the status updates also carry an independent message; see Fig. 1. In order to obtain a tractable formulation, we consider an abstraction where the physical channel is noiseless and the transmitter has a battery of unit size. Intuitively, as will be clarified shortly, there is a tradeoff between the AoI and the rate of the message. Our goal in this paper is to characterize this tradeoff. For this scenario, under causal (i.e., online) knowledge of energy arrivals, [1] has determined that, in order to minimize the long-term average AoI, the transmitter needs to apply a threshold based policy: There exists a fixed and deterministic threshold τ0 such that if an energy arrives sooner than τ0 seconds since the last update, the transmitter waits until τ0 and sends the update packet; on the other hand, if it has been more than τ0 seconds since the last update, the transmitter sends an update packet right away when an energy arrives. On the other hand, again for this scenario, [2] has considered the information-theoretic capacity of this energy harvesting channel. The main information-theoretic challenge arises due to having a state-dependent channel (where the state is the This work was supported by NSF Grants CCF 14-22111/14-22347, CNS 15-26608/15-26165. 1 Energy requirements and energy harvests are normalized. Ei B=1 measurements message (M ) Tx Rx Fig. 1. An energy harvesting transmitter with a finite-sized battery, that sends status updates and independent information to a receiver. energy availability), time-correlation introduced in the state due to the existence of a battery at the transmitter where energy can be saved and used later, and the unavailability of the state information at the receiver. Reference [2] converts the problem from regular channel uses to a timing channel and obtains the capacity in terms of some auxiliary random variables using a bits through queues approach as in [3]. Sending information necessarily requires the transmitter to send out a packet after a random amount of time following an energy arrival in [2], whereas minimizing AoI requires the transmitter to apply a deterministic threshold based policy in [1]. Note that in [1], the transmitter sends a packet either at a deterministic time τ0 after an energy arrival, or right at the time of an energy arrival, thus, it cannot send any rate with the packet timings even though it minimizes the AoI. This is the main source of the tension between AoI minimization and information rate maximization; and is the subject of this paper. In this paper, we first present a general tradeoff region between the achievable AoI and the achievable information rate. We then consider the class of renewal policies in which the system action depends only on the most recent transmission. Within this class of policies, we first propose policies that determine the next transmission instant as a function of the time difference between the most recent energy arrival and the most recent status update. We then consider simpler policies which we call separable policies. These policies separate the update decision and information transmission in an additive manner: When an energy arrives, the transmitter decides when to update, neglecting the information transmission; once the transmitter decides to send an update, it then encodes the message on top of that update timing. For all the policies, we derive the average achievable AoI and the achievable rate. We then compare the tradeoff regions of these policies. We observe numerically that the first class of policies achieve better tradeoff regions. We also observe that as the value of the ∆(t) energy arrival info. symbol V1 Q1 Q2 V2 Q4 Q3 t Z1 (τ1 ) T1 Fig. 2. V1 Z2 (τ2 ) T2 T3 T4 T1 An example evolution of instantaneous AoI. Fig. 3. average energy arrival increases, policies perform similarly. Related Work: Minimizing the AoI has been studied in many different settings, including settings with no energy constraints [4]–[13] and settings with energy constraints in offline and online energy harvesting models [1], [14]–[17]. Energy harvesting communication systems have been extensively studied in scheduling-theoretic and information-theoretic settings, for example, offline scheduling in single-user and multi-user settings have been considered in [18]–[26], online scheduling has been considered in [20], [27]–[32], and information-theoretic limits have been considered in [2], [33]–[36]. II. S YSTEM M ODEL We consider a noiseless binary energy harvesting channel where the transmitter sends status updates and an independent message simultaneously as in Fig. 1. The transmitter has a unit size battery, i.e., B = 1. Energy arrivals are known causally at the transmitter and are distributed according to an i.i.d. Bernoulli distribution with parameter q, i.e., P[Ei = 1] = 1 − P[Ei = 0] = q. Hence, the inter-arrival times between the energy arrivals, denoted as τi ∈ {1, 2, · · · }, are geometric with parameter q. Each transmission costs unit energy; thus, when the transmitter sends an update, its battery is depleted. The timings of the transmitted updates determine the average AoI and the message rate. The instantaneous AoI is given by ∆(t) = t − u(t) τ2 τ1 V2 Z3 (τ3 ) V3 Z4 (τ4 ) V4 (1) T2 Sending information through a timing channel. Then, the minimum AoI is given by ∗ ∆ = inf ∆ = inf lim sup E π∈Π π∈Π n→∞ " Pn Tj2 Pj=1 n 2 j=1 Tj # (4) where Π is the set of all feasible policies. Since the transmitter is equipped with a unit-sized battery and due to energy causality [18], we have Ti ≥ τi . Note that due to the memoryless property of the geometric distribution, we assume without loss of generality, that τi is the time from the instant of the previous update and not the time from the instant of the previous energy arrival. To send information through the timings of the status updates, we consider the model studied in [2, Section V.A]. Thus, here, we assume the knowledge of the energy arrival instants causally at the transmitter and the receiver. The information in the time duration Ti is carried by the random variable Vi ∈ {0, 1, · · · } where we have here Ti = τi + Vi , see Fig. 3. The achievable rate of this timing channel is [2], R = lim inf n = lim inf n I(T n ; V n |τ n ) Pn p(V n |τ n ) i=1 E[Vi ] + E[τi ] sup sup p(V n |τ n ) H(V n |τ n ) i=1 E[Vi ] + E[τi ] Pn (5) (6) where the second equality follows since H(V n |τ n , T n ) = 0. We denote the AoI-rate tradeoff region by the tuple (AoI(r), r), where r is the achievable rate and AoI(r) is the minimum achievable AoI given that a message rate of at least r is achievable, # " Pn 2 j=1 Tj P (7) AoI(r) = inf lim sup E M n→∞ 2 nj=1 Tj where u(t) is the time stamp of the latest received status update packet and t is the current time. An example evolution of the AoI is shown in Fig. 2. The average long-term AoI is # " Pn where M is defined as ) ( j=1 Qj (2) ∆ = lim sup E Pn H(V n |τ n ) ∞ T n→∞ j ≥r M= {Ti }i=1 Ti ≥ τi , lim inf sup Pn j=1 n p(V n |τ n ) " Pn # i=1 E[Vi ] + E[τi ] 2 Tj (8) Pj=1 = lim sup E (3) n 2 n→∞ j=1 Tj where V n denotes (V1 , · · · , Vn ) and similarly for τ n . An where Ti is the duration between two updates, Qj = Tj2 /2 is alternate characterization for the tradeoff region can also be the total accumulated age between two updates represented by done using the tuple (α, R(α)) where the achievable AoI is the area (see Fig. 2), and the expectation is over the energy equal to α and R(α) is the maximum achievable information arrivals and possible randomness in the transmission decisions. rate given that the AoI is no more than α. III. ACHIEVABLE T RADEOFF R EGIONS update in the channel use immediately after an energy arrival. In this section, we consider several achievable schemes. All considered achievable schemes belong to the class of renewal policies. A renewal policy is a policy in which the action Ti at time i is a function of only the current energy arrival instant τi . The long-term average AoI under renewal policies is, " Pn # 2 E[Ti2 ] j=1 Tj Pn (9) ∆ = lim sup E = 2E[Ti ] 2 j=1 Tj n→∞ A. Energy Timing Adaptive Transmission Policy (ETATP) In this policy, the information which is carried in V is a (random) function of the energy arrival realization τ . This is the most general case under renewal policies. The optimal tradeoff can be obtained by solving the following problem which results from renewal reward theory [37, Theorem 3.6.1]. Since we use renewal policies and τi is i.i.d., hereafter, we drop the subscript i in the random variables. Then, the maximum achievable information rate in (6) reduces to, H(V |τ ) p(v|τ ) E[V ] + E[τ ] R = max (10) min p(v|τ ) s.t. max p(v|τ ),m s.t. (11) Next, we present our achievable schemes. In the first scheme, information transmission is adapted to the timing of energy arrivals: If it takes a long time for energy to arrive, the transmitter tends to transmit less information and if energy arrives early, the transmitter tends to transmit more information. This scheme fully adapts to the timings of the energy arrivals, but this comes at the cost of high computational complexity. We then relax the adaptation into just two regions, divided by a threshold c: If energy arrives in less than c slots, we transmit the information using a geometric distribution with parameter pb , and if energy arrives in more than c slots, we transmit the information using another geometric random variable with parameter pa . The choice of a geometric random variable for V here and hereafter is motivated by the fact that it maximizes the information rate when the energy arrival timings are known at the receiver; see [2, Section V.A]. In the previous schemes, the instantaneous information rate depends on the timings of energy arrivals. We next relax this assumption and assume that the instantaneous information rate is fixed and independent of timings of energy arrivals. We call such policies separable policies. In these policies, the transmitter has two separate decision blocks: The first block is for the status update which takes the decision depending on the timing of the energy arrival, and the second block is for encoding the desired message on top of the timings of these updates. This is similar in spirit to super-position coding. In the first separable policy, the update decision is a threshold based function inspired by [1]: if the energy arrives before a threshold τ0 , the update block decides to update at τ0 and if the energy arrives after τ0 , the update block decides to update immediately. The information block does not generate the update immediately, but adds a geometric random variable to carry the information in the timing on top of the timing decided by the update block. In the second separable policy, which we call zero-wait policy, the update block decides to (12) The maximum possible value for r is equal to r∗ = H(V |τ ) maxp(v|τ ) E[V ]+E[τ ] . The solution of this problem can be found by considering the following alternative problem which gives the same tradeoff region and the AoI in (9) reduces to E[T 2 ] E[(V + τ )2 ] ∆= = 2E[T ] 2E[V + τ ] E[(V + τ )2 ] 2E[V + τ ] H(V |τ ) ≥r E[V ] + E[τ ] H(V |τ ) m E[(V + τ )2 ] ≤ 2αE[V + τ ] E[V + τ ] = m (13) For a fixed m, problem (13) is concave in p(v|τ ) and can be solved efficiently. Then, to obtain the entire tradeoff region, we sweep over all possible values of the parameter α (which are all possible values of the AoI). The solution for (13) is found numerically by optimizing over all possible conditional pmfs p(v|τ ) for each value of m. Then, we use line search to search for the optimal m. All this, has to be repeated for all possible values of the AoI α. Finding the optimal solution for (13) has a high complexity, hence, we propose the following policy which reduces this complexity significantly, and at the same time adapts to the timing of the energy arrivals to the extent possible within this set of policies. B. Simplified ETATP In this policy, we simplify the form of the dependence of the transmission on the timings of energy arrivals significantly. The transmitter waits until an energy arrives, if the energy takes more than c slots since the last update, we transmit the information using a geometric random variable with probability of success pb , otherwise the transmitter transmits the information using a geometric random variable with probability of success pa , i.e., the transmitter chooses p(v|τ ) as follows ( pb (1 − pb )v−1 , τ < c p(v|τ ) = , v = 1, 2, · · · (14) pa (1 − pa )v−1 , τ ≥ c In this case, pa , pb and c are the variables over which the optimization is performed. The average achieved information rate as a function of pa , pb and c can be obtained as, R= H2 (pb ) pb (1 − (1 − q)c ) + H2 (pa ) pa (1 − q)c E[τ ] + E[V ] (15) where E[V ] is equal to E[V ] = (1 − pa ) (1 − pb ) (1 − (1 − q)c ) + (1 − q)c pb pa (16) Now, we can calculate the average AoI with this policy as, E[(τ + V )2 ] ∆= = 2E[τ + V ] 2−q q2 + E[V 2 ] + 2E[τ V ] 2E[τ ] + 2E[V ] where we have E[V 2 ] as   2 + p2b − 3pb 2 (1 − (1 − q)c ) E[V ] = p2b   2 + p2a − 3pa + (1 − q)c p2a (17) Finally, we note that in this case E[V 2 ] is equal to,   (1 − pb ) 1 (1 − (1 − q)c+1 ) − (c + 1)(1 − q)c pb q   (1 − pa ) (1 − q)c+1 + (19) + c(1 − q)c−1 pa q This schemes is simpler than the general class of ETATP; still, we need to search for the optimal pa , pb and c. We reduce this complexity further in the next policy. C. Threshold Based Transmission Policy We now present the first separable policy. In this policy, we assume that T = Z(τ ) + V , where the information is still carried only in V ; see Fig. 2. Z(τ ) is the duration the transmitter decides to wait in order to minimize the AoI, while V is the duration the transmitter decides to wait to add information in the timing of the update. Z(τ ) and V are independent which implies that H(V |Z(τ )) = H(V |τ ) = H(V ). The duration Z(τ ) is determined according to a threshold policy as follows, Z(τ ) = τ U (τ − τ0 ) + τ0 U (τ0 − τ − 1) (20) The optimal value of τ0 is yet to be determined and is an optimization variable. The optimal value of τ0 is to be calculated and, thus, known both at the transmitter and the receiver; hence, this threshold policy is a deterministic policy. This ensures that we still have H(V n |τ n , T n ) = 0, which is consistent with (6). We then choose V to be a geometric random variable with parameter p. The tradeoff region can then be written as, min T (τ ),p s.t. E[(Z(τ ) + V )2 ] 2E[Z(τ ) + V ] Z(τ ) ≥ τ H2 (p)/p r≤ (1 − p)/p + E[Z(τ )] (21) where r is a fixed positive number. The feasible values of r are H2 (p)/p in [0, r∗] where r∗ is equal to r∗ = maxp∈[0,1] (1−p)/p+E[τ ]. This follows because the smallest value that Z(τ ) can take is equal to τ . The optimization problem in this case becomes a function of only τ0 and p. We now need to calculate E[Z(τ )] and E[Z 2 (τ )]. We calculate E[Z(τ )] as follows, E[Z(τ )] =(1 − q)τ0 + (1 − q)τ0 +1 + τ0 q E[V 2 ] = (18) and E[τ V ] as E[τ V ] = and we calculate E[Z 2 (τ )] as follows,   2 − 3q 2 E[Z (τ )] = (1−q)τ0 + 2(τ0 +1)(1−q)τ0 q2 (1 − q)τ0 +1 + 2(τ0 + 1) + τ02 (23) q (22) 2 + p2 − 3p p2 (24) Substituting these quantities in the above optimization problem and solving for p and τ0 jointly gives the solution. D. Zero-Wait Transmission Policy This policy is similar to the threshold based policy, with one difference: The update block does not wait after an energy arrives, instead, it decides to update right away, i.e., Z(τ ) = τ . Hence, the tradeoff region can be obtained by solving, min p s.t. E[(τ + V )2 ] 2E[τ + V ] H2 (p)/p r≤ (1 − p)/p + E[τ ] (25) We can then calculate E[(τ +V )2 ] = E[τ 2 +V 2 +2V τ ], where V and τ are independent as the message is independent of the energy arrivals. Since τ is geometric E[τ 2 ] = 2−q q2 . This optimization problem is a function of only a single variable p. This problem is solved by line search over p ∈ [0, 1]. IV. N UMERICAL R ESULTS Here, we compare the tradeoff regions resulting from the proposed schemes. We plot these regions in Figs. 4-6 for different values of average energy arrivals, namely, q = 0.2, q = 0.5 and q = 0.7. For low values of q, as for q = 0.2 in Fig. 4, there is a significant gap between the performance of ETATP and the simplified schemes. For this value of q, in most of the region, simplified ETATP performs better than the threshold and zero-wait policies. As the value of q increases as shown in Fig. 5 and Fig. 6, the gap between the performance of the different policies decreases significantly. In Fig. 5, the threshold and zero-wait policies overlap. In Fig. 6, simplified ETATP, threshold and zero-wait policies overlap. In all cases, zero-wait policy performs the worst. This is consistent with early results e.g., [4], early results in the context of energy harvesting e.g., [14], [15], and recent results [1], [16], [17], where updating as soon as one can is not optimum. R EFERENCES [1] X. Wu, J. Yang, and J. Wu. Optimal status update for age of information minimization with an energy harvesting source. IEEE Trans. on Green Communications and Networking, 2017. To appear. Also available online at arXiv:1706.05773. [2] K. Tutuncuoglu, O. Ozel, A. Yener, and S. Ulukus. The binary energy harvesting channel with a unit-sized battery. IEEE Trans. Info. Theory, 63(7):4240 – 4256, April 2017. [3] V. Anantharam and S. Verdu. Bits through queues. IEEE Trans. Info. Theory, 42(1):4–18, January 1996. [4] S. Kaul, R. Yates, and M. Gruteser. Real-time status: How often should one update? In IEEE INFOCOM, March 2012. 0.45 0.9 0.4 0.8 0.35 0.7 0.3 0.6 0.25 0.5 0.2 0.4 0.15 0.3 0.1 0.2 0.05 0.1 0 4.2 4.4 Fig. 4. 4.6 4.8 5 5.2 5.4 5.6 5.8 The rate-AoI tradeoff region for q = 0.2. Fig. 6. 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0 1.4 Fig. 5. 1.6 1.8 2 2.2 2.4 2.6 0 0.8 2.8 The rate-AoI tradeoff region for q = 0.5. [5] S. Kaul, R. Yates, and M. Gruteser. Status updates through queues. In CISS, March 2012. [6] R. Yates and S. Kaul. Real-time status updating: Multiple sources. In IEEE ISIT, July 2012. [7] C. Kam, S. Kompella, and A. Ephremides. Age of information under random updates. In IEEE ISIT, July 2013. [8] M. Costa, M. Codreanu, and A. Ephremides. Age of information with packet management. In IEEE ISIT, June 2014. [9] Y. Sun, E. Uysal-Biyikoglu, R. Yates, C. E. Koksal, and N. B. Shroff. Update or wait: How to keep your data fresh. In IEEE INFOCOM, April 2016. [10] A. Kosta, N. Pappas, A. Ephremides, and V. Angelakis. Age and value of information: Non-linear age case. Available at arXiv:1701.06927, 2017. [11] A. M. Bedewy, Y. Sun, and N. B. Shroff. Age-optimal information updates in multihop networks. Available at arXiv:1701.05711, 2017. [12] P. Parag, A. Taghavi, and J. Chamberland. On real-time status updates over symbol erasure channels. In IEEE WCNC, pages 1–6, March 2017. [13] R. Yates, E. Najm, E. Soljanin, and J. Zhong. Timely updates over an erasure channel. In IEEE ISIT, June 2017. [14] R. Yates. Lazy is timely: Status updates by an energy harvesting source. In IEEE ISIT, June 2015. [15] B. T. Bacinoglu, E. T. Ceran, and E. Uysal-Biyikoglu. Age of information under energy replenishment constraints. In UCSD ITA, February 2015. [16] A. Arafa and S. Ulukus. Age minimization in energy harvesting communications: Energy-controlled delays. In Asilomar, October 2017. [17] A. Arafa and S. Ulukus. Age-minimal transmission in energy harvesting two-hop networks. In IEEE Globecom, December 2017. [18] J. Yang and S. Ulukus. Optimal packet scheduling in an energy harvesting communication system. IEEE Trans. Comm., 60(1):220–230, January 2012. 1 1.2 1.4 1.6 1.8 The rate-AoI tradeoff region for q = 0.7. [19] K. Tutuncuoglu and A. Yener. Optimum transmission policies for battery limited energy harvesting nodes. IEEE Trans. Wireless Comm., 11(3):1180–1189, March 2012. [20] O. Ozel, K. Tutuncuoglu, J. Yang, S. Ulukus, and A. Yener. Transmission with energy harvesting nodes in fading wireless channels: Optimal policies. IEEE JSAC, 29(8):1732–1743, September 2011. [21] C. K. Ho and R. Zhang. Optimal energy allocation for wireless communications with energy harvesting constraints. IEEE Trans. Signal Proc., 60(9):4808–4818, September 2012. [22] J. Yang, O. Ozel, and S. Ulukus. Broadcasting with an energy harvesting rechargeable transmitter. IEEE Trans. Wireless Comm., 11(2):571–583, February 2012. [23] J. Yang and S. Ulukus. Optimal packet scheduling in a multiple access channel with energy harvesting transmitters. Journal of Comm. and Networks, 14(2):140–150, April 2012. [24] Z. Wang, V. Aggarwal, and X. Wang. Iterative dynamic water-filling for fading multiple-access channels with energy harvesting. IEEE JSAC, 33(3):382–395, March 2015. [25] K. Tutuncuoglu and A. Yener. Sum-rate optimal power policies for energy harvesting transmitters in an interference channel. Journal of Comm. Networks, 14(2):151–161, April 2012. [26] D. Gunduz and B. Devillers. A general framework for the optimization of energy harvesting communication systems with battery imperfections. Journal of Comm. Networks, 14(2):130–139, April 2012. [27] Q. Wang and M. Liu. When simplicity meets optimality: Efficient transmission power control with stochastic energy harvesting. In IEEE INFOCOM, April 2013. [28] M. B. Khuzani and P. Mitran. On online energy harvesting in multiple access communication systems. IEEE Trans. Info. Theory, 60(3):1883– 1898, February 2014. [29] D. Shaviv and A. Ozgur. Universally near-optimal online power control for energy harvesting nodes. IEEE JSAC, 34(12):3620–3631, December 2016. [30] A. Baknina and S. Ulukus. Optimal and near-optimal online strategies for energy harvesting broadcast channels. IEEE JSAC, 34(12):3696– 3708, December 2016. [31] H. A. Inan and A. Ozgur. Online power control for the energy harvesting multiple access channel. In WiOpt, May 2016. [32] A. Baknina and S. Ulukus. Online policies for multiple access channel with common energy harvesting source. In IEEE ISIT, July 2016. [33] O. Ozel and S. Ulukus. Achieving AWGN capacity under stochastic energy harvesting. IEEE Trans. Info. Theory, 58(10):6471–6483, October 2012. [34] W. Mao and B.Hassibi. Capacity analysis of discrete energy harvesting channels. IEEE Trans. Info. Theory, 63(9):5850–5885, September 2017. [35] D. Shaviv, P. Nguyen, and A. Ozgur. Capacity of the energy-harvesting channel with a finite battery. IEEE Trans. Info. Theory, 62(11):6436– 6458, November 2016. [36] V. Jog and V. Anantharam. A geometric analysis of the AWGN channel with a (σ,ρ) -power constraint. IEEE Trans Info. Theory, 62(8):4413– 4438, August 2016. [37] S. M. Ross. Stochastic Processes, volume 2. John Wiley & Sons New York, 1996.
7cs.IT
1 Rohlin Distance and the Evolution of Influenza A virus: Weak Attractors and Precursors arXiv:1112.2608v1 [q-bio.PE] 12 Dec 2011 Raffaella Burioni1,∗ , Riccardo Scalco2 , Mario Casartelli1 1 Dipartimento di Fisica e INFN, Università di Parma, Parma, Italy 2 Department of Biochemistry, University of Zurich, Zurich, Switzerland 3 Dipartimento di Fisica e INFN, Università di Parma, Parma, Italy ∗ E-mail: Corresponding [email protected] Abstract The evolution of the hemagglutinin amino acids sequences of Influenza A virus is studied by a method based on an informational metrics, originally introduced by Rohlin for partitions in abstract probability spaces. This metrics does not require any previous functional or syntactic knowledge about the sequences and it is sensitive to the correlated variations in the characters disposition. Its efficiency is improved by algorithmic tools, designed to enhance the detection of the novelty and to reduce the noise of useless mutations. We focus on the USA data from 1993/94 to 2010/2011 for A/H3N2 and on USA data from 2006/07 to 2010/2011 for A/H1N1 . We show that the clusterization of the distance matrix gives strong evidence to a structure of domains in the sequence space, acting as weak attractors for the evolution, in very good agreement with the epidemiological history of the virus. The structure proves very robust with respect to the variations of the clusterization parameters, and extremely coherent when restricting the observation window. The results suggest an efficient strategy in the vaccine forecast, based on the presence of ”precursors” (or ”buds”) populating the most recent attractor. Introduction There is a long history in approaching DNA and RNA sequences as texts, with quantitative estimates for various kinds of statistical properties and complexity indicators [1, 2]. The general idea behind this approach is that the information encoded in the sequence is strictly related to the properties of the corresponding biological structures and that good indicators should be able to recognize similar functions in different sequences. The sector devoted to estimate the relevance of mutations along a time ordered set of evolving sequences is particularly interesting when a sufficiently long record of samples is accessible, as for viral RNA of rapidly evolving diseases [3–6]. We focus on a definite kind of statistical properties, precisely metric properties. The distance between sequences is a concept admitting several implementations. In the context of evolving viral RNA, distances based on the sequence symbols are mostly of the Hamming type: for two strings a and b of characters, the Hamming distance dH (a, b) is the number of sites with different symbols [7–9]. Such distances are sensitive to local features only, since mutations occurring at different sites are non correlated. In this framework, an interesting solution has been proposed in [8, 9], where, focusing on particular locations of the sequence (the epitopes, whose role and peculiarities in Influenza Virus evolution are well known), authors succeeded in extracting important features of strains evolution. In a sense, the extra information introduced with the choice of the epitopes proved efficient in overcoming the intrinsic uncorrelation of the Hamming metrics, leading to interesting results. Other relevant approaches, based on sequences information only, rely on entropic distances [10–14] referred to the Shannon’s entropy or to compression algorithms, and they are mainly addressed to the comparison of strings of different length in inhomogeneous frameworks, a procedure motivated by the fact that in evolving sequences, beside substitutions, there are frequent insertions and deletions [15]. There are few remarkable alternatives to these ”sequence based” type distances. Hemagglutination 2 inhibition (HI) assays [16], reporting the ability of ferret antibodies, raised against one viral strain, to inhibit a second strain’s ability to agglutinate red blood cells, are currently used to define similarity between antigens [17]. Certainly, the metrics extracted from HI tests is directly related to the real antigenic similarity between strains, but it requires HI assay animal data, which are difficult to obtain with high precision. We intend to introduce an enhanced version of a different metrics, known as Rohlin distance [18, 19], which is based on the sequences symbols and is expected to be sensitive to their global distributions and correlations. It is also founded on the Shannon’s entropy but, differently from other informational functionals, applies in a biologically homogeneous framework. Moreover it does not deal with the frequency probabilities of symbols on single sites, which are too poor as units and do not touch the global structure (see however [11] for interesting improvements in this directions). In our approach, the basic entities are indeed the partitions of a sequence into subsequences, as they are determined, starting from a configuration (the list of amino acids), by a projection operation: precisely, we consider the partitions defined by homogeneous segments. This aims at evidencing the ordered collection of connected subsequences of equal symbols. For instance, the alphabetical string a = AAABBACCCB would be divided into five subsequences, and each subsequence would determine a segment. To the first segment AAA there correspond the site subset with labels (1, 2, 3), to BB the subset (4, 5), etc. The natural length of each segment is the number of its symbols. In the example, the lengths are 3, 2, 1, 3, 1. Once such lengths are correctly normalized, this assignment is equivalent to the definition of a probability measure on the subset algebra, proportional to the number of sites contained in each subset. Finally, partitions can be represented by their bounds, the segment extremes, or more economically by the left extremes, allowing for a simple and straightforward comparison between partitions. In the partition space the Rohlin distance dR is then defined, for any couple of partitions (α, β), by the mutual conditional Shannon entropy (see Materials and Methods for details): dR (α, β) = H(α|β) + H(β|α) . The conditional Shannon entropy H(α|β) represents the residual information needed to describe the segment disposition of α when the disposition of β is known, or, in other terms, how the knowledge of β may contribute to the knowledge of α. Therefore the symmetrized form above, defining dR (α, β), is the total information required to distinguish α and β, seen as schemes of segments with their probabilities. In absence of a bias, our choice, assigning equal weight to each site and leading to a measure proportional to the length, is the most natural. Other probability measures can be defined, but they cannot depend on the configurations, since in that case the same set would have different measures for two configurations, and the conditional Shannon entropy would loose its meaning, inhibiting the very definition of Rohlin distance. The segmentation provided by the partitioning of the sequences into homogeneous subsequences entails many advantages: its definition is simple and universal; sequences are not too tightly fractioned, as by single symbols; no a priori knowledge is required, along with the exigence of a “black box” analysis. Moreover, even if segments have no intrinsic biological meaning (and this could appear as an inconvenience), alterations in their overall distributions, as those emerging in historical records, are by definition compatible with the biologically efficient features proposed by evolution [20]. Thus, by using probabilities which arise from this geometrical and topological asset, the distance dR (α, β) measures the information content carried by evolution, giving evidence to the emerging dissimilarities. Clearly, this content should be filtered, as far as possible, from the effects of the non evolving part: to this end we introduce the so called reduction process π, a method designed to amplify the relevant differences between partitions by dropping their common sub-partitions. This means that for b = π(α, β) at amplified distance. From a practical point any couple (α, β) there is a reduced couple (b α, β) of view, the reduction consists in erasing the common extremes of segments between two partitions. A key point is that this method proves surprisingly effective also in filtering the noise of useless mutations. Details are given in the Material and Methods section. 3 We shall deal here with an interesting example of a highly mutating sequence, the RNA of influenza A virus, whose databases are particularly rich. More precisely, we consider the amino acids sequence of the surface protein hemagglutinin for H3N2 subtype Influenza A virus [21], with human as host, in 1470 strains collected in USA from 1993/94 to 2010/2011 [22], and the analogous sequence for H1N1 subtype for 2506 strains collected in USA from 2006/07 to 2010/2011. As our method works on equal length strings and it is based on an informational metrics with long range correlations, it is expected to perform better when applied to the longest sequences. We therefore choose the full length (566) HA sequences, which are a subsample of the available sequences. We also consider sequences identified by a complete date, as the time when the sequence appears represents an important information in our analysis. The restriction to the USA sequences is motivated by several facts. First, choosing sequences from the temperate regions, we give relevance to the seasonal timing of the virus evolution, minimizing the interference with a dephased development; second, the geographical bounds in the sampling ensure that we are looking, season by season, to a reasonably stable population. Notwithstanding these restrictions, for example for H3N2 we process 1470 sequences over 1986 in the northern hemisphere (more than 74 %) and over 2759 in the world (more than 53 %). In other words, we keep the statistical majority, disregarding only possible noise. Analogous estimates hold for the processed H1N1 sequences. After partitioning each sequence, we calculate the Rohlin distance between all the partition pairs, and analyze the whole sequences sample by the hierarchical complete linkage clustering algorithm [23] on the distance matrix. The procedure has strong analogies with the analysis presented in [9, 24] but in a completely different metric space, namely the partition space instead of the configuration space. Our analysis traces the evolution of topological properties of the sequences, while the virus escapes following its antigenic drift. Interestingly, the structures arising in the sequence space according to this metrics result to be quite meaningful; they individuate indeed well defined regions of the sequences space acting as weak attractors [9,17], where the evolution of the virus takes place for definite periods. Moreover, the attractors display precursors [9, 17], i.e. sequences populating the regions well before they are identified as circulating strains, an information which appears to be relevant in the forecast problem, suggesting an alternative strategy in vaccines formulation. Once again there are analogies but also differences with the privileged regions of evolution presented in previous analysis [9]. Our attractors arise indeed from of similitude related to the overall disposition of homogeneous segments, and not to the actual data lying on every site (with the supplementary restriction to epitopes). This means that, more than an overlap of results, the two approaches present complementary points of view, enforcing one another. It is therefore quite remarkable that the vaccine predictions of the two methods agree very well, a fact whose origin is not completely understood yet. Results Clustering and weak attractors in Rohlin metrics Using the sequences set, we calculate the whole N × N matrices of Hamming and Rohlin distances, i.e. b ik , whose entries are respectively dH (ai , ak ) on sequences, or Hik , Rik and reduced Rohlin distance R dR (αi , αk ) and dR (b αi , α bk ) on the corresponding partitions (possibly simplified by the reduction process). The primitive (non-reduced) partitions result to be by far less informative than the reduced ones, so that from now on we shall omit to report calculations on them. This fact is a non trivial result in itself: in principle, by deleting the common bounds, the reduction process could imply indeed the survival of a random set of unstable bounds created by the incoming mutations. This happens, as expected, with artificially created random mutations (as reported in the last subsection). Clearly, far from being more informative, such chaotic residual set would be useless for our scope. The empirical fact we observe is quite different: once the reduction process has cleaned the useless 4 common sub-partitions, the surviving bounds (defining the new reduced partitions), far from being “random”, carry the winning novelty in the adaptive strategy of the virus. In other terms, the effective new disposition of segments is not random because it has been selected. Moreover, the mutual disposition has intrinsically a long range character, which is captured by such a non local metrics as the Rohlin distance is (details on the amplification are given in the mathematical section in Materials and Methods). b ik . The used clustering tool is The scenario emerges from a “clustering analysis” on the matrix R the standard hierarchical complete linkage algorithm [23], where the number p of clusters is an external parameter. An important point is therefore the choice of the optimal p. Since at fixed p every clusterization corresponds to a partition of the whole set into groups populated by n1 , n2 , ..., np sequences, with n1 + n2 + ... + np = N , by defining the probabilities wP i = ni /N, i = 1, 2, ..., p to each clusterization we can associate the Shannon entropy H(w1 , ..., wp ) = − i wi log wi of its probability distribution. Since at growing p the cluster populations cannot increase, the entropy is non-decreasing [25]. However, if it is substantially stable, this means that the clusters are also stable (or equivalently, that newly added probabilities are very small); if it grows, then clusters (and probabilities) are almost continuously splitted into smaller and smaller ones. Now, observing the behaviors of Rohlin and Hamming entropies in Figure 1 for H3N2, we note a clear quasi-plateau for Rohlin in the interval 14 < p < 34, while Hamming is always growing. For the latter, the interpretation is that the Hamming clusters, being an artificial product of the procedure, split with a remarkable continuity. As to Rohlin, the long plateau clearly indicates that the clusters are real structures in the sequences space, keeping a definite individuality in a large observation range. The growth for low p is simply due to the fact that, if the imposed number is too small, (p = 1, 2, 3...), the calculated clusters must contain the real ones, so that at growing p the splitting is effective, up to the optimal number when calculated and real clusters coincide. On the contrary, for p too large, calculated clusters are so numerous that also the real ones begin to split much more effectively than during the peripheral loss registered in the plateau. The plateau extremes may be therefore roughly related to the typical isolation length among real clusters, and to their maximal diameter respectively. Interestingly, the optimal value p = 14, obtained from clustering without additional hypotheses, is consistent with the number of different circulating strains identified by the WHO HI tests. Analogous results obtained for H1N1 are shown in Figure S1. In that case, the optimal value for the clustering parameter is p = 8. Since every sequence is marked by its sampling date, a natural question is the time distribution of the resulting clusters. The upshots for H3N2 are summarized in Figure 2. The part above refers to the b ik . Below, for comparison, to the clustering on Hik . There is no scale on the Y axis clustering on R because the ordinate only distinguishes among clusters (same ordinate ≡ same cluster): order and color have no intrinsic meaning and they have been chosen with readability criteria only. The 11 different polygonal symbols represent the 11 reference viruses, including the alternates, observed in the Northern Hemisphere according to WHO HI tests. Their names are indicated in the plot and the details of the sequences are given in Table 1. The reference sequences are not identified by a time X coordinate. They are processed together with the dataset and they are positioned in the clusters they belong to after the Rohlin clustering procedure. Vertical lines separate winter seasons and are conventionally set at July 31. From the dR clustering of Figure 2, which is very stable by changing p in the plateau range of Figure 1, we can draw several indications. First, there is a clear long temporal extension of clusters, which are densely populated for several winter seasons. Interestingly, they present precursors, that we term ”buds”, and successors, i.e. a bunch of sequences representing viruses that appear, in time, before or after the main part of the cluster [9]. The identification of buds will be explained in details in the next sections. Let us consider, for instance, the 94/95 season. In that year, we observe a bud (Wuhan strain, the yellow cluster) which is getting stronger in the following season, living jointly with the Johannesburg strain, the red cluster. Then, it becomes the dominant strain in 95/96 and 96/97, while it may be considered a successor in 97/98, when the Sidney (light green) is the dominant strain. Notice that the 5 same Sidney was a bud in 96/97. The distribution of clusters suggests that the evolution in the sequence space takes place in preferential regions, corresponding to each cluster, which can be populated well before and after the main season. Such regions act as a kind of weak (i.e. non definitive) attractors. For example, as mentioned, two H3N2 virus strains circulated during 96/97 winter season: Wuhan successors and Sydney buds. Through HI tests, WHO revealed the Wuhan reference virus as the circulating one, recommending it as a vaccine for the season 97/98. It is crucial that, already during 96/97, our analysis shows the emergence of a bud, the Sydney family strain, which is the actual virus circulated in 97/98 winter season. Rohlin attractors correctly describe also the heterogeneity coming from ”outliers” sequenced by the WHO, which must not be treated separately, as it happened in other Hamming based approaches [24]. These sequences naturally fall into a cluster, confirming that Rohlin correctly takes into account the variability present in outliers. A second point is that dR -clustering is consistent with epidemiological WHO-HI data. For example, the subsequent strains A/Wuhan/359/95, A/Sydney/5/97 and A/Moscow/10/99, appeared during years from 95/96 to 02/03 according HI tests, are represented by three well defined clusters (A/Panama/2007/1999 is a Moscow alternate). Interestingly, their reference sequences belong to the correct clusters once they are included in the data set, without any a priori information. In the lower part of Figure 2 the same clustering procedure is shown referring to the Hamming matrix Hik . A definite temporal extension of clusters is observed, in agreement with previous results [9, 24]. However, the cluster temporal distribution obtained from Hik is quite unstable, confirming the dependence on p evidenced in Figure 1. The p used here is the same of Rohlin, but the choice is completely arbitrary because there is not a clear plateau for Hamming. This means that some appearing spots are not true buds, as they results from the almost continuous splitting of Hamming clusters, which are not stable under a change in p. Namely, a new cluster can be produced simply by raising p. Moreover in some seasons (e.g. from 99/00 to 02/03) there is a contrast between WHO indication and the cluster arrangement: some clusters are not represented by any reference sequence, while others are wrongly doubly represented, showing a poorer correlation with HI analysis. For example, Sydney and Moscow reference strains belong to the same cluster while they are expected to be in different ones. Buds in Rohlin weak attractors and vaccine forecast An interesting evidence can be drawn from the position of symbols in the attractors. The symbols above the upper diagram in Figure 2 show in the first row the vaccine indicated by the WHO on the basis of the HI tests in previous seasons, while in the second row they represent the indication we would suggest on the basis of the following criterion: by looking at the dR -cluster distribution, when in a year there are simultaneous strains (with statistically significant populations), we would indicate the newest one, i.e. the bud, as emergent in the next year. This criterion, in other words, sees the novelty carried in emergent buds as a feature enhancing the aggressiveness of the virus. In both the WHO or buds analysis, the symbols are shown in green when the vaccine choice agrees with the circulating strain, in red when they disagree.We used a two-colors symbol when more than one virus circulated in the same season and the corresponding prediction agrees with one of the two circulating strain. Now, the second symbols row indicates that the buds criterion is able to identify correctly the circulating strain every year, apart from the season 01/02 because of the lack of sequences, while the WHO criterion fails in 3 cases over 17. Of course, it will be extremely interesting to verify the criterion on the set of sequences for next season, as soon as they will be available. In the lower part of Figure 2, displaying the results of the same procedure on the Hamming distance, we note that buds as early warning of new strains are not reliable because, as discussed above, the instability in p does not allow for an unambiguous detection of their appearance, as they can be produced by raising the value of p. The bud criterion can be successfully applied also to the very interesting case of H1N1 and the results are shown in Figure 3. The sampling for H1N1 is very inhomogeneous. From 2006 the statistics increases, 6 so we will limit our analysis to this period. From the clustering entropy analysis (shown in Figure S1), the optimal p is 8. The very relevant cluster starting suddenly around April 2009 (red line in Figure 3) [26] represents precisely the pandemic virus appeared in the 2009 season. In that case, the bud criterion partially fails, as it recognizes correctly only the strains circulated at the beginning of the season. This is reasonable, since our method is expected to be effective in simple antigenic drift, and not in the case of a dramatic change, as in the 2009 pandemic case. The shift probably sets a completely new “direction” in the sequence space. Notice that our method evidences the simultaneous occurrence of four well distinct clusters in 2009, a feature missing in the Hamming analysis. The observation of multiple clusters signals could be related to a typical instability of post-pandemic periods, as the one we are facing according to the WHO [26]. We expect this structure to be present also in the new set of sequences for season 2011/12. Restricting the time window Another natural question, the relevance of the examined time window, is treated in Figure 4, displaying the results one would obtain by stopping the data collection at five different years, i.e by applying the clustering to the restricted sets of sequences available at those times. This procedure is intended to clarify how the bud criterion works and to check that it is not an unpredictive a posteriori verification of the vaccine choice, but a real working framework. The time distribution in the X axis describes at various years the position of the H3N2 sequences, exactly as in the upper Figure 2. However, to reproduce exactly the situation in which the WHO vaccine prediction is made, we collect all the sequences available up to March of a given year and we perform our clustering analysis only on that dataset. There is therefore an increasing number of sampled sequences, in every horizontal time sector starting for the upper part down to the lowest. In details, we apply our entropy criterion each time to the dataset restricted to the end of the winter season of a given year and, from that dataset only, we choose the optimal p for that case. Interestingly, there is a clear plateau in the entropy analysis for every restricted time window, allowing for a unambiguous choice of the number of clusters. The Rohlin entropy analysis from the restricted time window is shown in Figure S2, together with the corresponding one for Hamming. Notice that for the Hamming clustering, there is no clear indication of the number of clusters p from the entropy analysis, nor any evidence of emergent buds. In principle, leaving out part of the data, these clusterings could be different from the final one. It is remarkable that the structure remains the same. Buds are clearly present, as if the evolution took place in a well defined landscape, with preferential “antigenic” directions that are filled during the genetic drift, and acting therefore as weak attractors. The symbols of the reference WHO strains are excluded from the clustering in the time restricted window, as they would represent an a posteriori knowledge. They are associated to each cluster by an inverse analysis, i.e. by calculating the reference WHO strain which has minimum distance with the sequences belonging to the bud cluster. Details on the reverse analysis, applied also to the whole dataset are given in the next subsection. Now, in Figure 4 a syringe indicates the most accredited vaccine for the next year based on the bud criterion: even when the previous years database is poor, the forecast is very good and the cluster corresponding to the syringe is exactly the prevailing cluster observed the next year. By confirming the coherence of the procedure, this result supports the bud emergence criterion for the prediction of the new prevailing strain. Interestingly, our bud criterion, which does not include any additional information on epitopes positions, agrees very well with the dominant strain prediction discussed in [9]. This appears to indicates that the ”black box” Rohlin distance analysis is able to grasp the biological information included in the ”epitopes” metrics, which is certainly correct but requires an additional input (the relevant positions). We notice that our results for the vaccine choice always agree with the prediction of [9] when there is a single circulating strain, while they are complementary when there are two. We do not have a clear explanation for this interesting fact, at the moment. 7 Testing the method: reverse analysis and random permutations The clustering procedure can be performed by a completely different method, which does not consider distances between sequences themselves, as in the hierarchical method, but refers to the WHO different sequences identified by the HI analysis. Precisely, the Rohlin distance has been calculated between each of the 1470 sequences of the H3N2 with all the 11 WHO reference virus strains. The sequences are temporally aligned along the X axis of Figure S3, while the reference strains have a conventional position along the Y axis. In the diagram, each sequence is represented by a point whose X coordinate is its sampling date, and whose Y coordinate corresponds to the nearest WHO reference strain. Surprisingly, the final result of this new procedure is almost the same as the one showed in Figure 2 of the main text, while it is obtained from a completely different analysis. The analogous plot on Hamming distance does not preserve the cluster structure. Once again, the Rohlin distance approach proves robust and consistent with the HI tests analysis. As a further check of the robustness of our results, we consider a random permutation of the site labels, simultaneously performed on all the sequences of the H3N2 dataset. This operation leaves the Hamming distances invariant by definition. Since such a random mixing of the amino acids is biologically meaningless, a natural request is that the conclusions drawn from a correct metrics should crash: this is precisely what happens with the Rohlin distance. In other words, with Rohlin, only the partitions corresponding to the real sequences seem to encode correctly the antigenic drift during the evolution, evidencing a meaningful relation with the global structure of the sequences. Vice versa, the simple global “mutations counting” completely fails to recognize the information deletion caused by the label permutation. The results are presented in Figure S4. Discussion The mechanism underlying influenza A antigenic plasticity, that is, how the virus continually escapes the immune system by producing variant strains that cause re-infection within a few years, remains an outstanding evolutionary problem. There are two main general pictures for this evolution. The first one is based on an almost continuous slow drift from an ancestor sequence, with some large shifts occurring at certain stages of the evolution [27]. The second one relies on a punctuated evolution, where ”antigenic” swarms of sequences populate “basins” in the sequence space for several years, until the circulating swarm “jumps” to another basin, reinfecting the population. Dynamical model for this type of evolution have been built [28], and the evidence of a punctuated antigenic evolution has been put forward by several authors [17, 24, 29–31]. The picture emerging from the Rohlin metrics seems to support such a punctuated evolution with a better fit of epidemiological data, giving also insights on the relevant distance between circulating strains and vaccines. In fact, clusters result to be organized into well defined regions of the sequences space: the virus appears to explore for several seasons the sequence space region corresponding to a certain Rohlin width, until a jump takes it to another attractor, where the evolution starts again (a return to a previous region is also possible). These regions constitute therefore weak attractors in the sense that they are able to trap the virus for a finite time, and they can also be re-populated after years. In other words, weak attractors seem to identify privileged antigenic directions from genetic data. Interestingly, the clusters present “precursors”, that we termed buds, i.e. a small number of sequences which explore in advance the next attractor when most of the strains still belong to the previous one. All goes as if such precursors manage to experience the winning escape strategy, that will be followed by the main swarm in subsequent years, and a clear correlation emerges between the bud, i.e. the younger attractor appeared in a given year, and the circulating strain of the subsequent season. This bud criterion, in parallel with HI analysis, could be helpful in the correct choice of the vaccines. The picture emerging from Rohlin distance analysis appears to hold also by processing analogous data sets 8 as the A/H1N1 in USA. Interestingly, in H1N1 the bud criterion partially fails in 2009, as it recognizes correctly the emerging bud only before the pandemic period, while it is not able to predict the clear new cluster that appears suddenly in April 2009. The analysis correctly signals also the high instability of the post-pandemic phase in 09/10. In conclusion, some main points should be stressed: the first is that no a priori knowledge of biological nature has been used or put into the data set. The indications we have derived from clustering on the distance matrix constitute a genuine emergence. It seems plausible therefore that the same approach could work in similar circumstances, i.e. when a homogeneous set of equal length arrays are at disposal. The second point is the existence of structures in the sequence space, that can be described as weak attractors, where the evolution of the viral species takes place with a discontinuous dynamics. Clearly, a clustering algorithm is expected to recognize a chronological order within the distance matrix, whenever the distance is a monotone function of time, but in that case one would also expect the progressive fragmentation of clusters as the external parameter p grows. Such is, substantially, the behavior suggested by the analysis on the Hamming matrix. On the contrary, the presence of precursors [9], which discontinuously anticipate the onset of future attractors, and the stability of the attractors structure at varying p or sampling, are quite non trivial facts, implying that the Rohlin attractors are not a conventional decomposition in the sequence space; they possess instead a robust, intrinsic, “natural” meaning. It seems therefore that the Rohlin distance on reduced couples is able to evidence a selected variety of admissible “antigenic states”, preferentially explored through mutations, which remains hidden in other metric approaches. The third point is that the “buds emergence criterion” could offer a valuable complementary tool for an optimal strategy in the choice of vaccines. The matter is obviously delicate, and a long series of experimental checks should explore and confirm such a possibility before practical utilization, but we think that an effort in this direction is worthwhile. Materials and Methods Data The main database of reference for H3N2 is constituted by 1470 full-length (566 aa) HA proteins of the H3N2 subtype Influenza A virus isolated in USA from 1993/94 to 2010/11, excluding sequences with an incomplete sampling date. Such set is enriched with the 11 reference sequences corresponding to the reference viruses circulated in the same years according to WHO HI analysis [32]. The total is N = 1481 sequences , written in the 20 amino acids alphabet. As for H1N1, the main database of reference is constituted by N = 2506 full-length (566 aa) HA proteins of the H1N1 subtype Influenza A virus isolated in USA from 2006/07 to 2010/2011, excluding sequences with an incomplete date. Such set is enriched with the 4 reference sequences, corresponding to the reference viruses circulated in the same years according to WHO HI analysis [32]. The total is N = 2510 sequences, written in the 20 amino acids alphabet. Sequences and Rohlin Metrics Let K be a finite alphabet of characters (amino acids in our case). A sequence a ≡ (a1 , a2 , ..., aL ), where ak ∈ K, may be thought as a function on the one dimensional array M of sites labeled 1, 2, ..., L. This function defines the configuration or state on M. Every sequence a is therefore an element in a configuration space C(M). A probability measure µ on the finite subset algebra M of M is given by the normalized number of sites in every subset. This means that all sites are assumed to be equivalent. For instance, if L = 12 and a subset E includes sites (2, 5, 10), then µ(E) = 0.25. Other measures are possible, e.g. by assigning weights to the sites. However, such weights (and measures) cannot depend on the configurations, otherwise the same subset of M could have more than one measure simultaneously, 9 and the functionals defined below would loose any meaning. A partition α ≡ (A1 , ..., Am ) of M is an exhaustive collection of disjoint subsets (called “atoms”) of M. The space Z(M) is the set of all possible partitions of M, where a partial order α ≤ β means that β refines α. The “product” γ = α ∨ β ≡ αβ (a close analogous of the minimal common multiple) is the minimal partition refining both factors α and β. The unit partition ν has only one atom, the whole set M. Obvious properties such as ν ≤ α = αα ≤ αβ easily follow for every α and β. The operation σ = α ∧ β is the maximal common factor (i.e. the most refined common sub-partition) of α and β. Clearly, ν ≤ α ∧ β ≤ α, etc. Every partition may be thought as an experiment where an elementary or atomic event Ak occurs with probability µ(Ak ). Then, the meaning of the definitions above is that ν is the trivial experiment, α ≤ β means that α is a sub-experiment of β, etc. The Shannon’s entropy H(α) is defined as: H(α) = − m X µ(Ai ) ln µ(Ai ) . (1) i=1 If β = (B1 , ..., Bs ), is another partition, the conditional entropy H(α|β) is H(α|β) = − s m X X µ(Ai ∩ Bk ) ln i=1 k=1 µ(Ai ∩ Bk ) = H(αβ) − H(β). µ(Bk ) (2) These quantities give respectively the mean incertitude of an experiment α and the residual mean incertitude on α when the result of β is known [25]. Now, for all α and β in Z(M), the Rohlin distance is: dR (α, β) = H(α|β) + H(β|α) . (3) The useful formula dR (α, β) = 2H(αβ) − H(α) − H(β) (4) follows from Eq. 2. Thus, dR (α, β) is a measure of the overall non-similarity between α and β, giving account of the mutual correlations among the respective outcomes [18,19]. These concepts and definitions hold true in all probability spaces. For discrete spaces (graphs or lattices), where the states or configurations are determined by the values assumed by sites j’s in a finite alphabet K, dR is therefore deeply different from the well known Hamming distance dH between configurations a and b. This distance is defined, up to a possible normalization factor, by: X dH (a, b) = | bj − aj | . (5) j where | x − y | is a distance in K if the alphabet is numerical, otherwise is 1 for aj 6= bj and 0 for aj = bj (as in our case, since K is the alphabet of amino acids). Counting the sites with different symbols regardless of their position, dH tells one nothing about correlations between mutations. It is important to stress that the Hamming and Rohlin distances are not defined on the same objects, the former being between configurations in C(M), the latter between partitions in Z(M). In our particular case, where M is a one-dimensional finite lattice, and the states (or configurations) are character sequences of length L, we shall work with partitions generated by homogeneous segments, i.e. consecutive sites with the same value in K. Of course, in Z(M) there exist much more partitions, e.g. those with non connected atoms. As an example with L = 12, consider the fictional configuration a = {A A A T T C A A A F F B } The atoms (indicated by the site labels) of the corresponding partition α = Φ(a) are {(1, 2, 3), (4, 5), (6), (7, 8, 9), (10, 11), (12)}. The map Φ : C → Z is univocal but non invertible, since several configurations are mapped into the same partition. For instance, a mutation 10 from C to B as in {... T T C A A ...} → {... T T B A A ...}, does not affect the boundaries, and it leaves the segment structure unchanged. Thus, by the correspondence Φ and the Rohlin distance, we can evaluate “how different” are the states on M with regard to the correlated distribution of segments. It is true that there is a loss of information due to the projection of many configurations into the same partition; but a comparable loss takes place also for Hamming, since the single site contribute gives account only for the “equal-or-not” distinction in K. Moreover, as noticed, sites in dH are always totally uncorrelated. The non-similarity between two partitions could be confused and weakened by the presence of a tight common factor, that we would eliminate as far as possible, in order to amplify the Rohlin distance giving evidence to the real emerging novelty. However, such a “reduction” operation (analogous to the reduction to minimal terms for fractions) is not uniquely defined because partitions do not admit a unique factorization into primes [33,34]. The role of prime (i.e. indecomposable) factors can be played by dichotomic sub-partitions, which are still extremely redundant. Then, the key point consists in defining for each partition a restricted family E(α) of “elementary” dichotomic factors, with the following features: 1. E(α) must be well defined for every α ∈ Z, or at least in the subset of Z actually under investigation; 2. E(α) does not contain more factors than the number m of atoms in α; 3. ∨m ek = α. k=1 α Now, assuming that the elementary factors families E(α) and E(β) have been defined, the reduction process consists in the following steps: 1. define the maximal common divisor σ = α ∧ β; 2. drop from E(α) and E(β) those factors which are not relatively prime with σ, and note the surviving factors α bk and βbj respectively (i.e. α bk ∧ σ = βbj ∧ σ = ν); 3. define α b = ∨k α bk and βb = ∨j βbj . In other words, we drop those dichotomic factors which are subfactors of the maximal common factor σ, b are generated by the surviving factors. The amplification of non-similarity is a and the reduced (b α, β) consequence of the following property: b ≥ dR (α, β). Proposition: dR (b α, β) b indeed, as The proof is elementary recalling that, if σ = α ∧ β, we can write α = σ α b and β = σ β: mentioned, σ contains all the factors dropped during the reduction. Therefore, by formula (4) and the b can be rephrased as fact that σσ = σ, the thesis dR (α, β) ≤ dR (b α, β) b − H(σ α b ≤ 2H(b b − H(b b 2H(αβ) − H(α) − H(β) ≡ 2H(σ α bβ) b) − H(σ β) αβ) α) − H(β) (6) Moving terms between the sides b − 2H(b b ≤ H(σ α b − H(β) b , 2H(σ α bβ) αβ) b) − H(b α) + H(σ β) (7) and using formula (2) for the conditional entropy, the thesis reduces to b ≤ H(σ|b b . 2H(σ|b αβ) α) + H(σ|β) But this is clearly true since b ≤ H(σ|b b ≤ H(σ|β) b , H(σ|b αβ) α) and H(σ|b αβ) because the conditioning terms are greater in the left sides, q.e.d. (8) 11 It is important to remark that this amplification regards the anti-similarity of the couple as a whole, while for reduced partitions as single entities the complexity possibly decreases, as expected: this means H(b α) ≤ H(α), etc. b defining this reduction process is many-to-one and idempoThe correspondence π : (α, β) → (b α, β) tent. It is a projection from Z × Z on the subset of irreducible pairs. The process, therefore, essentially depends on the family of elementary factors, a choice which a priori can be implemented in many ways, reflecting the kind of interest the observer has in the experiment. Details and procedures in abstract probability spaces may be found in [33, 34]. Here we sketch an algorithmically easy recipe, fitting the very special case of character strings. By exploiting one-dimensionality, a partition into segments (connected subsequences) can be economically represented by the list of the left bounds of segments. In the example above, α is fully determined by (1, 4, 6, 7, 10, 12). This suggest a very convenient choice of the family of elementary factors: precisely, for every α = {A1 , A2 , ..., Ak , ...AN }, the k-th dichotomic factor α ek ∈ E(α) is α ek = { k [ j=1 Aj , N [ Aj } , j=k+1 and therefore, in terms of labels, the example above for α gives α e1 = (1, 4), α e2 = (1, 6), etc. With such a choice, the reduction process π described above consists in erasing all the common labels apart the first one (label 1 is indeed the necessarily common bound for alignment). For instance, consider again a as above, and a new configuration b = {A A H H H Q Q Q Q A Q Q} . The list for α is (1, 4, 6, 7, 10, 12), the list for β = Φ(b) is (1, 3, 6, 10, 11), the list for σ = α ∧ β is (1, 6, 10). Then, the reduced α b and b β are represented by (1, 4, 7, 12) and (1, 3, 11) respectively. Note that they do not correspond to any new sequences, since the reduction is performed directly in Z(M), not in C(M). A graphic intuitive representation of this reduction is given in Figure 5. Acknowledgments This work is partially supported by the MIUR FIRB grant RBFR08EKEV and by the INFN project ”Biological applications of theoretical physics methods”. The authors thank Roberto Burioni and Nicola Clementi for useful discussion and suggestions. References 1. Waterman M (1995) Introduction to computational biology. Chapman and Hall, CRC Press. 2. Pevzner P (2000) Computational Molecular Biology: An Algorithmic Approach. MIT Press, Cambridge MA. 3. Hampson A (2002) Influenza. C.W. Potter Eds., Elsevier, London. 4. Hoftand D, Belshe R (2004) The genetic archaeology of influenza. New England Journal of Medicine 351: 2550-2551. 5. Nelson M, Holmes E (2007) The evolution of epidemic influenza. Nat Rev Genet 8: 196-205. 6. Liao Y, Lee M, Ko C, Hsiung C (2008) Bioinformatics models for predicting antigenic variants of influenza A/H3N2 virus. Bioinformatics 24: 505-512. 12 7. Hamming R (1950) Error detecting and error correcting codes. Bell System Technical Journal 29: 147-160. 8. Gupta V, Earl D, Deem M (2006) Quantifying influenza vaccine efficacy and antigenic distance. Vaccine 24: 3881-3888. 9. He J, Deem M (2010) Low-dimensional clustering detects incipient dominant influenza strain clusters. Prot Eng, Des Sel 23: 935–946. 10. Otu H, Sayood K (2003) A new sequence distance measure for phylogenetic tree reconstruction. Bioinformatics 19: 2122-2130. 11. Xia Z, Jin G, Zhu J, Zhou R (2009) Using a mutual information-based site transition network to map the genetic evolution of influenza A/H3N2 virus. Bioinformatics 25: 2309-2317. 12. Ouyang Z, Zhu H, Wang J, She Z (2004) Multivariate entropy distance method for prokaryotic gene identification. J Bioinform Comput Biol 2: 353-373. 13. Butte A, Kohane I (2000) Mutual information relevance networks: functional genomic clustering using pairwise entropy measurements. Pac Symposium on Biocomputing 5: 415-426. 14. Rao S, Rodriguez A, Benson G (2005) Evaluating distance functions for clustering tandem repeats. Genome Informatics 16: 3-12. 15. Baxevanis A, Ouellette B (2005) Bioinformatics: A Practical Guide to the Analysis of Genes and Proteins. Wiley New York. 16. Hirst G (1943) Studies of antigenic differences among strains of influenza A by means of red cell agglutination. J Exp Med 78: 407-423. 17. Smith D, Lapedes A, de Jong J, Bestebroer T, Rimmelzwaan G, et al. (2004) Mapping the antigenic and genetic evolution of influenza virus. Science 305: 371-376. 18. Arnold V, Avez A (1967) Problèmes Ergodiques de la Mécanique Classique. Gauthier-Villars, Paris. 19. Martin N, England J (1981) Mathematical Theory of Entropy. Addison-Wesley, Reading MA. 20. Sun J, Deem M (2007) Spontaneous emergence of modularity in a model of evolving individuals. Physical Review Letters 99: 228107-11. 21. Wolf Y, Nikolskaya A, Cherry J, Viboud C, Koonin E, et al. (2010) Projection of seasonal influenza severity from sequence and serological data. PLoS Curr 3;2: RRN1200. 22. Bao Y, Bolotov P, Dernovoy D, Kiryutin B, Zaslavsky L, et al. (2008) The influenza virus resource at the national center for biotechnology information. J Virol 82: 596-601. 23. Hastie T, Tibshirani R, Friedman J (2009) The Elements of Statistical Learning. Springer, New York. 24. Plotkin J, Dushoff J, Levin S (2002) Hemagglutinin sequence clusters and the antigenic evolution of influenza A virus. Proc Natl Acad Sci USA 99: 6263-6268. 25. Khinchin A (1957) Mathematical Foundations of Information Theory. Dover, New York. 26. Morens D, Taubenberger J, Fauci A (2010) The 2009 H1N1 pandemic influenza virus: What next? mBio 1(4): e00211. 13 27. Fitch W, Bush R, Bender C, Cox N (1997) Long term trends in the evolution of H(3) HA1 human influenza type A. Proc Natl Acad Sci USA 94: 7712-7718. 28. Koelle K, Cobey S, Grenfell B, Pascual M (2006) Epochal evolution shapes the phylodynamics of interpandemic influenza a (H3N2) in humans. Science 314: 1898-1903. 29. Pybus O, Rambaut A (2009) Evolutionary analysis of the dynamics of viral infectious disease. Nat Rev Genet 10: 540-550. 30. Recker M, Pybus O, Nee S, Gupta S (2007) The generation of influenza outbreaks by a network of host immune responses against a limited set of antigenic types. Proc Natl Acad Sci USA 104: 7711-7716. 31. Holmes E, Ghedin E, Miller N, Taylor J, Bao Y, et al. (2005) Whole-genome analysis of human influenza A virus reveals multiple persistent lineages and reassortment among recent H3N2 viruses. PLoS Biol 3(9): e300. 32. Data was obtained from the NIAID IRD online through the web site at http://www.fludb.org. 33. Agliari E, Casartelli M, Vivo E (2010) Metric characterization of cluster dynamics on the sierpinski gasket. J Stat Mech : P09002. 34. Casartelli M, Dall’Asta L, Rastelli E, Regina S (2004) Metric features of a dipolar model. J Phys A: Math Gen 37: 11731-11749. 14 Figure Legends Figure 1. Looking for optimal p in clustering. Clustering entropy for Hamming and Rohlin distance at different p values for H3N2. The plateau, in Rohlin, suggests an optimal and stable result for the clustering. 15 Figure 2. Clusters and time evolution for H3N2. (upper part) Rohlin clusters time evolution for H3N2. (lower part) Hamming clusters time evolution for H3N2. The reference WHO sequences are shown by the corresponding symbols and names, and the details are indicated in Table 1. In the upper part, we indicate the vaccine choice according to the WHO indication (up) and to buds criterion (lower). Green and red colors indicate right and wrong choice with respect to the corresponding analysis on the real circulating strain. A double color is used when more than one strain circulated in that year and the corresponding prediction agrees with one of the circulating strain. 16 Figure 3. Clusters and time evolution for H1N1. (upper part) Rohlin clusters time evolution for H1N1. (lower part) Hamming clusters time evolution for H1N1. The reference WHO sequences are shown by the corresponding symbols, as indicated in Table 2. In the upper part, we indicate the vaccine choice according to the WHO indication (up) and to buds criterion (lower). Green and red colors indicate right and wrong choice. In this case, some of the symbols does not correspond to a specific HI test, so they are indicated by a star and a pentagon. Notice the onset of the pandemic virus and the failure of the bud criterion after that line. 17 Figure 4. Changing the time window. Rohlin analysis during years. Clusters structure is robust under a sampling increase, and buds appeared during seasons correctly reveal the future circulating strains, as indicated by the syringe. 18 Figure 5. Reduction. Two partitions α and β (derived from sequences as given in the text) and their maximal common factor σ. Thick vertical lines individuate the atomic segments. Below, the reduced b Colors in α and β remind the source configurations. There are no colors in σ, α partitions α b and β. b and b β because these partitions do not originate from sequences of symbols but are directly defined in the partition space. 19 Tables Table 1. Symbols legend for Fig. 2: # 3 D 2 7  F 8  I A/Johannesburg/33/1994 A/Wuhan/359/1995 A/Sydney/5/1997 A/Panama/2007/1999 A/Moscow/10/1999 A/Wyoming/03/2003 A/New York/55/2004 A/Hiroshima/52/2005 A/Brisbane/10/2007 A/Uruguay/716/2007 A/Perth/16/2009 AY661180 AY661190 EF566075 DQ508865 DQ487341 CY034108 CY033638 EU283414 CY035022 EU716426 GQ293081 Table 2. Symbols legend for Fig. 3: # 7 3 D A/New Caledonia/20/1999 A/Solomon Islands/3/2006 A/Brisbane/59/2007 A/California/07/2009 CY033622 EU124177 CY058487 FJ969540 20 Supporting Information Legends Figure S1: Looking for optimal p in clustering for H1N1. Clustering entropy for Rohlin and Hamming at different p values for influenza A H1N1. The long plateau, in Rohlin, suggests a stable and well defined value for the optimal p. Notice that Hamming is growing. 21 Figure S2: Looking for optimal p in clustering for H3N2 in the restricted time window. Clustering entropy for Rohlin and Hamming at different p values for influenza A H3N2, as obtained by considering only the sequences up to the end of the winter season of the year indicated in the plot. In each time window, the long plateau, in Rohlin, suggests a stable and well defined value for the optimal p. This figure is in correspondence with Fig. 4 of the main text. 22 Figure S3: Reverse analysis for Rohlin clusters. Sequences of minimum distance with the corresponding WHO reference sequences, during years. The great similarity with Fig. 2 shows a strong consistency between Rohlin and HI analysis. Figure S4: Clustering on random permutations. Effect of random permutation of symbols on the entropy of the clustering, as a function of p. R indicates the entropy of clustering with the Rohlin distance and P stands for the entropy of clustering in the sample, obtained under a random permutation of symbols in each sequence.
5cs.CE
Finding Largest Common Substructures of Molecules in Quadratic Time? Andre Droschinsky, Nils Kriege, and Petra Mutzel arXiv:1610.08739v1 [cs.DS] 27 Oct 2016 Dept. of Computer Science, Technische Universität Dortmund, Germany {andre.droschinsky,nils.kriege,petra.mutzel}@tu-dortmund.de Abstract. Finding the common structural features of two molecules is a fundamental task in cheminformatics. Most drugs are small molecules, which can naturally be interpreted as graphs. Hence, the task is formalized as maximum common subgraph problem. Albeit the vast majority of molecules yields outerplanar graphs this problem remains NP-hard. We consider a variation of the problem of high practical relevance, where the rings of molecules must not be broken, i.e., the block and bridge structure of the input graphs must be retained by the common subgraph. We present an algorithm for finding a maximum common connected induced subgraph of two given outerplanar graphs subject to this constraint. Our approach runs in time O(∆n2 ) in outerplanar graphs on n vertices with maximum degree ∆. This leads to a quadratic time complexity in molecular graphs, which have bounded degree. The experimental comparison on synthetic and real-world datasets shows that our approach is highly efficient in practice and outperforms comparable state-of-the-art algorithms. 1 Introduction The maximum common subgraph problem arises in many application domains, where it is necessary to elucidate common structural features of objects represented as graphs. In cheminformatics this problem has been extensively studied [11,4,12] and is often referred to as maximum or largest common substructure problem. Two variants of the problem can be distinguished: The maximum common induced subgraph problem (MCIS) is to find isomorphic induced subgraphs of two given graphs with the largest possible number of vertices. The maximum common edge subgraph problem (MCES) does not require that common subgraphs are induced and aims at maximizing the number of edges. Both variants can be reduced to a maximum clique problem in the product graph of the two input graphs [11]. In cheminformatics MCES is used more frequently since it (i) reflects the notion of chemical similarity more adequately [11], and (ii) can reduce the running time of product graph based algorithms [10]. Although such algorithms still have exponential running time in the worst case, they are commonly applied to molecular graphs in practice [11]. ? This work was supported by the German Research Foundation (DFG), priority programme “Algorithms for Big Data” (SPP 1736). 2 A. Droschinsky, N. Kriege, P. Mutzel However, there are several restricted graph classes which render polynomial time algorithms possible [1,2,14]. The seminal work in this direction is attributed to J. Edmonds [9], who proposed a polynomial time algorithm for the maximum common subtree problem. Here, the given graphs and the desired common subgraph must be trees. Recently, it was shown that this problem can be solved in time O(∆n2 ) for (unrooted) trees on n vertices with maximum degree ∆ [3]. The (induced) subgraph isomorphism problem (SI) is to decide if a pattern graph is isomorphic to an (induced) subgraph of another graph and is generalized by MCIS and MCES, respectively. Both variants of SI are NP-complete, even when the pattern is a forest and the other graph a tree [5]; just as when the pattern is a tree and the other is outerplanar [13]. On the other hand, when both graphs are biconnected and outerplanar, induced SI can be solved in time O(n2 ) [13] and SI in O(n3 ) [8]. These complexity results and the demand in cheminformatics lead to the consideration of MCES under the so-called block and bridge preserving (BBP) constraint [12], which requires the common subgraph to retain the local connectivity of the input graphs. BBP-MCES is not only computable in polynomial-time, but also yields meaningful results for cheminformatics. A polynomial-time algorithm was recently proposed for BBP-MCIS, which requires time O(n6 ) in series-parallel and O(n5 ) in outerplanar graphs [6]. Most of the above mentioned polynomial time algorithms are either not applicable to molecular graphs or impractical due to high constants. A positive exception is the BBP-MCES approach of [12], which has been shown to outperform state-of-the-art algorithms on molecular graphs in practice. This algorithm is stated to have a running time of O(n2.5 ), but in fact leads to a running time of Ω(n4 ) in the worst case [3]. Our contribution. We take up the concept of BBP and propose a novel BBPMCIS algorithm with running time O(∆n2 ) in outerplanar graphs with n vertices and maximum degree ∆. We obtain this result by combining ideas of [3] for the maximum common subtree problem with a new algorithm for biconnected MCIS in biconnected outerplanar graphs. For this subproblem we develop a quadratic time algorithm, which exploits the fact that the outerplanar embedding of a biconnected outerplanar graph is unique. Moreover, the algorithm allows to list all solutions in quadratic total time. Our approach supports to solve BBP-MCIS w.r.t. a weight function on the mapped vertices and edges. The experiments show that BBP-MCIS in almost all cases yields the same results as BBP-MCES for molecular graphs under an adequate weight function. Our method outperforms in terms of efficiency the BBP-MCES approach of [12] by orders magnitude. 2 Preliminaries We consider simple undirected graphs. Let G = (V, E) be a graph, we refer to the set of vertices V by V (G) or VG and to the set of edges by E(G) or EG . An edge connecting two vertices u, v ∈ V is denoted by uv or vu. The order |G| of a graph G is its number of vertices. Let V 0 ⊆ V , then the graph G[V 0 ] = (V 0 , E 0 ) with Finding Largest Common Substructures of Molecules in Quadratic Time 3 E 0 = {uv ∈ E | u, v ∈ V 0 } is called induced subgraph. For U ⊆ V we write G \ U for G[V \ U ]. A graph is connected if there is a path between any two vertices. A connected component of a graph G is a maximal connected subgraph of G. A graph G = (V, E) with |V | ≥ 3 is called biconnected if G \ {v} is connected for any v ∈ V . A maximal biconnected subgraph of a graph G is called block. If an edge uv is not contained in any block, the subgraph ({u, v}, {uv}) is called a bridge. A vertex v of G is called cutvertex, if G \ {v} consists of more connected components than G. A graph is planar if it admits a drawing on the plane such that no two edges cross. The connected regions of the drawing enclosed by the edges are called faces, the unbounded region is referred to as outer face. An edge and a face are said to be incident if the edge touches the face. Two faces are adjacent if they are incident with a common edge. A graph is called outerplanar if it admits a drawing on the plane without crossings, in which every vertex lies on the boundary of the outer face. A matching in a graph G = (V, E) is a set of edges M ⊆ E, such that no two edges share a vertex. A matching M is maximal if there is no other matching M 0 ) M and perfect, if 2|M | = |V |. A weighted graph is a graph endowed with a function w : E → R. A matching M in P a weighted graph has weight by W (M ) := e∈M w(e); it is a maximum weight matching (MWM) if there is no matching M 0 of G with W (M 0 ) > W (M ). An isomorphism between two graphs G and H is a bijection φ : V (G) → V (H) such that uv ∈ E(G) ⇔ φ(u)φ(v) ∈ E(H). A common (induced) subgraph isomorphism is an isomorphism between (induced) subgraphs G0 ⊆ G and H 0 ⊆ H. A subgraph G0 ⊆ G is block and bridge preserving (BBP) if (i) each bridge in G0 is a bridge in G, (ii) any two edges in different blocks in G0 are in different blocks in G. A common subgraph isomorphism φ is BBP if both subgraphs are BBP, it is maximal if it cannot be extended. Molecular graphs are typically annotated with atom and bond types, which should be preserved under isomorphisms. More general, we allow for a weight function ω : (VG × VH ) ∪ (EG × EH ) → R≥0 ∪ {−∞}. The weight W(φ) of an isomorphism φ between G and H under ω is the sum of the weights ω(v, φ(v)) and ω(uv, φ(v)φ(v)) for all vertices v and edges uv mapped by φ. A common subgraph isomorphism φ is maximum if its weight W(φ) is maximum. A maximum isomorphism does not map any vertices or edges contributing weight −∞ and we call these pairs forbidden. We further define [1..k] := {1, . . . , k} for k ∈ N. 3 Biconnected MCIS in Outerplanar Graphs In this section we present an algorithm to determine the weight of a maximum common biconnected induced subgraph isomorphism (2-MCIS) of two biconnected outerplanar graphs. First we show how to compute the maximal common biconnected subgraph isomorphisms. Since these may contain forbidden vertex and edge pairs, we then describe how to obtain the weight of a maximum solution from them. Finally we show how to output one or all maximum solutions. Outerplanar graphs are well-studied and have several characteristic properties, see [13] for further information. In particular, our algorithm exploits the fact 4 A. Droschinsky, N. Kriege, P. Mutzel that biconnected outerplanar graphs have a unique outerplanar embedding in the plane (up to the mirror image). In these embeddings, every edge is incident to exactly two faces that are uniquely defined. We observe that the mapping is determined by starting parameters, i.e., an edge of both input graphs together with the mapping of their endpoints and incident faces. We say a face is mapped by an isomorphism φ if all the vertices bordering the face are mapped by φ. We distinguish four cases to describe the mapping of an edge uv ∈ E(G) to an edge u0 v 0 ∈ E(H) by an isomorphism φ between biconnected induced subgraphs. Assume the edge uv is incident to the faces A and B in G and u0 v 0 is incident to A0 and B 0 in H, see Fig. 1(a). At least one face incident to uv must be mapped by φ, since the common subgraph must be biconnected. For the sake of simplicity of the case distinction, we also associate the two other faces, regardless of whether they are mapped or not. The isomorphism may map the endpoints of the edges in two different ways—just as the two incident faces. We can distinguish the following four cases: (1) u 7→ u0 , v 7→ v 0 , A 7→ A0 , B 7→ B 0 , (2) u 7→ v 0 , v 7→ u0 , A 7→ A0 , B 7→ B 0 , (3) u 7→ u0 , v 7→ v 0 , A 7→ B 0 , B 7→ A0 , (4) u 7→ v 0 , v 7→ u0 , A 7→ B 0 , B 7→ A0 . Given an isomorphism φ between biconnected common induced subgraphs that maps the two endpoints of an edge e, let the function type(e, φ) ∈ [1..4] determine the type of the mapping as above. The following result is the key to obtain our efficient algorithm. Lemma 1. Let φ and φ0 be maximal isomorphisms between biconnected common induced subgraphs of the biconnected outerplanar graphs G and H. Assume e ∈ E(G) is mapped to the same edge e0 ∈ E(H) by φ and φ0 , then type(e, φ) = type(e, φ0 ) ⇐⇒ φ0 = φ. Proof. It is obvious that the direction ⇐= is correct. We prove the implication =⇒. Since the common subgraph is required to be biconnected, the isomorphisms φ and φ0 both must map at least one face of G incident to the edge e to a face of H incident to e0 . The two faces as well as the mapping of endpoints of the two edges are uniquely determined by the type of the mapping. We consider the mapping of the vertices on the cyclic border of these faces. Since the mapping of the endpoints of e are fixed, the mapping of all vertices on the border of the face is unambiguously determined. Since the common subgraph is required to be biconnected, every extension of the mapping must include all the vertices of a neighboring face. For this face, again, the mapping of the endpoints of the shared edge implicates the mapping of all vertices on the cyclic border and the extension is unambiguous. Therefore, the mapping can be successively extended to an unmapped face. Consequently φ(u) = φ0 (u) holds for all u ∈ dom(φ) ∩ dom(φ0 ). Since φ and φ0 are maximal it is not possible that one of them can be extended and, hence, we must have dom(φ) = dom(φ0 ) and the result follows. t u The proof of Lemma 1 constructively shows how to obtain a maximal solution given two edges uv ∈ E(G), u0 v 0 ∈ E(H) and a type parameter t ∈ [1..4]. We assume that this approach is realized by the procedure MaximalIso(uv, u0 v 0 , t), Finding Largest Common Substructures of Molecules in Quadratic Time 5 Algorithm 1: 2-MCIS in outerplanar graphs 1 2 3 4 5 6 7 Input : Biconnected outerplanar graphs G and H. Output : Weight of a maximum common biconnected subgraph isomorphism. Data : Table D(e, f, t), e ∈ E(G), f ∈ E(H), t ∈ [1..4] storing the weight of a 2-MCIS φ mapping e to f with type(e, φ) = t. forall the uv ∈ E(G), u0 v 0 ∈ E(H) and t ∈ [1..4] do if type t valid for uv and u0 v 0 and D(uv, u0 v 0 , t) undefined then φ ← MaximalIso(uv, u0 v 0 , t) (φ1 , . . . , φk ) ← SplitIso(φ) forall the edges e ∈ E(G)  mapped to f ∈ E(H) by φ do W (φe ) if e is mapped by the split iso. φe D(e, f, type(e, φ)) ← −∞ otherwise. return maximum entry in D which returns the unique maximal isomorphism that maps the two given edges according to the specified type. The algorithm can be implemented by means of a tree structure that encodes the neighboring relation between inner faces, e.g., SP-trees as in [6,7] or weak dual graphs similar to the approach of [13]. The running time to compute a maximal solution φ then is O(|φ|) ⊆ O(n). Note that for some edge pairs not all four types of mappings are possible. The type t ∈ [1..4] is valid for a pair of edges if at least one incident face can be mapped according to type t, i.e., the edges are incident to faces that are bordered by the same number of vertices. A maximal solution φ may map vertex and edge pairs that are forbidden according to the weight function. In order to obtain the maximum weight, we split φ into split isomorphisms φ1 , . . . , φk such that each (i) has non-negative weight and (ii) again is an isomorphism between biconnected induced common subgraphs. The split isomorphisms can be obtained in time O(|φ|) as follows. We consider the graph G0 = G[dom(φ)]. For every forbidden edge uv that is incident to two inner faces in G0 , we split the graph into G0i [V (Ci ) ∪ {u, v}], where Ci is a connected component of G0 \ {u, v}, i ∈ [1..2]. In these graphs we delete the forbidden vertices and edges and determine the blocks B1 , . . . , Bk . Then φ, restricted to the vertices V (Bi ) of a block Bi , yields the split isomorphism φi for i ∈ [1..k]. This approach is realized by the function SplitIso(φ) used in the following. Every edge e ∈ E(G) is mapped by at most one of the resulting isomorphisms, referred to by φe . Every 2-MCIS is a split isomorphism obtained from some maximal solution. Algorithm 1 uses a table D(e, f, t), e ∈ E(G), f ∈ E(H), t ∈ [1..4] storing the weight of a 2-MCIS under the constraint that it maps e to f according to type t. The size of the table is 4|E(G)||E(H)| ∈ O(nm), where n = |V (G)| and m = |V (H)|. The algorithm starts with all pairs of edges and all valid types of mappings between them. For each, the maximal isomorphism between biconnected common induced subgraphs is computed by extending this initial mapping. By splitting the maximal solution, multiple valid isomorphisms with 6 A. Droschinsky, N. Kriege, P. Mutzel non-negative weight are obtained. These weights are then stored in D for all pairs of edges contained in φ considering the type of the mapping. This includes the −∞ weights occurring if there are forbidden vertices or edges. Keeping these values allows to avoid generating the same isomorphism multiple times. The main procedure loops over all pairs of edges and the four possible mappings for each pair. Note that a mapping φ and its split isomorphisms are computed in time O(|φ|) ⊆ O(n). Improved analysis gives the following result. Theorem 1. Algorithm 1 computes the weight of a 2-MCIS between biconnected outerplanar graphs G and H in time O(|G||H|). Proof. We allocate the costs for a call of MaximalIso followed by SplitIso to cells of the table D. A mapping φ containing k edges is computed in time O(k) and as a result exactly k cells of the table D are filled with a value. The value of a cell is computed at most once: Line 2 assures that an edge mapping of a specific type is not used as initial mapping when the corresponding cell is already filled. Every initial mapping that is extended must lead to an isomorphism containing only edge mappings associated with undefined cells according to Lemma 1. Therefore the total costs of the algorithm can be allocated to cells of D, such that each cell pays a constant amount. This proves that the total running time is bounded by the size of the table, which is O(|G||H|). t u We can easily modify the algorithm to enumerate all maximum isomorphisms without affecting the total running time. First we run Algorithm 1 once to obtain the maximum weight Wmax . Then we run a modified version of Algorithm 1 that outputs every split isomorphism φi of size W (φi ) = Wmax as soon as it is found, right after SplitIso(φ) is called in line 4. 4 Solving BBP-MCIS in Outerplanar Graphs In the previous section we have presented an algorithm to compute a 2-MCIS between two biconnected outerplanar graphs. In this section we will generalize it to compute a BBP-MCIS between two outerplanar graphs G and H. In the following we assume the isomorphisms to be BBP. We require the input graphs to be connected. Otherwise we compute a BBP-MCIS for all pairs of connected components and select an isomorphism of maximum weight. We proceed as follows. First, we give insight into the BC-tree data structure, which helps to partition the set S of all BBP common subgraph isomorphisms between G and H into subsets w.r.t. certain conditions. Then we compute an isomorphism of maximum weight in each of the subsets using a dynamic programming approach similar to the one used in [3] to solve the maximum common subtree problem. Among the computed isomorphisms we output one with maximum weight, thus a BBP-MCIS. The BC-tree data structure. Given a BBP-MCIS, we can observe that bridges of G are mapped to bridges of H and that edges in one block of G Finding Largest Common Substructures of Molecules in Quadratic Time c1 7 c2 c2 c1 A u v c1 b3 c2 u B c3 (a) (b) Input graph G v c2 b1 c1 b2 c2 u c3 c3 b4 (c) BC-tree BC v c3 b5 G Fig. 1. A biconnected outerplanar graph (a) with an edge uv incident to the faces A and B; a connected outerplanar graph (b) and its BC-tree (c). Block nodes have a gray background, while bridge nodes are not filled. The solid black nodes are the cutvertices. The corresponding subgraphs of G are shown above the block and bridge nodes. can only be mapped to edges contained in exactly one block of H, such that the mapped edges form a biconnected common subgraph. For a connected graph G let CG denote the set of cutvertices, BlG the set of blocks and BrG the set of bridges and BG := BlG ∪ BrG . The BC-tree BCG of G is the tree with nodes BG ∪ CG and edges between nodes b ∈ BG and c ∈ CG iff c ∈ V (b). We refer to the vertices of the BC-tree as B- and C-nodes and distinguish block nodes from bridge nodes. An example of a graph G and its BC-tree BCG is shown in Fig. 1. For any graph G, we define CC(V 0 , U ) as the connected component of G[V 0 ] that includes at least one vertex of U . We allow only such sets U , where the component is unambiguous. For example, in Fig. 1, CC(VG \ Vb2 , Vb4 ) is the graph G[{c3 , u, v}]. S Partitioning of all BBP isomorphisms S into S = x S x . First, we define S 1 and S 2 . Let b ∈ BG be an arbitrary block or bridge in G. We define S 1 to contain all isomorphisms φ where at least one edge in b is mapped by the isomorphisms, i.e., | dom(φ)∩V (b)| ≥ 2. S 2 is defined to contain all isomorphisms where exactly one vertex in b is mapped by the isomorphism. We can observe that S1 and S2 are disjoint and all other isomorphisms between G and H do not contain any vertices of b. Let N = {b1 , . . . , bk } ⊆ BG be the blocks and bridges that share a cutvertex with b, i.e., bi ∈ N iff there is a node c ∈ CG with bc and cbi edges in the BC-tree BCG . Any isomorphism φ that maps no vertex of b, maps vertices of at most one node bi , because G[dom(φ)] is connected by definition. For every bi we recursively define sets S x of isomorphisms as described above that map only vertices of CC(VG \ Vb , Vbi ). As example consider Fig. 1(c) and let b := b2 . S 1 consist of isomorphisms which map at least one edge of b2 to an edge in H. The isomorphisms in S 2 map exactly one vertex of V (b) to H. The recursion continues on N = {b1 , b3 , b4 }. Three additional sets consist of isomorphisms which map at least one edge (and three more for exactly one vertex) of V (bi ), i ∈ {1, 3, 4}, but no vertex of V (b2 ), operating on CC(VG \Vb2 , Vbi ). The recursion for b := b4 continues with N = {b5 } and two additional sets. Some of the sets S x are empty. 8 A. Droschinsky, N. Kriege, P. Mutzel S Partitioning of S x into S x = y Pxy . Before computing an isomorphism of maximum weight in a set S x , we partition S x into subsets Px1 , Px2 , . . .. The focus for the separation now is on the graph H. We distinguish two cases. If S x is a set, where at least one edge of a certain block (bridge) b is mapped, then S x is partitioned into |BlH | (|BrH |) subsets. The meaning is that for each B-node b̄ ∈ BlH (b̄ ∈ BrH ) the mapped vertices of the B-node b ∈ B G are mapped only to V (b̄). In terms of BBP this is block (bridge) preserving between b and b̄, as intended. If S x is a set, where exactly one vertex of b is mapped, the subsets are defined as follows. For each (v, v̄) ∈ V (b) × V (H), where ω(vv̄) 6= −∞ and v is in the CC we operate on, we define a subset with the restriction φ(v) = v̄. Computing a maximum isomorphism in a subset Pxy . We now describe how to compute an isomorphism φ of maximum weight in a subset Pxy ⊆ S x . The idea is to recursively extend mappings between some vertices of two single bridges or two single blocks along all pairs of mapped cutvertices into other Bnodes determined by MWMs, while preserving bridges and blocks. Between the computed isomorphisms we select one of maximum weight. First, let Pxy be a subset, where at least one edge of a B-node b ∈ BG has to be mapped to an edge of a B-node b̄ ∈ BH . If b and b̄ are bridges, the two possible mappings V (b) → V (b̄) are considered. If both are blocks, all maximal common biconnected subgraph isomorphisms between the blocks are considered (cf. Alg. 1). We may have given a fixed mapping v 7→ v̄ (cf. (i) below). We call a considered isomorphism valid, if it respects the possible fixed mapping and contains only vertices of the CC we are operating on. We extend all the valid isomorphisms φ along all pairs φ(c) = c̄, c 6= v of mapped cutvertices as follows. Let Bc := {b1 , . . . bk }, be the B-nodes of BG , where bcbi is a path, and B̄c := {b̄1 , . . . b̄l }, be the B-nodes of BH , where b̄c̄b̄j is a path, i ∈ [1..k], j ∈ [1..l]. For each pair (bi , b̄j ) ∈ Bc × B̄c we recursively calculate a BBP-MCIS ϕij under the following restrictions: (i) The cutvertices must be mapped: c 7→ c̄. (ii) bi and b̄j are both bridges or both blocks. (iii) At least one other vertex in the block (bridge) bi must be mapped, but only to V (b̄j ). Restriction (iii) assures that at least one vertex is added to the isomorphism. Therefore, the recursion to compute ϕij is the method described in this paragraph. After computing ϕij for each pair (bi , b̄j ), we construct a weighted bipartite graph with vertices Bc ] B̄c for each pair of mapped cutvertices. The weight of each edge bi b̄j is determined by the weight of a BBP-MCIS under the above restrictions, subtracted by ω(c, c̄) for the appropriate cutvertices c and c̄. If there in no such restricted BBP-MCIS, there is no edge. Computing a MWM on each of the bipartite graphs determines the extension of φ. For each matching edge the corresponding computed isomorphisms are merged with φ. After extending all valid isomorphisms, we select one of maximum weight. Second, let Pxy be a subset, where exactly one vertex v of V (b) is mapped, and let φ(v) = v̄. If v is no cutvertex, the only possible expansion is within V (b), which is not allowed in this subset. Therefore this subset contains exactly one isomorphism, v 7→ v̄. Next, assume v is a cutvertex. If v̄ is a cutvertex, we may Finding Largest Common Substructures of Molecules in Quadratic Time 9 extend φ similar to the previous paragraph. In doing so, c := v, c̄ := v̄ and Bc as before. The only difference is B̄c , which is defined by all B-nodes containing v̄ = c̄. The reason is that we have not mapped any other vertices yet, therefore we may expand in all directions in H. If v̄ is no cutvertex, then v̄ is contained in exactly one b̄ ∈ B H . We are interested in BBP isomorphisms only. This means, all vertices that are mapped to V (b̄) must be in the same block or bridge b0 ∈ BG . Therefore, for each b0 ∈ BG , where bvb0 is a path and b0 and b̄ are of the same type (bridge/block), we compute an isomorphism with fixed mapping v 7→ v̄, where at least one edge of b0 is mapped to b̄. This falls back to the method of the above paragraph as well. Among the computed isomorphisms we select one of maximum weight. The appendix lists the pseudocode for computing a BBP-MCIS as described above. Time Complexity. The time to compute a BBP-MCIS essentially depends on the time to compute the BC-trees, the biconnected isomorphisms between the blocks of G and H, and the time to compute all the MWMs. The time to compute a BC-tree is linear in the number of edges and vertices. Considering all pairs of blocks and Theorem 1PweP can bound the time for computing all the biconnected isomorphisms by O( b b̄ |Vb ||Vb̄ |) ⊆ O(|G||H|). We only need to compute MWMs for the pairs of cutvertices of the two graphs. It follows from the result of [3, Theorem 7] for the maximum common subtree problem, that the total time for this is O(|G||H|(min{∆G , ∆H } + log max{∆G , ∆H })), where ∆G is the maximum degree of a C-node in BCG . This proves the following theorem. Theorem 2. BBP-MCIS between two outerplanar graphs G and H can be solved in time O(|G||H|∆(G, H)), where ∆(G, H) = 1 iff G or H is biconnected or both are of bounded degree; otherwise ∆(G, H) = min{∆G , ∆H } + log max{∆G , ∆H }. 5 Experimental Evaluation In this section we evaluate our BBP-MCIS algorithm experimentally and compare to the BBP-MCES approach of [12].1 Both algorithms were implemented in C++ and compiled with GCC v.4.8.4 as 64-bit application. Running times were measured on an Intel Core i7-3770 CPU using a single core. The available memory of 16 GB was sufficient for all the computations. We are interested in answering the following questions: (H1) To what extent differs BBP-MCIS from BBP-MCES on molecular graphs? (H2) How large is the difference in terms of running time on molecular graphs? (H3) How is the running time affected by specific properties of the input graphs? To answer (H1) and (H2) we extracted 29000 randomly chosen pairs of outerplanar molecular graphs from a large chemical database.2 The molecules 1 2 We are grateful to Leander Schietgat for providing the implementation used in [12]. NCI Open Database, GI50, http://cactus.nci.nih.gov 10 A. Droschinsky, N. Kriege, P. Mutzel Fig. 2. Running times in ms for 28 399 BBP-MCIS computations. Each black dot represents a BBP-MCIS computation on two randomly chosen outerplanar molecular graphs. It directly compares the running time of our algorithm (MCIS, x-axis) and the implementation from [12] (MCES, y-axis). The running times of another 601 BBPMCIS computations did not fit into the borders. in the database contain up to 104 vertices and 22 vertices on an average. The weight function ω was set to 1 for each pair of vertices and edges with the same label and −∞ otherwise. This matches the setting in [12]. To answer (H3) we compared the algorithms on randomly generated connected outerplanar graphs. Our graph generator takes several parameters as input. With them we evaluated three different properties: the graph size, the average ratio |E|/|V | of edges to vertices, and the average block size. For any outerplanar graphs the ratio of edges to vertices is less than 2. While evaluating the effect of one property, we preserved the other two. This procedure allows to verify whether our theoretical findings are consistent with the running times observed in practice. We set the weight function ω to 1 for each pair of vertices and edges, which corresponds to uniformly labeled graphs. (H1) While comparing the weight of the isomorphisms computed by the two algorithms we observed a difference for only 0.40% of the 29 000 tested molecule pairs. This suggests that BBP-MCIS yields a valid notion of similarity for outerplanar molecular graphs as it was shown for BBP-MCES [12]. (H2) Our algorithm computed the solutions on average 84 times faster. The dots in Fig. 2 represent the computation times of the two algorithms. The results are summarized in Table 1. Schietgat et al. [12] compared their BBP-MCES Finding Largest Common Substructures of Molecules in Quadratic Time 11 Table 1. Upper half: Running times for our implementation (MCIS) and the implementation from [12] (MCES). Lower half: Relative differences in computation times. Algorithm MCIS MCES Average time Median time 1.97 ms 1.51 ms 207.08 ms 41.43 ms 95% less than Maximum time 5.28 ms 40.35 ms 871.48 ms 26 353.68 ms Comparison Average factor Median factor Minimum factor Maximum factor MCES / MCIS 83.8 25.6 1.8 28912.5 Table 2. Average time ± SD over 100 BBP-MCIS computations on random outerplanar graphs, varying one property (graph size, ratio of edges to vertices, block size BS). Note the units of measurement; timeout—total time exceeds 3 days. Size 10 20 40 80 160 MCIS 0.7 ± 0.3 ms 2.3 ± 0.8 ms 8.2 ± 1.6 ms 33.5 ± 3.6 ms 133.2 ± 10.1 ms MCES 207 ± 118 ms 3.4 ± 6.0 s 38.6 ± 90.6 s 234.2 ± 420.9 s timeout |E|/|V | 0.98 1.10 1.24 1.46 1.78 MCIS 3.8 ± 0.3 ms 4.0 ± 1.1 ms 8.2 ± 1.6 ms 30.8 ± 4.0 ms 110.3 ± 11.6 ms MCES 223 ± 16 ms 2.2 ± 2.6 s 38.6 ± 90.6 s 111.0 ± 213.8 s 216.1 ± 288.3 s BS MCIS MCES 3 5 10 20 27 ± 6.4 ms 13.3 ± 2.4 ms 8.4 ± 1.7 ms 5.5 ± 1.4 ms 132 ± 14 ms 689 ± 548 ms 83.7 ± 118.7 s 30.4 ± 27.8 min 40 4.5 ± 0.9 ms timeout algorithm to a state-of-the-art algorithm for general MCIS. Their algorithm had similar computation times on small graphs and was much faster on large graphs. The maximum time of the general MCIS algorithm was more than 24 hours. In contrast, our computation time never exceeded 41 ms. This clearly indicates that our algorithm is orders of magnitude faster than the general approach. (H3) We first varied the size of the input graphs, while preserving an average ratio of edges to vertices of 1.24 and an average block size of 8. Based on Theorem 2 we expected the average time to increase by a factor of a bit more than 4, if we double the size. The results in Table 2 closely match this expectation. Next, we evaluated different ratios of edges to vertices. The graph size was set to 40 and the average block size to 8. A higher ratio results in a higher number of faces in the blocks and consequently affects the time required by Alg. 1. In particular, the table size and, thus, the running time is expected to show a quadratic growth. The increase in running time exceeds our expectation. This might be explained by the increasing size of the data structure used to represent the faces of the blocks. Finally, we evaluated different average block sizes. The graph size was set to 40 and the average ratio of edges to vertices to 1.24. Higher block sizes mean less MWMs to compute, which are the most costly part in the BBP-MCIS computation. Therefore we expected the running time to decrease. The results shown in Table 2 support this. 12 6 A. Droschinsky, N. Kriege, P. Mutzel Conclusion We have developed an algorithm, which computes a well-defined, chemical meaningful largest common substructure of outerplanar molecular graphs in a fraction of a second. Hence, our method makes the graph-based comparison in large molecular datasets possible. As future work, we would like to extend our approach to more general graph classes with a focus on efficiency in practice. References 1. Akutsu, T.: A polynomial time algorithm for finding a largest common subgraph of almost trees of bounded degree. IEICE Transactions on Fundamentals of Electronics, Communications and Computer Sciences E76-A(9) (1993) 2. Akutsu, T., Tamura, T.: A polynomial-time algorithm for computing the maximum common connected edge subgraph of outerplanar graphs of bounded degree. Algorithms 6(1), 119–135 (2013) 3. Droschinsky, A., Kriege, N., Mutzel, P.: Faster Algorithms for the Maximum Common Subtree Isomorphism Problem. In: MFCS 2016. LIPIcs, vol. 58, pp. 34:1–34:14 (2016), arXiv:1602.07210 4. Ehrlich, H.C., Rarey, M.: Maximum common subgraph isomorphism algorithms and their applications in molecular science: a review. Wiley Interdisciplinary Reviews: Computational Molecular Science 1(1), 68–79 (2011) 5. Garey, M.R., Johnson, D.S.: Computers and Intractability: A Guide to the Theory of NP-Completeness. W. H. Freeman (1979) 6. Kriege, N., Kurpicz, F., Mutzel, P.: On maximum common subgraph problems in series-parallel graphs. In: Jan, K., Miller, M., Froncek, D. (eds.) IWOCA 2014. LNCS, vol. 8986, pp. 200–212. Springer (2014) 7. Kriege, N., Mutzel, P.: Finding maximum common biconnected subgraphs in seriesparallel graphs. In: Csuhaj-Varjú, E., Dietzfelbinger, M., Ésik, Z. (eds.) MFCS 2014, LNCS, vol. 8635, pp. 505–516. Springer (2014) 8. Lingas, A.: Subgraph isomorphism for biconnected outerplanar graphs in cubic time. Theoretical Computer Science 63(3), 295 – 302 (1989) 9. Matula, D.W.: Subtree isomorphism in O(n5/2 ). In: B. Alspach, P.H., Miller, D. (eds.) Algorithmic Aspects of Combinatorics, Annals of Discrete Mathematics, vol. 2, pp. 91–106. Elsevier (1978) 10. Nicholson, V., Tsai, C.C., Johnson, M., Naim, M.: A subgraph isomorphism theorem for molecular graphs. In: Graph Theory and Topology in Chemistry, pp. 226–230. No. 51 in Stud. Phys. Theoret. Chem., Elsevier (1987) 11. Raymond, J.W., Willett, P.: Maximum common subgraph isomorphism algorithms for the matching of chemical structures. Journal of Computer-Aided Molecular Design 16(7), 521–533 (2002) 12. Schietgat, L., Ramon, J., Bruynooghe, M.: A polynomial-time maximum common subgraph algorithm for outerplanar graphs and its application to chemoinformatics. Annals of Mathematics and Artificial Intelligence 69(4), 343–376 (2013) 13. Syslo, M.M.: The subgraph isomorphism problem for outerplanar graphs. Theoretical Computer Science 17(1), 91 – 97 (1982) 14. Yamaguchi, A., Aoki, K.F., Mamitsuka, H.: Finding the maximum common subgraph of a partial k-tree and a graph with a polynomially bounded number of spanning trees. Inf. Process. Lett. 92(2), 57–63 (2004) Finding Largest Common Substructures of Molecules in Quadratic Time A 13 Pseudocode Algorithm 2: BBP-MCIS of outerplanar graphs Input 1 2 3 1 2 3 4 5 6 7 8 : Connected outerplanar graphs G and H, weight function ω : (VG × VH ) ∪ (EG × EH ) → R≥0 ∪ {−∞}. Output : A BBP-MCIS of G and H. Data : BC-trees BCG and BCH with node sets B G , C G , B H , C H . Select an arbitrary B-node (block or bridge) b ∈ B G . φ ← SetSx(b, ∅) . Initial recursion call. [Output φ] Procedure SetSx(b, X) Input : B-node b ∈ B G , excluded vertices X ⊆ V (G). Output : Isomorphism of maximum weight on CC(VG \ X, Vb ). ϕ ← (∅ → ∅) . Initialize as empty mapping forall the B-nodes b̄ ∈ B H , where b and b̄ are both bridges or both blocks do φ ← BBP-Edge(b, b̄, X) . Pxy ⊆ S x , at least one edge is mapped if W(φ) > W(ϕ) then ϕ ← φ forall the pairs (v, v̄) ∈ (V (b) \ X) × V (H) do if ω(vv̄) 6= −∞ then φ ← BBP-SingleVertex(b, X, v, v̄) if W(φ) > W(ϕ) then ϕ ← φ . Pxy ⊆ S x , single vertex 11 forall the paths bcb0 in BCG , where c ∈ / X do φ ← SetSx(b0 , V (b)) . No vertex of V (b) is mapped, recursion if W(φ) > W(ϕ) then ϕ ← φ 12 return ϕ 9 10 14 1 2 3 4 5 6 7 8 9 10 11 1 2 3 4 5 6 7 8 9 A. Droschinsky, N. Kriege, P. Mutzel Procedure BBP-Edge(b, b̄, X, v, v̄) Input : B-nodes b ∈ B G , b̄ ∈ B H , X ⊆ V (G), mapping v 7→ v̄ (optional). Output : Maximum isomorphism ϕ, where at least one edge of b is mapped to b̄; restricted to CC(VG \ X, Vb ) and ϕ(v) = v̄ (if given). if exactly one of b, b̄ is a block then return ∅ → ∅ . not block and bridge preserving forall the valid isomorphisms ϕ : V (b) → V (b̄) do forall the pairs (c, c̄) 6= (v, v̄) of cutvertices mapped by ϕ do forall the pairs (bi , b̄j ) ∈ BG × BH where bcbi and b̄c̄b̄j are paths do w(bi , b̄j ) ← W(BBP-Edge(bi , b̄j , X, c, c̄)) − ω(c, c̄) Compute MWM M on bipartite graph with edge weights w(bi , b̄j ) forall the edges bi b̄j ∈ M do Extend ϕ by BBP-Edge(bi , b̄j , X, c, c̄) if W(φ) > W(ϕ) then ϕ ← φ return ϕ Procedure BBP-SingleVertex(b, X, v, v̄) Input : B-node b ∈ B G , excluded vertices X ⊆ V (G), mapping v 7→ v̄. Output : Maximum isomorphism ϕ, where a single vertex of V (b) is mapped to V (b̄); restricted to CC(VG \ X, Vb ), ϕ(v) = v̄. ϕ ← (v 7→ v̄) if v ∈ / C G then return ϕ . No expansion possible if v̄ ∈ CH then forall the pairs (bi , b̄j ) ∈ BG × BH , where bvbi is a path and v̄ ∈ b̄j do w(bi , b̄j ) ← W(BBP-Edge(bi , b̄j , X, v, v̄)) − ω(v, v̄) Compute MWM M on bipartite graph with edge weights w(bi , b̄j ) forall the edges bi b̄j ∈ M do Extend ϕ by BBP-Edge(bi , b̄j , X, v, v̄) 14 else b̄ ← the unambiguous node of the set BH that contains the vertex v̄ forall the bi ∈ BG , where bvbi is a path do φ ← BBP-Edge(bi , b̄, X, v, v̄) if W(φ) > W(ϕ) then ϕ ← φ 15 return ϕ 10 11 12 13
8cs.DS
National Laboratory for Scientific Computing arXiv:1501.05290v2 [cs.DB] 12 Feb 2015 Graduate Program in Computational Modeling Managing large-scale scientific hypotheses as uncertain and probabilistic data By Bernardo Gonçalves PETRÓPOLIS, RJ - BRASIL FEBRUARY - 2015 MANAGING LARGE-SCALE SCIENTIFIC HYPOTHESES AS UNCERTAIN AND PROBABILISTIC DATA Bernardo Gonçalves THESIS SUBMITTED TO THE EXAMINING COMMITTEE IN PARTIAL FULFILLMENT OF THE REQUIREMENTS FOR THE DEGREE OF DOCTOR OF SCIENCES IN COMPUTATIONAL MODELING. Approved by: Prof. Fabio Porto, D.Sc. (Chair) Prof. Pedro L. Dias, Ph.D. Prof. Marco A. Casanova, Ph.D. Prof. Ana Carolina Salgado, D.Sc. PETRÓPOLIS, RJ - BRASIL FEBRUARY - 2015 © 2015, Bernardo Nunes Gonçalves. All rights reserved. Gonçalves, Bernardo G635m Managing large-scale scientific hypotheses as uncertain and probabilistic data / Bernardo Gonçalves. Petropólis, RJ. : National Laboratory for Scientific Computing, 2015. xvii, 128p. : il.; 29 cm Orientador: Fabio Porto Thesis (D.Sc.) – National Laboratory for Scientific Computing, 2015. 1. Hypothesis management. 2. Predictive analytics. 3. Uncertain and probabilistic data. 4. Causal reasoning. 5. Probabilistic database design. Porto, Fabio. II. LNCC/MCT. III. Tı́tulo. CDD – 629.8 I. Dedicatory To my parents Tania and Francisco, and to my special love, Marcelle, for being an island of certainty in an uncertain world. Acknowledgments This thesis work has been supported by LNCC (Graduate Program in Computational Modeling), CNPq (grant 141838/2011-6), FAPERJ (grant ‘Nota 10’ E-26/100.286/2013) and IBM (Ph.D. Fellowship 2013/2014). I would like to express my gratitude to my advisor Fabio Porto for the gift of the challenging topic of this thesis, so special to me. I am grateful to him for being an inspiring advisor, and for nicely influencing me towards database research. I also thank my thesis committee for their attention and time devoted in the assessment of my work. I am indebted to Ana Maria Moura for her generous advice and support throughout my Ph.D. research, and to Frederico C. Silva and Adolfo Simões for their support to my research project at DEXL/LNCC. I would like to thank very much all researchers at LNCC who give lectures in the graduate program, specially Prof. José Karam Filho for teaching me generously about the roots of mathematical modeling. They have contributed significantly to my education as a cross-disciplinary thinker and the shaping of my scientific and mathematical skills. I thank my Ph.D. colleagues and friends at LNCC, specially Eduardo Lima, Ramon Costa, Klaus Wehmuth, Raquel Lopes, Karine Guimarães and Diego Paredes for their companionship and joy shared in the pursuit of their Ph.D. theses. I would also like to gratefully recall my earlier professors at UFES, José Gonçalves, Giancarlo Guizzardi, Rosane Caruso and Berilhes Garcia for shaping the most essential building blocks in my education. Finally, I would like to thank my family for their support: my father Francisco, my example of simplicity and goodness; my mother, Tania, for her tenacity and true love; Leo and Sche, my dear brother and sister, true union for life; my grandmothers Zeca, Orizontina and Rosita for their love and prayers. I thank also Marcel and Maris for the greatest gift, their daughter and my near future wife, Marcelle – the best partner one could ever hope for. “Originally, there was just experimental science, and then there was theoretical science, with Kepler’s Laws, Newton’s Laws of Motion, Maxwell’s equations, and so on. Then, for many problems, the theoretical models grew too complicated to solve analytically, and people had to start simulating. These simulations have carried us through much of the last half of the last century. At this point, these simulations are generating a whole lot of data, along with a huge increase in data from the experimental sciences.” — Jim Gray, 2007 Abstract of Thesis presented to LNCC/MCT in partial fulfillment of the requirements for the degree of Doctor of Sciences (D.Sc.) MANAGING LARGE-SCALE SCIENTIFIC HYPOTHESES AS UNCERTAIN AND PROBABILISTIC DATA Bernardo Gonçalves February - 2015 Advisor: Fabio Porto, D.Sc. In view of the paradigm shift that makes science ever more data-driven, in this thesis we propose a synthesis method for encoding and managing large-scale deterministic scientific hypotheses as uncertain and probabilistic data. In the form of mathematical equations, hypotheses symmetrically relate aspects of the studied phenomena. For computing predictions, however, deterministic hypotheses can be abstracted as functions. We build upon Simon’s notion of structural equations in order to efficiently extract the (so-called) causal ordering between variables, implicit in a hypothesis structure (set of mathematical equations). We show how to process the hypothesis predictive structure effectively through original algorithms for encoding it into a set of functional dependencies (fd’s) and then performing causal reasoning in terms of acyclic pseudo-transitive reasoning over fd’s. Such reasoning reveals important causal dependencies implicit in the hypothesis predictive data and guide our synthesis of a probabilistic database. Like in the field of graphical models in AI, such a probabilistic database should be normalized so that the uncertainty arisen from competing hypotheses is decomposed into factors and propagated properly onto predictive data by recovering its joint probability distribution through a lossless join. That is motivated as a design-theoretic principle for data-driven hypothesis management and predictive analytics. The method is applicable to both quantitative and qualitative deterministic hypotheses and demonstrated in realistic use cases from computational science. Resumo da Tese apresentada ao LNCC/MCT como parte dos requisitos necessários para a obtenção do grau de Doutor em Ciências (D.Sc.) GERÊNCIA DE HIPÓTESES CIENTÍFICAS DE LARGA-ESCALA COMO DADOS INCERTOS E PROBABILÍSTICOS Bernardo Gonçalves Fevereiro, 2015 Orientador: Fabio Porto, D.Sc. Tendo em vista a mudança de paradigma que faz da ciência cada vez mais guiada por dados, nesta tese propomos um método para codificação e gerência de hipóteses cientı́ficas determinı́sticas de larga escala como dados incertos e probabilı́sticos. Na forma de equações matemáticas, hipóteses relacionam simetricamente aspectos do fenômeno de estudo. Para computação de predições, no entanto, hipóteses determinı́sticas podem ser abstraı́das como funções. Levamos adiante a noção de Simon de equações estruturais para extrair de forma eficiente a então chamada ordenação causal implı́cita na estrutura de uma hipótese. Mostramos como processar a estrutura preditiva de uma hipótese através de algoritmos originais para sua codificação como um conjunto de dependências funcionais (df’s) e então realizamos inferência causal em termos de raciocı́nio acı́clico pseudo-transitivo sobre df’s. Tal raciocı́nio revela importantes dependências causais implı́citas nos dados preditivos da hipótese, que conduzem nossa sı́ntese do banco de dados probabilı́stico. Como na área de modelos gráficos (IA), o banco de dados probabilı́stico deve ser normalizado de tal forma que a incerteza oriunda de hipóteses alternativas seja decomposta em fatores e propagada propriamente recuperando sua distribuição de probabilidade conjunta via junção ‘lossless.’ Isso é motivado como um princı́pio teórico de projeto para gerência e análise de hipóteses. O método proposto é aplicável a hipóteses determinı́sticas quantitativas e qualitativas e é demonstrado em casos realı́sticos de ciência computacional. Table of Contents 1 Introduction 1 1.1 Problem Space and Specific Goals . . . . . . . . . . . . . . . . . . . 4 1.2 Thesis Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 1.3 Thesis Contributions . . . . . . . . . . . . . . . . . . . . . . . . . . 13 1.4 Thesis Outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 2 Vision: Hypotheses as Data 15 2.1 Running Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 2.2 Hypothesis Encoding . . . . . . . . . . . . . . . . . . . . . . . . . . 20 2.3 Reasoning over FD’s . . . . . . . . . . . . . . . . . . . . . . . . . . 21 2.4 Uncertainty Introduction . . . . . . . . . . . . . . . . . . . . . . . . 22 2.5 Predictive Analytics . . . . . . . . . . . . . . . . . . . . . . . . . . 25 2.6 Related Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 2.7 Summary: Key Points . . . . . . . . . . . . . . . . . . . . . . . . . 30 3 Hypothesis Encoding 32 3.1 Preliminaries: Structural Equations . . . . . . . . . . . . . . . . . . 32 3.2 The Problem of Causal Ordering . . . . . . . . . . . . . . . . . . . 36 3.3 Total Causal Mappings . . . . . . . . . . . . . . . . . . . . . . . . . 39 3.4 The Encoding Scheme . . . . . . . . . . . . . . . . . . . . . . . . . 43 3.5 Experiments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 3.6 Related Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 3.7 Summary of Results . . . . . . . . . . . . . . . . . . . . . . . . . . 48 4 Causal Reasoning over FD’s 4.1 Preliminaries: Armstrong’s Inference Rules . . . . . . . . . . . . . . 49 49 TABLE OF CONTENTS x 4.2 Acyclic Pseudo-Transitive Reasoning . . . . . . . . . . . . . . . . . 50 4.3 Equivalence with Causal Ordering . . . . . . . . . . . . . . . . . . . 55 4.4 Experiments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 4.5 Related Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 4.6 Summary of Results . . . . . . . . . . . . . . . . . . . . . . . . . . 60 5 Probabilistic Database Synthesis 61 5.1 Preliminaries: U-Relations and Probabilistic WSA . . . . . . . . . . 61 5.2 Running Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 5.3 U-Factorization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 5.4 U-Propagation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 5.5 Design-Theoretic Properties . . . . . . . . . . . . . . . . . . . . . . 73 5.6 Related Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76 5.7 Summary of Results . . . . . . . . . . . . . . . . . . . . . . . . . . 78 6 Applicability 79 6.1 The Physiome Project as a Testbed . . . . . . . . . . . . . . . . . . 79 6.2 Case Studies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80 6.3 System Prototype . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89 6.4 Experiments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95 6.5 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98 6.6 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101 7 Conclusions 102 7.1 Revisiting the Research Questions . . . . . . . . . . . . . . . . . . . 102 7.2 Significance and Limitations . . . . . . . . . . . . . . . . . . . . . . 105 7.3 Open Problems and Future Work . . . . . . . . . . . . . . . . . . . 106 7.4 Final Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . 107 TABLE OF CONTENTS Bibliography xi 108 Appendix A Detailed Proofs 116 A.1 Proofs of Hypothesis Encoding . . . . . . . . . . . . . . . . . . . . . 116 A.2 Proofs of Causal Reasoning . . . . . . . . . . . . . . . . . . . . . . 119 A.3 Proofs of Probabilistic DB Synthesis . . . . . . . . . . . . . . . . . 126 List of Figures Figure 1.1 Multi-fold view of a deterministic scientific hypothesis. . . . . . . . 2 1.2 A view of the scientific method life cycle . . . . . . . . . . . . . . . 5 1.3 The usual data ingesture pipeline of simulation data management . 7 1.4 Design-theoretic pipeline for processing hypotheses as uncertain and probabilistic data . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 2.1 Scientific hypotheses seen as alternative functions to predict data. . 16 2.2 Predictive analytics in a data-intensive hypothesis evaluation study. 18 2.3 Descriptive (textual) data of Example 1. . . . . . . . . . . . . . . . 19 2.4 ‘Big’ fact table H1 loaded with simulation raw data . . . . . . . . . 19 2.5 ‘Explanation’ relational table H0 . . . . . . . . . . . . . . . . . . . . 23 2.6 Result set of query Q1 on simulation trial dataset for hypothesis H1 . 24 2.7 U-relational predictive tables rendered by query using the fd’s. . . . 25 2.8 Analytics on predicted position s conditioned on observation. . . . . 26 3.1 “Directed causal graphs” associated with the two systems. . . . . . . 33 3.2 Running Simon’s Causal Ordering Algorithm (COA) . . . . . . . . . 35 3.3 Directed causal graph Gϕ induced by mapping ϕ for structure S . . 36 3.4 Bipartite graph G of structure S from Example 3. . . . . . . . . . . 37 3.5 Another hypothesis structure example. . . . . . . . . . . . . . . . . 39 3.6 Complete matching M for structure S from Example 3. . . . . . . . 42 3.7 Encoded fd set Σ (cf. Alg. 3) for the structure from Example 3. . . . 44 3.8 Performance of hypothesis encoding (in logscale). . . . . . . . . . . 46 4.1 Fd set Σ encoding (cf. Alg. 3) the structure of Fig. 3.2a and its folding Σ# derived by Alg. 5. . . . . . . . . . . . . . . . . . . . . . 52 LIST OF FIGURES 4.2 xiii Fd set Σ encoding the structure of Fig. 3.2a and the folding Υ(Σ)# of its υ-projection. . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 4.3 Performance of acyclic causal reasoning over fd’s (logscale). . . . . . 59 5.1 U-relation generated by the repair-key operation. . . . . . . . . . . 63 5.2 Fd sets encoded from the given structures Sk (Ek , Vk ) for hypotheses k = 1..3 from Example 6. . . . . . . . . . . . . . . . . . . . . . . . . 5.3 ‘Big’ fact table H3 of hypothesis k = 3 from Example 6 loaded with trial datasets identified by special attribute tid. . . . . . . . . . . . 5.4 65 65 ‘Big’ fact table H3 of hypothesis k = 3 from Example 6 with u-factors {b, d} and {p, r} emphasized (resp.) in colors green and red. . . . . 67 5.5 Fd set Ω3 (compare with Σ3 ) and its folding Ω# 3. . . . . . . . . . . . 68 5.6 U-factor projections rendered for hypothesis υ = 3. . . . . . . . . . 69 5.7 U-relations rendered for hypothesis υ = 3. . . . . . . . . . . . . . . 72 6.1 Plot of hemoglobin oxygen saturation hypotheses . . . . . . . . . . 81 6.2 Descriptive (textual) data of Example 8. . . . . . . . . . . . . . . . 81 6.3 Fd set Σ28 of hypothesis υ = 28. . . . . . . . . . . . . . . . . . . . . 82 6.4 Fd set Σ31 of hypothesis υ = 31. . . . . . . . . . . . . . . . . . . . . 82 6.5 Fd set Σ32 of hypothesis υ = 32. . . . . . . . . . . . . . . . . . . . . 82 6.6 Result set of hypothesis management query Q1. . . . . . . . . . . . 83 6.7 Results of analytical study on the hemoglobin phenomenon. . . . . 83 6.8 Plot of baroreflex hypothesis for Dahl SS Rat . . . . . . . . . . . . 84 6.9 Descriptive (textual) data of Example 9. . . . . . . . . . . . . . . . 84 6.10 Result set of hypothesis management query Q2. . . . . . . . . . . . 85 6.11 Results of analytical study on the baroreflex phenomenon. . . . . . 85 6.12 Fd set Σ1001 of hypothesis υ = 1001. . . . . . . . . . . . . . . . . . . 86 6.13 Plot of myogenic behavior hypothesis . . . . . . . . . . . . . . . . . 87 6.14 Descriptive (textual) data of Example 10. . . . . . . . . . . . . . . . 87 6.15 Fd set Σ60 of hypothesis υ = 60. . . . . . . . . . . . . . . . . . . . . 88 6.16 Fd set Σ89 of hypothesis υ = 89. . . . . . . . . . . . . . . . . . . . . 88 6.17 Result set of hypothesis management query Q3. . . . . . . . . . . . 89 6.18 Results of analytics on the vessel’s myogenic behavior phenomenon. 89 LIST OF FIGURES xiv 6.19 Lynx-Hare population observed . . . . . . . . . . . . . . . . . . . . 91 6.20 Lynx-Hare population observed . . . . . . . . . . . . . . . . . . . . 91 6.21 Screenshots of this first prototype of the Υ-DB system. . . . . . . . 92 6.22 Descriptive (textual) data of Example 10. . . . . . . . . . . . . . . . 93 6.23 Fd set Σ1 of hypothesis υ = 1. . . . . . . . . . . . . . . . . . . . . . 93 6.24 Fd set Σ2 of hypothesis υ = 2. . . . . . . . . . . . . . . . . . . . . . 93 6.25 Fd set Σ3 of hypothesis υ = 3. . . . . . . . . . . . . . . . . . . . . . 94 6.26 Results of analytics on the US population phenomenon. . . . . . . . 95 6.27 Results of analytics on the Hudson’s Bay lynx population phenomenon 95 6.28 Performance behavior of Υ-DB on a Physiome testbed scenario. . . 96 6.29 Physiome hypotheses used in the experiments. . . . . . . . . . . . . 97 6.30 Example of Boolean Network hypothesis. . . . . . . . . . . . . . . . 100 6.31 Example of Boolean Network model . . . . . . . . . . . . . . . . . . 101 List of Tables Table 1.1 Simulation data management vs. hypothesis data management. . . 5 Acronyms • fd: functional dependency • p-DB: probabilistic database • p-WSA: probabilistic world set algebra • MayBMS: U-relational database management system • AI: Artificial Intelligence • GM: graphical models (e.g., Bayesian Networks) • ETL: extract, transform, load • OLAP: On-Line Analytical Processing • DW: Data Warehouse • SEM: structural equation model • COA: causal ordering algorithm • Sk : structure of hypothesis k • E: set of equations in a structure • V: set of variables appearing in the equations in a structure • V ars(f ): set of variables appearing in equation f • ϕ : E → V: total causal mapping from equations to variables in a structure • Cϕ : set of causal dependencies • Gϕ : causal graph induced by ϕ • Hk : ‘big’ fact table of hypothesis k • H: set of hypothesis ‘big’ fact tables • Yk` : U-relation synthesized for hypothesis k • Y k : set of U-relations synthesized for hypothesis k • H0 : relational ‘explanation’ table LIST OF TABLES • Y0 : U-relational ‘explanation’ table • φ: phenomenon identifier • υ: hypothesis identifier • Σ, Γ, ∆, Ω: fd sets • ΣB : subset of the closure of an fd set derived by pseudo-transitivity • Σ+ : closure of an fd set • Σ# : the folding of an fd set • synthesis ‘4U’: synthesis for uncertainty • tid: hypothesis trial identifier • BCNF: Boyce-Codd Normal Form • MathML: Mathematical Markup Language • TCM: total causal mapping algorithm • lhs, rhs: left-hand side, right-hand side • sch(R): data columns of table R • Vi Di : condition columns of a table xvii Chapter 1 Introduction In view of the paradigm shift that makes science ever more data-driven [1], in this thesis we demonstrate that large deterministic scientific hypotheses can be effectively encoded and managed as a kind of uncertain and probabilistic data. Deterministic hypotheses can be formed as principles or ideas, then expressed mathematically and implemented in a program that is run to give their decisive form of data (see Fig. 1.1). Hypotheses can also be learned in large scale, as exhibited in the Eureqa project [2]. Examples of ‘structured deterministic hypotheses’ include tentative mathematical models in physics, engineering and economical sciences, or conjectured boolean networks in molecular biology and social sciences. These are important reasoning devices, as they are solved to generate valuable predictive data for decision making in science and increasingly in business as well. In fact, we can refer nowadays to a broad, modern context of data science [3] and big data [4] in which the complexity and scale of so-called ‘data-driven’ problems require proper data management tools for the predicted data to be analyzed effectively. In this thesis, we pay attention to a quite general class of (tentative) computational science models,1 and we look at them in an original way as a distinguished kind of data source. 1 ‘Computational science’ is (sic.) “a rapidly growing multidisciplinary field that uses advanced computing capabilities to understand and solve complex problems” [5]. We may refer to non-stochastic, tentative computational science models throughout this text as ‘structured deterministic hypotheses.’ 2 Law of free fall a(t) = −g “If a body falls from rest, its velocity at any point is proportional to the time it has been falling.” v(t) = −gt + v0 s(t) = −(g/2)t2 + v0 t + s0 (i) (ii) for k = 0:n; t = k * dt; v = -g*t + v_0; s = -(g/2)*t^2 + v_0*t + s_0; t_plot(k) = t; v_plot(k) = v; s_plot(k) = s; end (iii) FALL t 0 1 2 3 4 ··· v 0 −32 −64 −96 −128 ··· s 5000 4984 4936 4856 4744 ··· (iv) Figure 1.1. Multi-fold view of a deterministic scientific hypothesis. It is generally considered that computational science models, interpreted here as hypotheses to explain real-world phenomena, are of strategic relevance [5]. They are usually complex in that they may have hundreds to thousands of intertwined (coupled) variables and be computed along space, time or frequency domains in arbitrarily large scale. It is important to note the distinction between the structure and data levels. Consider, say, Lotka-Volterra’s model, which essentially consists in (Eqs. 1.1) two ordinary differential equations, complemented by seven subsidiary equations f1 (t), f2 (x0 ), f3 (y0 ), f4 (b), f5 (p), f6 (r), f7 (d) to set the values of its domain variable t and (input) parameters x0 , y0 , b, p, r, d.   ẋ = x(b − py)  ẏ = y(rx − d) (1.1) In a sense, it can be said fairly simple, as it is characterized by a set E of equations and a set V of variables, sized |E| = |V| = 9. Yet, at the data level this model (cf. Chapter 2) can be made very large just by computing its predictions in a fine time resolution and/or along an extended time window. As we shall see shortly, the technical challenges associated with this thesis involve (not only but) majorly the structure level where, e.g., such Lotka-Volterra model can be abstracted as a deterministic structure S(E, V) with |S| = 18.2 2 The structure length |S| is a measure of how dense the hypothesis structure is, comprising the total sum of the number of variables appearing in each equation. 3 We are really concerned here with models whose structure S is in the order of |S| . 1M , and whose results (data!) shall be difficult to analyze by handicrafted practice. Note that the data level of a model can be set as large as wanted (set the domain resolution and/or extension accordingly), but it shall be necessarily large when its structure is itself large. By ‘large-scale hypotheses’ then we mean tentative deterministic models that are large at structure level. Overall, such class of hypotheses can be said to qualify to at least four of the five v’s associated to the notion of big data:3 value, because of their role in advancing science and technology; volume, due to the large scale of modern scientific problems; variety, because of their structural heterogeneity, even when they refer to the same phenomena; and veracity, due to their uncertainty. The idea of managing hypotheses ‘as data’ may sound intriguing and in fact it raises a number of research questions of both conceptual and technical nature.4 We start by outlining below the conceptual research questions. RQ1. How to define and encode hypotheses ‘as data’ ? What are the sources of uncertainty that may be present and should be considered? RQ2. How does hypotheses ‘as data’ relate with observational data or, likewise, phenomena ‘as data’ from a database perspective? RQ3. Does every piece of simulated data qualify as a scientific hypothesis? What is the difference between managing ‘simulation’ data from managing ‘hypotheses’ as data? RQ4. Is there available a proper (machine-readable) data format we can use to automatically extract mathematically-expressed hypotheses from? It has been a challenge of this thesis to provide reasonable answers to these questions, which are brought together into the vision of hypotheses ‘as data’ (we call it the Υ-DB vision) and its use case that we present in Chapter 2, and experiment with in realistic scenarios in Chapter 6. 3 The ‘v’ of velocity may appear in connection with machine learning hypotheses, which we discuss in Chapter 6. 4 We shall keep record of those questions and revisit them in §7.1. 1.1. PROBLEM SPACE AND SPECIFIC GOALS 4 The Υ-DB vision formulates the problem of hypothesis encoding as a problem of probabilistic database design. A number of technical questions arise then. We introduce now technical context, materials and methods identified and selected in this thesis as a basis to realize the Υ-DB vision in terms of probabilistic database design. We shall outline in the sequel the technical research questions to be answered by the core of the thesis. 1.1. Problem Space and Specific Goals It has been a goal of this thesis to investigate the capabilities of probabilistic databases to enable hypothesis data management as a particular case of simulation data management. In the sequel, we first characterize the use case of hypothesis data management and then formulate it in terms of probabilistic DB design. 1.1.1 Simulation data management Simulation laboratories provide scientists and engineers with very large, possibly huge datasets that reconstruct phenomena of interest in high resolution. Notorious examples are the John Hopkins Turbulance Databases [6], and the Human Brain Project (HBP) neuroscience simulation datasets [7]. A core motivation for the delivery of such data is enabling new insights and discoveries through hypothesis testing against observations. Nonetheless, while the use case for exploratory analytics is currently well understood and many of its challenges have already been coped with so that high-resolution simulation data is increasingly more accessible [8, 9], only very recently, as part of this thesis work, the use case of hypothesis management has been taken into account for predictive analytics [10]. In fact, there is a pressing call for innovative technology to integrate (observed) data and (simulated) theories in a unified framework [11, 12, 13]. The point has just been raised by leading neuroscientists in the context of the HBP, who are incisive on the compelling argument that massive simulation databases should be constrained by experimental data in corrective loops to test precise hypotheses [14, p. 28]. Fig. 1.2 shows a simplified view of the (data-driven) scientific method life cycle. It distinguishes the phases of exploratory analytics (context of 1.1. PROBLEM SPACE AND SPECIFIC GOALS 5 Context of discovery Context of justification no Phenomenon observation Hypothesis formulation Computational simulation Testing against data valid? yes Publishing results Figure 1.2. A view of the scientific method life cycle. It highlights hypothesis formulation and a backward transition to reformulation if predictions ‘disagree’ with observations. discovery) and predictive analytics (context of justification), and highlights the loop between hypothesis formulation and testing [15]. Simulation data, being generated and tuned from a combination of theoretical and empirical principles, has a distinctive feature to be considered when compared to data generated by high-throughput technology in large-scale scientific experiments. It has a pronounced uncertainty component that motivates the use case of hypothesis data management for predictive analytics [10]. Essential aspects of hypothesis data management can be described in contrast to simulation data management as follows — Table 1.1 summarizes our comparison. • Sample data. Hypothesis management shall not deal with the same volume of data as in simulation data management for exploratory analytics, but only samples of it. This is aligned, for example, with the architectural design of CERN’s particle-physics experiment and simulation ATLAS, where there are four tier/layers of data. The volume of data significantly decreases from (tier-0) the raw data to (tier-3) the data actually used for analyses such as hypothesis testing [8, p. 71-2]. Samples of raw simula- Table 1.1. Simulation data management vs. hypothesis data management. Simulation data management Exploratory analytics Raw data Extremely large (TB, PB) Dimension-centered access pattern Denormalized for faster retrieval Batch-, incremental-only data updates Hypothesis data management Predictive analytics Sample data Very large (MB, GB) Claim-centered access pattern Normalized for uncertainty factors Probability distribution updates 1.1. PROBLEM SPACE AND SPECIFIC GOALS 6 tion data are to be selected for comparative studies involving competing hypotheses in the presence of evidence (sample observational data). This principle is also aligned with how data is delivered at model repositiories. Since observations are usually less available, only the fragment (sample) of the simulation data that matches in coordinates the (sample) of observations is required out of simulation results for comparative analysis. For instance, we show in §6.2.2 a predictive analytical study extracted from the Virtual Physiological Rat Project (VPR1001-M) comparing sample simulation data (heart rates) from a baroreflex model with observations on a Dahl SS rat strain.5 The simulation is originally set to produce predictions in the time resolution of t∆ = 0.01. But since the observational sample is only as fine as t∆ = 0.1, there is no gain in rendering a predicted sample with t∆ ≥ 0.1 for hypothesis testing. Note that such a ‘sampling’ does not incur in any additional uncertainty as typical of statistical sampling [16]. • Claim-centered access pattern. In simulation data management the access pattern is dimension-centered (e.g., based on selected space-time coordinates) and the data is denormalized for faster retrieval, as typical of Data Warehouses (DW’s) and OLAP applications.6 In particular, on account of the so-called ‘big table’ approach, each state of the modeled physical system is recorded in a large, single row of data. This is fairly reasonable for an Extract-Transform-Load (ETL) data ingesture pipeline characterized by batch-, incremental-only updates (see Fig. 1.3). Such a setting is in fact fit for exploratory analytics, as entire states of the simulated system shall be accessed at once (e.g., providing data to a visualization system). Altogether, data retrieval is critical and there is no risk of update anomalies. Hypothesis management, in contrast, should be centered on claims identified within the hypothesis structure w.r.t. available data dependencies. Since the focus is on resolving uncertainty for decision making (which 5 http://virtualrat.org/computational-models/vpr1001/. On-Line Analytical Processing, as distinguished from OLTP (On-Line Transaction Processing. The latter is meant for transaction processing of daily queries and updates in operational systems, while the former is for analytical queries in Data Warehouses (DW’s) that gather a lot of data collected from different sources for decision making. 6 1.1. PROBLEM SPACE AND SPECIFIC GOALS D1 D2 7 ETL ... Dp sim Sp i=1 Ri Figure 1.3. S The usual data ingesture pipeline of simulation data management. Datasets pi=1 Di generated bySsimulation trials on (hypothesis) models are loaded each into a ‘big’ table pi=1 R. The uncertainty is then “buried” in the database, which lacks a logical organization for enabling data-driven hypothesis management and predictive analytics. hypothesis is a best fit?), the data must be normalized based on uncertainty factors. This is key for the correctness of uncertainty modeling and efficiency of probabilistic reasoning, say, in a probabilistic database [17, p.30-1]. • Uncertainty modeling. In uncertain and probabilistic data management [17], the uncertainty may come from two sources: incompleteness (missing data), and multiplicity (inconsistent data). Hypothesis management on sample simulation data is concerned with the multiplicity of prediction records due to competing hypotheses targeted at the same studied phenomenon. Such a multiplicity naturally gives rise to a probability distribution that may be initially uniform and eventually conditioned on observations. Conditioning is an applied Bayesian inference problem that translates into database update for transforming the prior probability distribution into a posterior [10]. Overall, hypothesis data management is also OLAP-like, yet markedly different from simulation data management. A key point that distinguishes hypothesis management is that a fact or unit of data is defined by its predictive content. That is, every clear-cut predicted fact (w.r.t.available data dependencies) is a claim. Accordingly, the data should be decomposed and organized for a claim-centered access pattern. 1.1. PROBLEM SPACE AND SPECIFIC GOALS 8 conditioning Sk ETL Dk1 Dk2 ... Dkp U-intro h Sn k=1 Hk y Sn k=1 Sm `=1 Yk` Figure 1.4. Pipeline for processing hypotheses as uncertain and probabilistic data. For each hypothesis k, its structure Sk is given Spin a machine-readable format, and all of its sample simulation data trials i=1 Dki are indicated their target phenomenon, say φ, to be loaded into a ‘big table’ Hk . Then Snthe synthesis comes into play to read a base of possibly very many hypotheses k=1 Hk and transform them into a probabilistic database where each hypothesis is decomSm ` posed into claim tables `=1 Yk . A probability distribution is computed for each phenomenon φ, covering all the hypotheses and their trials targeted at φ. This distribution is then updated into a posterior in the presence of observational data. To anticipate Chapter 2, the synthesis method we have developed in this thesis work for processing hypotheses as uncertain and probabilistic data comprises a design-theoretic pipeline (see Fig. 1.4) that extends the one shown in Fig. 1.3. 1.1.2 Probabilistic database design Probabilistic databases (p-DB’s) have evolved into mature technology in the last decade with the emergence of new data models and query processing techniques [17]. One of the state-of-the-art probabilistic data models is the U-relational representation system with its probabilistic world-set algebra (p-WSA) implemented in MayBMS [18]. That is an elegant extension of the relational model we shall refer to in this thesis for the management of large-scale uncertain and probabilistic data. We look at U-relations from the point of view of p-DB design, for which no formal design methodology has yet been proposed. Despite the advanced state of probabilistic data management techniques, a lack of methods for the systematic design of p-DBs may prevent wider adoption. The availability of design methods has been considered one of the key success factors for the rapid growth of applications in the field of Graphical Models (GM’s) [19], considered to inform research in p-DB’s [17, p. 14]. Analogously, we have proposed to distinguish methods for p-DB design in three classes [10]: (i) subjective construction, (ii) learning from 1.1. PROBLEM SPACE AND SPECIFIC GOALS 9 data, and (iii) synthesis from other kind of formal specification. The first is the less systematic, as the user has to model for the data and correlations by steering all the p-DB construction process (MayBMS’ use cases [18], e.g., are illustrated that way). The second comprises analytical techniques to extract the data and learn correlations from external sources, possibly unstructured, into a p-DB under some ad-hoc schema. This is the prevalent one up to date, motivated by information extraction and data integration applications [17, p. 103]. In this thesis we present a methodology of the third kind, as we extract data dependencies from some previously existing formal specification (the hypothesis mathematical structure) to synthesize a p-DB algorithmically. Such a type of construction method has been successful, e.g., for building Bayesian Networks [19]. To our knowledge, this thesis is the first synthesis method for p-DB design (cf. §5.6). We shall develop means to extract the specification of a hypothesis and encode it into a U-relational DB for data-driven hypothesis management and analytics. That is, we shall flatten deterministic hypotheses into U-relations. The synthesis method that we have developed for p-DB’s relies on the extraction of functional dependencies (fd’s; cf. [20, 21, 22]) that are basic input to algorithmic synthesis.7 For an example of fd, consider relation FALL in Fig. 1.1. There holds an fd t → v s, meaning that values of attribute time t functionally determine values of both attributes velocity v and position s. More precisely, let µ and τ be any two tuples (rows) in an instance of relation (table) FALL. Then it satisfies fd t → v s iff µ[t] = τ [t] implies µ[v s] = τ [v s]. In our illustrative relation FALL, that fd is, in particular, a key constraint, which means that (values of) t play the role of a key to (provide access to the values of) v and s in the relation. A related concept which is also a major one for us is that of normalization [20, 21, 22], viz., to ensure that the DB resulting from a design process bears some desirable properties which are associated with some notion of normal form (ibid.). For hypothesis management, the uncertainty has to be modeled and should be normalized so that the uncertainty of one claim may not be undesirably mixed 7 In fact, it has been considered a critical failure in traditional DB design the lack of techniques to obtain important information such as fd’s in the real world [23, p. 62]. 1.1. PROBLEM SPACE AND SPECIFIC GOALS 10 with the uncertainty of another claim. It is expected to involve a processing of the causal dependencies implicit in the given hypothesis structure. We shall introduce in detail such concepts in context when necessary. 1.1.3 Structural equations The flattening of the user mathematical models into hypothesis p-DB’s, nonetheless, is not straightforward. It has been a goal of this thesis to investigate proper abstractions on mathematical models in order to (partly) capture their semantics, viz., to an extent that is tailored for hypothesis management (as opposed to, say, model solving). We shall abstract mathematical models into intermediary artifacts that are amenable to be further encoded into fd’s. In fact, given a system of equations with a set of variables appearing in them, in a seminal article Simon introduced an asymmetrical, functional relation among variables that establishes a (so-called) causal ordering [24]. That became known as structural equation models (SEM’s) or just ‘structural equations’ (cf. also [25]). Along these lines, our goal is to extract the causal ordering implicit in the structure of a deterministic hypothesis into a set of fd’s that guides our synthesis of U-relational DB’s. As we shall see throughout this text, the causal ordering we capture and process through fd’s provides causal dependencies implicit in the predictive data that are very useful information to decompose uncertainty for the sake of probabilistic modeling and reasoning. 1.1.4 Uncertainty Model In uncertain and probabilistic data management, there are essentially two sources of uncertainty: incompleteness (missing data), and multiplicity (inconsistent data). The kind of uncertainty that is dealt with in this work is the multiplicity of hypothesis trial records identified to be targeted at the same phenomenon record. That is, the uncertainty arises from the existance of competing hypotheses. If multiple hypotheses and trials are inserted for the same phenomenon, the system interprets it as defining a probability distribution. 1.1. PROBLEM SPACE AND SPECIFIC GOALS 11 Such a probability distribution (usually uniform) on the multiplicity of competing hypotheses is in accordance with probability theory under possible-worlds semantics [17, Ch. 1]. It is modeled into the U-relational data model and its p-WSA operators, and implemented into the MayBMS system as we shall see in §5.1.8 The conf() aggregate operator, for instance, in spite of the name, performs standard (non-Bayesian) probabilistic inference on such probability distribution. Eventually, however, there is a need to condition the initial probability distribution in the presence of observations. For the conditioning, then, we shall adopt Bayesian inference so that the prior probability distribution can be updated to a posterior. The informal discussion of this section opens the way for a number of technical research questions that we outline next. RQ5. Is there an algorithm to, given a SEM, efficiently extract its causal ordering? What are the computational properties of this problem? RQ6. What is the connection between SEM’s and fd’s? Can we devise an encoding scheme to ‘orient equations’ and then effectively transform one into the other with guarantees? Once we do it, what design-theoretic properties have such a set of fd’s? RQ7. Is such fd set ready to be used for p-DB schema synthesis as an encoding of the hypothesis causal structure? If not, what kind of further processing we have to do? Can we perform it efficiently by reasoning directly on the fd’s? How does it relate to the SEM’s causal ordering? RQ8. Is the uncertainty decomposition required for predictive analytics reducible to the structure level (fd processing), or do we need to process the simulated data to identify additional uncertainty factors? Finally, what properties are desirable for a p-DB schema targeted at hypothesis management? Are they ensured by this synthesis method? RQ9. Given all such a design-theoretic machinery to process hypotheses into (U-)relational DB’s, what properties can we detect on the hypotheses back 8 Our own system of hypothesis management is to be delivered on top of the MayBMS backend. 1.2. THESIS STATEMENT 12 at the conceptual level? Do we have now technical means to speak of hypotheses that are “good” in terms of principles of the philosophy of science? The core of this thesis is devoted to answer these questions, and we shall accomplish it throughout Chapters 3, 4 and 5. 1.2. Thesis Statement The statement of this thesis is that it is possible to effectively encode and manage large deterministic scientific hypotheses as uncertain and probabilistic data. Its key challenges are of both conceptual and technical nature. Conceptually, we provide core, non-obvious abstractions to define and encode hypotheses as data. Technically, we provide a number of algorithms that compose a designtheoretic pipeline to encode hypotheses as uncertain and probabilistic data, and verify their efficiency and correctness. The applicability and effectiveness of our method is demonstrated in realistic case studies in computational science. Besides, it is worthwhile highlighting some non-goals of this thesis. N1. Although we perform some sort of information extraction [26] for the acquisition of hypotheses from some model repositories on the web, it is very basic and ad-hoc in order to obtain a testbed for our method. That is, we are not proposing means for the systematic extraction of hypotheses from available sources. In fact we shall outline it in §7.3 as an important direction of future work. N2. We do not address solving computational models or numerical analytics in any sense. In fact we rely on the numerical solvers (implemented into tools that we use) as ‘transaction processing’ systems, load their computed data into a relational ‘big’ fact table and then render it into U-relational tables synthesized by our method. We do not deal with data visualization either in any sense. N3. The efficiency and scalability of query processing in p-DB’s, in particular Urelational’s MayBMS and its p-WSA (which we rely on) is not addressed or 1.3. THESIS CONTRIBUTIONS 13 evaluated in this thesis. In fact, the performance of U-relations and p-WSA has been extensively evaluated and shown to be effective [27, 18]. All performance tests carried out in this thesis comprise our design-theoretic techniques for the encoding and synthesis of U-relational hypothesis databases. N4. In terms of uncertainty and statistical analysis, we stick to (i) process some well-defined forms of multiplicity in the data which constitute the model of uncertainty dealt with in this work; then (ii) by relying on MayBMS we perform probabilistic inference; and (iii) eventually (at application level) we perform Bayesian inference and so that a posterior probability distribution is propagated through p-DB updates. We do not provide any additional form of uncertainty management. Rather, we manage the data extracted into the system (under user control) and process its uncertainty in terms of the specific sources of uncertainty recognized in Υ-DB (cf. Chapter 2). 1.3. Thesis Contributions The contributions of this thesis are outlined as follows. 1.3.1 Innovative Contributions This thesis presents the vision of hypotheses as data (and its use case) socalled Υ-DB vision. It has been published in the vision track of VLDB 2014 [10], for its (sic.) potentially high-impact visionary content. The innovative system of Υ-DB has been described in a ‘system prototype demonstration’ paper [28].9 1.3.2 Technical Contributions This thesis presents specific technical developments over the Υ-DB vision. In short, it shows how to encode deterministic hypotheses as uncertain and probabilistic data. Our detailed technical contributions (cf. Chapters 3, 4, and 5) are formulated into a formal method for the design of hypothesis p-DB’s which is described in a technical report [29].10 The method, together with our realistic testbed scenarios and performance evaluation, are yet to be published. 9 10 Preliminary version available at CoRR abs/1411.7419. Preliminary version available at CoRR abs/1411.5196. 1.4. THESIS OUTLINE 14 1.4. Thesis Outline The structure of the remainder of this thesis is outlined for reference. Chapter 2. [Υ-DB Vision]. The research vision of hypotheses as (uncertain and probabilistic) data, the characterization of its use case, key points and technical challenges are presented. Chapter 3. [Encoding]. The problem of encoding a hypothesis ‘as data’ given its formal specification (set of mathematical equations) is presented and addressed by an encoding scheme that transforms the equations into fd’s with guarantees in terms of preserving the hypothesis causal structure. Chapter 4. [Causal Reasoning]. It is presented a technique for causal reasonig as acyclic pseudo-transitive reasoning over the encoded fd’s. It processes the hypothesis causal ordering to find the ‘first causes’ for each of its predictive variables. Chapter 5. [p-DB Synthesis]. It is presented a technique to address the problem of uncertainty introduction and propagation for the transformation of hypotheses into U-relational databases. The synthesized U-database is shown to bear desirable properties for hypothesis management and predictive analytics. Chapter 6. [Applicability]. A discussion of applicability, the implementation of the proposed techniques into a prototype system for test and demonstration of the vision realization through realistic case studies are presented. Chapter 7. [Conclusions]. Research questions are revisited, and the significance and limitations of the thesis with directions to future work and final considerations are discussed. Chapter 2 Vision: Hypotheses as Data High-throughput technology and large-scale scientific experiments provide scientists with empirical data that has to be extracted, transformed and loaded before it is ready for analysis [1]. In this vision we consider theoretical data, or data generated by simulation from deterministic scientific hypotheses, which also needs to be pre-processed to be analyzed. Hypotheses as data. In view of the age of data-driven science, we consider deterministic scientific hypotheses from a multi-fold point of view: formed as principles or learned in large scale,1 hypotheses are formulated mathematically and coded in a program that is run to give their decisive form of data (see Fig. 1.1). Uncertain data. The semantic structure of relation FALL (Fig. 1.1), item (iv) can be expressed by the functional dependency (fd) t → v s. This is typical semantics assigned to empirical data in the design of experiment databases. A space-time dimension (like time t in our example) is used as a key to observables (like velocity v and position s). In empirical uncertainty, it is such “physical” dimension keys like t that may be violated, say, by alternative sensor readings. Hypotheses, however, are tentative explanations of phenomena [15], which characterizes a different kind of uncertain data. In order to manage such theoretical uncertainty, we shall need two special attributes to compose, say, the epistemological dimension of keys to observables: φ, identifying the studied phenomena; and υ, identifying the hypotheses aimed at explaining them. That is, we shall leverage the semantics of relations like FALL to φ υ t → v s. This leap is a core abstraction 1 As exhibited, e.g., in the Eureqa project [2]. 16 ~ X Y~ a ~ → Y~ υ1 : X υ1 (a) υ1 (b) b υ2 (b) ~ → Y~ υ2 : X Given state Predicted state Figure 2.1. Deterministic scientific hypotheses seen as alternative functions to predict data, giving rise to both theoretical and empirical sources of uncertainty. in this vision of Υ-DB. Predictive data. Scientific hypotheses are tested by way of their predictions [15]. In the form of mathematical equations, hypotheses symmetrically relate aspects of the studied phenomenon. However, for computing predictions, deterministic hypotheses are applied asymmetrically as functions [30]. They take a given valuation over input variables (parameters) to produce values of output variables (predictions). By observing that, we shall seek a principled method to transform the (symmetric) mathematical equations of a hypothesis into (asymmetric) fd’s. By looking at deterministic hypotheses as alternative functions to predict data (see Fig. 2.1), in this vision we shall deal with two sources of uncertainty. Given a well-defined context with a set of alternative hypotheses aimed at explaining (providing predictions for) a selected phenomenon: • Theoretical uncertainty,2 comprises selecting the best tentative model (function) to produce (the best) data? • Empirical uncertainty,3 comprises, for each candidate model, what is the (parameter) input setting that calibrates it the best way for the selected phenomenon? Note that these two sources of uncertainty are intertwined in that one cannot ‘clean’ one without cleaning the other — neither theory nor parameters are directly 2 3 That is, multiplicity of hypothesis entries associated with a phenomenon. That is, multiplicity of hypothesis trial entries associated with a phenomenon. 17 observable, but only their joint results (the predictions) [15]. In this thesis we aim at providing means to support such kind of ‘integrated’ analytics. Applications. Big computational science research programs such as the Human Brain Project,4 or Cardiovascular Mathematics,5 are highly-demanding applications challenged by such theoretical (big) data. Users need to analyze results of hundreds to thousands of data-intensive simulation trials. Besides, recent initiatives on web-based model repositories have been fostering large-scale model integration, sharing and reproducibility in the computational sciences (e.g., [31, 32, 33]). They are growing reasonably fast on the web, (i) promoting some MathML-based standard for model specification, but (ii) with limited integrity and lack of support for rating/ranking competing models. For those two reasons, they provide a strong use case for our vision of hypothesis management. The Physiome project [33, 34], e.g., is planned to integrate several large deterministic models of human physiology — a fairly simple model of the human cardiovascular system, e.g., has about 600+ variables. Also, there is a pressing call for deep predictive analytic tools to support users assessing what-if scenarios in business enterprises [35]. Deep predictive analytics are based on first principles (deterministic hypotheses) and go beyond descriptive analytics or shallow predictive analytics such as statistical forecasting (ibid.).6 U-relations. All that ratifies that hypothesis management is a promising class of applications for probabilistic DB’s. The vision of Υ-DB is currently set to be delivered on top of U-relations and probabilistic world-set algebra (p-WSA) [18]. These were developed in the influential MayBMS project.7 As implied by some of its design principles, viz., compositionality and the ability to introduce uncertainty, MayBMS’ query language fits well to hypothesis management. We shall look at it, as previously mentioned, from the point of view of a synthesis method for p-DB design. We shall particularly make use of the repair key operation, which gives 4 http://www.humanbrainproject.eu/. http://icerm.brown.edu/tw14-1-pdecm. 6 The concept of ‘deep’ predictive analytics is from Haas et al. [35], and is discussed in more detail in §2.6.1. 7 Project website: http://maybms.sourceforge.net/. MayBMS is as a backend extension of PostgreSQL. It offers all the traditional querying capabilities of the latter in addition to the uncertain and probabilistic’s. 5 2.1. RUNNING EXAMPLE 18 Figure 2.2. Predictive analytics in a data-intensive hypothesis evaluation study: hypotheses (simulated data) compete to explain a phenomenon (observed data). rise to alternative worlds as maximal-subset repairs of an argument key. Predictive analytics tool. In database research (e.g., [36]), uncertainty is usually seen as an undesirable property that hinders data quality. We shall refer to U-relations and p-WSA as implemented in MayBMS, nonetheless, to show that the ability to introduce controlled uncertainty into an (otherwise complete) simulation dataset can be a tool for ‘deep’ predictive analytics on a set of competing or alternative hypotheses. Fig.2.2 shows such a scenario of hypotheses ‘as data’ compete to explain a phenomenon ‘as data.’ As a roadmap to most of the remainder of this chapter, we claim that if hypotheses can be encoded and identified (see §2.2), and their uncertainty quantified by some probability distribution (see §2.4), then they can be rated/ranked and browsed by the user under selectivity criteria. Furthermore, their probabilities can be conditioned for possibly being re-ranked in the presence of evidence (see §2.5). 2.1. Running Example Let us consider Example 1 for the presentation of the vision. Example 1 A research is conducted on the effects of gravity on a falling object in the Earth’s atmosphere. Scientists are uncertain about the precise object’s 2.1. RUNNING EXAMPLE 19 density and its predominant state as a fluid or a solid. Three hypotheses are then considered as alternative explanations of the fall (see Fig. 2.3). Due to parameter uncertainty, six simulation trials are run for H1 , and four for H2 and H3 each. 2 PHENOMENON φ 1 Description Effects of gravity on an object falling in the Earth’s atmosphere. HYPOTHESIS υ 1 2 3 Name Law of free fall Stokes’ law Velocity-squared law Figure 2.3. Descriptive (textual) data of Example 1. H1 tid 1 2 3 4 5 6 1 2 φ 1 1 1 1 1 1 1 1 υ 1 1 1 1 1 1 1 1 t 0 0 0 0 0 0 0.1 ... g 32.0 32.0 32.0 32.2 32.2 32.2 32.0 32.0 v0 0 10 20 0 10 20 0 0 s0 5000 5000 5000 5000 5000 5000 5000 5000 a −32.0 −32.0 −32.0 −32.2 −32.2 −32.2 −32.0 −32.0 v 0 10 20 0 10 20 −3.2 ... s 5000 5000 5000 5000 5000 5000 4999.84 ... Figure 2.4. ‘Big’ fact table H1 of hypothesis υ = 1 loaded with simulation raw data: trials on H1 are identified by tid. The construction of Υ-DB, a Data Warehouse (DW), requires a simple user description of a research. That is, descriptive records of the phenomena and hypotheses dimensions (see Fig. 2.3) are to be inserted first such that basic referential constraints are satisfied by their associated datasets (fact tables). For instance, each one of the six trial datasets for hypothesis H1 shall reference its id υ = 1 as a foreign key from table HYPOTHESIS further in their synthesized relations. Fig. 2.4 shows the ‘big’ fact table H1 for hypothesis υ = 1 loaded with its trial datasets for phenomenon φ = 1. Although table H1 is denormalized for faster data retrieval as usual in DW’s, the extraction of the hypothesis equations allows to render it automatically since all variables must appear in some equation. Now we proceed to the hypothesis encoding and start to address research questions RQ1-4. 2.2. HYPOTHESIS ENCODING 20 2.2. Hypothesis Encoding We aim at extracting, for each hypothesis, a set of fd’s from its mathematical equations. Suppose we are given a set of equations of hypothesis H1 below, and let us examine the set Σ1 of fd’s we target at.8 H1 . Law of free fall a(t) = g v(t) = −gt + v0 s(t) = −(g/2)t2 + v0 t + s0 Σ1 = { φ φ φ gυ g v0 t υ g v0 s0 t υ → → → → → → g, v0 , s0 , a, v, s }. In order to derive Σ1 from the equations of H1 , we focus on their implicit data dependencies and get rid of constants and possibly complex mathematical constructs. Equation v(t) = −gt+v0 , e.g., written this way (roughly speaking), suggests that v is a prediction variable functionally dependent on t (the physical dimension), g and v0 (the parameters). Yet a dependency like g v0 t → v may hold for infinitely many equations.9 In fact, we need a way to identify H1 ’s mathematical formulation precisely, i.e., an abstraction of its data-level semantics. This is achieved by introducing hypothesis id υ as a special attribute in the fd (see Σ1 ). This is a data representation of a deterministic scientific hypothesis. It is built into an encoding scheme (see §3.4) that leverages the semantics of structural equations. The other special attribute, the phenomenon id φ, is supposed to be a key to the values of parameters, i.e., determination of parameters is an empirical, phenomenondependent task. The fd φ → g v0 s0 is to be (expectedly) violated when the user 8 9 Recall that a rigorous presentation of the method to encode fd set Σ1 is due by Chapter 3. Think of, say, how many polynomials satisfy that dependency ‘signature.’ 2.3. REASONING OVER FD’S 21 is uncertain about the values of parameters. The same rationale applies to derive Σ2 = Σ3 from the equations of H2 , H3 below. These, n.b., vary in structure w.r.t. H1 (e.g., they include parameter D, the object’s diameter). H2 . Stokes’ law H3 . Velocity-squared law a(t) = 0 a(t) = 0 p v(t) = − gD/ 4.6×10−4 p s(t) = −t gD/ 4.6×10−4 +s0 v(t) = −gD2 / 3.29×10−6 s(t) = −(gD2 / 3.29×10−6 ) t+s0 Σ2 = Σ3 = { φ φ φ φ gDυ g D s0 t υ → → → → → → g, D, s0 , a, v, s }. The key point here is that, if the hypothesis structure (set of equations) is given in a machine-readable format for mathematics, then the method to extract the hypothesis fd set from its equations can be carefully designed based on such hypothesis data representation abstraction. In fact, we shall explore W3C’s MathML as a format for hypothesis specification.10 2.3. Reasoning over FD’s Once each hypothesis fd set has been extracted, some reasoning is to be performed to discover implicit data dependencies. In fact, dependency theory is equipped with a formal system (cf. §4.1) for reasoning over fd sets like Σ1 and derive other fd’s in its closure Σ+ 1 . As we elaborate on in Chapter 4, we shall be particularly concerned with the pseudo-transitivity inference rule. Applied over fd’s { φ → g, g υ → a } ⊂ Σ1 , for instance, it gives us φ υ → a . This inference allows us to observe that {g} is a ‘factor’ on the uncertainty of a, but {φ υ} should be a dimensional key constraint for values of a. In fact, note that derived fd’s like hφ υ, ai ∈ Σ+ 1 , which should be a constraint on values of a in H1 , are (expectedly) violated in the presence of uncertainty: ob10 http://www.w3.org/Math/. 2.4. UNCERTAINTY INTRODUCTION 22 serve in Fig. 2.4 the multiplicity {32.0, 32.2} of values of a under the same pair (φ 7→ 1, υ 7→ 1), which should functionally determine them in H1 . For that reason we admit a special attribute ‘trial id’ tid to be overimposed into H1 for a trivial repair, provisionally, until uncertainty can be introduced in a controlled way by synthesis ‘4U.’ It is meant to identify simulation trials and “pretend” certainty not to lose the integrity of the data. It is under this imposed certainty that the raw simulation trial data is safely loaded from files (see Fig. 2.4). Note, however, how ‘certainty’ is held at the expense of redundancy and, mostly important, opaqueness for predictive analytics (since tid isolates or hides the inconsistency w.r.t. to the violated constraints). This is until the next stage of the Υ-DB construction pipeline, when uncertainty is to be introduced in a controlled manner. 2.4. Uncertainty Introduction Before we proceed to the uncertainty introduction procedure, note in relation H1 (Fig. 2.4), that the predicted acceleration values a are such that an association between the hypothesis and a target phenomenon, viz., (φ 7→ 1, υ 7→ 1) is established. In fact, as of the insertion of each hypothesis trial dataset, the user must set for it a target phenomenon. This may be non-obvious but is quite convenient a design decision for the envisioned system of Υ-DB because hypotheses, as (abstract) universal statements [15], can only be derived predictions from (be empirically grounded) by assigning (callibrating) them onto some real-world phenomenon. This assignment is set at data entry time because in fact it only holds at the data level.11 It is to be recorded in an ‘explanation’ table named H0 by default (see Fig. 2.5, top), being provided with weights for establishing a prior probability distribution which (by user choice) may or may not be uniform. The data transformation of ‘certain’ to ‘uncertain’ relations then starts with query Q0 , whose result set is materialized into U-relational table Y0 (see Fig. 2.5). As we introduce in detail in §5.1, U-relations have in their schema a set of pairs (Vi , Di ) of condition columns [18] to map each discrete random variable xi created by the repair-key operation to one of its possible values (e.g., x0 7→ 1). The 11 Hypotheses are ‘universal’ by definition [15]. They (must) qualify for a class of different situated phenomena, while its predictive datasets must be very specific (for one specific situation). 2.4. UNCERTAINTY INTRODUCTION H0 φ 1 1 1 υ 1 2 3 Conf 3 1 1 Y0 23 V 7→ D x0 7→ 1 x0 7→ 2 x0 7→ 3 φ 1 1 1 υ 1 2 3 W V 7→ D x0 7→ 1 x0 7→ 2 x0 7→ 3 Pr .6 .2 .2 Figure 2.5. ‘Explanation’ relational table H0 and its associated U-relational table Y0 rendered by application of the repair-key operation. world table W is internal to MayBMS’ and automatically stores their marginal probabilities. The formal semantics the repair-key operation is given in §5.1. Q0 . create table Y0 as select φ, υ from (repair key φ in H0 weight by Conf); The possible-world semantics of p-DB’s (cf. §5.1) can be seen as a generalization of data cleaning. In the context of p-DB’s [17], data cleaning does not have to be one-shot — which is more error-prone [37]. Rather, it can be carried out gradually, viz., by keeping all mutually inconsistent tuples under a probability distribution (ibid.) that can be updated in face of evidence until the probabilities of some tuples eventually tend to zero to be eliminated. This motivates Remark 1. Remark 1 Consider U-relational table Y0 (Fig. 2.5). Note that it abstracts the goal of a data-intensive hypothesis evaluation study, or the scientific method itself [15], as the repair of each φ as a key. That is, in Υ-DB users can develop their research directly upon data with support of query and update capabilities to rate/rank their hypotheses υ w.r.t. each φ, until the relationship r(φ, υ) is repaired to be a function f : Φ → Υ from each phenomenon φ to its best explanation υ. 2 Given a ‘big’ fact table such as H1 , we need to identify/group the correlated input attributes under independent uncertainty units, viz., ‘u-factors,’ each one associated with a random variable.12 We illustrate that by means of query Q1 , which materializes view Y1 [g] for (let g = Zi ) identified u-factor Zi ⊆ Z in H1 [φ, Z]. 12 An attribute can be inferred ‘input’ (viz., a parameter) by means of fd reasoning (cf. §3.4). 2.4. UNCERTAINTY INTRODUCTION H1 [tid, φ, Z] tid 1 2 3 4 5 6 φ 1 1 1 1 1 1 g 32 32 32 32.2 32.2 32.2 24 v0 0 10 20 0 10 20 s0 5000 5000 5000 5000 5000 5000 Y1 [g] W V 7→ D x1 7→ 1 x1 7→ 2 V → 7 D ··· x1 7→ 1 x1 7→ 2 φ 1 1 g 32 32.2 Pr ··· .5 .5 Figure 2.6. Result set of query Q1 on simulation trial dataset for hypothesis H1 . Q1 . create table Y1 [g] as select U.φ, U.g from (repair key φ in (select φ, g, count(*) as Fr from H1 group by φ, g) weight by Fr) as U; The result set of Q1 is stored in Y1 [g], see Fig. 2.6. Note that the possible values of g are mapped to random variable x1 , and that table H1 is considered source for a joint probability distribution (on the values of H1 ’s input parameters) which may not be uniform: we count the frequency Fr of each possible value of a u-factor Zi ⊆ Z (as done for g in Q1 ) and pass it as argument to the weight-by construct. So far, we have presented informally the procedure of u-factorization. Now we proceed to u-propagation — both are presented rigorously in Chapter 5. We consider g υ → a ∈ Σ1 again in order to synthesize predictive U-relation Y1 [a]. Since a is functionally determined by υ and g only, and these are independent, we propagate their uncertainty onto a into Y1 [a] by query Q2 . Q2 . create table Y1 [a] as select H1 .φ, H1 .υ, H1 .a from H1 , Y0 , Y1 [g] as G where H1 .φ=Y0 .φ and H1 .υ=Y0 .υ and G.φ=H1 .φ and G.g=H1 .g; Query Q02 (not shown) then selects φ, υ and a from Yi [a] for each i = 1..3. The result sets of Q2 and Q02 (resp. Y1 [a] and Y [a]) are shown in Fig. 2.7. 2.5. PREDICTIVE ANALYTICS Y1 [a] Y [a] 25 V0 7→ D0 x0 7→ 1 x0 7→ 1 V0 7→ D0 x0 7→ 1 x0 7→ 1 x0 7→ 2 x0 7→ 3 V1 7→ D1 x1 7→ 1 x1 7→ 2 V1 7→ D1 x1 7→ 1 x1 7→ 2 − − φ 1 1 φ 1 1 1 1 υ 1 1 υ 1 1 2 3 a −32 −32.2 a −32 −32.2 0 0 Figure 2.7. U-relational predictive tables rendered by query using the fd’s. Compare relations H1 [a] and Y1 [a]. By accounting for the correlations captured in the fd g υ → a, we could propagate onto a the uncertainty coming from the hypothesis and the only parameter a is sensible to, thus precisely situating tuples of Y1 [a] in the space of possible worlds. The same is done for predictive attributes v and s. In the end, Υ-DB shall be ready for predictive analytics, i.e., with all competing predictions as possible alternatives which are mutually inconsistent. A key point here is that all the synthesis process is amenable to algorithm design. Except for the user ‘research’ description, the Υ-DB construction is fully automated based on the hypothesis structure (set of equations) and the raw hypothesis trial data. 2.5. Predictive Analytics Users of Example 1, has to be able, say, to query phenomenon φ = 1 w.r.t. predicted position s at specific values of time t by considering all hypotheses υ admitted. That is illustrated by query Q3 , which creates integrative table Y [s]; and by query Q4 , which computes the confidence aggregate operation [18] for all s tuples where t = 3 (Fig. 2.8 shows Q4 ’s result, apart from column Posterior). The confidence on each hypothesis for the specific prediction of Q4 is split due to parameter uncertainty such that they sum up back to its total confidence. For H2 and H3 , e.g., we have {g D s0 t υ → s} ⊂ Γ, where Γ = Σ2 = Σ3 . Since g and D are the parameter uncertainty factors of s (s0 is certain), with 2 possible values (not shown) each, then there are only 2 × 2 = 4 possible s tuples for H2 and H3 each. Considering all hypotheses υ for the same phenomenon φ, the confidence 2.5. PREDICTIVE ANALYTICS 26 values sum up to one in accordance with the laws of probability. Q3 . create table Y [s] as select U.φ, U.υ, U.t, U.s from (select φ, υ, t, s from Y1 [s] union all select φ, υ, t, s from Y2 [s] union all select φ, υ, t, s from Y3 [s]) as U, Y0 where U.φ=Y0 .φ and U.υ=Y0 .υ; Q4 . select φ, υ, s, conf() as Prior from Y [s] where t=3 group by φ, υ, s order by Prior desc; Y [s] φ 1 1 1 1 1 1 1 1 1 1 1 1 1 1 υ 1 1 1 1 1 1 2 2 2 2 3 3 3 3 s 2188.36 2205.82 2320.51 2337.97 2452.66 2470.12 2930.59 2943.44 4991.92 4991.97 4778.87 4779.56 4944.72 4944.89 Prior .1 .1 .1 .1 .1 .1 .05 .05 .05 .05 .05 .05 .05 .05 Posterior .167 .168 .167 .165 .149 .145 .020 .019 .000 .000 .000 .000 .000 .000 Figure 2.8. Analytics on predicted position s conditioned on observation. Users can make informed decisions in light of such confidence aggregates, which are to be eventually conditioned in face of evidence (observed data). Example 2 features such kind of Bayesian conditioning for discrete random variables mapped to the possible values of predictive attributes (like position s) whose domain are continuous. Example 2 Suppose position s = 2250 feet is observed at t = 3 secs, with standard deviation σ = 20. Then, by applying Bayes’ theorem for normal mean with a discrete prior [16], Prior is updated to Posterior (see Fig. 2.8). 2 2.6. RELATED WORK 27 The procedure uses normal density function (2.1), with (say) σ = 20, to get the likelihood f (y | µk ) of each alternative prediction of s from Y [s] as mean µk given y at observed s = 2250. Then it applies Bayes’ rule (2.2) to get the posterior p(µk | y) [16]. 1 1 2 e− 2σ2 (y−µk ) 2 2πσ P p(µk | y) = f (y | µk ) p(µk ) / ni=1 f (y | µi ) p(µi ) f (y | µk ) = √ (2.1) (2.2) In the general case (cf. examples shown in Chapter 6), we actually have phenomenon ‘as data:’ a sample of independent observed values y1 , ..., yn (e.g., Brazil’s population observed by census over the years). Then, the likelihood f (y1 , ..., yn | µk ) Q for each competing trial µk , is computed as a product nj=1 f (yj | µkj ) of the single likelihoods f (yj | µkj ) [16]. Bayes’ rule is then settled by (2.3) to compute the posterior p(µk | y1 , ..., yn ) given prior p(µk ). Qn p(µk | y1 , . . . , yn ) = j=1 f (yj m Y n X | µkj ) p(µk ) (2.3) f (yj | µij ) p(µi ) i=1 j=1 As a result, the prior probability distribution assigned to u-factors via repair key is to be eventually conditioned on observed data. This is an applied Bayesian inference problem that translates into a p-DB update one to induce effects of posteriors back to table W . In a first prototype of the Υ-DB system (cf. 6.3), we accomplish it by performing Bayesian inference at application level and then applying p-WSA’s update (a variant of SQL’s update) into MayBMS. This solution is good enough to let us complete use case demonstrations of Υ-DB.13 2.6. Related Work The vision of managing hypotheses as data has some roots in Porto and Spaccapietra [38], who motivated a conceptual data model to support (the socalled) in silico science by means of a scientific model management system. We 13 Cf. Chapter 6, and §6.3 in particular. 2.6. RELATED WORK 28 discuss now the work we understand to be mostly related to our vision of datadriven hypothesis management and analytics. 2.6.1 Models-and-data Haas et al. [35] provide an original long-term perspective on the evolution of database technology. They characterize the data typically managed by traditional DB systems as a record about the past, not a conclusion or an insight or a solution (ibid.). In the context of scientific databases, e.g., their position is suggestive that DB technology has been designed for empirical data, not the theoretical data generated by simulation from domain-specific principles or scientific hypotheses. They recognize current DB technology to have raised the art of scalable ‘descriptive’ analytics to a very high level; but point out, however, that nowadays (sic.) what enterprises really need is ‘prescriptive’ analytics to identify optimal business, policy, investment, and engineering decisions in the face of uncertainty. Such analytics, in turn, shall rest on deep ‘predictive’ analytics that go beyond mere statistical forecasting and are imbued with an understanding of the fundamental mechanisms that govern a system’s behavior, allowing what-if analyses [35]. In sum, there is a pressing call for deep predictive analytic tools in business enterprises as much as in science’s. In comparison with the Υ-DB vision, Haas et al. are proposing a long-term models-and-data research program to pursue data management technology for deep predictive analytics. They discuss strategies to extend query engines for model execution within a (p-)DB. Along these lines, query optimization is understood as a more general problem with connections to algebraic solvers. Our framework in turn essentially comprises an abstraction and technique for the encoding of hypotheses as data. It can be understood (in comparison) as putting models strictly into a flattened data perspective. For that reason it has been directly applicable by building upon recent work on p-DBs [17]. In principle, it can be integrated into, say, the OLAP layer of the models-and-data project. 2.6.2 Scientific simulation data As previsouly mentioned, science’s ETL is distinguished by its unfrequent, incremental-only updates and by having large raw files as data sources [8]. Challenges for 2.6. RELATED WORK 29 enabling an efficient access to high-resolution, raw simulation data have been documented from both supercomputing,[6] and database research viewpoints;[39] and pointed as key to the use case of exploratory analytics. The extreme scale of the raw data has motivated such non-conventional approaches for data exploration, viz., the ‘immersive’ query processing (move the program to the data) [6, 40], or ‘in situ’ query processing in the raw files [41, 42]. Both exploit the spatial structure of the data in their indexing schemes. That line of research is motivated for equipping scientist end-users for an immediate interaction with their very large simulation datasets.14 The NoDB approach, in particular, argues to eliminate such ETL phase (viz., the loading) for a direct access to data ‘in situ’ in the raw data files [42]. In fact, data exploration is a fundamental use case of data-driven science. Nonetheless, being generated from first principles or learned deterministic hypotheses, simulation data has a pronounced uncertainty component that motivates a another use case, viz., the case of hypothesis management and predictive analytics [35, 10]. As we have motivated in §1.1, the latter requires probabilistic DB design for enabling uncertainty decomposition (factorization). Hypothesis management shall not deal with the same volume of data as in simulation data management for exploratory analytics, but samples of it (cf. Table 1.1 for a comparison). For instance, in CERN’s particle-physics experiment ATLAS there are four tier/layers of data management. The volume of data significantly decreases from the (tier-0) raw data to the (tier-3) data actually used for analyses such as hypothesis testing [8, p. 71-2]. Overall, the overhead incurred in loading samples of raw simulation trial datasets into a p-DB is justified for enabling a principled hypothesis evaluation and rating/ranking according to the scientific method. 2.6.3 Hypothesis encoding Our framework is comparable with Bioinformatics’ initiatives that address hypothesis encoding into the RDF data model [43]: (i) the Robot Scientist [44] is a knowledge-base system (KBS) for automated generation and testing of hypotheses 14 Sometimes phrased ‘here is my files, here is my queries, where are my results?’ [41]. 2.7. SUMMARY: KEY POINTS 30 about what genes encode enzymes in the yeast organism; (ii) HyBrow [45] is a KBS for scientists to test their hypotheses about events of the galactose metabolism also of the yeast organism; and (iii) SWAN [46] is a KBS for scientists to share hypotheses on possible causes of the Alzheimer disease. The Robot Scientist relies on rule-based logic programming analytics to automatically generate and test RDF-encoded hypotheses of the kind ‘gene G has function A’ against RDF-encoded empirical data [44]. HyBrow is likewise, but hypotheses are formulated by the user about biological events [45]. SWAN in turn disfavors analytic techniques for hypothesis evaluation and focus on descriptive aspects: hypotheses are high-level natural language statements retrieved from publications. Each ‘hypothesis’ is associated with lower-level ‘claims’ (both RDFencoded) that are meant to support it on the basis of some empirical evidence (RDF-encoded gene/protein data). In particular, SWAN [46] differs from the former in that each hypothesis is unstructured, being then more related to efforts on the retrieval of textual claims from the narrative fabric of scientific reports [47]. All of them though, consist in some ad-hoc RDF encoding of sequence and genome analysis hypotheses under varying levels of structure (viz., from ‘gene G has function A’ statements to free text). Our framework in turn consists in the U-relational encoding of hypotheses from mathematical equations, which is (to our knowledge) the first work on hypothesis relational encoding. Finally, as for hypothesis evaluation and comparison analytics, the Υ-DB vision is distinguished in terms of its Bayesian inference approach. The latter has been pointed out as a major direction for the improvement of the Bioinformatics’ initiatives just mentioned (cf. [43, p. 13]), and is in fact an influential model of decision making for hypothesis evaluation [15, p. 220]. 2.7. Summary: Key Points We outline some key points in the Υ-DB vision: • ‘Structured deterministic hypotheses’ are encoded as theoretical data and distinguished from empirical data by the introduction of an epistemological dimension into their semantic structure. 2.7. SUMMARY: KEY POINTS 31 • Two sources of uncertainty are considered: theoretical uncertainty, originating from competing hypotheses; and empirical uncertainty, derived from alternative simulation trials on each hypothesis for the same phenomenon. • A method to extract the structure of a hypothesis can be carefully designed based on a hypothesis data representation and shall be reducible in terms of machine-readable format for mathematical modeling, viz., W3C’s MathML, which we shall adopt as a standard for hypothesis specification. • We have seen that the controlled introduction of uncertainty into simulation data is amenable to algorithm design and then reducible to a designtheoretic synthesis method for the construction of U-relational DB’s. • Simulation data can be modeled as hypothesis data whenever it is associated with a target phenomenon. As the same phenomenon may happen to be associated with many such hypotheses, the research activity can be modeled as a data cleaning problem in p-DB’s. Essentially, the vision of Υ-DB comprises a design-theoretic pipeline (Fig. 1.4). For the insertion of a hypothesis k, we shall be given a MathML-compliant structure Sk together with its simulation trial datasets Dk` in raw files (e.g., .mat, .csv). Then we apply an Extract-Transform-Load (ETL) automatic procedure to generate the hypothesis ‘big’ fact table Hk under the trial id’s. The extracted equations are firstly encoded into fd’s. Then, at any time, as many hypotheses may have been inserted into the system, the uncertainty introduction (U-intro) procedure can be applied to process the encoded fd’s and synthesize the ‘uncertain’ U-relations that are to be eventually conditioned on observations. Note, in Fig. 1.4, that the ETL procedure is operated in a ‘local’ view for each hypothesis k, while the U-intro procedure and the conditioning are operated in the ‘global’ view of all available hypotheses k = 1..n. The pipeline opens up four main tracks of technical research challenges from the ETL stage on, viz., (i) hypothesis encoding and (ii) causal reasoning over fd’s, (iii) p-DB synthesis and (iv) conditioning. We address in the sequel the three first track of challenges in depth. The problem of conditioning is outlined for further work in §7.3. Chapter 3 Hypothesis Encoding In this chapter we address the problem of hypothesis encoding. In §3.1 we introduce notation and basic concepts of structural equations and the problem of causal ordering. In §3.2 we study the problem of extracting the causal ordering implicit in the structure of a deterministic hypothesis and show that Simon’s classical approach [24, 48] is intractable. In §3.3 then we build upon a less notorious approach of Nayak’s [49] and borrow an efficient algorithm for it that fits very well our use case for hypothesis encoding. In §3.4 we develop an encoding scheme that builds upon the idea of structural equations through an original abstraction of hypotheses ‘as data.’ In §3.5 we present experiments that attest how the encoding scheme works in practice for large hypotheses. In §3.6 we discuss related work. In §3.7 we summarize the results of this chapter. 3.1. Preliminaries: Structural Equations Given a system of mathematical equations involving a set of variables, to build a structural equation model (SEM) is, essentially, to establish a one-to-one mapping between equations and variables [24]. That shall enable further detecting the hidden asymmetry between variables, i.e., their causal ordering. For instance, Einstein’s famous equation E = m c2 states the equivalence of mass and energy, summarizing a theory that can be imputed two different asymmetries (for different applications), say, given a fixed amount of mass m = m0 (and recall c is a constant), predict the particle’s relativistic rest energy E; or given the particle’s rest energy, predict its mass or potential for nuclear fission. 3.1. PRELIMINARIES: STRUCTURAL EQUATIONS F = 10 [N ], m = 5 [kg], F = ma a = 90 [m/s2 ], m = 5 [kg], F = ma 33 F m a F m a Figure 3.1. “Directed causal graphs” associated with the two systems. To stress the point, consider Newton’s second law F = m a in such a scalar setting. The modeler can either use it to compute (predict), say, acceleration values given an amount of mass and different force intensities, or to predict force intensities given a fixed acceleration (e.g., for testing an engineered dynamometer). The point here is that Newton’s equation is not enough to derive predictions. That is, it has a number of variables |V| = 3, which is larger than |E| = 1. It must be completed with two more equations in order to qualify as an (applied) hypothesis ‘as data.’ Although usually it is interpreted an asymmetry towards a, technically, there is nothing in its semantics to suggest so.1 Compare the two systems given in Fig. 3.1.2 In sum, the causal ordering of any system of equations is not to be guessed, as it can be inferred. In this chapter we rely on previous work (mostly AI’s work, viz., [24, 49, 48]) and adapt it for the encoding of hypotheses into fd’s. Def. 1 A structure is a pair S(E, V), where E is a set of equations over set V of variables, |E| ≤ |V|, such that: (a) In any subset of k equations of the structure, at least k different variables appear; (b) In any subset of k equations in which r variables appear, k ≤ r, if the values of any (r − k) variables are chosen arbitrarily, then the values of the 1 2 As the equality construct ‘=’ is used as a predicate, not an assignment operator. We shall introduce the notion of ‘directed causal graphs’ shortly. 3.1. PRELIMINARIES: STRUCTURAL EQUATIONS 34 remaining k variables can be determined uniquely — finding these unique values is a matter of solving the equations. Def. 2 Let S(E, V) be a structure. We say that S is self-contained or complete if |E| = |V|. In short, we are interested in systems of equations that are ‘structural’ (Def. 1) and ‘complete’ (Def. 2), viz., that has as many equations as variables and no subset of equations has fewer variables than equations.3 Complete structures can be solved for unique sets of values of their variables. In this work, however, we are not concerned with solving sets of mathematical equations at all, but with processing their causal ordering in view of U-relational DB design. Simon’s concept of causal ordering has its roots in econometrics studies (cf. [24]) and has been taken further in AI with a flavor of Graphical Models (GMs) [50, 25, 48]. In this thesis we translate the problem of causal ordering into the language of data dependencies, viz., into fd’s. Def. 3 Let S be a structure. We say that S is minimal if it is complete and there is no complete structure S 0 ⊂ S. Def. 4 The structure matrix AS of a structure S(E, V), with f1 , f2 , . . . , fn ∈ E and x1 , x2 , . . . , xm ∈ V, is a n × m matrix of 1’s and 0’s in which entry aij is non-zero if variable xj appears in equation fi , and zero otherwise. Elementary row operations (e.g., row multiplication by a constant) on the structure matrix may hinder the structure’s causal ordering and then are not valid in general [24]. This also emphasizes that the problem of causal ordering is not about solving the system of mathematical equations of a structure, but identifying its hidden asymmetries. Def. 5 Let S(E, V) be a complete structure. Then a total causal mapping over S is a bijection ϕ : E → V such that, for all f ∈ E, if ϕ(f ) = x then x ∈ V ars(f ). 3 Also, we expect the systems of equations given as input to be ‘independent’ in the sense of Linear Algebra. In our context, that means systems that can only have non-redundant equations. In that case, if some subset of equations has fewer variables than equations, then the system must be ‘overconstrained.’ 3.1. PRELIMINARIES: STRUCTURAL EQUATIONS 35 x1 x 2 x3 x4 x5 x6 x7 x1 x2 x3 x4 x5 x6 x 7 f1 f2 f3 f4 f5 f6 f7 1 0 0 1 1 0 0 0 1 0 1 0 0 0 0 0 1 1 1 0 0 0 0 0 1 1 1 0 0 0 0 1 1 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 (a) Structure matrix as given. → f1 f2 f3 f4 f5 f6 f7 1 0 0 1 1 0 0 0 1 0 1 0 0 0 0 0 1 1 1 0 0 0 0 0 1 1 1 0 0 0 0 1 1 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 (b) COA execution in 3 recursive steps. Figure 3.2. Running Simon’s Causal Ordering Algorithm (COA) on a given structure (Fig. 3.2a). Minimal subsets detected in a recursive step k, highlighted in different shades of gray, have their diagonal elements colored (Fig. 3.2b). Simon has informally described an algorithm (cf. [24]) that, given a complete structure S(E, V), can be used to compute a partial causal mapping ϕp from partitions on the set of equations to same-cardinality partitions on the set of variables. As shown by Dash and Druzdzel [48], the causal mapping returned by Simon’s (socalled) Causal Ordering Algorithm (COA) is not total when S has variables that are strongly coupled (because they can only be determined simultaneously). They also have shown that any total mapping ϕ over S must be consistent with COA’s partial mapping ϕp [48]. The latter is made partial by design (merge strongly coupled variables into partitions or clusters) in order to force its induced causal graph Gϕp to be acyclic. Algorithm 1, COAt , is a variant of Simon’s COA adapted to illustrate our use case. It returns a total causal mapping ϕ, instead of a partial causal mapping. We illustrate it through Example 3 and Fig. 3.2. Example 3 Consider structure S(E, V) whose matrix is shown in Fig. 3.2a. Note that S is complete, since |E| = |V| = 7, but not minimal. The set of all minimal subsets S 0 ⊂ S is Sc = { {f1 }, {f2 }, {f3 } }. By eliminating the variables identified at recursive step k, a smaller structure T ⊂ S is derived. Compare the partial causal mapping eventually returned by COA, ϕp = { h{f1 }, {x1 }i, h{f2 }, {x2 }i, h{f3 }, {x3 }i, h{f4 , f5 }, {x4 , x5 }i, h{f6 }, {x6 }i, h{f7 }, {x7 }i }, to the total causal mapping returned by COAt , ϕ = {hf1 , x1 i, hf2 , x2 i, hf3 , x3 i, hf4 , x4 i, hf5 , x5 i, hf6 , x6 i, hf7 , x7 i}. 3.2. THE PROBLEM OF CAUSAL ORDERING 36 Algorithm 1 COAt as a variant of Simon’s COA. 1: procedure COAt (S : structure over E and V) Require: S given is complete, i.e., |E| = |V| Ensure: Returns total causal mapping ϕ : E → V 2: ϕ ← ∅, Sc ← ∅ 3: for all minimal S 0 ⊂ S do 4: Sk ← Sk ∪ S 0 . store minimal structures S 0 found in S 0 0 5: V ← S (V) 6: for all f ∈ S 0 (E) do 7: x ← any xa ∈ V 0 8: ϕ ← ϕ ∪ hf, xi 9: V 0 ← V 0 \ {x} S 10: T ← S \ S 0 ∈Sk S 0 11: if T 6= ∅ then 12: return ϕ ∪ COAt (T ) 13: return ϕ Since x4 and x5 are strongly coupled (see Fig.3.2b), COAt maps them arbitrarily (e.g., it could be f4 7→ x5 , f5 7→ x4 instead). Such total mapping ϕ renders a cycle in the directed causal graph Gϕ induced by ϕ (see Fig.3.3). 2 x1 x2 x4 x6 x3 x5 x7 Figure 3.3. Directed causal graph Gϕ induced by mapping ϕ for structure S. An edge connects a node xi towards a node xj , with xi , xj ∈ V, iff xi appears in the equation f ∈ E such that ϕ(f ) = xj . 3.2. The Problem of Causal Ordering The serious issue with Alg. 1, COA(t ), is that finding all minimal structures in a given structure (cf. line 3) is a hard problem that can only be addressed heuristically as a problem of co-clustering (also called biclustering [51, 52]) in 3.2. THE PROBLEM OF CAUSAL ORDERING 37 Boolean matrices. Simon’s approach, however, as we shall see next, is not the only way to cope with the problem of causal ordering. In fact, in order to study the computational properties of SEM’s and the problem of causal ordering, we observe that any structure S(E, V) satisfying Def. 1 can be modeled straightforwardly as a bipartite graph G = (V1 ∪ V2 , E), where the set E of equations and the set V of variables are the disjoint vertex sets, i.e., V1 7→ E, V2 7→ V, and E 7→ S is the edge set connecting equations to the variables appearing in them. Fig. 3.4 shows the bipartite graph G corresponding to the structure given in Example 3 — for a comprehensive text on graph concepts and its related algorithmic problems, cf. Even [53]. f1 x1 f2 x2 f3 x3 f4 x4 f5 x5 f6 x6 f7 x7 Figure 3.4. Bipartite graph G of structure S from Example 3. A biclique (or complete bipartite graph) is a bipartite graph G = (A ∪ B, E) such that for every two vertices a ∈ A, b ∈ B, we have (a, b) ∈ E [53]. Note that for balanced bicliques, i.e., when |A| = |B| = K, the degree deg(u) of any vertex u ∈ A ∪ B must be deg(u) = |A| = |B| = K. Recent approaches to co-clustering problems (e.g., [54]) have come with the notion of pseudo-biclique (also called ‘quasi-biclique’), which is a relaxation of the biclique concept to allow some less rigid notion of connectivity than the ‘complete connectivity’ required in a biclique. Now, recall that Simon’s COA(t ) needs to find, at each recursive step, all minimal subsets S 0 ⊆ S. Theorem 1 situates this particular computational task in terms of its complexity, which for |E 0 | = |V 0 | ≥ 2 is equivalent to find, at each recursive step, the minimal-size ‘pseudo-bicliques’ 3.2. THE PROBLEM OF CAUSAL ORDERING 38 (i.e., with the least K ≥ 2) in its corresponding bipartite graph (e.g., see Fig. 3.4). Here we take, in Def. 6, a specific notion of pseudo-biclique. Def. 6 Let G = (A ∪ B, E) be a bipartite graph. We say that G is a K-balanced pseudo-biclique if |A| = |B| = K with |E| ≥ 2K and, for all vertices u ∈ A ∪ B, deg(u) ≥ 2. Now we state (originally) the balanced pseudo-biclique problem (BPBP) as a decision problem as follows. (BPBP). Given a bipartite graph G = (V1 ∪ V2 , E) and a positive integer K ≥ 2, does G contain a K-balanced pseudo-biclique? Lemma 1 The balanced pseudo-biclique problem (BPBP) is NP-Complete. Proof 1 We show (by restriction [55]) that the BPBP is a generalization of the balanced biclique problem (BBP), referred ‘balanced complete bipartite subgraph’ problem [55, GT24, p. 196], which is shown to be NP-Complete by means of a transformation from ‘clique’ [56, p. 446]. The restriction from BPBP to BBP (special case) is made by requiring (cf. Def. 6) either (a) |E| = K 2 or (b) deg(u) = K, for K ≥ 2,4 which are equivalent ways of enforcing the inquired K-balanced pseudo-biclique to be a K-balanced biclique. 2 We introduce another hypothesis structure (see Fig. 3.5) to illustrate the correspondence between the pseudo-biclique property and COA’s algorithmic approach as elaborated in the proof of Theorem 1. Theorem 1 Let S(E, V) be a complete structure. Then the extraction of its causal ordering by Simon’s COA(S) is NP-Hard. Proof 2 We show that, at each recursive step k of COA, to find all non-trivial minimal subsets (i.e., |E 0 | ≥ 2) translates into an optimization problem associated with the decision problem BPBP, which we know by Lemma 1 to be NP-Complete. See Appendix §A.1.1. 2 4 Note that clearly, for any positive integer K ≥ 2, we have for K 2 ≥ 2K. 3.3. TOTAL CAUSAL MAPPINGS x1 x2 x 3 x4 f1 f2 f3 f4 1 1 0 1 0 1 1 1 1 0 1 1 0 0 0 1 (a) COA execution in 2 recursive steps. 39 f1 x1 f2 x2 f3 x3 f4 x4 (b) Bipartite graph. Figure 3.5. Another hypothesis structure example. Nonetheless, the problem of causal ordering can be solved efficiently by means of a different, less notorious approach due to Nayak [49], which we introduce and build upon next. 3.3. Total Causal Mappings The problem of causal ordering can be solved in polynomial time by (i) finding any total causal mapping ϕ : E → V over structure S given (cf. Def. 5); and then (ii) by computing the transitive closure Cϕ+ of the set Cϕ (cf. Eq. 3.1) of direct causal dependencies induced by ϕ. Cϕ = { (xa , xb ) | there exists f ∈ E such that ϕ(f ) = xb and xa ∈ V ars(f ) } (3.1) Def. 7 Let S(E, V) be a structure with variables xa , xb ∈ V, and ϕ a total causal mapping over S inducing set of direct causal dependencies Cϕ and its transitive closure Cϕ+ . We say that (xb , xa ) is a direct causal dependency in S if (xb , xa ) ∈ Cϕ , and that (xb , xa ) is a causal dependency in S if (xb , xa ) ∈ Cϕ+ . In other words, (xa , xb ) is in Cϕ iff xb direct and causally depends on xa , given the causal asymmetries induced by ϕ. Those notions open up an approach to causal reasoning that fits very well to our use case, which is aimed at encoding hypothesis structures into fd sets and then performing (symbolic) causal reasoning in terms of acyclic pseudo-transitive reasoning over fd’s (cf. Chapter 4).5 For it to be effective, nonetheless, we shall need to ensure some properties of total causal mappings first. 5 Note that it differs from AI research (e.g., [48]) geared for reasoning over GM’s. 3.3. TOTAL CAUSAL MAPPINGS 40 For a given structure S, there may be multiple total causal mappings over S (recall Example 3). But the causal ordering of S must be unique (see Fig. 3.3). Therefore, a question that arises is whether the transitive closure Cϕ+ is the same for any total causal mapping ϕ over S. Proposition 1, originally from Nayak [49], ensures that is the case. Proposition 1 Let S(E, V) be a structure, and ϕ1 : E → V and ϕ2 : E → V be any two total causal mappings over S. Then Cϕ+1 = Cϕ+2 . Proof 3 The proof is based on an argument from Nayak [49], which we present in arguably much clearer way (see Appendix, §A.1.2). Intuitively, it shows that if ϕ1 and ϕ2 differ on the variable an equation f is mapped to, then such variables, viz., ϕ1 (f ) and ϕ2 (f ), must be causally dependent on each other (strongly coupled). 2 Another issue is concerned with the precise conditions under which total causal mappings exist (i.e., whether or not all variables in the equations can be causally determined). In fact, by Proposition 2, based on Nayak [49] apud. Hall [53, p. 135-7], we know that the existence condition holds iff the given structure is complete. Before proceeding to it, let us refer to Even [53] to briefly introduce the additional graph-theoretic concepts which are necessary here. A matching in a graph is a subset of edges such that no two edges in the matching share a common node. A matching is said maximum if no edge can be added to the matching (without hindering the matching property). Finally, a matching in a graph is said ‘perfect’ if every vertex is an end-point of some edge in the matching — in a bipartite graph, a perfect matching is said a complete matching. Proposition 2 Let S(E, V) be a structure. Then a total causal mapping ϕ : E → V over S exists iff S is complete. Proof 4 We observe that a total causal mapping ϕ : E → V over S corresponds exactly to a complete matching M in a bipartite graph B = (V1 ∪ V2 , E), where V1 7→ E, V2 7→ V, and E 7→ S. In fact, by Even apud. Hall’s theorem (cf. [53, 135-7]), we know that B has a complete matching iff (a) for every subset of vertices 3.3. TOTAL CAUSAL MAPPINGS 41 F ⊆ V1 , we have |F | ≤ |E(F )|, where E(F ) is the set of all vertices connected to the vertices in F by edges in E; and (b) |V1 | = |V2 |. By Def. 1 (no subset of equations has fewer variables than equations), and Def. 2 (number of equations is the same as number of variables), it is easy to see that conditions (a) and (b) above hold iff S is a complete structure. 2 The problem of finding a maximum matching is a well-studied algorithmic problem. In this thesis we adopt the Hopcroft-Karp algorithm [57], which is known p to be polynomial-time, bounded by O( |V1 | + |V2 | |E|).6 That is, we handle the problem of total causal mapping by (see Alg. 2) translating it to the problem of maximum matching in a bipartite graph (in linear time) and then applying the Hopcroft-Karp algorithm to get the matching and finally translate it back to the total causal mapping, as suggested by the proof of Proposition 2. Algorithm 2 Find a total causal mapping for a given structure. 1: procedure TCM(S : structure over E and V) Require: S given is a complete structure, i.e., |E| = |V| Ensure: Returns a total causal mapping ϕ 2: B(V1 ∪ V2 , E) ← ∅ 3: ϕ←∅ 4: for all hf, Xi ∈ S do . translates the structure S to a bipartite graph B 5: V1 ← V1 ∪ {f } 6: for all x ∈ X do 7: V2 ← V2 ∪ {x} 8: E ← E ∪ {(f, x)} 11: M ← Hopcroft-Karp(B) . solves the maximum matching problem for all (f, x) ∈ M do . translates the matching to a total causal mapping ϕ ← ϕ ∪ {hf, xi} 12: return ϕ 9: 10: Fig. 3.6 shows the complete matching found by the Hopcroft-Karp algorithm for the structure given in Example 3. 6 The Hopcroft-Karp algorithm solves maximum matching in a bipartite graph efficiently as a problem of finding maximum flow in a network (cf. [53, p. 135-7], or [58, p. 664-9]). 3.3. TOTAL CAUSAL MAPPINGS 42 f1 x1 f2 x2 f3 x3 f4 x4 f5 x5 f6 x6 f7 x7 Figure 3.6. Complete matching M for structure S from Example 3. Corollary 1 summarizes the results we have so far. Corollary 1 Let S(E, V) be a complete structure. Then a total causal mapping ϕ : E → V over S can be found by (Alg. 2) TCM in time that is bounded by p O( |E| |S|). Proof 5 Let B = (V1 ∪ V2 , E) be the bipartite graph corresponding to complete structure S given to TCM, where V1 7→ E, V2 7→ V, and E 7→ S. The translation of S into B is done by a scan over it. This scan is of length |S| = |E|. Note that number |E| of edges rendered is precisely the length |S| of structure, where the denser the structure, the greater |S| is. The re-translation of the matching computed by internal procedure Hopcroft-Karp, in turn, is done at expense of |E| = |V| ≤ |S|. Thus, it is easy to see that TCM is dominated by the maximum matching algorithm p p Hopcroft-Karp, which is known to be O( |V1 | + |V2 | |E|), i.e., O( |E| + |V| |S|). p √ p Since S is assumed complete, we have |E| = |V| then |E| + |V| = 2 |E|. p Therefore, TCM must have running time at most O( |E| |S|). 2 Remark 2 Let S(E, V) be a complete structure. Then we know (cf. Proposition 2) that a total causal mapping over S exists. Let it be defined ϕ , TCM(S). Then the causal ordering implicit in S shall be correctly extracted (cf. Proposition 1) by processing the causal dependencies induced by ϕ, as we show in Chapter 4. 2 Now we are ready to accomplish the hypothesis encoding into fd’s, as we show next. 3.4. THE ENCODING SCHEME 43 3.4. The Encoding Scheme We shall encode variables as relational attributes and map equations onto fd’s through total causal mappings. Let Z be a set of attribute symbols such that Z ' V, where S(E, V) is a complete structure; and let φ, υ ∈ / Z be two special attribute symbols kept to identify (resp.) phenomena and hypotheses. We are explicitly distinguishing symbols in Z, assigned by the user into structure S, from epistemological symbols φ and υ. Then we consider a sense of Simon’s into the nature of scientific modeling and interventions [24], summarized in Def. 8. Def. 8 Let S(E, V) be a structure and x ∈ V be a variable. We say that x is exogenous if there exists an equation f ∈ E such that V ars(f ) = {x}. In this case f can be written f (x) = 0, and must be mapped to x in any total causal mapping ϕ over S. We say that x is endogenous otherwise. Remark 3 introduces an interpretation of Def. 8 with a data dependency flavor. Remark 3 The values of exogenous variables (attributes) are to be determined empirically, outside of the system (proposed structure S). Such values are, therefore, dependent on the phenomenon id φ only. The values of endogenous variables (attributes) are in turn to be determined theoretically, within the system. They are dependent on the hypothesis id υ and shall be dependent on the phenomenon id φ as well indirectly. 2 As introduced in §2.2, the encoding scheme we are presenting here is not obvious. It goes beyond Simon’s structural equations to abstract the data-level semantics of mathematical deterministic hypotheses. Whereas Simon’s structural equations are able to represent only linear equations, our encoding scheme can represent non-linear equations and arbitrarily complex mathematical operators by means of its data representation of deterministic hypotheses. For instance, take non-linear equation y = a x2 and suppose that, considering the context of its complete system of equations, (Alg. 2) TCM maps it onto variable y. Then, by an abstraction of the equation semantics, we shall encode it into fd 3.4. THE ENCODING SCHEME 44 Σ={ φ φ φ x1 x2 x3 x5 υ x1 x3 x4 υ x4 υ x5 υ → → → → → → → x1 , x2 , x3 , x4 , x5 , x6 , x7 }. Figure 3.7. Encoded fd set Σ (cf. Alg. 3) for the structure from Example 3. a x υ → y. That is, the hypothesis identifier υ captures the data-level semantics of the hypothesis equation.7 We encode complete structures into fd sets by means of (Alg. 3) h-encode. Fig. 4.1 presents an fd set defined Σ , h-encode(S), encoding the same structure S from Example 3. Algorithm 3 Hypothesis encoding. 1: procedure h-encode(S : structure over E and V, D : domain variables) Require: S given is a complete structure, i.e., |E| = |V| Ensure: Returns a non-redundant fd set Σ 2: Σ←∅ 3: ϕ ← TCM(S) 4: for all hf, xi ∈ ϕt do 5: Z ← X \ {x}, where hf, Xi ∈ S 6: if Z = ∅ or Z ⊆ D then . x is exogenous 7: if x ∈ / D then . supress φ-fd for dimensions like time t 8: Σ ← Σ ∪ hZ ∪ {φ}, xi 9: 10: 11: else Σ ← Σ ∪ hZ ∪ {υ}, xi . x is endogenous return Σ Now we study the design-theoretic properties of the encoded fd sets. We shall make use of the concept of ‘canonical’ fd sets (also called ‘minimal’ [20, p. 390]), see Def. 9. Def. 9 Let Σ be an fd set. We say that Σ is canonical if: 7 Note that, without the hypothesis id, infinitely many equations fit the pattern a x → y. 3.5. EXPERIMENTS 45 (a) each fd in Σ has the form X → A, where |A| = 1; (b) For no hX, Ai ∈ Σ we have (Σ − {hX, Ai})+ = Σ+ ; (c) for each fd X → A in Σ, there is no Y ⊂ X such that (Σ\{X → A}∪{Y → A})+ = Σ+ . For an fd set satisfying such properties (Def. 9) individually, we say that it is (a) singleton-rhs, (b) non-redundant and (c) left-reduced. It is said to have an attribute A in X that is ‘extraneous’ w.r.t. Σ if it is not left-reduced (Def. 9-c) [22, p. 74]. Finally, an fd X → Y in Σ is said trivial if Y ⊆ X. Note that the presence of a trivial fd in a an fd set is sufficient to make it redundant. Theorem 2 Let Σ be an fd set defined Σ , h-encode(S) for some complete structure S. Then Σ is non-redundant and singleton-rhs but may not be left-reduced (then may not be canonical). Proof 6 We show that properties (a-b) of Def. 9 must hold for Σ produced by (Alg. 3) h-encode, but property (c) may not hold (i.e., encoded fd set Σ may not be left-reduced). See Appendix, §A.1.3. 2 We draw attention to the significance of Theorem 2, as it sheds light on a connection between Simon’s complete structures [24] and fd sets [20]. In fact, we continue to elaborate on that connection in next chapter to handle causal ordering processing symbolically by causal reasoning over fd’s. 3.5. Experiments Fig. 3.8 shows the results of experiments we have carried out in order to study how effective the procedure of hypothesis encoding is in practice, in particular its behavior for hypotheses whose structure S has been randomly generated over orders of magnitude |S| ≈ 2k , to have length up to |S| ≈ 220 . 1M . The largest structure considered, with |S| ≈ 1M , has been generated to have exactly |E| = 2.5K. 3.6. RELATED WORK 46 We have executed ten runs for each tested order of magnitude, and then taken its mean running time in ms.8 The plot is shown in Fig. 3.8 in logscale base 2. In fact a a near-, sub-quadratic slope is expected for the curve structure length |S| × time. These scalability results are compatible with the computational complexity p of h-encode, which is (cf. Corollary 1) bounded by O( |E| |S|).9 time [ms] 214 211 28 25 27 29 211 213 215 217 structure length |S| 219 221 Figure 3.8. Performance of hypothesis encoding (in logscale). 3.6. Related Work Modeling physical and socio-economical systems as a set of equations is a traditional modeling approach, and a very large bulk of models exist up to date. Simon’s early work on structural equations and causal ordering comprises a specific notion of causality aimed at further contributing to the potential of such modeling approach (cf. [59]). It is meant for identifying influences among variables (or their values) that are implicit in the system model for enabling informed interventions. These may apply either to the system (phenomenon) under study, or to the model itself (say, when its predictions are not approximating observations very well). Significant research effort has been devoted to causal modeling and reasoning in the past decades in both statistics and AI (cf. [25, 19]). The notion of causality used can be traced back to the early work of Simon’s and others in Econometrics. 8 The experiments were performed on a 2.3GHZ/4GB Intel Core i5 running Mac OS X 10.6.8. Note that, for any arbitrary structure S(E, V), we have |E| ≤ |S| ≤ |E|2 . So, in worst case (the densest structure possible) we have |S| = |E|2 and then can establish a time bound function p 2 of |E| only, viz., O(|E| |E|). 9 3.6. RELATED WORK 47 Nonetheless, there are two important differences to be emphasized: • Such work is majorly devoted to deal with (statistical) qualitative hypotheses, not (deterministic) quantitative hypotheses; • The causal model is assumed as given or is derived from data, instead of being converted or synthesized from a set of equations. These are both core differences that also apply to our work in comparison to the bulk of existing work in probabilistic DB’s. Our main point here, though, is to clarify the technical context and state of the art of the problem of causal ordering. A few works have been concerned with extracting a causal model out of some previous existing formal specification such as a set of equations. This is a reason why causal ordering has been an yet barely studied problem from the computational point of view. Dash and Druzdzel revisit the problem and re-motivate it in light of modern applications [48]. First, they provide a formal description of how Simon’s COA gives a summary of the causal dependencies implicit in a given SEM. That is, in clustering the strongly coupled variables into a causal graph, COA provides a condensed representation of the causal model implicit in the given SEM. They show then that any valid total causal mapping produced for a given SEM must be consistent with COA’s partial causal mapping. Yet, the serious problem is that the algorithm turns out to be intractable. In fact, no formal study of COA’s computational properties can yet be found in the literature. In this thesis we have obtained the (negative) hardness result that it is intractable, which turns out to be compatible with Nayak’s intuition (sic.) that it is a worst-case exponential time algorithm (cf. [60, p. 37]). Inspired on Serrano and Gossard’s work on constraint modeling and reasoning [61], Nayak reports an approach that is provably quite effective to process the causal ordering: extract a total causal mapping and then compute the transitive closure of the direct causal dependencies. In this thesis we build upon it to perform causal reasoning in terms of a form of transitive reasoning. Such approach fits very well to our use case, viz., the synthesis of p-DB’s from fd’s. As we show 3.7. SUMMARY OF RESULTS 48 in Chapter 4, we process the causal ordering of a hypothesis structure (abstracted as a SEM) in terms of acyclic causal reasoning over fd’s and prove its correctness. This is enabled by the encoding scheme presented in this chapter. 3.7. Summary of Results In this chapter we have studied and developed an encoding scheme to process the mathematical structure of a deterministic hypothesis into a set of fd’s towards the encoding of hypotheses ‘as data.’ Then we have studied the design-theoretic properties held by such an encoded fd set. We list the results achieved as follows. • By Theorem 1, we know (an original hardness result) that Simon’s approach to process the causal ordering of a structure is intractable; • By building upon on the work of Simon [24] and Nayak [49] (cf. Propositions 1 and 2), we have framed an approach to efficiently extract the basic information (a total causal mapping) for processing the causal ordering implicit in the mathematical structure of a deterministic hypothesis; • By Corollary 1, we know how to process the complete structure of a hypothp esis into a total causal mapping in time that is bounded by O( |E| |S|). That is, the machinery of hypothesis encoding is provably suitable for very large hypothesis structures. • By Theorem 2, which studies the design-theoretic properties of the encoded fd sets, we have unraveled the connection between Simon’s complete structures and fd sets to further explore it in next chapter. • We have performed experiments (cf. Fig. 3.8) to study how effective the approach is in practice, or how it scales for hypotheses whose structure S is randomly generated to have length up to the order of |S| . 1M .10 10 The tests were up to this order only because of the hardware limitations of our experimental settings. In theory (cf. complexity time bounds), larger structures can be handled very efficiently. Chapter 4 Causal Reasoning over FD’s In this chapter we present a technique to address the problem of causal ordering processing in order to enable the synthesis of U-relational DB’s. In §4.1 we introduce Armstrong’s classical inference system to reason over fd’s. In §4.2 we develop the core concept and algorithm of the folding of an fd set, as a method for acyclic causal reasoning over fd’s. In §4.3 we show its connections (equivalence) with causal reasoning. In §4.4 we present experiments on how the method behaves in practice. §4.5 we discuss related work. In §4.6 we conclude the chapter. 4.1. Preliminaries: Armstrong’s Inference Rules As usual notational conventions from the DB literature [20, 21], we write X, Y, Z to denote sets of relational attributes and A, B, C to denote singleton attribute sets. Also, we write XY as shorthand for X ∪ Y . Functional dependency theory relies on Armstrong’s inference rules (or axioms) of (R0) reflexivity, (R1) augmentation and (R2) transitivity, which forms a sound and complete inference system for reasoning over fd’s [20]. From R0-R2 one can derive additional rules, viz., (R3) decomposition, (R4) union and (R5) pseudo-transitivity. R0. If Y ⊆ X, then X → Y ; R1. If X → Y , then XZ → Y Z; R2. If X → Y and Y → W, then X → W ; R3. If X → Y Z, then X → Y and X → Z; R4. If X → Y and X → Z, then X → Y Z; 4.2. ACYCLIC PSEUDO-TRANSITIVE REASONING 50 R5. If X → Y and Y Z → W, then XZ → W . Given an fd set Σ, one can obtain Σ+ , the closure of Σ, by a finite application of rules R0-R5. We are concerned with reasoning over an fd set in order to process its implicit causal ordering. The latter, as we shall see in §4.3, can be performed in terms of (pseudo-)transitive reasoning. Note that R2 is a particular case of R5 when Z = ∅, then we shall refer to R5 reasoning and understand R2 included. The next definition opens up a way to compute Σ+ very efficiently. Let Σ be an fd set on attributes U , with X ⊆ U . Then X + , the attribute closure of X w.r.t. Σ, is the set of attributes A such that hX, Ai ∈ Σ+ . Bernstein has long given algorithm (Alg. 4) XClosure to compute X + . It is polynomial time in |Σ| · |U | (cf. [62]), where Σ and U are (resp.) the given fd set and the attribute set over which it is defined. A tighter time bound (linear time in |Σ| · |U |) is achievable as discussed further in Remark 4. Algorithm 4 Attribute closure X + (cf. [20, p. 388]). procedure XClosure(Σ : fd set, X : attribute set) Require: Σ is an fd set, X is a non-empty attribute set Ensure: X + is the attribute closure of X w.r.t. Σ 2: size ← 0 3: Λ←∅ 4: X+ ← X 5: while size < |X + | do 6: size ← |X + | 7: Σ←Σ\∆ 8: for all hY, Zi ∈ Σ do 9: if Y ⊆ X + then 10: ∆ ← ∆ ∪ {hY, Zi} 11: X+ ← X+ ∪ Z 12: return X + 1: . consumes fd 4.2. Acyclic Pseudo-Transitive Reasoning As discussed in the previous chapter, we shall process the causal ordering in terms of computing the transitive closure of each endogenous variable (predictive attribute). Before we proceed to that, we shall develop some machinery to reason over fd’s in terms of Armstrong’s rule R5 (pseudo-transitivity). We shall then 4.2. ACYCLIC PSEUDO-TRANSITIVE REASONING 51 demonstrate the correspondence between this kind of reasoning with causal reasoning shortly in the sequel. Def. 10 Let Σ be a set of fd’s on attributes U. Then Σ. , the pseudo-transitive closure of Σ, is the minimal set Σ. ⊇ Σ such that X → Y is in ΣB, with XY ⊆ U , iff it can be derived from a finite (possibly empty) application of rule R5 over fd’s . in Σ. In that case, we may write X → − Y and omit ‘w.r.t. Σ’ if it can be understood from the context. We are in fact interested in a very specific proper subset of ΣB, say, a kernel of fd’s in ΣB that gives a “compact” representation of the causal ordering implicit in Σ. Note that, to characterize such special subset we shall need to be careful w.r.t. the presence of cycles in the causal ordering. Def. 11 Let Σ be a set of fd’s on attributes U, and hX,Ai ∈ ΣB with XA ⊆ U . # We say that X → A is folded (w.r.t. Σ), and write X − → A, if it is non-trivial and for no Y ⊂ U with Y + X, we have Y → X and X 6→ Y in Σ+ . The intuition of Def. 11 is that an fd is folded when there is no sense in going on with pseudo-transitive reasoning over it anymore (nothing new is discovered). Given an fd X → A in fd set Σ, we shall be able to find some folded fd Z → A by applying (R5) pseudo-transitivity as much as possible while ruling out cyclic or trivial fd’s in some clever way. Def. 12 Let Σ be an fd set on attributes U , and hX, Ai ∈ Σ be an fd with XA ⊆ U . Then, (a) A#, the (attribute) folding of A (w.r.t.Σ) is an attribute set Z ⊂ U such # that Z − → A; (b) Accordingly, Σ#, the folding of Σ, is a proper subset Σ# ⊂ ΣB such that # an fd hZ, Ai ∈ ΣB is in Σ# iff X − → A for some Z ⊂ U . Example 4 (continued). Fig. 4.1 shows an fd set Σ (left) and its folding Σ# (right). Note that the folding can be obtained by computing the attribute folding 4.2. ACYCLIC PSEUDO-TRANSITIVE REASONING Σ={ φ φ φ x1 x2 x3 x 5 υ x1 x3 x4 υ x4 υ x5 υ → → → → → → → 52 Σ# = { φ φ φ φ υ x5 φ υ x4 φ υ x5 φ υ x4 x1 , x2 , x3 , x4 , x5 , x6 , x7 }. → → → → → → → x1 , x2 , x3 , x4 , x5 , x6 , x7 }. Figure 4.1. Fd set Σ encoding (cf. Alg. 3) the structure of Fig. 3.2a and its folding Σ# derived by Alg. 5. for A in each fd X → A in Σ. We illustrate below some reasoning steps to partially compute an attribute folding considering the subset of fd’s in Σ with φ ∈ / X. → → → → → 1. 2. 3. 4. 5. x 1 x2 x3 x 5 υ x 1 x3 x 4 υ x5 υ x 1 x3 x4 υ x 1 x2 x 3 x5 υ x4 x5 x7 x7 x7 6. ∴ x1 x2 x3 x 4 υ → x7 [given] [given] [given] [R5 over (2), (3)] [R5 over (1), (4)] [R5 over (2), (5)] . Note that (6) is still amenable to further application of R5, say over (1), to derive (7) x1 x2 x3 x5 υ → x7 . However, even though (1) and (6) have (resp.) the . . form (1) X → A and (6) Y → B with Y → − X, we have X → − Y as well which characterizes a cycle that fetches nothing into Y .1 In fact, if we consider only the fd’s 1-3 given, then (6) itself satisfies Def. 11 and then is folded. The same holds, e.g., for (1) by an empty application of R5. 2 Lemma 2 Let S(E, V) be a complete structure, ϕ a total causal mapping over S and Σ an fd set encoded through ϕ given S. If hX, Ai ∈ Σ, then A#, the attribute folding of A (w.r.t. Σ) exists and is unique. Proof 7 See Appendix, §A.2.1. 2 1 Note, when at the step deriving (6) by R5 over (2), (5), that such cycle was not yet formed. 4.2. ACYCLIC PSEUDO-TRANSITIVE REASONING 53 We give an original algorithm (Alg. 5) to compute the folding of an fd set. At its core there lies (Alg. 6) AFolding, which can be understood as a non-obvious variant of XClosure (cf. Alg. 4) designed for acyclic pseudo-transitivity reasoning. In order to compute the folding of attribute A in fd hX, Ai ∈ Σ, algorithm AFolding can be seen as backtracing the causal ordering implicit in Σ towards A. Analogously, in terms of the directed graph Gϕ induced by the causal ordering (see Fig. 3.3), that would comprise graph traversal to identify the nodes x ∈ V that have xa ∈ V in their reachability, i.e., x xa . Rather, AFolding’s processing of the causal ordering is fully symbolic based on Armstrong’s rewrite rule R5. Example 5 Cyclicity in an fd set Σ may have the effect of making its folding Σ# to degenerate to Σ itself. For instance, consider Σ = {A → B, B → A}. Note that Σ is canonical, and AFolding (w.r.t. Σ) is B given A, and A given B. That is, Σ# = Σ. 2 Algorithm 5 Folding of an fd set. 1: procedure folding(Σ : fd set) Require: Σ given encodes complete structure S Ensure: Returns fd set Σ# , the folding of Σ 2: Σ# ← ∅ 3: for all hX, Ai ∈ Σ do 4: Z ← AFolding(Σ, A) 5: Σ# ← Σ# ∪ hZ, Ai 6: return Σ# 4.2. ACYCLIC PSEUDO-TRANSITIVE REASONING 54 Algorithm 6 Folding of an attribute w.r.t. an fd set. 1: procedure AFolding(Σ : fd set, A : attribute) Require: Σ is parsimonious Ensure: Returns A#, the attribute folding of A (w.r.t. Σ) 2: ∆←∅ . consumed fd’s 3: Λ←∅ . consumed attrs. ? 4: A ← A . stores attrs. A is found to be ‘causally dependent’ on (cf. §4.3) 5: size ← 0 6: while size < |A? | do . halts when A(i+1) = A(i) 7: size ← |A? | 8: Σ←Σ\∆ 9: for all hY, Bi ∈ Σ do 10: if B ∈ A? then 11: ∆ ← ∆ ∪ {hY, Bi} . consumes fd ? ? 12: A ← A ∪Y 13: Λ← Λ∪B . consumes attr. 14: for all C ∈ Y do 15: if C ∈ Λ and B ∈ X for hX, Ci ∈ ∆ then . cyclic fd 16: Λ ← Λ \ B . reingests it to simulate cyclic app. of R5 17: return A? \ Λ Theorem 3 Let S(E, V) be a complete structure, and Σ an fd set encoded given S. Now, let hX, Ai ∈ Σ. Then AFolding(Σ, A) correctly computes A#, the attribute folding of A (w.r.t. Σ) in time O(|S|2 ). Proof 8 For the proof roadmap, note that AFolding is monotone (size of A? can only increases) and terminates precisely when A(i+1) = A(i) , where A(i) denotes the attributes in A? at step i of the outer loop. The folding A# of A at step i is A(i) \ Λ(i) . We shall prove by induction, given attribute A from fd X → A in parsimonious Σ, that A? \ Λ returned by AFolding(Σ, A) is the unique attribute folding A# of A. See Appendix, §A.2.2. 2 Remark 4 Let Σ be an arbitrary fd set on attribute set U . Beeri and Bernstein gave a straightforward optimization to (Alg. 4) XClosure to make it linear in |Σ|·|U | (cf. [63, p. 43-5]), where |Σ| · |U | is the maximum length for a string encoding all the fd’s. Note that the actual length of such string in our case is exactly |S|. The 4.3. EQUIVALENCE WITH CAUSAL ORDERING 55 optimization mentioned applies likewise to (Alg. 6) AFolding.2 That is, AFolding can be implemented to run in linear time in |S|. 2 Corollary 2 Let S(E, V) be a complete structure, and Σ an fd set encoded given S. Then algorithm folding(Σ) correctly computes Σ#, the folding of Σ in time that is f (|S|) Θ(|E|), where f (|S|) is the time complexity of (Alg. 6) AFolding. Proof 9 See Appendix, §A.2.3. 2 Finally, it shall be convenient to come with a notion of parsimonious fd sets (see Def. 13), which is suggestive of a distinguishing feature of such mathematical information systems in comparison with arbitrary information systems. Def. 13 Let Σ be set of fd’s on attributes U . Then, we say that Σ is parsimonious if it is canonical and, for all fd’s hX, Ai ∈ Σ with XA ⊆ U , there is no Y ⊂ U such that Y 6= X and hY, Ai ∈ Σ. Proposition 3 then shall be useful further in connection with the concept of the folding. Proposition 3 Let S(E, V) be a complete structure, ϕ a total causal mapping over S and Σ an fd set encoded through ϕ given S. Let Σ# be the folding of Σ, then Σ# is parsimonious. Proof 10 See Appendix, §A.2.4. 2 4.3. Equivalence with Causal Ordering Now we show the equivalence of acyclic pseudo-transitive reasoning with causal ordering processing. We start with Theorem 4, which establishes the equivalence between the notion of causal dependency and the fd encoding scheme presented in Chapter 3. 2 We omit its tedious exposure here. In short, it shall require one more auxiliary data structure to keep track, for each fd not yet consumed, of how many attributes not yet consumed appear in its rhs. 4.3. EQUIVALENCE WITH CAUSAL ORDERING 56 Theorem 4 Let S(E, V) be a complete structure, ϕ a total causal mapping over S and Σ an fd set encoded through ϕ given S. Then xa , xb ∈ V are such that xb is causally dependent on xa , i.e., (xa , xb ) ∈ Cϕ+ iff there is some non-trivial fd hX, Bi ∈ ΣB with A ∈ X, where B 7→ xb and A 7→ xa . Proof 11 We prove the statement by induction. We consider first the ‘if’ direction, and then its ‘only if’ converse. See Appendix §A.2.5. 2 Def. 14 then gives useful terminology for a neat concept towards our goal in this chapter. Def. 14 Let S(E, V) be a structure with variables xa , xb ∈ V, and ϕ a total causal mapping over S inducing set of direct causal dependencies Cϕ and its transitive closure Cϕ+ . We say that xa is a first cause of xb in S if (xa , xb ) ∈ Cϕ+ and, for no x ∈ V, we have (x, xa ) ∈ Cϕ+ . Proposition 4 connects the notion of first cause with those of exogenous and endogenous variables introduced in Chapter 3. Proposition 4 Let S(E, V) be a structure with variable x ∈ V. Then x can only be a first cause of some y ∈ V if x is exogenous. Accordingly, any variable y ∈ V can only have some first cause x ∈ V if it is endogenous. Proof 12 Straightforward from definitions, see Appendix §A.2.6. 2 Note that exogenous variables are encoded into fd’s X → A with φ ∈ X. Since the values of such variables are assigned “outside” the system (cf. Remark 3), they are devoid of indirect causal dependencies and then have no uncertainty except for their own. Thus, we have not to be concerned at all with processing the causal (uncertainty) chaining towards them. Our goal is rather find the first causes of the endogenous variables (predictive attributes). We shall need then the terminology of Def. 15, and then we introduce Lemma 3 paving the way to our goal. Def. 15 Let S be a structure, and Σ be a set of fd’s encoded over it. Then Υ(Σ), the υ-projection of Σ, is the subset of fd’s X → A such that υ ∈ X. Accordingly, Φ(Σ), the φ-projection of Σ, is the subset of fd’s X → A such that υ ∈ / X. 4.3. EQUIVALENCE WITH CAUSAL ORDERING Σ={ φ φ φ x1 x2 x3 x 5 υ x1 x3 x4 υ x4 υ x5 υ → → → → → → → x1 , x2 , x3 , x4 , x5 , x6 , x7 }. Υ(Σ)# = { x1 x1 x1 x1 57 x2 x2 x2 x2 x3 υ x 5 x3 υ x4 x3 υ x5 x3 υ x4 → → → → x4 , x5 , x6 , x7 }. Figure 4.2. Fd set Σ encoding the structure of Fig. 3.2a and the folding Υ(Σ)# of its υ-projection. Fig. 4.2 illustrates the υ-projection of an fd set and the folding applied over such fd subset in order to compute the first causes of endogenous variables. Lemma 3 Let S(E, V) be a complete structure, ϕ a total causal mapping over S and Σ an fd set encoded through ϕ given S. Then a variable xa ∈ V can only be a first cause of some variable xb ∈ V, where hX, Bi ∈ Σ, and B 7→ xb , A 7→ xa , if either (i) A ∈ X or (ii) A ∈ / X but there is hZ, Ci ∈ ΣB with A ∈ Z and C ∈ X. Proof 13 We prove the statement by construction out of Theorem 4, see Appendix §A.2.7. 2 Finally, Theorem 5 further clarifies the purpose of the folding and its meaning in terms of causal ordering. Theorem 5 Let S(E, V) be a complete structure, ϕ a total causal mapping over S and Σ an fd set encoded through ϕ given S. Now, let B be an attribute that encodes some variable xb ∈ V. If hX, Bi ∈ Υ(Σ)#,3 then every first cause xa of xb (if any) is encoded by some attribute A ∈ X. Proof 14 We show that the existance of a missing first cause xc of xb for folded # X − → B, where B 7→ xb and C 7→ xc but C ∈ / X leads to a contradiction. See Appendix §A.2.8. 2 3 Note that the folding is taken w.r.t. the υ-projection of Σ, then xb where B 7→ xb is an endogenous variable. 4.4. EXPERIMENTS 58 Remark 5 Observe that, on the one hand, the goal of computing the transitive closure Cϕ+ of a set of induced causal dependencies Cϕ is to derive the entire causal ordering of a given structure. The goal of folding, on the other hand, is not to discover all variables (attributes) a given variable (attribute) is causally dependent on, but only all of its first causes (if any). 2 In particular, the results just shown comprise a method to compute, for each endogenous variable (predictive attribute), all of its first causes. This is a core goal of the reasoning device developed in this chapter in order to enable the automatic synthesis of hypotheses as uncertain and probabilistic (U-relational) data. 4.4. Experiments Fig. 4.3 shows the results of experiments we have carried out in order to study how effective the causal reasoning over fd’s is in practice, in particular its behavior for hypotheses whose structure S has been randomly generated over orders of magnitude |S| ≈ 2k , to have length up to |S| ≈ 220 . 1M . The largest structure considered, with |S| ≈ 1M , has been generated to have exactly |E| = 2.5K. Like in the experiments of the previous chapter, we have executed ten runs for each tested order of magnitude, and then taken its mean running time in ms.4 The plot is shown in Fig. 3.8 is in logscale base 2. Notice the linear rate of growth across orders of magnitude (base 2) from 1K to 1M sized structures. For a growth factor of 2 in structure length (doubled), the time required by causal reasoning grows a factor of 2 (doubled as well). These scalability results are compatible with the computational complexity of folding, which is bounded by O(|S|2 ). Yet, that is a bit overestimated time bound as we see in the plot of Fig. 4.3. 4.5. Related Work The concept of fd set folding and the design of (Alg. 6) AFolding as a not quite obvious variant of XClosure, is an original approach to the problem of processing the causal ordering of a hypothesis via acyclic pseudo-transitive reasoning over fd’s. To the best of our knowledge, such a specific form of fd reasoning was an 4 The experiments were performed on a 2.3GHZ/4GB Intel Core i5 running Mac OS X 10.6.8. 4.5. RELATED WORK 59 221 time [ms] folding 216 211 26 27 29 211 213 215 217 219 221 structure length |S| Figure 4.3. Performance of acyclic causal reasoning over fd’s (logscale). yet unexplored problem in the database research literature (reasoning over fd’s is extensively covered in Maier [22]). Recent years have seen the emergence of some foundational work in causality in databases [64]. It is motivated for improving DB usability in terms of providing users with explanations to query answers (and non-answers). Essentially, the idea is borrowed from AI work on causality (cf. §3.6) to identify causal ordering between tuples. Given a query and its result set, the system should be able to explain to the user what tuples ‘caused’ that answer, or why possibly expected tuples are missing. That requires causal chain of tuples for a given query, which can be computationally expensive as the database instance can be very large. For conjunctive queries, the causality is said to be computed very efficiently [65]. A more specific problem addressed by Kanagal et. al is the so-called sensitivity analysis [66], which is aimed at establishing a more refined connection between the query answer (output) and elements of the DB instance (input) for supporting user interventions. Instead of providing the user with causes and non-causes, the goal is to enable the user to know how changes in the input affect the output. This line of work is strongly related to the vision of ‘reverse data management’ [67]. Causal reasoning in the presence of constraints (viz., fd’s) is an yet unexplored topic, though called for as worth of future work by Meliou et al. [64, p. 3]. The fd’s are rich information that can be exploited for the sake of explanation and sensitivity analysis. Once they are available, it is intuitive that the search space of such problems shall be significantly reduced. 4.6. SUMMARY OF RESULTS 60 In fact, our encoding of equations into fd’s captures the causal chain from exogenous (input) to endogenous (output) tuples in at schema level. Nonetheless our form of causal reasoning over fd’s is geared for hypothesis management and analytics, from a uncertainty management point of view. A concrete connection to causality in DB’s is not yet established. 4.6. Summary of Results In this chapter we have studied and developed a technique for acyclic causal reasoning over fd’s. We list the results achieved as follows. • We have developed principled concepts and a core algorithm, viz., (Alg. 5) the folding, in order to perform acyclic pseudo-transitive reasoning over fd’s. This is towards an efficient method for causal reasoning, yet elegant as a database formalism for the systematic construction of hypothesis probabilistic DB’s. • We have given a reasonably tight time bound for the behavior of such reasoning device in terms of the structure given as input. We have established (cf. Theorem 3, Corollary 2) the time bound of O(|S|2 ) for the folding algorithm. • We have shown the correctness of the folding algorithm in connection with causal reasoning (cf. Theorem 4, Theorem 5). • We have defined the core notion of first causes (cf. Def. 14, Proposition 4), which is meant to guide the procedure of U-intro (Chapter 5) by precisely capturing the uncertainty factors on endogenous variables (predictive attributes). This is similar, yet markedly different from computing the transitive closure of causal dependencies (cf. Remark 5). • We have performed experiments (cf. Fig. 4.3) to study how effective the approach of causal reasoning over fd’s is in practice, or how it scales for hypotheses whose structure S is randomly generated to have length up to the order of |S| . 1M . The experiments show that the time bound, though already effective for very large structures, are a bit overestimated. Chapter 5 Probabilistic Database Synthesis In this chapter we present a technique to synthesize hypothesis U-relations. At this stage of the pipeline, relational schema H is loaded with datasets computed from the hypotheses under alternative trials (input settings). The challenge is how to model or design its probabilistic version (i.e., render the U-relations Y ) so that it is suitable for data-driven hypothesis management and analytics. In §5.1 we introduce U-relational DB’s. In §5.2 we present a running example to illustrate the uncertainty introduction procedure (U-intro in the pipeline, cf. Fig. 1.4). In §5.3 we present the technique to factorize the uncertainty present in the ‘big’ fact table in terms of the well-defined uncertainty factors. In §5.4 then we show how to propagate such uncertainty into the predictive attributes properly, i.e., based on their first causes detected as shown in Chapter 4. In §5.6, we discuss related work. Finally, in §5.7 we conclude the chapter. 1 5.1. Preliminaries: U-Relations and Probabilistic WSA Three remarkable features of U-relations are: expressiveness (being closed under positive relational algebra queries); succinctness (efficient storage of a very large number of possible worlds through vertical decompositions to support attributelevel uncertainty); and efficient query processing (including confidence computation) [18]. A U-relational database or U-database is a finite set of structures, 1 n W = { hR11 , ..., Rm , p[1] i, ..., h R1n , ..., Rm , p[n] i }, 1 We postpone the presentation of experiments on p-DB synthesis (U-intro as a whole) to §6.4. 5.1. PRELIMINARIES: U-RELATIONS AND PROBABILISTIC WSA i of relations R1i , ..., Rm and numbers 0 < p[i] ≤ 1 such that 62 P 1≤ i ≤n p[i] = 1. An i , p[i] ∈ W is a possible world, with p[i] being its probability [18]. element R1i , ..., Rm Probabilistic world-set algebra (p-WSA) consists of the operations of relational algebra, an operation for computing tuple confidence conf, and the repairkey operation for introducing uncertainty — by giving rise to alternative worlds as maximal-subset repairs of an argument key [18]. Let R` [U ] be a relation, and XA ⊆ U . For each possible world hR1 , ..., Rm , pi ∈ W , let A ∈ U contain only numerical values greater than zero and let R` satisfy the fd (U \ A) → U . Then, repair-key is: Jrepair-keyX@A (R` )K(W) := n o h R1 , ..., R` , Rm , R̂` [U \ A], p̂ i , where hR1 , ..., R` , Rm , pi ∈ W , R̂` is a maximal repair of fd X → U in R` , and Y t.B P . p̂ = p · s ∈ R` : s.X = t.X s.B t∈R̂` U-relations (cf. Fig. 5.1) have in their schema a set of pairs (Vi , Di ) of condition columns (cf. [18]) to map each discrete random variable xi to one of its possible values (e.g., x1 7→ 1). The world table W stores their marginal probabilities (cf. the notion of pc-tables [17, Ch. 2]). For an illustration of the data transformation from certain to uncertain relations, consider query (5.1) in p-WSA’s extension of relational algebra, whose result set is materialized into U-relation Y0 as shown in (Fig. 5.1). Y0 := πφ,υ (repair-keyφ@Conf (H0 ) ). (5.1) Also, let R[ Vi Di | sch(R) ], S[ Vj Dj | sch(S) ] be two U-relations, where R. Vi Di is the union of all pairs of condition columns Vi Di in R, then operations of selection J σψ (R) K, projection J πZ (R) K, and product JR × SK issued in relational algebra are rewritten in positive relational algebra on U-relations: Jσψ (R)K := σψ (R[Vi Di | sch(R)]); J πZ (R) K := π Vi Di Z (R); JR×SK := π(R.Vi Di ∪ S.Vi Di )→V D ∪ sch(R) ∪ sch(S) (R ./R.Vi Di is consistent with S.Vj Dj S). 5.2. RUNNING EXAMPLE 63 H0 Y0 V 7→ D x0 7→ 1 x0 7→ 2 x0 7→ 3 φ 1 1 1 φ 1 1 1 υ 1 2 3 υ 1 2 3 Conf 2 2 1 W V 7→ D x0 7→ 1 x0 7→ 2 x0 7→ 3 Pr .4 .4 .2 Figure 5.1. U-relation generated by the repair-key operation. If R and S have k and ` pairs of condition columns each, then JR × SK returns a U-relation with k + ` such pairs. If k = 0 or ` = 0 (or both), then R or S (or both) are classical relations, but the rewrite rules above apply accordingly. All that rewriting is parsimonious translation (sic. [18]): the number of algebraic operations does not increase and each of the operations selection, projection and product/join remains of the same kind. Query plans are hardly more complicated than the input queries. In fact, it has been verified hat off-the-shelf relational database query optimizers do well in practice. For a comprehensive overview of U-relations and p-WSA we refer the reader to [18]. In this thesis we look at U-relations from the point of view of p-DB design, for which no methodology has yet been proposed. We are concerned in particular with hypothesis management applications [10]. 5.2. Running Example Before proceeding, we consider Example 6, which is fairly representative to illustrate how to deal with correlations in the predictive data of deterministic hypotheses for the sake of suitable data-driven analytics. Example 6 We explore three slightly different theoretical models in population dynamics with applications in Ecology, Epidemics, Economics, etc: (5.2) Malthus’ model, (5.3) the logistic equation and (5.4) the Lotka-Volterra model. In practice, such equations are meant to be extracted from MathML-compliant XML files (cf. Chapter 6). For now, consider that the ordinary differential equation notation ‘ẋ’ 5.2. RUNNING EXAMPLE 64 is read ‘variable x is a function of time t given initial condition x0 .’ ẋ = bx (5.2) ẋ = b(1 − x/K)x (5.3)   ẋ = x(b − py)  ẏ = y(rx − d) (5.4) The models are completed (by the user) with additional equations to provide the values of exogenous variables (or ‘input parameters’),2 e.g., x0 = 200, b = 10, such that we have SEM’s (resp.) Sk (Ek , Vk ) for k = 1..3, • E1 = { f1 (t), f2 (x0 ), f3 (b), f4 (x, t, x0 , b) }; • E2 = {f1 (t), f2 (x0 ), f3 (K), f4 (b), f5 (x, t, x0 , K, b)}; • E3 = { f1 (t), f2 (x0 ), f3 (b), f4 (p), f5 (y0 ), f6 (d), f7 (r), f8 (x, t, x0 , b, p, y), f9 (y, t, y0 , d, r, x) }. Fig. 5.2 shows the fd sets encoded from structures Sk given above.3 We also consider trial datasets for hypothesis υ = 3 (viz., the Lotka-Volterra model), which are loaded into the ‘big’ fact table relation H3 ∈ H as shown in Fig. 5.3. We admit a special attribute ‘trial id’ tid to keep hypothesis trials identified until uncertainty is introduced in a controlled way by p-DB synthesis (U-intro stage, cf. Fig. 1.4). 2 2 Given S(E, V), it is actually a task of the encoding algorithm (viz., sub-procedure TCM) to infer, for each variable x ∈ V, whether it is exogenous or endogenous by means of the total causal mapping. 3 Recall that domain variables like time t are informed to the encoding algorithm to suppress an fd φ → t. 5.2. RUNNING EXAMPLE 65 Σ1 = { φ → x0 , φ → b, x0 b t υ → x }. Σ2 = { φ φ φ x0 K b t υ → → → → Σ3 = { φ φ φ φ φ φ x0 b p t υ y y0 d r t υ x x0 , K, b, x }. → → → → → → → → x0 , b, p, y0 , d, r, x, y }. Figure 5.2. Fd sets encoded from the given structures Sk (Ek , Vk ) for hypotheses k = 1..3 from Example 6. H3 tid 1 1 2 2 3 3 4 4 5 5 6 6 6 6 6 6 φ 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 υ 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 t 0 ... 0 ... 0 ... 0 ... 0 ... 0 5 10 15 20 ... x0 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 b .5 .5 .5 .5 .4 .4 .4 .4 .397 .397 .397 .397 .397 .397 .397 .397 p y0 .02 4 .02 4 .018 4 .018 4 .02 4 .02 4 .018 4 .018 4 .02 4 .02 4 .018 4 .018 4 .018 4 .018 4 .018 4 .018 4 d .75 .75 .75 .75 .8 .8 .8 .8 .786 .786 .786 .786 .786 .786 .786 .786 r .02 .02 .023 .023 .02 .02 .023 .023 .02 .02 .023 .023 .023 .023 .023 .023 x 30 ... 30 ... 30 ... 30 ... 30 ... 30 50.1 13.8 79.3 12.6 ... y 4 ... 4 ... 4 ... 4 ... 4 ... 4 62.9 8.65 8.23 30.7 ... Figure 5.3. ‘Big’ fact table H3 of hypothesis k = 3 from Example 6 loaded with trial datasets identified by special attribute tid. Given the ‘big’ fact table H3 , p-DB synthesis has two main parts: process the ‘empirical’ uncertainty present in the ‘big’ fact table and synthesize it out (decompose it) into independent u-factors (u-factorization); and then propagate it precisely into the predictive data (u-propagation). 5.3. U-FACTORIZATION 66 5.3. U-Factorization As we have seen in §5.1, the repair-key operation allows one to create a discrete random variable in order to repair an argument key in a given relation. Our goal here is to devise a technique to perform such operation in a principled way for hypothesis management. It is a basic design principle to have exactly one random variable for each distinct uncertainty factor (‘u-factor’ for short), which requires carefully identifying the actual sources of uncertainty present in relations H. The multiplicity of (competing) hypotheses is itself a standard one, viz., the theoretical u-factor. Consider an ‘explanation’ table like H0 in Fig. 5.1, which stores (as foreign keys) all hypotheses available and their target phenomena. We can take such H0 as explanation table for the three hypotheses of Example 6. Then a discrete random variable V0 is defined into Y0 [ V0 D0 | φ υ ] by query formula (5.1). U-relation Y0 is considered standard in p-DB synthesis, as the repair of φ as a key in (standard) H0 . Hypotheses, nonetheless, are (abstract) ‘universal statements’ [15]. In order to produce a (concrete) valuation over their endogenous attributes (predictions), one has to inquire into some particular ‘situated’ phenomenon φ and tentatively assign a valuation over the exogenous attributes, which can be eventually tuned for a target φ. The multiplicity of such (competing) empirical estimations for a hypothesis k leads to Problem 1, viz., learning empirical u-factors for each Hk ∈ H. Problem 1 Let Σk be an fd set encoded given hypothesis structure Sk , and Hk its ‘big’ fact table relation loaded with trial data. Now, let Z be the set of attributes encoding exogenous variables in Hk , then the problem of u-factor learning is: (1) to infer in Hk ‘casual’ fd’s φ Bi → Bj , φ Bj → Bi not in Σk (strong input correlations), where Bi , Bj ∈ Z; (2) to form maximal groups G1 , ..., Gn ⊆ Z of attributes such that for all Bi , Bj ∈ Ga , the casual fd’s φ Bi → Bj and φ Bj → Bi hold in Hk ; (3) to pick, for each group Ga , any A ∈ Ga as a pivot representative and insert φ A → B into an fd set Ωk for all B ∈ (Ga \ A). 5.3. U-FACTORIZATION H3 tid 1 1 2 2 3 3 4 4 5 5 6 6 6 6 6 6 φ 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 67 υ 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 t 0 ... 0 ... 0 ... 0 ... 0 ... 0 5 10 15 20 ... x0 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 b .5 .5 .5 .5 .4 .4 .4 .4 .397 .397 .397 .397 .397 .397 .397 .397 p y0 .02 4 .02 4 .018 4 .018 4 .02 4 .02 4 .018 4 .018 4 .02 4 .02 4 .018 4 .018 4 .018 4 .018 4 .018 4 .018 4 d .75 .75 .75 .75 .8 .8 .8 .8 .786 .786 .786 .786 .786 .786 .786 .786 r .02 .02 .023 .023 .02 .02 .023 .023 .02 .02 .023 .023 .023 .023 .023 .023 x 30 ... 30 ... 30 ... 30 ... 30 ... 30 50.1 13.8 79.3 12.6 ... y 4 ... 4 ... 4 ... 4 ... 4 ... 4 62.9 8.65 8.23 30.7 ... Figure 5.4. ‘Big’ fact table H3 of hypothesis k = 3 from Example 6 with u-factors {b, d} and {p, r} emphasized (resp.) in colors green and red. U-factor learning is meant to process only the attributes Z ⊂ U from Hk [U ] that are inferred exogenous in the given hypothesis, i.e., for all A ∈ Z, there is an fd hX, Ai ∈ Φ(Σk ), where the latter is the φ-projection of Σk . Such attributes are then ‘officially’ unrelated. In fact, by ‘casual’ fd’s we mean correlations that, for a set of experimental trials, may occasionally show up in the trial input data; e.g., x0 ↔ y0 hold in H3 , but not because x0 and y0 are related in principle (theory). Fig. 5.4 helps to illustrate Problem 1 through the ‘big’ fact table. We emphasize u-factors {b, d} and {p, r} in colors green and red. Observe that values of b are strongly correlated (one-to-one) with values of d for φ = 1, just like p and r. Note also that {x0 , y0 } can be seen as a certain factor. From the user point of view, this is a record that reflects a common practice in computational science known as (parameter) sensibility analysis. Problem 1 is dominated by the (problem of) discovery of fd’s in a relation, which is not really a new problem (e.g., see [68]). We then keep focus on the synthesis method as a whole and omit our detailed u-factor-learning algorithm in 5.3. U-FACTORIZATION Ω3 = { φ x0 φb φp x0 b p t υ y y0 d r t υ x 68 → → → → → y0 , d, r, x, y }. Ω# 3 = { φ x0 φb φp φ x0 b p t υ y φ x0 b p t υ x → → → → → y0 , d, r, x, y }. Figure 5.5. Fd set Ω3 (compare with Σ3 ) and its folding Ω# 3. particular.4 Its output, fd set Ωk , is then filled in (completed) with the υ- projection Υ(Σk ). For illustration consider hypothesis υ = 3 and its trial input data recorded in H3 in Fig. 5.3. We show its resulting fd set Ω3 in Fig. 5.5 (left), together with its folding Ω# k (right). The latter is then input to (Alg. 7) merge to get the final information necessary for the actual synthesis of U-relations, as captured in Def. 16. For an illustration of the merging of fd’s with equivalent left-hand sides, note in Fig. 5.5 (right) that φ x0 b p t υ y ↔ φ x0 b p t υ x holds in + (Ω# 3 ) . Def. 16 Let Sk and Hk be the complete structure and ‘big’ fact table of hypothesis k, and Σk an fd set defined Σk , h-encode(Sk ). Now, let Ωk , u-factor-learning( Hk , # Φ(Σk ) ) ∪ Υ(Σk ), and Ω# k be the folding of Ωk . Finally, define Γk , merge( Ωk ). Then we say that Γk is the u-factorization of Sk over Hk . Algorithm 7 Merge fd’s with equivalent left-hand sides. 1: procedure merge(Σ : fd set) 2: Ω←∅ 3: for all hX, Ci ∈ Σ do 4: if there is hZ, W i ∈ Ω such that X ↔ Z holds in Σ+ then 5: Ω ← Ω \ hZ, W i 6: S ←X \Z 7: Ω ← Ω ∪ hZ, W SCi . merges equivalent keys 8: else 9: Ω ← Ω ∪ hX, Ci 10: 4 return Ω In short, we make use of relational algebra group-by operation and build a pruned lattice of attribute groups having the same number of rows under the grouping (similarly to [68]). 5.3. U-FACTORIZATION 69 Remark 6 Let Γk be the u-factorization of structure Sk over ‘big’ fact table Hk . Then every fd in Γk encodes a clear-cut claim, either empirical, in Φ(Γk ), or theoretical, in Υ(Γk ). That is ensured by the merge algorithm, which groups fd’s in Ω# k with equivalent left-hand sides. 2 We are now able to employ a notion of u-factor decomposition formulated in Def. 17 into query formula (5.5) in p-WSA’s extension of relational algebra. Def. 17 Let Sk be the complete structure of hypothesis k, and Hk [U ] its ‘big’ fact table such that Γk is the u-factorization of Sk over Hk . Now, let Ga ⊂ U be a set of attributes Ga = A G such that, for all B ∈ G, an fd φ A → B exists in Φ(Γk ). Then we define U-relation Yki [Vi Di | φ A G ] by query formula (5.5), and say that Yki is a u-factor projection of Hk . Yki := π φ A G (repair-key φ @ count ( γ φ, A, G, count(∗) (Hk ) ) ) (5.5) where γ is relational algebra’s grouping operator. Y13 V 7→ D φ x0 y0 x2 7→ 1 2 30 4 Y23 V 7→ D x3 7→ 1 x3 7→ 2 x3 7→ 3 φ b d 2 .5 .5 2 .4 .8 2 .397 .786 Y33 V 7→ D φ p r x4 7→ 1 2 .020 .020 x4 7→ 2 2 .018 .023 Figure 5.6. U-factor projections rendered for hypothesis υ = 3. The synthesis of u-factor projections, in particular the application of repair-key (cf. Eq. 5.5), has an important consequence for the u-factorization Γk of Hk , viz., the introduction of new fd’s into Γ0k defined as follows (see Def. 18). We shall consider it (rather than Γk ) to study design-theoretic properties of synthesized Y k in §5.5. Def. 18 Let Sk and Hk [U ] be (resp.) the complete structure and ‘big’ fact table of hypothesis k, and Γk be the u-factorization of Sk over Hk . Now, let Γ0k , S i i ∈ I {φ → Ai Gi } ∪ Γk , where I indexes all u-factor projections Yk [ Vi Di | φ Ai Gi ] of Hk . We say that Γ0k is the repaired factorization of Sk over Hk . 5.4. U-PROPAGATION 70 5.4. U-Propagation U-propagation is a central part of U-intro and the pipeline itself. Recall that all the machinery developed so far, from hypothesis encoding to causal reasoning to u-factorization is for enabling predictive analytics. Let us briefly reconstruct it. For hypothesis structure Sk (E, V), take any endogenous variable xc ∈ V encoded by attribute C 7→ xc . There should be exactly one fd hX, Ci ∈ Υ(Σk )#. By Theorem 5, for every first cause xb of xc there is B ∈ X where B 7→ xb with xb ∈ V. Now, observe that when Ωk is rendered by u-factor learning, it is filled partly with fd’s from Υ(Σk ), and partly with fd’s processed from Φ(Σk ). This is to summarize exogenous variables into clear-cut independent u-factors. It means that, after u-factor learning, each first cause xb encoded by B shall be represented by some pivot attribute Ai which is, if not Ai = B itself, then occasionally strongly correlated to it (i.e., φ Ai → B and φ B → Ai hold in Hk ). Further then Ωk is subject to folding such that, if B ∈ X for hX, Ci ∈ Υ(Ωk ), now we have Ai ∈ Z for hZ, Ci ∈ Υ(Ω# k ). This processing from fd X → C (where X contains the first causes) into Z → C (where Z contains only their pivot representatives) is meant for enabling an economical representation of uncertainty. Our running example is small, but such a principle is quite relevant for large-scale hypotheses (say, when |S| ≈ 1M ). The correctness of such u-factor summarization shall be ensured by Proposition 3, which let us know that Ω# k is parsimonious then (by Def. 13) canonical, therefore (by Def. 9) left-reduced. Now, all fd’s in Υ(Ω# k ) have form Z → C and we are almost ready for upropagation. Note that, as a result of u-factorization, each pivot attribute Ai ∈ Z is associated with random variable Vi from U-relation Yki [ Vi Di | φ Ai Gi ]. Then we shall use each Ai ∈ Z (from Z → C) as a surrogate to Yki in order to propagate factorized uncertainty into ‘predictive’ U-relations Ykj [ Vj Dj | S T ] by a join formula. Attribute sets S and T are defined after merging fd’s in Ω# k with equivalent lhs to get Γk and pass it as argument for synthesis. We let S = Z \ W such that S contains the domain variables only (e.g., φ, υ, t). The pivot attributes in Z shall not be included in the data columns of Ykj , but leave their trace through the condition columns Vj Dj that annotate sch(Ykj ) as a repair of the key S → T . 5.4. U-PROPAGATION 71 All that (cf. Def. 19) is abstracted into general p-WSA query formula (5.6), and employed in (Alg. 8 ) synthesize to accomplish u-propagation (Part II). Def. 19 Let Sk be the complete structure of hypothesis k, and Hk [U ] its ‘big’ fact table such that Γk is the u-factorization of Sk over Hk . Now, let Z → T be an fd in Υ(Γk ). Then we define U-relation Ykj [ Vj Dj | S T ] by query formula (5.6), and say that Ykj is a predictive projection of Hk , where: Ykj := π S, T ( συ=k (Y0 ) ./ (./ i ∈ I Yki ) ./ Hk ) (5.6) (a) Yki [ Vi Di | φ Ai Gi ] is a u-factor projection of Hk ; (a) we have i ∈ I if Ai ∈ Z; (c) we take S = Z \ W , where W is the set of all pivot attributes representing first causes in Z. Algorithm 8 p-DB synthesis applied over folding fd set. 1: procedure synthesize(Sk : structure, Hk : ‘big’ table, Y0 : explan. table) Require: Sk is complete Ensure: U-relations Y k returned are a BCNF, lossless decomposition of Hk 2: Σk ← h-encode(Sk ) 3: Ωk ← u-factor-learning( Φ(Σk ), Hk ) ∪ Υ(Σk ) 4: Γk ← merge( folding(Ωk ) ) Part I: U-factorization 5: for all hφ A, Gi ∈ Φ(Γk ) do . scans over the u-factors of hypothesis k i 6: Yk ← π φ, A, G (repair-keyφ@count ( γ φ, A, G, count(∗) (Hk ) ) ) 7: Y k ← Y k ∪ Yki 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: Part II: U-propagation for all hZ, T i ∈ Υ(Γk ) do . scans over the claims of hypothesis k W ←∅ . prepares to keep track of u-factor pivot attributes i for all Yk [ φ Ai Gi ] ∈ Y k do if A ∈ Z then . A is a first cause of all B ∈ T I = I ∪ {i} . indexes the u-factor projection W ←W ∪A . keeps track of u-factor’s pivot attribute S ←Z \W . removes u-factor pivot attributes j i Yk ← π S, T ( συ=k (Y0 ) ./ (./ i ∈ I Yk ) ./ Hk ) Y k ← Y k ∪ Ykj return Y k 5.4. U-PROPAGATION 72 Fig. 5.7 shows the rendered U-relations for hypothesis k = 3 whose ‘big’ fact table is shown in Fig. 5.3. Note that tid = 6 in H3 corresponds now to θ = { x1 7→ 3, x2 7→ 1, x3 7→ 3, x4 7→ 2 }, where θ defines a particular world in W whose probability is Pr(θ) ≈ .055. This value is derived from the marginal probabilities stored in world table W (see Fig. 5.7) as a result of the application of formulas Eq. 5.1 and Eq. 5.5. Remark 7 Observe that, although (Alg. 8) synthesize operates locally for each hypothesis k, the effects of p-DB synthesis (U-intro) in the pipeline are global on account of the (global) ‘explanation’ relation H0 (then U-relation Y0 ), e.g., see Fig. 5.7. In fact, the probability of each tuple (row), say, in U-relation Ykj with φ = p for hypothesis υ = k, is distributed among all the hypotheses ` 6= k that are keyed in Y0 under φ = p, i.e., all hypotheses that compete at φ = p. 2 W Y0 V 7→ D x1 7→ 1 x1 7→ 2 x1 7→ 3 Y13 Y43 V 7→ D φ x0 y0 x2 7→ 1 1 30 4 V1 7→ D1 x1 7→ 3 x1 7→ 3 ... x1 7→ 3 x1 7→ 3 x1 7→ 3 x1 7→ 3 x1 7→ 3 x1 7→ 3 V2 7→ D2 x2 7→ 1 x2 7→ 1 ... x2 7→ 1 x2 7→ 1 x2 7→ 1 x2 7→ 1 x2 7→ 1 x2 7→ 1 φ 1 1 1 υ 1 2 3 Y23 V 7→ D x3 7→ 1 x3 7→ 2 x3 7→ 3 V3 7→ D3 x3 7→ 1 x3 7→ 1 ... x3 7→ 3 x3 7→ 3 x3 7→ 3 x3 7→ 3 x3 7→ 3 x3 7→ 3 V 7→ D x1 7→ 1 x1 7→ 2 x1 7→ 3 x2 7→ 1 x3 7→ 1 x3 7→ 2 x3 7→ 3 x4 7→ 1 x4 7→ 2 φ b d 1 .5 .5 1 .4 .8 1 .397 .786 V4 7→ D4 x4 7→ 1 x4 7→ 1 ... x4 7→ 2 x4 7→ 2 x4 7→ 2 x4 7→ 2 x4 7→ 2 x4 7→ 2 φ 1 1 1 1 1 1 1 1 1 Pr .4 .4 .2 1 .33 .33 .33 .5 .5 Y33 V 7→ D φ p r x4 7→ 1 1 .020 .020 x4 7→ 2 1 .018 .023 υ 3 3 3 3 3 3 3 3 3 t 1900 ... ... 1900 1901 1902 1903 1904 ... y 4 ... ... 4 4.12 5.78 11.7 31.1 ... Figure 5.7. U-relations rendered for hypothesis υ = 3. x 30 ... ... 30 41.5 56.7 72.8 75.9 ... 5.5. DESIGN-THEORETIC PROPERTIES 73 U-relations rendered by p-DB synthesis are ready for querying. Typical queries comprise the conf() aggregate operation, inquiring the probability (or confidence) for each tuple to ‘true’ in the probability space captured by the hypothesis competition. We illustrate queries in Chapter 6. 5.5. Design-Theoretic Properties For the U-intro procedure to be meaningful, we have to study design-theoretic properties of u-factor projections and prediction projections synthesized out of ‘big’ fact table Hk for the sake of predictive analytics. In particular, for the projections to be claim-centered, we submit that they should satisfy Boyce-Codd normal form (BCNF, cf. Def. 21) w.r.t. the repaired factorization Γ0k of Hk ; and for them to be a correct decomposition of the uncertainty present in Hk , their join should be lossless (preserve the data in Hk , cf. Def. 22) w.r.t. Γ0k . Note that in this study we consider repaired factorization Γ0k (not u-factorization Γk ), since it is the one which actually holds in Y k after key repairing. 5.5.1 Claim-Centered Decomposition As emphasized through Remark 6, every fd in u-factorization Γk is a claim (cf. Remark 6), then the same holds for repaired factorization Γ0k . Thus, for a claimcentered decomposition of ‘big’ fact table Hk , it is desirable that U-relational schema Y k that it satisfies BCNF w.r.t. Γ0k . BCNF (‘do not represent the same fact twice’ [21, p. 251]) is our notion of ‘good design’ for uncertainty decomposition in view of predictive analytics. This is to avoid the uncertainty of one claim to be undesirably mixed with the uncertainty of another claim. Def. 20 Let R[U ] be a relation scheme over set U of attributes, and Σ a set of fd’s. Then the projection of Σ onto R[U ], written πU (Σ), is the subset Σ0 ⊆ Σ of fd’s X → Z such that XZ ⊆ U . Def. 21 Let R[U ] be a relation scheme over set U of attributes, and Σ a set of fd’s on U . We say that: (a) R is in BCNF if, for all hX, Ai ∈ Σ+ with A 6∈ X and XA ⊆ U , we have X → U (i.e., X is a superkey for R); 5.5. DESIGN-THEORETIC PROPERTIES 74 (b) A schema R is in BCNF if all of its schemes R1 , ..., Rn ∈ R are in BCNF. Example 7 To illustrate the concept of BCNF, let us consider canonical fd set Σ = {A → B, B → C } over attributes U = {A, B, C}, and a tentative schema containing a single relation R[ABC]. This relation is not in BCNF because, for one, B → C violates it (C * B but B is not a superkey for R). 2 Observe also that an overdecomposed schema may (trivially) satisfy BCNF. For example, let Σ = {A → B, A → C} then by Def. 21 both schemas R = R1 [ABC] and R0 = {R1 [AB], R2 [AC]} are in BCNF w.r.t. Σ. The second, however, breaks data into two tables making their access more difficult than necessary since both B and C brings in information about A. That is, if the schema were to be synthesized over the fd’s in Σ, then it would be desirable to apply (R4) union or merge them before. Our point is that, if we target at a BCNF-satisfying schema, then it is also desirable for it to be the minimal-cardinality schema in BCNF. Theorem 6 guarantees the BCNF property w.r.t. Γ0k by design for every schema Y k rendered by (Alg. 8) synthesize over Γk . Theorem 6 Let Sk and Hk be (resp.) the complete structure and ‘big’ fact table of hypothesis k, and let Γ0k be the repaired factorization of Sk over Hk , and Y0 the ‘explanation’ table where hypothesis k is recorded. Now, let Y k be a U-relational schema defined Y k , synthesize(Sk , Hk , Y0 ). Then Y k is in BCNF w.r.t. Γ0k and is minimal-cardinality. Proof 15 We exploit the fact that the projection of (Γ0k )+ onto u-factor projections and predictive projections define a disjoint partition of (Γ0k )+ into its φ-projection Φ(Γ0k )+ and υ-projection Υ(Γ0k )+ . Since we know the form of fd’s in each of them, the search space for BCNF violations is significantly reduced. The minimality of |Y k | in turn comes from (Alg. 7) merge. See Appendix, §A.3.1. 2 5.5.2 Correctness of Uncertainty Decomposition Recall from the preliminaries (cf. §5.1) that the U-relational equivalent of the relational product operation (main sub-operation of the join operation) has been introduced. Now, we provide the classical definition of a lossless join [20], i.e., 5.5. DESIGN-THEORETIC PROPERTIES 75 when a decomposition of data from a relation into two or more relations is known to preserve the data in its original form by an application of the join. Def. 22 Let R[U ] be a (U-)relational schema synthesized into collection R = Sn i=1 Ri and let Σ be an fd set on attributes U . We say that R has a lossless join w.r.t. Σ if for every instance r of R[U ] satisfying Σ, we have r = ./ ni=1 πRi (r). The lossless join property is of interest to ensure that our decomposition of the data from the ‘big’ fact table into u-factor projections preserves the data so that their join to ‘annotate’ the predictive projections when propagated by means of the U-relational join operation is correct. Theorem 7 guarantees that is the case. Theorem 7 Let Sk be the complete structure of hypothesis k, and Hk [U ] its ‘big’ fact table such that Γ0k is the repaired factorization of Sk over Hk and Y0 is the ‘explanation’ table where hypothesis k is recorded. Now, let Y k be a U-relational schema defined Y k , synthesize(Sk , Hk , Y0 ). Then, i (a) the join ./ m i=1 Yk [ Vi Di | φ Ai Gi ] of any subset of the u-factor projections of Hk is lossless w.r.t. Γ0k . (b) any predictive projection Ykj [ Vj Dj | S T ], result of a join of the theoretical u-factor Y0 [ V0 D0 | φ υ ] with the ‘big’ fact table Hk [U ] and in turn with u-factor projections Yki [ Vi Di | φ Ai Gi ], is lossless w.r.t. Γ0k . Proof 16 We make use of a lemma from Ullman [20, p. 397], and then the proof comes straightforwardly. See Appendix, §A.3.2. 2 Remark 8 The significance of Theorem 6 lies in that it guarantees the decomposition of uncertainty based on the causal ordering processing is in fact claim-centered as desirable for predictive analytics. Theorem 7 in turn is significant as it ensures that all the empirical uncertainty implicit in a hypothesis ‘big’ fact table Hk can be decomposed into u-factor projections that are (a) independent (not strongly correlated, cf. Problem 1), and (b) can be fully recovered by a join that is lossless w.r.t. repaired factorization Γ0k of structure Sk over Hk . This is essential to make sure that in u-propagation the composition of the required u-factors recovers the uncertainty associated with the predictive data. Since repaired factorization Γ0k is 5.6. RELATED WORK 76 known to be a correct processing of the causal ordering (cf. results of Chapter 4), altogether Theorem 7 guarantees that the first causes are joined together correctly towards the predictive variables influenced by them. 2 As we have seen, the p-DB synthesis technique presented here is essentially targeted at design-theoretic properties. It is also motivated by computational performance, as uncertainty decomposition is desirable also to speed up probabilistic inference [17, p. 30-1]. In fact, the U-intro procedure is fully grounded in U-relations and p-WSA as implemented in the MayBMS system. Its computational performance is dominated by U-relational query processing. We present experimental studies on the U-intro procedure in §6.4, as they are designed from a applicability point of view. The goal is to provide some reference computational measures for prospective users. 5.6. Related Work Informed on research on Graphical Models (GM) [69], Suciu et al. provide a striking motivation for work on probabilistic database design [17, p.30-1]. In GM design, probability distributions on large sets of random variables are decomposed into factors of simpler probability functions, over small sets of these variables. The factors can be identified, e.g., by using a set of axioms (the so-called ‘graphoids’) for reasoning about the probabilistic independence of variables [70]. The same design principle (sic.) applies to p-DB’s [17]: the data should be decomposed into its simplest components so that only key constraints hold in a table (i.e., it is in BCNF). Attribute- and tuple-level correlations should guide the table decomposition into simpler tables. Ideally, the original table with its probability distribution can be recovered as a query (a view) from the decomposed tables. We have followed such principle in our claim-centered decomposition for predictive analytics. In fact, a connection between database normalization theory and factor decomposition in Graphical Models (GM) has been discussed by Verma and Pearl [70], but has not been explored since then. To date, there is no formal design theory for p-DB’s [17]. A step in that direction is taken by Sarma et al. [71]. Their initiative revisits dependency theory in view of reformulating fd’s for uncertain schema 5.6. RELATED WORK 77 design [71]. Our work takes a different direction. We refer to classical dependency theory and U-relational operations (viz, its uncertainty-introduction operator) to construct p-DB’s systematically from scratch. We have focused on the extraction and processing of fd’s towards a factorized U-relational schema. The synthesized schema is ensured to be in BCNF and have a lossless join. Despite some major differences, our synthesis method builds upon the classical theory of relational schema design by synthesis [62]. Classical design by synthesis [62] was once criticized due to its too strong ‘uniqueness’ of fd’s assumption [72, p. 443], as it reduces the problem of design to symbolic reasoning on fd’s, arguably neglecting semantic issues. Probabilistic design, however, has roots in statistical design so that the problem is less amenable to human factors. As we extract the dependencies from a formal specification, design by synthesis is doing nothing but translating seamlessly (into fd’s) the reduction made by the user herself in her tentative model for the studied phenomenon. The last decade has seen significant research effort to make DB systems really usable [73]. Our design-by-synthesis framework can also be understood as a technique for user-friendly p-DB design. For instance, in comparison, the CRIUS system supports another kind of user-friendly DB design approach that provides users with a spreadsheet-like direct manipulation interface to increasingly add structure to their data [74]. Our dependency extraction and processing, instead, completely alleviates the user from the burden of data organization. Also related to probabilistic DB design is the topic of conditioning a p-DB. It has been firstly addressed by Koch and Olteanu motivated by data cleaning applications [75]. They have introduced the assert operation to implement, as in AI, a kind of knowledge compilation, viz., world elimination in face of constraints (e.g., FDs). For hypothesis management, nonetheless, we need to apply Bayes’ conditioning by asserting observed data, not constraints. In §2.5 we have presented an example that settles the kind of conditioning problem that is relevant to the Υ-DB vision. In Chapter 6 we present realistic use cases. We have addressed the problem at application level only in order to complete the realization of the vision in a real prototype system. The formulation of Bayes’ conditioning as an extension of, say, the U-relational data model is open to future work (cf. §7.3). 5.7. SUMMARY OF RESULTS 78 5.7. Summary of Results In this chapter we have studied and developed our end-purpose technique for the synthesis of a probabilistic DB geared for predictive analytics. It completes the pipeline (Fig. 1.4) so that conditioning can then be performed iteratively. • Algorithm 8 synthesize gives a general formulation of how to perform uncertainty introduction from causal dependencies given in the form of fd’s. • By Problem 1, we have given a definition of uncertainty factor learning from data available in a given relation. • Remark 7 provides an example of the u-factor and predictive projections resulting from p-DB synthesis and their corresponding probability distributions stored in the world table; • By Remark 6 and Theorem 6, we have shown that U-relational schema Y k synthesized over the fd’s processed by causal reasoning is in BCNF. That is, it is in fact a claim-centered decomposition as desirable for predictive analytics. • Theorem 7 ensures that such (uncertainty) decomposition is correct, as the original (probability distribution) ‘big’ fact table is fully recoverable by a lossless join. Chapter 6 Applicability In this chapter we show the applicability of Υ-DB in real-world scenarios. We present use cases in Computational Physiology extracted from the Physiome project.1 In §6.1 we introduce the Physiome project as providing a testbed for Υ-DB. Then in §6.2 we go through some Physiome case studies to show the construction of Υ-DB and its application for data-driven hypothesis management and analytics. In §6.3 we present a prototype of the Υ-DB system and demonstrate it through the running example introduced in §5.2. In §6.4 we present experiments on Physiome hypotheses. In §6.5 we provide a general discussion on the applicability of Υ-DB, its assumptions and scope. In §6.6 we conclude the chapter. 6.1. The Physiome Project as a Testbed The Physiome project is an initiative to seriously address the problems of reproducibility, model integration and sharing in Computational Physiology [34, 33]. It essentially comprises: • a curated repository of 380+ computational physiology models available online for researchers;2 • the Mathematical Modeling Language (MML) to allow models to be written in declarative form and then exported into a number of XML-compliant 1 http://physiome.org. The Physiome model repository is expanded to over 73K+ models by including models extracted from other sources (such as the EBML-EBI BioModels DB, the CellML Archive, and the Kegg Pathways DB) and converted to MML automatically. 2 6.2. CASE STUDIES 80 interoperable formats;3 • a problem-solving environment called JSim to allow researchers to code their MML models straightforwardly, run them under different parameter and solver settings and build customized data plots to see the results. From the point of view of Υ-DB, Physiome is an external data source that provides a very interesting testbed with realistic scenarios. We extract Physiome models into Υ-DB by means of a wrapper we have implemented to read XMML files (JSim’s XML encoding of MML models). Simulation trial datasets are rendered by a parametrized UNIX script we have developed to invoke JSim automatically (in batch mode). Currently, Υ-DB’s Physiome wrapper is designed to read MAT files to load both the model input (parameter settings data) and its associated model output (computed predictive data) for each simulation trial. Physiome does not keep records of phenomena in a repository, but it does have observational data attached to some of the entries of the model repository. Such models appear in the filter ‘models with data,’ meaning that they have one or more observational datasets and plots showing how the model data fits to observations. We shall make use of model entries containing observational data in the realistic scenarios presented in this paper. 6.2. Case Studies In this section we present use cases extracted from the Physiome model repository.4 6.2.1 Case: Hemoglobin Oxygen Saturation In this case we stress the potential of data-driven hypothesis analytics in comparison to handcrafted curve fitting (visual) analysis. We study three different hypotheses that perform “closely” visually when compared to their target phenomenon dataset, see Fig. 6.1. All of them have been empirically set as fit as possible to the observations (‘R1s1’ dataset) in their local view (in separate), and are now compared together in a global view. 3 4 http://www.physiome.org/jsim/docs/MML_Intro.html. http://www.physiome.org/Models/modelDB/. 6.2. CASE STUDIES 81 Figure 6.1. Plot of hemoglobin oxygen saturation hypotheses (SHbO2.{Ad, H, D} curves) and their target observations (‘R1s1’ dataset). (source: Physiome). Example 8 The resources of this example are shown in Fig. 6.2. We consider the Physiome model entries described in relation HYPOTHESIS, associated to the phenomenon described in relation PHENOMENON (cf. explanation relation H0 ). One single hypothesis trial (its best fit) is considered for each hypothesis. 2 HYPOTHESIS PHENOMENON υ 28 Name HbO.Hill Description Hill Equation for O2 binding to hemoglobin. 31 HbO.Adair Hemoglobin O2 saturation curve using Adair’s 4-site equation. 32 HbO.Dash Hemoglobin O2 saturation curve at varied levels of PCO2 and pH. φ 1 Description Hemoglobin oxygen saturation with observational dataset from Sevenringhaus 1979. H0 φ 1 1 1 υ 28 31 32 Figure 6.2. Descriptive (textual) data of Example 8, with ids υ from Physiome’s model repository (http://www.physiome.org/Models/modelDB/). 6.2. CASE STUDIES 82 Encoding. The fd encoding of hypotheses υ ∈ {28, 31, 32} is shown (resp.) in Fig. 6.3, Fig. 6.4 and Fig. 6.5. Σ28 = { KO2 n pO2 υ → n p50 υ φ → SHbO2 H, → KO2, n p50 pO2 delta pO2 max pO2 min }. Figure 6.3. Fd set Σ28 of hypothesis υ = 28. Σ31 = { φ → A1 A2 A3 A4 pO2 υ p50 υ → → SHbO2 Ad, A1 A2 A4, A3 p50 pO2 delta pO2 max pO2 min }. Figure 6.4. Fd set Σ31 of hypothesis υ = 31. Σ32 = { KO2 pO2 υ → SHbO2 D, → term1 term2 term3 υ KO2, HpRBC K6p alphaO2 υ → term1, HpRBC K3 K5 alphaCO2 pCO2 υ → term2, HpRBC K2 K4 alphaCO2 pCO2 υ → term3, pH υ → HpRBC, φ → K2 K3 K4 K5 K6p alphaCO2 alphaO2 pCO2 pH pO2 delta, pO2 max pO2 min }. Figure 6.5. Fd set Σ32 of hypothesis υ = 32. Symbol Mappings. As we have seen, the insertion of hypothesis trial datasets requires users to specify a target phenomenon and the corresponding mappings from the hypothesis symbols to the target phenomenon symbols. In this use case, we have: • M287→1 = { pO2 7→ pO2, SHbO2 H 7→ SHbO2 }; • M317→1 = { pO2 7→ pO2, SHbO2 Ad 7→ SHbO2 }; • M327→1 = { pO2 7→ pO2, SHbO2 D 7→ SHbO2 }; 6.2. CASE STUDIES 83 Hypothesis Management. Query Q1 illustrates the feature of hypothesis management for this case. We consider the user is interested in all SHbO2 predictions over a subset of the pO2 domain. Its result set is shown in Fig. 6.6. Q1. (select phi, upsilon, tid, “pO2”, “SHbO2 H” as SHbO2 from Y28 claim1 where phi=1 and “pO2”>=20 and “pO2”<=40) union all (select phi, upsilon, tid, “pO2”, “SHbO2 Ad” as SHbO2 from Y31 claim1 where phi=1 and “pO2”>=20 and “pO2”<=40) union all (select phi, upsilon, tid, “pO2”, “SHbO2 D” as SHbO2 from Y32 claim1 where phi=1 and “pO2”>=20 and “pO2”<=40) order by “pO2”, upsilon, tid; Q1 φ 1 1 1 ··· 1 1 1 υ 28 31 32 ··· 28 31 32 tid 1 1 1 ··· 1 1 1 pO2 20 20 20 ··· 40 40 40 SHbO2 0.329956122828398 0.294443723056007 0.334165672301096 ··· 0.761898061367189 0.823463829100424 0.759042287799556 Figure 6.6. Result set of hypothesis management query Q1. Hypothesis Analytics. Fig. 6.7 shows the results of analytics after conditoning the probability distribution in the presence of observations (‘R1s1’ dataset). The fact that hypothesis υ = 31 provides the best explanation for the studied phenomenon is enabled by the application of Bayesian inference as implemented within the Υ-DB system. The contribution of the Υ-DB methodology is to equip users with a tool for large-scale, data-driven hypothesis management and analytics. PH1 CONF φ 1 1 1 ··· 1 1 1 υ 28 31 32 ··· 28 31 32 tid 1 1 1 ··· 1 1 1 pO2 1 1 1 ··· 100 100 100 SHbO2 0.000151184162020125 0.003789100566457180 0.000178973375779681 ··· 0.974346796798538 0.990781330988763 0.972764121981342 Prior .333 .333 .333 ··· .333 .333 .333 Posterior .326 .349 .325 .326 .349 .325 Figure 6.7. Results of analytical study on the hemoglobin phenomenon. 6.2. CASE STUDIES 84 6.2.2 Case: Baroreflex Dysfunction in Dahl SS Rat This case is extracted from the Virtual Physiological Rat project,5 Here we show the potential of data-driven hypothesis management and analytics for model tuning. Fig. 6.8 shows the best fit of a baroreflex model for an observational dataset acquired by experiment on Dahl SS rat [76]. We in turn use Υ-DB to carry out such hypothesis management and analytics. We generate by a parameter sweep script 1K trials and insert them into the database. A best fit is then selected automatically by Bayesian inference. Figure 6.8. Plot of baroreflex hypothesis (‘HR’) for Dahl SS Rat and its target observations (‘data’). (source: [76]). Example 9 The resources of this example are shown in Fig. 6.9. We consider the single hypothesis entry described in relation HYPOTHESIS, and the phenomenon described in relation PHENOMENON. By parameter sweep, 1K trials are inserted into Υ-DB for management and analytics. 2 HYPOTHESIS υ 1001 PHENOMENON φ 2 Name Baroreflex SB CT Description Physiological model of the full baroreflex heart control system based on experimental measurements. Description Baroreflex dysfunction in Dahl SS Rat. H0 φ 2 υ 1001 Figure 6.9. Descriptive (textual) data of Example 9. Encoding. The fd encoding of hypothesis υ ∈ {1001} is shown in Fig. 6.12. 5 http://virtualrat.org/computational-models/. 6.2. CASE STUDIES 85 Symbol Mappings. We consider that the user provides symbol mappings: • M10017→2 = { Time 7→ Time, HR 7→ HR }; Hypothesis Management. In query Q2 we consider that the user is interested in time instants where the heart rate is higher than a threshold, say, 300 beats/min. The result set is shown in Fig. 6.10. Q2. select phi, upsilon, tid, “Time”, “HR” from Y1001 claim1 where phi=2 and “HR”>=300 order by “Time”, tid; Q2 φ 2 2 ··· 2 2 ··· υ 1001 1001 ··· 1001 1001 ··· tid 1 2 ··· 96 1 ··· Time 0.61 0.61 ··· 0.61 0.62 ··· HR 300.013659905941 300.011268345391 ··· 300.001934440349 300.607671377207 ··· Figure 6.10. Result set of hypothesis management query Q2. Hypothesis Analytics. Fig. 6.11 shows the results of analytics on phenomenon φ = 2 after conditioning the probability distribution in the presence of observations (‘SSBN9 HR’ dataset). Since this case deals with model tuning, viz., 1K slightly different parameter settings, the trial ranking is decided by small differences in the posterior probability distribution (cf. Fig 6.11). PH2 CONF φ 2 2 2 ··· 2 2 2 ··· υ 1001 1001 1001 ··· 1001 1001 1001 ··· tid 491 591 492 ··· 491 591 492 ··· Time 0.4 0.4 0.4 ··· 118.9 118.9 118.9 ··· HR 286.556506432110 286.525209765226 286.555565558231 ··· 421.251853783050 421.110425308905 421.297317710657 ··· Prior .001000 .001000 .001000 ··· .001000 .001000 .001000 ··· Posterior .00103159 .00103144 .00103023 .00103159 .00103144 .00103023 Figure 6.11. Results of analytical study on the baroreflex phenomenon. 6.2.3 Case: Myogenic Behavior of a Blood Vessel Computational models of physiology may account for diverse effects that take place at different levels of biological organization from the organ to the cellular 6.2. CASE STUDIES 86 Σ1001 = { → HR υ Period, → Beta HR p HR s HRmin HRo υ → delta HR pfast delta HR pslow υ → → → Gamma delta HR ps υ HR p, delta HR p, HRo delta HR s υ Time delta HR s Time min delta HR ss tau HR nor υ HR, → HRo delta HR p υ HR s, delta HR s, delta HR pfast, Gamma Time delta HR ps delta HR pslow Time min tau HR ach υ → delta HR pslow, K nor c nor delta HR smax υ → delta HR ss, C ach K ach delta HR pmax υ → delta HR ps, → Time Ts c nor Time min q nor, tau nor υ c nor, → C ach Time min Time Tp q ach tau ach υ C ach, Gs Tsmax Tsmin alpha cns alpha s0 υ → Ts, Gp Tpmax Tpmin alpha cns alpha p0 υ → Tp, Gcns n υ → alpha cns, → S Zeta delta delta th υ Eps 1 Eps wall υ → → B1 Eps 1 Time min Eps 2 Eps 2 Time min Eps wall K1 Kne Time υ n, delta, Eps 1, B1 B2 Eps 1 Eps 1 Time min Eps 2 Time min Eps 3 Eps 3 Time min K1 K2 Time υ → Eps 2, → B2 B3 Eps 2 Eps 2 Time min Eps 3 Time min K2 K3 Time υ R R0 υ → Eps 3, Eps wall, Aυ → R, A Time min Bwall Cwall P R0 Time υ → A, HRmax HRo υ → delta HR smax, HRmin HRo υ → delta HR pmax, Time φ → data, φ → A Time min B1 B2 B3 Beta Bwall C ach Time min Cwall Eps 1 Time min Eps 2 Time min Eps 3 Time min Gamma Gcns Gp Gs HRmax HRmin HRo K1 K2 K3 K ach K nor Kne P R0 S Time delta Time max Time min Tpmax Tpmin Tsmax Tsmin Zeta alpha p0 alpha s0 c nor Time min delta HR pslow Time min delta HR s Time min delta th q ach q nor tau HR ach tau HR nor tau ach tau nor }. Figure 6.12. Fd set Σ1001 of hypothesis υ = 1001. and molecular levels [33]. Typically, a sophisticate model is developed incrementally by, say, adding detail into some previously existing model or extending its dimensionality (e.g., extending it from a stationary to a dynamic account of phenomena). In this case study (cf. Example 10) we consider alternative models of the myogenic behavior of a reference human blood vessel. 6.2. CASE STUDIES 87 Figure 6.13. Plot of myogenic behavior hypothesis (‘D’) according to υ = 89, trial tid=2, and its target observations (‘Diameter’). Example 10 (See Fig. 6.14). We consider the Physiome model entries displayed in relation HYPOTHESIS, and two phenomena (see relation PHENOMENON). One trial is considered for hypothesis υ = 60, and two for hypothesis υ = 89. 2 HYPOTHESIS PHENOMENON υ 60 Name Description Myogenic Compliant This model simulates the flow through a passive Vessel and actively responding vessel driven by a sinusoidal pressure input. 89 Myo Dyn Resp wFit φ 3 This model describes the dynamic response of a vessel after a step increase in intraluminal pressure. Description Dynamics of vessel diameter in response to pulsatile intraluminal pressure. H0 φ 3 3 υ 60 89 Figure 6.14. Descriptive (textual) data of Example 10. Encoding. The fd encoding of hypotheses υ ∈ {60, 89} is shown (resp.) in Fig. 6.15 and Fig. 6.16. Symbol Mappings. We consider that the user provides symbol mappings: • M607→1 = { t 7→ Time, D 7→ Diameter }; • M897→1 = { t 7→ Time, D 7→ Diameter }; 6.2. CASE STUDIES 88 Σ60 = { → Fcomp Fout υ Fin, Pin Pout R υ → Fout, V V t min t υ → Fcomp, D L mu υ → R, D Lυ → V, → A, D Pin T υ A C1a C1p C2a C2p C3a Dp100 Pin T Ttarget υ → Atarget, Atarget Cglobal Cmyo Pin υ → D, D D t min Dc Tc Ttarget t taud υ → T, A A t min Atarget t taua υ Ac υ → → Ttarget, A t min, → Cglobal Cmyo Tc υ Dc υ φ → → Ac, D t min, Dc Pmean υ → Tc, Pamp Pmean t tnorm υ → Pin, C1a C1p C2a C2p C3a Cglobal Cmyo Dp100 Pc υ → Dc, C1a C1p C2a C2p C3a Cglobal Cmyo Dp100 L Pamp Pc Pext Pmean Pout V t min mu t delta t max t min taua taud tnorm }. Figure 6.15. Fd set Σ60 of hypothesis υ = 60. Σ89 = { → D P Tυ → A C1a C1p C2a C2p C3a Dp100 P T Ttarget υ A, Atarget, Atarget Cglobal Cmyo P υ → D, D D t min Dc Tc Ttarget t taud υ → T, → A A t min Atarget t taua υ Ac υ Ttarget, → A t min, → Dc Pc υ Tc, Cglobal Cmyo Dc Pc υ → Ac, Dc υ → D t min, → DelP Pc υ C1a C1p C2a C2p C3a Cglobal Cmyo Dp100 Pc υ tφ → → P, Dc, DelP, φ → C1a C1p C2a C2p C3a Cglobal Cmyo Dp100 Pc t delta t max t min taua taud }. Figure 6.16. Fd set Σ89 of hypothesis υ = 89. Hypothesis Management. Query Q3 illustrates the feature of hypothesis management for this case. The user selects all diameter predictions within the time interval t ∈ [100, 300] (cf. plot in Fig. 6.13). Its result set is shown in Fig. 6.17. 6.3. SYSTEM PROTOTYPE 89 Q3. select phi, upsilon, tid, “t”, “D” from Y60 claim1 where phi=3 and “t”>=100 and “t”<=300 union all select phi, upsilon, tid, “t”, “D” from Y89 claim1 where phi=3 and “t”>=100 and “t”<=300 order by “t”, upsilon, tid; Q3 φ 3 3 3 3 3 3 ··· υ 89 89 89 89 89 89 ··· tid 1 1 2 1 1 2 ··· t 100.00 100.00 100.00 100.01 100.01 100.01 ··· D 194.622865847211 97.3787340059609 126.167727083098 194.626017703936 98.0174705905828 126.161751822302 ··· Figure 6.17. Result set of hypothesis management query Q3. Hypothesis Analytics. Fig. 6.18 shows the results of analytics on phenomenon φ = 3 after conditoning the probability distribution in the presence of observations, viz., ‘Davis Sikes Fig3 Myo DigData’ dataset. PH3 CONF φ 3 3 3 ··· 3 3 3 υ 60 89 89 ··· 60 89 89 tid 1 1 2 ··· 1 1 2 Time 14.8 14.8 14.8 ··· 30.5 30.5 30.5 Diameter 194.996792066637 97.0568250956827 116.327813203282 ··· 195.684170988267 97.0568250767575 116.327813337087 Prior .5 .25 .25 ··· .5 .25 .25 Posterior .000 .269 .731 .000 .269 .731 Figure 6.18. Results of analytics on the vessel’s myogenic behavior phenomenon. In this case study two tentative models have been considered under a uniform prior probability distribution which has been updated to a posterior distribution. Note that, even though hypothesis υ = 60 has its probability weight concentrated in a single trial, the Bayesian inference is able to indicate υ = 89 as the best explanation for φ = 3 and tid = 2, in particular, its best fit. 6.3. System Prototype A first prototype of the Υ-DB system has been implemented as a Java web application, with the pipeline component in the server side on top of MayBMS (a backend 6.3. SYSTEM PROTOTYPE 90 extension of PostgreSQL). We have developed a demonstration of this prototype (cf. [28]), in which we go through the whole design-by-synthesis pipeline (Fig. 1.4) exploring use case scenarios. In this section we provide a brief demonstration of the system in the population dynamics scenario previously introduced in this thesis. The demonstration unfolds in three phases. In the first phase, we show the ETL process to give a sense of what the user has to do in terms of simple phenomena description, hypothesis naming and file upload to get her phenomena and hypotheses available in the system to be managed as data. In the second phase, we reproduce some typical queries of hypothesis management (like those shown in the previous section). In the third phase, we enter the hypothesis analytics module. The user chooses a phenomenon for a hypothesis evaluation study, and the system lists all the predictions with their probabilities under some selectivity criteria (e.g., population at year 1920). The predictions are ranked according to their probabilities, which are conditioned on the observational data available for the chosen phenomenon. 6.3.1 Demo Screenshots Fig. 6.21 shows screenshots of the system. Fig. 6.21(a) shows the research projects currently available for a user. Figs. 6.21(b, c) show the ETL interfaces for phenomenon and hypothesis data definition (by synthesis), and then the insertion of hypothesis trial datasets, i.e., explanations of a hypothesis towards a target phenomenon. Fig. 6.21(d) shows the interface for basic hypothesis management by listing the predictions of a given simulation trial. Figs. 6.21(e, f) show two tabs of the hypothesis analytics module, viz., selection of observations and then viewing the corresponding alternative predictions ranked by their conditioned probabilities. 6.3.2 Demo Case: Population Dynamics In this case we refer to a well-known problem in Computational Science, viz., population dynamics scenarios, to demonstrate the Υ-DB system prototype. Fig. 6.19 shows census data collected from in the US from 1790 to 1990.6 Fig. 6.20 shows observational data collected from Hudson’s Bay from 1900 to 1920 on the Lynx-Hare population [77]. 6 Cf. https://www.census.gov/population/censusdata/table-4.pdf. 6.3. SYSTEM PROTOTYPE 91 Figure 6.19. Census US population from 1790 to 1990. Figure 6.20. Lynx-Hare population observed in Hudon’s Bay from 1900 to 1920. 6.3. SYSTEM PROTOTYPE 92 (a) Research dashboard after login. (b) Phenomenon data definition. (c) Hypothesis data definition. (d) Hypothesis management. (e) Analytics: selected observations tab. (f) Analytics: ranked predictions tab. Figure 6.21. Screenshots of this first prototype of the Υ-DB system. 6.3. SYSTEM PROTOTYPE 93 Example 11 (See Fig. 6.22). We consider the model entries displayed in relation HYPOTHESIS, and two phenomena (see relation PHENOMENON). For φ = 1, three trials are considered for hypothesis υ = 1 and six for hypothesis υ = 2. For φ = 2, in turn, two trials are considered for hypothesis υ = 1 and υ = 2, and six trials for hypothesis υ = 3. Note the data definition interfaces in Figs. 6.21(b, c). 2 HYPOTHESIS υ 1 Name Malthusian growth model Description Exponential growth model ‘growth in population is proportional to its size’ is considered the first principle of population dynamics. 2 Logistic equation This model introduces growth saturation to the Malthusian model due to the limitation of resources. 3 Lotka-Volterra model This model describes predator-prey interactions. H0 PHENOMENON φ 1 2 Description US population from 1790 to 1990. Lynx population in Hudson’s Bay, Canada, from 1900 to 1920. φ 1 1 2 2 2 υ 1 2 1 2 3 Figure 6.22. Descriptive (textual) data of Example 11. Encoding. The fd encoding of hypotheses υ ∈ {1, 2, 3} is shown (resp.) in Fig. 6.23, Fig. 6.24 and Fig. 6.25. See hypothesis structure processing in Fig. 6.21(c). Σ1 = { φ → b t x t min υ → x, b t delta t max t min x t min }. Figure 6.23. Fd set Σ1 of hypothesis υ = 1. Σ2 = { φ → K b t x t min υ → x, K b t delta t max t min x t min }. Figure 6.24. Fd set Σ2 of hypothesis υ = 2. Symbol Mappings. We consider that the user provides the following symbol mappings for (resp.) phenomena φ = 1 and φ = 2, see the interface for mapping symbols in Fig. 6.21(c). 6.3. SYSTEM PROTOTYPE 94 Σ3 = { φ → bpt yυ → x, d r t x υ → y, b d p r t delta t max t min x t min y t min }. Figure 6.25. Fd set Σ3 of hypothesis υ = 3. • M17→1 = { t 7→ Year, x 7→ Population }; • M27→1 = { t 7→ Year, x 7→ Population }; • M17→2 = { t 7→ Year, x 7→ Lynx }; • M27→2 = { t 7→ Year, x 7→ Lynx }; • M37→2 = { t 7→ Year, x 7→ Lynx }; Hypothesis Management. Query Q4 illustrates the feature of hypothesis management for this case. The user selects hypothesis υ = 3 (the Lotka-Volterra model), and filters its available data for trial tid = 6 on phenomenon φ = 2. Both the formbased query set-up and its result set are shown in Fig. 6.21(d). Q4. select “t”, “y”, “x” from Y3 claim1 where upsilon=3 and phi=2 and tid=6 order by “t”; Hypothesis Analytics. Fig. 6.26 and Fig. 6.27 show the results of analytics on (resp.) phenomena φ = 1 and φ = 2 after conditoning the probability distribution in the presence of (resp.) observational datasets ‘US-census’ and ‘Lynx-Hare.’ In the first one, the user verifies that hypothesis υ = 1 (the Malthusian model) is unlikely to be competitive with hypothesis υ = 2 (the Logistic equation) as an approximation of the US population dynamics from 1790 to 1990. That is, if the user knows her current trials are reasonable, then more trials on the Malthusian model hardly could outperform trials on the Logistic equation for the studied phenomenon. 6.4. EXPERIMENTS PH1 CONF 95 φ ··· 1 1 1 1 1 1 ··· υ ··· 1 1 2 2 2 2 ··· tid ··· 1 2 1 2 3 4 ··· Year ··· 1920 1920 1920 1920 1920 1920 ··· Population ··· 194.102222534948 140.244165184248 82.3031951115155 108.251924734215 105.918217777077 105.988231944275 ··· Prior ··· .250 .250 .125 .125 .125 .125 ··· Posterior .000000 .000000 .133038 .239684 .290026 .337251 Figure 6.26. Results of analytics on the US population phenomenon. PH2 CONF φ ··· 2 2 2 2 2 2 2 2 2 2 ··· υ ··· 1 1 2 2 3 3 3 3 3 3 ··· tid ··· 1 2 1 2 1 2 3 4 5 6 ··· Year ··· 1904 1904 1904 1904 1904 1904 1904 1904 1904 1904 ··· Lynx ··· 16.49 18.22 79.81 77.82 89.59 65.06 90.08 77.46 88.32 75.92 ··· Prior ··· .167 .167 .167 .167 .055 .055 .055 .055 .055 .055 ··· Posterior .047 .000 .013 .017 .131 .184 .124 .176 .127 .180 Figure 6.27. Results of analytics on the Hudson’s Bay lynx population phenomenon, see interfaces in Figs. 6.21(e, f). 6.4. Experiments The efficiency and scalability of the U-relational representation system and its p-WSA query algebra have been extensively demonstrated [27]. Υ-DB’s, as U-relational hypothesis DB’s, must therefore be as efficient and scalable as any arbitrary U-relational DB. In these experiments (see Fig. 6.28) we provide some measures of performance of the method of Υ-DB in the particular context of our real-world Physiome testbed. Our purpose here is to provide a concrete feel on how efficient the Υ-DB methodology can be. However, most of these tests (the four graphs on the bottom in Fig. 6.28) involve the data level and then require more of the hardware. Our current experimental setup (personal computer)7 allows us to reach a scale 7 These experiments were performed on a 2.3GHZ/4GB Intel Core i5 running Mac OS X 10.6.8 and MayBMS (a PostgreSQL 8.3.3 extension). 6.4. EXPERIMENTS 96 1,000 XML extraction time [ms] time [ms] 75 750 500 250 50 encoding 25 0 0 500 1,000 1,500 0 2,000 500 80 70 u-learning time [ms] time [ms] 1,500 2,000 structure length |S| structure length |S| 60 1,000 30 20 u-factorization 50 0 200 400 600 800 0 1,000 200 400 600 800 1,000 ntrials ntrials 100 time [s] time [s] 800 u-propagation 50 600 conditioning 400 200 0 200 400 600 ntrials 800 1,000 200 400 600 800 1,000 ntrials Figure 6.28. Performance behavior of Υ-DB on a Physiome testbed scenario. in which the uncertain data being processed in synthesis ‘4U’ is sized up to 1 GB. For the two first graphs (XML extraction and encoding), we have collected the response time on the measure of interest over different structure lengths. Each one corresponds to a real Physiome hypothesis from the table of Fig. 6.29. The last hypothesis in that table, υ = 379, is used for the tests of the four last graphs in Fig. 6.28, viz., u-learning, u-factorization, u-propagation and conditioning. We have set different number of trials (ntrials) over it, each one having 1 M B. The last test in each of such four graphs, with 1K trials, is processing 1 GB of uncertain data at once and then fits the machine’s main memory. We interpret the performance results shown in these graphs as follows for each measure of performance. • Extraction. Some fluctuation may be due to practicalities of XML DOM access methods. The point of this performance study is to have practical 6.4. EXPERIMENTS HYPOTHESIS 97 υ 186 89 60 75 70 120 91 93 153 154 379 name Regulatory Vessel Myo Dyn Resp wFit Myogenic Compliant Vessel Baroreceptor Lu et al 2001 4-State Sarcomere Energetics Comp four gen weibel lung CardiopulmonaryMechanics CardiopulmonMechGasBloodExch HighlyIntegHuman HighlyIntHuman wIntervention Baroreflex SB CT |S| 40 73 100 153 298 440 1132 1593 1624 1919 171 |E| 20 28 38 74 91 186 412 525 538 634 74 Figure 6.29. Physiome hypotheses used in the experiments. measures of the amount of time taken to process representative hypothesis structures. Note that even for structures of size |S| = 2 K the amount of time required to extract a hypothesis is kept at subsecond order of magnitude (interactive response time) in a personal machine. • Encoding. Some fluctuation is expected due to varying degrees of coupling between variables in the hypothesis structures. Note that, although |S| provides a very good measure of their size and complexity, the extent to which they are intricate should cause impact on the encoding procedure, p which is any case kept O( |E||S|). Again, the point here is to provide a notion of the amount of time required to encode representative hypotheses. For a scalability test on the encoding procedure, cf. Fig. 3.8. • U-intro. The U-intro procedure is composed of u-factor learning, u-factori zation and u-propagation. We observed in previous tests that it was dominated by the learning component, viz., the discovery of occasional fd’s in the ‘big’ fact table. However, this is no longer the case once we implemented the workaround of keeping (in addition to the ‘big’ table) a table containing only the exogenous (input parameter) variables, as it has negligible size w.r.t. the data of the endogenous (predictive output) variables. Then u-learning became subsecond again and the U-intro procedure became dominated by u-propagation. In fact, the procedure of u-factorization, carried out once the fd’s are discovered by u-learning, is also sub-second then 6.5. DISCUSSION 98 has negligible processing time w.r.t. u-propagation. The latter is the most expensive sub-procedure of the synthesis method. • Conditioning. The conditioning procedure is run for a selected phenomenon. It is composed of four main parts. First, by operation conf() it performs a probabilistic inference sub-query on the proper predictive projection of the ‘big’ fact table of each hypothesis associated with the phenomenon. Second, it combines the results of each such sub-query through a union all query whose result set is a multi-hypothesis predictive table. Third, it loads the phenomenon observation sample data and the predictive data from the multi-hypothesis table into memory to apply Bayesian inference. Finally, the prior probability distribution of the predictive table is updated with the posterior and all the corresponding marginal probabilities are updated in their original U-relational tables. In our tests, this procedure is carried out over varying number of trials (ntrials). The total response times are shown in the last plot of Fig. 6.28. This performance behavior is to be interpreted in the context of ETL in DW’s. Loading and setting up an Υ-DB has an overhead that shall be, though, much lower in high-performance machines. Such overhead is nonetheless justified for the use case of hypothesis management and analytics as opposed to simulation data management and exploratory analytics (cf. §2.6.2). 6.5. Discussion We have verified that the hypothesis ratings/rankings shown in §6.2 coincide with the results (e.g., of model tuning) described in the Physiome model entries and their related publications. That validates the applicability of the Υ-DB methodology as a tool for data-driven analysis in such realistic scenarios. The current practice in Computational Science for model evaluation and comparison in the presence of observational data is somewhat handcrafted: model agreement is assessed either qualitatively by referring to curve shapes in data plots or quantitatively by means of ad-hoc scripts. The Υ-DB methodology offers a tool to perform data-driven hypothesis analytics semi-automatically directly in the 6.5. DISCUSSION 99 database under the support of its querying capabilities. It has, therefore, potential to be a step towards higher standards of reproducibility and scalability. Realistic assumptions. The core assumption of our framework is that the hypotheses are given in a formal specification which is encodable into a SEM that is complete (satisfies Defs. 1, 2). Also, as a semantic assumption which is standard in scientific modeling, we consider a one-to-one correspondence between real-world entities and variable/attribute symbols within a structure, and that all of them must appear in some of its equations/fd’s. For most science use cases involving deterministic models (if not all), such assumptions are quite reasonable. It can be a topic of future work (cf. §7.3) to explore business use cases as well. Hypothesis learning. The (user) method for hypothesis formation is irrelevant to our framework, as long as the resulting hypothesis is encodable into a SEM. So, a promising use case is to incorporate machine learning methods into our framework to scale up the formation/extraction of hypotheses and evaluate them under the querying capabilities of a p-DB. Consider, e.g., learning the equations, say, from Eureqa [2].8 Qualitative hypotheses. The Υ-DB methodology is primarely motivated by computational science (usually involving differential equations). It is, however, applicable to qualitative deterministic models as well. Boolean Networks, e.g., consist in sets of functions f (x1 , x2 ,.., xn ), where f is a Boolean expression. For instance, Fig. 6.30 presents the system of Boolean equations of a tentative Boolean Network model for a plant hormone (Fig. 6.31) published in [78].9 The notation, e.g., SphK*, is read (just like an ordinary differential equation), ‘the next state value of variable SphK is given by the state value of variable ABA. The parameters in this kind of model are the variable initial conditions. 8 9 http://creativemachines.cornell.edu/Eureqa. Cf. http://atlas.bx.psu.edu/booleannet/booleannet.html. 6.5. DISCUSSION H={ 100 SphK* = ABA, S1P* = SphK, GPA1* = (S1P or not GCR1) and AGB1, PLD* = GPA1, PA* = PLD, pHc* = ABA, OST1* = ABA, ROP2* = PA, Atrboh* = pHc and OST1 and ROP2 and not ABI1, ROS* = Atrboh H+ATPase* = not ROS and not pHc and not Ca2+ c ABI1* = pHc and not PA and not ROS, RCN1* = ABA, NIA12* = RCN1, NOS* = Ca2+ c, NO* = NIA12 and NOS, GC* = NO, ADPRc* = NO, cADPR* = ADPRc, cGMP* = GC, PLC* = ABA and Ca2+ c, InsP3* = PLC, InsPK* = ABA, InsP6* = InsPK, CIS* = (cGMP and cADPR) or (InsP3 and InsP6), Ca2 ATPase* = Ca2+ c, Ca2+ c * = (CaIM or CIS) and (not Ca2+ ATPase), AnionEM* = ((Ca2+ c or pHc) and not ABI1 ) or (Ca2+ c and pHc), Depolar* = KEV or AnionEM or (not H+ATPase) or (not KOUT) or Ca2+ c, CaIM* = (ROS or not ERA1 or not ABH1) and (not Depolar), KOUT* = (pHc or not ROS or not NO) and Depolar, KAP* = (not pHc or not Ca2+ c) and Depolar, KEV* = Ca2+ c, PEPC* = not ABA, Malate* = PEPC and not ABA and not AnionEM, RAC1* = not ABA and not ABI1, Actin* = Ca2+ c or not RAC1, Closure* = (KOUT or KAP ) and AnionEM and Actin and not Malate + Figure 6.30. Example of Boolean Network hypothesis. }. 6.6. CONCLUSIONS 101 Figure 6.31. Example of Boolean Network model (source: [78]). Several kinds of dynamical system can be modeled in this formalism. Applications have grown out of gene regulatory network to social network and stock market predictive analytics. Even if richer semantics is considered (e.g., fuzzy logics), our encoding method is applicable likewise, as long as the equations are still deterministic. 6.6. Conclusions In this chapter we have demonstrated and discussed the applicability of the Υ-DB methodology. We have referred to real-world use case scenarios derived from the Physiome research project. We have shown in some detail the process of building an Υ-DB with representative models from Physiome’s model repository. That qualitative assessment is followed by experiments that provide some concrete feel on the performance behavior of Υ-DB for models with up to 600+ mathematical variables. Chapter 7 Conclusions In this chapter we (§7.1) revisit the research questions addressed by this thesis, (§7.2) point out its significance and limitations, (§7.3) list open problems and topics for future work, and (§7.4) conclude with final considerations. 7.1. Revisiting the Research Questions Let us now revisit the conceptual (RQ1-4) and technical (RQ5-9) research questions. RQ1. How to define and encode hypotheses ‘as data’? What are the sources of uncertainty that may be present and should be considered? In Chapter 2 we have provided core abstractions that compose the vision of hypotheses ‘as data,’ or the Υ-DB vision. The problem of hypothesis encoding has been defined and addressed further in Chapter 3. We have distinguished two main sources of uncertainty in our model of uncertainty for hypothesis management, viz., (i) theoretical uncertainty, as arising from competing hypotheses; and (ii) empirical uncertainty, as arising from the alternative trial datasets available for each hypothesis. RQ2. How does hypotheses ‘as data’ relate with observational data or, likewise, phenomena ‘as data’ from a database perspective? Also in Chapter 2, we have presented a conceptual framework in which we have defined hypotheses ‘as data’ and shown how it can be compared against phenomena ‘as data.’ In fact, hypothesis management is really 7.1. REVISITING THE RESEARCH QUESTIONS 103 significant when it is possible to rate/rank hypotheses in the presence of (some partial piece of) evidence. RQ3. Does every piece of simulated data qualify as a scientific hypothesis? What is the difference between managing ‘simulation’ data from managing ‘hypotheses’ as data? Early in Table 1.1, we provided a comparison between simulation data management and hypothesis data management. Furthermore, the scientific research process is abstracted in Chapter 2 as a well-defined problem of data cleaning. Hypotheses are seen from an applied science point of view, and then are reduced into data such that a piece of simulation data is considered a hypothesis whenever it is assigned to explain some specific phenomenon. RQ4. Is there available a proper (machine-readable) data format we can use to automatically extract mathematically-expressed hypotheses from? We anticipated in Chapter 2 the adoption of the XML data model as the general data format for extracting hypothesis specifications from. In particular, since we deal here with mathematical hypotheses, we refer to MathML as a standard for hypothesis specification. Concretely, in Chapter 6 we present use case demonstration scenarios for which we have developed a specific wrapper, viz., for the extraction of hypotheses specified in MML (Mathematical Modeling Language). RQ5. Is there an algorithm to, given a SEM, efficiently extract its causal ordering? What are the computational properties of this problem? As shown in Chapter 3, Simon’s treatment of the problem of causal ordering given a SEM S(E, V) is NP-Hard. In the same chapter, we have discussed this problem in detail and presented an effective, efficient algorithmic approach to the problem. The computational cost for the whole p process of hypothesis encoding is bounded by O( |S||E|). Experiments show that the approach performs well in practice for large hypotheses. 7.1. REVISITING THE RESEARCH QUESTIONS 104 RQ6. What is the connection between SEM’s and fd’s? Can we devise an encoding scheme to ‘orient equations’ and then effectively transform one into the other with guarantees? Once we do it, what design-theoretic properties have such a set of fd’s? Also in Chapter 3, we have presented an algorithmic encoding scheme to transform a SEM into a set of fd’s with guarantees in terms of preserving the hypothesis causal structure. Our study of this problem has revealed some interesting properties of the resulting fd sets, in particular, that they are always ‘non-redundant’ and, in comparison with arbitrary information systems, more precise and economical in the sense that, for any given attribute, there is exacly one fd with it in its rhs. RQ7. Is such fd set ready to be used for p-DB schema synthesis as an encoding of the hypothesis causal structure? If not, what kind of further processing we have to do? Can we perform it efficiently by reasoning directly on the fd’s? How does it relate to the SEM’s causal ordering? As we discuss in Chapter 4, the encoded fd set must be further processed to find the ‘first causes’ for each of its predictive variable. For addressing that, in Chapter 4 we have presented the concept of the folding of an fd set and an efficient algorithm to compute it. Also, we have shown the equivalence of such fd reasoning with causal ordering processing. RQ8. Is the uncertainty decomposition required for predictive analytics reducible to the structure level (fd processing), or do we need to process the simulated data to identify additional uncertainty factors? Finally, what properties are desirable for a p-DB schema targeted at hypothesis management? Are they ensured by this synthesis method? In Chapter 5 we have presented a conceptual framework to address synthesis for uncertainty ‘4U.’ In particular, we have introduced the need to process, for each hypothesis, its trial datasets available, and presented an efficient algorithm to factorize and propagate the overall uncertainty present in a given hypothesis (as a competing explanation for a target 7.2. SIGNIFICANCE AND LIMITATIONS 105 phenomenon). Then we have motivated BCNF as a notion of “good” design w.r.t. the factorized fd set based on the folding concept, and the lossless join property as required for the correctness of uncertainty decomposition. We have shown that the synthesized p-DB schema bears both properties. RQ9. Given all such a design-theoretic machinery to process hypotheses into (U-)relational DB’s, what properties can we detect on the hypotheses back at the conceptual level? Do we have now technical means to speak of hypotheses that are “good” in terms of principles of the philosophy of science? Equipped with the design-theoretic machinery proposed in this thesis, we are able to, given a SEM, to automatically (1) extract its causal ordering, (2) detect its strongly coupled components and decide, for a given predictive projection, what are its associated u-factor projections (if any), and shall be able as well to (3) query the hypothesis ranking for a phenomenon of interest. All these are technical means to [15]: (10 ) extract the hypothesis ‘empirical content’ and ‘predictive power;’ (20 ) unravel its cohesiveness and how parsimonious it is in terms of the number of different claims or epistemological units carried within it, as well as its empirical grounding (‘first causes’); and finally, we shall be able to (30 ) appraise it in face of competing or alternative explanations. 7.2. Significance and Limitations This thesis addresses the pressing call for large-scale, data-driven hypothesis management and analytics [35, 3, 10]. Some reasons that contribute for its significance are listed (cf. [10, 29, 28]). • Structured deterministic hypotheses are now shown to be encodable as uncertain and probabilistic (U-relational) data based on p-DB principles; ∗ Study of the connection between SEM’s and fd’s, with contribution both to computational properties of the causal ordering problem, and to causal reasoning over fd’s; 7.3. OPEN PROBLEMS AND FUTURE WORK 106 ∗ First synthesis method for the construction of p-DB’s from some previous existing formal specification. • Definition of a concrete use case of data-driven hypothesis management and analytics; ∗ New class of applications introduced for p-DB’s; ∗ Settled the problem of Bayes’ conditioning in p-DB’s. Now some limitations of the thesis are listed. • The Bayesian inference is implemented at application level, yet not formulated as a principled technical solution within research in p-DB’s. • The encoding scheme to transform the mathematical system of a hypothesis into a set of fd’s enabling the synthesis of the p-DB is applicable to structured deterministic models only, not stochastic ones. 7.3. Open Problems and Future Work Open problems and topics of future work are listed (no particular order). (1) The design of a dedicated algebraic operation for Bayes’ conditioning in p-WSA. (2) Investigation of other data dependency formalisms (e.g., multi-valued dependencies [20]), approximate fd’s [68], conditional fd’s [79]) to extend the scope of Υ-DB towards structured stochastic models. (3) Development of techniques for systematic hypothesis extraction as a welldefined problem of (web) information extraction; (4) Investigation of business use case scenarios for data-driven decision making on top of Υ-DB; (5) Definition of a machine learning use case scenario to industrialize hypothesis formation and assess Υ-DB’s performance feasibility in such a scenario; 7.4. FINAL CONSIDERATIONS 107 (6) Development of automatic data sampling techniques to leverage the data definition of both hypotheses and phenomena in Υ-DB from a statistical point of view. 7.4. Final Considerations In this thesis we have developed the vision of Υ-DB, which is essentially an abstraction of hypotheses as uncertain and probabilistic data. It comprises a design-theoretic methodology for the systematic construction and management of U-relational hypothesis DB’s. It is meant to provide a principled approach to enable scientists and engineers to manage and evaluate (rate/rank) large-scale scientific hypotheses as theoretical data. We have addressed some core technical challenges over the Υ-DB vision in order to properly encode deterministic hypotheses as uncertain and probabilistic data. As envisioned by Jim Gray [1], the scientific method has been shifting towards being operated as a data-driven discipline which is rapidly gaining ground [3]. In this thesis we have strived for proposing some core principles and techniques for enabling data-driven hypothesis management and analytics, opening a promising line of research in both probabilistic databases and simulation data management. Bibliography [1] HEY, T.; TANSLEY, S.; TOLLE, K. The fourth paradigm: Data- intensive scientific discovery. Microsoft Research, 2009. [2] SCHMIDT, M.; LIPSON, H. Distilling free-form natural laws from experimental data. Science, Washington, v. 324, n. 5923, p. 81–5, 2009. [3] DHAR, V. Data science and prediction. Communications of the ACM, v. 56, n. 12, p. 64–73, 2013. [4] JAGADISH, H. V.; GEHRKE, J.; LABRINIDIS, A.; PAPAKONSTANTINOU, Y.; PATEL, J. M.; RAMAKRISHNAN, R.; SHAHABI, C. Big data and its technical challenges. Communications of the ACM, v. 57, n. 7, p. 86–94, 2014. [5] BENIOFF, M. R.; LAZOWSKA, E. D. (Eds.). Computational Science: Ensuring America’s competitiveness. PITAC (US President’s Information Technology Advisory Committee), 2005. [6] PERLMAN, E.; BURNS, R.; LI, Y.; MENEVEAU, C. Data exploration of turbulence simulations using a database cluster. In: . c2007. [7] MARKRAM, H. The Blue Brain Project. Nature Reviews Neuroscience, v. 7, p. 153–60, 2006. [8] AILAMAKI, A.; KANTERE, V.; DASH, D. Managing scientific data. Comm. ACM, v. 53, n. 6, p. 68–78, 2010. [9] AHMAD, Y.; BURNS, R.; KAZHDAN, M.; MENEVEAU, C.; SZALAY, A.; TERZIS, A. Scientific data management at the Johns Hopkins Institute for BIBLIOGRAPHY 109 Data Intensive Engineering and Science. SIGMOD Record, v. 39, n. 3, p. 18–23, 2010. [10] GONCALVES, B.; PORTO, F. Υ-DB: Managing scientific hypotheses as uncertain data. PVLDB, v. 7, n. 11, p. 959–62, 2014. [11] CUSHING, J. B. Beyond big data? Computing in Science & Engineering, v. 15, n. 5, p. 4–5, 2013. [12] WEINBERG, R. Point: Hypotheses first. Nature, London, v. 464, p. 678, 2010. [13] GOLUB, T. Counterpoint: Data first. Nature, London, v. 464, p. 679, 2010. [14] FRÉGNAC, Y.; LAURENT, G. Where is the brain in the Human Brain Project? Nature, London, v. 513, p. 27–9, 2014. [15] LOSEE, J. A historical introduction to the philosophy of science. Oxford Univ. Press, 4th ed., 2001. [16] BOLSTAD, W. M. Introduction to bayesian statistics. 2nd. ed. WileyInterscience, 2007. [17] SUCIU, D.; OLTEANU, D.; RÉ, C.; KOCH, C. Probabilistic databases. Morgan & Claypool Publishers, 2011. [18] KOCH, C. MayBMS: A system for managing large uncertain and probabilistic databases. In C. Aggarwal (ed.), Managing and Mining Uncertain Data, Chapter 6. Springer-Verlag, 2009. [19] DARWICHE, A. Bayesian networks. Comm. ACM, v. 53, n. 12, p. 80–90, 2010. [20] ULLMAN, J. Principles of Databases and Knowledge-Base Systems. Computer Science Press, 1988. [21] ABITEBOUL, S.; HULL, R.; VIANU, V. Foundations of databases. Addison-Wesley, 1995. BIBLIOGRAPHY 110 [22] MAIER, D. Theory of relational databases. Computer Science Press, 1983. [23] BADIA, A.; LEMIRE, D. A call to arms: Revisiting database design. SIGMOD Record, v. 40, n. 3, p. 61–9, 2011. [24] SIMON, H. Causal ordering and identifiability. In Hood & Koopmans (eds.), Studies in Econometric Methods, Chapter 3, John Wiley & Sons, 1953. [25] PEARL, J. Causality: Models, reasoning, and inference. Cambridge Univ. Press, 2000. [26] CHANG, C.-H.; KAYED, M.; GIRGIS, M. R.; SHAALAN, K. A survey of web information extraction systems. IEEE Transactions on Knowledge and Data Engineering, v. 18, n. 10, p. 1411–28, 2006. [27] ANTOVA, L.; JANSEN, T.; KOCH, C.; OLTEANU, D. Fast and simple relational processing of uncertain data. In: Proc. of IEEE ICDE. 2008. p. 983–92. [28] GONCALVES, B.; SILVA, F. C.; PORTO, F. Υ-DB: A system for datadriven hypothesis management and analytics. Technical report, LNCC, 2015. (available at CoRR abs/1411.7419). [29] GONCALVES, B.; PORTO, F. Design-theoretic encoding of deterministic hypotheses as constraints and correlations in U-relational databases. Technical report, LNCC, 2015. [30] SIMON, H.; RESCHER, N. Cause and counterfactual. Philosophy of Science, v. 33, n. 4, p. 323–40, 1966. [31] HINES, M.; MORSE, T.; MIGLIORE, M.; CARNEVALE, N.; SHEPHERD, G. ModelDB: A database to support computational neuroscience. J. Comput. Neurosci., v. 17, n. 1, p. 7–11, 2004. [32] CHELLIAH, V.; LAIBE, C.; Le Novère, N. BioModels Database: A repository of mathematical models of biological processes. Method. Mol. Biol., , n. 1021, p. 189–99, 2013. BIBLIOGRAPHY 111 [33] HUNTER, P. J.; BORG, T. K. Integration from proteins to organs: the Physiome Project. Nat. Rev. Mol. Cell. Biol., v. 4, n. 3, p. 237–43, 2003. [34] BASSINGTHWAIGHTE, J. B. Strategies for the Physiome Project. Ann. Biomed. Eng., v. 28, p. 1043–58, 2000. [35] HAAS, P.; MAGLIO, P.; SELINGER, P.; TAN, W. Data is dead... without what-if models. PVLDB, v. 4, n. 12, p. 1486–9, 2011. [36] RAHM, E.; Hai Do, H. Data cleaning: Problems and current approaches. IEEE Data Engineering Bulletin, v. 23, n. 4, p. 3–13, 2001. [37] BESKALES, G.; SOLIMAN, M. A.; ILYAS, I. F.; BEN-DAVID, S. Modeling and querying possible repairs in duplicate detection. PVLDB, v. 2, n. 1, p. 598–609, 2009. [38] PORTO, F.; SPACAPPIETRA, S. Data model for scientific models and hypotheses. In R. Kaschek, L. Delcambre (ed.), The evolution of Conceptual Modeling, p. 285-305, Springer-Verlag LNCS vol. 6520, January 2011. [39] STOUGIANNIS, A.; TAUHEED, F.; PAVLOVIC, M.; HEINIS, T.; AILAMAKI, A. Data-driven Neuroscience: Enabling breakthroughs via innovative data management. In: . c2013. [40] KANOV, K.; PERLMAN, E. A.; BURNS, R. C.; AHMAD, Y.; SZALAY, A. S. I/O streaming evaluation of batch queries for data-intensive computational turbulence. In: . c2011. p. 1–10. [41] IDREOS, S.; ALAGIANNIS, I.; JOHNSON, R.; AILAMAKI, A. Here are my data files. here are my queries. where are my results? In: In Proc. of the biennial Conf. on Innovative Data Systems Research (CIDR). 2011. [42] ALAGIANNIS, I.; BOROVICA, R.; BRANCO, M.; IDREOS, S.; AILAMAKI, A. NoDB: Efficient query execution on raw data files. In: Proc. of ACM SIGMOD. 2012. p. 241–52. [43] SOLDATOVA, L.; RZHETSKY, A. Representation of research hypotheses. J. Biomed. Sem., v. 2, n. S2, 2011. BIBLIOGRAPHY 112 [44] KING, R. D. et al. The automation of science. Science, Washington, v. 324, n. 5923, p. 85–9, 2009. [45] RACUNAS, S. et al. HyBrow: a prototype system for computer-aided hypothesis evaluation. Bioinformatics, v. 20, n. 1, p. 257–64, 2004. [46] GAO, Y. et al. SWAN: A distributed knowledge infrastructure for alzheimer disease research. J. Web Semantics, v. 4, n. 3, p. 222–8, 2006. [47] de WAARD, A. et al. Hypotheses, evidence and relationships: The HypER approach for representing scientific knowledge claims. In: ISWC Proc. of Workshop on Semantic Web Applications in Scientific Discourse. 2009. [48] DASH, D.; DRUZDZEL, M. J. A note on the correctness of the causal ordering algorithm. Artif. Intell., v. 172, n. 15, p. 1800–8, 2008. [49] NAYAK, P. P. Causal approximations. Artificial Intelligence, Amsterdam, v. 70, n. 1-2, p. 277–334, 1994. [50] DRUZDZEL, M. J.; SIMON, H. A. Causality in Bayesian belief networks. In: Proc. of Int. Conf. on Uncertainty in Artificial Intelligence. 1993. p. 3–11. [51] MADEIRA, S. C.; OLIVEIRA, A. L. Biclustering algorithms for biological data analysis: A survey. IEEE Transactions on Computational Biology and Bioinformatics, v. 1, n. 1, p. 24–45, 2004. [52] DHILLON, I. S.; MALLELA, S.; MODHA, D. S. Information-theoretic coclustering. In: Proc. of ACM SIGKDD. 2003. p. 89–98. [53] EVEN, S. Graph algorithms. 2nd. ed. Cambridge Univ. Press, 2011. [54] UNO, T. An efficient algorithm for solving pseudo clique enumeration problem. Algorithmica, v. 56, n. 1, p. 3–16, 2010. [55] GAREY, M. R.; JOHNSON, D. S. Computers and intractability: A guide to the theory of NP-completeness. 1st. ed., Series of Books in the Mathematical Sciences. W. H. Freeman, 1979. BIBLIOGRAPHY 113 [56] JOHNSON, D. S. The NP-completeness column: an ongoing guide. J. Algorithms, v. 8, n. 3, p. 438–88, 1987. [57] HOPCROFT, J. E.; KARP, R. M. An n5/2 algorithm for maximum matchings in bipartite graphs. SIAM Journal on Computing, v. 2, n. 4, p. 225–31, 1973. [58] CORMEN, T. H.; LEISERSON, C. E.; RIVEST, R. L.; STEIN, C. Introduction to algorithms. 3rd. ed. The MIT Press, 2009. [59] SIMON, H. On the definition of the causal relation. The Journal of Philosophy, v. 49, p. 517–28, 1952. [60] NAYAK, P. P. Automated modelling of physical systems. SpringerVerlag, 1996. [61] SERRANO, D.; GOSSARD, D. C. Constraint management in conceptual design. In: Knowledge Based Expert Systems in Engineering: Planning and Design. Computational Mechanics Publications, 1987. p. 211–24. [62] BERNSTEIN, P. Synthesizing third normal form relations from functional dependencies. ACM Trans. on Database Systems, v. 1, n. 4, p. 277–98, 1976. [63] BEERI, C.; BERNSTEIN, P. Computational problems related to the design of normal form relational schemas. ACM Trans. on Database Systems, v. 4, n. 1, p. 30–59, 1979. [64] MELIOU, A. et al. Causality in databases. IEEE Data Eng. Bull., v. 33, n. 3, p. 59–67, 2010. [65] MELIOU, A.; GATTERBAUER, W.; MOORE, K. F.; SUCIU, D. The complexity of causality and responsibility for query answers and non-answers. PVLDB, v. 4, n. 1, p. 34–45, 2010b. [66] KANAGAL, B.; LI, J.; DESHPANDE, A. Sensitivity analysis and explanations for robust query evaluation in probabilistic databases. In: Proc. of ACM SIGMOD. 2011. p. 841–52. BIBLIOGRAPHY 114 [67] MELIOU, A.; GATTERBAUER, W.; SUCIU, D. Reverse data management. PVLDB, v. 4, n. 12, p. 1490–3, 2011. [68] HUHTALA, Y. et al. TANE: An efficient algorithm for discovering functional and approximate dependencies. Computer Journal, v. 42, n. 2, p. 100–11, 1999. [69] DARWICHE, A. Modeling and reasoning with Bayesian Networks. Cambridge University Press, 2009. [70] TOM S. VERMA, J. P. Causal Networks: Semantics and expressiveness. In: Proc. of the 4th Conf. on Uncertainty in Artificial Intelligence (UAI’88). North-Holland Publishing Co., 1988. p. 69–78. [71] Das Sarma, A.; ULLMAN, J.; WIDOM, J. Schema design for uncertain databases. In: Proc. of AMW. 2007. [72] FAGIN, R. The decomposition versus synthetic approach to relational database design. In: Proc. of VLDB. 1977. v. 3, p. 441–6. [73] JAGADISH, H. V. et al. Making database systems usable. In: SIGMOD. 2007. p. 13–24. [74] QIAN, L.; LEFEVRE, K.; JAGADISH, H. V. CRIUS: User-friendly database design. PVLDB, v. 4, n. 2, p. 81–92, 2010. [75] KOCH, C.; OLTEANU, D. Conditioning probabilistic databases. PVLDB, v. 1, n. 1, p. 313–25, 2008. [76] BUGENHAGEN, S. M.; COWLEY, A. W. J.; BEARD, D. A. Identifying physiological origins of baroreflex dysfunction in salt-sensitive hypertension in the Dahl SS rat. Physiological Genomics, v. 42, p. 23–41, 2010. [77] ELTON, C.; NICHOLSON, M. The ten-year cycle in numbers of the lynx in Canada. Journal of Animal Ecology, v. 11, n. 2, p. 215–44, 1942. [78] LI, S.; ASSMANN, S. M.; ALBERT, R. Predicting essential components of signal transduction networks: A dynamic model of guard cell abscisic acid signaling. PLOS Biology, v. 4, n. 10, p. e312, 2006. BIBLIOGRAPHY 115 [79] FAN, W.; GEERTS, F.; LI, J.; XIONG, M. Discovering conditional functional dependencies. IEEE Transactions on Knowledge and Data Engineering, v. 23, n. 5, p. 683–98, 2011. Appendix A Detailed Proofs A.1. Proofs of Hypothesis Encoding A.1.1 Proof of Theorem 1 “Let S(E, V) be a complete structure. Then the extraction of its causal ordering by Simon’s COA(S) is intractable (NP-Hard).” Proof 17 We show that, at each recursive step of COA, to find all non-trivial minimal subsets (i.e., |E 0 | ≥ 2) translates into an optimization problem associated with the decision problem BPBP, which we know by Lemma 1 to be NP-Complete. First, recall (Def. 2) that a structure S(E, V) is complete if |E| = |V|; e.g., for the structure given in Fig. 3.5 (left), note (Def. 9) the minimal structure S 0 (E 0 , V 0 ), where E 0 = { f1 , f2 , f3 }. For non-trivial minimal structures, i.e., when |E 0 | = K ≥ 2, it is easy to see that its corresponding bipartite graph G = (V10 ∪ V20 , E 0 ), where V1 7→ E, V2 7→ V and E 7→ S must have number of edges |E 0 | ≥ 2K and, for all its vertices u ∈ V10 ∪ V20 , u must have deg(u) ≥ 2, i.e., G is a pseudo-biclique in accordance with Def. 6. That intuition is elaborated as follows. The point is that, no matter how big is such structure S 0 , its equations f ∈ E 0 are such that |V ars(f )| ≥ 2 (as S 0 is non-trivial) and its variables can be grouped in local patterns from the sparsest kind to the densest. To construct an instance of the sparsest case, let S 0 be built by setting a first equation where its entry in the structure matrix AS has form (1, 1, 0+ ) and then, for the next |E 0 | − 2 equations, shift such pair of 1’s one position right w.r.t. the previous one. Then complete it with a last equation whose form is form (1, 0+ , 1). That is, the structure is built A.1. PROOFS OF HYPOTHESIS ENCODING 117 with unique pairs of 1’s spread all over the structure. Then, deciding whether there is a minimal structure of size |E 0 | = K corresponds exactly to BPBP. It is a special case (BBP), when such minimal structure is the densest possible, i.e., when AS has only 1’s and then its corresponding bipartite graph is a K-balanced biclique with |E 0 | = K 2 , and deg(u) = K for all vertices u ∈ V10 ∪ V20 . For instance, see the minimal structure with E 0 = { f4 , f5 } found at the second recursive step of COA in Fig. 3.2. 2 A.1.2 Proof of Proposition 1 “Let S(E, V) be a structure, and ϕ1 : E → V and ϕ2 : E → V be any two total causal mappings over S. Then C1+ = C2+ .” Proof 18 The proof is based on an argument from Nayak [49], which we present here arguably much clearer. Intuitively, it shows that if ϕ1 and ϕ2 differ on the variable an equation f is mapped to, then such variables, viz., ϕ1 (f ) and ϕ2 (f ), must be causally dependent on each other (strongly coupled). To show C1+ = C2+ reduces to C1+ ⊆ C2+ and C2+ ⊆ C1+ . We show the first containment, with the second being understood as following by symmetry. Closure operators are extensive, X ⊆ cl(X), and idempotent, cl(cl(X)) = cl(X). That is, if we have C1 ⊆ C2+ , then we shall have C1+ ⊆ (C2+ )+ and, by idempotence, C1+ ⊆ C2+ . Then it suffices to show that C1 ⊆ C2+ , i.e., for any (x0 , x) ∈ C1 , we must show that (x0 , x) ∈ C2+ as well. Observe by Def. 5 that both ϕ1 and ϕ2 are bijections, −1 0 then, invertible functions. If ϕ−1 1 (x) = ϕ2 (x), then we have (x , x) ∈ C2 and thus, trivially, (x0 , x) ∈ C2+ . Else, ϕ1 and ϕ2 disagree in which equations they map onto x. But we show next, in any case, that we shall have (x0 , x) ∈ C2+ . Take all equations g ∈ E 0 ⊆ E such that ϕ1 (g) 6= ϕ2 (g), and let n ≤ |E| be the number of such ‘disagreed’ equations. Now, let f ∈ E 0 be such that its mapped variable is x = ϕ1 (f ). Construct a sequence of length 2n such that, s0 = ϕ1 (f ) = x and, for 1 ≤ i ≤ 2n, element si is defined si = ϕ2 (ϕ−1 1 (si−1 )). That is, we are defining the sequence such that, for each equation g ∈ E 0 , its disagreed mappings ϕ1 (g) = xa and ϕ2 (g) = xb are such that ϕ1 (g) is immediately followed by ϕ2 (g). As xa , xb ∈ V ars(g), we have (xa , xb ) ∈ C2 and, symmetrically, (xb , xa ) ∈ C1 . A.1. PROOFS OF HYPOTHESIS ENCODING 118 The sequence is of form s = hx, xf , . . . , xa , xb , . . . , x2n−1 , x2n i. | {z } | {z } | {z } f g h Since x must be in the codomain of ϕ2 , we must have a repetition of x at some point 2 ≤ k ≤ 2n in the sequence index, with sk = x and sk−1 = x00 such that (x00 , x) ∈ C2 . If x00 = x0 , then (x0 , x) ∈ C2 and obviously (x0 , x) ∈ C2+ . Else, note that xf must also be in the codomain of ϕ1 , while x00 in the codomain of ϕ2 . Let ` be the point in the sequence, 3 ≤ ` ≤ 2n−1, at which s` = xf = xa and s`+1 = xb for some xb such that (xf , xb ) ∈ C2 . It is easy to see that, either we have xb = x00 or xb 6= x00 but (xb , x00 ) ∈ C2+ . Thus, by transitivity on such a causal chain, we must have (xf , x00 ) ∈ C2+ and eventually (xf , x) ∈ C2+ . Finally, since x0 ∈ V ars(f ) and ϕ2 (f ) = xf , we have (x0 , xf ) ∈ C2 and, by transitivity, (x0 , x) ∈ C2+ . 2 A.1.3 Proof of Theorem 2. “Let Σ be an fd set defined Σ , h-encode(S) for some complete structure S. Then Σ is non-redundant and singleton-rhs but may not be left-reduced (then may not be canonical).” Proof 19 We will show that properties (a-b) of Def. 9 hold for Σ produced by (Alg. 3) h-encode, but property (c) may not hold. At initialization, the algorithm sets Σ = ∅ and then inserts an fd hX, Ai ∈ Σ for each hf, xi ∈ ϕt scanned, where x 7→ A and X ∩ A = ∅. At termination, for all fd’s in Σ we obviously have |A| = 1 then property (a) holds. Also, note that ϕ : S → V ars(S) is, by Def. 5, a bijection. Now, for property (b) not to hold there must be some fd hX, Ai ∈ Σ that is redundant and then can be found in the closure of Γ = Σ \ hX, Ai. By Lemma 4 (below), that can be the case only if A ⊆ X or there is hY, Ai ∈ Γ for some Y . But from X ∩ A = ∅, we have A * X; and from ϕ being a bijection it follows that there can be no such fd in Γ. Thus it must be the case that Σ is non-redundant, i.e., property (b) holds. Finally, property (c) does not hold if there can be some fd hX, Ai ∈ Σ with Y ⊂ X such that Γ = Σ \ hX, Ai ∪ hY, Ai has the same closure as Σ. That is, if we may find hY, Ai ∈ Σ+ . Now, pick structure S whose (3 × 3) matrix As has rows (1, 0, 0), (1, 1, 0), (1, 1, 1) as an instance. Alg. 3 encodes it into Σ = {φ → x1 , x1 υ → A.2. PROOFS OF CAUSAL REASONING 119 x2 , x1 x2 υ → x3 }. Let Y = {x1 , υ}, and B = {x2 }. Note that x1 υ → x2 ∈ Σ can be written as hY, Bi ∈ Σ, and x1 x2 υ → x3 ∈ Σ as hY B, Ai ∈ Σ. Now observe that hY, Ai ∈ Σ+ can be derived by R5 over hY, Bi, hY B, Ai ∈ Σ, which is sufficient to show that property (c) may not hold. That is, B is “extraneous” in hY B, Ai ∈ Σ and can be removed from its lhs without loss of information to Σ. 2 Lemma 4 Let Σ be a (Def. 9-a) singleton-rhs fd set on attributes U . Then X → A can only be in Σ+ , where XA ⊆ U , if A ⊆ X or there is non-trivial hY, Ai ∈ Σ for some Y ⊂ U . Proof 20 By Lemma 5 (below), we know that X → A ∈ Σ+ iff A ⊆ X + . We need to prove that if A * X and there is no Y → A in singleton-rhs Σ, then A * X + . But this is equivalent to show that (Alg. 4) XClosure gives only correct answers for X + w.r.t. Σ, which is known (cf. theorem from Ullman [20, p. 389]). Note that XClosure(Σ, X) inserts A in X + only if A ⊆ X or there is some fd hY, Ai ∈ Σ. 2 Lemma 5 Let Σ be an fd set. An fd X → Y is in Σ+ iff Y ⊆ X + , where X + is the attribute closure of X w.r.t. Σ. Proof 21 This is from Ullman [20, p. 386]. Let Y = A1 ... An and suppose Y ⊆ X + . Then for each Ai , we have Ai ∈ X + and, by the definition of X + , we must have hX, Ai i ∈ Σ+ . Then it follows by (R4) union that X → Y is in Σ+ as well. Conversely, suppose hX, Y i ∈ Σ+ . Then, by (R3) decomposition we have hX, Ai i ∈ Σ+ for each Ai ∈ Y . 2 A.2. Proofs of Causal Reasoning A.2.1 Proof of Lemma 2 “Let S(E, V) be a complete structure, ϕ a total causal mapping over S and Σ an fd set encoded through ϕ given S. If hX, Ai ∈ Σ, then A#, the attribute folding of A (w.r.t. Σ) exists and is unique.” Proof 22 The existance of A# is ensured by the degenerate case where X = A#, as X → A is itself in ΣB by an empty application of R5. If X → A is in fact folded w.r.t. Σ, then the folding of A exists. Else, it is not folded yet X → A is non-trivial A.2. PROOFS OF CAUSAL REASONING 120 because by Theorem 2 Σ is non-redundant. Then, by Def. 11 there must be some Y ⊆ U with Y + X such that Y → X is in Σ+ and X 6→ Y . By Def. 10, there . is a finite application of R5 over fd’s in Σ to derive Y → − X. Then by R2 ∼ R5 over X → A, we have Y → A. Although there may be many such (intermediate) attribute sets Y ⊂ U along the transitive chaining satisfying the conditions above, we claim there is at least one that is a folding of A. Suppose not. Then, for all such Y ⊂ U , there is some Y 0 ⊂ U with Y 0 + Y such that Y 0 → Y and Y 6→ Y 0 , leading to an infinite regress. Nonetheless, in so far as cycles are ruled out by force of Def. 11, then Σ+ must have an infinite number of fd’s. But Σ+ is finite, viz., bounded by 22|U | (cf. [21, p. 165]). . Therefore the folding of A must exist. Moreover, observe that Σ is encoded through ϕ, which is by Def. 5 a bijection. Then we have hX, Ai ∈ Σ for exactly one attribute set X. Then, as a straightfoward follow-up of the rationale that led us to infer the folding existance, note that there . . . . . must be a single chaining Y n → − ... → − Y1→ − Y0→ − X→ − A. Again, as cycles are ruled out by force of Def. 11 and Σ+ is finite, then the folding of A is unique. 2 A.2.2 Proof of Theorem 3 “Let S(E, V) be a complete structure, and Σ an fd set encoded given S. Now, let hX, Ai ∈ Σ. Then AFolding(Σ, A) correctly computes A#, the attribute folding of A (w.r.t. Σ) in time O(|S|2 ).” Proof 23 For the proof roadmap, note that AFolding is monotone (size of A? can only increase) and terminates precisely when A(i+1) = A(i) , where A(i) denotes the attributes in A? at step i of the outer loop. The folding A# of A at step i is A(i) \ Λ(i) . We shall prove by induction, given attribute A from fd X → A in Σ, that A? \ Λ returned by AFolding(Σ, A) is the unique attribute folding A# of A. (Base case). By Theorem 2, Σ is non-redundant with (then) non-trivial hX, Ai ∈ Σ for exactly one attribute set X, the algorithm always reaches step i = 1, which is our base case. Then X is placed in A(1) and A in Λ(1) , and we have A(1) = XA and Λ(1) = A. Therefore, A(1) \ Λ(1) = X, and in fact we have hX, Ai ∈ ΣB by an empty application of R5. For it to be specifically in Σ#⊂ ΣB, it must be folded w.r.t. set ∆ of consumed fd’s at this step, viz., ∆(1) = {X → A}. In fact, as the only fd in ∆(1) , by Def. 11 it must be folded w.r.t. ∆(1) , and we A.2. PROOFS OF CAUSAL REASONING 121 have A# = X at step i = 1. (Induction). Now, let i = k, for k > 1, and assume that hA(k) \ Λ(k) , Ai ∈ Σ# ⊂ ΣB with A(k) 6= Λ(k) . By Lemma 2 we know that A# = A(k) \ Λ(k) is the unique folding of A at step i = k. For the inductive step, suppose Y is placed in A(k+1) and B in Λ(k+1) because hY, Bi ∈ Σ \ ∆(k) and B ∈ A(k) . Since B ∈ A(k) and B ∈ / Λ(k) (it is yet just be consumed into Λ(k+1) ), we can write (A(k) \Λ(k) ) = ZB for some Z 6= B, where (A(k) \ Λ(k) ) → A is assumed in Σ#. | {z } ZB Now, with the application of R5 consuming Y → B we have (A(k) Y B \ Λ(k) B) → A, | {z } ZS where S = Y \ Λ(k) . We claim that ZS → A is folded w.r.t. ∆(k+1) . Suppose not. Then by Def. 11 there must be some W + ZS such that W → ZS is in (∆(k+1) )+ but ZS 6→ W . Since ZS 6= ∅, there must be some C ∈ ZS, i.e., C ∈ / Λ(k+1) . Note that, as W → ZS is in (∆(k+1) )+ , then by (R3) decomposition we have W → C in (∆(k+1) )+ as well. But by Lemma 4 that can only be the case if there is some hT, Ci ∈ ∆(k+1) , which means C has been already consumed into Λ(k+1) , though C ∈ / Λ(k+1) . . Finally, as for the time bound, note that in worst case, exactly one fd Y → B is consumed from Σ into ∆ for each step of the outer loop, where |Σ| = |E|. That is, let n = |E|, then n is decreased stepwise in arithmetic progression such that n + (n−1) + . . . + 1 = n (n−1)/2 scans are required overall, i.e., O(n2 ). Note also, however, that B may be the only symbol read at each such fd scan but in worst case at most |U | = |V| symbols are read. Thus our measure n should be actually overestimated n = |E| |V| = |S|. Therefore Alg. 6 is bounded by O(|S|2 ). 2 A.2.3 Proof of Corollary 2 “Let S(E, V) be a complete structure, and Σ an fd set encoded given S. Then algorithm folding(Σ) correctly computes Σ#, the folding of Σ in time that is f (|S|) Θ(|E|), where f (|S|) is the time complexity of (Alg. 6) AFolding.” Proof 24 By Theorem 3, we know that sub-procedure (Alg. 6) AFolding is correct and terminates. Then (Alg. 5) folding necessarily inserts in Σ# (initialized empty) # exactly one fd Z − → A for each fd X → A in Σ scanned. Thus, at termination we have |Σ#| = |Σ|. Again, as AFolding is correct, we know Z is the unique folding of A.2. PROOFS OF CAUSAL REASONING 122 A. Therefore it must be the case that Alg. 5 is correct. Finally, for the time bound, the algorithm iterates over each fd in Σ without having to read its symbols, and at each such step AFolding takes time that is f (n). Thus folding takes f (|S|) Θ(|E|). But we know from Theorem 3 and Remark 4 that f (|S|) ∈ O(|S|), then it takes O(|S| |E|). 2 A.2.4 Proof of Proposition 3 “Let S(E, V) be a complete structure, ϕ a total causal mapping over S and Σ an fd set encoded through ϕ given S. Let Σ# be the folding of Σ, then Σ# is parsimonious.” Proof 25 By Lemma 2 we know that, for each fd hX, Ai ∈ Σ, the attribute folding # → A exists and is unique. That is, for no Y 6= Z we have Z of A such that Z − # Y − → A. Thus Σ# , folding(Σ) automatically satisfies Def. 13, as long as we show it is canonical (cf. Def. 9). Moreover, by Theorem 2 we know that Σ is both non-redundant and singletonrhs. Now, consider by Lemma 2 that AFolding builds a bijection mapping each # hX, Ai ∈ Σ to exactly one hZ, Ai ∈ Σ# such that Z − → A. Since Σ is singleton-rhs, it is obvious that Σ# is as well and covers all attributes in the rhs of fd’s in Σ. Also, the bijection implies |Σ#| = |Σ|. Since Σ is non-redundant and has exactly one fd with each attribute A in its rhs, then by Lemma 4 so is Σ#. Finally we will show that unlike Σ, its folding Σ# must be left-reduced. Suppose not. Then for some fd Z → A in Σ# there is S ⊂ Z such that non-trivial S → A is in (Σ#)+ . Since Z → A is the only fd in Σ# with A in its rhs and S → A M M is non-trivial, we must have S − →Z− → A. Now, suppose S → A is not folded. Then there is W + S such that W → S is in (Σ#)+ but S 6→ W . Note that W 6= Z, as W + S. Also, W → S and S → Zimplies W → Z by (R5) transitivity. Note also that S 6→ W and S → Z implies Z 6→ W . But Z → A is assumed folded. . That is, S → A must be folded. Then we have both S → A and Z → A folded, though S 6= Z. That is, the attribute folding of A is not unique, even though we know by Lemma 2 that it must be unique. 2 . Thus Σ# must be left-reduced, altogether, therefore, parsimonious. A.2. PROOFS OF CAUSAL REASONING 123 A.2.5 Proof of Theorem 4 “Let S(E, V) be a complete structure, ϕ a total causal mapping over S and Σ an fd set encoded through ϕ given S. Then xa , xb ∈ V are such that xb is causally dependent on xa , i.e., (xa , xb ) ∈ Cϕ+ iff there is some non-trivial fd hX, Bi ∈ ΣB with A ∈ X, where B 7→ xb and A 7→ xa .” Proof 26 We prove the statement by induction. We consider first the ‘if’ direction, and then its ‘only if’ converse. (Base case). Let hX, Bi ∈ Σ be some fd with A ∈ X, where B 7→ xb and A 7→ xa . By Theorem 2, it is non-trivial and then by default (i.e., an empty application of R5) it is in ΣB . But as X → B is in Σ, (Alg. 3) h-encode ensures that there is exactly one equation f ∈ E such that ϕ(f ) = xb and xa ∈ V ars(f ) where B 7→ xb and A 7→ xa . Then by force of Eq. 3.1 we must have (xa , xb ) ∈ Cϕ . Thus, we obviously have (xa , xb ) ∈ Cϕ+ as well. (Induction). Now, recall Armstrong’s (R5) pseudo-transitivity rule adapted here for the particular case of singleton-rhs fd sets, viz., if Y → C and CZ → B, then Y Z → B. By the inductive hypothesis, take any two non-trivial fd’s hY, Ci, hCZ, Bi ∈ ΣB with B ∈ / Y and assume that the causal dependency property holds for their attributes that encode variables. That is, let D ∈ Y and E ∈ Z, where D 7→ xd and E 7→ xe for xd , xe ∈ V such that (xd , xc ), (xe , xb ), (xc , xb ) ∈ Cϕ+ . Note that both Y → C and CZ → B are non-trivial, then C ∈ / Y, B ∈ / Z and B 6= C. Moreover, B ∈ / Y has been assumed such that the fd hY Z, Bi ∈ ΣB to be derived by R5 over Y → C and CZ → B is also non-trivial to satisfy the condition of the theorem. Now, it is easy to see that the property holds likewise for nontrivial fd hY Z, Bi ∈ ΣB . In fact, (xd , xc ), (xc , xb ) ∈ Cϕ+ implies (xd , xb ) ∈ Cϕ+ and also by the inductive hypothesis we have (xe , xb ) ∈ Cϕ+ . That is, for either some D ∈ Y or some E ∈ Z, we must have (xd , xb ), (xe , xb ) ∈ Cϕ+ . The converse ‘only if’ direction can be shown by a symmetrical inductive argument. That is, for the base case suppose (xa , xb ) ∈ Cϕ . Then, by Eq. 3.1 we know there is some f ∈ E such that ϕ(f ) = xb and xa ∈ V ars(f ). Moreover, in that case (Alg. 3) h-encode ensures there must be some non-trivial fd hX, Bi ∈ Σ with A ∈ X where B 7→ xb and A 7→ xa . Thus by an empty application of R5 we A.2. PROOFS OF CAUSAL REASONING 124 have hX, Bi ∈ ΣB . The inductive step shows the property still holds for arbitrary causal dependencies in Cϕ+ . 2 A.2.6 Proof of Proposition 4 “Let S(E, V) be a structure with variable x ∈ V. Then x can only be a first cause of some y ∈ V if x is exogenous. Accordingly, any variable y ∈ V can only have some first cause x ∈ V if it is endogenous.” Proof 27 The proof is straightforward from definitons. For the first statement, suppose by contradiction that x ∈ V is not exogenous but is a first cause of some y ∈ V. By Def. 5, ϕ is bijective then there is some f ∈ E such that ϕ(f ) = x. Moreover, as x is not exogenous then by Def. 8 it must be endogenous. In other words, there must be some xa ∈ V such that xa 6= x ∈ V ars(f ) and then by Eq. 3.1 we have (xa , x) ∈ Cϕ hence (xa , x) ∈ Cϕ+ . However, as x is a first cause, by Def. 14 there can be no y ∈ V such that (y, x) ∈ Cϕ+ . . Now, a symmetrical argument proves the second statement. Also by contradiction take a variable y ∈ V that is not endogenous and suppose it has some first cause x ∈ V. As variable y is not endogenous then by Def. 8 it must be exogenous. In other words, there must be f ∈ E such that V ars(f ) = {y}. Thus for any total causal mapping ϕ over S, we must have ϕ(f ) = y and, for no x ∈ V, we have (x, y) ∈ Cϕ . Therefore it is not possible to derive (x, y) ∈ Cϕ+ for some x ∈ V. But as y has some first cause x ∈ V by assumption, we must have (x, y) ∈ Cϕ+ . . 2 A.2.7 Proof of Lemma 3 “Let S(E, V) be a complete structure, ϕ a total causal mapping over S and Σ an fd set encoded through ϕ given S. Then a variable xa ∈ V can only be a first cause of some variable xb ∈ V, where hX, Bi ∈ Σ, and B 7→ xb , A 7→ xa , if either (i) A ∈ X or (ii) A ∈ / X but there is hZ, Ci ∈ ΣB with A ∈ Z and C ∈ X.” Proof 28 We prove the statement by construction out of Theorem 4. By Def. 14, one of the conditions for xa to be a first cause of xb is that (xa , xb ) ∈ Cϕ+ . Moreover, by Theorem 4 we know that (xa , xb ) ∈ Cϕ+ can only hold if there is some non-trivial fd hZ, Bi ∈ ΣB with A ∈ Z, where B 7→ xb and A 7→ xa . Now, by Def. 5 ϕ is bijective then there is hX, Bi ∈ Σ. Moreover, since A.2. PROOFS OF CAUSAL REASONING 125 Σ is parsimonious, X → B is the only fd in Σ with B in its rhs. So let A ∈ / X. Then we know X 6= Z hence X → B cannot be the fd required by Theorem 4. . Then such fd Z → − B with A ∈ Z can only exist if derived by some finite application of R5. That is, there must be some hZ, Ci ∈ Σ with A ∈ Z such that X = CW for some W and then R5 can be applied over hZ, Ci, hCW, Bi ∈ Σ to get non-trivial hZW, Bi ∈ ΣB where A ∈ Z. Now, it is easy to see that when such fd Z → C with A ∈ Z does not exists in ΣB (the second condition of the lemma), then obviously Z → C cannot exist in Σ to satisfy the requirement imposed by Theorem 4. That is, (xa , xb ) ∈ / Cϕ+ . 2 A.2.8 Proof of Theorem 5 “Let S(E, V) be a complete structure, ϕ a total causal mapping over S and Σ an fd set encoded through ϕ given S. Now, let B be an attribute that encodes some variable xb ∈ V. If hX, Bi ∈ Υ(Σ)#,1 then every first cause xa of xb (if any) is encoded by some attribute A ∈ X.” Proof 29 We show that the existance of a missing first cause xc of xb for folded # X− → B, where B 7→ xb and C 7→ xc but C ∈ / X leads to a contradiction. Suppose, by contradiction, that there is some missing first cause xc ∈ V of xb , where C 7→ xc and C ∈ / X. Then, by Lemma 3, since variable xc is a first cause of variable xb , it must be exogenous and, for hY, Bi ∈ Υ(Σ) either (i) C ∈ Y or (ii) C ∈ / Y but there is hZ, Di ∈ Υ(Σ)B with C ∈ Z and some D ∈ Y . In the first case (i), since xc is exogenous and Σ is parsimonious, we have hφ, Ci ∈ Σ but by Def. 15 there can be no W → C in the υ-projection Υ(Σ) of Σ. That is, C cannot be ‘consumed’ by R5 and then hY, Bi ∈ Υ(Σ) with C ∈ Y implies that, for any hW, Bi ∈ Υ(Σ)B , we must have C ∈ W . However, by assumption we have hX, Bi ∈ Υ(Σ)# then, by Def. 12, hX, Bi ∈ Υ(Σ)B , yet C ∈ / X. . In the second case (ii), observe that C ∈ Z and D ∈ Y , and let Y = DS. Then by R5 over Z → D and DS → B we get hZS, Bi ∈ Υ(Σ)B , where C ∈ Z. Well, either ZS → B is folded or it is not, rendering two cases for analysis. If ZS → B is folded, then both ZS → B and X → B are folded. But as Υ(Σ) is 1 Note that the folding is taken w.r.t. the υ-projection of Σ, then xb where B 7→ xb is an endogenous variable. A.3. PROOFS OF PROBABILISTIC DB SYNTHESIS 126 parsimonious, then by Lemma 2 the folding of B must be unique. Therefore we must have ZS = X, with C ∈ Z but C ∈ / X. . Else, assume ZS → B is not folded. Then by Def. 11 there is some W with W + ZS such that non-trivial W → ZS is in Υ(Σ)+ and ZS 6→ W . However, as C ∈ Z and W → ZS, by (R3) decomposition we must have W → C in Υ(Σ)+ , either with C ∈ W or with C ∈ / W and then W → C is nontrivial. But we know the latter cannot be the case by the same argument used in the first case (i), viz., xc is exogenous with C 7→ xc and Σ is parsimonious. That is, we must have C ∈ W . Furthermore, as W → ZS in Υ(Σ)+ , then by R5 over ZS → B we get hW, Bi ∈ Υ(Σ)B with C ∈ W . Now it is easy to see that the same situation recurs to W → B. If it is not folded, eventually for some T we will have . . − W → − B with C ∈ T , where T → B will be folded just like X → B. That is, T → by (Lemma 2) the uniqueness of the folding of B, we will have T = X with C ∈ T and C ∈ / X. . 2 A.3. Proofs of Probabilistic DB Synthesis A.3.1 Proof of Theorem 6 “Let Sk and Hk be (resp.) the complete structure and ‘big’ fact table of hypothesis k, and let Γ0k be the repaired factorization of Sk over Hk , and Y0 the ‘explanation’ table where hypothesis k is recorded. Now, let Y k be a U-relational schema defined Y k , synthesize4u(Sk , Hk , Y0 ). Then Y k is in BCNF w.r.t. Γ0k and is minimalcardinality.” Proof 30 Let Yki [ Vi Di | φ Ai Gi ] and Ykj [ Vj Dj | S T ] be (resp.) any u-factor projection and predictive projection of Hk . Note that all fd’s in Γ0k are either in Φ(Γ0k ) of form φ Ai → B or φ → B, or in Υ(Γ0k ) of form A1 A2 ... A` S → T with υ ∈ S. We must show that no fd in (Γ0k )+ can violate Yki or Ykj . It is easy to see that the projection (cf. Def. 20) of non-trivial fd’s in Φ(Γ0k )+ onto Ykj is empty, just like the projection of non-trivial fd’s in Υ(Γ0k )+ onto Yki . For the u-factor projections, note by Def. 21 that for any fd X → C in (Γ0k )+ to violate BCNF in Yki [ Vi Di | φ Ai Gi ], it must be non-trivial (C 6∈ X) with XC ⊆ φ Ai Gi but X 6→ φ Ai Gi (that is, X is not a superkey for Yki ). Note that we A.3. PROOFS OF PROBABILISTIC DB SYNTHESIS 127 have both φ Ai → B and φ → Ai B in (Γ0k )+ for any B ∈ Gi , but both φ Ai and φ are superkeys for Yki . Also, that there can be no non-trivial fd’s hX, Ci ∈ Φ(Γ0k )+ with φ 6∈ X, and by the definition of Problem 1 we know that Ai Gi is a maximal group. So, for any non-trivial hX, Ci ∈ Φ(Γ0k )+ , X must be a superkey for Yki . Thus no u-factor projection can be subject of BCNF violation w.r.t. Γ0k . Now, for predictive projection Ykj [ Vj Dj | S T ] let us reconstruct the process towards deriving hS, T i ∈ Υ(Γ0k )B . Note that it is derived by synthesize4u simulating ` applications of R5 over hφ, Ai i, hA1 A2 ...A` S, T i ∈ Γ0k for 0 ≤ i ≤ `. Note also that (i) no cyclic fd’s can be involved in such R5 applications, as they must always be over an fd in Φ(Γ0k ); and (ii) as a result of (Alg. 7) merge, A1 A2 ...A` S → T was the only non-trivial fd in the projection πA1 A2 ...A` ST (Γ0k ). Thus, the only nontrivial fd’s in the projection πST ( (Γ0k ) )+ in addition to S → T itself must be of form S → C rendered out of (R3) decomposition from it for all C ∈ T . In any such fd’s, we have S as a superkey for Ykj . Therefore no predictive projection can be subject of BCNF violation w.r.t. Γ0k . For the minimality note, as a consequence of (Alg. 7) merge, any two schemes Ykp [XZ], Ykq [V W ] are rendered by synthesize4u into Y k iff we have fd’s hX, Zi, hV, W i ∈ (Γ0k )+ and X 6↔ V , i.e., it is not the case that both X → V and V → X hold in (Γ0k )+ . Now, to prove that Y k is minimal-cardinality, we have to find that merging any such pair of arbitrary schemes shall hinder BCNF in Y k . In fact, take Y 0k := Y k \ (Ykp [XZ] ∪ Ykq [V W ]) ∪ Yk` [XZV W ]. As X 6↔ V , then neither X nor V can be a superkey for Yk` , which therefore cannot be in BCNF. 2 A.3.2 Proof of Theorem 7 “Let Sk be the complete structure of hypothesis k, and Hk [U ] its ‘big’ fact table such that Γ0k is the repaired factorization of Sk over Hk and Y0 is the ‘explanation’ table where hypothesis k is recorded. Now, let Y k be a U-relational schema defined Y k , synthesize4u(Sk , Hk , Y0 ). Then, i (a) the join ./ m i=1 Yk [ Vi Di | φ Ai Gi ] of any subset of the u-factor projections of Hk is lossless w.r.t. Γ0k . (b) any predictive projection Ykj [ Vj Dj | S T ], result of a join of the theoretical u-factor Y0 [ V0 D0 | φ υ ] with the ‘big’ fact table Hk [U ] and in turn with A.3. PROOFS OF PROBABILISTIC DB SYNTHESIS 128 u-factor projections Yki [ Vi Di | φ Ai Gi ], is lossless w.r.t. Γ0k .” Proof 31 For item (a), by Lemma 6, we know that any pair Yki [ Vi Di | φ Ai Gi ], Ykj [ Vj Dj | φ Aj Gj ] of u-factor projections of Hk will have a lossless join w.r.t. Γ0k iff (φ Ai Gi ∩ φ Aj Gj ) → (φ Ai Gi \ φ Aj Gj ) or (φ Ai Gi ∩ φ Aj Gj ) → (φ Aj Gj \ φ Ai Gi ) hold in (Γ0k )+ . By Def. 17, we know that (φ Ai Gi ∩ φ Aj Gj ) = {φ}, and φ Ai Gi \ φ Aj Gj = Ai Gi . In fact φ → Ai Gi is a repaired fd in Γ0k , therefore Yki and Ykj have a lossless join. Now, since the join is an associative operation [20, p. 62], and as we have chosen Yki and Ykj arbitrarily, then clearly any subset of the u-factor projections must have a lossless join. For item (b), for any predictive projection Ykj [ Vj Dj | S T ] take the join ./ Yki [ Vi Di | φ Ai Gi ] of u-factor projections such that, for all Ai ∈ Ai Gi , we have Ai ∈ W ⊂ Z where S = Z \ W and hZ, T i ∈ Γ0k . That is, Ai is a pivot attribute representing a first cause of some C ∈ T . By item (a), we know that such join is lossless. We must show that the join ./ Yki with ‘big’ fact table Hk [U ] is also lossless. By Lemma 6, that is the case iff (φ Ai Gi ∩ U ) → (φ Ai Gi \ U ) or (φ Ai Gi ∩ U ) → (U \ φ Aj Gj ) hold in (Γ0k )+ . In fact, we have (φ Ai Gi ∩ U ) = φ Ai Gi and (φ Ai Gi \ U ) = ∅ such that φ Ai Gi → ∅ is trivially in (Γ0k )+ . Finally, the join of theoretical u-factor Y0 [ V0 D0 | φ υ ] with big fact table Hk [U ] must be lossless likewise. In fact, note that ( φ υ ∩ U ) = φ υ, and (φ υ \U ) = ∅. Then also trivially we have φ υ → ∅, which is in (Γ0k )+ as well. Since the join is commutative [20, p. 62], the order of application is irrelevant therefore the join of all joins examined above taken together must be lossless. 2 Lemma 6 Let Σ be a set of fd’s on attributes U , and Ri [S], Rj [T ] ∈ R[U ] be relation schemes with ST ⊆ U ; and let πST (Σ) be the projection of Σ onto ST . Then Ri [S] and Rj [T ] have a lossless join w.r.t. πST (Σ) iff (S ∩ T ) → (S \ T ) or (S ∩ T ) → (T \ S) hold in πST (Σ)+ . Proof 32 See Ullman [20, p. 397]. 2
5cs.CE
arXiv:1704.07798v3 [quant-ph] 13 Aug 2017 Limitations on Transversal Computation through Quantum Homomorphic Encryption Michael Newman1 and Yaoyun Shi2 1 2 Department of Mathematics Department of Electrical Engineering and Computer Science University of Michigan, Ann Arbor, MI 48109, USA [email protected], [email protected] Abstract Transversality is a simple and effective method for implementing quantum computation faulttolerantly. However, no quantum error-correcting code (QECC) can transversally implement a quantum universal gate set (Eastin and Knill, Phys. Rev. Lett., 102, 110502). Since reversible classical computation is often a dominating part of useful quantum computation, whether or not it can be implemented transversally is an important open problem. We show that, other than a small set of non-additive codes that we cannot rule out, no binary QECC can transversally implement a classical reversible universal gate set. In particular, no such QECC can implement the Toffoli gate transversally. We prove our result by constructing an information theoretically secure (but inefficient) quantum homomorphic encryption (ITS-QHE) scheme inspired by Ouyang et al. (arXiv:1508.00938). Homomorphic encryption allows the implementation of certain functions directly on encrypted data, i.e. homomorphically. Our scheme builds on almost any QECC, and implements that code’s transversal gate set homomorphically. We observe a restriction imposed by Nayak’s bound (FOCS 1999) on ITS-QHE, implying that any ITS quantum fully homomorphic scheme (ITS-QFHE) implementing the full set of classical reversible functions must be highly inefficient. While our scheme incurs exponential overhead, any such QECC implementing Toffoli transversally would still violate this lower bound through our scheme. 1 1.1 Introduction Restrictions on transversal gates Transversal gates are surprisingly ubiquitous objects, finding applications in quantum cryptography [29], [25], quantum complexity theory [11], and of course quantum fault-tolerance. The instability of quantum information is well-documented, and quantum error-correcting codes [24] allow the encoding of single qubits into multiple qubit systems so that errors on small subsets of physical qubits can be corrected [21]. Performing computations on these codes carries the risk of propagating errors between different subsystems, unless the code can implement the computation in a way that preserves the subsystem structure. Informally, these types of logical operators that decompose as a product across the subsystems are called transversal, and the oft-cited Eastin-Knill theorem [15], [39] limits the ability of quantum codes to prevent this error propagation. Theorem 1 (Eastin-Knill). No quantum error-correcting code can implement a quantum universal transversal gate set. These transversal gate sets are valuable as most models of fault-tolerant quantum computation implement associated transversal gate sets fault-tolerantly “for free”. Incurring comparatively significant overhead, often in the form of magic state distillation [18], [22], gauge fixing [5], [26], or more recently deconstructions of non-transversal gates into fault-tolerant pieces [37], one can fault-tolerantly implement some remaining gate set making the computation space universal. Improving the efficiency of this overhead and designing new fault tolerant architectures to supplement transversal gates is central to quantum fault tolerance. Implementing fault-tolerant classical reversible computation efficiently would be extremely desirable as many quantum algorithms are primarily classical subroutines with a relatively small number of quantum gates, and there have been several proposals for doing so [31], [13], [23]. For example, factoring a cryptographically large RSA key using Shor’s algorithm requires around 3 × 1011 Toffoli gates to perform modular exponentiation alone, and is the dominating portion of the circuit [19]. As Toffoli is universal for classical reversible computation, one might ask if there are any quantum error-correcting codes that can naturally implement Toffoli, and thus classical computations, transversally? We give restrictions on the ability of QECCs to do this. Theorem 2 (Informal). Almost no quantum error-correcting code can implement a classical universal transversal gate set. In particular, almost no quantum error-correcting code can implement the Toffoli gate transversally. The only exceptions to our theorem are non-additive distance d codes that decompose as d-fold product states in their logical computational basis, where each “subcode” itself fails to be erasurecorrecting. Essentially, one can think of these as maximally redundant quantum codes: they are the concatenation of a repetition code with some distance 1 inner code, similar to Shor’s stabilizer code written as a 3-fold product of GHZ states. We do not expect that any such code can implement Toffoli transversally, but it remains a case our proof technique cannot rule out. In particular, our proof does apply to all binary additive codes. The result is perhaps slightly surprising since there exist QECCs (e.g. triorthogonal codes) that can implement the CCZ gate transversally [31], and in fact transversal Toffoli gates can map between different quantum Reed-Solomon codes by increasing the degree of the underlying polynomial [13]. 1 1.2 Quantum homomorphic encryption The main ingredient in our proof is an information-theoretically secure homomorphic encryption scheme. Generally, homomorphic encryption [20] is a means of delegating computation on sensitive data securely. It allows for the encryption of data in such a way that another party can perform meaningful computation on the ciphertext without decoding, preserving the security of the underlying plaintext. A scheme is termed fully homomorphic encryption (FHE) if it can implement a universal class of functions in some computation space. Recently, extensions of homomorphic encryption to the quantum setting have been considered. Instead of encrypting classical data and implementing addition and multiplication gates homomorphically, quantum homomorphic encryption aims to encrypt quantum data and implement unitary gates homomorphically. Progress was made in [10], and recently [14] extended this work to a leveled scheme that could homomorphically implement all polynomial-sized quantum circuits. The aforementioned schemes are only computationally secure, since they use classical FHE as a subroutine. This is no great indictment: FHE is built on the difficulty of certain hard lattice problems that are leading candidates for quantum-secure encryption [12], [33]. However, quantum information often promises information-theoretic security (ITS) guarantees that are impossible classically. Intermediate advances have also been made in this more restrictive setting. One such scheme allows for the implementation of a large class of unitaries homomorphically, but with less stringent ITS guarantees [36]. More recently, [29] proposed a compact ITS-QHE scheme in which the size of the encoding scales polynomially with size of the input for the limited Clifford circuit class. This scheme achieves the strongest notion of imperfect ITS, with the probability of distinguishing between any two ciphertexts exponentially suppressed in the size of the encoding. The scheme in [29] is based on a “noisy” quantum encoding of the data. They take an encoding circuit for a particular quantum code and replace the ancilla bits of the encoding with uniformly random noise. Their encryption is then choosing a random embedding of this code into yet more uniformly random noise. This scheme links ITS-QHE to transversal gates: the transversal gates for their code are exactly those gates that can be implemented homomorphically. 1.3 Limitations on ITS-QHE There are fundamental limitations on what ITS homomorphic encryption can do. It is known that for a purely classical scheme, efficient ITS-FHE is impossible, violating lower bounds in the setting of single server private information retrieval [16]. It was further shown that in the best case scenario, when the mutual information between the plaintext and the ciphertext is precisely zero, efficient quantum FHE is impossible [38]. This no-go result actually applies to the more restrictive setting of classical data being encrypted into quantum data, while allowing only classical reversible functions to be evaluated homomorphically. Both [38] and [29] ask whether relaxing to imperfect ITS-security might allow for efficient ITS-QFHE. Unfortunately, this is not the case. Proposition 3. [Informal] Efficient ITS-QFHE is impossible. Concurrent to this work, this proposition was observed in [25]. We provide a precise statement and proof of this restriction in Appendix A. This result can be seen by combining the proof technique in [16] with similar single server private information retrieval bounds in the quantum setting [4]. In essence, the inefficiency of ITS-QFHE follows from viewing ITS-QHE (on classical data using a quantum encoding) as a certain quantum random access encoding (QRAC) (see [1]) of the function 2 class we wish to implement homomorphically. Well-known bounds on QRACs [27] place lower bounds on the encoding size of such a scheme, precluding efficiency. Using a variant of the codebased ITS-QHE scheme proposed in [29], we can then argue that (almost) any QECC implementing the Toffoli gate transversally would yield a scheme violating this lower bound. It is worth noting that similar tasks such as blind quantum computation [9] and computing on encrypted data [17], [8] allow ITS solutions, but they do so at the cost of interactivity between the client and server. We do not allow this interactivity in our definition of homomorphic encryption. 1.4 Comparison to related works The five works the most closely resemble our results are [15],[39] and [6], which place restrictions on transversal gate sets for QECCs, and [29] and [25], which use similar ITS-QHE constructions. We very roughly summarize these results and compare them to our own. In [39], Zeng et al. were some of the first to place restrictions on quantum universal transversal gate sets for additive quantum codes by elucidating the stabilizer group structure. Further work in [2] classified the set of diagonal gates that can implement one and two qubit logical operations in stabilizer codes. Shortly thereafter, [15] showed that for any QECC, the transversal gate set must be finite, and so cannot approximate with arbitrary precision the full unitary group. Intuitively, they make a Lie type argument by showing that infinitesimal transversal operations are themselves linear combinations of local error operators. Since these unitaries must act identically on the codespace, it follows that the group of transversal operations must be finite. More recently, [6] placed restrictions on the more general class of topologically protected logical gates in topological stabilizer codes, which include transversal gates as an optimal subset. They showed that for a topological stabilizer code defined on a d-dimensional lattice, any such gate must lie in the dth level of the Clifford hierarchy. These results were extended in [32] to more general stabilizer subsystem codes, and in Appendix D, we detail how these arguments can be used to rule out classical reversible transversal computation for the subclass of stabilizer codes. In the direction of ITS-QHE, [29] gave a compact and efficient ITS-QHE scheme for the restricted class of Clifford circuits. Using magic state injection, they complete a universal gate set by adding the T -gate. However, because the client and server cannot communicate during the protocol, they must limit themselves to circuits using a constant number of T -gates. Again, their encryption is a “noisy” encoding of the data into some code followed by a secret embedding into random noise. With this encryption, they are able to generate indistinguishable outputs using only polynomial overhead in the input size. In the more recent work [25], the authors independently observe Proposition 3. They take the more positive approach of arguing what can be done in spite of this limitation, extending the ITS-QHE schematic in [29] to other particular error-correcting codes and using code concatenation to achieve security with only polynomial overhead. This achieves ITS-QHE on the larger circuit class IQP + , which is probably not classically simulable [7]. Because of the stringent lower bounds placed by Nayak, we actually forgo the noisy encoding circuit and embed QECCs directly into random noise after removing a correctable set of qubits. This has the effect of increasing the overhead by an exponential factor in order to achieve security, but thanks to the roomy lower bound, this factor is still too small to allow an ITS-QFHE scheme. We can argue directly about the security of this scheme using the nonlocality of the quantum information being encoded in almost any QECC. The idea is conceptually simple: in order to obtain encryptions of the data that are both secure and (sufficiently) short, we must inject randomness into the encodings themselves by withholding qubits from the code. While ordinarily this would negatively affect the correctness of homomorphic evaluation, the error-correcting property allows us to inject this randomness while still maintaining perfect recoverability. Then intuitively, spreading 3 the information across the subsystems limits the complexity of the class of logical operators that don’t couple the subsystems, i.e. the transversal operators. This differs fundamentally from the approaches in [39] and [15] in that it is a quantitative information-type bound. It is not without its drawbacks however, as these maximally redundant codes fail to “spread out” the information sufficiently. The prototypical example is Shor’s code, which is the concatenation of a bit-flip and phase-flip code. However, we can argue directly using the stabilizer group structure that no such additive code can implement Toffoli transversally. 2 Preliminaries 2.1 Quantum Information We quickly review some standard notation, followed by some less standard tools we will need from quantum information theory. For a more complete view, see [28]. Throughout, we will be working with 2-level qubit quantum systems. We denote by |H| = log(dim(H)), the number of qubits constituting state space H. We define a general quantum state to be a positive semi-definite operator ρ ∈ L(H) of trace one. We call such a state pure if rank(ρ) = 1, otherwise we call it mixed, and note that such an operator is mixed if and only if Tr(ρ2 ) < 1. For any operator U ∈ HA , we use the notation U A to indicate the operator UA ⊗ IB ∈ L(HA ⊗ HB ). When it is unclear which space a state lives in, we will denote its state space as a superscript (e.g. |ψiA ). We also sometimes adopt the notation that for ρ ∈ L(A ⊗ B), ρA = TrB (ρ). By slight abuse of notation, we also adopt the convention that for any permutation π ∈ Sn , π can also indicate the unitary permutation operator corresponding to the physical permutation of qubits. We also sometimes omit the dimension of an identity operator I, but usually the dimension is implicitly its trace normalization factor, e.g. I/D acts on a space of dimension D. The norm k · kp refers the usual Schatten p-norm, so that for any A ∈ L(H) with singular values (a1 , . . . , an ), kAkp = n X i=0 Further recall that api !1/p for p > 1, and kAk1 = n X |ai |. i=0 1 kρ − σk1 = max Tr(P (ρ − σ)), P ≤I 2 and so we can think of the 1-norm as a means of bounding the ability to distinguish two quantum states, where ≤ refers to the positive semidefinite partial ordering. For a collection of quantum states {ρS } indexed by S ∈ S, we sometimes write ES [ρS ] to denote the expectation over 1 P a uniformly random choice of S, ES [ρS ] = |S| ρ . We will regularly be referring to several S S∈S particular gates, and so list them here.       0 1 0 −i 1 0 X= Y = Z= 1 0 i 0 0 −1     1 0 0 0 1 0 0 0  0 1 0 0   0 1 0 0     CX =  CZ =  0 0 0 1   0 0 1 0  0 0 1 0 0 0 0 −1 4       Toff =       1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0        CCZ =                  1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 −1             Definition 4. An (n, m, p)-quantum random access code (QRAC) is a mapping from an n-bit string x to an m-qubit quantum state ρx along with a family of measurements {Mi0 , Mi1 }ni=1 satisfying, for all x ∈ {0, 1}n , i ∈ [n], Tr(Mij ρx ) ≥ p if xi = j. More generally, we can consider some protocol Mi for retrieving xi and we call this protocol the ith query of the QRAC, satisfying Pr[Mi (ρx ) = xi ] ≥ p. Definition 5. An n-qubit quantum code is simply a subspace C of an n-body Hilbert space H along with a fiducial orthonormal logical basis. Let PC denote the projection onto C. The code is further called an [[n, k, d]] quantum error-correcting code (QECC) if it is a subspace C of dimension 2k satisfying, for any ⌊ d−1 2 ⌋-local operators Ea , Eb , PC Ea† Eb PC = λab PC . for some Hermitian (λab ). We call the Ea , Eb correctable errors and we say d is the distance of the code. Operationally, this means that there exists a recovery channel R by which any ⌊ d−1 2 ⌋-local error d−1 (acting nontrivially on at most ⌊ 2 ⌋ qubits) can be corrected. Recall also that any [[n, k, d]] QECC can correct up to (d − 1) errors in known locations. We call these types of errors erasure errors, and so call codes satisfying d ≥ 2 erasure-correcting codes. For simplicity, we will restrict our discussion to QECCs encoding a single qubit, i.e. [[n, 1, d]] QECCs. A quick review of the proof shows that we can make this assumption without loss of generality by arguing against a classical universal transversal gate set on any single encoded logical qubit. By similar reasoning, the proof applies to subsystem codes as well, where we require the logical operators of such a code to be independent of the state of the gauge qubits. When we have a collection of p logical qubits, each encoded into an n-qubit code, we can decompose the np physical qubits into a fixed n-wise partition of p-qubits each so that every partitioning set contains exactly one qubit from each code block. We refer to these partitioning sets as the subsystems of the collective code. Definition 6. An n-qubit stabilizer group S is an abelian subgroup of the n-qubit Pauli group not containing −I. An n-qubit additive (or stabilizer) code encoding k logical qubits can be described as the simultaneous (+1)-eigenspace of the Pauli operators comprising an n-qubit stabilizer group S with n − k generators. The logical Pauli operators of this code correspond to the normalizer cosets N (S)/S, and it follows that the distance of the code is the minimal weight operator in N (S)/S. Definition 7. For any quantum error correcting code C, we define its logical states |ψiL to be the physical encoding of |ψi in C. We define the logical gate UL to be a codespace preserving physical gate that satisfies, for all |ψiL ∈ C, UL |ψiL = (U |ψi)L . 5 The set of transversal gates TC associated to C are those logical gates that decompose as a product across the subsystems. That is to say, UL ∈ TC if UL = U1 ⊗ . . . ⊗ Un , where n is the length of the code, each Ui acts on a single subsystem, and UL is a codespace preserving map on the code C ⊗r for U an r-qubit gate. We further define a logical gate to be strongly transversal if it decomposes as UL = U ⊗n . Following the example of [39], we do not allow coordinate permutations in our definition of transversality. Definition 8. We say a quantum code C = SpanC (|0̃i, |1̃i) is an r-fold code if it can be written as |iiL = r O |ψij i. j=1 where each vector |ψij i does not further decompose as a product state across any bipartition. We additionally assume that r ≤ d, that |ψ0j i and |ψ1j i occupy the same subsystem, and that |ψ0j i ⊥ |ψ1j i. It then makes sense to refer to Span{|ψ0j i, |ψ1j i} as the jth subcode. These assumptions are natural, and we justify them in our discussion. If the code is additionally an [[n, 1, d]] QECC with r = d ≥ 3 and each subcode has distance 1, we simply call the resulting code a maximally redundant code. Note that any (pure state) code is at least a 1-fold code. The guiding example is Shor’s code, which can be seen as the concatenation of a repetition outer code and a complementary GHZ inner code, neither of which is quantum erasure correcting. In the case that the subcodes are identical, any maximally redundant code is just the concatenation of a repetition code with some distance 1 subcode. Intuitively, these are codes for which you can’t erase enough qubits to mix the state while still remaining perfectly correctable: while redundancy can be used in classical error-correcting codes to protect information, quantum error-correcting codes must “spread out” information to protect it. In this sense, these codes are maximally redundant because they “spread out” the information the least. We show that non-additive maximally redundant codes (i.e. maximally redundant codes for which the subcodes are comprised of non-stabilizer subspaces) are the only binary QECCs with the hope of implementing logical Toffoli transversally. 2.2 Homomorphic Encryption We define an ITS-QHE scheme as three algorithms performed between two parties which we will call Client and Server. We restrict ourselves to the more limited setting of a quantum scheme implementing Boolean functions on classical data using quantum encodings. Of course, any impossibility result then extends to the more difficult task of quantum computations on quantum inputs. The parameters of such a scheme are given by (n, m, m′ , ǫ, ǫ′ ) and some gate set F. Formally, we define the algorithms of an ITS-QHE scheme as acting on Client’s private workspace C, a message space M sent from Client to Server after encryption, and a message space M′ sent from Server to Client after evaluation. (i) QHE.Enc(x) = ρCM , in which the client chooses an n-bit input x and encrypts with some private randomness to obtain ρ. We assume that any quantum evaluation key is appended to the encryption. Client then sends the message portion of the encryption ρM to the Server. We define m to be the length of this message, the size of the encoding. (ii) QHE.Evalf : L(M) −→ L(M′ ), in which Server, with description of some circuit f , applies an evaluation map to an encrypted state, possibly consuming an evaluation key in the 6 ′ process. Server then sends his portion of the state σ CM := (I C ⊗ QHE.Evalf )(ρCM ) back to Client, and we define the length of this message to be m′ , the size of the evaluated encoding. ′ (iii) QHE.Dec(σ CM ) = y, in which Client decrypts the returned evaluated encoding using her side information C and recovers some associated plaintext y. As an encryption scheme, the above should certainly satisfy QHE.Dec(QHE.Enc(x)) = x. and as an ITS-QHE scheme, there are three additional properties the scheme should satisfy as well. (i) ǫ-Information-theoretic security: for any inputs x, y, letting ρx , ρy ∈ L(M) denote the outputs of QHE.Enc on M (thinking of these states as mixtures of encryptions under uniformly random choices of secret key), kρx − ρy k1 ≤ ǫ. (ii) F-homomorphic: for any circuit f ∈ F and for any input x, Pr[QHE.Dec(QHE.Evalf (QHE.Enc(x)))1 6= f (x)] ≤ ǫ′ where the probability is over the randomness of the protocol and the subscript 1 denotes the first bit of the output. This restriction to the first bit is just to argue directly about Boolean functions. For ease of exposition, we also assume without loss of generality that our protocols are perfectly correct, and allow ǫ′ = 0. We call the scheme fully homomorphic if it is homomorphic on the set of all classical Boolean circuits. (iii) Compactness: a priori, the server could do nothing except append a description of the circuit f to be run by the decryption function after decrypting. To avoid trivial solutions like this, we demand that the total time-complexity of Client’s actions in the protocol do not scale with the complexity of the functions to be evaluated, but only with some fixed function on the size of the input. Intuitively, this captures the motivation behind homomorphic encryption: limiting the computational cost to Client. However, we note that the standard definition of compactness refers to the time-complexity of the decrypt function specifically. We denote a scheme homomorphic for some class of functions F and satisfying all of these properties as an F-ITS-QHE scheme. If F is the set of all Boolean circuits, we denote such a scheme as an ITS-QFHE scheme. We observe that such a scheme must be inefficient. For a precise statement and proof, see Appendix A. Proposition 9. The communication cost of ITS-QFHE must be exponential in the size of the input. 3 A coding based ITS-QHE scheme We now consider a strategy for implementing compact QHE using quantum codes. This will be a simple “block” embedding encryption scheme homomorphically implementing quantum circuits on classical input, and is similar to the construction in [29]. We will use the error-correcting property to withhold a correctable set of qubits from the encoding. 7 Coding QHE Scheme: Arguments: C ~i m S = ∈ = ∈ an [[n + r, 1, d]] r-fold QECC with r < d {0, 1}p the size of each noise code block [m]n , the secret key 1. On input ~i ∈ {0, 1}p , encode ~i as the pure state the logical computational basis defining C. p N |iℓ iL , for {|0iL , |1iL } ℓ=1 2. Let R be a collection of r subsystems, each of p-qubits, comprised of one N ~ subsystem from each subcode. Then form γ i = TrR ( ℓ |iℓ iL ). Essentially, ~ γ i is the state of the collection of codewords with each codeword missing one subsystem from each of its subcodes. 3. Initialize n (p × m) arrays of maximally mixed qubits, and replace the ~ Sj -th column of each array with the j-th subsystem of γ i . This forms the encrypted state. 4. Publish a constant number of labeled encryptions of 0 and 1, to be used as ancilla in homomorphic evaluation. Figure 1: A description of the encryption procedure for the code based QHE scheme. 8 n+1 b b b b = |x1 iL b b b b = |x2 iL b b b b = |xp iL x1 x2 Encryption bbbb Encoding xp S1 bc bc bc bc b bc bc b bc S2 b bc bc bc b bc bc b bc Sn b b bc bc b bc bc b bc m n Figure 2: A diagram illustrating the code-based QHE scheme for an (n + 1)-length 1-fold quantum code while withholding a single subsystem. The (n + 1)-th subsystem remains in the hands of Client. The arrows connecting the subsystems indicate where each subsystem (i.e. column) is being mapped. The filled dots represent code qubits, while the empty dots represent maximally mixed qubits. The scheme is detailed in Figures 1 and 2. Using that notation to summarize, our encryption ~ channel E is defined, for secret key S and input string ~i, as E(S,~i) = γSi . We sometimes use ~ ~ the notation γS instead of γSi or γ instead of γ i , omitting ~i when we are unconcerned with the underlying plaintext. The total size of our encrypted input is mnp qubits. In our preceding notation, the described scheme has parameters (p, mnp, mnp, ǫ(m, p), 0), implementing the set of gates TC homomorphically. Lemma 10. Let E be the encryption scheme detailed in Figure 1. Let TC denote the group of transversal operators associated to the underlying quantum code C. Then, E is TC -homomorphic. Proof. Let UL be the logical operator we wish to apply to some codestate |ψiL . By definition, UL ∈ TC implies UL can be decomposed as a product operator U1 ⊗ . . . ⊗ Un+r where Ui is an operator that acts only on the i-th subsystem of the code. Then, without knowledge of the secret key S, a third party can implement UL by applying the operator m n O O Ui i=1 j=1 where each Ui is an operator local to some subsystem in Server’s possession (that is to say, on one of the columns in the corresponding array). Returning the resulting data to a party with the secret key, that party can decrypt to obtain a state of the form V R UL |ψiL , where V R is supported on the r subsystems that Client has withheld. Since r < d, viewing V R as an erasure error on r subsystems, there exists some recovery channel R such that R(V R UL |ψL i) = UL |ψiL . Decoding, we obtain U |ψi as desired. 9 Note that this scheme is a TC -homomorphic, non-leveled, and compact QHE scheme, since the recovery and decryption channel do not depend on the complexity of U . We now aim to compute the security ǫ(m, p) of the proposed scheme, namely the tradeoff between the size of the input p, the size of the encoding mnp, and the ITS guarantee. To avoid confusion, we point out here that the code size n is a constant, as we are not concatenating to achieve security, just amplifying the size of the noise into which we are embedding. We want to show that while the scheme is inefficient, its parameters still defeat Nayak’s bound. To simplify the security proof, we use the more stringent requirement that the outputs are indistinguishable from uniformly random noise. Here, we will see that the nonlocality of the information stored in QECCs is essential in its allowing us to withhold qubits while still delegating computation to Server. This imposes the requirement of using quantum error-correcting codes, as evidenced by the following observation. Lemma 11. Suppose we replace the preceding scheme with one that does not withhold any of the physical qubits comprising the (pure state) code. Then if m = o(2p ), ǫ must be bounded away from zero. Proof. Counting the rank of the encrypted state, note that rank(γS ) = 2np(m−1) . Then, rank(ES [γS ]) ≤ mn 2np(m−1) ≤ 2n(p(m−1)+log(m)) . Thus, the fraction of nonzero eigenvalues must be at most (2n )log(m)−p . Since log(m) = o(p), the fraction of nonzero eigenvalues goes to zero, and so kES [γS ] − I/2mnp k1 must be bounded away from zero as claimed. 4 Security tradeoff for the QHE coding scheme Our aim is to give (inefficient, but sufficient) security parameters for the coding QHE scheme. We will then argue that if there were a QECC implementing a sufficiently large transversal gate set (such as the set of all classical reversible gates), then it would violate Nayak’s bound with these parameters. We will first need a small lemma on the structure of the partial trace operator. The proof can be found in Appendix B. Lemma 12. For Hilbert space decomposition H = H∆ ¯ 2, ¯ 1 ⊗ H∆ ⊗ H∆    ¯ ¯ ¯ ¯ Tr (ρ∆1 ∆ ⊗ I ∆2 )(I ∆1 ⊗ σ ∆∆2 ) = Tr Tr∆ ¯ 1 (ρ)Tr∆ ¯ 2 (σ) . With this we are ready to prove the security tradeoff between ǫ, p, and m. We adopt the same notation used in the proposed scheme for convenience, and note that we are demanding the stronger condition that outputs are indistinguishable from random noise. Proposition 13. For the scheme described in Figure 1, letting K = 2p be the dimension of any subsystem and for some c ∈ (0, 1), we have k (I/K mn ) − ES [γS ]k1 ≤ ǫ(K, m)  n  1/2 −c 2K n − 1 + K . for ǫ(K, m) = m−1 m m 10 Proof. By Cauchy-Schwartz, k (I/K mn ) − ES [γS ]k21 ≤ K mn k (I/K mn ) − ES [γS ]k22     2 1 mn 2 ≤ K Tr(ES [γS ] ) − Tr(I) Tr(ES [γS ]) + K mn K 2(mn) ≤ K mn Tr(ES [γS ]2 ) − 1. where the third line follows by noting that, as a quantum state, Tr(ES [γS ]) = 1. We write |S ∩ S ′ | to denote the size of the intersection of S and S ′ considered as sets. We can then decompose, for pℓ = PrS,S ′ [|S ∩ S ′ | = ℓ],  mn  X K mn 2 Tr(γS γS′ ) K Tr(ES [γS ] ) = m2n ′ S,S (∗) = K mn n X ℓ=0  pℓ Tr E[(γS γS ′ ) |S ∩ S ′ | = ℓ] .  (n)(m−1)(n−ℓ) n ≤ nl /mℓ and that p0 = ( m−1 Note that pℓ = ℓ mn m ) . Furthermore, up to a permutation mn−2n on the coordinates, we may write for dim(I) = K ,  2   mn ′ mn n n (mn−2n) K E[(γS γS ′ ) |S ∩ S | = 0] = K Tr (γ/K ) ⊗ (γ/K ) ⊗ I/K =1 again by noting that γ is a quantum state of trace one and by multiplicativity of trace over tensor products. Next consider the general case |S ∩ S ′ | = ℓ. Then up to a permutation on the coordinates and for some π ∈ Sn , for ∆ the subsystem of the intersection S ∩ S ′ ,  2   mn n−ℓ † n−ℓ (mn−2n+ℓ) mn ⊗ γ)(πγπ ⊗ I/K ) ⊗ I/K K Tr(γS γS ′ ) = K Tr (I/K   = K ℓ Tr (I ⊗ γ)(πγπ † ⊗ I)   † = K ℓ Tr Tr∆ ¯ (πγπ ) ¯ (γ)Tr∆ where the final line follows from Lemma 12. Then, because we have withheld a subsystem from i each subcode of the underlying QECC, in any row i we have that Tr∆ ¯ (γ ) is mixed. It follows  i † i that Tr Tr∆ ¯ (πγ π ) < 1. So by separability across each encoded qubit and again by ¯ (γ )Tr∆ multiplicativity of trace across tensor products,   p p   Y O ij † ij ij †  ij  Tr Tr∆ = Tr∆ Tr ¯ (πγ π ) . ¯ (γ )Tr∆ ¯ (πγ π ) ¯ (γ )Tr∆ j=1 j=1 It follows that there exists some c ∈ (0, 1) so that K mn Tr(γS γS ′ ) ≤ K ℓ−c . 11 Putting this all together, we observe that K mn  n   X  n K ℓ −c pℓ Tr E[(γS γS ′ ) |S ∩ S | = ℓ] ≤ K m ℓ ℓ=1 ℓ=1  n  K −c −1 ≤K 1+ m   2K n ≤ K −c m n X ′ Including the first term in the sum, we get,   n  m−1 n −c 2K +K (∗) ≤ m m and so, ǫ(K, m) =  m−1 m n −1+K −c  2K m n 1/2 as desired. 5 Limitations on classical transversal computation We are left with two competing bounds. On the one hand, it follows from Nayak’s bound (Appendix A) that, for any F-ITS-QHE encryption scheme with security ǫ and communication size s, s ≥ log(|F|)(1 − H(ǫ)). If we choose parameters that do not leak some constant fraction of information about our input, then as ǫ → 0 we see that for s chosen as some fixed function of the input size, it must be that s = Ω(log(|F|)). Using the notation and parameters from the aforementioned coding scheme, this means that mnp = Ω(log(|Fp |)) for Fp the restriction of functions in F to p-bit inputs. Note that we can assume no ancilla overhead since the constant gets absorbed into this asymptotic bound. Now by construction of the scheme, F is the transversal gate set for the underlying choice of quantum error-correcting code. Next, we would like to choose m as a function of K so that ǫ → 0. For this, it suffices to choose m as a function of K so that n  −c 2K = 0. lim K K→∞ m Equivalently, we require m = ω(K 1−( n ) ). Then for some c′ < 1, we can select m = K c and still have ǫ → 0. Plugging this back into Nayak’s bound, we see that asymptotically c ′ ′ K c log(K) = Ω(log(|Fp |)) for |Fp | the size of the function class, seen itself as a function returning the number of unique members in the class on p-bit inputs. In particular, Fp cannot be the set of all Boolean functions, for then log(|Fp |) = K. This shows that no code satisfying the hypotheses of our scheme can implement Toffoli transversally. 12 We now justify our earlier assumptions on the structure of candidate r-fold codes. Suppose an r-fold [[n, 1, d]] QECC could implement a logical Toffoli gate transversally. First note that the tensor decomposition between the logical states must align, or else the restriction of logical Toffoli to one element of the product would unitarily map a pure state to a mixed state. Furthermore, we can think of the QECC criterion in Definition 5 as a diagonal and off-diagonal condition: for all |E| < d, h0L |E|0L i = h1L |E|1L i, h0L |E|1L i = 0. Since the Paulis form an operator basis, we can always assume N that E is an element of the Pauli group. Then, for r-fold codes with logical basis states |iiL = rj=1 |ψij i, this becomes r Y hψik |Ek |ψjk i = cE δij k=1 where E = E1 ⊗ . . . ⊗ Er . Note then that if |ψ0j i 6⊥ |ψ1j i, we can trace out the corresponding subsystem and obtain a code with the same correctable error set on the complement of that system. Furthermore, if r > d, then we can again trace out any r − d subcode subsystems to obtain a code with the same correctable error set on the complement. Both of these observations follow from noticing that these subcodes must themselves satisfy the diagonal condition, hψ0j |E|ψ0j i = hψ1j |E|ψ1j i. It follows from the security proof that if r < d, then the code would satisfy the hypotheses of our scheme and violate the lower bound in Proposition 20. Thus, r = d. Furthermore, logical transversal Toffoli on the entire code must restrict (up to global phase) to a logical transversal Toffoli gate on the subcodes, each of which is 1-fold by definition. Thus, each subcode must itself have distance 1. To summarize, Theorem 14. If a QECC is not a maximally redundant code, then it does not admit a classicalreversible universal transversal gate set. In particular, no such code can implement the Toffoli gate transversally. c Note also that for the scheme in Figure 1, for any m = ω(K 1−( n ) ), ǫ(K) is negligible in p. Summarizing the parameters of the coding scheme: Proposition 15. For any r-fold [[n, 1, d]] quantum error-correcting code C with r < d and with transversal gate set TC , the described protocol is a compact quantum TC -homomorphic encryption ′ scheme with security ǫ = negl(p) for p the input size and with encoding size m = 2pc for some c′ < 1. While this is highly inefficient, we pause to give some intuition for why it suits our purposes. On the one hand, we can envision trivial “hiding” schemes that have encoding length 2p in each bit. Nayak’s bound allows for higher efficiency, roughly demanding that encodings implementing the set of all classical functions on p bits homomorphically must have length at least (2p /p) in each ′ bit. Finally our scheme, with encoding length 2pc for some c′ ∈ (0, 1), is just efficient enough to defeat this bound and allow us to argue Theorem 14. Because these maximally redundant codes have a simple design, if we further assume that they are additive, we can use the additional stabilizer structure to argue directly that they cannot implement logical Toffoli transversally. From this observation, we directly obtain the following. 13 Corollary 16. No additive QECC can implement transversal Toffoli. For proof, see Appendix C. Note that this also follows from the arguments in Appendix D. Our central result follows. Corollary 17. If a QECC is not a non-additive maximally redundant code, then it cannot implement the Toffoli gate transversally. Finally, note that by concatenating an [[n, 1, d]] d-fold code with itself, the code remains d-fold while the distance must increase to at least d2 . Furthermore, if such a code implements Toffoli strongly transversally, then so does its concatenation with itself. As a result, we observe the following. Corollary 18. No QECC can implement strongly transversal Toffoli. 6 Discussion Do there exist non-additive maximally redundant codes that can then implement Toffoli transversally? One can essentially think of these as QECCs formed by concatenating an outer repetition code with a distance 1 inner code that is not a stabilizer subspace. Intuitively, since the inner code is not quantum error-correcting, the code only “spreads out the information in one basis”. More precisely, the inner code only satisfies the diagonal QECC criterion. While this is a less restrictive condition, it still must be “complementary” to the outer code, and this allows us to argue impossibility in the additive case. Unfortunately by comparison, the structure of general non-additive codes is less well-understood – in particular, we know of no examples of such a code. We expect that no QECC can implement Toffoli transversally, and view this exception as a consequence of the lack of structure on general non-additive codes. We hope to resolve this exception in upcoming work. The QHE scheme we have detailed is non-leveled and compact, but highly inefficient. An immediate question would be to refine the security proof, which uses too strong a security demand. It would be most interesting to see if a modified approach can achieve efficient ITS-QHE for transversal gate sets of general quantum error-correcting codes, where the size of the encoding is some fixed polynomial of the input length. There are certain quantitative properties of “nonlocality” in QECCs (see e.g. [3], [34]) that might be helpful in such an endeavor. Following the outline of [29], we could also expect to extend a scheme built on a code with desirable transversal gates to accommodate a constant number of non-transversal gates. Just as one might tailor a QECC for a specific algorithm that makes heavy use of its transversal gate set, one might also tailor an ITS-QHE scheme to homomorphically implement that algorithm. Furthermore, it would be of theoretical interest to find a protocol matching the lower bound implicit in Proposition 20. Another interesting open question is to consider leveled ITS-QHE schemes: allow the client some preprocessing to scale with the size of the circuit. Can this relaxation allow more efficient or universal schemes for polynomial sized circuits, mirroring the computational security case? A first step might be to try to apply the techniques of instantaneous nonlocal computation [35] that proved invaluable in the computationally secure scheme. Moreover, through gauge-fixing, we have ways of converting between codes that together form a universal transversal gate set. Its not clear how to implement such a strategy, since the noisy embedding and non-interactivity present barriers to measuring syndromes, but these elements taken together might be useful in extending the current scheme. 14 Finally, one could ask if there is a correspondence between transversal gates for quantum codes and nontrivial ITS homomorphically-implementable gate sets, based on the “richness” of the function classes they can realize. In particular, [15] asked: what is the maximum size of finite group that can be implemented logically and transversally? Indeed, since the Clifford group on p-qubits 2 is of size at most 22p +3p [30], one could reasonably expect to efficiently implement the Clifford gates homomorphically with information theoretic security, as was done in [29]. We hope that our arguments might extend past classical reversible circuit classes to address this question, although it is unclear how to generalize Nayak’s bound to apply to these general finite subgroups of the unitary group. 7 Acknowledgments The authors would like to thank Cupjin Huang and Fang Zhang for useful discussions, in particular concerning the security proof. They are grateful to Audra McMillan, Anne Broadbent, and Zhengfeng Ji for their comments on an earlier draft of this paper. In particular, we thank Anne for bringing [4] to our attention and pointing out that Proposition 3 follows from the result of that paper and an argument similar to the classical case. They also thank Fernando Pastawksi for pointing us to Lemma 23. This research was supported in part by NSF Awards 1216729, 1318070, and 1526928. 15 References [1] A. Ambainis, D. Leung, L. Mancinska, and M. Ozols. Quantum random access codes with shared randomness, October 2008. arXiv:0810.2937. [2] J. T. Anderson and T. Jochym-O’Connor. Classification of transversal gates in qubit stabilizer codes, 2016. Quantum Information and Computation 16, 0771-0802. [3] L. Arnaud and N. J. Cerf. Exploring pure quantum states with maximally mixed reductions, January 2013. Phys. Rev. A 87, 012319 (2013). [4] A. Baumeler and A. Broadbent. Quantum private information retrieval has linear communication complexity, April 2013. Journal of Cryptology. Volume 28, Issue 1, pp 161-175 (2015). [5] H. Bombin. Gauge color codes: Optimal transversal gates and gauge fixing in topological stabilizer codes, August 2015. New J. Phys. 17 (2015) 083002. [6] S. Bravyi and R. Koenig. Classification of topologically protected gates for local stabilizer codes, 2013. Phys. Rev. Lett. 110, 170503 (2013). [7] M. J. Bremner, R. Jozsa, and D. J. Shepherd. Classical simulation of commuting quantum computations implies collapse of the polynomial hierarchy, August 2010. Proceedings of the Royal Society A, Volume 467, Issue 2126. [8] A. Broadbent. Delegating private quantum computations, June 2015. Canadian Journal of Physics, 2015, 93(9): 941-946. [9] A. Broadbent, J. Fitzsimons, and E. Kashefi. Universal blind quantum computation, 2009. Proceedings of the 50th Annual IEEE Symposium on Foundations of Computer Science (FOCS 2009), pp. 517-526. [10] A. Broadbent and S. Jeffery. Quantum homomorphic encryption for circuits of low T-gate complexity, 2015. In Proceedings of Advances in Cryptology – CRYPTO 2015, pp 609-629. [11] A. Broadbent, Z. Ji, F. Song, and J. Watrous. Zero-knowledge proof systems for QMA, April 2016. Proceedings of the 2016 IEEE 57th Annual Symposium on Foundations of Computer Science (FOCS 2016) pp.31-40. [12] R. Cramer, L. Ducas, C. Peikert, and O. Regev. Recovering short generators of principal ideals in cyclotomic rings. Cryptology ePrint Archive, Report 2015/313, 2015. [13] A. W. Cross. Fault-tolerant quantum computer architectures using hierarchies of quantum error-correcting codes, 2008. PhD Thesis. [14] Y. Dulek, C. Schaffner, and F. Speelman. Quantum homomorphic encryption for polynomialsized circuits, August 2016. CRYPTO 2016: Advances in Cryptology - CRYPTO 2016, pp 3-32. [15] B. Eastin and E. Knill. Restrictions on transversal encoded quantum gate sets, July 2009. Phys. Rev. Lett. 102, 110502. [16] M. Fillinger. Lattice based cryptography and fully homomorphic encryption, 2012. http://homepages.cwi.nl/~schaffne/courses/reports/MaxFillinger_FHE_2012.pdf. 16 [17] K. Fisher, A. Broadbent, L. Shalm, Z. Yan, J. Lavoie, R. Prevedel, T. Jennewein, and K. Resch. Quantum computing on encrypted data, January 2014. Nature Communications 5, Article number: 3074. [18] A. G. Fowler, S. J. Devitt, and C. Jones. Surface code implementation of block code state distillation, January 2013. Scientific Reports 3, 1939. [19] A. G. Fowler, M. Mariantoni, J. M. Martinis, and A. N. Cleland. Surface codes: Towards practical large-scale quantum computation, August 2012. Phys. Rev. A 86, 032324 (2012). [20] C. Gentry. A fully homomorphic encryption scheme, 2009. Ph.D. Thesis, Stanford University. [21] D. Gottesman. Stabilizer codes and quantum error correction, 1997. Caltech Ph.D. Thesis. [22] C. Jones. Composite toffoli gate with two-round error detection, March 2013. Phys. Rev. A 87, 052334. [23] C. Jones. Novel constructions for the fault-tolerant toffoli gate, 2013. Phys. Rev. A 87, 022328. [24] E. Knill and R. Laflamme. Phys.Rev.Lett.84:2525-2528. A theory of quantum error-correcting codes, April 1996. [25] C.-Y. Lai and K.-M. Chung. On statistically-secure quantum homomorphic encryption. In preparation. [26] H. P. Nautrup, N. Friis, and H. J. Briegel. Topological code switching in two dimensions, September 2016. arXiv:1609.08062. [27] A. Nayak. Optimal lower bounds for quantum automata and random access codes, April 1999. FOCS 1999. [28] M. A. Nielsen and I. L. Chuang. Quantum computation and quantum information, 2011. Cambridge University Press New York, NY. [29] Y. Ouyang, S.-H. Tan, and J. Fitzsimons. Quantum homomorphic encryption from quantum codes, August 2015. arXiv:1508.00938. [30] M. Ozols. Notes on the clifford group, July http://home.lu.lv/~sd20008/papers/essays/Clifford%20group%20[paper].pdf. 2008. [31] A. Paetznick and B. W. Reichardt. Universal fault-tolerant quantum computation with only transversal gates and error correction, April 2013. Phys. Rev. Lett. 111, 090505 (2013). [32] F. Pastawksi and B. Yoshida. Fault-tolerant logical gates in quantum error-correcting codes, 2015. Phys. Rev. A 91, 012305. [33] C. Peikert. A decade of lattice cryptography, March 2016. Foundations and Trends in Theoretical Computer Science 10(4):283-424. [34] A. J. Scott. Multipartite entanglement, quantum-error-correcting codes, and entangling power of quantum evolutions, May 2004. Phys. Rev. A 69, 052330. [35] F. Speelman. Instantaneous non-local computation of low T-depth quantum circuits, November 2015. arXiv:1511.02839. 17 [36] S.-H. Tan, J. A. Kettlewell, Y. Ouyang, L. Chen, and J. F. Fitzsimons. A quantum approach to homomorphic encryption, 2016. Sci. Rep. 6, 33467. [37] T. J. Yoder, R. Takagi, and I. L. Chuang. Universal fault-tolerant gates on concatenated stabilizer codes, March 2016. Phys. Rev. X 6, 031039 (2016). [38] L. Yu, C. A. Perez-Delgado, and J. F. Fitzsimons. Limitations on information theoretically secure quantum homomorphic encryption, June 2014. Phys. Rev. A 90, 050303 (2014). [39] B. Zeng, A. Cross, and I. L. Chuang. Transversality versus universality for additive quantum codes, September 2011. IEEE Transactions on Information Theory, Volume: 57, Issue: 9, 6272 - 6284. 18 A A no-go result for ITS-QFHE We now set out to show that efficient ITS-QFHE is impossible. Define for any x ∈ {0, 1}n the state |sx iCM = QHE.Enc(x). Note that for any |sx ihsx |M , we can always purify to a system of size at most 2|M|. So without loss of generality, we may assume that |C| = m, the size of the message sent from Client to Server. Next, by information theoretic security, the state of the encryption on subsystem M must be almost independent of x. Formally, kTrC (|sx ihsx |) − TrC (|s0n ihs0n |)k1 ≤ ǫ for ǫ the security of the scheme. Equivalently, there exists a VxC so that, defining s′x = (VxC ⊗ I M )|s0n ihs0n |(VxC ⊗ I M )† and sx = |sx ihsx |, ks′x − sx k1 ≤ ǫ. Furthermore, for any f ∈ F, we have by the homomorphic property that, abbreviating QHE.Evalf as fev (·) and QHE.Dec(·) as D(·),  C  ′ M CM CM =: ηf,x , I ⊗ fev (sx ) ′ D CM (ηf,x ) = f (x). ′ by replacing sx with s′x in the definition of ηf,x , by contractivity of trace But now, defining ηf,x distance we also have ′ ′ Pr[D CM (ηf,x ) 6= f (x)] ≤ ǫ. To elucidate the underlying QRAC, define the mapping f 7→ ηf,0n , i h ′ ′ ′ . So let D CM′ (V C ⊗ I M′ )(·) denote the query and note that (VxC ⊗ I M )ηf,0n (VxC ⊗ I M )† = ηf,x x for index x of f , thinking of f as a 2n length bit string, with the xth bit defined as f (x). Then we have a (2n , m + m′ , 1 − ǫ)-QRAC for the set of all Boolean functions, where m + m′ is the communication cost of the protocol. We now recall a well-known bound on the efficiency of QRACs [27]. Theorem 19 (Nayak’s Bound). If there exists an (n, m, p)-QRAC, then for H(·) the binary entropy function, m ≥ n(1 − H(p)). So it must be that the total communication cost of the protocol (m + m′ ) ≥ 2n (1 − H(ǫ)). For security, allowing ǫ → 0 and noting that H(ǫ) → 0, we see that the communication cost (m + m′ ) = Ω(2n ). Thus, either the size of the encoding or the evaluated ciphertext must be exponentially long in the input, precluding efficiency. In short, Proposition 20. The communication cost of ITS-QFHE must be exponential in the size of the input. 19 B Proof of Lemma 12 Proof. Expanding in terms of outer products, Tr ((ρ ⊗ I)(I ⊗ σ)) = Tr XXX i,i′ j,j ′ k  ¯ ¯ ai,i′ ,j,j ′ |iihi|∆1 ⊗ |jihj ′ |∆ ⊗ |kihk|∆2 · X X X bm,m′ ,n,n′ |ℓihℓ| ¯1 ∆ ¯2 ′ ∆ ⊗ |mihm′ |∆ ⊗ |nihn | ℓ m,m′ n,n′ = Tr XXX i,i′ n,n′ j,m′ = XXX n i !    ! X ′ ′  ai,i′ ,j,j ′ bj ′ ,m′ ,n,n′  |iihi| ⊗ |jihm | ⊗ |nihn | j′  ai,i,j,j ′ bj ′ ,j,n,n . j,j ′ On the other hand, we have  X X  XX  Tr Tr∆ bm,m′ ,n,n |mihm′ | ai,i,j,j ′ |jihj ′ | ¯ 1 (ρ)Tr∆ ¯ 2 (σ) = Tr i = Tr XXXX i = n XXX i n m,m′ j,j ′ n j,j ′ j′ !  ai,i,j,j ′ bj ′ ,m′ ,n,n |jihm′ | ai,i,j,j ′ bj ′ ,j,n,n j,j ′ !  as claimed. C Proof of Corollary 16 Proof. By Theorem 14, it suffices to consider maximally redundant codes. So suppose, for the sake of contradiction, that an [[n, 1, d]] additive d-fold code could implement Toffoli transversally. Let [·, ·] denote the group commutator. We denote by ¯· states and operations acting on the subcodes, and ˜· those on the full code. We will assume that each subcode is the same, e.g. |ĩi = |īi⊗d , so that we can speak directly about the inner and outer codes. The general argument follows similarly. Since the code is additive, the code distance is the minimal weight logical Pauli operator acting on the code. For any Z̄L , by multiplicativity of the inner product over tensor products,  1 1 |0̃i + |1̃i Z̄L |0̃i − |1̃i = h0̃|Z̄L |0̃i − h0̃|Z̄L |1̃i + h0̃|Z̄L |0̃i − h1̃|Z̄L |1̃i 2 2  n n 1 h0̄|0̄i d + h1̄|1̄i d 6= 0. = 2 Since the outer code has distance d, it follows from the QECC criterion that Z̄L must have weight at least d. Then X̄L must have weight 1, since the underlying inner code has distance 1 by assumption. g L on the Because the outer classical repetition code factors as a tensor product, transversal Toff outer code must restrict (up to a global phase) to transversal ToffL on the inner code. Since we’re now working with multiqubit gates, let GL (i) denote the logical gate for G acting on the ith code block. We can compute directly, 20 [ToffL (1, 2, 3), X̄L (1)] = CX L (2, 3). Furthermore, because ToffL and X̄L are transversal, it follows that CX L has a representative that is also transversal and is supported on the subsystems that support X̄L . By a similar argument [CX L (1, 2), Z̄L (1)] = Z̄L (2) so that Z̄L must also be contained in the subsystems supporting CX L , and in turn X̄L . As we have already observed, the minimal weight of any representative of Z̄L must be at least d, a contradiction as X̄L has a representative of weight 1. D An alternate proof for stabilizer codes Here we offer an alternate proof limiting universal transversal reversible computation for the subclass of stabilizer codes. The arguments here are based off of results from [6] and [32], which we reproduce for completeness. Definition 21. The Clifford hierarchy C is a sequence of gate sets {Ck }k≥1 defined recursively by Ck = {U : U C1 U † ⊆ Ck−1 }, where we define C1 to be the Pauli group. Note that C2 is the Clifford group, and Ck fails to be a group for k > 2. Further note that reversible circuits saturate the Clifford hierarchy (and in fact can lie outside it entirely) by the gate C k X, the k-controlled bit-flip gate, which lies in Ck+1 . Toffoli is simply C 2 X, and so lies in the third level of the Clifford hierarchy. We next recall the stabilizer cleaning lemma, which can be found in [6]. Lemma 22. Let S be a stabilizer code, and let R be any subset of physical qubits of the code such that any logical operator supported on R acts trivially on S. Then, for any logical operator UL , there exists a representative of UL supported on Rc . We call such subsets R cleanable. Equipped with the cleaning lemma, we can now summarize the following lemma from [32]. Lemma 23. Let S be a stabilizer code and let {R0 , . . . , Rk } be a set of cleanable subsets of the physical qubits comprising S. Let U be a logical operator supported on ∪ki=0 Ri such that U is transversal with respect to the Ri . Then, UL ∈ Ck . Proof. We proceed by induction on k. In the base case, we have a logical operator U supported on cleanable subsets R0 ∪ R1 . Let P be any logical Pauli operator cleaned off of R1 , and let [·, ·] denote the group commutator. Since in a stabilizer code the logical Pauli operators are transversal, we have Supp([U, P ]) ⊆ R0 , which by cleanability implies that [UL , PL ] = cIL . Since this is true for any PL , it must be that UL ∈ C1 . Similarly, suppose U is supported on ∪ki=0 Ri . Then, cleaning any logical Pauli P off of Rk , k−1 we see that Supp([U, P ]) ⊆ ∪i=0 Ri . By our inductive hypothesis, [UL , PL ] ⊆ Ck−1 , which implies † UL PL UL ∈ Ck−1 for any logical Pauli PL . Thus UL ∈ Ck , completing the proof. This argument generalizes to subsystem codes, and we refer the reader [32] for a more complete description. As a consequence we obtain the following. 21 Corollary 24. No erasure-correcting stabilizer code can implement a classical reversible universal transversal gate set. Proof. Partition the code block into single subsystem subsets {R1 , . . . , Rn } where n is the length of the code. Then, since the code is erasure-correcting, any logical operator supported on a single subsystem must act trivially on the codespace, and so these subsets are cleanable. By the lemma, any transversal logical gate must lie in Cn . Since reversible circuits saturate C, they cannot be logically transversally implementable. 22
7cs.IT
Optimal Densification for Fast and Accurate Minwise Hashing Anshumali Shrivastava Rice University, Houston, TX, 77005, USA arXiv:1703.04664v1 [cs.DS] 14 Mar 2017 Abstract Minwise hashing is a fundamental and one of the most successful hashing algorithm in the literature. Recent advances based on the idea of densification (Shrivastava & Li, 2014a;c) have shown that it is possible to compute k minwise hashes, of a vector with d nonzeros, in mere (d + k) computations, a significant improvement over the classical O(dk). These advances have led to an algorithmic improvement in the query complexity of traditional indexing algorithms based on minwise hashing. Unfortunately, the variance of the current densification techniques is unnecessarily high, which leads to significantly poor accuracy compared to vanilla minwise hashing, especially when the data is sparse. In this paper, we provide a novel densification scheme which relies on carefully tailored 2-universal hashes. We show that the proposed scheme is variance-optimal, and without losing the runtime efficiency, it is significantly more accurate than existing densification techniques. As a result, we obtain a significantly efficient hashing scheme which has the same variance and collision probability as minwise hashing. Experimental evaluations on real sparse and highdimensional datasets validate our claims. We believe that given the significant advantages, our method will replace minwise hashing implementations in practice. ANSHUMALI @ RICE . EDU speech, and text are quite popular (Broder, 1997; Fetterly et al., 2003). Enriching features with co-occurrence information leads to blow up in the dimensionality. 5-grams are common for text representations. With vocabulary size of 106 , 5-grams representation requires dimensionality of 1030 . Representing genome sequences with features consisting of 32-contiguous characters (or higher) (Ondov et al., 2016) leads to around 432 = 264 dimensions. To deal with the overwhelming dimensionality, there is an increased emphasis on the use of hashing algorithms, such as minwise hashing. Minwise hashing provides a convenient way to obtain a compact representation of the data, without worrying about the actual dimensionality. These compact representations are directly used in large scale data processing systems for a variety of tasks. Minwise hashing is defined for binary vectors. Binary vectors can also be equivalently viewed as sets, over the universe of all the features, containing only attributes corresponding to the non-zero entries. Minwise hashing belongs to the Locality Sensitive Hashing (LSH) family (Broder et al., 1998; Charikar, 2002). The method applies a random permutation (or random hash function) π : Ω → Ω, on the given set S ⊂ Ω, and stores the minimum value after the permutation mapping. Formally, hπ (S) = min(π(S)). Given sets S1 and S2 , it can be shown by elementary probability arguments that P r(hπ (S1 ) = hπ (S2 )) = 1. Introduction and Motivation Recent years have witnessed a dramatic increase in the dimensionality of modern datasets. (Weinberger et al., 2009) show dataset with 16 trillion (1013 ) unique features. Many studies have shown that the accuracy of models keeps climbing slowly with exponential increase in dimensionality. Large dictionary based representation for images, (1) |S1 ∩ S2 | = R. |S1 ∪ S2 | (2) The quantity R= |S1 ∩ S2 | a = , |S1 ∪ S2 | f1 + f2 − a (3) is the well known Jaccard Similarity (or resemblance) R which is the most popular similarity measure in information retrieval applications (Broder, 1997). The probability of collision (equality of hash values), under minwise hashing, is equal to the similarity of interest Optimal Densification for Fast and Accurate Minwise Hashing R. This particular property, also known as the LSH property (Indyk & Motwani, 1998; Charikar, 2002), makes minwise hash functions hπ suitable for creating hash buckets, which leads to sublinear algorithms for similarity search. Because of this same LSH property, minwise hashing is a popular indexing technique for a variety of large-scale data processing applications, which include duplicate detection (Broder, 1997; Henzinger, 2006), all-pair similarity (Bayardo et al., 2007), temporal correlation (Chien & Immorlica, 2005), graph algorithms (Buehrer & Chellapilla, 2008; Chierichetti et al., 2009; Najork et al., 2009), and more. It was recently shown that the LSH property of minwise hashes can be used to generate kernel features for large-scale learning (Li et al., 2011). Minwise hashing is known to be theoretical optimal in many scenarios (Bavarian et al., 2016). Furthermore, it was recently shown to be provably superior LSH for angular similarity (or cosine similarity) compared to widely popular Signed Random Projections (Shrivastava & Li, 2014b). These unique advantages make minwise hashing arguably the strongest hashing algorithm both in theory and practice. Hashing Cost is Bottleneck: The first step of algorithms relying on minwise hashing is to generate, some large enough, k minwise hashes (or fingerprints) of the data vectors. In particular, for every data vector x, hi (x) ∀i ∈ {1, 2, ..., k} is repeatedly computed with independent permutations (or hash functions). These k hashes are used for a variety of data mining tasks such as cheap similarity estimation, indexing for sub-linear search, kernel features for large scale learning, etc. Computing k hashes of a vector x with traditional minwise hashing requires O(dk) computation, where d is the number of non-zeros in vector x. This computation of the multiple hashes requires multiple passes over the data. The number of required hashes typically ranges from few hundreds to several thousand. For example, the number of hashes required by the famous LSH algorithm is O(nρ ) which grows with the size of the data. (Li, 2015) showed the necessity of around 4000 hashes per data vector in large-scale learning. Hashing time is the main computational and resource bottleneck step in almost all applications using minwise hashing. Other Related Fast Sketches are not LSH: Two notable techniques for estimating Jaccard Similarity are: 1) bottom-k sketches and 2) one permutation hashing (Li et al., 2012). Although these two sketches are cheap to compute, they do not satisfy the key LSH property and therefore are unsuitable for replacing minwise hashing (Shrivastava & Li, 2014a;c). There are also substantial empirical evidence that using these (non-LSH) sketches for indexing leads to a drastic bias in the expected behavior, leading to poor accuracy. The Idea of “Densified” One Permutation Hashing: Re- cently, (Shrivastava & Li, 2014a) showed a technique for densifying sparse sketches from one permutation hashing which provably removes the bias associated with one permutation hashing. Please see Section 3.3 for details. This was the first success in creating efficient hashing scheme which satisfies the LSH property analogous to minwise hashing and at the same time the complete process only requires O(d + k) computations instead of the traditional bottleneck of O(dk). Having such an efficient scheme directly translates into algorithmic improvements for a variety of machine learning and data mining tasks. Current Densification is Inaccurate For Very Sparse Datasets: The densification process although efficient and unbiased was shown to have unnecessarily higher variance. It was shown in (Shrivastava & Li, 2014c) that the traditional “densification” lacks sufficient randomness. It was further revealed that densification could be provably improved by using k extra random bits. The improved scheme has reduced variance, and it retained the computational efficiency, see (Shrivastava & Li, 2014c) for more details. An improved variance was associated with a significant performance gain in the task of near-neighbor search. In this work, we show that even the improved densification scheme is far from optimal. The findings of (Shrivastava & Li, 2014c) leaves an open curiosity: What is the best variance that can be achieved with “densification” without sacrificing the running time? We close this by providing a variance-optimal scheme. Our Contributions: We show that the existing densification schemes, for fast minwise hashing, are not only suboptimal but, worse, their variances do not go to zero with increasing number of hashes. The variance with an increase in the number of hashes converges to a positive constant. This behavior implies that increasing the number of hashes after a point will lead to no improvement, which is against the popular belief that accuracy of randomized algorithms keeps improving with an increase in the number of hashes. To circumvent these issues we present a novel densification scheme which has provably superior variance compared to existing schemes. We show that our proposal has the optimal variance that can be achieved by densification. Furthermore, the variance of new methodology converges to zero with an increase in the number of hashes, a desirable behavior absent in prior works. Our proposal makes novel use of 2-universal hashing which could be of independent interest in itself. The benefits of improved accuracy come with no loss in computational requirements, and our scheme retains the running time efficiency of the densification. We provide rigorous experimental evaluations of existing solutions concerning both accuracy and running time efficiency, on real high-dimensional datasets. Our experiments validate all our theoretical claims and show significant im- Optimal Densification for Fast and Accurate Minwise Hashing provement in accuracy, comparable to minwise hashing, with a significant gain in computational efficiency. 2. Important Notations and Concepts Equation 2 (i.e. the LSH Property) leads to an estimator of Jacard Similarity R, using k hashes, defined by: R̂ = k 1X 1(hi (S1 ) = hi (S2 )). k i=1 (4) Here 1 is the indicator function. In the paper, by variance, we mean the variance of the above estimator. Notations like V ar(h+ ), will mean the variance of the above estimator when the h+ is used as the hash function. [k] will denote the set of integers {1, 2, ..., k}. n denotes the number of points (samples) in the dataset. D will be used for dimensionality. We will use min{S} to denote the minimum element of the set S. A permutation π : Ω → Ω applied to a set S is another set π(S), where x ∈ S if and only if π(x) ∈ π(S). Our hashing will generate k hashes hi i ∈ {1, 2, ..., k}, generally from different bins. Since they all have same distribution and properties we will drop subscripts. We will use h and h+ to denote the hashing schemes of (Shrivastava & Li, 2014a) and (Shrivastava & Li, 2014c) respectively. 3. Background: Fast Minwise Hashing via Densification 3.1. 2-Universal Hashing Definitions: A randomized function huniv : [l] → [k] is 2-universal if for all, i, j ∈ [l] with i 6= j, we have the following property for any z1 , z2 ∈ [k] P r(huniv (i) = z1 and huniv (j) = z2 ) = 1 k2 (5) (Carter & Wegman, 1977) showed that the simplest way to create a 2-universal hashing scheme is to pick a prime number p ≥ k, sample two random numbers a, b and compute huniv (x) = ((ax + b) mod p) mod k 3.2. One Permutation Hashing and Empty Bins It was shown in (Li et al., 2012; Dahlgaard et al., 2015) that instead of computing the global minimum in Equation 2, i.e., h(S) = min(π(S)), an efficient way to generate k sketches, using one permutation, is to first bin the range space of π, i.e. Ω, into k disjoint and equal partitions followed by computing minimum in each bin (or partition). Let Ωi denote the ith partition of the range space of π, i.e. Ω. Formally, the ith one permutation hashes (OPH) of a set S is defined as ( min{π(S) ∩ Ωi }, if {π(S) ∩ Ωi } = 6 φ H hOP (S) = i E, otherwise. (6) An obvious computational advantage of this scheme is that it is likely to generate many hash values, at most k, and only requires one permutation π and only pass over the sets (or binary vectors) S. It was shown that for any two sets S1 and S2 we have a conditional collision probability similar to minwise hashing.  H H Let Ei = 1 hOP (S2 ) = hOP (S2 ) = E i i (7)  Pr = Ei = 0 = R (8)  H H However, P r hOP (S1 ) = hOP (S2 ) Ei = 1 6= R i i (9) H hOP (S1 ) i H hOP (S2 ) i Here Ei is an indicator random variable of the event that the ith partition corresponding to both S1 and S2 are empty. See Figure 1 Any bin has a constant chance of being empty. Thus, there is a positive probability of the event {Ei = 1}, for any given pair S1 and S2 and hence for large datasets (big n) a constant fraction of data will consist of simultaneously empty bins (there are n2 × k trials for the bad event {Ei = 1} to happen). This fraction further increases significantly with the sparsity of the data and k, as both sparsity and k increases the probability of the bad event {Ei = 1}. See Table 4 for statistics of empty bins on real scenarios. Unfortunately, whenever the outcome of the random permutation leads to simultaneous empty bins, i.e. event Ei = 1, the LSH Property is not valid. In fact, there is not sufficient information present in the simultaneous empty partitions for any meaningful statistics. Hence, one permutation hashing cannot be used as an LSH. Simple heuristics of handling empty bins as suggested in (Shrivastava & Li, 2014a) leads to a significant bias and it was shown both theoretically and empirically that this bias leads to significant deviation from the expected behavior of one permutation hashing when compared with minwise hashing. Thus, one permutation hashing although computationally lucrative is not a suitable replacement for minwise hashing. 3.3. The Idea of Densification In (Shrivastava & Li, 2014a), the authors proposed “densification” or reassignment of values to empty bins by reusing the information in the non-empty bins to fix the bias of one permutation hashing. The overall procedure is quite simple. Any empty bin borrows the values of the clos- Optimal Densification for Fast and Accurate Minwise Hashing 𝑺𝟏 = {𝟏𝟎, 𝟑, 𝟏𝟖, 𝟏, 𝟐𝟏, 𝟐, 𝟏𝟐, 𝟐𝟐} , 𝑺𝟐 = {𝟏𝟎, 𝟏𝟓, 𝟑, 𝟔, 𝟏𝟖, 𝟐𝟏, 𝟕} 𝑺𝟏 , 𝑺𝟐 ∈ 𝛀 = {𝟏, 𝟐, 𝟑, … , 𝟐𝟑}. 𝑳𝒆𝒕 𝑹𝒂𝒏𝒅𝒐𝒎 𝝅: 𝛀 → 𝛀 leads to 𝛑(𝟏𝟎) = 𝟓, 𝝅(𝟏𝟓) = 6, 𝝅(𝟑) = 𝟕, 𝝅(𝟔) = 𝟏𝟐, 𝝅(𝟏𝟖) = 𝟏𝟒, 𝝅(𝟏) = 𝟏𝟓, 𝝅(𝟐𝟏) = 𝟏𝟔, 𝝅(𝟕) =17, 𝝅(𝟐) = 𝟏𝟖, 𝝅(𝟏𝟐) = 𝟐𝟏, 𝝅(𝟐𝟐) = 𝟐𝟐 𝝅(𝑺𝟏 ) = {𝟓, 𝟕, 𝟏𝟒, 𝟏𝟓, 𝟏𝟔, 𝟏𝟖, 𝟐𝟏, 𝟐𝟐} 𝒎𝒊𝒏(𝝅(𝑺𝟏 )) = 𝟓 𝝅(𝑺𝟐 ) = {𝟓, 𝟔, 𝟕, 𝟏𝟐, 𝟏𝟒, 𝟏𝟔, 𝟏𝟕} 𝒎𝒊𝒏(𝝅(𝑺𝟐 )) = 𝟓 Partition Range 𝛀 into 6 Bins: [0,3],[4,7], [8,11],[12,15],[16,19],[20,23] One Permutation Hashing: GET MIN IN BIN (E if EMPTY BIN) 𝒉𝑶𝑷𝑯 (𝑺𝟏 ) = 𝒉 𝑶𝑷𝑯 (𝑺 𝟐) = 𝑬, 𝟓, 𝑬, 𝟏𝟒, 𝟏𝟔, 𝟐𝟏 𝑬, 𝟓, 𝑬, 𝟏𝟐, 𝟏𝟔, 𝑬 Densification: REASSIGN FROM RIGHT (CIRCULAR) 𝒉(𝑺𝟏 ) = 𝟓, 𝟓, 𝟏𝟒, 𝟏𝟒, 𝟏𝟔, 𝟐𝟏 𝒉(𝑺𝟐 ) = 𝟓, 𝟓, 𝟏𝟐, 𝟏𝟐, 𝟏𝟔, 𝟓 Improved Densification: REASSIGN FROM LEFT OR RIGHT (CIRCULAR) DEPENDING ON RANDOM BITS 0/1. randbits = 0 1 1 0 1 0 = 𝟐𝟏, 𝟓, 𝟏𝟒, 𝟏𝟒, 𝟏𝟔, 𝟐𝟏 𝒉+ (𝑺𝟐 ) = 𝟏𝟔, 𝟓, 𝟏𝟐, 𝟏𝟐, 𝟏𝟔, 𝟏𝟔 𝒉 + (𝑺 𝟏) Figure 1. Illustration of One Permutaion Hashing (OPH) and the two existing Densification Schemes of (Shrivastava & Li, 2014a;c). Densification simply borrows the value from nearby empty bins. Different sets Si with have different pattern of empty/nonempty bins. Since the pattern is random, the process is similar to random re-use of unbiased values, which satisfies LSH property in each bin (Shrivastava & Li, 2014c). est non-empty bins towards the circular right (or left)1 . See Figure 1 for an illustration. Since the positions of empty and non-empty bins were random, it was shown that densification (or reassignment) was equivalent to a stochastic reselection of one hash from a set of existing informative (coming from non-empty bins) hashes which have the LSH property. This kind of reassignment restores the LSH property and collision probability for any two hashes, after reassignment, is exactly same as that of minwise hashing. The densification generates k hashes with the required LSH Property and only requires two passes over the one permutation sketches making the total cost of one permutation 1 In (Shrivastava & Li, 2014a) they also needed an offset because the value of a hash in any bin was always reset between [0,k]. We do not need the offset if we use the actual values of π(S). hashing plus densification O(d + k). This was a significant improvement over O(dk) with classical minwise hashing. O(d + k) led to an algorithmic improvement over randomized algorithms relying on minwise hashing, as hash computation cost is bottleneck step in all of them. 3.4. Lack of Randomness in Densification It was pointed out in (Shrivastava & Li, 2014c) that the densification scheme of (Shrivastava & Li, 2014a) has unnecessarily high variance. In particular, the probability of two empty bins borrowing the information of the same nonempty bin was significantly higher. This probability was due to poor randomization (load balancing) which hurts the variance. (Shrivastava & Li, 2014c) showed that infusing more randomness in the reassignment process by utilizing k extra random bits provably improves the variance. See Figure 1 for an example illustration of the method. The running time of the improved scheme was again O(d + k) for computing k hashes. This improvement retains the required LSH property, however this time with improved variance. An improved variance led to significant savings in the task of near-neighbor search on real sparse datasets. 4. Issues with Current Densification Our careful analysis reveals that the variance, even with the improved scheme, is still significantly higher. Worse, even in the extreme case when we take k → ∞ the variance converges to a positive constant rather than zero, which implies that even with infinite samples, the variance will not be zero. This positive limit further increases with the sparsity of the dataset. In particular, we have the following theorem about the limiting variances of existing techniques: Theorem 1 Give any two finite sets S1 , S2 ∈ Ω, with A = |S1 ∪ S2 | > a = |S1 ∩ S2 | > 0 and |Ω| = D → ∞. The limiting variance of the estimators from densification and improved densification when k = D → ∞ is given by:   A−a a > 0 (10) lim V ar(h) = k→∞ A A(A + 1)   a 3(A − 1) + (2A − 1)(a − 1) a >0 lim V ar(h+ ) = − k→∞ A 2(A + 1)(A − 1) A (11) This convergence of variance to a constant value, despite infinite samples, of the existing densification is also evident in our experimental findings (see Figure 3) where we observe that the MSE (Mean Square Error) curves go flat with increasing k. Similar phenomenon was also reported in (Shrivastava & Li, 2014c). It should be noted that for classical minwise hashing the variance is R(1−R) → 0 for k any pair S1 and S2 . Thus, current densification, although fast, loses significantly in terms of accuracy. We remove this issue with densification. In particular, we show in The- Optimal Densification for Fast and Accurate Minwise Hashing Example of Poor Load Balancing 𝒉𝑶𝑷𝑯 (𝑺𝟏 ) = 𝟓, 𝑬, 𝑬, 𝑬, 𝟏𝟔, 𝟐𝟏, 𝟐𝟓 𝒉𝑶𝑷𝑯 (𝑺𝟐 ) = 𝟓, 𝑬, 𝑬, 𝑬, 𝟏𝟕, 𝟐𝟏, 𝟐𝟓 Densification: ONLY 1 INFORMATIVE VALUE USED 𝒉(𝑺𝟏 ) = 𝟓, 𝟏𝟔, 𝟏𝟔, 𝟏𝟔, 𝟏𝟔, 𝟐𝟏, 𝟐𝟓 𝒉(𝑺𝟐 ) = 𝟓, 𝟏𝟕, 𝟏𝟕, 𝟏𝟕, 𝟏𝟕, 𝟐𝟏, 𝟐𝟓 Improved Densification: ONLY 2 INFORMATIVE VALUES USED randbits = 𝒉(𝑺𝟏 ) = 0 0 1 0 𝟓, 𝟏𝟔, 𝟓, 𝟏𝟔, 1 𝟏𝟔, 0 𝟐𝟏, 1 𝟐𝟓 𝒉(𝑺𝟐 ) = 𝟓, 𝟏𝟕, 𝟓, 𝟏𝟕, 𝟏𝟕, 𝟐𝟏, 𝟐𝟓 Figure 2. Illustration of Poor Load Balancing in the existing Densification strategies. The re-assignment of bins is very local and its not uniformly distributed. Thus, we do not use the information in far off non-empty bins while densification. orem 6 that the limiting variance of the proposed optimal densification goes to 0. Our experimental findings suggests that the new variance is very close to the classical minwise hashing. In addition, the new densification retains the speed of existing densified hashing thereby achieving the best of the both worlds. 5. Optimal Densification We argue that even with the improved densification there is not enough randomness (or load balancing) in the reassignment process which leads to reduced variance. For given set S, the densification process reassigns every empty bin with a value from one of the existing non-empty bins. Note, the identity of empty and non-empty bins are different for different sets. To ensure the LSH property, the re-assignment should be consistent for any given pair of sets S1 and S2 . In particular, as noted in (Shrivastava & Li, 2014a), given any arbitrary pair S1 and S2 , whenever any given bin i is simultaneously empty, i.e. Ei = 1, the reassignment of this bin i should mimic the collision probability of one of the simultaneously non-empty bin j with Ej = 0. An arbitrary reassignment (or borrow) of values will not ensure this consistency across all pairs. We would like to point out that the reassignment of S1 has no idea about S2 or any other object in the dataset. Thus, ensuring the consistency is non-trivial. Although the current densification schemes achieve this consistency by selecting the nearest non-empty bin (as shown in (Shrivastava & Li, 2014c)), they lack sufficient randomness. 5.1. Intuition: Load Balancing In Figure 2, observe that if there are many contiguous non-empty bins (Bins 2, 3 and 4), then with densification schemes h, all of them are forced to borrow values from the same non-empty bin (Bin 5 in the example). Even though there are other informative bins (Bins 1, 6 and 7), their information is never used. This local bias increases the probability (p) that two empty bins get tied to the same information, even if there are many other informative non-empty bins. Adding k random bits improves this to some extent by allowing load sharing between the two ends instead of one (Bins 1 and 5 instead of just 5). However, the load balancing is far from optimal. The locality of information sharing is the main culprit with current densification schemes. Note, the poor load balancing does not change the expectation but affects the variance significantly. For any given pairs of vectors S1 and S2 , let m be the number of simultaneous non-empty bins (out of k), i.e. Pk i=1 Ei = k − m. Note, m is a random variable whose value is different for every pair and depends on the outcome of random π. Formally, the variance analysis of (Shrivastava & Li, 2014c) reveals that the probability that any two simultaneous empty bin p and q (Ep = Eq = 1) reuses the 2 with the densification scheme h. same information is m+1 1.5 This probability was reduced down to m+1 with h+ by utilizing k extra random bits to promote load balancing. 1.5 is not quite perfect load balancing. In a perp = m+1 fect load balancing with m simultaneous non-empty bins, the probability of two empty bins hitting the same non1 empty bins is at best p = m . Can we design a densification scheme which achieves this p while maintaining the consistency of densification and at the same time does not hurt the running time? It is not clear if such a scheme even exists. We answer this question positively by constructing a densification method with precisely all the above requirements. 1 Furthermore we show that achieving p = m is sufficient for having the limiting variance of zero. 5.2. Simple 2-Universal Hashing Doesn’t Help To break the locality of the information reuse and allow a non-empty bin to borrow information from any other far off bin consistently, it seems natural to use universal hashing. The hope is to have a 2-universal hash function (Section 3.1) huniv : [k] → [k]. Whenever a bin i is empty, instead of borrowing information from neighbors, borrow information from bin huniv (i). The hash function allows consistency across any two S1 and S2 hence preserves LSH property. The value of huniv (i) is uniformly distributed, so any bin is equally likely. Thus, it seems to break the locality on the first thought. If huniv (i) is also empty then we continue using huniv (huniv (i)) until we reach a non-empty bins whose value we re-use. One issue is that of cycles. If i = huniv (i) (which has k1 chance), then this creates a cycle and the assign- Optimal Densification for Fast and Accurate Minwise Hashing ment will go into infinite loop. A cycle can even occur if huniv (huniv (i)) = i with both i and huniv (i) being empty. Note, the process runs until it finds a non-empty bin. However, cycles are not just our concern. Even if we manage to get away with cycles, this scheme does not provide the required load balancing. i which is independent of the huniv (j, attemptj ) due to 2-universality of the hash function huniv . Thus, the probability that any two empty bins reuse the information of the 1 same non-empty bin is m A careful inspection reveals that there is a very significant chance that both i and huniv (i) to be empty for any given set S. Observe that if i and huniv (i) are both empty, then we are bound to reuse the information of the same nonempty bin for both empty bins i and huniv (i). We should note that we have no control over the positions of empty and non-empty bins. In fact, if no cycles happen then it is not difficult to show that the simple assignment using universal hashing is equivalent to the original densification h with the order of bins reshuffled using huniv (.). It has worse variance than h+ . We denote the final k hashes generated by the proposed densification scheme of Algorithm 1 using h∗ (* for optimality). Formally, with the optimal densification h∗ , we have the following: 5.3. The Fix: Carefully Tailored 2-Universal Hashing Algorithm 1 Optimal Densification input k One Permutation Hashes hOP H [ ] of S. input huniv (., .) Initialize h∗ [ ] = 0 for i = 1 to k do if OP H[i] 6= E then h∗ [i] = hOP H [i] else attempt = 1 next = huniv (i, attempt) while hOP H [next] 6= E do attempt + + next = huniv (i, attempt) end while h∗ [i] = hOP H [next] end if end for RETURN h∗ [ ] It turns out that there is a way to use universal hashing that ensures no cycles as well as optimal load balancing. We describe the complete process in Algorithm 1. The key is to use a 2-universal hashing huniv : [k] × N → [k] which takes two arguments: 1) The current bin id that needs to be reassigned and 2) the number of failed attempt made so far to reach a non-empty bin. This second argument ensures no infinite loops as it changes with every attempt. So even if we reach the same non-empty bin back (cycle), the next time we will visit a new set of bins. Also, even if both i and j = huniv (i, attempti ) are empty, i and j are not bound to end to the same non-empty bin. This is because in the next attempt we seek bin value huniv (i, attempti + 1) for 5.4. Analysis and Optimality Theorem 2  |S1 ∩ S2 | P r h∗ (S1 ) = h∗ (S2 ) = =R |S1 ∩ S2 | RR̄ R R + A 2 + B 2 − R2 V ar(h∗ ) = k k k lim V ar(h∗ ) = 0 k→∞ (12) (13) (14) where Nemp is the number of simultaneous empty bins between S1 and S2 and the quantities A and B are given by   Nemp (Nemp − 1) A = E 2Nemp + k − Nemp  B = E (k − Nemp )(k − Nemp − 1) + 2Nemp (k − Nemp − 1)  Nemp (Nemp − 1)(k − Nemp − 1) + k − Nemp Using the formula for P r(Nemp = i) from (Li et al., 2012), we can precisely compute the theoretical variance. The interesting part is that we can formally show that the variance of the proposed scheme is strictly superior compared to the densification scheme with random bits improvements. Theorem 3 V ar(h∗ ) ≤ V ar(h+ ) ≤ V ar(h) (15) Finally, due to optimal pairwise load balancing the variance is the best possible we can hope with independent reassignments. Formally, we have Theorem 4 Among all densification schemes, where the reassignment process for bin i is independent of the reassignment process of any other bin j, Algorithm 1 achieves the best possible variance. Note: The variance can be reduced if we allow correlations in the assignment process, for example if we force bin i and bin j to not pick the same bin during reassignments, this will reduce p beyond the perfectly random load balancing 1 . However, such tied reassignment will require value of m more memory and computations for generating structured hash functions. Optimal Densification for Fast and Accurate Minwise Hashing Pair 1 Pair 2 Pair 3 Pair 4 Pair 5 Pair 6 Pair 7 Pair 8 Sim R 0.94 0.87 0.74 0.61 0.54 0.47 0.20 0.02 |S1 | 208 47 91 15 419 76 264 655 |S2 | 196 41 67 14 232 36 182 423 Table 1. Statistics of Pairs vectors (binary) with their Similarity and Sparsity (non-zeros). 5.5. Running Time We show that the expected running time of our proposal, including all constants, is very similar to the running time of the existing densification schemes. Given set S with |S| = d, we are interested in computing k hash values. The first step involves computing k one permutation hashes (or sketches) which only requires a single pass over the elements of S. This takes max{d, k} ≤ d + k time. Now the densification Algorithm 1 requires a for loop of size k and within each for loop, if the bin is empty, it requires an additional while loop. Let Nemp be the numk−Nemp ber of empty bins, and therefore is the probability k that the while loop will terminate in one iteration (next is not empty). Therefore, the expected number of iteration that each while loop will run is a binomial random variable with expectation k−Nkemp . Thus, the expected running time of the algorithm is given by k k − Nemp Nemp ≤ d + (r + 2)k where r = Nnot−emp E[Running Time] = d + 2k − Nemp + Nemp The quantity r, which is the ratio of number of empty bins to the number of non-empty bins, is generally very small. It is rarely more than 2 to 3 in practice. Observe that randomly throwing d items into k bins, the expected number d of empty bins is E[Nemp ] ≈ k(1 − k1 )d ≈ ke− k . Which −d/k e makes r ≈ 1−e −d/k . The number of sketches is usually of the order of non-zeros. Even for very good concentration, the size of the sketches k is rarely much larger than the size of the set d. Even when k is 4 times d the value of r is approximately 3.5. Thus, the quantity r is negligible. It should be further noted that the implementation cost of densification scheme h+ is d + 4k which in not very different from the cost of our proposal. 6. Evaluations Our aim is to verify the theoretical claims of these papers empirically. We show that our proposal can replace minwise hashing for all practical purposes. To establish that, we focus on experiments with the following objectives: 1. Verify that our proposed scheme has a significantly better accuracy (variance) than the existing densification schemes. Validate our variance formulas. 2. Empirically quantify the impact of optimal variance in practice. How does this quantification change with similarity and sparsity? Verify that the proposal has accuracy close to vanilla minwise hashing. 3. Verify that there is no impact on running time of the proposed scheme over existing densification schemes, and our proposal is significantly faster than vanilla minwise hashing. Understand how the running time changes with change in sparsity and k? 6.1. Accuracy For objectives 1 and 2, we selected 9 different word pairs embedding, generated from new20 corpus, with varying level of similarity and sparsity. We use the popular termdocument vector representation for each word. The statistics of these word vector pairs are summarized in Table 1 For each word pairs, we generated k hashes using three different schemes: 1) Densification h, 2) Improved Densification h+ and the proposed densification h∗ (Algorithm 1). Using these hashes, we estimate the Jaccard similarity (Equation 4). We plot the mean square error (MSE) with varying the number of hashes. Since the process is randomized, we repeat the process 5000 times, for every k, and report the average over independent runs. We report all integer values of k in the interval [1, 214 ]. It should be noted that since all three schemes have the LSH Property, the bias is zero and hence the MSE is the theoretical variance. To validate our variance formula, we also compute and plot the theoretical value of the variance (Equation 19) of the optimal scheme. Also, to understand how all these fast methodologies compare with the accuracy of vanilla minwise hashing we also plot the theoretical . variance of minwise hashing which is R(1−R) k From the results in Figure 3, we can conclude. Conclusion 1: The proposed densification is significantly more accurate, irrespective of the choice of sparsity and similarity, than the existing densification schemes especially for large k. Note the y-axis of plots is on log scale, so the accuracy gains are drastic. Conclusion 2: The gains with optimal densification is more for sparse data. Conclusion 3: The accuracy of optimal densification is very close the accuracy of costly minwise hashing. Optimal Densification for Fast and Accurate Minwise Hashing 10 -4 10 -5 Pair 1: R=0.94 10 -6 10 0 10 1 10 2 10 3 10 4 10 10 10 -2 10 -3 10 -4 10 -5 Vanilla Improved Proposed Prop-Theory MinHash-Theory 10 -6 10 0 5 Num of Hashes (k) 10 0 10 10 -2 MSE MSE 10 10 -3 10 -4 10 -5 10 -6 10 0 10 2 10 10 -4 10 -5 Vanilla Improved Proposed Prop-Theory MinHash-Theory 10 -6 10 0 5 10 4 10 5 10 -2 10 -3 10 Vanilla Improved Proposed Prop-Theory MinHash-Theory Num of Hashes (k) 10 0 10 1 10 2 10 10 3 10 4 10 -5 10 -6 10 0 5 10 5 10 -3 10 Vanilla Improved Proposed Prop-Theory MinHash-Theory Num of Hashes (k) 10 1 10 2 10 1 10 2 10 3 10 4 10 5 10 0 Pair 8: R=0.08 Vanilla Improved Proposed Prop-Theory MinHash-Theory 10 -1 10 -2 10 -3 10 -4 10 -5 -6 10 0 Vanilla Improved Proposed Prop-Theory MinHash-Theory Num of Hashes (k) 10 -2 10 -5 10 4 10 -3 10 -4 Pair 7: R=0.2 -1 10 -4 10 3 10 2 10 0 10 -6 10 1 10 -2 Num of Hashes (k) Pair 6: R=0.47 10 -5 10 3 10 4 -1 10 -4 Vanilla Improved Proposed Prop-Theory MinHash-Theory 10 1 10 3 10 -3 Pair 4: R=0.61 10 -1 10 -2 Num of Hashes (k) Pair 5: R=0.54 -1 10 2 MSE 10 0 10 1 10 0 Pair 3: R=0.74 -1 MSE 10 -3 10 0 Pair 2: R=0.87 -1 MSE 10 -2 10 MSE MSE 10 10 0 Vanilla Improved Proposed Prop-Theory MinHash-Theory -1 MSE 10 0 10 3 10 4 10 5 10 -6 10 0 Num of Hashes (k) 10 1 10 2 10 3 10 4 10 5 Num of Hashes (k) Figure 3. Average MSE in Jaccard Similarity Estimation with the Number of Hash Values (k). Estimates are averaged over 5000 repetitions. With Optimal densification the variance is very close to costly minwise hashing, which is significantly superior to existing densification schemes. Note the log scale of y-axis. RCV1 URL NEWS20 Existing h+ 100 200 300 62 86 104 373 584 624 154 179 205 This Paper h∗ 100 200 300 56 90 116 287 459 631 139 158 174 Vanilla MinHash 100 200 300 376 733 1098 2760 6247 8158 1201 2404 3650 Table 2. Time (in milliseconds) requires to compute 100, 200 and 300 hashes of the full data using the existing densification, proposed densification and vanilla minwise hashing. Minhash can be 10-18x slower for computing 300 hashes on these datasets. RCV1 URL News20 Avg. non-zeros (d) 73 115 402 Dim (D) 47,236 3,231,961 1,355,191 Samples 20,242 100,000 19,996 Table 3. Basic Statistics of Datasets. Conclusion 4: The theoretical variance of our proposal overlaps with the empirical estimates, and it seems to go to zero validating Theorem 19. Conclusion 5: The variances (or the MSE) of existing densification seems to converge to constant and do not go to zero confirming Theorem 5. 6.2. Speed RCV1 URL News20 100 Bins 53 33 14 200 Bins 143 112 58 300 Bins 238 202 120 Table 4. Avg. Number of Empty Bins per vector (rounded) generated with One Permutation Hashing (Li et al., 2012). For sparse datasets, a significant (80% with 300 hashes) of the bins can be empty and have no information. They cannot be used for indexing and kernel learning. Fortunately, we can efficiently densify them with optimal densification, such that, all the generated k hashes have variance similar to minwise hashing. The overall computational cost is significantly less compared to minwise hashing To compute the runtime, we use three publicly available text datasets: 1) RCV1, 2) URL and 3) News20. The dimensionality and sparsity of these datasets are an excellent representative of the scale and the size frequently encountered in large-scale data processing systems, such as Google’s SIBYL (Chandra et al., 2010). The statistics of these datasets are summarized in Table 3. We implemented three methodologies for computing hashes: 1) Densification Scheme h+ , 2) The Proposed h∗ (Algorithm 1 and 3) Vanilla Minwise Hashing. The methods were implemented in C++. Cheap hash function replaced costly permutations. Clever alternatives to avoid mod operations were employed. These tricks ensured that our implementations2 are as efficient as the possible. We compute the wall clock time required to calculate 100, 200 and 300 hashes of all the three datasets. The time include the end-to-end hash computation of the complete data. Data loading time is not included. The results are presented in Table 2. All the experiments were done on Intel i7-6500U processor laptop with 16GB RAM. Also, to get an estimate of the importance of densification, we also show the average number of empty bins generated 2 Codes are available at http://rush.rice.edu/ fastest-minwise.html Optimal Densification for Fast and Accurate Minwise Hashing by only using one permutation hashing and report the numbers in Table 4. We can clearly see that the number of empty bins is significantly larger and the hashes are unusable without densification. Chierichetti, Flavio, Kumar, Ravi, Lattanzi, Silvio, Mitzenmacher, Michael, Panconesi, Alessandro, and Raghavan, Prabhakar. On compressing social networks. In KDD, pp. 219–228, Paris, France, 2009. From the running time numbers Table 2, we conclude: Dahlgaard, Søren, Knudsen, Mathias Bæk Tejs, Rotenberg, Eva, and Thorup, Mikkel. Hashing for statistics over kpartitions. In Foundations of Computer Science (FOCS), 2015 IEEE 56th Annual Symposium on, pp. 1292–1310. IEEE, 2015. Conclusion 1: Optimal densification is as fast as traditional densification irrespective of k and the sparsity. However, optimal densification is significantly more accurate. Conclusion 2: Both the densification scheme is significantly faster than minwise hashing. They are 10-18x faster for computing 300 hashes on the selected datasets. Given the simplicity, we hope our work gets adopted. References Bavarian, Mohammad, Ghazi, Badih, Haramaty, Elad, Kamath, Pritish, Rivest, Ronald L., and Sudan, Madhu. The optimality of correlated sampling. CoRR, abs/1612.01041, 2016. URL http://arxiv.org/ abs/1612.01041. Bayardo, Roberto J., Ma, Yiming, and Srikant, Ramakrishnan. Scaling up all pairs similarity search. In WWW, pp. 131–140, 2007. Broder, Andrei Z. On the resemblance and containment of documents. In the Compression and Complexity of Sequences, pp. 21–29, Positano, Italy, 1997. Broder, Andrei Z., Charikar, Moses, Frieze, Alan M., and Mitzenmacher, Michael. Min-wise independent permutations. In STOC, pp. 327–336, Dallas, TX, 1998. Buehrer, Gregory and Chellapilla, Kumar. A scalable pattern mining approach to web graph compression with communities. In WSDM, pp. 95–106, Stanford, CA, 2008. Carter, J. Lawrence and Wegman, Mark N. Universal classes of hash functions. In STOC, pp. 106–112, 1977. Fetterly, Dennis, Manasse, Mark, Najork, Marc, and Wiener, Janet L. A large-scale study of the evolution of web pages. In WWW, pp. 669–678, Budapest, Hungary, 2003. Henzinger, Monika Rauch. Finding near-duplicate web pages: a large-scale evaluation of algorithms. In SIGIR, pp. 284–291, 2006. Indyk, Piotr and Motwani, Rajeev. Approximate nearest neighbors: Towards removing the curse of dimensionality. In STOC, pp. 604–613, Dallas, TX, 1998. Li, Ping. 0-bit consistent weighted sampling. In KDD, 2015. Li, Ping, Shrivastava, Anshumali, Moore, Joshua, and König, Arnd Christian. Hashing algorithms for largescale learning. In NIPS, Granada, Spain, 2011. Li, Ping, Owen, Art B, and Zhang, Cun-Hui. One permutation hashing. In NIPS, Lake Tahoe, NV, 2012. Najork, Marc, Gollapudi, Sreenivas, and Panigrahy, Rina. Less is more: sampling the neighborhood graph makes salsa better and faster. In WSDM, pp. 242–251, Barcelona, Spain, 2009. Ondov, Brian D, Treangen, Todd J, Melsted, Páll, Mallonee, Adam B, Bergman, Nicholas H, Koren, Sergey, and Phillippy, Adam M. Mash: fast genome and metagenome distance estimation using minhash. Genome Biology, 17(1):132, 2016. Chandra, Tushar, Ie, Eugene, Goldman, Kenneth, Llinares, Tomas Lloret, McFadden, Jim, Pereira, Fernando, Redstone, Joshua, Shaked, Tal, and Singer, Yoram. Sibyl: a system for large scale machine learning. Technical report, 2010. Shrivastava, Anshumali and Li, Ping. Densifying one permutation hashing via rotation for fast near neighbor search. In ICML, Beijing, China, 2014a. Charikar, Moses S. Similarity estimation techniques from rounding algorithms. In STOC, pp. 380–388, Montreal, Quebec, Canada, 2002. Shrivastava, Anshumali and Li, Ping. In defense of minhash over simhash. In Proceedings of the Seventeenth International Conference on Artificial Intelligence and Statistics, pp. 886–894, 2014b. Chien, Steve and Immorlica, Nicole. Semantic similarity between search engine queries using temporal correlation. In WWW, pp. 2–11, 2005. Shrivastava, Anshumali and Li, Ping. Improved densification of one permutation hashing. In UAI, Quebec, CA, 2014c. Optimal Densification for Fast and Accurate Minwise Hashing Weinberger, Kilian, Dasgupta, Anirban, Langford, John, Smola, Alex, and Attenberg, Josh. Feature hashing for large scale multitask learning. In ICML, pp. 1113–1120, 2009. The variance is little involved. From the collision probability, we have the following is unbiased estimator. k−1 1X 1{h∗j (S1 ) = h∗j (S2 )}. R̂ = k j=0 (21) For variance, define the number of simultaneously empty bins by A. Proofs Theorem 5 Give any two finite sets S1 , S2 ∈ Ω, with A = |S1 ∪ S2 | > a = |S1 ∩ S2 | > 0 and |Ω| = D → ∞. The limiting variance of the estimators from densification and improved densification when k = D → ∞ is given by:   a A−a lim V ar(h) = > 0 (16) k→∞ A A(A + 1)   a a 3(A − 1) + (2A − 1)(a − 1) − >0 lim V ar(h+ ) = k→∞ A 2(A + 1)(A − 1) A (17) Nemp = k−1 X 1{Ej = 1}, (22) j=0 where 1 is the indicator function. We partition the event  h∗j (S1 ) = h∗j (S2 ) into two cases depending on Ej . Let MjN (Non-empty Match at j) and MjE (Empty Match at j) be the events defined as: MjN = 1{Ej = 0 and h∗j (S1 ) = h∗j (S2 )} MjE = 1{Ej = 1 and h∗j (S1 ) = h∗j (S2 )} (23) (24) Proof: When k = D, then Nemp = D − A. Substituting this value in the variance formulas from (Shrivastava & Li, 2014c) and taking the limit as D = k → ∞, we get the a above expression after manipulation. When 0 < R = A < 1, they both are strictly positive.  Note that, MjN = 1 =⇒ MjE = 0 and MjE = 1 =⇒ MjN = 0. From the LSH property of estimator we have Theorem 6 It is not difficult to show that, |S1 ∩ S2 | =R P r h (S1 ) = h (S2 ) = |S1 ∩ S2 | R R RR̄ V ar(h∗ ) = + A 2 + B 2 − R2 k k k lim V ar(h∗ ) = 0 ∗ k→∞ ∗  (18) E(MjN |Ej = 0) = E(MjE |Ej = 1) = E(MjE + MjN ) = R ∀j  E MjN MiN i 6= j, Ej = 0 and Ei = 0 = RR̃, where R̃ = a−1 f 1+f 2−a−1 . (19) R̂ = (20) where Nemp is the number of simultaneous empty bins between S1 and S2 and the quantities A and B are given by   Nemp (Nemp − 1) A = E 2Nemp + k − Nemp  B = E (k − Nemp )(k − Nemp − 1) + 2Nemp (k − Nemp − 1)  Nemp (Nemp − 1)(k − Nemp − 1) + k − Nemp Proof: The collision probability is easy using a simple observation that values coming from different bin numbers can never match across S1 and S2 , i.e. h∗i (Si ) 6= h∗j (S2 ) if i 6= j, as they have disjoint different range. So whenever, for a simultaneous empty bin i, i.e. Ei = 1, we get h∗i (S1 ) = h∗i (S2 ) after reassignment, the value must be coming from same non-empty bin, say numbers k which is not not empty. Thus, P r(h∗i (S1 ) = h∗i (S2 )) = P r(h∗k (S1 ) = h∗k (S2 )|Ek = 0) = R (25) Using these new events, we have k−1  1 X E Mj + MjN k j=0 (26) We are interested in computing  2  k−1 X    1  V ar(R̂) = E  MjE + MjN   − R2 (27) k j=0 For notational convenience we will use m to denote the event k − Nemp = m, i.e., the expression E(.|m) means E(.|k − Nemp = m). To simplify the analysis, we will first compute the conditional expectation   2 k−1    1 X E Mj + MjN  m (28) f (m) = E  k j=0 By expansion and linearity of expectation, we obtain     X X k 2 f (m) = E  MiN MjN m + E  MiN MjE m i6=j i6=j   # " k X X  E N 2 E 2 E +E  Mi Mj m + E (Mj ) + (Mj ) m i6=j i=1 Optimal Densification for Fast and Accurate Minwise Hashing MjN = (MjN )2 and MjE = (MjE )2 as they are indicator functions and can only take values 0 and 1. Hence,   k−1 X  E (MjN )2 + (MjE )2 m = kR (29) Under any independent re-assigment, the probability that two empty bins chooses the same non-empty bin out of m 1 non-empty bins is lower bounded by m which is achieved by optimal densification. j=0 The values of the first three terms are given by the following 3 expression using simple binomial enpension and using the fact that we are dealing with indicator random variable which can only take values 0 or 1.   X (30) E MiN MjN m = m(m − 1)RR̃ i6=j   " # X R (m − 1)R R̃ E MiN MjE m = 2m(k − m) + m m i6=j (31) Let p be the probability that two simultaneously empty bins i and j finally picks the same non-empty bin for reassignment. Then we have   h i X E MiE MjE m = (k − m)(k − m − 1) pR + (1 − p)RR̃ i6=j (32) because with probability (1 − p), it uses estimators from different simultaneous non-empty bin and in that case the MiE MjE = 1 with probability RR̃. We know that Algo1 rithm 1 which uses 2-universal hashing the value of p = m . This is because any pairwise assignment is perfectly random with 2-universal hashing. Substituting for all terms with value of p and rearranging terms gives the required expression. When k = D, then Nemp = D − A. Substituting this value in the variance formulas and taking the limit as D = k → ∞, we get 0 for all R. Theorem 7 V ar(h∗ ) ≤ V ar(h+ ) ≤ V ar(h) (33) 1 1.5 2 Proof: We have p∗ = m ≤ p+ = m+1 ≤ p = m+1 . The + value of p and p comes from analysis in (Shrivastava & Li, 2014c) Theorem 8 Among all densification schemes, where the reassignment process for bin i is independent of the reassignment process of any other bin j, Algorithm 1 achieves the best possible variance.
8cs.DS
arXiv:1804.00102v2 [stat.ME] 5 Apr 2018 Collaborative targeted inference from continuously indexed nuisance parameter estimators Cheng Ju Division of Biostatistics, UC Berkeley and Antoine Chambaz MAP5 (UMR 8145), Université Paris Descartes and Mark J. van der Laan Division of Biostatistics, UC Berkeley April 9, 2018 Abstract Suppose that we wish to infer the value of a statistical parameter at a law from which we sample independent observations. Suppose that this parameter is smooth and that we can define two variation-independent, infinite-dimensional features of the law, its so called Q- and G-components (comp.), such that if we estimate them consistently at a fast enough product of rates, then we can build a confidence interval (CI) with a given asymptotic level based on a plain targeted minimum loss estimator (TMLE). The estimators of the Q- and G-comp. would typically be by products of machine learning algorithms. We focus on the case that the machine learning algorithm for the G-comp. is fine-tuned by a real-valued parameter h. Then, a plain TMLE with an h chosen by cross-validation would typically not lend itself to the construction of a CI, because the selection of h would trade-off its empirical bias with something akin to the empirical variance of the estimator of the G-comp. as opposed to that of the TMLE. A collaborative TMLE (C-TMLE) might, however, succeed in achieving the relevant trade-off. We prove that this is the case indeed. We construct a C-TMLE and show that, under high-level empirical processes conditions, and if there exists an oracle h that makes a bulky remainder term asymptotically Gaussian, then the C-TMLE is asymptotically Gaussian hence amenable to building a CI provided that its asymptotic variance can be estimated too. The construction hinges on guaranteeing that an additional, well chosen estimating equation is solved on top of the estimating equation that a plain TMLE solves. The optimal h is chosen by cross-validating an empirical criterion that guarantees the wished trade-off between empirical bias and variance. We illustrate the construction and main result with the inference of the so called average treatment effect, where the Q-comp. consists in a marginal law and a conditional expectation, and the G-comp. is a propensity score (a conditional probability). We also conduct a multifaceted simulation study to investigate the empirical properties of the collaborative TMLE when the G-comp. is estimated by the LASSO. Here, h is the bound on the `1 -norm of the candidate coefficients. The variety of scenarios shed light on small and moderate sample properties, in the face of low-, moderate- or high-dimensional baseline covariates, and possibly positivity violation. Keywords: cross-validation, empirical process theory, semiparametric models 1 1 Introduction We wish to infer the value of a statistical parameter at a law from which we sample independent observations. The parameter is a smooth function of the data distribution. We assume that we can define two variation-independent, infinite-dimensional features of the law, its so called Qand G-components, such that if we estimate them consistently at a fast enough joint rate, then we can build a confidence interval (CI) with a given asymptotic level based on a plain targeted minimum loss estimator (TMLE) [30, 29]. Typically, the parameter depends on the law only through its Q-component, whereas its canonical gradient depends on the law through both its Qand G-components. The estimators of the Q- and G-components would typically be by products of machine learning algorithms. We focus on the case that the machine learning algorithm for the G-component is fine-tuned by a real-valued parameter h. Is it possible to construct an estimator that will lend itself to the construction of a CI, by fine-tuning data-adaptively and in a targeted fashion both the algorithm for the estimation of the G-component and the resulting estimator of the parameter of interest? Literature overview. The general problem that we address is often encountered in observational studies of the effect of an exposure, for instance when one wishes to infer the average effect of a two-level exposure. It is then necessary to account for the fact that the level of exposure is not fully randomized in the observed population. A pivotal object of interest in such studies, the so called exposure mechanism (that is, the conditional law of exposure given baseline covariates) is an example of what we generally call a G-component of the law of the experiment. A wide range of estimators of the average effect of a two-level exposure require the estimation of the propensity score: Horvitz-Thompson estimators [9]; estimators based on propensity score matching [23, 8, 7] or stratification [1, 24]; any estimator relying on the efficient influence curve, among which double-robust inverse probability of exposure weighted estimators [20, 22, 18] or estimators built based on the targeted minimum loss estimation (TMLE) methodology [30, 29]. Common methods for the estimation of the propensity score are multivariate logistic regression [14], high-dimensional propensity score adjustment [25, 2], and a variety of machine learning algorithms [15, 6, 10]. Except in the so called collaborative variant of TMLE that we will discuss shortly, the estimators of the propensity score can be derived at a preliminary step, regardless essentially of why they are needed and how they are used at the subsequent step. This is problematic because optimality at the preliminary step has little if any relation to optimality at the subsequent step. For instance, the optimal estimator of the propensity score at the preliminary step might take values very close to zero, therefore disqualifying it as a viable estimator at the subsequent step, not to mention an optimal one. In a less dramatic scenario, using an instrumental variable (which only influences exposure but not the outcome) to estimate the propensity score could concomitantly yield a better estimator thereof and only increase the variance of the resulting estimator of the effect of exposure [31, 29]. This prompted the development of the so called collaborative version of the targeted minimum loss estimation methodology [31, 29], where the estimation of the G-component is not separated from that of the parameter of main interest anymore. More concretely, collaborative TMLE (CTMLE) consists in building a sequence of estimators of the G-component and in selecting one of them by optimizing a criterion that targets the parameter of main interest. For instance, in the above less dramatic scenario, covariates that are strongly predictive of exposure but not of the outcome would be removed, resulting in less bias for the estimator of the parameter of main interest. The C-TMLE methodology has been adapted to a wide range of fields, including genomics [4, 34], 2 survival analysis [27], and clinical studies[11]. Because the derivation of C-TMLE estimators is often computationally demanding, scalable versions have also been developed [11]. In [26], the authors propose a C-TMLE algorithm that uses regression shrinkage of the exposure model for the estimation of the propensity score. It sequentially reduces the parameter that determines the amount of penalty placed on the size of the coefficient values, and selects the appropriate parameter by cross-validation. The methodology for continuously fine-tuned, collaborative targeted learning that we develop in this article encompasses the algorithm of [26]. Its statistical analysis sheds light on why, and under which assumptions, it would provide valid statistical inference. The present study builds upon [28]. The methodology is also studied in [12, 13], the latter an example of real-life application. At this point in the introduction, we wish to formalize what is the problem at stake. What follows recasts the introductory paragraph in the theoretical framework that we adopt in the article. Setting the scene. Let O1 , . . . , On be n independent draws from a law P0 on a set O. We view P0 as an element of the statistical model M, a collection of plausible laws for O1 , . . . , On . The more we know about P0 , the smaller is M. Our primary goal is to infer the value of parameter Ψ : M → R at P0 , namely, ψ0 ≡ Ψ(P0 ). Our statistical analysis is asymptotic in the number of observations. We consider the case that Ψ is pathwise differentiable at every P ∈ M with respect to (w.r.t.) a tangent set SP ⊂ L20 (P ): there exists D∗ (P ) ∈ L20 (P ) such that, for every s ∈ SP , there exists a submodel {Pt : t ∈ R, |t| < c} ⊂ M satisfying (i) Pt |t=0 = P , (ii) Pt  P for all t ∈] − c, c[, (iii) d dPt log (O) dt dP = s(O) t=0 (the submodel’s score function equals s), and (iv) the real valued mapping t 7→ Ψ(Pt ) is differentiable at t = 0 with a derivative equal to P D∗ (P )s, where P f is a shorthand notation for EP (f (O)) (any measurable f ). It is assumed moreover that every P ∈ M is associated with two possibly infinite-dimensional features Q ∈ Q and G ∈ G such that (i) Q and G are unrelated (i.e., variation independent: knowing anything about Q tells nothing about G and vice versa), (ii) Ψ(P ) depends on P only through Q, (iii) D∗ (P ) depends on P only through Q and G, and (iv) G is a mapping from O to R. At this early stage, we can introduce the pivotal Rem20 (Q, G) ≡ Ψ(P ) − Ψ(P0 ) + P0 D∗ (P ) for every P ∈ M. The notation is justified (i) because we wish to think of the right-hand-side expression as a remainder term, and (ii) by the fact that Ψ(P ) and D∗ (P ) depend on P only through Q and G. We consider the case that parameter Ψ is such that, for some pseudo-distances dQ and dG on Q and G, |Rem20 (Q, G)| . dQ (Q, Q0 ) × dG (G, G0 ), (1) where a . b stand for “there exists a universal positive constant c > 0 such that a ≤ bc”. A remainder term satisfying (1) is said double-robust. Let Q̂ be an algorithm for the estimation of Q0 , the Q-component of the true law P0 . Likewise, let Ĝh (h ∈ H, an open interval of R∗+ of which the closure contains 0) be an h-specific algorithm for the estimation of G0 , the G-component of P0 . Formally, we view Q̂ and each Ĝh as mappings from ( ) N [ X N −1 Dirac(oi ) : o1 , . . . , oN ∈ O N ≥1 i=1 3 to Q and G, respectively, that can “learn” from the empirical measure Pn some estimators Q̂(Pn ) and Ĝh (Pn ) of Q0 and G0 . Set Q0n ≡ Q̂(Pn ) (the superscript 0 stands for “initial”), Gn,h ≡ Ĝh (Pn ), 0 ∈ M be any element of the model of which the Q- and G-components equal Q0 and and let Pn,h n 0 ) is a natural estimator of Gn,h . Derived by the mere substitution of Pn0 for P0 in Ψ(P0 ), Ψ(Pn,h Ψ(P0 ). It is not targeted toward the inference of Ψ(P0 ) in the sense that none of the known features 0 was derived specifically for the sake of ultimately estimating Ψ(P ). of Pn,h 0 0 ) toward Ψ(P ) is It is well documented in the TMLE literature that one way to target Ψ(Pn,h 0 ∗ ∈ M from P 0 in such a way that to build Pn,h n,h √ ∗ Pn D∗ (Pn,h ) = oP (1/ n) ∗ ). This can be achieved, in such a way that G and to infer Ψ(P0 ) with Ψ(Pn,h n,h is not modified, 0 by “fluctuating” Pn,h , a procedure that we will develop in details in the specific example studied in the article. Then, by (1), the estimator satisfies the asymptotic expansion: √ ∗ ∗ Ψ(Pn,h ) − Ψ(P0 ) = (Pn − P0 )D∗ (Pn,h ) + Rem20 (Q∗n,h , Gn,h ) + oP (1/ n). (2) By convention, we agree that small values of h correspond with less bias for Gn,h as an estimator of G0 . Moreover, we assume that there exists hn ∈ H, hn = o(1), such that dG (Gn,hn , G0 ) = oP (ρ1,n ) for some ρ1,n = o(1), i.e., that Gn,hn consistently estimates G0 at rate ρ1,n . If Q∗n,hn is also such √ that dQ (Q∗n,hn , Q0 ) = oP (ρ2,n ) for some ρ2,n = o(1), and if ρ1,n ρ2,n = o(1/ n), then (1) and (2) yield √ ∗ ∗ ) + oP (1/ n) ) − Ψ(P0 ) = (Pn − P0 )D∗ (Pn,h Ψ(Pn,h n n which may in turn imply the asymptotic linear expansion √ ∗ Ψ(Pn,h ) − Ψ(P0 ) = (Pn − P0 )IF + oP (1/ n), n (3) with influence function IF ≡ D∗ (P0 ), depending in particular on how data-adaptive are algorithms √ ∗ Q̂ and Ĝh (h ∈ H). By the central limit theorem, (3) guarantees that n(Ψ(Pn,h ) − Ψ(P0 )) is n asymptotically Gaussian. √ We focus on a more challenging situation, where ρ1,n ρ2,n is not necessarily o(1/ n). We anticipate that our analysis is also very relevant at small and moderate sample sizes when ρ1,n ρ2,n = √ o(1/ n). In order to derive an asymptotic linear expansion similar to (3) from (2) in this situation, we would have to derive an asymptotic expansion of Rem20 (Q∗n,hn , Gn,hn ). Unfortunately, we have reasons to believe that this is not possible without targeting (their presentation in an example is deferred to Section 3.3). ∗ ) (h ∈ H) do not cooperate in the sense that, although Now, observe that the estimators Ψ(Pn,h Q∗n,h and Q∗n,h0 (for any two h, h0 ∈ H, h 6= h0 ) share the same initial estimator Q0n , the construction of the latter does not capitalize on that of the former. In contrast, we propose to build collabo∗ ) (h ∈ H) and to select data-adaptively one ratively a continuum of estimators of the form Ψ(Pn,h among them that will be asymptotically Gaussian, under conditions often encountered in empirical process theory. Organization of the article. In Section 2, we lay out a high-level presentation of collaborative TMLE, and state a high-level result. In Sections 3, 4, 5 and 6, we consider a specific example. In Section 3, we particularize the theoretical construction and analysis. In Section 4, we describe two practical instantiations of the estimator developed in Section 3. In Sections 5 and 6, we carry out a mutli-faceted simulation study of their performances and comment upon its results. In Section 7, we summarize the content of the article. All the proofs are gathered in the appendix. 4 2 High-level presentation and result We now state and prove a general result about continuously fine-tuned, collaborative targeted minimum loss estimation, a version of [Theorem 10.1 in 28]. Its high-level assumptions are clarified in the particular example that we study in the next sections. From now on, we slightly abuse notation and denote D∗ (Q, G) instead of D∗ (P ), where Q and G are the Q- and G-components of P . Let G· ≡ {Gt : t ∈ T } ⊂ G be a (one-dimensional) subset of G (indexed by a real parameter ranging in an open subset T of H) such that t 7→ D∗ (Q, Gt )(O) is twice differentiable over T for all Q ∈ Q (P0 -almost surely). We characterize ∂D∗ and ∂ 2 D∗ by setting, for every h ∈ T and Q ∈ Q, ∂h D∗ (Q, G· )(O) ≡ ∂h2 D∗ (Q, G· )(O) ≡ d ∗ D (Q, Gt )(O)|t=h , dt d2 ∗ D (Q, Gt )(O)|t=h . dt2 (4) Consider the following inter-dependent assumptions. The first one is indexed by (Q, h, c) ∈ Q × H × R∗+ . A1(Q, h, c) There exists an open neighborhood T ⊂ H of h ∈ H for which the set Gn,· ≡ {Ĝh (Pn ) ≡ Gn,h : h ∈ T } ⊂ G is such that t 7→ D∗ (Q, Gn,· )(O) is twice differentiable over T (P0 -almost surely). Moreover, P0 -almost surely, sup |∂h2 D∗ (Q, Gn,· )(O)| ≤ c. h∈T ∗ ∈ M, with Q- and G-components denoted by Q∗ A2 For all h ∈ H, we know how to build Pn,h n,h √ and Gn,h , in such a way that Pn D∗ (Q∗n,h , Gn,h ) = oP (1/ n). Moreover, we know how to choose hn ∈ H such that √ Pn D∗ (Q∗n,hn , Gn,hn ) = oP (1/ n). (5) and, for some deterministic c2 > 0, A1(Q∗n,hn , hn , c2 ) is met and Pn ∂hn D∗ (Q∗n,hn , Gn,· ) = oP (1/n1/4 ). (6) A3 It holds that dG (Gn,hn , G0 ) = oP (1), and there exists Q1 ∈ Q such that dQ (Q∗n,hn , Q1 ) = oP (1). In addition,  √ (Pn − P0 ) D∗ (Q∗n,hn , Gn,hn ) − D∗ (Q1 , G0 ) = oP (1/ n), (7) √ Rem20 (Q∗n,hn , Gn,hn ) − Rem20 (Q1 , Gn,hn ) = oP (1/ n). (8) A4 Let Φ0 : G → R be given by Φ0 (G) ≡ P0 D∗ (Q1 , G). There exist h̃n ∈ H and ∆(P1 ) ∈ L20 (P0 ) such that √ Φ0 (Gn,h̃n ) − Φ0 (G0 ) = (Pn − P0 )∆(P1 ) + oP (1/ n). (9) √ A5 It holds that (hn − h̃n )2 = oP (1/ n). Moreover, there exists a deterministic c5 > 0 such that A1(Q1 , hn , c5 ) is met, and   √ (Pn − P0 ) D∗ (Q1 , Gn,hn ) − D∗ (Q1 , Gn,h̃n ) = oP (1/ n), (10)  √ (hn − h̃n ) × P0 ∂hn D∗ (Q∗n,hn , Gn,· ) − ∂hn D∗ (Q1 , Gn,· ) = oP (1/ n), (11)  √ ∗ ∗ ∗ (Pn − P0 ) ∂hn D (Qn,hn , Gn,· ) − ∂hn D (Q1 , Gn,· ) = oP (1/ n). (12) 5 Now that we have introduced our high-level assumptions, we can state the corresponding highlevel result that they entail. The proof is relegated to the appendix. Theorem 1 (Asymptotics of the collaborative TMLE – a high-level result). Under assumptions A2 to A5, it holds that √ ∗ ) − Ψ(P0 ) = (Pn − P0 ) (D∗ (Q1 , G0 ) + ∆(P1 )) + oP (1/ n). Ψ(Pn,h (13) n Commenting on the high-level assumptions. Assumption A1(Q, h, c) concerns both D∗ (specifically, how D∗ (Q, G)(O) depends on G(O)) and algorithms Ĝt , t ∈ H (specifically, how smooth is t 7→ Ĝt (Pn )(O) around h). In the particular example studied in the following sections, the counterpart C1 of A1(Q, h, c) concerns only algorithms Ĝt , t ∈ H. ∗ In the example, we show how Pn,h can be built collaboratively in such a way that A2 is n met, under a series of nested assumptions about the smoothness of data-dependent, real-valued functions over H, the construction of which notably involve algorithms Ĝt , t ∈ H. To understand why achieving (6) is relevant, observe that the following oracle version of Pn ∂hn D∗ (Q∗n,hn , Gn,· ),  1 lim P0 D∗ (Q∗n,hn , Gn,hn +t ) − D∗ (Q∗n,hn , Gn,hn ) , t→0 t t6=0 can be rewritten as  1 Rem20 (Q∗n,hn , Gn,hn +t ) − Rem20 (Q∗n,hn , Gn,hn ) t→0 t lim t6=0 in view of (1). Thus, achieving (5) relates to finding critical points of h 7→ Rem20 (Q∗n,hn , Gn,h ). Assumption A3 formalizes the convergence of Gn,hn to its target G0 w.r.t. dG , and that of Q∗n,hn to some limit Q1 ∈ Q w.r.t. dQ . It does not require that Q1 be equal to the target Q0 of Q∗n,hn , but A4 may be impossible to meet when Q1 6= Q0 (see below). Condition (7) in A3 is met for instance if the L2 (P0 )-norm of D∗ (Q∗n,hn , Gn,hn ) − D∗ (Q1 , G0 ) goes to zero in probability and if the difference falls in a P0 -Donsker class with probability tending to one. As for (8), it typically holds √ whenever the product of the rates of convergence of Q∗n,hn and Gn,hn to their limits is oP (1/ n). The counterpart of A3 in the example studied in the following sections is C2. With A4, we assume the existence of an oracle h̃n that undersmoothes Gn,h enough so that Φ0 (Gn,h̃n ) is an asymptotically linear estimator of Φ0 (G0 ), where we note that Φ0 is pathwise differentiable in a similar way as Ψ. We say that h̃n is an oracle because the definition of Φ0 involves P0 and Q1 . It happens that √ Lemma 2. Under A2 and A3, if Q1 = Q0 , dG (Gn,hn , G0 ) × dQ (Q∗n,hn , Q0 ) = oP (1/ n), and if (3) is met with IF = D∗ (P0 ), then A4 holds with hn = h̃n and ∆(P1 ) = 0. It is difficult to assess whether or not A4 is a tall order when dG (Gn,hn , G0 ) × dQ (Q∗n,hn , Q0 ) is √ not necessarily oP (1/ n), or if Q1 6= Q0 . Finally, A5 states that the distance between h̃n and hn , introduced in A2, is of order oP (1/n1/4 ) at most. Its conditions (10) and (12) are of similar nature as (7). As for (11), the Cauchy-Schwarz inequality reveals that it is met if the L2 (P0 )-norm of ∂hn D∗ (Q∗n,hn , Gn,· ) − ∂hn D∗ (Q1 , Gn,· ) is oP (1/n1/4 ). 6 3 Collaborative TMLE for continuous tuning when inferring the average treatment effect: presentation and analysis In this section, we specialize the discussion to the inference of a specific statistical parameter, the so called average treatment effect. Section 3.1 introduces the parameter and recalls what are the corresponding D∗ and Rem20 from Section 1. Section 3.2 describes the uncooperative construction of a continuum of uncooperative TMLEs. Section 3.3 argues why the selection of one of the uncooperative TMLEs is unlikely to yield a well behaved (i.e., asymptotically Gaussian) estimator when the product of the rates of convergence of the estimators of Q0 and G0 to their √ limits is not fast enough (i.e., o(1/ n)). Then, Sections 3.4 and 3.5 present the collaborative construction of collaborative TMLEs and how to select one among them that is well behaved, under assumptions that are spelled out in Section 3.6, where the high-level Theorem 1 and its assumptions are specialized. 3.1 Preliminary We observe n independent draws O1 ≡ (W1 , A1 , Y1 ), . . ., On ≡ (Wn , An , Yn ) from P0 , the true law of O ≡ (W, A, Y ). It is known that Y takes its values in [0, 1]. We consider the statistical model M that leaves unspecified the law QW,0 of W and the conditional law of Y given (A, W ), while we might know that the conditional expectation G0 of A given W belongs to a set G. Introduce Q̄0 (A, W ) ≡ EP0 (Y |A, W ), G0 (W ) ≡ P0 (A = 1|W ). The parameter of interest is the average treatment effect,  ψ0 ≡ EQW,0 Q̄0 (1, W ) − Q̄0 (0, W ) . We choose it because its study provides a wealth of information and paves the way for the analysis of a variety of other parameters often encountered in the statistical literature. More generally, every P ∈ M gives rise to QW , Q̄(A, W ), G(W ) and Q ≡ (QW , Q̄), which are respectively the marginal law of W under P , the conditional expectation of Y given (A, W ) under P , the conditional probability that A = 1 given W under P , and the couple consisting of QW and Q̄. For each of them, the average treatment effect is Ψ(P ), where Ψ : M → [0, 1] is given by  Ψ(P ) ≡ EQW Q̄(1, W ) − Q̄(0, W ) . For notational conciseness, we let `G be given by `G(A, W ) ≡ AG(W ) + (1 − A)(1 − G(W )) (14) for every G ∈ G. Note that `G(A, W ) is the conditional likelihood of A given W when A given W is drawn from the Bernoulli law with parameter G(W ), hence the “`” in the notation. Parameter Ψ viewed as a real-valued mapping over M is pathwise differentiable at every P ∈ M w.r.t. the maximal tangent set SP = L20 (P ). The efficient influence curve D∗ (P ) of Ψ at P ∈ M is given by  D∗ (P )(O) ≡ D2∗ (Q̄, G)(O) + Q̄(1, W ) − Q̄(0, W ) − Ψ(P ) where (15) 2A − 1 D2∗ (Q̄, G)(O) ≡ (Y − Q̄(A, W )). `G(A, W ) Recall definition (1). It is easy to check that, for every P ∈ M,      `G0 (A, W ) Rem20 (Q̄, G) = EP0 (2A − 1) 1 − Q̄(A, W ) − Q̄0 (A, W ) . `G(A, W ) 7 (16) Writing Rem20 (Q̄, G) instead of Rem20 (Q, G) slightly abuses notation, but is justified because integrating out A in the RHS of (16) reveals that it only depends on P0 , Q̄ and G. Furthermore, by the Cauchy-Schwartz inequality, it holds that 2 2  Rem20 (Q̄, G) ≤ P0 (Q̄ − Q̄0 ) × P0 3.2 G − G0 `G 2 . (17) Uncooperative construction of a continuum of uncooperative TMLEs ˆ (P ) be an initial estimator of Q̄ and {G Prerequisites. Let Q̄0n ≡ Q̄ n 0 n,h ≡ Ĝh (Pn ) : h ∈ H} be a continuum of candidate estimators of G0 indexed by a real-valued tuning parameter h ∈ H, an open interval of R∗+ . By convention, we agree that small values of h correspond with less bias for Gn,h as an estimator of G0 . Specifically, denoting L1 the valid loss function for the estimation of G0 given by L1 (G)(A, W ) ≡ − log `G(A, W ) = −A log G(W ) − (1 − A) log(1 − G(W )), (18) for every G ∈ G, where `G was defined in (14), we assume from now on that the empirical risk h 7→ Pn L1 (Gn,h ) increases. For example, Ĝh could correspond to fitting a logistic linear regression maximizing the loglikelihood under the constraint that the sum of the absolute values of the coefficients is smaller than or equal to 1/h with h ∈ H ≡ R∗+ . We will refer to this algorithm as the LASSO logistic regression algorithm. Uncooperative TMLEs. Let QW,n be the empirical law of {W1 , . . . , Wn }. Set arbitrarily h ∈ H 0 ∈ M denote any element of M such that the marginal law of W under P 0 equals Q and let Pn,h W,n n,h 0 0 0 and the conditional expectation of Y given (A, W ) under Pn is equal to Q̄n , hence Qn = (QW,n , Q̄0n ) 0 coincide with G on the one hand; and the conditional expectation of A given W under Pn,h n,h on 0 the other hand. Evaluating Ψ at Pn,h yields an estimator of Ψ(P0 ), 0 Ψ(Pn,h )= n  1X 0 Q̄n (1, Wi ) − Q̄0n (0, Wi ) , n i=1 which is not targeted toward the inference of Ψ(P0 ) in the sense that none of the known features of Pn0 was derived specifically for the sake of ultimately estimating Ψ(P0 ). 0 ) toward Ψ(P ) is to build P ∗ ∈ M from P 0 in such a way that One way to target Ψ(Pn,h 0 n,h n,h √ ∗ Pn D∗ (Pn,h ) = oP (1/ n) ∗ ). This can be achieved by “fluctuating” P 0 in the following sense. and to infer Ψ(P0 ) with Ψ(Pn,h n,h For every G ∈ G, introduce the so called “clever covariate” C(G) given by C(G)(A, W ) ≡ 2A − 1 . `G(A, W ) (19) Now, for every ε ∈ R, let Q̄0n,h,ε be characterized by   logit Q̄0n,h,ε (A, W ) ≡ logit Q̄0n (A, W ) + εC(Gn,h )(A, W ) 8 (20) 0 0 except that the conditional expectation of Y given (A, W ) and Pn,h,ε ∈ M be defined like Pn,h 0 0 0 when ε = 0. Moreover, denoting L under Pn,h,ε equals Q̄0n,h,ε (and not Q̄0n ). Clearly, Pn,h,ε = Pn,h 2 the loss function given by  L2 (Q̄)(O) ≡ −Y log Q̄(A, W ) − (1 − Y ) log 1 − Q̄(A, W ) for every Q̄ induced by a P ∈ M, it holds that d L2 (Q̄0n,h,ε )(O) = −D2 (Q̄0n,h,ε , Gn,h )(O), dε 0 a property that prompts us to say that the one-dimensional submodel {Pn,h,ε : ε ∈ R} ⊂ M 0 0 “fluctuates” Pn,h “in the direction of” D2 (Q̄n , Gn,h ). 0 along the above submodel is indexed by the minimizer of the The optimal fluctuation of Pn,h empirical risk εn,h ≡ arg min Pn L2 (Q̄0n,h,ε ), (21) ε∈R of which the existence is assumed (note that ε 7→ Pn L2 (Q̄0n,h,ε ) is twice differentiable and strictly ∗ ≡ P0 convex). We call Pn,h n,h,εn,h the TMLE of P0 , and the resulting estimator n ∗ ∗ ψn,h ≡ Ψ(Pn,h )=  1 X 0 Q̄n,h,εn,h (1, Wi ) − Q̄0n,h,εn,h (0, Wi ) n (22) i=1 the TMLE of Ψ(P0 ). It is readily seen that (22) is equivalent to  ∗ Pn D∗ (Pn,h ) − D2∗ (Q̄∗n,h , Gn,h ) = 0 where Q̄∗n,h ≡ Q̄0n,h,εn,h . Since εn,h minimizes the differentiable mapping ε 7→ Pn L2 (Q0n,h,ε ), it holds moreover that Pn D2∗ (Q̄∗n,h , Gn,h ) = 0 (23) which, combined with the previous display, yields ∗ ) = 0; Pn D∗ (Pn,h (24) ∗ is targeted toward Ψ(P ) indeed. Furthermore, in view of (16) and (24), ψ ∗ satisfies in words, ψn,h 0 n,h ∗ ∗ ψn,h − Ψ(P0 ) = (Pn − P0 )D∗ (Pn,h ) + Rem20 (Q̄∗n,h , Gn,h ). (25) ∗ Finally, the TMLEs ψn,h (h ∈ H) are said uncooperative because, although they share the same 0 ∗ does not capitalize on initial estimator Q̄n , for any two h, h0 ∈ H, h 6= h0 , the construction of ψn,h ∗ . that of ψn,h 0 3.3 Selecting one of the uncooperative TMLEs At this stage of the procedure, a crucial question is to select one TMLE in the collection of uncooperative TMLEs, one that lends itself to the construction of a CI for Ψ(P0 ) with a given asymptotic ∗ level. Such a TMLE necessarily writes as ψn,h for some well chosen hn ∈ H. This could possibly n be a deterministic (fixed in n) or a data-driven (random and n-dependent) element of H. The risk R1 generated by L1 (18) is given by R1 (G, G0 ) ≡ EQ0,W [KL(G0 (W ), G(W ))] , 9 where KL(p, q) is the Kullback-Leibler divergence between the Bernoulli laws with parameters p, q ∈ [0, 1]. By Pinsker’s inequality, it holds that 0 ≤ 2P0 (G − G0 )2 ≤ R1 (G, G0 ) for all G ∈ G. Therefore, if G is bounded away from zero and one, then (17) implies Rem20 (Q̄, G)2 . P0 (Q̄ − Q̄0 )2 × R1 (G, G0 ). (26) If the deterministic hn ∈ H is such that (i) there exist two rates ρ1,n = o(1) and ρ2,n = o(1) such  2 ∗ ∗ (P ) = that R1 (Gn,hn , G0 ) = oP (ρ21,n ) and P0 (Q̄∗n,hn − Q̄0 )2 = oP (ρ22,n ), (ii) P0 D∗ (Pn,h ) − D 0 n ∗ ∗ oP (1), (iii) D (Pn,hn ) falls in a P0 -Donsker class with P0 -probability tending to one, (iv) oP (ρ1,n ρ2,n ) = √ oP (1/ n), then [32, Lemma 19.24], (25) and (26) guarantee that (3) is met (with IF = D∗ (P0 )). [This argument will be used repeatedly throughout the article.] Thus, by the central limit theorem, √ ∗ n(ψn,h − Ψ(P0 )) converges in law to the centered Gaussian law with variance VarP0 (D∗ (P0 )(O)). n So, if the synergy between the convergences of Q̄∗n,hn and Gn,hn to their respective limits Q̄0 and ∗ G0 is sufficient, then the TMLE ψn,h can be used to build CIs. n √ The argument falls apart if oP (ρ1,n ρ2,n ) is not oP (1/ n) (or, worse, if the L2 (P0 )-limit Q̄1 of Q̄∗n,hn is not Q̄0 , because we do not expect that R1 (Gn,hn , G0 ) = oP (1/n)). In that case, whether or ∗ similar to (3) will not it is possible to derive a useful asymptotic linear expansion of a TMLE ψn,h n √ depend on whether or not we can derive an asymptotic linear expansion for n Rem20 (Q̄∗n,hn , Gn,hn ). If Gn,hn was derived by maximizing the likelihood over a correctly specified, finite-dimensional √ and fine-tune-parameter-free parametric model, then n Rem20 (Q̄∗n,hn , Gn,hn ) would be asymptotically linear. Because of how we estimate G0 , we now argue that there is little chance that we can √ select hn ∈ H such that the remainder term n Rem20 (Q̄∗n,hn , Gn,hn ) is asymptotically linear. A natural choice would be to use the likelihood-based cross-validation selector hn,CV . Let us recall how it is derived and explain why we do not believe it will solve our problem. Let Bn ∈ {0, 1}n be a cross-validation scheme. For instance, Bn could be a V -fold crossvalidation scheme, i.e., a random vector taking VPdifferent values b1 , . . . , bV ∈ {0, 1}n , each with probability 1/V , such that (i) the proportion n−1 ni=1 bv (i) of ones among the coordinates of each P 0 be the empirical probability bv is close to 1/V , and (ii) Vv=1 bv (i) = 1 for all 1 ≤ i ≤ n. Let Pn,B n 1 law of the training subsample {Oi : Bn (i) = 0, 1 ≤ i ≤ n} and Pn,Bn be the empirical probability law of the validation subsample {Oi : Bn (i) = 1, 1 ≤ i ≤ n}. The likelihood-based cross-validation selector hn,CV of h ∈ H is given by h i 1 0 hn,CV ≡ arg min EBn Pn,B L ( Ĝ (P )) . (27) 1 h n,Bn n h∈H √ Unfortunately, we do not expect that n Rem20 (Q̄∗n,h , Gn,h ) is asymptotically linear. Heuristically, hn,CV trades off the bias and variance of Gn,h as an estimator of G0 , whereas we wish to ∗ . Clearly, the variance of the estimator ψ ∗ = Ψ(P ∗ ), trade off this bias with the variance of ψn,h n,h n,h where Ψ is a smooth functional, is significantly smaller than that of the infinite-dimensional object Gn,h . 3.4 Collaborative construction of finitely many collaborative TMLEs The take-home message of Sections 3.2 and 3.3 is that the uncooperative construction of a continuum of standard TMLEs will typically fail to produce one asymptotically linear TMLE if the product of the rates of convergence of the estimators of Q̄0 and G0 to their limits is not fast enough (i.e., 10 √ o(1/ n)). In Sections 3.4 and 3.5, we demonstrate how a collaborative construction of a continuum of standard TMLEs can produce one asymptotically linear TMLE in this challenging situation, under appropriate assumptions. Recursive construction. We now present the collaborative construction of finitely many TMLEs. In the forthcoming theoretical presentation, we make on the fly a series of assumptions. The most important ones will be emphasized. We argued that the cross-validated selector hn,CV (27) does not sufficiently undersmooth Gn,h √ to make of n Rem20 (Q̄∗n,h , Gn,h ) an asymptotically linear term. Since we have assumed that h 7→ Pn L1 (Gn,h ) increases, we can focus on those tuning parameters h in H∩]0, hn,CV ], a set assumed non-empty from now (an assumption that we call B1(Pn , 1)). The construction is recursive. It unfolds as follows. (∗) (∗) Initialization. We begin as in Section 3.2: for every h ∈ H∩]0, hn,CV ], we build Q̄n,h and Pn,h using Q̄0n as an initial estimator of Q̄0 and Gn,h as the estimator of G0 . Note that placing (∗) (∗) the star symbol between parentheses suggests that Q̄n,h and Pn,h are the tentative h-specific estimator of Q̄0 and TMLE. Specifically, for every h ∈ H∩]0, hn,CV ], we define Q̄0n,h,ε as in (20), εn,h,1 as in (21), assuming that it exists (an assumption that we call B2(Pn , 1)), then (∗) (∗) (∗) set Q̄n,h ≡ Q̄0n,h,εn,h,1 and find Pn,h ∈ M such that the marginal law of W under Pn,h is the empirical law QW,n of {W1 , . . . , Wn } and the conditional expectation of Y given (A, W ) under (∗) (∗) (∗) (∗) Pn,h equals Q̄n,h , hence Qn,h = (QW,n , Q̄n,h ) on the one hand; and the conditional expectation (∗) of A given W under Pn,h coincides with Gn,h on the other hand. (∗) We assume that h 7→ Pn L2 (Qn,h ) is minimized globally at hn,1 in the interior of H∩]0, hn,CV ] (an assumption that we call B3(Pn , 1)). If there are several minimizers, then hn,1 is the largest of them by choice. Observe that, for every h ∈ H∩]0, hn,CV ], (∗) (∗) Pn L2 (Q̄n,hn,1 ) ≤ Pn L2 (Q̄n,h ) ≤ Pn L2 (Q̄0n,h ) and, in particular, (∗) Pn L2 (Q̄n,hn,1 ) < Pn L2 (Q̄∗n,hn,CV ) ≤ Pn L2 (Q̄0n,hn,CV ). Let us assume now that, in addition, h 7→ εn,h,1 , h 7→ 1/Gn,h (Wi ) and h 7→ 1/(1 − Gn,h (Wi )) (all 1 ≤ i ≤ n) are differentiable in an open neighborhood of hn,1 (an assumption that we call (∗) B4(Pn , 1)). Consequently, (i) ∂hn,1 D∗ (Q̄n,hn,1 , Gn,· )(Oi ) is well defined for each 1 ≤ i ≤ n (∗) (see (4)), and (ii) h 7→ Pn L2 (Q̄n,h ) is differentiable in that neighborhood. Moreover, since hn,1 minimizes the previous mapping, we have 0 = − = d (∗) Pn L2 (Q̄n,t ) dt t=hn,1 ! d (∗) (∗) εn,t,1 × Pn D2∗ (Q̄n,hn,1 , Gn,hn,1 ) + εn,h,1 × Pn ∂hn,1 D∗ (Q̄n,hn,1 , Gn,· ) dt t=hn,1 (∗) = εn,h,1 × Pn ∂hn,1 D∗ (Q̄n,hn,1 , Gn,· ), where the third equality holds because (∗) Pn D2∗ (Q̄n,hn,1 , Gn,hn,1 ) = Pn D2∗ (Q̄0n,h,εn,h,1 , Gn,hn,1 ) = 0 11 in light of (23). If εn,h,1 6= 0 (an assumption that we call B5(Pn , 1)), then we thus have proven that the following equation is solved (∗) Pn ∂hn,1 D∗ (Q̄n,hn,1 , Gn,· ) = 0. (∗) (∗) To complete the initialization, we define hn,0 ≡ hn,CV , Q̄∗n,hn,1 ≡ Q̄n,hn,1 , Q∗n,hn,1 ≡ Qn,hn,1 , (∗) ∗ ∗ ∗ Pn,h ≡ Pn,hn,1 , ψn,h ≡ Ψ(Pn,h ), and note that they satisfy n,1 n,1 n,1 ∗ )=0 Pn ∂hn,1 D∗ (Q̄∗n,hn,1 , Gn,· ) = Pn D∗ (Pn,h n,1 Pn L2 (Q̄∗n,hn,1 ) < and Pn L2 (Q̄∗n,hn,0 ) (recall how (23) implied (24) earlier). Recursion. Let k ≥ 2 be arbitrarily chosen. Suppose that, for all 1 ≤ ` < k, we have already built ∗ ∗ the 5-tuples (hn,` , Q̄∗n,hn,` , Q∗n,hn,` , Pn,h , ψn,h ) under assumptions B1(Pn , `) to B5(Pn , `), n,` n,` and also that H∩]0, hn,k−1 ] 6= ∅ (an assumption that we call B1(Pn , k)). Let us now present ∗ the construction of (hn,k , Q̄∗n,hn,k , Q∗n,hn,k , Pn,h ) under assumptions B1(Pn , k) to B5(Pn , k). n,k Because the presentation is very similar to that of the initialization, it is more laid out more directly. (∗) (∗) For every h ∈ H∩]0, hn,k−1 ], we build again Q̄n,h and Pn,h but using Q̄∗n,hn,k−1 as an initial estimator of Q̄0 and Gn,h as the estimator of G0 . Specifically, for every h ∈ H∩]0, hn,k−1 ], k−1 we define Q̄n,h,ε as in (20) with Q̄∗n,hn,k−1 substituted for Q̄0n , εn,h,k as in (21) with Q̄k−1 n,h,ε (∗) substituted for Q̄0n,h,ε (B2(Pn , k) assumes the existence of εn,h,k ), then set Q̄n,h ≡ Q̄kn,h,εn,h,k (∗) (∗) and find Pn,h ∈ M such that the marginal law of W under Pn,h is the empirical law QW,n (∗) (∗) of {W1 , . . . , Wn } and the conditional expectation of Y given (A, W ) under Pn,h equals Q̄n,h , (∗) (∗) hence Qn,h = (QW,n , Q̄n,h ) on the one hand; and the conditional expectation of A given W (∗) under Pn,h coincides with Gn,h on the other hand. (∗) We assume that h 7→ Pn L2 (Qn,h ) is minimized globally at hn,k in the interior of H∩]0, hn,k−1 ] (an assumption that we call B3(Pn , k)). If there are several minimizers, then hn,k is the largest of them by choice. Moreover, we also assume that h 7→ εn,h,k , h 7→ 1/Gn,h (Wi ) and h 7→ 1/(1 − Gn,h (Wi )) (all 1 ≤ i ≤ n) are differentiable in an open neighborhood of hn,k (an (∗) assumption that we call B4(Pn , k)). Consequently, ∂hn,k D∗ (Q̄n,hn,k , Gn,· )(Oi ) is well defined (∗) for each 1 ≤ i ≤ n (see (4)), h 7→ Pn L2 (Q̄n,h ) is differentiable in that neighborhood and, since hn,k minimizes the previous mapping, (∗) εn,h,k × Pn ∂hn,k D∗ (Q̄n,hn,k , Gn,· ) = 0. If εn,h,k 6= 0 (an assumption that we call B5(Pn , k)), then it holds that (∗) Pn ∂hn,k D∗ (Q̄n,hn,k , Gn,· ) = 0. (∗) (∗) To complete the presentation and the recursion, we define Q̄∗n,hn,k ≡ Q̄n,hn,k , Q∗n,hn,k ≡ Qn,hn,k , (∗) ∗ ∗ ∗ Pn,h ≡ Pn,hn,k , ψn,h ≡ Ψ(Pn,h ), and note that they satisfy n,k n,k n,k ∗ Pn ∂hn,k D∗ (Q̄∗n,hn,k , Gn,· ) = Pn D∗ (Pn,h )=0 n,k 12 and (28) Pn L2 (Q̄∗n,hn,` ) < Pn L2 (Q̄∗n,hn,`−1 ) for all 1 ≤ ` ≤ k. ∗ We discuss when to stop the loop in the next paragraph. The collection {Pn,h : 0 ≤ k ≤ Kn } n,k ∗ of TMLEs is arguably built collaboratively, as the derivation of every Pn,hn,` heavily depends on ∗ Pn,h . n,`−1 The loop is iterated until a stopping criterion is met. The instantiations of the collaborative TMLE laid out in Section 4 rely on the LASSO logistic regression algorithm. It is thus possible to pre-specify an upper bound on Kn . In general, we may decide to stop the recursive construction whenever a maximal number K of iterations has been reached, or hn,k ≤ ~, or M successive ∗ TMLEs ψn,h (0 ≤ m < M ) all belong to an interval of length smaller than ηn,k , for some n,k+m user-supplied integers Kmax , M and small positive numbers hmin and ηn,k , the former chosen such that H∩]0, hmin [ is non-empty and the latter possibly sample-size- and data-driven. The choice of Kmax would typically be driven by considerations about the computational time. The choice of hmin would typically depend on the collection {Ĝh : h ∈ H} of h-specific algorithms, h ≤ hmin meaning that too much undersmoothing is certainly at play when using Ĝh . We would suggest ∗ 2 ≡ Υ (P ∗ choosing M ≡ 3 and characterizing ηn,k by ηn,k Pn n,hn,k )/10n with ΥPn : M → R+ given by n  ∗ ΥPn (P ) ≡ EPn D (P )(O) 2  1X ∗ = D (P )(Oi )2 . n i=1 ∗ The definition of ΥPn is justified by the fact that ΥPn (D∗ (Pn,h )) estimates the asymptotic variance n ∗ ) in the context where we prove (3) (with IF = D∗ (P0 )) in Section 3.3. of the TMLE Ψ(Pn,h n 3.5 Selecting one of the finitely many collaborative TMLEs It remains to determine which TMLE to select among the collection of collaborative TMLEs that we constructed in Section 3.4. Again, the selection hinges on the cross-validation principle. The recursive construction described in Section 3.4 can be applied to the empirical measure Pn of any subset of the complete data set. Starting from hn,CV (as defined in (27) even when Pn differs from Pn ), let the 5-tuple (Hn,1 , Q̄∗n,Hn,1 , Q∗n,Hn,1 , P∗n,Hn,1 , Ψ(P∗n,Hn,1 )) be defined like ∗ ∗ the 5-tuple (hn,1 , Q̄∗n,hn,1 , Q∗n,hn,1 , Pn,h , ψn,h ) with Pn substituted for Pn , under assumptions n,1 n,1 B1(Pn , 1) to B5(Pn , 1). Then, recursively, let (Hn,k , Q̄∗n,Hn,k , Q∗n,Hn,k , P∗n,Hn,k , Ψ(P∗n,Hn,k )) be defined ∗ ∗ like (hn,k , Q̄∗n,hn,k , Q∗n,hn,k , Pn,h , ψn,h ) with Pn substituted for Pn , under assumptions B1(Pn , k) n,k n,k to B5(Pn , k). The recursive construction is stopped when Kn 5-tuples have been derived, where Kn is defined like Kn with Pn substituted for Pn . The collection n o (Hn,k , Q̄∗n,Hn,k , Q∗n,Hn,k , P∗n,Hn,k , Ψ(P∗n,Hn,k )) : 1 ≤ k ≤ Kn (29) of Kn collaborative TMLEs is used to define a continuum of collaborative TMLEs in the following straightforward way. The challenge is to associate a 4-tuple (Q̄∗n,h , Q∗n,h , P∗n,h , Ψ(P∗n,h )) to any h ∈ H∩]0, hn,CV ]. To do so, we simply let Hn (h) be the element of {Hn,k : 1 ≤ k ≤ Kn } that is closest to h (with a preference for the larger of the two closer ones when h is right in the middle), that is, formally, we set n o Hn (h) ≡ max Hn,k : |h − Hn,k | = min{|h − Hn,` | : 1 ≤ ` ≤ Kn } (30) 13 and associate to h the corresponding 4-tuple (Q̄∗n,Hn (h) , Q∗n,Hn (h) , P∗n,Hn (h) , Ψ(P∗n,Hn (h) )). Let Bn be the cross-validation scheme introduced in Section 3.3. By convention, let the max of the empty set be 0. The collaborative TMLE that we select is ∗ ∗ ) , ψn,h (Q̄∗n,hn,κn , Q∗n,hn,κn , Pn,h n,κn n,κn where κn is given by ( κn ≡ 1 ∨ max 1 ≤ k ≤ Kn : hn,k ≥ arg min h∈H∩]0,hn,CV ]  1 L (Q̄∗n,Hn (h) EBn Pn,B n 2 (31) 0 Pn =Pn,B n ) )) . (32) In words, κn is the unique element of {1, . . . , Kn } such that hn,κn is the smallest element of {hn,1 , . . . , hn,Kn } that is larger than the minimizer of the cross-validated L2 -risk of the collaborative TMLE, if there exists such an element, and 1 otherwise. In (32), Q̄∗n,Hn (h) Pn =P 0 equals n,Bn 0 Q̄∗n,Hn (h) when Pn = Pn,B . n The contrast between hn,κn and hn,CV is stark. At first glance, the main difference is that the role play by cross-validated L1 -risks of algorithms to estimate G0 in (27) is played by cross-validated L2 -risks of algorithms to estimate Q̄0 in (32). A closer examination reveals that the difference is ∗ 0∗ 0 deeper. Replacing L1 (Ĝh (Pn,B )) by L2 (Q̄0∗ n,Bn h ) (with Q̄n,Bn ,h defined like Q̄n,h in Section 3.2 but n 0 instead of Pn ) would not make of the resulting alternative cross-validated selector of based on Pn,B n h a good candidate: because of the inherent lack of cooperation between the uncooperative TMLEs ∗ , the resulting estimator of G would not even be consistent. This fact motivates the general ψn,h 0 C-TMLE methodology, of which the present instantiation includes a twist consisting in solving two critical equations, see (28). 3.6 Asymptotics ∗ hinges on Theorem 1. The study of the asymptotic properties of the collaborative TMLE ψn,h n,κn We first specify two pseudo-distances dG and dQ on G and Q in light of requirement (1). On the one hand, because we will eventually assume that G0 is bounded away from zero and one, (16) yields that we can choose dG such that, for each G1 , G2 ∈ G, dG (G1 , G2 )2 ≡ P0 (G1 − G2 )2 . On the other hand, note that any data-dependent Qn ≡ (QW,n , Q̄n ) ∈ Q naturally gives rise to a substitution estimator ψn of ψ0 : ψn ≡ EQW,n n  1X  Q̄n (1, W ) − Q̄n (0, W ) = Q̄n (1, Wi ) − Q̄n (0, Wi ) . n i=1 It is easy to check (see the appendix) that the following result holds. Lemma 3. Assume that G0 is bounded away from zero and one and that Q̄n (1, ·) − Q̄n (0, ·) falls in a P0 -Donsker class with P0 -probability tending to one. If P0 (Q̄n − Q̄1 )2 = oP (1) for some Q̄1 , then ψn = P0 (Q̄1 (1, ·) − Q̄1 (0, ·)) + oP (1). 14 Since we always estimate the marginal law of W under P0 , QW,0 , with its empirical counterpart QW,n , we can thus define the pseudo-distance dQ by setting, for each Q1 , Q2 ∈ Q, dQ (Q1 , Q2 )2 ≡ P0 (Q̄1 − Q̄2 )2 , an expression that does not depend on the first components of Q1 and Q2 . Consider the following inter-dependent assumptions. The first one is related to A1(Q, h, c) and completes B5(Pn , hn,κn ). C1 There exists a universal constant C1 ∈]0, 1/2[ such that G0 and any by-product Gn,h of algorithm Ĝh (any h ∈ H) trained on the empirical measure Pn take their values in [C1 , 1 − C1 ]. Moreover, there exists an open neighborhood T ⊂ H of hn,κn and a universal constant C2 > 0 such that t 7→ Gn,t (W ) is twice differentiable over T (P0 -almost surely) and, P0 -almost surely, sup h∈T d2 d Gn,t (W )|t=h ∨ sup G (W )|t=h ≤ C2 . 2 n,t dt h∈T dt When C1 is met, we denote G0n,h (W ) the first derivative of t 7→ Gn,t (W ) at h ∈ H. C2 Both Gn,hn,κn and Q̄∗n,hn,κn converge in L2 (P0 ), to G0 and Q̄1 respectively. Moreover, it holds √ that P0 (Gn,hn,κn − G0 )2 = oP (1/ n) and P0 (Gn,hn,κn − G0 )2 × P0 (Q̄∗n,hn,κn − Q̄1 )2 = oP (1/n). √ C3 Assumption A4 is met, (hn,κn − h̃n )2 = oP (1/ n) and (hn,κn − h̃n )2 × P0 (Q̄∗n,hn,κn − Q̄1 )2 = oP (1/n). C4 With P0 -probability tending to one, Q̄∗n,hn,κn , Gn,hn,κn , Gn,h̃n and G0n,hn,κn fall in P0 -Donsker classes. We are now in a position to state the corollary of Theorem 1 that describes the asymptotic properties of the collaborative TMLE targeting the average treatment effect. Corollary 4 (Asymptotics of the collaborative TMLE – targeting the average treatment effect). Suppose that assumptions B1(·, ·) to B5(·, ·) that we made in Sections 3.4 and 3.5 when constructing the collaborative TMLE given in (31) are met. In addition, suppose that C1 to C4 are satisfied. Then √ ∗ ψn,h − Ψ(P0 ) = (Pn − P0 ) (D∗ (Q1 , G0 ) + ∆(P1 )) + oP (1/ n). n,κn √ ∗ − Ψ(P0 )) converges in law By the central limit theorem, the corrolary implies that n(ψn,h n,κn 2 ∗ to the centered Gaussian law with a variance σ ≡ P0 (D (Q1 , G0 ) + ∆(P1 ))2 . Therefore, provided that we can estimate σ 2 consistently (or conservatively), we can build CIs for Ψ(P0 ) with a given asymptotic level. Sections 4, 5 and 6 investigate the practical implementation of the collaborative TMLE and its performances in a simulation study. 4 Collaborative TMLE for continuous tuning when inferring the average treatment effect: practical implementation In this section, we describe the practical implementation of the two instantiations of the collaborative TMLE algorithm presented and studied in Section 3. In both of them, the collection ˆ is left {Ĝh : h ∈ H} is embodied in R by the glmnet algorithm [3]. The nature of algorithm Q̄ ˆ on P at the beginining of the unspecified. As for Q̄0n , it is obtained once and for all by training Q̄ n ˆ procedure. More specifically, we never evaluate Q̄(Pn ) for Pn 6= Pn . 15 4.1 LASSO-C-TMLE We now describe our LASSO-C-TMLE algorithm. Recall that Pn denotes the empirical measure of a generic subset of the complete data set. The following algorithm implements the theoretical procedure laid out in Sections 3.4 and 3.5. 1. Build a sequence {Gn,h ≡ Ĝh (Pn ) : h ∈ H100 } by computing a discretized version of the path of the LASSO logistic regression of A on W with a regularization parameter h ranging in the set H100 provided by cv.glmnet with options nlambda=100 (hence card(H100 ) = 100) and nfolds=10. Set hmin ≡ min H100 and let hn,CV be equal to lambda.min. 2. Build a sequence {Gn,h ≡ Ĝh (Pn ) : h ∈ H100 ∩ [hmin , hn,CV )} by computing a discretized version of the path of the LASSO logistic regression of A on W with a regularization parameter h ranging in H100 ∩ [hmin , hn,CV ) using glmnet with a lambda set to H100 ∩ [hmin , hn,CV ) from step 1. Set k ≡ 1 and Hn,k−1 ≡ hn,CV . based on Gn,h (and 3. For every h ∈ H100 ∩ [hmin , Hn,k−1 ), determine Q̄kn,h by fluctuating Q̄k−1 n Pn ) as Section 3.2. 4. Identify the minimizer Hn,k of h 7→ Pn L2 (Q̄kn,h ) over H100 ∩ [hmin , Hn,k−1 ), define and store Q̄∗n,h ≡ Q̄kn,h for every h ∈ H100 ∩ [Hn,k , Hn,k−1 ), and finally define Q̄kn ≡ Q̄kn,hn,k . 5. As long as Hn,k > hmin , set k ← k + 1 and repeat steps 3 and 4 recursively. The algorithm necessarily converges in a finite number of repetitions of step 4. Let Kn be the number of repetitions. For every 1 ≤ k ≤ Kn , set Q∗n,Hn,k ≡ (QW,n , Q̄∗n,Hn,k ) ∈ Q (its first component is the empirical law of W under Pn ) and let P∗n,Hn,k ∈ M be any element of model M of which the Q-component equals Q∗n,Hn,k . The collection (29) of Kn collaborative TMLEs and mapping h 7→ Hn (h) over H100 [hmin , hn,CV ) as in (30) are thus now well defined. Recall the definition of the cross-validation scheme Bn introduced in Section 3.3. Set   1 ~(Pn ) ≡ arg min EBn Pn,Bn L2 ( Q̄n,Hn (h) P =P 0 ) n h∈H100 ∩[hmin ,hn,CV ) n,Bn and run once steps 1 to 5 with Pn ≡ Pn , hence the collection n o ∗ ∗ (hn,k , Q̄∗n,hn,k , Q∗n,hn,k , Pn,h , Ψ(P )) : 1 ≤ k ≤ K n n,h n,k n,k of collaborative TMLEs. Finally, set κn ≡ 1 ∨ max {1 ≤ k ≤ Kn : hn,k ≥ ~(Pn )} . ∗ The collaborative TMLE that we select, our LASSO-C-TMLE estimator, is Ψ(Pn,h ), as in (31). n,κn 4.2 LASSO-PSEUDO-C-TMLE The LASSO-C-TMLE procedure described in Section 4.1 is quite demanding computationally. It is thus tempting to try and develop an alternative algorithm that would mimick LASSO-C-TMLE but be simpler. 16 In Section 3.5, we emphasized (see comment before statement of theorem) that one of the keys of LASSO-C-TMLE is to ensure the existence of hn ∈ H and Q̄∗n,hn such that Pn ∂hn D∗ (Q̄∗n,hn , Gn,· ) = 0. If we knew how to compute the derivative G0n,h (W ) of t 7→ Gn,t (W ) at t = h, then this could be ˆ (P ). Specifically, in light of (19) easily achieved by enriching the fluctuation of the initial Q̄0 ≡ Q̄ n n and (20), given any h ∈ H, we would define  Ch+ (Gn,· )(A, W ) ≡ C(Gn,h )(A, W ) 1, G0n,h (W ) , (33) introduce Q̄0n,h,ε+ characterized for any ε+ ∈ R2 by    logit Q̄0n,h,ε+ (A, W ) ≡ logit Q̄0n (A, W ) + Ch+ (Gn,· )(A, W )ε+ 0 0 and Pn,h,ε + ∈ M defined like Pn,h,ε except that the conditional expectation of Y given (A, W ) 0 0 0 under Pn,h,ε + equals Q̄n,h,ε+ (and not Q̄n,h,ε ). Then, the optimal fluctuation would be indexed by the minimizer of the empirical risk 0 ε+ n,h ≡ arg min Pn L2 (Q̄n,h,ε+ ). ε+ ∈R2 ∗+ 0 0 It would result in Q̄∗+ n,h ≡ Q̄n,h,ε+ , Pn,h ≡ Pn,h,ε+ and the TMLE n,h n ∗+ ∗+ )= ≡ Ψ(Pn,h ψn,h  1 X  ∗+ (0, W ) Q̄n,h (1, Wi ) − Q̄∗+ i n,h n i=1 where, by construction, we would have ∗+ ∗ Pn D∗ (Q̄∗+ n,h , Gn,h ) = Pn ∂h D (Q̄n,h , Gn,h ) = 0. The LASSO-PSEUDO-C-TMLE algorithm that we now describe adapts the above procedure. It unfolds as follows. 1. Build a sequence {Gn,h ≡ Ĝh (Pn ) : h ∈ H100 } by computing a discretized version of the path of the LASSO logistic regression of A on W with a regularization parameter h ranging in the set H100 provided by cv.glmnet with option nlambda=100 (hence card(H100 ) = 100). Let hn be equal to lambda.min. Our estimator of G0 is Gn,hn . 2. Choose arbitrarily h+ n ∈ arg min{|h − hn | : h ∈ H100 , h 6= hn } and, for every 1 ≤ i ≤ n, define G0+ n,hn (Wi ) ≡ Gn,h+ (Wi ) − Gn,hn (Wi ) n h+ n − hn , a rudimentary numerical approximation of the derivative G0n,hn (Wi ) of t 7→ Gn,t (Wi ) at t = hn . ∗+ 0+ 0 3. Determine Q̄∗+ n,hn and Pn,hn as described above, with h = hn and Gn,hn substituted for Gn,hn in (33). ∗+ . The LASSO-PSEUDO-C-TMLE estimator is ψn,h n 17 5 Main simulation study In this section, we present the results of a multi-faceted simulation study of the behaviors and performances of the two instantiations of the collaborative TMLE described in Section 4. Section 5.1 specifies the synthetic data-generating distribution P0 that we use, Section 5.2 introduces the competing estimators, Section 5.3 outlines the structure of the simulation study, and Section 5.4 gathers its results. Written in R [16], our code makes extensive use of the C-TMLE package [5]. 5.1 Synthetic data-generating distribution Our synthetic data-generating distribution P0 = Π0,p,δ depends on two fine-tune parameters: the dimension p of the baseline covariate W and a nonnegative constant δ ≥ 0. Sampling O ≡ (W, A, Y ) under Π0,p,δ unfolds sequentially along the following steps. 1. Sample W̃ from the centered Gaussian law on RM , M = dp/10e, of which the covariance matrix Σ is the block-diagonal matrix (Akl )1≤k,l≤M where: A11 is the 10 × 10 identity matrix; each Akk for 1 < k ≤ M is the block-diagonal matrix (Bk,st )1≤s,t≤4 with  Bk,11  1 0 .25 1 .25  , = 0 .25 .25 1  Bk,22 = Bk,33 = 1 .5 .5 1   , Bk,44  1 .5 0 =  .5 1 0  0 0 1 and Bk,st is a zero matrix for 1 ≤ s 6= t ≤ 4; each Akl for 1 ≤ k 6= l ≤ M is a zero matrix. If p = 10, then Σ = A11 and we set W ≡ W̃ . If M > 10p, then we set W ≡ (W̃1 , . . . , W̃p )> . 2. Sample A conditionally on W from the Bernoulli law with paramater ! p X βk Wk , G0 (W ) ≡ expit δ + k=1 where (β1 , · · · , βp ) = (1, 1, 3/(p − 2), . . . , 3/(p − 2)). 3. Sample Ỹ conditionally on (A, W ) from the Gaussian law with (conditional) variance 1/25 and expectation 2 f0 (A, W ) ≡ (1 + W1 + W2 + W5 + W6 + W8 + A), 5 then define Y ≡ expit(Ỹ ). The covariance matrix Σ induces a loose dependence structure. The components of W̃ can be gathered in 1 + 4 × (M − 1) independent groups, one group consisting of 10 + (M − 1) independent random variables, and the other groups consisting of either two or three mildly dependent random variables (with correlations equal to either 0.25 or 0.5). Neither Z Q̄0 (A, W ) ≡ [0,1] 2 /50 e−[logit(u)−f0 (A,W )] √ 10 π(1 − u) du nor Ψ(Π0,p,δ ) has a closed form expression. Independently of p and δ, Ψ(Π0,p,δ ) ≈ 0.0799. 18 5.2 Competing estimators Let O1 , . . . , On be independent draws from P0 . Recall the characterization of Ĝh (h ∈ H100 ) and ˆ for the estimation of Q̄ consist definition of hn,CV given in Section 4.1, step 1. Let the algorithm Q̄ 0 in fitting the working model {Q̄θ : θ = (θ0 , θ1 ), θ0 , θ1 ∈ R8 } where Q̄θ is given by   Q̄θ (A, W ) ≡ Φ (Aθ1> + (1 − A)θ0> ))(W3 , . . . , W10 )> with Φ the distribution function of the standard normal law. Note that the working model is necessarily mis-specified, notably because of the absence of W1 and W2 in the above definition. ˆ ˆ on the whole data set once and for all. To emphasize, Q̄ Recall that Q̄0n is obtained by training Q̄ is never re-trained during the cross-validation procedure. This is consistent with implementation the original instantiation of the C-TMLE algorithm and of its scalable instantiations. We compare the LASSO-C-TMLE and LASSO-PSEUDO-C-TMLE estimators of Ψ(Π0,p,δ ) from Section 4 with the following commonly used competitors: • the unadjusted estimator: ψnunadj Pn Pn Ai Yi (1 − Ai )Yi i=1 ≡ Pn ; − Pi=1 n i=1 Ai i=1 (1 − Ai ) • the so called G-comp estimator [17]: ψnG-comp n  1X 0 ≡ Q̄n (1, Wi ) − Q̄0n (0, Wi ) ; n i=1 • the so called IPTW estimator [9, 21]: n ψnIPTW ≡ 1 X (2Ai − 1)Yi ; n Gn,hCV (Ai , Wi ) i=1 • the so-called A-IPTW estimator [19]: ψnA-IPTW ≡ n n i=1 i=1  1X 0  1X (2Ai − 1) Yi − Q̄0n (Wi , Ai ) + Qn (1, Wi ) − Q0n (0, Wi ) ; n Gn,hCV (Ai , Wi ) n ∗ • and the plain TMLE estimator ψn,h , see (22). n,CV 5.3 Outline of the structure of the simulation study We consider six different scenarios. In each of them, we repeat independently B = 200 times the following steps: for each (n, p, δ) in a collection of scenario-specific triplets, 1. simulate a data set of n independent observations drawn from Π0,p,δ ; 2. derive the LASSO-C-TMLE and LASSO-PSEUDO-C-TMLE estimators of Sections 4.1 and 4.2 as well as the competing estimators presented in Section 5.2; ∗ 3. for the double-robust estimators only, i.e., ψnA-IPTW , ψn,h and our two collaborative TMn,CV LEs, construct 95% CIs and check whether or not each of them contains Ψ(Π0,p,δ ). 19 Building confidence intervals based on the collaborative TMLEs. By Corollary 4, the asymptotic variances of our collaborative TMLEs both write as VarP0 [(D∗ (Q1 , G0 ) + ∆(P1 )) (O)] . (34) ∗ Because ∆(P1 ) is difficult to estimate, we estimate (34) with the empirical variance of D∗ (Pn,h ), n,κn i.e., with n 1X ∗ ∗ 2 ∗ ) = Pn D∗ (Pn,h D (Pn,hn,κn )(Oi )2 n,κn n i=1 ∗ Pn D∗ (Pn,h ) n,κn (recall that TMLEs take the form = 0 by construction). Therefore, the 95% CIs based on our collaborative q ∗ ∗ ± 1.96 ψn,h )2 /n. Pn D∗ (Pn,h n,κn n,κ n We anticipate that the asymptotic variances are over-estimated, resulting in CIs that are too wide. However, we also anticipate that the omitted correction term is of second order relative to main term, or, put in other words, that the difference between (34) and VarP0 (D∗ (Q1 , G0 )(O)) is small. Six scenarios. The three first scenarios investigate what happens when δ = 0 and the number of covariates p increases as a function of sample size n. In scenario 1, p = 0.2 × n and we increase n. √ In scenario 2, p = b2.83 × nc and we increase n. In scenario 3, p = b7.6 × log nc and we increase n. The values of the pairs (p, n) used in these scenarios are presented in Table 0. The constants 0.2, 2.83 and 7.6 are chosen so that p = 40 at sample size n = 200 in the three scenarios. Table 0: Values of p and n in scenarios 1, 2 and 3. n p in scenario 1 p in scenario 2 p in scenario 3 200 40 40 40 400 80 56 45 600 120 69 48 800 160 80 50 1000 200 89 52 1200 240 98 53 1400 280 105 55 1600 320 113 56 1800 360 120 56 2000 400 126 57 In scenarios 4 and 5, we still set δ = 0 and either keep p fixed and increase n (scenario 4) or keep n fixed and increase p (scenario 5). Finally, in scenario 6, we keep n and p fixed and challenge the positivity assumptions that G0 is bounded away from 0 and 1 by progressively increasing δ. In each scenario and for all estimators, we report in a table the average bias (bias, multiplied by 10), standard error (SE, multiplied by 10) and mean squared error (MSE, multiplied by 100) across (b) the B = 200 repetitions. Specifically, if {φn : 1 ≤ b ≤ B} are the B realizations of an estimator of P 1:B (b) ψ0 = Ψ(Π0,p,δ ) based on n independent draws from Π0,p,δ , then we call φn ≡ B −1 B b=1 (φn − ψ0 ) P P 1:B 1:B (b) (b) B 2 1/2 the standard error, and (φ 2 −1 the average bias, (B −1 B n ) +B b=1 (φn − φn ) ) b=1 (φn − 1:B φn )2 the mean squared error. We also represent in a series of figures how MSE, the empirical coverage of the 95% CIs and their widths evolve as the sample size (scenarios 1 to 4) or number of covariates (scenario 5) or parameter δ (scenario 6) increase. To ease comparisons, all similar figures share the same x- and y-axes. 5.4 Results √ Scenarios 1, 2, and 3: increasing n and setting p = 0.2n, b2.83 nc, b7.6 log nc. The results of the three simulation studies under scenarios 1, 2 and 3 are best presented and commented 20 upon altogether. Figure 1 and Table 1 summarize the numerical findings under scenario 1; Figure 2 and Table 2 summarize the numerical findings under scenario 2; Figure 3 and Table 3 summarize the numerical findings under scenario 3. Figures 1a, 2a and 3a reveal a general trend: MSE decreases as sample size n increases, despite the fact that the number of covariates p also increases (at different n-rates in each scenario). Overall, LASSO-C-TMLE and LASSO-PSEUDO-C-TMLE perform similarly and better than TMLE; TMLE outperforms IPTW, and IPTW outperforms A-IPTW. Moreover, the gap between LASSOC-TMLE, LASSO-PSEUDO-C-TMLE on the one hand and TMLE on the other hand (i) reduces as sample size n increases (in each scenario), and (ii) reduces as p decreases (for each sample size n, across scenarios). Judging by Tables 1, 2 and 3, the unadjusted, G-comp, IPTW and A-IPTW estimators are strongly biased. The TMLE estimator is strongly biased too, even for large sample size n, when the number of covariates p is not sufficiently small. Note however that the bias of TMLE vanishes at sample size n = 2000 in scenario 2 (then, p = 126) and at sample size n ∈ {1000, 2000} (then, p ∈ {52, 57}). Double-robustness is in action. In contrast, the LASSO-C-TMLE and LASSOPSEUDO-C-TMLE estimators are both essentially unbiased in all configurations. Tables 1, 2 and 3 also reveal that the variance of the TMLE estimator tends to be smaller than those of the LASSO-C-TMLE and LASSO-PSEUDO-C-TMLE estimators, those last two variances being very similar. Moreover, the gap between them tends to diminish as sample size n increases, in all scenarios. We now turn to Figures 1b, 2b and 3b. The LASSO-C-TMLE estimator performs best in terms of empirical coverage, followed by the LASSO-PSEUDO-C-TMLE, TMLE and A-IPTW estimators, in that order. At moderate sample size, the superiority of LASSO-C-TMLE-based CIs over the others is striking. However, even they fail to provide the wished coverage except when sample size n is large (say, larger than 1500). As a side note, we recall that if S is drawn from the Binomial law with parameter (B, q) = (200, q), then S ≤ 185 with probability approximately 8% for q = 95%, 22% for q = 94% and 43% for q = 93%. In this light, an empirical coverage of 7.5% is not that abnormal for B = 200 independent CIs of exact coverage q = 93%, and even q = 94%. Moreover, we anticipated to get conservative CIs because of how we estimate the asymptotic variance of the LASSO-C-TMLE estimator, see Section 5.3. The fact that the “ratio” entries of Table 3, scenario 3, are that close to one for the LASSO-C-TMLE estimator at sample size n ∈ {1000, 2000} (not to mention at sample size n = 2000 in Table 1, scenario 1) reveals that little over-estimation of the asymptotic variance is at play. Finally, we see in Figures 1c, 2c and 3c that the CIs based on the LASSO-C-TMLE and LASSO-PSEUDO-C-TMLE estimators are systematically slightly wider and slightly narrower than those based on the TMLE estimator, all much narrower than those based on the A-IPTW estimator. Scenario 4: keeping p fixed and increasing n. Figure 4 and Table 4 summarize the numerical findings under scenario 4, where the number of covariates p is set to 40 and sample size n goes from 200 to 2000 by steps of 200. We observe the same trend in Figure 4a as in Figures 1a, 2a and 3a: MSE decreases as sample size n increases; overall, LASSO-C-TMLE and LASSO-PSEUDO-C-TMLE perform similarly and better than TMLE; TMLE outperforms IPTW, and IPTW outperforms A-IPTW. Moreover, the gap between LASSO-C-TMLE, LASSO-PSEUDO-C-TMLE on the one hand and TMLE on the other hand vanishes completely as sample size increases, whereas it only got smaller in scenarios 1, 2, 3. 21 estimator 0.100 ● ● MSE 0.075 L−C−TMLE ● 0.050 TMLE ● LP−C−TMLE ● ● 0.025 ● ● ● A−IPTW ● IPTW 0.000 500 1000 1500 2000 sample size ● ● ● ● ● ● ● ● ● ● 2.0 estimator 0.50 0.40 0.30 0.20 ● ratio of CI width 1 − CI coverage (a) MSE for five of the seven estimators. The MSE of the A-IPTW estimator is so large that it does not fit in the picture. MSE is multiplied by 100. TMLE A−IPTW 500 1000 1500 LP−C−TMLE ● ● ● ● ● ● ● ● ● ● A−IPTW 0.8 2000 500 sample size TMLE L−C−TMLE 1.2 LP−C−TMLE 0.05 0.04 0.03 0.02 ● 1.6 L−C−TMLE 0.10 estimator 1000 1500 2000 sample size (b) Coverage of 95% CIs based on the doublerobust estimators. (c) Relative width of 95% CIs based on the double-robust estimators w.r.t. that of the plain ∗ TMLE, ψn,h . n,CV Figure 1: Scenario 1. We fix the ratio p/n = 0.2, and increase the sample size n from 200 to 2000. n 200 1000 2000 bias SE MSE ratio bias SE MSE ratio bias SE MSE ratio ψnunadj 1.259 0.236 1.641 ψnG-comp 1.212 0.152 1.491 ψnIPTW 0.435 0.320 0.291 1.171 0.110 1.382 1.206 0.066 1.459 0.279 0.157 0.103 1.175 0.076 1.386 1.217 0.047 1.483 0.232 0.120 0.068 ψnA-IPTW 0.632 0.137 0.418 1.414 0.407 0.061 0.169 1.765 0.339 0.050 0.118 1.666 ∗ ψn,h n,CV 0.327 0.151 0.130 0.882 0.189 0.064 0.040 0.969 0.134 0.045 0.020 0.959 L-C-TMLE LP-C-TMLE -0.007 0.242 0.059 0.577 0.032 0.083 0.008 0.882 0.014 0.050 0.003 1.062 0.039 0.260 0.069 0.466 0.026 0.091 0.009 0.632 0.020 0.069 0.005 0.626 Table 1: Scenario 1. The performance of each estimator at sample size n ∈ {200, 1000, 2000}, with ratio p/n = 0.2. The columns named L-C-TMLE and LP-C-TMLE correspond to the LASSOC-TMLE and LASSO-PSEUDO-C-TMLE estimators, respectively. Rows ratio report the ratios of the average of the SE estimates across the B repetitions to the empirical SE. Bias and SE are multiplied by 10, and MSE is multiplied by 100. 22 estimator 0.100 ● TMLE 0.075 MSE L−C−TMLE 0.050 ● LP−C−TMLE ● ● 0.025 ● ● A−IPTW ● ● ● ● IPTW 0.000 500 1000 1500 2000 sample size ● 0.50 0.40 0.30 0.20 ● ● ● ● ● ● ● ● 2.0 estimator ● ● ratio of CI width 1 − CI coverage (a) MSE for five of the seven estimators. TMLE A−IPTW 500 1000 1500 LP−C−TMLE ● ● ● ● ● ● ● ● ● ● A−IPTW 0.8 2000 500 sample size TMLE L−C−TMLE 1.2 LP−C−TMLE 0.05 0.04 0.03 0.02 ● 1.6 L−C−TMLE 0.10 estimator 1000 1500 2000 sample size (b) Coverage of 95% CIs based on the doublerobust estimators. MSE is multiplied by 100. (c) Relative width of 95% CIs based on the double-robust estimators w.r.t. that of the plain ∗ TMLE, ψn,h . n,CV √ Figure 2: Scenario 2. We increase the sample size n from 200 to 2000 and set p = b2.83 nc. n 200 1000 2000 bias SE MSE ratio bias SE MSE ratio bias SE MSE ratio ψnunadj 1.242 0.221 1.592 ψnG-comp 1.173 0.157 1.401 ψnIPTW 0.469 0.278 0.297 1.216 0.104 1.489 1.214 0.068 1.479 0.271 0.184 0.107 1.192 0.075 1.426 1.214 0.051 1.477 0.201 0.140 0.060 ψnA-IPTW 0.614 0.135 0.395 1.377 0.361 0.077 0.136 1.505 0.274 0.061 0.079 1.488 ∗ ψn,h n,CV 0.322 0.156 0.128 0.857 0.126 0.064 0.020 0.965 0.080 0.051 0.009 0.870 L-C-TMLE LP-C-TMLE 0.014 0.226 0.051 0.630 0.003 0.076 0.006 0.862 0.007 0.053 0.003 0.898 0.018 0.217 0.048 0.553 0.019 0.074 0.006 0.790 0.018 0.049 0.003 0.904 Table 2: Scenario 2. The performance of each estimator at sample size n ∈ {200, 1000, 2000}, √ with ratio p = b2.83 nc. The columns named L-C-TMLE and LP-C-TMLE correspond to the LASSO-C-TMLE and LASSO-PSEUDO-C-TMLE estimators, respectively. Rows ratio report the ratios of the average of the SE estimates across the B repetitions to the empirical SE. Bias and SE are multiplied by 10, and MSE is multiplied by 100. 23 estimator 0.100 ● TMLE 0.075 MSE L−C−TMLE 0.050 LP−C−TMLE ● 0.025 A−IPTW ● ● 0.000 500 ● ● 1000 ● ● 1500 ● IPTW ● 2000 sample size ● 0.50 0.40 0.30 0.20 2.0 estimator ● ● ● ● 0.10 ratio of CI width 1 − CI coverage (a) MSE for five of the seven estimators. MSE is multiplied by 100. TMLE ● ● ● 0.05 0.04 0.03 0.02 ● A−IPTW 500 1000 1500 LP−C−TMLE ● ● ● ● ● ● ● ● ● ● A−IPTW 0.8 2000 500 sample size TMLE L−C−TMLE 1.2 LP−C−TMLE ● ● 1.6 L−C−TMLE ● estimator 1000 1500 2000 sample size (b) Coverage of 95% CIs based on the doublerobust estimators. (c) Relative width of 95% CIs based on the double-robust estimators w.r.t. that of the plain ∗ TMLE, ψn,h . n,CV Figure 3: Scenario 3. We increase the sample size n from 200 to 2000 and keep p = b7.6 log(n)c. n 200 1000 2000 bias SE MSE ratio bias SE MSE ratio bias SE MSE ratio ψnunadj 1.244 0.228 1.600 ψnG-comp 1.190 0.148 1.439 ψnIPTW 0.427 0.316 0.282 1.242 0.114 1.555 1.208 0.077 1.465 0.224 0.219 0.098 1.227 0.074 1.511 1.205 0.050 1.453 0.159 0.157 0.050 ψnA-IPTW 0.634 0.136 0.420 1.363 0.286 0.086 0.089 1.544 0.185 0.066 0.039 1.552 ∗ ψn,h n,CV 0.314 0.170 0.128 0.777 0.056 0.065 0.007 0.995 0.019 0.046 0.003 1.023 L-C-TMLE LP-C-TMLE -0.009 0.239 0.057 0.598 -0.008 0.071 0.005 0.992 -0.006 0.053 0.003 0.978 0.014 0.241 0.058 0.502 -0.006 0.069 0.005 0.894 -0.003 0.050 0.002 0.942 Table 3: Scenario 3. The performance of each estimator at sample size n ∈ {200, 1000, 2000}, with p = b7.6 log(n)c. The columns named L-C-TMLE and LP-C-TMLE correspond to the LASSO-CTMLE and LASSO-PSEUDO-C-TMLE estimators, respectively. Rows ratio report the ratios of the average of the SE estimates across the B repetitions to the empirical SE. Bias and SE are multiplied by 10, and MSE is multiplied by 100. 24 Judging by Table 4, the unadjusted, G-comp, IPTW and A-IPTW estimators are strongly biased whereas the LASSO-C-TMLE and LASSO-PSEUDO-C-TMLE estimators are both essentially unbiased even at small sample size n = 200. The TMLE estimator is strongly biased too at sample size n = 200, but much less so as n increases, with no bias at all at n = 2000. Again, doublerobustness is in action. Moreover, there is little if any difference between the LASSO-C-TMLE, LASSO-PSEUDO-C-TMLE and TMLE estimators in terms of bias, SE and MSE for sample size n ∈ {1000, 2000}. Figure 4b reveals that, at sample sizes n ≥ 1000, the empirical coverage of the CIs based on the LASSO-C-TMLE and LASSO-PSEUDO-C-TMLE estimators is satisfactory, and that CIs based on the TMLE estimator may provide more coverage than wished. By Table 4 (ratio rows), the estimation of the actual variance of the LASSO-C-TMLE and TMLE estimator is quite good at sample size n ∈ {1000, 2000}. Apparently, the variance of the LASSO-PSEUDO-C-TMLE estimator is under-estimated at sample size n = 1000, but much better estimated at sample size n = 2000. Scenario 5: keeping n fixed and increasing p. Figure 5 and Table 5 summarize the numerical findings under scenario 5, where the sample size n is set to 1000 and the number of covariates p ranges over {50, 75, 100, 150, 200}. The take home message of Figure 5a is that, in terms of MSE, the LASSO-C-TMLE and LASSOPSEUDO-C-TMLE estimators outperform the TMLE estimator, which outperforms the IPTW and A-IPTW estimators. Figure 5b further shows that the above message is also valid when considering the empirical coverage of the CIs based on the different estimators. As the number of covariates p increases, all the empirical coverage degrade. However, the CIs based on the LASSO-C-TMLE estimator behave remarkably better than those based on the LASSO-PSEUDO-C-TMLE estimator, which are themselves superior to those based on the TMLE estimator. Examining Table 5 helps to better understand the general pattern. The unadjusted, G-comp, IPTW and A-IPTW estimators are too strongly biased to compete. The TMLE estimator performs rather well when the number of covariates p equals 50, like the LASSO-C-TMLE and LASSOPSEUDO-C-TMLE estimators. However, when p ∈ {100, 200}, then the TMLE estimator is too biased to compete too – even double-robustness does not help yet at the moderate sample size of n = 1000. In contrast, the LASSO-C-TMLE and LASSO-PSEUDO-C-TMLE estimators are essentially unbiased, and exhibit relatively small variances (compared to all the variances reported in Tables 1, 2, 3, 4. Finally, let us note that the estimation of the variance of the LASSO-C-TMLE estimator is rather good (see the ratio rows of Table 5), as opposed to that of the variance of the LASSO-PSEUDO-C-TMLE estimator. Scenario 6: keeping n and p fixed and challenging the positivity assumption. In this scenario, we study how the level of posivitity violation influences the performance of the estimators, at small sample size n = 100 and with p = 50 covariates, by progressively increasing δ ∈ {0.5+k/10 : 0 ≤ k ≤ 15}. Figure 6a illustrates how the positivity violation is challenged. We recover the fact that δ 7→ Π0,50,δ (A = 1|W ) is increasing. When δ = 2, the law is highly skewed to 1, and the positivity assumption is practically violated. Figures 6b, 6c, 6d and Table 6 summarize the numerical findings under scenario 6. We see in Figure 6 that, overall, the TMLE estimator is much more affected than the LASSOC-TMLE and LASSO-PSEUDO-C-TMLE estimators by the near violation of the positivity assumption at sample size n = 500, and that the LASSO-C-TMLE and LASSO-PSEUDO-C-TMLE estimators behave similarly in terms of MSE and empirical coverage. Judging by Table 6, The unadjusted, G-comp, IPTW, A-IPTW and TMLE estimators are too strongly biased to compete with 25 estimator 0.100 ● TMLE 0.075 MSE L−C−TMLE 0.050 LP−C−TMLE ● 0.025 A−IPTW ● ● 0.000 500 ● ● 1000 ● ● 1500 ● IPTW ● 2000 sample size ● 0.50 0.40 0.30 0.20 2.0 estimator ● ● ● TMLE ● ● ● ● 500 1000 1500 ● ● A−IPTW LP−C−TMLE ● ● ● ● ● ● ● ● ● ● 0.8 ● 2000 500 sample size TMLE L−C−TMLE 1.2 LP−C−TMLE 0.05 0.04 0.03 0.02 estimator 1.6 L−C−TMLE ● 0.10 ratio of CI width 1 − CI coverage (a) MSE for five of the seven estimators. MSE is multiplied by 100. 1000 1500 A−IPTW 2000 sample size (b) Coverage of 95% CIs based on the doublerobust estimators. (c) Relative width of 95% CIs based on the double-robust estimators w.r.t. that of the plain ∗ TMLE, ψn,h . n,CV Figure 4: Scenario 4. We fix the number of covariates p = 40, and increase the sample size n from 200 to 2000. n 200 1000 2000 bias SE MSE ratio bias SE MSE ratio bias SE MSE ratio ψnunadj 1.286 0.226 1.705 ψnG-comp 1.215 0.159 1.501 ψnIPTW 0.485 0.345 0.354 1.259 0.109 1.597 1.191 0.073 1.425 0.213 0.211 0.090 1.260 0.080 1.595 1.202 0.049 1.448 0.117 0.165 0.041 ψnA-IPTW 0.649 0.147 0.443 1.283 0.251 0.090 0.071 1.490 0.140 0.066 0.024 1.673 ∗ ψn,h n,CV L-C-TMLE LP-C-TMLE 0.317 0.172 0.130 0.761 0.028 0.062 0.005 1.062 -0.002 0.046 0.002 1.062 0.020 0.231 0.054 0.594 -0.020 0.076 0.006 0.947 -0.001 0.049 0.002 1.014 0.020 0.259 0.068 0.469 -0.021 0.074 0.006 0.866 -0.002 0.048 0.002 0.974 Table 4: Scenario 4. The performance of each estimator at sample size n ∈ {200, 1000, 2000}, with p = 40. The columns named L-C-TMLE and LP-C-TMLE correspond to the LASSO-C-TMLE and LASSO-PSEUDO-C-TMLE estimators, respectively. Rows ratio report the ratios of the average of the SE estimates across the B repetitions to the empirical SE. Bias and SE are multiplied by 10, and MSE is multiplied by 100. 26 estimator 0.100 TMLE ● 0.075 MSE L−C−TMLE 0.050 ● 0.025 A−IPTW ● ● 0.000 LP−C−TMLE ● ● IPTW 50 100 150 200 number of covariates ● 0.10 ● 2.0 estimator ● 0.50 0.40 0.30 0.20 ● ● ratio of CI width 1 − CI coverage (a) MSE for five of the seven estimators. MSE is multiplied by 100. TMLE A−IPTW TMLE L−C−TMLE 1.2 LP−C−TMLE 0.05 0.04 0.03 0.02 ● 1.6 L−C−TMLE ● estimator LP−C−TMLE ● ● ● ● ● 100 150 200 A−IPTW 0.8 50 100 150 200 50 number of covariates number of covariates (b) Coverage of 95% CIs based on the doublerobust estimators. (c) Relative width of 95% CIs based on the double-robust estimators w.r.t. that of the plain ∗ TMLE, ψn,h . n,CV Figure 5: Scenario 5. We fix the sample size n = 1000, and increase the number of covariates p from 50 to 200. p 50 100 200 bias SE MSE ratio bias SE MSE ratio bias SE MSE ratio ψnunadj 1.237 0.107 1.542 ψnG-comp 1.205 0.072 1.457 ψnIPTW 0.228 0.211 0.096 1.179 0.102 1.402 1.199 0.069 1.443 0.252 0.167 0.091 1.190 0.107 1.428 1.221 0.067 1.494 0.297 0.159 0.114 ψnA-IPTW 0.285 0.090 0.089 1.472 0.357 0.073 0.133 1.561 0.417 0.067 0.178 1.591 ∗ ψn,h n,CV 0.053 0.065 0.007 0.983 0.130 0.071 0.022 0.867 0.179 0.060 0.036 1.009 L-C-TMLE LP-C-TMLE -0.017 0.071 0.005 0.998 0.005 0.072 0.005 0.896 0.024 0.077 0.006 0.933 -0.008 0.072 0.005 0.864 0.013 0.075 0.006 0.791 0.024 0.089 0.009 0.645 Table 5: Scenario 5. The performance of each estimator at sample size n = 1000, with p ∈ {50, 100, 200}. The columns named L-C-TMLE and LP-C-TMLE correspond to the LASSO-CTMLE and LASSO-PSEUDO-C-TMLE estimators, respectively. Rows ratio report the ratios of the average of the SE estimates across the B repetitions to the empirical SE. Bias and SE are multiplied by 10, and MSE is multiplied by 100. 27 the nearly unbiased LASSO-C-TMLE and LASSO-PSEUDO-C-TMLE estimators. The rather poor performance in terms of empirical coverage of the CIs based on the LASSO-C-TMLE and LASSOPSEUDO-C-TMLE estimators may be due to the apparent failure in estimating well their variance (see the ratio rows of Table 6). 6 Secondary simulation study: LASSO-C-TMLE as a fine-tuning procedure In this shorter section, we describe a second, less ambitious simulation study. Its aim is to evaluate the interest in using the LASSO-C-TMLE procedure as a fine-tuning procedure. Specifically we wish to investigate, in the same context as in Section 5, how the rivals of the LASSO-C-TMLE estimator that also rely on the estimation of G0 (i.e., the IPTW, A-IPTW, TMLE and LASSO-PSEUDOC-TMLE estimators) perform when they are provided with the estimator Gn,hn,κn indexed by the data-adaptive, targeted, fine-tune parameter hn,κn . We thus choose to repeat independently B = 200 times the following steps: for each number of covariates p ∈ {100, 200}, 1. simulate a data set of n = 1000 independent observations drawn from Π0,p,0 ; 2. derive the LASSO-C-TMLE estimator of Sections 4.1 3. derive the LASSO-PSEUDO-C-TMLE estimator of Section 4.2 as well as the competing IPTW, A-IPTW and TMLE estimators exactly as presented in Section 5.2, and also using Gn,hn,κn in place of Gn,hn (LASSO-PSEUDO-C-TMLE) and Gn,hn,CV (the others). The results are reported in Table 7. A clear pattern emerges from Table 7: the bias is systematically reduced when using Gn,hn,κn in place of Gn,hn,CV or Gn,hn . Nevertheless, the MSE of the IPTW estimator increases, with a two-fold increase when the number of covariates p = 200. In contrast, the A-IPTW estimator benefits more from the substitution, with a stark decrease of the MSE on top of that of the bias, the latter being still far too large. This makes only more remarkable the fact that the TMLE estimator greatly benefits from the substitution on all fronts, bias and MSE. On the contrary, the benefit for the LASSO-PSEUDO-C-TMLE estimator is not convincing. In summary, Gn,hn,κn is targeted even “out of context”, i.e., even when it is used to build a plain TMLE estimator as opposed to the full-fledged C-TMLE estimator. 7 Discussion We study the inference of the value of a smooth statistical parameter at a law P0 from which we sample n independent observations, in situations where (i) we rely on a machine learning algorithm fine-tuned by a real-valued parameter h to estimate the G-component G0 of P0 , possibly consistently, and (ii) the product of the rates of convergence of the estimators of the Q- and G√ components of P0 to their targets may be slower than the convenient o(1/ n). A plain TMLE with an h chosen by cross-validation would typically not lend itself to the construction of a CI, because the selection of h would trade-off its empirical bias with something akin to the empirical variance of the estimator of G0 as opposed to that of the TMLE. We develop a collaborative TMLE procedure that succeeds in achieving the relevant trade-off: under high-level empirical processes conditions, and if there exists an oracle h that makes a bulky remainder term asymptotically Gaussian, then the C-TMLE is asymptotically Gaussian hence amenable to building a CI provided that its asymptotic variance can be estimated too. 28 ● 1.00 0.05 0.75 0.04 MSE delta ECDF 0.5 0.50 ● 0.03 1.2 2.0 ●● ● ● ● ● ● ● ●● ● ● ●●● ● ●● ● estimator ● L−C−TMLE 0.02 0.25 TMLE LP−C−TMLE 0.01 0.00 0.00 0.25 0.50 0.75 0.0 1.00 0.5 ● ● ●● ● ● ● ● ●● ● ● ●● ● ● ● ● ● ● ● TMLE ● A−IPTW TMLE L−C−TMLE 1.2 LP−C−TMLE 0.05 0.04 0.03 0.02 estimator 1.6 L−C−TMLE 0.10 2.0 2.0 estimator ● 1.5 (b) MSE for three of the seven estimators. MSE is multiplied by 100. ratio of CI width 1 − CI coverage (a) For every δ ∈ {0.5, 1.2, 2}, we simulate n = 1000 observations (W1 , A1 , Y1 ), . . . , (Wn , An , Yn ) from Π0,50,δ , compute {Π0,50,δ (A = 1|W = Wi ) : 1 ≤ i ≤ n}, and finally plot the corresponding empirical cumulative distribution. 0.50 0.40 0.30 0.20 1.0 delta propensity score LP−C−TMLE ●●●●●●●●●●●●●●●●●●●●● A−IPTW 0.8 0.0 0.5 1.0 1.5 2.0 0.0 0.5 delta 1.0 1.5 2.0 delta (c) Coverage of 95% CIs based on the doublerobust estimators. (d) Relative width of 95% CIs based on the double-robust estimators w.r.t. that of the plain ∗ TMLE, ψn,h . n,CV Figure 6: Scenario 6. We fix n = 500, p = 50, and vary δ ∈ {0.5 + k/10 : 0 ≤ k ≤ 15}. As the ∗ MSEs for IPTW and A-IPTW are too large, we only plot the MSEs of the plain TMLE ψn,h n,CV and the two collaborative TMLEs to ease comparisons. δ 1.0 2.0 bias SE MSE ratio bias SE MSE ratio ψnunadj 1.283 0.170 1.675 ψnG-comp 1.252 0.105 1.579 ψnIPTW 0.995 0.319 1.092 1.391 0.223 1.984 1.340 0.142 1.817 1.620 0.409 2.791 ψnA-IPTW 0.484 0.117 0.248 1.385 0.625 0.154 0.414 1.283 ∗ ψn,h n,CV 0.145 0.108 0.033 0.816 0.185 0.143 0.055 0.650 L-C-TMLE LP-C-TMLE 0.006 0.120 0.014 0.774 0.053 0.168 0.031 0.597 0.009 0.128 0.017 0.650 0.063 0.186 0.039 0.474 Table 6: Scenario 6. The performance of each estimator at sample size n = 500, with p = 50 and δ ∈ {1, 2}. The columns named L-C-TMLE and LP-C-TMLE correspond to the LASSO-CTMLE and LASSO-PSEUDO-C-TMLE estimators, respectively. Rows ratio report the ratios of the average of the SE estimates across the B repetitions to the empirical SE. Bias and SE are multiplied by 10, and MSE is multiplied by 100. 29 The construction of the C-TMLE and the main result about its empirical behavior are illustrated with the inference of the average treatment effect, both theoretically and numerically. In the simulation study, the G-component is estimated by the LASSO, and h is the bound on the `1 norm of the candidate coefficients. Overall, the resulting LASSO-C-TMLE estimator is superior to all its competitors, including a plain TMLE estimator. Evaluated in terms of empirical bias, standard error, mean squared error and coverage of CIs, the superiority is striking in small and moderate sample sizes. It is also strong when the number of covariates increases, or when the positivity assumption is increasingly challenged, thus making the inference task progressively even more delicate. The simulation study suggests that the CIs based on the C-TMLE do not provide the wished coverage, especially in small sample sizes. Obviously, this may be explained by the need for the C-TMLE estimator to reach its asymptotic regime. More subtly, this may also be related to highlevel assumption A4, that states the existence of an oracle h making a bulky remainder term asymptotically Gaussian. The assumption may fail to hold in practice. We will devote future research to understanding better A4 and finding strategies to avoir relying on it. In conclusion, we believe that the present study further demonstrates the high versatility and potential of the collaborative targeted minimum loss estimation methodology. For (relative) simplicity, we focused on the inference of a smooth, real-valued statistical parameter from independent and identically distributed observations, assuming that the machine learning algorithm is finetuned by a real-valued parameter. Our instantiation of the collaborative targeted minimum loss estimation methodology can be extended to other statistical parameters, sampling schemes, and fine-tuning of machine learning algorithms. A Proofs Sections A.1, A.2, A.3 and A.4 respectively prove Lemma 2, Theorem 1, Lemma 3 and Corollary 4. A.1 Proof of Lemma 2 Proof. By (1), ∗ Ψ(Pn,h ) − Ψ(P0 ) + P0 D∗ (Q∗n,hn , Gn,hn ) = Rem20 (Q∗n,hn , Gn,hn ), n Ψ(P0 ) − Ψ(P0 ) + P0 D∗ (Q1 , Gn,hn ) = Rem20 (Q1 , Gn,hn ), hence, by (3) and (8),  P0 D∗ (Q∗n,hn , Gn,hn )−D∗ (Q1 , Gn,hn )  ∗ = Rem20 (Q∗n,hn , Gn,hn ) − Rem20 (Q1 , Gn,hn ) − Ψ(Pn,h ) − Ψ(P0 ) n √ = −(Pn − P0 )D∗ (P0 ) + oP (1/ n). But (5) and Φ0 (G0 ) = P0 D∗ (Q1 , G0 ) = 0 also imply that  −Φ0 (Gn,hn ) + Φ0 (G0 ) = P0 D∗ (Q∗n,hn , Gn,hn ) − D∗ (Q1 , Gn,hn )  +(Pn − P0 ) D∗ (Q∗n,hn , Gn,hn ) − D∗ (Q1 , G0 ) √ +(Pn − P0 )D∗ (Q1 , G0 ) + oP (1/ n) which, combined with the previous display and (7), yield √ √ Φ0 (Gn,hn ) − Φ0 (G0 ) = (Pn − P0 ) (D∗ (P0 ) − D∗ (Q1 , G0 )) + oP (1/ n) = oP (1/ n) showing that (9) is satisfied with h̃n = hn and ∆(P1 ) ≡ 0. 30 A.2 Proof of Theorem 1 Proof. The proof unfolds in two parts. Step one: extracting the would-be first order term. Equality (5) in A2 rewrites as √ oP (1/ n) = Pn D∗ (Q∗n,hn , Gn,hn ) = (Pn − P0 )D∗ (Q∗n,hn , Gn,hn ) + P0 D∗ (Q∗n,hn , Gn,hn )   = (Pn − P0 )D∗ (Q1 , G0 ) + (Pn − P0 ) D∗ (Q∗n,hn , Gn,hn ) − D∗ (Q1 , G0 )   + P0 D∗ (Q∗n,hn , G0 ) + P0 D∗ (Q∗n,hn , Gn,hn ) − D∗ (Q∗n,hn , G0 ) . √ The second term of the sum between the first pair of brackets is oP (1/ n) by (7) in A3. As for the first term between the second pair of brackets, (1) and (1) entail that it satisfies ∗ ∗ ), ) + Rem20 (Q∗n,hn , G0 ) = Ψ(P0 ) − Ψ(Pn,h P0 D∗ (Q∗n,hn , G0 ) = Ψ(P0 ) − Ψ(Pn,h n n ∗ ∗ where we also use the fact that Ψ(Pn,h ) depends on Pn,h only through Q∗n,hn . Thus, it holds that n n √ ∗ Ψ(Pn,h ) − Ψ(P0 ) − (Pn − P0 )D∗ (Q1 , G0 ) + oP (1/ n) n  = P0 D∗ (Q∗n,hn , Gn,hn ) − D∗ (Q∗n,hn , G0 ) ≡ T1,n . (35) Let us now study T1,n , the right-hand side expression in (35). It rewrites as T1,n = P0 (D∗ (Q1 , Gn,hn ) − D∗ (Q1 , G0 ))  + P0 D∗ (Q∗n,hn , Gn,hn ) − D∗ (Q∗n,hn , G0 ) − P0 (D∗ (Q1 , Gn,hn ) − D∗ (Q1 , G0 )) . Consider the three terms in the right-hand side of the above equation. Combining (1), (1) and the fact that Ψ(P ) = Ψ(P 0 ) whenever P and P 0 have the same Q-component reveals that the first and third terms equal both Φ0 (Gn,hn ) − Φ0 (G0 ) and Rem20 (Q1 , Gn,hn ). For similar reasons, the second term equals Rem20 (Q∗n,hn , Gn,hn ). Therefore, by using successively (8) in A3 then (9) from A4, we obtain that  T1,n = Φ0 (Gn,hn ) − Φ0 (G0 ) + Rem20 (Q∗n,hn , Gn,hn ) − Rem20 (Q1 , Gn,hn )     √ = Φ0 (Gn,h̃n ) − Φ0 (G0 ) + Φ0 (Gn,hn ) − Φ0 (Gn,h̃n ) + oP (1/ n)   √ = (Pn − P0 )∆(P1 ) + Φ0 (Gn,hn ) − Φ0 (Gn,h̃n ) + oP (1/ n). (36) Step two: showing that the would-be first order term is complete. The rest of the proof consists √ in showing that the term between brackets in (36), say T2,n , is oP (1/ n). The inequality below follows from the definition of Φ0 and the triangle inequality, and the equality from (10) in A5:   |T2,n | ≤ Pn D∗ (Q1 , Gn,h̃n ) − D∗ (Q1 , Gn,hn )   + (Pn − P0 ) D∗ (Q1 , Gn,hn ) − D∗ (Q1 , Gn,h̃n )   √ = Pn D∗ (Q1 , Gn,h̃n ) − D∗ (Q1 , Gn,hn ) + oP (1/ n). Therefore, it suffices to prove that the absolute value in the above right-hand side expression is √ oP (1/ n). Under A1(Q1 , hn , c5 ) (guaranteed by A5), for every 1 ≤ i ≤ n, the Taylor-Lagrange inequality yields   D∗ (Q1 , Gn,h̃n ) − D∗ (Q1 , Gn,hn ) − (h̃n − hn ) × ∂hn D∗ (Q1 , Gn,· ) (Oi ) . (h̃n − hn )2 31 hence, by convexity,   Pn D∗ (Q1 , Gn,h̃n ) − D∗ (Q1 , Gn,hn ) − (h̃n − hn ) × ∂hn D∗ (Q1 , Gn,· ) . (h̃n − hn )2 . Since Pn ∂hn D∗ (Q∗n,hn , Gn,· ) and (h̃n − hn ) are both oP (1/n1/4 ) by (6) in A2 and A5, we get   Pn D∗ (Q1 , Gn,h̃n ) − D∗ (Q1 , Gn,hn )  √ = (h̃n − hn ) × Pn ∂hn D∗ (Q∗n,hn , Gn,· ) − ∂hn D∗ (Q1 , Gn,· ) + oP (1/ n)  = (h̃n − hn ) × (Pn − P0 ) ∂hn D∗ (Q∗n,hn , Gn,· ) − ∂hn D∗ (Q1 , Gn,· )  √ +(h̃n − hn ) × P0 ∂hn D∗ (Q∗n,hn , Gn,· ) − ∂hn D∗ (Q1 , Gn,· ) + oP (1/ n). √ In light of (11) and (12) in A5, the righ-hand side expression is oP (1/ n). This completes the √ proof: T2,n = oP (1/ n), hence (36) rewrites as √ T1,n = (Pn − P0 )∆(P1 ) + oP (1/ n), and (13) finally follows from (35). A.3 Proof of Lemma 3 Proof. Set q̄n ≡ Q̄n (1, ·) − Q̄n (0, ·), q̄1 ≡ Q̄1 (1, ·) − Q̄1 (0, ·), and ψ1 ≡ P0 q̄1 . Using inequality (a + b)2 ≤ 2(a2 + b2 ) (valid for all real numbers a, b), we first remark that P0 (q̄n − q̄1 )2 ≤ 2P0 [Q̄n (1, ·) − Q̄1 (1, ·)]2 + 2P0 [Q̄n (0, ·) − Q̄1 (0, ·)]2 = 2P0 (Q̄n − Q̄0 )2 /`G0 . P0 (Q̄n − Q̄0 )2 . Therefore, it also holds that P0 (q̄n − q̄1 )2 = oP (1). Second, we decompose the difference ψn − ψ1 as ψn − ψ1 = Pn q̄n − P0 q̄1 = (Pn − P0 )(q̄n − q̄1 ) + (Pn − P0 )q̄1 + P0 (q̄n − q̄1 ). √ Lemma 19.24 in [32] guarantees that the first term in the above RHS expression is oP (1/ n). Because q̄1 is uniformly bounded, the standard central limit theorem (for sequences of independent and identically distributed, real-valued random variables with finite variance) implies that the √ second term is OP (1/ n). Finally, the third term is oP (1) by the Cauchy-Schwarz inequality and the remark we previously made. In summary, ψn − ψ1 = oP (1), as stated. A.4 Proof of Corollary 4 The proof of Corollary 4 uses repeatedly the fact that some specific random functions fall in P0 Donsker classes with P0 -probability tending to one. Specifically, the proof will refer several times to the following lemma (its proof is deferred to the end of this section). Lemma 5. Suppose that the assumptions of Corollary 4 are met. Then, with P0 -probability ∗ tending to one, Q̄∗n,hn,κn (1, ·) − Q̄∗n,hn,κn (0, ·), D∗ (Pn,h ), D∗ (Q1 , Gn,hn,κn ) − D∗ (Q1 , Gn,h̃n ) and n,κn ∂hn,κn D∗ (Q∗n,hn,κn , Gn,· ) − ∂hn,κn D∗ (Q∗n,hn,κn , Gn,· ) also fall in P0 -Donsker classes. We can now present the proof of Corollary 4. 32 Proof of Corollary 4. There is no obvious counterpart in C1, C2 and C4 to (7) and (8) appearing within A3. Yet, under C2 and C4, Gn,hn,κn consistently estimates G0 and Q̄∗n,hn,κn converges to a limit Q̄1 that may differ from Q̄0 . Moreover, since Gn,hn,κn and G0 are bounded away from zero by C1, we have ∗ ) − D∗ (P1 ))2 = oP (1), (37) P0 (D∗ (Pn,h n,κn where P1 ∈ M is any element of model M of which the Q- and G-components equal Q1 ≡ (QW,0 , Q̄1 ) ∗ and G0 (see proof below). By Lemma 5, D∗ (Pn,h ) falls in a P0 -Donsker class with P0 -probability n,κn tending to one. It thus holds that √ ∗ ) − D∗ (P1 )) = oP (1/ n), (Pn − P0 )(D∗ (Pn,h n,κn as requested in (7) of A3. In addition, the following convergence also occurs, √ Rem20 (Q̄∗n,hn,κn , Gn,hn,κn ) − Rem20 (Q̄1 , Gn,hn,κn ) = oP (1/ n), (38) as requested in (8) of A3 (see proof below). Consequently, C1, C2 and C4 imply A3. Let us now turn to assumption A5. To alleviate notation, let G00n,h (W ) be the second order derivative of t 7→ Gn,t (W ) at h ∈ T under C1. Given the definition of D∗ (Q1 , Gn,t )(O), see (15), t 7→ D∗ (Q1 , Gn,t )(O) is twice differentiable on T and, for each h ∈ T , ! G0n,h (W )2 G00n,h (W ) 2 ∗ ∂h D (Q1 , Gn,· )(O) = (Y − Q̄1 (A, W )) × − 2(2A − 1) . `Gn,h (A, W )2 `Gn,h (A, W )3 Obviously, under C1, there exists a universal constant C3 > 0 such that the supremum in h ∈ T of ∂h2 D∗ (Q1 , Gn,· )(O) is P0 -almost surely smaller than C3 . Consequently, assumption A1(Q̄1 , hn,κn , C3 ) is met. In addition, we show below that (10), (11) and (12) hold true whenever C1 to C4 are met. ∗ , see (28); A4 is assumed to hold true; In summary, A2 is satisfied by construction of ψn,h n,κn A3 and A5 are met. Thus, Theorem 1 applies and implies the result stated in Corollary 4. This completes the proof. Proof of (37). Suppose that the assumptions of Corollary 4 are met and recall decomposition (15). To alleviate notation, introduce Q̄n ≡ Q̄∗n,hn,κn , q̄n ≡ Q̄∗n,hn,κn (1, ·) − Q̄∗n,hn,κn (0, ·) and Gn ≡ Gn,hn,κn . By Lemma 5, q̄n falls in a P0 -Donsker class with P0 -probability tending to one. Using repeatedly inequality (a + b)2 ≤ 2(a2 + b2 ), we obtain ∗ P0 (D∗ (Pn,h ) − D∗ (P1 ))2 . P0 (`Gn − `G0 )2 + P0 (Q̄n `G0 − Q̄1 `Gn )2 n,κn ∗ +P0 (q̄n − q̄1 )2 + (ψn,h − ψ0 )2 n,κn . P0 (Gn − G0 )2 + P0 (Q̄n − Q̄1 )2 ∗ +P0 (q̄n − q̄1 )2 + (ψn,h − ψ0 )2 n,κn ∗ = P0 (q̄n − q̄1 )2 + (ψn,h − ψ0 )2 + oP (1). n,κn The assumptions of Lemma 3 are met too. Therefore, we can retrieve the bound P0 (q̄n − q̄1 )2 . P0 (Q̄n − Q̄1 )2 = oP (1) ∗ from its proof and assert that its conclusion holds: (ψn,h − ψ0 ) = oP (1). This completes the n,κn proof of (37). 33 Proof of (38). Suppose that the assumptions of Corollary 4 are met. In view of (16), we have Tn ≡ |Rem20 (Q̄∗n,hn,κn , Gn,hn,κn ) − Rem20 (Q̄1 , Gn,hn,κn )|     `G0 (A, W ) ∗ = EP0 (2A − 1) 1 − (Q̄n,hn,κn (A, W ) − Q̄1 (A, W )) . `Gn,hn,κn (A, W ) Therefore, the Cauchy-Schwarz inequality and equality (`Gn,hn,κn − `G0 )2 = (Gn,hn,κn − G0 )2 yield Tn2 . P0 (Gn,hn,κn − G0 )2 × P0 (Q̄∗n,hn,κn − Q̄1 )2 = oP (1/n), which completes the proof of (38). Proof of (10) in the context of Section 3. Suppose that the assumptions of Corollary 4 are met. Using C1 and the Taylor-Lagrange inequality yields |Gn,h̃n (W ) − Gn,hn,κn (W )| . |h̃n − hn,κn | hence P0 (Gn,h̃n − Gn,hn,κn )2 . (h̃n − hn,κn )2 = oP (1) (with much to spare). Now, observe that   D∗ (Q1 , Gn,hn,κn ) − D∗ (Q1 , Gn,h̃n ) (O) = (Y − Q̄1 (A, W ))(2A − 1) × which evidently implies the upper bound   D∗ (Q1 , Gn,hn,κn ) − D∗ (Q1 , Gn,h̃n ) (O) 1 1 − `Gn,hn,κn (A, W ) `Gn,h̃n (A, W ) ! , . |`Gn,hn,κn (A, W ) − `Gn,h̃n (A, W )| = |Gn,hn,κn (W ) − Gn,h̃n (W )|. Therefore, P0 (D∗ (Q1 , Gn,hn,κn )−D∗ (Q1 , Gn,h̃n ))2 = oP (1). Furthermore, Lemma 5 guarantees that D∗ (Q1 , Gn,hn,κn ) − D∗ (Q1 , Gn,h̃n ) falls in a P0 -Donsker class with P0 -probability tending to one. The same argument as the one that lead to (3) in Section 3.3 thus completes the proof of (10). Proof of (11) in the context of Section 3. Suppose that the assumptions of Corollary 4 are met. In view of (15), we have ∂hn,κn D∗ (Q∗n,hn,κn , Gn,· )(O) = ∂hn,κn D∗ (Q1 , Gn,· )(O) = 2A − 1 G0 (W )(Y − Q̄∗n,hn,κn (A, W )), `Gn,hn,κn (A, W ) n,hn,κn 2A − 1 G0 (W )(Y − Q̄1 (A, W )), `Gn,hn,κn (A, W ) n,hn,κn (39) (40) hence  ∂hn,κn D∗ (Qn,hn,κn , Gn,· ) − ∂hn,κn D∗ (Q1 , Gn,· ) . |Q̄1 − Q̄∗n,hn,κn |. (41) Therefore, the Cauchy-Schwarz inequality implies the bound  (hn,κn − h̃n ) × P0 ∂hn,κn D∗ (Qn,hn,κn , Gn,· ) − ∂hn,κn D∗ (Q1 , Gn,· )  2 . (hn,κn − h̃n )2 × P0 (Q̄∗n,hn,κn − Q̄1 )2 = oP (1/n), thus completing the proof of (11). 34 Proof of (12) in the context of Section 3. Suppose that the assumptions of Corollary 4 are met. By Lemma 5, ∂hn,κn D∗ (Q∗n,hn,κn , Gn,· ) − ∂hn,κn D∗ (Q1 , Gn,· ) falls in a P0 -Donsker class with P0 probability tending to one. In view of (41), it holds that 2 P0 ∂hn,κn D∗ (Qn,hn,κn , Gn,· ) − ∂hn,κn D∗ (Q1 , Gn,· ) = oP (1). The same argument as the one that lead to (3) in Section 3.3 thus completes the proof of (12). Proof of Lemma 5. We proceed by order of appearance in the statement of the lemma. First, note that Q̄∗n,hn,κn (1, W ) − Q̄∗n,hn,κn (0, W ) = (2A − 1)Q̄∗n,hn,κn (A, W ). ∗ Second, derive from (15) the explicit forms of D∗ (Pn,h ), D∗ (Q1 , Gn,hn,κn ), D∗ (Q1 , Gn,h̃n ), and n,κn of the difference of the two last ones. Third, recall the explicit forms of ∂hn,κn D∗ (Q∗n,hn,κn , Gn,· ) and D∗ (Q1 , Gn,hn,κn ) given in (39) and (40), and derive from them that of their difference. Thanks to C4 and the above explicit forms, straightforward applications of [33, Theorem 2.10.6] yield the result. We conclude this article on a final remark about B4(Pn , k). Suppose that B2(Pn , k) is met. If, in light of C1, we also assume that t 7→ Gn,t (W ) is twice differentiable in a neighborhood of hn,k , then the assumptions of the implicit function theorem are satisfied and h 7→ εn,h,k is differentiable around hn,k . References [1] W. G. Cochran. The effectiveness of adjustment by subclassification in removing bias in observational studies. Biometrics, pages 295–313, 1968. [2] J. M. Franklin, W. Eddings, R. J. Glynn, and S. Schneeweiss. Regularized regression versus the high-dimensional propensity score for confounding adjustment in secondary database analyses. American journal of epidemiology, 187(7):651–659, 2015. [3] J. Friedman, T. Hastie, and R. Tibshirani. Regularization paths for generalized linear models via coordinate descent. Journal of Statistical Software, 33(1):1–22, 2010. URL http://www. jstatsoft.org/v33/i01/. [4] S. Gruber and M. J. van der Laan. An application of collaborative targeted maximum likelihood estimation in causal inference and genomics. The International Journal of Biostatistics, 6(1): Article 18, 2010. [5] S. Gruber and M. J. van der Laan. ctmle: an r package for collaborative targeted maximum likelihood estimation. Technical report, University of California, Berkeley, 2010. [6] S. Gruber, R. W. Logan, I. Jarrı́n, S. Monge, and M. A. Hernán. Ensemble learning of inverse probability weights for marginal structural modeling in large observational datasets. Statistics in medicine, 34(1):106–117, 2015. [7] D. Ho, K. Imai, G. King, and E. Stuart. Matchit: Matchit: Nonparametric preprocessing for parametric casual inference. R package version, pages 2–2, 2006. 35 [8] D. E. Ho, K. Imai, G. King, and E. A. Stuart. Matching as nonparametric preprocessing for reducing model dependence in parametric causal inference. Political analysis, 15(3):199–236, 2007. [9] D. G. Horvitz and D. J. Thompson. A generalization of sampling without replacement from a finite universe. Journal of the American statistical Association, 47(260):663–685, 1952. [10] C. Ju, M. Combs, S. D. Lendle, J. M. Franklin, R. Wyss, S. Schneeweiss, and M. J. van der Laan. Propensity score prediction for electronic healthcare databases using super learner and high-dimensional propensity score methods. arXiv preprint arXiv:1703.02236, 2017. [11] C. Ju, S. Gruber, S. D. Lendle, A. Chambaz, J. M. Franklin, R. Wyss, S. Schneeweiss, and M. J. van der Laan. Scalable collaborative targeted learning for high-dimensional data. arXiv preprint arXiv:1703.02237, 2017. [12] C. Ju, J. Schwab, and M. J. van der Laan. On adaptive propensity score truncation in causal inference. arXiv preprint arXiv:1707.05861, 2017. [13] C. Ju, R. Wyss, J. M. Franklin, S. Schneeweiss, J. Häggström, and M. J. van der Laan. Collaborative-controlled LASSO for constructing propensity score-based estimators in highdimensional data. Statistical methods in medical research, 2017. [14] T. Kurth, A. M. Walker, R. J. Glynn, K. A. Chan, J. M. Gaziano, K. Berger, and J. M. Robins. Results of multivariable logistic regression, propensity matching, propensity adjustment, and propensity-based weighting under conditions of nonuniform effect. American Journal of Epidemiology, 163(3):262–270, 2006. [15] B. K. Lee, J. Lessler, and E. A. Stuart. Improving propensity score weighting using machine learning. Statistics in medicine, 29(3):337–346, 2010. [16] R Core Team. R: A Language and Environment for Statistical Computing. R Foundation for Statistical Computing, Vienna, Austria, 2017. URL https://www.R-project.org/. [17] J. Robins. A new approach to causal inference in mortality studies with a sustained exposure periodapplication to control of the healthy worker survivor effect. Mathematical Modelling, 7 (9-12):1393–1512, 1986. [18] J. Robins. Robust estimation in sequentially ignorable missing data and causal inference models. In Proceedings of the American Statistical Association: Section on Bayesian Statistical Science, pages 6–10, 2000. [19] J. M. Robins and A. Rotnitzky. Semiparametric efficiency in multivariate regression models with missing data. Journal of the American Statistical Association, 90(429):122–129, 1995. [20] J. M. Robins and A. Rotnitzky. Comment on the Bickel and Kwon article, ‘Inference for semiparametric models: Some questions and an answer’. Statistica Sinica, 11(4):920–936, 2001. [21] J. M. Robins, M. A. Hernan, and B. Brumback. Marginal structural models and causal inference in epidemiology. Epidemiology, 11(5):550–560, 2000. [22] J. M. Robins, A. Rotnitzky, and M. van der Laan. Comment on “On Profile Likelihood” by S.A. Murphy and A.W. van der Vaart. Journal of the American Statistical Association – Theory and Methods, 450:431–435, 2000. 36 [23] P. R. Rosenbaum and D. B. Rubin. The central role of the propensity score in observational studies for causal effects. Biometrika, pages 41–55, 1983. [24] P. R. Rosenbaum and D. B. Rubin. Reducing bias in observational studies using subclassification on the propensity score. Journal of the American statistical Association, 79(387):516–524, 1984. [25] S. Schneeweiss, J. A. Rassen, R. J. Glynn, J. Avorn, H. Mogun, and M. A. Brookhart. Highdimensional propensity score adjustment in studies of treatment effects using health care claims data. Epidemiology (Cambridge, Mass.), 20(4):512, 2009. [26] M. E. Schnitzer and M. Cefalu. Collaborative targeted learning using regression shrinkage. Statistics in Medicine, 2017. [27] O. M. Stitelman and M. J. van der Laan. Collaborative targeted maximum likelihood for time to event data. The International Journal of Biostatistics, 6(1):Article 21, 2010. [28] M. van der Laan, A. Chambaz, and C. Ju. Targeted Learning in Data Science. Causal Inference for Complex Longitudinal Studies, chapter CTMLE for continuous tuning. Springer Series in Statistics. Springer, 2018. [29] M. J. van der Laan and S. Rose. Targeted Learning: Causal Inference for Observational and Experimental Data. Springer Science & Business Media, 2011. [30] M. J. van der Laan and D. Rubin. Targeted maximum likelihood learning. The International Journal of Biostatistics, 2(1), 2006. [31] M. J. van der Laan, S. Gruber, et al. Collaborative double robust targeted maximum likelihood estimation. The International Journal of Biostatistics, 6(1):Article 17, 2010. [32] A. W. van der Vaart. Asymptotic statistics, volume 3 of Cambridge Series in Statistical and Probabilistic Mathematics. Cambridge University Press, Cambridge, 1998. [33] A. W. van der Vaart and J. A. Wellner. Weak convergence and empirical processes. Springer Series in Statistics. Springer-Verlag, New York, 1996. With applications to statistics. [34] H. Wang, S. Rose, and M. J. van der Laan. Finding quantitative trait loci genes with collaborative targeted maximum likelihood learning. Statistics & Probability Letters, 81(7):792–796, 2011. 37 p 100 200 p 100 200 bias SE MSE bias SE MSE bias SE MSE bias SE MSE ψnIPTW 0.252 0.167 0.091 0.297 0.159 0.114 ∗ ψn,hn,CV 0.130 0.071 0.022 0.179 0.060 0.036 (ψnIPTW )0 0.078 0.325 0.112 0.106 0.480 0.242 ∗ ψn,hn,κn 0.017 0.101 0.011 -0.037 0.140 0.021 ψnA-IPTW 0.357 0.073 0.133 0.417 0.067 0.178 (ψnA-IPTW )0 0.151 0.167 0.050 0.152 0.150 0.045 L-C-TMLE LP-C-TMLE LP-C-TMLE0 0.005 0.072 0.005 0.024 0.077 0.006 0.013 0.075 0.006 0.024 0.089 0.009 -0.000 0.094 0.009 -0.072 0.148 0.027 Table 7: Using LASSO-C-TMLE as a fine-tuning procedure. The performance of each estimator at sample size n = 1000 with p ∈ {100, 200}. The prime symbol indicates the use of Gn,hn,κn as an estimator of G0 in place of Gn,hn,CV or Gn,hn . Bias and SE are multiplied by 10, and MSE is multiplied by 100. 38
10math.ST
Clustering implies geometry in networks Dmitri Krioukov1 arXiv:1604.01575v2 [cond-mat.stat-mech] 19 May 2016 1 Northeastern University, Departments of Physics, Mathematics, and Electrical&Computer Engineering, Boston, MA, USA Network models with latent geometry have been used successfully in many applications in network science and other disciplines, yet it is usually impossible to tell if a given real network is geometric, meaning if it is a typical element in an ensemble of random geometric graphs. Here we identify structural properties of networks that guarantee that random graphs having these properties are geometric. Specifically we show that random graphs in which expected degree and clustering of every node are fixed to some constants are equivalent to random geometric graphs on the real line, if clustering is sufficiently strong. Large numbers of triangles, homogeneously distributed across all nodes as in real networks, are thus a consequence of network geometricity. The methods we use to prove this are quite general and applicable to other network ensembles, geometric or not, and to certain problems in quantum gravity. In equilibrium statistical mechanics it is often possible to tell if a given system state is a typical state in a given ensemble. In network science, where statistical mechanics methods have been used successfully in a variety of applications [1–3], the same question is often intractable. Stochastic network models define ensembles of random graphs with usually intractable distributions. Therefore it is usually unknown if a given real network is a typical element in the ensemble of random graphs defined by a given model, i.e., if the model is appropriate for the real data, so that it can yield reliable predictions. Progress has been made in addressing this problem in some classes of models, such as the configuration [4–10] and stochastic block models [11–13]. Here we are interested in latent-space network models [14]. In these models, nodes are assumed to populate some latent geometric space, while the probability of connections between nodes is usually a decreasing function of their distance in this space. Latent-space models were first introduced in sociology in the 70ies [15] to model homophily in social networks—the more similar two people are, the closer they are in a latent space, the more likely they are connected [16]. Since then, latent-space models have been used extensively in many applications, ranging from predicting social behavior and missing or future links [17–19], to designing efficient information routing algorithms in the Internet [20] and identifying connections in the brain critical for its function [21], to inferring community structure in networks [14]—see [22, 23] for surveys. The simplest network model with a latent space is the model with the simplest latent space, which is the real line R1 . Nodes are points sprinkled randomly on R1 , and two nodes are connected if the distance between them on R1 is below a certain threshold µ. This random graph ensemble is known as the Gilbert model of random geometric graphs [24, 25]. Even in this simplest model, the ensemble distribution is intractable and unknown. Therefore it is impossible to tell if a given (real) network is “geometric”—that is, if it is a typical element in the ensemble. One can always check (in simulations) a subset of necessary conditions: if the network is geometric, then all its structural properties must match the corresponding ensemble averages. By “network property” one usually means a function of the adjacency matrix. The simplest examples of such functions are the numbers of edges, triangles, or subgraphs of different sizes in the network [26]. The distributions of betweenness or shortestpath lengths correspond to much less trivial functions of adjacency matrices. Since the number of such propertyfunctions is infinite, and since their inter-dependencies are in general intractable and unknown [26], it is impossible to check if all properties match and all conditions necessary for network geometricity are satisfied. Do any sufficient conditions exist? That is, are there any structural network properties such that random networks that have these properties are typical elements in the ensemble of random geometric graphs? Here we answer this question positively for random geometric graphs on R1 . We show that the set of sufficientcondition properties is surprisingly simple. These properties are only the expected numbers of edges k̄ and triangles t̄, or equivalently, expected degree k̄ and clustering c̄ = 2t̄/k̄ 2 of every node. Specifically, we consider a maximum-entropy ensemble of random graphs in which the expected degree of every node is fixed to the same value k̄, while the expected number of triangles to which every node belongs is also fixed to some other value t̄. There is seemingly nothing geometric about this ensemble since it is defined in purely networkstructural terms—edges and triangles, in combination with the maximum-entropy principle [27, 28]. Yet we show that if clustering is sufficiently strong, then this ensemble is equivalent to the ensemble of random geometric graphs on R1 . In general, the ensemble is not sharp but soft [29, 30]—the probability of connections is not 0 or 1 depending on if the distance between nodes is larger or smaller than µ, but the grand canonical Fermi-Dirac probability function in which energies of edges are distances they span on R1 . Strong clustering, a fundamen- 2 tally important property of real networks [31, 32], thus appears as a consequence of their latent geometry. The simplest model of networks with strong clustering is the Strauss model [33] of random graphs with given expected numbers of edges and triangles. The Strauss model is well studied, but many of its problematic features, including degeneracy and phase transitions with hysteresis caused by statistical dependency of edges and non-convexity of the constraints, are not observed in real networks [27, 34, 35]. In particular, in the Strauss model all the triangles coalesce into a maximal clique, so that a portion of nodes have a large degree and clustering close to 1, while the rest of the nodes have a low degree and zero clustering [35, 36]. This clustering organization differs drastically from the one in real networks, where triangles are homogeneously distributed across all nodes, modulo Poisson fluctuations and structural constraints [37, 38]. If we want to fix the expected number of edges and triangles of every node to the same values k̄ and t̄, then the Strauss model cannot be “fixed” to accomplish this. Therefore instead we begin with the canonical ensemble of random graphs in which every edge {i, j} occurs, independently from other edges, with given probability pij , which in general is different for different edges. This ensemble is well-behaved and void of any Strauss-like pathologies [2]. The expected degree hki i and number of triangles hti i at node i inPthe ensemble P are simply hki i = j pij and hti i = (1/2) j,k pij pjk pki . Any connection probability matrix {pij } satisfying constraints hki i = k̄ and hti i = t̄ for some k̄, t̄ will yield a canonical ensemble in which all nodes will have the same expected degree k̄ and number of triangles t̄. However we cannot claim that such an ensemble will be an unbiased ensemble with these constraints, because a particular matrix {pij } satisfying them may enforce additional constraints on the expected values of some other network properties. In other words, we first have to find a way to sample matrices {pij } from some maximum-entropy distribution subject only to the desired constraints. This seemingly intractable problem finds a solution using the theory of graph limits known as graphons [39], with basic formalism introduced in network models with latent variables [40, 41]. Graphon p(x, y) is a symmetric integrable function p : [0, 1]2 → [0, 1], which is essentially the thermodynamic n → ∞ limit of matrix {pij }. For a fixed graph size n, graphon p defines graph ensemble Gn (p) by sprinkling n nodes uniformly at random on interval [0, 1], and then connecting nodes i and j with probability pij = p(xi , xj ), where xi , xj are sprinkled positions of i, j on [0, 1]. In the n → ∞ limit, the discrete node index i becomes continuous x ∈ [0, 1]. Graphs in ensemble Gn (p) are dense, because the expected deR1 gree of a node at x ∈ [0, 1] is hk(x)i = n 0 p(x, y) dy. Here we are interested in sparse ensembles, since most real networks are sparse. Their average degrees are either constant or growing at most logarithmically with the network size n [42]. To model sparse networks, one can replace p(x, y) by a rescaled graphon pn (x, y) = p(x, y)/n which depends on n [41, 43]. The expected degrees do not then depend on n, but the RR 1 number of triangles vanishes as 1/n, ht(x)i = (1/2n) 0 p(x, y)p(y, z)p(z, x) dy dz, as opposed to clustering in real networks, where it does not depend on the size of growing networks either [42]. The solution to this impasse is a linearly growing support of graphon p. That is, let p : R2 → [0, 1] be a graphon on the whole infinite plane R2 . For any finite n we simply consider its restriction to a finite square of size n × n, e.g., In2 , where In = [−n/2, n/2], so that pn : In2 → [0, 1] and pn (x, y) = p(x, y). Graphon p(x, y) is then the connection probability in the thermodynamic limit. In this case, both the expected degree and number of triangles at any node in the thermodynamic limit R can be finite and positive: hk(x)i = p(x, y) dy and R RR ht(x)i = (1/2) R2 p(x, y)p(y, z)p(z, x) dy dz. For a finite graph size n, the graph ensemble Gn (p) is defined by sprinkling n points xi uniformly at random on interval In , and then connecting nodes i and j with probability pij = p(xi , xj ). The only difference between Gn (p) and the infinite graph ensemble G∞ (p) in the thermodynamic limit is that in the latter case this sprinkling is a realization Π = {xi } of the unit-rate Poisson point process on the whole infinite real line R. The main utility of using graphons here is that they allow us to formalize our entropy-maximization task as a variational problem which we will now formulate. We first observe that for a fixed sprinkling Π, the connection probability matrix {pij } is also fixed. Since with fixed {pij }, all edges are independent Bernoulli random variables albeit with different success probabilities, the entropy of a graph ensemble S[Gn (p|Π)] with fixed sprinkling Π Pis the sum of entropies of all edges, S[Gn (p|Π)] = (1/2) i,j h(pi,j ), where h(p) = −p log p − (1 − p) log(1 − p) is the entropy of a Bernoulli random variable with the success probability p. Unfixing Π now, the distribution of entropy S[Gn (p|Π)] as a function of random sprinkling Π in ensemble Gn (p) is known [44] to converge in the thermodynamic limit to the delta function centered at the graphon entropy s[p] defined below: ZZ 1 h[p(x, y)] dx dy, S[Gn (p|Π)] → S[Gn (p)] → s[p] = 2 R2 (1) where S[Gn (p)] P is the Gibbs entropy of ensemble Gn (p), S[Gn (p)] = − G∈Gn (p) P (G) log P (G). Bernoulli entropy S[Gn (p|Π)] is thus self-averaging, and for large n, any graph sampled from Gn (p) is a typical representative of the ensemble. The proof in [44] is for dense graphons, but we show in the appendix that S[Gn (p|Π)] is self-averaging in our sparse settings as well. Therefore, our sparse ensemble Gn (p) is unbiased if it is defined by graphon p∗ (x, y) that maximizes graphon entropy s[p] above, subject to the constraints that the expected num- 3 bers of edges and triangles at every node are fixed to the same values k̄, t̄, Z hk(x)i = p(x, y) dy = k̄, (2) R ZZ 1 ht(x)i = p(x, y)p(y, z)p(z, x) dy dz = t̄. (3) 2 R2 ∗ To find graphon p (x, y) that maximizes entropy (1) and satisfies constraints (2,3), we observe that constraint (2) implies thatRp∗ (x, y) cannot be integrable since RR p(x, y) dx dy = k̄ R dx. Therefore we first have to R2 solve the problem for finite n and then consider the thermodynamic limit. Using the method RR of Lagrange multipliers, we define Lagrangian L = I 2 dx dy { 21 h[p(x, y)]+ n R λk p(x, y)+ 12 λt p(x, y) In p(y, z)p(z, x) dz} with Lagrange multipliers λk , λt coupled to the degree and triangle constraints. Equation δL/δp = 0 leads to the following integral equation   Z 1 − 1 + 2λk + 3λt p(x, z)p(z, y) dz = 0, log p(x, y) In (4) which appears intractable. However, inspired by the grand canonical formulation of edge-independent graph ensembles [45], we next show that for sufficiently large n, k̄, t̄, its approximate solution is the following Fermi-Dirac graphon ( 1 1 if 0 ≤ r ≤ 1, β(ε−µ) = 1+e2α(r−1/2) ∗ p (x, y) = 1+e1 (5) 1 ∗ = 1+eα ≡ pα if r > 1, 1+eβµ where energy ε = |x − y| ≥ 0 of edge-fermion (x, y) is the distance between nodes x and y on R1 , the chemical potential µ ≥ 0 and inverse temperature β ≥ 0 are functions of k̄ and t̄, while α = βµ and r = ε/2µ are the rescaled inverse temperature—the logarithm of thermodynamic activity—and energy-distance. To show this, we first notice that if p∗ (x, y) is a solution, then the degree constraint (2) becomes Z k̄ = p∗ (x, y) dy = 2µ + p∗α (n − 4µ) ≈ 2µ + p∗α n. (6) In Therefore if the average degree k̄ is fixed and does not depend on n, then p∗α ∼ 1/n and α ∼ log n. If p∗α is small, then the last integral term in (4)—the expected number of common neighbors between nodes x and y—is negligible for r > 1 (|x − y| > 2µ), and Eq. (4) simplifies to the equation for Erdős-Rényi graphs in which only the expected degree is fixed. Its solution is constant p∗ (x, y) = 1/(1 + e−2λk ), so that λk = −α/2, cf. (5). If r < 1, then the common-neighbor integral in (4) is no longer negligible, but we can evaluate it exactly for p∗ (x, y). The exact expression for Z 1 Cn (r, α) = p∗ (x, z)p∗ (z, y) dz, (7) 2µ In 1.0 1−r Cn (r, 5) Cn (r, 10) Cn (r, 15) 0.8 0.6 0.4 0.2 0.0 0.0 0.2 0.4 r 0.6 0.8 1.0 FIG. 1. Rescaled number of common neighbors Cn (r, α) (7) versus 1 − r for different values of α = βµ (µ = 1, n = 103 ). where r = |x−y|/2µ, is terse and non-informative, so that we omit it for brevity. Its important property is that for large α it is closely approximated by Cn (r, α) ≈ 1 − r, Fig. 1. In the α → ∞ limit this approximation becomes exact since p∗ (x, y) → Θ(µ − |x − y|) = Θ(1/2 − r), where Θ() is the Heaviside step function—x and y are connected if |x − y| < µ. Approximating the commonneighbor integral in (4) by 2µ(1 − r), and noticing that log(1/p∗ (x, y) − 1) = β(ε − µ) = 2α(r − 1/2), we transform (4) into α(r − 1/2) + λk + 3µλt (1 − r) = 0. (8) This equation has a solution with λk = −α/2 and λt = β/3. This solution is consistent with the solution in the r > 1 regime. First, the value of λk is the same in both regimes r < 1 and r > 1. Second, one can check that the expected number of common neighbors R ∗ p (x, z)p∗ (z, y) dz decays exponentially with α for any In r > 1. Therefore the common neighbor term in (4) is indeed negligible in the r > 1 regime, even though the prefactor 3λt = α/µ is large for fixed µ and large α. Figure 2 illustrates that if α is large, then the expected average degree k̄ (6) and clustering ZZ 1 2t̄ p∗ (x, y)p∗ (y, z)p∗ (z, x) dy dz (9) c̄ = 2 = 2 2 k̄ k̄ In in ensemble Gn (p∗ ) are functions of only µ and α, respectively. Given values of the two constraints k̄ and t̄ (or c̄) define the two ensemble parameters µ and β (or α) as the solution of Eqs. (6,9). We note that for large α (α > 10 in Fig. 2), clustering is close to its maximum c̄max = 3/4 (t̄max = 3µ2 /2), which can be computed analytically. Since our approximations are valid only for large α, they apply only to graphs with strong clustering. In the sparse thermodynamic limit n → ∞ with a finite average degree k̄, the chemical potential µ must be finite and α must diverge (temperature T = 1/β must go to zero) because of (6), so that only graphs with the strongest clustering are the exact solution to our entropy-maximization problem. For finite n however, higher-temperature graphs with weaker clustering are an approximate solution. We emphasize that the fact that graphon (5), in which the dependency on x and y is only via distance ε = |x−y|, 4 still homogeneously distributed across all nodes, albeit subject to non-trivial structural constraints imposed by the power-law degree distribution [26, 37, 38]. As shown in [46, 47], random geometric graphs on R1 can be generalized to satisfy an additional constraint enforcing a power-law degree distribution. This generalization still uses the grand canonical Fermi-Dirac connection probability, albeit in hyperbolic geometry, and reproduces the clustering organization in real networks. These observations lead to the conjecture that real scale-free networks are typical elements in ensembles of soft random geometric graphs with non-trivial degree distribution constraints. If so, then non-trivial community structure, another common feature of real networks, is a reflection of non-uniform node density in latent geometry [14, 48]. FIG. 2. Average degree (a,c) and clustering (b,d) in soft random geometric graphs with connection probability (5) as functions of µ and β. The dashed curves in (a,b) show the simulation results averaged over 100 random graphs of size n = 103 on the interval [−500, 500] with periodic boundary conditions. The solid curves in (a,b) and color in (c,d) are the (corresponding) analytic results using (6) in (a,c), and numeric evaluation of (9) in (b,d) with n = 103 . The color axes in (c,d) are in the logarithmic scale, with color ticks evenly spaced in log k̄ in (c) and log(3/4 − c̄) in (d). is an approximate entropy maximizer, means that the ensemble of random graphs in which the expected degree and clustering of every node are fixed to given constants, is approximately equivalent to the ensemble of soft random geometric graphs with the specific form of the connection probability, i.e., the grand canonical Fermi-Dirac distribution function that maximizes ensemble entropy constrained by fixed average energy and number of particles. In our ensemble, Fermi particles are graph edges (0 or 1 edge between a pair of nodes), and their energy is the distance they span on R1 . The average number of particles m̄ = k̄n/2 is fixed by chemical potential µ. Fixing average energy ε̄ and fixing the average number of triangles t̄ are equivalent because the smaller the ε̄, the more likely the lower-energy/smaller-distance states, the larger the t̄ thanks to the triangle inequality in R1 . This equivalence explains why the Fermi-Dirac distribution (5) appears as an approximate solution to our entropy maximization problem constrained by fixed k̄ and t̄. In the zero-temperature limit β → ∞, graphon (5) becomes the step function p∗ (x, y) = Θ(µ − ε), meaning that these soft random geometric graphs become the traditional sharp random geometric graphs in which any pair of nodes is connected if their distance-energy is at most µ. All the approximations become exact in this limit. The degree distribution in (soft) random geometric graphs is the Poisson distribution [25], while in many real networks it is a power law. Triangles in real networks are As a final remark we note that the graphon-based methodology we developed here is quite general and can be applied to other network models with latent variables, geometric or not, to tell if a given model is adequate for a given network. We also note that a very similar class of problems underlies approaches to quantum gravity with emerging geometry [23, 49] where one expects continuous spacetime to emerge in the classical limit from fundamentally discrete physics at the Planck scale. Perhaps the most directly related example is the Hauptvermutung problem in causal sets [50, 51]. Given a Lorentzian spacetime, causal sets are random geometric graphs in it with edges connecting timelike-separated pairs of events sprinkled randomly onto the spacetime at the Planck density. If no continuous spacetime is given to begin with, then what discrete physics can lead to an ensemble of random graphs equivalent to the ensemble of causal sets sprinkled onto the spacetime that we observe? To answer this question, one has to solve the same ensemble equivalence problem as we solved here, except not for R1 , but for the spacetime of our Universe. Appendix Here we show that entropy of the considered sparse graph ensemble is self-averaging. For completeness, we first show that average entropy density converges to graphon entropy density in the thermodynamic limit, and then show that the relative variance (coefficient of variation) of the entropy distribution goes to zero in this limit. We begin with notations and definitions. Notations and definitions. Let In = [−n/2, n/2] be the interval of length n, and Π = {xi }, i = 1, 2, . . . , n be n real numbers sampled uniformly at random from In . For large n, binomial sampling Π approximates the Poisson point process of unit rate on In . Since every xi is uniformly distributed on In , and since all xi s are independent, the probability density function of sprinklings 5 Π is P (Π) = 1 . nn (10) We impose the periodic boundary conditions on In making it a circle, so that the distance between point i and j is xij = n n − − |xi − xj | . 2 2 (11) Distances {xij } are uniformly distributed on [0, n/2]. Given Π, ensemble Gn (p|Π) is the ensemble of graphs whose edges, or elements of adjacency matrix {aij }, are independent Bernoulli random variables: abusing notation for p, aij = 1 with probability pij = p(xi , xj ) = p(xij ), and aij = 0 with probability 1 − pij . There are no self-edges, so that pii = 0. The entropy of random variable aij is h(pij ), where h(x) = −x log x − (1 − x) log(1 − x) (12) is the entropy of the Bernoulli random variable with success probability x. Since all aij s are independent in ensemble Gn (p|Π), its entropy is Sn ≡ Sn (Π) ≡ S [Gn (p|Π)] = n 1 X h(pij ), 2 i,j=1 (13) which is fixed for a given sprinkling Π. Ensemble Gn (p) is the ensemble of graphs sampled by first sampling random sprinkling Π, and then sampling a random graph from Gn (p|Π). We consider entropy Sn as a random variable defined by Π. This random variable is self-averaging if its relative variance vanishes in the thermodynamic limit, p hSn − hSn ii2 cv = −−−−→ 0, (14) n→∞ hSn i where h·i stands for averaging across random sprinklings Π. We first show that average entropy density— that is, average entropy per node hSn i/n—converges to graphon entropy density σ, hSn i σ −−−−→ , n→∞ n 2 (15) Z σ = lim σn = h [p(xij )] dxij , n→∞ R Z sn σn = = h [p(xij )] dxij , n In ZZ sn = h [p(xi , xj )] dxi dxj , (16) Average ensemble entropy density converges to graphon entropy density. Using the definitions and observations above, we get Z Y hSn i 1 = Sn (Π)P (Π) dxk (19) n n Inn k Z X Y 1 hSn i = h [p(xi , xj )] P (Π) dxk (20) n 2n Inn i,j k Z X Y 1 = n+1 h [p(xi , xj )] dxk . (21) 2n n In i,j k The integration over n − 2 variables xk with indices k not equal to either i or j yields the factor of nn−2 : ZZ 1 X hSn i h [p(xi , xj )] dxi dxj , (22) = 3 n 2n i,j 2 In where we have also swapped the summation and integration. Changing variables from xi and xj to xij and xj , and integrating over xj yields another factor of n: Z hSn i 1 X = 2 h [p(xij )] dxij . (23) n 2n i,j In Since xij are uniformly distributed on [0, n/2], all terms in the sum contribute equally, bringing another factor of n(n − 1) ≈ n2 , the total number of terms in the sum: Z hSn i 1 σn = h [p(xij )] dxij = . (24) n 2 In 2 We thus have that 1 σ hSn i −−−−→ lim σn = . (25) n n→∞ 2 n→∞ 2 Ensemble entropy is self-averaging. To compute p hSn2 i − hSn i2 cv = (26) hSn i we must calculate 2 + * X 1 hSn2 i =  h [p(xi , xj )] 2 i,j (27) = I1 + I2 , where (28) Z X Y 1 I1 = h2 [p(xi , xj )] P (Π) dxm , (29) 4 Inn i,j m Z X Y 1 I2 = h [p(xi , xj )] h [p(xk , xl )] P (Π) dxm . 4 Inn m i,j;k,l (30) (17) (18) 2 In and then prove (14). For notational convenience in the equations above, we have extended the support of p(xij ) from R+ to R by p(−xij ) = p(xij ). The first integral I1 is different from (20) only in that instead of h/2 we now have (h/2)2 . Therefore we immediately conclude that n I1 = γn , where (31) Z4 h2 [p(x)] dx. γn = In (32) 6 R If σn = In h [p(x)] dx converges to finite σ in the n → ∞ limit, as it does for the Fermi-Dirac p∗ , then so does γn , γn −−−−→ γ < ∞, because h(p) ∈ [0, 1]. [5] G. Bianconi, P. Pin, and M. Marsili, Proc Natl Acad Sci USA 106, 11433 (2009). [6] K. Anand and G. Bianconi, Phys Rev E 80, 045102(R) n→∞ (2009). To calculate the second integral I2 , we use P (Π) = [7] K. Anand, D. Krioukov, and G. Bianconi, Phys Rev E 1/nn and integrate over n − 4 variables xm with indices 89, 062807 (2014). [8] D. Garlaschelli and M. Loffredo, Phys Rev E 78, 015101 m not equal to any i, j, k, l, bringing the factor of nn−4 : (2008). ZZZZ 1 X [9] D. Garlaschelli and M. Loffredo, Phys Rev Lett 102, h [p(xi , xj )] h [p(xk , xl )] dxi dxj dxk dxl . 38701 (2009). I2 = 4 4n 4 In i,j;k,l [10] T. Squartini, R. Mastrandrea, and D. Garlaschelli, New (33) J Phys 17, 023052 (2015). Changing variables from xi , xj , xk , and xl , to xij , xj , [11] T. P. Peixoto, Phys Rev E 85, 056122 (2012). xkl , and xl , and integrating over xj and xl , thus bringing [12] T. P. Peixoto, Phys Rev Lett 110, 148701 (2013). [13] T. P. Peixoto, Phys Rev X 4, 011047 (2014). another factor of n2 , we get: [14] M. E. J. Newman and T. P. Peixoto, Phys Rev Lett 115, Z Z 1 X 088701 (2015). I2 = 2 h [p(xij )] h [p(xkl )] dxij dxkl . (34) [15] D. D. McFarland and D. J. Brown, in Bonds of Pluralism: 4n 2 In i,j;k,l The Form and Substance of Urban Social Networks (John Wiley, New York, 1973) pp. 213–252. Since xij and xkl are independent and uniformly dis[16] M. McPherson, L. Smith-Lovin, and J. M. Cook, Annu tributed on [0, n/2], every term in the double sum conRev Sociol 27, 415 (2001). tributes equally, while the total number of terms is [17] P. D. Hoff, A. E. Raftery, and M. S. Handcock, J Am Stat Assoc 97, 1090 (2002). [n(n − 1)]2 ≈ n4 , yielding [18] P. Sarkar, D. Chakrabarti, and A. W. Moore, in IJCAI ZZ (2011) pp. 2722–2727. n2 I2 = h [p(xij )] h [p(xkl )] dxij dxkl (35) [19] G. Tita, P. J. Brantingham, A. Galstyan, and Y.-S. Cho, 4 2 In Discret Contin Dyn Syst - Ser B 19, 1335 (2014).  Z 2 [20] M. Boguñá, F. Papadopoulos, and D. Krioukov, Nat n = h [p(x)] dx (36) Commun 1, 62 (2010). 2 In [21] A. Gulyás, J. J. Bı́ró, A. Kőrösi, G. Rétvári, and D. Kri n 2 oukov, Nat Commun 6, 7651 (2015). σn = hSn i2 . = (37) [22] M. Barthélemy, Phys Rep 499, 1 (2011). 2 [23] G. Bianconi, EPL 111, 56001 (2015). Collecting the calculations of hSn i and hSn2 i, we finally [24] E. N. Gilbert, J Soc Ind Appl Math 9, 533 (1961). obtain [25] M. Penrose, Random Geometric Graphs (Oxford University Press, Oxford, 2003). p p √ γn I1 + I2 − hSn i2 (n/4)γn 1 [26] C. Orsini, M. M. Dankulov, P. Colomer-de Simón, A. Ja= cv = =√ . (38) makovic, P. Mahadevan, A. Vahdat, K. E. Bassler, hSn i (n/2)σn n σn Z. Toroczkai, M. Boguñá, G. Caldarelli, S. Fortunato, and D. Krioukov, Nat Commun 6, 8627 (2015). If σn −−−−→ σ < ∞, then γn −−−−→ γ < ∞, and n→∞ n→∞ [27] S. Horvát, É. Czabarka, and Z. Toroczkai, Phys Rev Lett √ 114, 158701 (2015). γn 1 cv = √ −−−−→ 0. (39) [28] T. Squartini, J. de Mol, F. den Hollander, and D. Garn σn n→∞ laschelli, Phys Rev Lett 115, 268701 (2015). [29] C. P. Dettmann and O. Georgiou, Phys Rev E 93, 032313 (2016). [30] M. Penrose, Ann Appl Probab 26, 986 (2016). [31] F. Radicchi, C. Castellano, F. Cecconi, V. Loreto, and We thank G. Lippner, P. Topalov, M. Piskunov, D. Parisi, Proc Natl Acad Sci 101, 2658 (2004). M. Kitsak, M. Boguñá, S. Horvát, Z. Toroczkai, and [32] F. Radicchi and C. Castellano, Phys Rev E 93, 030302 Y. Baryshnikov for useful discussions and suggestions. (2016). This work was supported by NSF CNS-1442999. [33] D. Strauss, SIAM Rev 28, 513 (1986). [34] D. Foster, J. Foster, M. Paczuski, and P. Grassberger, Phys Rev E 81, 046115 (2010). [35] J. Park and M. E. J. Newman, Phys Rev E 72, 026136 (2005). [1] R. Albert and A.-L. Barabási, Rev Mod Phys 74, 47 [36] C. Radin, K. Ren, and L. Sadun, J Phys A Math Theor (2002). 47, 175001 (2014). [2] J. Park and M. E. J. Newman, Phys Rev E 70, 66117 [37] P. Colomer-de Simón, M. Á. Serrano, M. G. Beiró, J. I. (2004). Alvarez-Hamelin, and M. Boguñá, Sci Rep 3, 2517 [3] J. Gao, B. Barzel, and A.-L. Barabási, Nature 530, 307 (2013). (2016). [38] V. Zlatić, D. Garlaschelli, and G. Caldarelli, EPL 97, [4] G. Bianconi, Eur Lett 81, 28005 (2008). 7 28005 (2012). [39] L. Lovász, Large Networks and Graph Limits (American Mathematical Society, Providence, RI, 2012). [40] G. Caldarelli, A. Capocci, P. D. L. Rios, and M. A. Muñoz, Phys Rev Lett 89, 258702 (2002). [41] M. Boguñá and R. Pastor-Satorras, Phys Rev E 68, 36112 (2003). [42] S. Boccaletti, V. Latora, Y. Moreno, M. Chavez, and D.-U. Hwanga, Phys Rep 424, 175 (2006). [43] C. Borgs, J. T. Chayes, H. Cohn, and Y. Zhao, arXiv:1401.2906. [44] S. Janson, NYJM Monogr 4 (2013), arXiv:1009.2376. [45] D. Garlaschelli, S. E. Ahnert, T. M. A. Fink, and G. Cal- darelli, Entropy 15, 3148 (2013). [46] M. Á. Serrano, D. Krioukov, and M. Boguñá, Phys Rev Lett 100, 78701 (2008). [47] D. Krioukov, F. Papadopoulos, M. Kitsak, A. Vahdat, and M. Boguñá, Phys Rev E 82, 36106 (2010). [48] K. Zuev, M. Boguñá, G. Bianconi, and D. Krioukov, Sci Rep 5, 9421 (2015). [49] Z. Wu, G. Menichetti, C. Rahmede, and G. Bianconi, Sci Rep 5, 10073 (2015). [50] R. Sorkin, in Lectures on Quantum Gravity, edited by A. Gomberoff and D. Marol (Springer, New York, 2005) pp. 305–328. [51] L. Bombelli, J. Lee, D. Meyer, and R. Sorkin, Phys Rev Lett 59, 521 (1987).
10math.ST
Consensus Attention-based Neural Networks for Chinese Reading Comprehension Yiming Cui†∗ , Ting Liu‡ , Zhipeng Chen† , Shijin Wang† and Guoping Hu† † iFLYTEK Research, Beijing, China ‡ Research Center for Social Computing and Information Retrieval, Harbin Institute of Technology, Harbin, China † {ymcui,zpchen,sjwang3,gphu}@iflytek.com ‡ [email protected] arXiv:1607.02250v3 [cs.CL] 15 Mar 2018 Abstract Reading comprehension has embraced a booming in recent NLP research. Several institutes have released the Cloze-style reading comprehension data, and these have greatly accelerated the research of machine comprehension. In this work, we firstly present Chinese reading comprehension datasets, which consist of People Daily news dataset and Children’s Fairy Tale (CFT) dataset. Also, we propose a consensus attention-based neural network architecture to tackle the Cloze-style reading comprehension problem, which aims to induce a consensus attention over every words in the query. Experimental results show that the proposed neural network significantly outperforms the state-of-the-art baselines in several public datasets. Furthermore, we setup a baseline for Chinese reading comprehension task, and hopefully this would speed up the process for future research. 1 Introduction The ultimate goal of machine intelligence is to read and comprehend human languages. Among various machine comprehension tasks, in recent research, the Cloze-style reading comprehension task has attracted lots of researchers. The Cloze-style reading comprehension problem (Taylor, 1953) aims to comprehend the given context or document, and then answer the questions based on the nature of the document, while the answer is a single word in the document. Thus, the Cloze-style reading comprehension can be described as a triple: hD, Q, Ai where D is the document, Q is the query and A is the answer to the query. By adopting attention-based neural network approaches (Bahdanau et al., 2014), the machine is able to learn the relationships between document, query and answer. But, as is known to all, the neural network based approaches need large-scale training data to train a reliable model for predictions. Hermann et al. (2015) published the CNN/Daily Mail news corpus for Cloze-style reading comprehensions, where the content is formed by the news articles and its summarization. Also, Hill et al. (2015) released the Children’s Book Test (CBT) corpus for further research, where the training samples are generated through automatic approaches. As we can see that, automatically generating large-scale training data for neural network training is essential for reading comprehension. Furthermore, more difficult problems, such as reasoning or summarization of context, need much more data to learn the higher-level interactions. Though we have seen many improvements on these public datasets, some researchers suggested that these dataset requires less high-level inference than expected (Chen et al., 2016). Furthermore, the public datasets are all automatically generated, which indicate that the pattern in training and testing phase are nearly the same, and this will be easier for the machine to learn these patterns. In this paper, we will release Chinese reading comprehension datasets, including People Daily news datasets and Children’s Fairy Tale datasets. As a highlight in our datasets, there is a human evaluated ∗ This work was done by the Joint Laboratory of HIT and iFLYTEK (HFL). This work is licensed under a Creative Commons Attribution 4.0 International Licence. http://creativecommons.org/licenses/by/4.0/ Licence details: dataset for testing purpose. And this will be harder for the machine to answer these questions than the automatically generated questions, because the human evaluated dataset is further processed, and may not be accordance with the pattern of automatic questions. More detailed analysis will be given in the following sections. The main contributions of this paper are as follows: • To our knowledge, this is the first released Chinese reading comprehension datasets and human evaluated test sets, which will benefit the research communities in reading comprehension. • Also, we propose a refined neural network that aims to utilize full representations of query to deal with the Cloze-style reading comprehension task, and our model outperform various state-of-the-art baseline systems in public datasets. The rest of the paper will be organized as follows. In Section 2, we will briefly introduce the existing Cloze-style datasets, and describe our Chinese reading comprehension datasets in detail. In Section 3, we will show our refined neural network architecture for Cloze-style reading comprehension. The experimental results on public datasets as well as our Chinese reading comprehension datasets will be given in Section 4. Related work will be described in Section 5, and we make a brief conclusion of our work at the end of this paper. 2 Chinese Reading Comprehension Datasets We first begin with a brief introduction of the existing Cloze-style reading comprehension datasets, and then introduce our Chinese reading comprehension datasets: People Daily and Children’s Fairy Tale. 2.1 Existing Cloze-style Datasets Typically, there are two main genres of the Cloze-style datasets publicly available, which all stem from the English reading materials. CNN/Daily Mail.1 The news articles often come with a short summary of the whole report. In the spirit of this, Hermann et al. (2015) constructed a large dataset with web-crawled CNN and Daily Mail news data. Firstly, they regard the main body of the news article as the Document, and the Query is formed through the summary of the article, where one entity word is replaced by a placeholder to indicate the missing word. And finally, the replaced entity word will be the Answer of the Query. Also, they have proposed the anonymize the named entity tokens in the data, and re-shuffle the entity tokens for every sample in order to exploit general relationships between anonymized named entities, rather than the common knowledge. But as Chen et al. (2016)’s studies on these datasets showed that the anonymization is less useful than expected. Children’s Book Test. 2 There was also a dataset called the Children’s Book Test (CBT) released by Hill et al. (2015), which is built from the children’s book story. Different from the previously published CNN/Daily Mail datasets, they formed the Document with 20 consecutive sentences in the book, and regard the 21st sentence as the Query, where one word is blanked with a placeholder. The missing word are chosen from named entities (NE), common nouns (CN), verbs and prepositions. As the verbs and prepositions are less dependent with the document, most of the studies are focusing on the NE and CN datasets. 2.2 People Daily and Children’s Fairy Tale Datasets In this part, we will introduce our Chinese reading comprehension datasets in detail3 . Though many solid works on previously described public datasets, there is no studies on Chinese reading comprehension datasets. What makes our datasets different from previous works are listed as below. • As far as we know, the proposed dataset is the first Chinese Cloze-style reading comprehension datasets, which will add language diversity in the community. 1 The pre-processed CNN and Daily Mail datasets are available at http://cs.nyu.edu/˜kcho/DMQA/ The CBT datasets are available at http://www.thespermwhale.com/jaseweston/babi/CBTest.tgz 3 Our datasets are available at http://hfl.iflytek.com/chinese-rc/. 2 Document Query Answer 1 ||| People Daily (Jan 1). According to report of “New York Times”, the Wall Street stock market continued to rise as the global stock market in the last day of 2013, ending with the highest 1 ||| 人民网 1月 1日 讯 据 《 纽约 时报 》 报道 , 美国 华尔街 股市 record or near record of this year. 在 2013年 的 最后 一 天 继续 上涨 , 和 全球 股市 一样 , 都 以 最 2 ||| “New York times” reported that the S&P 500 index rose 高 纪录 或 接近 最高 纪录 结束 本年 的 交易 。 29.6% this year, which is the largest increase since 1997. 2 ||| 《 纽约 时报 》 报道 说 , 标普 500 指数 今年 上升 29.6% , 3 ||| Dow Jones industrial average index rose 26.5%, which is the 为 1997年 以来 的 最 大 涨幅 ; largest increase since 1996. 3 ||| 道琼斯 工业 平均 指数 上升 26.5% , 为 1996年 以来 的 最 大 4 ||| NASDAQ rose 38.3%. 涨幅 ; 5 ||| In terms of December 31, due to the prospects in employment 4 ||| 纳斯达克 上涨 38.3% 。 and possible acceleration of economy next year, there is a rising 5 ||| 就 12月 31日 来说 , 由于 就业 前景 看好 和 经济 增长 明年 可 confidence in consumers. 能 加速 , 消费者 信心 上升 。 6 ||| As reported by Business Association report, consumer 6 ||| 工商 协进会 报告 , 12月 消费者 信心 上升 到 78.1 , 明显 高 confidence rose to 78.1 in December, significantly higher than 72 于 11月 的 72 。 in November. 7 ||| 另 据 《 华尔街 日报 》 报道 , 2013年 是 1995年 以来 美国 7 ||| Also as “Wall Street journal” reported that 2013 is the best U.S. 股市 表现 最 好 的 一 年 。 stock market since 1995. 8 ||| 这 一 年 里 , 投资 美国 股市 的 明智 做法 是 追 着 “ 傻钱 ” 跑 。 8 ||| In this year, to chase the “silly money” is the most wise way to 9 ||| 所谓 的 “ 傻钱 ” XXXXX, 其实 就 是 买 入 并 持有 美国 股票 invest in U.S. stock. 这样 的 普通 组合 。 9 ||| The so-called “silly money” is that, to buy and hold the 10 ||| 这个 策略 要 比 对冲 基金 和 其它 专业 投资者 使用 的 更为 复 common combination of U.S. stock. 杂 的 投资 方法 效果 好 得 多 。 10 ||| This strategy is better than other complex investment methods, such as hedge funds and the methods adopted by other professional investors. 所谓 的 “ 傻钱 ” XXXXX, 其实 就 是 买 入 并 持有 美国 股票 这样 的 普通 组合 。 The so-called “silly money” XXXXX is that, to buy and hold the common combination of U.S. stock. 策略 strategy Figure 1: Example training sample in People Daily datasets (the English translation is given in the right box). The ”XXXXX“ represents the missing word. In this example, the document consists of 10 sentences, and the 9th sentence is chosen as the query. • We provide a large-scale Chinese reading comprehension data in news domain, as well as its validation and test data as the in-domain test. • Further, we release two out-of-domain test sets, and it deserves to highlight that one of the test sets is made by the humans, which makes it harder to answer than the automatically generated test set. People Daily. We roughly collected 60K news articles from the People Daily website4 . Following Liu et al. (2016), we process the news articles into the triple form hD, Q, Ai. The detailed procedures are as follows. • Given a certain document D, which is composed by a set of sentences D = {s1 , s2 , ..., sn }, we randomly choose an answer word A in the document. Note that, we restrict the answer word A to be a noun, as well as the answer word should appear at least twice in the document. The partof-speech and sentence segmentation is identified using LTP Toolkit (Che et al., 2010). We do not distinguish the named entities and common nouns as Hill et al. (2015) did. • Second, after the answer word A is chosen, the sentence that contains A is defined as the query Q, in which the answer word A is replaced by a specific placeholder hXi. • Third, given the query Q and document D, the target of the prediction is to recover the answer A. In this way, we can generate tremendous triples of hD, Q, Ai for training the proposed neural network, without any assumptions on the nature of the original corpus. Note that, unlike the previous work, using the method mentioned above, the document can be re-used for different queries, which makes it more general to generate large-scale training data for neural network training. Figure 1 shows an example of People Daily datasets. Children’s Fairy Tale. Except for the validation and test set of People Daily news data, we also present two out-of-domain test sets as well. The two out-of-domain test sets are made from the Children’s Fairy Tale (CFT), which is fairly different from the news genre. The reason why we set out-of-domain test sets is that, the children’s fairy tale mainly consists of the stories of animals or virtualized characters, and 4 http://www.people.com.cn People Daily Train Valid Test # Query Max # tokens in docs Max # tokens in query Avg # tokens in docs Avg # tokens in query Vocabulary 870,710 618 502 379 38 3,000 536 153 425 38 248,160 Children’s Fairy Tale Test-auto Test-human 3,000 634 265 410 41 1,646 318 83 122 20 1,953 414 92 153 20 N/A Table 1: Statistics of People Daily datasets and Children’s Fairy Tale datasets. this prevents us from utilizing the gender information and world knowledge in the training data, which is important when solving several types of questions, such as coreference resolutions etc. In CFT dataset, one test set is automatically generated using the algorithms described above, and the other one is made by the human, which suggest that the latter is harder than the former one. Because the automatically generated test sets are aware of the co-occurence or fixed collocation of words, and thus when the pattern around the query blank exactly appeared in the document, it is much easier for the machine to identify the correct answer. While in building human evaluation test set, we have eliminated these types of samples, which makes it harder for the machine to comprehend. Intuitively, the human evaluation test set is harder than any other previously published Cloze-style test sets. The statistics of People Daily news datasets as well as Children’s Fairy Tale datasets are listed in the Table 1. 3 Consensus Attention Sum Reader In this section, we will introduce our attention-based neural network model for Cloze-style reading comprehension task, namely Consensus Attention Sum Reader (CAS Reader). Our model is primarily motivated by Kadlec et al. (2016), which aims to directly estimate the answer from the document, instead of making a prediction over the full vocabularies. But we have noticed that by just concatenating the final representations of the query RNN states are not enough for representing the whole information of query. So we propose to utilize every time slices of query, and make a consensus attention among different steps. Formally, when given a set of training triple hD, Q, Ai, we will construct our network in the following way. We first convert one-hot representation of the document D and query Q into continuous representations with a shared embedding matrix We . As the query is typically shorter than the document, by sharing the embedding weights, the query representation can be benefited from the embedding learning in the document side, which is better than separating embedding matrices individually. Then we use two different bi-directional RNNs to get the contextual representations of document and query, which can capture the contextual information both in history and future. In our implementation, we use the bi-directional Gated Recurrent Unit (GRU) for modeling. (Cho et al., 2014) e(x) = We ∗ x, where x ∈ D, Q (1) → − −−−→ hs = GRU (e(x)) (2) ← − ←−−− hs = GRU (e(x)) (3) → − ← − hs = [hs ; hs ] (4) We take hdoc and hquery to represent the contextual representations of document and query, both of which are in 3-dimension tensor shape. After that, we directly make a dot product of hdoc and hquery (t) to get the “importance” of each document word, in respect to the query word at time t. And then, !(“$%&'”|*, ,) = Sum Attention Layer / 01 = 02 + 04 1∈7(“89:;”,<) Merging Function Individual Attention Layer bi-GRU Layer Embedding Layer Mary sits beside ... says he love Mary Document he loves <BLANK> Query Figure 2: Architecture of the proposed Consensus Attention Sum Reader (CAS Reader). we use the softmax function to get a probability distribution α over the document hdoc , also known as “attention”. α(t) = sof tmax(hdoc hquery (t)) (5) In this way, for every time step t in the query, we can get a probability distribution over the document, denoted as α(t), where α(t) = [α(t)1 , α(t)1 , ..., α(t)n ], α(t)i means the attention value of ith word in the document at time t, and n is the length of the document. To get a consensus attention over these individual attentions, we explicitly define a merging function f over α(1)...α(m). We denote this as s = f (α(1), ..., α(m)) (6) where s is the final attention over the document, m is the length of the query. In this paper, we define the merging function f as one of three heuristics, shown in equations below.  m P   sof tmax( α(t)), if mode = sum;    t=1  m P s ∝ sof tmax( 1 (7) α(t)), if mode = avg; m   t=1    sof tmax( max α(t)), if mode = max. t=1...m Finally, we map the attention result s to the vocabulary space V , and sum the attention value which occurs in different place of the document but shares the same word, as Kadlec et al. (2016) do. P (w|D, Q) = X si , w ∈ V (8) i∈I(w,D) where I(w, D) indicate the position that word w appear in the document D. Figure 2 shows the proposed neural network architecture. 4 4.1 Experiments Experimental Setups Training details of neural network models are illustrated as follows. Embed. # units Hidden # units Dropout 384 384 384 256 256 384 384 256 None None None 0.1 CNN News CBTest NE CBTest CN People Daily & CFT Table 2: Other neural network setups for each task. Note that, the dropout is only applied to the output of the GRUs. CNN News Train Valid # Query Max # candidates Avg # candidates Avg # tokens Vocabulary 380,298 527 26 762 3,924 187 26 763 118,497 Test 3,198 396 25 716 CBT NE Train Valid 108,719 10 10 433 2,000 10 10 412 53,063 Test 2,500 10 10 424 CBT CN Train Valid 120,769 10 10 470 2,000 10 10 448 53,185 Test 2,500 10 10 461 Table 3: Statistics of public Cloze-style reading comprehension datasets: CNN news data and CBTest NE(Named Entites) / CN(Common Nouns). • Embedding Layer: We use randomly initialized embedding matrix with uniformed distribution in the interval [−0.1, 0.1]. Note that, no pre-trained word embeddings are used in our experiments. • Hidden Layer: We initialized the GRU units with random orthogonal matrices (Saxe et al., 2013). As GRU still suffers from the gradient exploding problem, we set gradient clipping threshold to 10 in our experiments (Pascanu et al., 2013) . • Vocabulary: For training efficiency and generalization, in People Daily and CFT datasets, we truncate the full vocabulary (about 200K) and set a shortlist of 100K. All unknown words are mapped to 10 different specific symbols using the method proposed by Liu et al. (2016). There is no vocabulary truncation in CNN and CBTest dataset. • Optimization: We used the ADAM update rule (Kingma and Ba, 2014) with an initial learning rate lr = 0.0005, and used negative log-likelihood as the training objective function. The batch size is set to 32. Other neural network setups, such as dimensions of embedding layer and hidden layer, and dropout (Srivastava et al., 2014) for each task, are listed in Table 2. We trained model for several epochs and choose the best model according to the performance of validation set. All models are trained on Tesla K40 GPU. Our model is implemented with Theano (Theano Development Team, 2016) and Keras (Chollet, 2015). 4.2 Results on Public Datasets To verify the effectiveness of our proposed model, we first tested our model on public datasets. Our evaluation is carried out on CNN news datasets (Hermann et al., 2015) and CBTest NE/CN datasets (Hill et al., 2015), and the statistics of these datasets are listed in Table 3. No pre-processing is done with these datasets. The experimental results are given in Table 4. We evaluate the model in terms of its accuracy. Due to the time limitations, we did not evaluate our model in ensemble. CNN News. The performance on CNN news datasets shows that our model is on par with the Attention Sum Reader, with 0.4% decrease in validation and 0.5% improvements in the test set. But we failed to outperform the Stanford AR model. While the Stanford AR utilized GloVe embeddings (Pennington et Deep LSTM Reader† Attentive Reader† Impatient Reader† Human (context+query)‡ LSTMs (context+query)‡ MemNN (window + self-sup.)‡ Stanford AR\ AS Reader] CAS Reader (mode: avg) CNN News Valid Test CBTest NE Valid Test CBTest CN Valid Test 55.0 61.6 61.8 63.4 72.4 68.6 68.2 51.2 70.4 73.8 74.2 62.6 64.2 68.8 68.2 57.0 63.0 63.8 66.8 72.4 69.5 70.0 81.6 41.8 66.6 68.6 69.2 81.6 56.0 63.0 63.4 65.7 Table 4: Results on the CNN news, CBTest NE (named entity) and CN (common noun) datasets. Results marked with † are taken from (Hermann et al., 2015), and ‡ are taken from (Hill et al., 2015), and \ are taken from (Chen et al., 2016), and ] are taken from (Kadlec et al., 2016) People Daily Valid Test AS Reader CAS Reader (mode: avg) CAS Reader (mode: sum) CAS Reader (mode: max) 64.1 65.2 64.7 63.3 Children’s Fairy Tale Test-auto Test-human 67.2 68.1 66.8 65.4 40.9 41.3 43.0 38.3 33.1 35.0 34.7 32.0 Table 5: Results on People Daily datasets and Children’s Fairy Tale (CFT) datasets. al., 2014), and only normalized the probabilities over the named entities in the document, rather than all the words, and this could make a difference in the results. But in our model, we do not optimize for a certain type of dataset, which make it more general. CBTest NE/CN. In CBTest NE dataset, our model gives slight improvements over AS Reader, where 0.4% improvements in the validation set and 0.6% improvements in the test set. In CBTest CN, though there is a slight drop in the validation set with 0.6% declines, there is a boost in the test set with an absolute improvements 2.3%, which suggest our model is effective, and it is beneficial to consider every slices of the query when answering. 4.3 Results on Chinese Reading Comprehension Datasets The results on Chinese reading comprehension datasets are listed in Table 5. As we can see that, the proposed CAS Reader significantly outperform the AS Reader in all types of test set, with a maximum improvements 2.1% on the CFT test-auto dataset. The results indicate that making a consensus attention over multiple time steps are better than just relying on single attention (as AS Reader did). This is similar to the use of “model ensemble”, which is also a consensus voting result by different models. We also evaluated different merging functions. From the results, we can see that the avg and sum methods significantly outperform the max heuristics, and the max heuristics failed to outperform the AS Reader. A possible reason can be explained that the max operation is very sensitive to the noise. If a non-answer word is given to a high probability in one time step of the query, the avg and sum could easily diminish this noise by averaging/summing over other time steps. But once there is a higher value given to a non-answer word in max situation, the noise can not be removed, and will preserve till the end of final attentions, which will influence the predictions a lot. Also, we have noticed that, though we have achieved over 65% in accuracy among People Daily datasets, there is a significant drop in the two CFT test sets. Furthermore, the the human evaluated test set meets a sharp decline over 8% accuracy to the automatically generated test set. The analyses can be concluded as • As we regard the CFT datasets as the out-of-domain tests, there is a gap between the training data and CFT test data, which poses declines in these test sets. Such problems can be remedied by introducing the similar genre of training data. • Regardless of the absolute accuracies in CFT datasets, the human test set is much harder for the machine to read and comprehend as we discussed before. Through these results, we can see that there is a big gap between the automatically generated queries and the human-selected questions. Note that, in our human-evaluated test set, the query is also formulated from the original sentence in the document, which suggest that if we use more general form of queries, there should be another rise in the comprehension difficulties. For example, instead of asking “I went to the XXXXX this morning .”, we change into a general question form of “Where did I go this morning ?”, which makes it harder for the machine to comprehend, because there is a gap between the general question form and the training data. 5 Related Work Many NN-based reading comprehension models have been proposed, and all of them are attention-based models, which indicate that attention mechanism is essential in machine comprehensions. Hermann et al. (2015) have proposed a methodology for obtaining a large quantities of hD, Q, Ai triples. By using this method, a large number of training data can be obtained without much human intervention, and make it possible to train a reliable neural network to study the inner relationships inside of these triples. They used attention-based neural networks for this task. Evaluation on CNN/DailyMail datasets showed that their approach is effective than traditional baselines. Hill et al. (2015) also proposed a similar approach for large scale training data collections for children’s book reading comprehension task. By using window-based memory network and self-supervision heuristics, they have surpass all other methods in predicting named entities(NE) and common nouns(CN) on both the CBT and the CNN QA benchmark. Our CAS Reader is closely related to the work by Kadlec et al. (2016). They proposed to use a simple model that using the attention result to directly pick the answer from the document, rather than computing the weighted sum representation of document using attention weights like the previous works. The proposed model is typically motivated by Pointer Network (Vinyals et al., 2015). This model aims to solve one particular task, where the answer is only a single word and should appear in the document at least once. Experimental results show that their model outperforms previously proposed models by a large margin in public datasets (both CBTest NE/CN and CNN/DailyMail datasets). Liu et al. (2016) proposed an effective way to generate and exploit large-scale pseudo training data for zero pronoun resolution task. The main idea behind their approach is to automatically generate largescale pseudo training data and then using the neural network model to resolve zero pronouns. They also propose a two-step training: a pre-training phase and an adaptation phase, and this can be also applied to other tasks as well. The experimental results on OntoNotes 5.0 corpus is encouraging and the proposed approach significantly outperforms the state-of-the-art methods. In our work, we proposed an entirely new Chinese reading comprehension dataset, which add the diversity to the existing Cloze-style reading comprehension datasets. Moreover, we propose a refined neural network model, called Consensus Attention-based Sum Reader. Though many impressive progress has been made in these public datasets, we believe that the current machine comprehensions are still in the pre-mature stage. As we have discussed in the previous section, to answer a pseudo query to the document is not enough for machine comprehension. The general question form can be seen as a comprehensive processing of our human brains. Though our human-evaluated test set is still somewhat easy for machine to comprehend (but harder than the automatically generated test set), releasing such dataset will let us move a step forward to the real-world questions, and becomes a good bridge between automatic questions and real-world questions. 6 Conclusion In this paper, we introduce the first Chinese reading comprehension datasets: People Daily and Children’s Fairy Tale. Furthermore, we also propose a neural network model to handle the Cloze-style reading comprehension problems. Our model is able to take all question words into accounts, when computing the attentions over the document. Among many public datasets, our model could give significant improvements over various state-of-the-art baselines. And also we set up a baseline for our Chinese reading comprehension datasets, that we hopefully make it as a starter in future studies. The future work will be carried out in the following aspects. First, we would like to work on another human-evaluated dataset, which will contain the real-world questions and is far more difficult than the existing datasets publicly available. Second, we are going to investigate hybrid reading comprehension models to tackle the problems that rely on comprehensive induction of several sentences. Acknowledgements We would like to thank the anonymous reviewers for their thorough reviewing and proposing thoughtful comments to improve our paper. This work was supported by the National 863 Leading Technology Research Project via grant 2015AA015407, Key Projects of National Natural Science Foundation of China via grant 61632011, and National Natural Science Youth Foundation of China via grant 61502120. References Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. 2014. Neural machine translation by jointly learning to align and translate. arXiv preprint arXiv:1409.0473. Wanxiang Che, Zhenghua Li, and Ting Liu. 2010. Ltp: A chinese language technology platform. In Proceedings of the 23rd International Conference on Computational Linguistics: Demonstrations, pages 13–16. Association for Computational Linguistics. Danqi Chen, Jason Bolton, and Christopher D. Manning. 2016. A thorough examination of the cnn/daily mail reading comprehension task. In Association for Computational Linguistics (ACL). Kyunghyun Cho, Bart van Merrienboer, Caglar Gulcehre, Dzmitry Bahdanau, Fethi Bougares, Holger Schwenk, and Yoshua Bengio. 2014. Learning phrase representations using rnn encoder–decoder for statistical machine translation. In Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 1724–1734. Association for Computational Linguistics. François Chollet. 2015. Keras. https://github.com/fchollet/keras. Karl Moritz Hermann, Tomas Kocisky, Edward Grefenstette, Lasse Espeholt, Will Kay, Mustafa Suleyman, and Phil Blunsom. 2015. Teaching machines to read and comprehend. In Advances in Neural Information Processing Systems, pages 1684–1692. Felix Hill, Antoine Bordes, Sumit Chopra, and Jason Weston. 2015. The goldilocks principle: Reading children’s books with explicit memory representations. arXiv preprint arXiv:1511.02301. Rudolf Kadlec, Martin Schmid, Ondrej Bajgar, and Jan Kleindienst. 2016. Text understanding with the attention sum reader network. arXiv preprint arXiv:1603.01547. Diederik Kingma and Jimmy Ba. arXiv:1412.6980. 2014. Adam: A method for stochastic optimization. arXiv preprint Ting Liu, Yiming Cui, Qingyu Yin, Shijin Wang, Weinan Zhang, and Guoping Hu. 2016. Generating and exploiting large-scale pseudo training data for zero pronoun resolution. arXiv preprint arXiv:1606.01603. Razvan Pascanu, Tomas Mikolov, and Yoshua Bengio. 2013. On the difficulty of training recurrent neural networks. ICML (3), 28:1310–1318. Jeffrey Pennington, Richard Socher, and Christopher Manning. 2014. Glove: Global vectors for word representation. In Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 1532–1543. Association for Computational Linguistics. Andrew M Saxe, James L McClelland, and Surya Ganguli. 2013. Exact solutions to the nonlinear dynamics of learning in deep linear neural networks. arXiv preprint arXiv:1312.6120. Nitish Srivastava, Geoffrey E Hinton, Alex Krizhevsky, Ilya Sutskever, and Ruslan Salakhutdinov. 2014. Dropout: a simple way to prevent neural networks from overfitting. Journal of Machine Learning Research, 15(1):1929– 1958. Wilson L Taylor. 1953. Cloze procedure: a new tool for measuring readability. Journalism and Mass Communication Quarterly, 30(4):415. Theano Development Team. 2016. Theano: A Python framework for fast computation of mathematical expressions. arXiv e-prints, abs/1605.02688, May. Oriol Vinyals, Meire Fortunato, and Navdeep Jaitly. 2015. Pointer networks. In Advances in Neural Information Processing Systems, pages 2692–2700.
9cs.NE
DNA Self-Assembly For Constructing 3D Boxes Ming-Yang Kao1,⋆ and Vijay Ramachandran2,⋆⋆ arXiv:cs/0112009v1 [cs.CC] 8 Dec 2001 1 2 Department of Computer Science, Northwestern University, Evanston, IL 60201, USA, [email protected] Department of Computer Science, Yale University, New Haven, CT 06520-8285, USA, [email protected] Abstract. We propose a mathematical model of DNA self-assembly using 2D tiles to form 3D nanostructures. This is the first work to combine studies in self-assembly and nanotechnology in 3D, just as Rothemund and Winfree did in the 2D case. Our model is a more precise superset of their Tile Assembly Model that facilitates building scalable 3D molecules. Under our model, we present algorithms to build a hollow cube, which is intuitively one of the simplest 3D structures to construct. We also introduce five basic measures of complexity to analyze these algorithms. Our model and algorithmic techniques are applicable to more complex 2D and 3D nanostructures. 1 Introduction DNA nanotechnology and DNA self-assembly are two related technologies with enormous potentials. The goal of DNA nanotechnology is to construct small objects with high precision. Seeman’s visionary work [8] in 1982 pioneered the molecular units used in self-assembly of such objects. More than a decade later, double-crossover (DX) molecules were proposed by Fu and Seeman [3] and triple-crossover (TX) molecules by LaBean et al. [5] as DNA self-assembly building blocks. Laboratory efforts have been successful in generating interesting three-dimensional (3D) molecular structures, including the small cube of Chen and Seeman [1]. However, these are immutable and limited in size, mainly because their fabrication is not based on a mathematical model that can be extended as necessary. In parallel to DNA nanotechnology, studies on self-assembly of DNA tiles have focused on using local deterministic binding rules to perform computations. These rules are based on interactions between exposed DNA sequences on individual tiles; tiles assemble into a particular 1D or 2D structure when in solution, encoding a computation. Winfree [10] formulated a model for 2D computations using DX molecules. Winfree et al. [11] used 1D tiles for 1D computations and 2D constructions with DX molecules. LaBean et al. [4] were the first to compute with TX molecules. ⋆ ⋆⋆ Supported in part by NSF Grants CCR-9531028 and EIA-0112934. Part of this work was performed while this author was visiting the Department of Computer Science, Yale University, New Haven, CT 06520-8285, USA, [email protected]. Supported by a 2001 National Defense Science and Engineering Graduate Fellowship. Combining these two technologies, several researchers have demonstrated the power of DNA self-assembly in nanostructure fabrication. Winfree et al. [13] investigated how to use self-assembly of DX molecules to build 2D lattice DNA crystals. Rothemund and Winfree [7] further proposed a mathematical model and a complexity measure for building such 2D structures. A natural extension of the seminal 2D results of Winfree et al. [13] and Rothemund and Winfree [7] would be the creation of 3D nanostructures using tiling. To initiate such an extension, this paper (1) proposes a general mathematical model for constructing 3D structures from 2D tiles; (2) identifies a set of biological and algorithmic issues basic to the implementation of this model; and (3) provides basic computational concepts and techniques to address these issues. Under the model, the paper focuses on the problem of constructing a hollow cube, which is intuitively one of the simplest 3D structures to construct. We present algorithms for the problem and analyze them in terms of five basic measures of complexity. There are three natural approaches to building a hollow cube. The first approach uses 1D tiles to form 2D DX-type tiles as in [11], and then uses these tiles to construct a cube. Our paper does not fully investigate this possibility because of the incovenient shape of these molecules (see Sect. 2.1), but our algorithms can be modified to accommodate these DX-type tiles. The second approach builds a cube from genuine 2D tiles, which is the focus of this paper. The third approach is perhaps the most natural: build a cube from genuine 3D tiles. It is not yet clear how such 3D tiles could be created; conceivably, the cube of Chen and Seeman [1] may lead to tiles of this form. This paper does not fully investigate this possibility, either, because this approach is algorithmically straightforward and similar to the 2D case. The basic idea of our algorithms is to use 2D tiles to form a shape on the plane that can fold into a box, as illustrated in Fig. 1(a)–(b). We can easily synthesize a set of tiles to create the intitial 2D shape. To overcome a negligible probability of success due to biochemical factors, we must put many copies of these tiles into solution at once; but we must then worry about multiple copies of the shape interfering with each other, preventing folding, as in Figure 1(c). To avoid this problem, we introduce randomization, so that different copies of the shape have unique sticky ends. The growth of tiles into a complete structure must still be deterministic (as it is based on Watson-Crick hybridization), but we randomize the computation input — the seed tiles from which the rest of the shape assembles. The edges then still relate to each other, but depend on the random input that is different for each shape in solution. If each input can form with only low probability, interference with another copy of the shape will be kept to a minimum. This raises another important issue — that of using self-assembly to communicate information from one part of the shape to another. Since the edges must relate to each other and the random input, designing local rules becomes nontrivial. In this paper, we explore and formalize patterns used in completing this task. In addition, we formalize biological steps that allow a specific subset 1 4 1 2 3 4 5 1 5 3 2 6 6 7 7 2 2 4 3 3 1 1 5 2 2 6 1 7 (a) (b) (c) Fig. 1. (a) 2D planar shape that will fold into a box. Each section is formed from many smaller 2D DNA tiles. Edges with the same number have complementary sticky ends exposed so they can hybridize. (b) Folding of the shape in (a) into a box. Here, edges 4, 5, 6, and 7 have all hybridized. Hybridization of edges 2 and 3, whose two complements are now in close proximity, will cause edge 1 to hybridize and form the complete box. (c) Multiple copies of the 2D shape in solution. Copies of the shape can interfere and attach infinitely without control as long as edges have matching sticky ends. of tiles to be added in an isolated period of time, thus allowing better control of growth. We couple this with the use of temperature to improve the probability of a successful construction. The remainder of this paper is organized as follows. Section 2 describes the model of computation, including notation for DNA tiles and definitions of complexity measures. Section 3 describes the algorithms in detail, and Section 4 discusses future research possibilities. 2 Model of Computation In this section we formally introduce our model of self-assembly, the Generalized Tile Assembly Model, on both the mathematical and biological level. It is an extension of the model presented by Rothemund and Winfree in [7]. 2.1 Molecular Units of Self-Assembly We begin with the biological foundation for our model. We intend to build 3D structures using the folding technique shown in Fig. 1 and allow construction of all 2D structures possible with the Tile Assembly Model. Our model relies on using the molecular building block of a DNA tile. Tiles can naturally hybridize to form stable shapes of varying sizes, and the individual tiles can easily be customized and replicated (via synthesis and PCR before the procedure) for a specific algorithm. DNA tiles are small nucleotides with exposed action sites (also known as sticky ends of a DNA strand) consisting of a single-stranded sequence of base pairs. When this sequence matches a complementary sequence on an action site of another tile, the Watson-Crick hybridization property of DNA causes these two molecules to bind together, forming a larger structure. A tile can be synthesized in the laboratory to have specific sticky ends. Different combinations of sticky ends on a tile essentially yield uniquely-shaped puzzle pieces. The tiles will automatically hybridize when left in solution. Most work in self-assembly uses DX and TX molecules for tiles, but the shape of these molecules causes a problem for 3D construction. Since the sticky ends are on diagonally opposite ends (see [3] and [5]), these tiles form structures with ragged edges when they hybridize, as in Figure 2(a). Our algorithms can easily be modified to use these tiles by adjusting for proper alignment before folding into a box. (a) (b) sticky end (c) sticky end individual DX molecules Fig. 2. (a) 2D structure formed from DX molecules. The left and right sides cannot hybridize because they are aligned improperly; the same is true for the top and bottom sides. (b) Branched-molecule DNA tile from [8]. (c) Snynthetic DNA tile derived from the structure of tRNA. However, we propose a simpler alternative, which is using the branched molecules of Seeman [8] or a variant derived from the structure of tRNA. These molecules, sketched in Figures 2(b) and (c), are truly 2D with sticky ends on four sides. The structure is stable while the sticky ends are free-floating in solution — so the molecules have flexibility to align properly during folding. Such molecules offer a natural motivation for modeling them using Wang’s theory of tiling [9], which allows us to abstract construction using these molecules to a symbolic level. 2.2 Symbolic Representation of Tiles Definition 1. A DNA sequence of length n is an ordered sequence of base pairs 5′ − b1 b2 · · · bn − 3′ where the sequence has a 5-prime and 3-prime end, and bi ∈ B = {A, T, C, G}, the set of base pairs. We will assume that if the directions are not explicity written, the sequence is written in the 5′ → 3′ direction. 1. The Watson-Crick complement of sequence s = 5′ − b1 b2 · · · bn − 3′ , denoted s, is the sequence1 3′ − b1 b2 · · · bn − 5′ , where A = T, C = G. Define s = s. 2. The concatenation of two sequences s = s1 · · · sn and t = t1 · · · tm , denoted s · t, or simply st, is the sequence s1 · · · sn t1 · · · tm . 3. The subsequence from i to j of sequence s = 5′ − b1 b2 · · · bn − 3′ , denoted s[i : j], is the sequence 5′ − bi bi+1 · · · bj−1 bj − 3′ , where 1 ≤ i < j ≤ n. Given the above definitions, two DNA strands can hybridize if they have complementary sequences. Formally, s = s1 · · · sn and t = t1 · · · tm can hybridize if there exist integers hs1 , hs2 , ht1 , ht2 such that s[hs1 : hs2 ] = t[ht1 : ht2 ]. We assume there are no misbindings, that is, the above condition must be met exactly with no errors in base-pair binding. Remark 2. Note that st (or (s · t) ) 6= st (or s · t); rather, st = t · s. Definition 3. The threshold temperature for a DNA sequence is a temperature t in some fixed set T such that the sequence is unable to remain stably hybridized to its complement when the solution is at a temperature higher than t′ ∈ (t − ǫ, t + ǫ) for ǫ > 0.2 (Heating a solution generally denatures strands, so this definition has strong biological foundation. The consequences and methodology of using temperature in designing DNA sequences for tiles is discussed in [2].) If s has a lower threshold temperature than t, we say s binds weaker than t. As with most work in DNA computing, our model uses DNA sequences to encode information3 — in our case, an identifier specifying what kinds of matches are allowed between tiles on a given side. Since there are no misbindings, these identifiers map uniquely to DNA sequences present on the sides of tiles that can bind to each other. Formally, we have the following. Definition 4. Let S be the set of symbols used to represent the patterns on the sides of our tiles. We assume S is closed under complementation, that is, if s ∈ S then there exists some s′ ∈ S such that s′ = s where S s is the complement of s (the purpose of this will be clear below). Let W ⊂ i B i be the set of DNA sequences called DNA words such that the words do not interfere with each other or themselves (i.e., bind inappropriately). We then define the injective map enc : S → W that is the encoding of a symbol into a DNA word. This map obeys complementation: enc (s) = enc(s). 1 2 3 The assumption that sequences written without directions are given 5′ → 3′ means that the complement of b1 b2 · · · bn is bn · · · b2 b1 , which is not standard convention but is technically correct. A fixed set of threshold temperatures simplifies the model and corresponds to the temperature parameter in [7]. To compensate we allow the actual threshold temperature to deviate slightly from the fixed point. Condon, Corn, and Marathe [2] have done work on designing good DNA sequences for problems like this one. Definition 5. A DNA tile is a 4-tuple of symbols T = (sN , sE , sS , sW ) such that si ∈ S and enc(si ) is the exposed DNA sequence at the north, east, south, or west action site of the tile, for i = N, E, S, W . Given two tiles T1 and T2 , they will bind if two sides have complementary symbols. Properties of hybridization, including threshold temperature, carry over to the hybridization of tiles. We make a stronger no-misbinding assumption for tiles, requiring that the sticky ends on the tiles match exactly and fully. At this stage, our model exactly matches that of Rothemund and Winfree in [7], except that our tiles can “rotate”; that is, (sN , sE , sS , sW ) = (sE , sS , sW , sN ). This corresponds more closely to tile structure. The model, at this point, could require many symbols to express different tile types, and possibly an exponential number of DNA words. Ideally, we would like to arbitrarily extend the symbolic or informational content of each side of a tile. Therefore we make the following generalization. Definition 6. Let Σ be a set of symbols closed under complementation, and let Ω be a set of corresponding DNA words. A k-level generalization of the model defines a map g : Σ k → S and a corresponding encoding genc : Σ k → W, where genc(σ) = enc(g(σ)) for σ ∈ Σ k such that an abstract tile definition, which is a 4-tuple of k-tuples of symbols in Σ, is equivalent to a DNA tile. We define complementation for a k-tuple in Σ k as follows: let σ = (σ1 , . . . , σk ) be (σ1 , . . . , σk ) so that genc(σ) = enc(g(σ)) = enc(g(σ)) = enc(g(σ)). This makes the hybridization condition equivalent to having complementary symbols in k-tuples for sides that will bind. The definition is purposefully broad in order to allow different algorithms to define the encoding based on the number of words and tiles needed. A 1-level generalization with Σ = S and Ω = W where g(s) = s and genc = enc is the original Rothemund-Winfree Tile Assembly Model. In this paper, we use the following model. Definition 7. The concatenation generalization is a k-level generalization where W ⊂ Ω k and g maps every combination of symbols in Σ k to a unique symbol in S. Partition S into S ′ and S ′ such that each set contains the complement symbols of the other, and S ′ ∩ S ′ = ∅.4 For σ ∈ S ′ , define genc(g −1 (σ)) = enc(σ) = ω1 ω2 · · · ωk , where enc(σi ) = ωi ∈ Ω and g −1 (σ) = (σ1 , σ2 , . . . , σk ). Then for σ ∈ S ′ , let enc(σ) = ωk · ωk−1 · · · ω1 , so that genc(g −1 (σ)) = genc(g −1 (σ)). In other words, the concatenation generalization model is a straightforward extension of the tile model where each side of a tile corresponds to a k-tuple of symbols, where the DNA sequence at the corresponding action site is simply 4 The map enc as defined will be one-to-one, and so is g, and so this can be done since the DNA sequence corresponding to any symbol has a unique complement, and therefore a unique complement symbol. the concatenation of the encodings of the individual symbols.5 Using this simple model, we can reduce the number of DNA words needed to |Σ| from |Σ|k , and create simpler descriptions of our tiles. 2.3 Algorithmic Procedures With the above models for tiles, we now discuss procedures for growing larger structures. We follow Rothemund and Winfree [7] and Markov [6] and use the common self-assembly assumption that a structure begins with a seed tile and grows, at each timestep, by hybridization with another free-floating tile.6 The new tile hybridizes at a given position following one of two types of rules: Deterministic Given the surrounding tiles at that position, only one tile type, with specific sticky ends on the non-binding sides, can fit. Randomized Multiple tile types (with different sticky ends on the non-binding sides) could fit the position given the tiles present; a new action site is created with probability proportional to the concentration of its tile type in solution. Therefore, to grow a structure, an algorithm repeats steps until the structure is complete: add tiles to solution; wait for them to adhere to the growing structure; optionally removes excess tiles from solution by “washing them away.” Cycling temperature during these steps to prevent or induce binding (based on threshold temperatures) can be done while waiting for hybridization, and is called temperature-sensitive binding. 2.4 Complexity We consider five basic methods of analyzing algorithms using our model. Time complexity Each algorithm is a sequence of self-assembly steps described above, thus the natural measure of time complexity in our model is the number of steps required (which describes laboratory time). Space complexity The number of distinct physical tile types (not the actual number of molecules produced) is space complexity. Introduced by [7], this describes the amount of unique DNA synthesis necessary. Alphabet size The number of DNA words, or |Ω| or |W|, has a rough laboratory limit [2], and so the size of the symbol set used (|Σ| or |S|), which corresponds directly to the number of words, has practical significance. 5 6 Potentially, the concatenation model could cause interference among tiles. If we maintain no misbindings, however, our model removes this from analysis. In addition, it is theoretically possible to design DNA words so interference does not occur, depending on the algorithm. In reality, multiple tiles can hybridize at once and structures consisting of more than one tile can hybridize to each other, but we lose no generality with the Markov assumption. Generalization level The generalization level is the amount of information on a side of a tile. This is related to the length of the sticky ends (and thus has biological consequences) and the number of actual DNA words (via |S|). Probability of misformation Misformed structures contain tiles that are not bound properly on all sides. Assuming the Markov model, consider adding tile T to a partial structure S. If complete hybridization requires binding on two sides, but T manages to hybridize only on one side (while the other action site does not match), S + T has a misformation. We quantify this probability with the following. Definition 8. Let the success probability at step t be the probability that a free-floating tile in solution binds at all possible sides to a partial structure at a given spot. (Step t is the addition of a tile to that spot on structure St , resulting in St+1 .) This is Pr(St+1 is correct | St is correct) = Ncorrect , Nall where Ncorrect is the number of tile types that can correctly bind, while Nall is the number of tile types in solution that could bind, possibly even incompletely. Call this qt . Then the misformation probability at step t is pt = 1−qt . If the algorithm has k additions, then the misformation probability for the algorithm is 1 − q0 q1 · · · qk−1 . Then an algorithm is misformationproof if its misformation probability at every step is zero, yielding a zero total probability of misformation. 3 Hollow Cube Algorithms In this section, we examine algorithms designed to use our model to build a 3D hollow cube using the folding technique shown in Fig. 1. Let the length of a side of the cube, n, be the input to the algorithms. We present the most interesting algorithm in detail and discuss some others briefly. 3.1 Overview Figure 3(a) illustrates the planar shape our algorithms construct. We will reference the labels and shading of regions in the figure during our discussion. As stated earlier in Sect. 1, we must make each shape unique so different partial structures in solution do not bind to and interfere with each other. Once we have a unique seed structure, we can then use self-assembly with basic rules to make the edges of the shape correspond so folding will occur. There are three basic self-assembly patterns used to construct different parts of the shape. Random assembly Implements a random rule (see Sect. 2.3). Formally, add all tiles in a set of distinct tiles R in equal concentrations so each could base strip R Q L H P G B K E C F D J I (a) O (before growth) pattern pattern pattern (after growth) (b) pattern M N A (arrow shows growth direction) (c) Fig. 3. (a) Regions of the 2D planar shape. (b) A straight-copy pattern. (c) A turn-copy pattern. potentially hybridize completely at a given position. Thus the information at that position is completely random. The tiles differ by a component of their exposed k-tuples, assuming a k-level generalization. Straight copy See Figure 3(b). Tiles are added to copy the pattern along one end of a region through to a parallel end of an adjacent region being constructed. This rule is deterministic. Turn copy See Figure 3(c). Tiles are added to copy the pattern along one end of a region to a perpendicular end of an adjacent region being constructed. Counters will be required to position the tiles appropriately to complete this deterministic rule. The algorithm begins by assembling a random pattern string that will be copied to the top and bottom of the box. Then random patterns are added for the remaining edges of the box, and these are copied to the corresponding edges accordingly. (Refer to Fig. 1 for corresponding edges.) Finally, the shape that will fold is cut out by raising the temperature, assuming that the bonds between tiles along the region-borderline have weak threshold temperatures. The regions that are shaded in Fig. 3(a) are cut away. 3.2 Notation All of our algorithms will use a 3-level concatenation generalization model; thus a tile is a 4-tuple of triplets that we write TN × TS × TW × TE , with each Ti = (σ1 , σ2 , σ3 ). We change the order of the tuple to more easily identify tiles that will bind, since most binding will be north-south or west-east. (This decision is arbitrary and purely notational.) We assume all tiles are oriented so that the directions are clear. We define the set Π ⊂ Σ to be the “random patterns” π1 , π2 , . . . , πp used as components of exposed triplets for tiles used in random assembly; their use will become clear when we discuss implementation of random assembly below. We use counters to control the growth of of our planar shape. This concept has been well explored in [7] and earlier papers. Each tile can be assigned a position in the plane denoted by a horizontal and vertical coordinate. We create symbols for position counters and then allow tiles to hybridize if the positions match, creating a mechanism for algorithms to place tiles in absolute or relative positions. Let H(i) and V (j) be the symbols denoting horizontal position i and vertical position j, respectively. 3.3 Row-by-row Algorithm The row-by-row algorithm sacrifices time complexity to reduce space complexity and alphabet size. In addition, by using more steps and temperature-sensitive binding, the algorithm eliminates the possibility of misformations. Implementation of Random Assembly The base strip shown in Fig. 3(a) is created via random assembly and represents the unique seed structure for the shape. The pattern assembled on the strip will be copied to other edges. The strip will have length n as it is an edge of the cube, and so we use horizontal counters to control growth. We add the following tiles to solution:   (β, H(0), V (0)) × β, H(0), V (−1) × ρ′ , H(0), V (0) × κ1 , H(1), V (0)   ′ (1) (β, H(0), V (0)) × β, H(0), V (−1) × (κ1 , H(n − 1), V (0)) × ρ , H(0), V (0)  (α, κ2 , V (0)) × α, κ2 , V (−1) × (κ1 , H(1), V (0)) × κ1 , H(2), V (0)  (α, κ2 , V (0)) × α, κ2 , V (−1) × (κ1 , H(n − 2), V (0)) × κ1 , H(n − 1), V (0) (πk , κ2 , V (0)) × πk , κ2 , V (−1) × (κ1 , H(i), V (0)) × κ1 , H(i + 1), V (0) (2) (3)      (4) (5) where the tiles in (5) vary over all i, 2 ≤ i ≤ n − 2, and all k, 1 ≤ k ≤ |Π|. Since the ends, given by (1) and (2), the tiles bordering the ends, given by (3) and (4), and the pattern tiles in the middle of the strip, given by (5), all have appropriate horizontal counter markings H(i) for every position 0, . . . , n − 1, every base strip must have the appropriate ends and length n. Note that the pattern on the exposed north and south side of tiles in position 2, . . . , n − 2 given by (5), is completely random as any one of the tiles containing some πi could hybridize there. Thus, this shape now has a unique identifier, namely, the sequence of patterns {πi } along the base strip; the probability of any sequence expressed on a given shape is |Π|n−2 . Implementation of Straight Copy We must complete a straight-copy from the base strip through regions A,B,C, and D, in addition to straight-copy patterns required elsewhere. This is done using 2n + 1 steps as the tiles for A and C are done in parallel (the same for B and D). In the following example for a straight-copy through A-D, assume that the triplet constant X = (ϕ1 , ϕ2 , ϕ3 ). The following tiles are added for each step i, 1 ≤ i ≤ 2n − 2:  (6)  (7) (α, κ2 , V (i)) × α, κ2 , V (i − 1) × (σ1 , σ2 , V (i)) × X (α, κ2 , V (i)) × α, κ2 , V (i − 1) × X × (σ1 , σ2 , V (i))  (α, κ2 , V (−i)) × α, κ2 , V (−i − 1) × (σ1 , σ2 , V (−i)) × X (8)  (α, κ2 , V (−i)) × α, κ2 , V (−i − 1) × X × (σ1 , σ2 , V (−i)) (9)  (πk , κ2 , V (i)) × πk , κ2 , V (i − 1) × X × X (10)  (πk , κ2 , V (−i)) × πk , κ2 , V (−i − 1) × X × X (11) Tiles versions exist for all patterns in Π when πk is present in the tile description above. We assume that X binds weaker than κ2 , so cycling the temperature ensures the tiles are attached on the κ2 side. The tiles are added sequentially to prevent misformations. It is evident that the borders of these regions, given by (6)–(9) have symbols on the exposed sides to hybridize with a strip of tiles that will form a folding edge of the box, and the middle tiles copy the random pattern to another location. After 2n − 2 of these steps, the middle regions are complete, except for two rows on top (rows 2n − 1 and 2n) and one row on the bottom (2n − 1). The order of these rows is important, as we add an extra set of tiles to prevent the top and bottom from hybridizing before the folding is complete. Implementation of Turn Copy The turn-copy step, for example, copying the bottom edge of E to the left edge of D through I so the shape can fold, is done using vertical and horizontal counters, which essentially places a tile in a specific spot. Therefore we can add all the tiles at once to complete the region without possibility of misformation. For the above example region, we would add the following tiles. Let i and j vary such that −n ≤ i ≤ −1 and −2n + 1 ≤ j ≤ −n. For all i, j, add:   (12)   (13)   (14) i = j+(n−1), (πk , H(i), V (j))× κ3 , H(i), V (j − 1) ×(κ3 , H(i), V (j))× πk , H(i − 1), V (j) i < j+(n−1), (πk , H(i), V (j))× πk , H(i), V (j − 1) ×(κ3 , H(i), V (j))× κ3 , H(i − 1), V (j) i > j+(n−1), (κ3 , H(i), V (j))× κ3 , H(i), V (j − 1) ×(πk , H(i), V (j))× πk , H(i − 1), V (j) The above copies the pattern through I, and the following adds the left edge to D, where −2n + 1 ≤ i ≤ −n − 1:  (β, H(0), V (−n)) × κ3 , H(0), V (−n − 1) × (πk , H(0), V (−n)) × σ1 , σ2 , V (−n)  (κ3 , H(0), V (i)) × κ3 , H(0), V (i − 1) × (πk , H(0), V (i)) × σ1 , σ2 , V (i)   As an extra precaution we can set κ3 binding to be weaker than πk , and cycle the temperature several times. In addition, we force the encoding of horizontal and vertical counters at the edges where the folding occurs to be the same, so that the sticky ends are in fact complementary. Summary After random assembly of the base strip, we use a row-by-row straight copy using a one-dimensional counter through regions A-D to copy the base strip’s pattern. We then use straight copy to fill in the bodies of regions E and F and add the edges using random assembly, as these will correspond to other portions of the shape. We then use a turn copy through G-J to make those edges correspond. Finally, we do a sequence of straight and turn copies from E and F through K-N and O-R to complete the shape. We then raise the temperature to cut away the shaded regions. Analysis of the Row-by-row Algorithm Theorem 9. |Σ| = 8n + |Π| + O(1). Proof. The symbol set S consists of the following: pattern symbols in Π; 4n horizontal and 4n vertical counters for positions throughout the shape; and some specialized symbols, not dependent on the inputs. ⊓ ⊔ Theorem 10. The algorithm has has time complexity approximately 5n. Proof. The algorithm consists of the following steps: 1 step to build the base strip; 2n+1 steps to complete A-D; n steps to grow E and F; 1 step to add random patterns to the leaf borders; 1 step for the first set of turn-copy steps (G,I,H,J); and 2n + 2 steps to complete regions K-N and O-R. The time complexity for the basic version, therefore, is approximately 5n steps. ⊓ ⊔ Theorem 11. The space complexity of the row-by-row algorithm is approximately 6|Π|n2 + 10|Π|n + 4|Π| + 8n tiles. Proof. Clear from counting the number of tiles required, including all the necessary variations of the same tile for position and pattern. ⊓ ⊔ Theorem 12. The number of distinct temperatures required is 3. Proof. One temperature is required for detaching the excess portions of the 2D shape, and the highest temperature level is for the main portion of the box that remains intact. Adding tiles in rows involves cycling the temperature to prevent misformations, by ensuring the “random-patterned” side of the tiles bind. This requires a third temperature between the two discussed where potential misformations denature. ⊓ ⊔ Theorem 13. The misformation probability of row-by-row is 0. Proof. The random assembly steps grow the shape in one direction using a onedimensional counter, and only the correct tiles are marked with the appropriate counters. Thus the probability for these steps is zero. The turn-copy steps use both vertical and horizontal counters defining a two-dimensional position that bind weaker than the random patterns. As these are the only three words on tiles in this pattern, these also have a misformation probability of zero. Finally, because the straight-copy steps are performed in a sequence and all the potential spots for misformation are sealed with tiles one row at a time, the probability of misformation here is also zero. Thus the misformation probability of the algorithm is 0. ⊓ ⊔ 3.4 All-together Algorithm The row-by-row algorithm does not take full advantage of the parallelism of self-assembly. Instead of adding one row after another, we can synthesize tiles with both horizontal and vertical counters, so each tile type can fit at only one absolute position. Then we can begin with virtually all our tiles in solution and allow the assembly to proceed in constant time. Random assembly is performed as above, with special one-dimensional counters to control length. However, these strips must be assembled separately and independently to prevent interference. The sequences exposed opposite the random patterns will dictate where these strips can later hybridize on the larger shape, and the random patterns will cause growth that makes the shape unique, as needed. The turn copy implementation is unchanged, as counters are already present. The straight copy, rather than using a “constant” symbol, must instead use counters for growth in both directions. Although this algorithm is straightforward, with all the tiles in solution at once, we might get incomplete partial structures. Specifically, tiles can bind on sides that have counters but do not have any πi component, thus creating shapes with no information allowing them to fold. In this case, at any of the O(n2 ) positions, a misformation could occur if the counters bind but the patterns do 2 not, and so the misformation probability of all-together is 1 − |Π|−n . We can prevent this by requiring the counters to bind weaker than the πi and cycle the temperature (requiring 3, rather than 2, distinct temperature levels), giving a misformation probability of 0, but practically, this has little meaning since we may still get incomplete, partial structures and may have to wait a long time for proper hybridization to occur. Besides this drawback, this algorithm performs well by other complexity measures. Since counters are necessary for the row-by-row algorithm, the alphabet size is not greatly increased. The algorithm has space complexity O(n2 |Π|), essentially because a different tile type is created for every position and every pattern that could be present there. 3.5 Other Algorithms We have considered several other algorithms using the same 3-level generalization model, experimenting with different uses or omissions of counters and other implementations of the self-assembly patterns. The by-region algorithm keeps space complexity and time complexity low by removing counters and controlling growth in only certain rows and columns of a region. The probability of misformation is increased. The border-first algorithm has the highest misformation probability, although has a very low time and space complexity. In this algorithm, the frame of regions are constructed first, when possible, and then “filler tiles” are added in to strengthen the structure later. There are potential stability problems during shape growth. Finally, another possibility is to build the six faces separately and allow them to hybridize, but with this method there is little control over how the final shape actually forms in solution. 4 Conclusion Our paper introduces a precise extension to the Tile Assembly Model [7] that allows greater information content per tile and scalability to three dimensions. The model better formalizes the abstraction of DNA tiles to symbols, introduces five complexity measures to analyze algorithms, and is the first to extend nanostructure fabrication to three dimensions. In addition, our paper opens up wide-ranging avenues of research. First of all, it may be possible to encode information on tiles more succintly than our algorithms do to accomplish the copy patterns discussed. The existence of good 2-level or 1-level generalization algorithms is unknown. Algorithms to form other 3D structures, having various applications in biology and computation, can be studied. More work also must be done to quantify the probabilities specified in the paper (possibly including a free-energy analysis of tile binding). Finally, there remain some important biological issues. In particular, design of a strong tile suitable for our method of computation and design of a 3D building block are two important steps to increasing the feasibility of 3D self-assembly. The use of temperature may be further refined and exploited to improve some complexity results and the number of steps needed in the lab. References 1. J. Chen and N. C. Seeman. The synthesis from DNA of a molecule with the connectivity of a cube. Nature, 350:631–633, 1991. 2. A. Condon, R. M. Corn, and A. Marathe. On combinatorial DNA word design. In Winfree and Gifford [12]. 3. T.-J. Fu and N. C. Seeman. DNA double-crossover molecules. Biochemistry, 32:3211–3220, 1993. 4. T. H. LaBean, E. Winfree, and J. H. Reif. Experimental progress in computation by self-assembly of DNA tilings. In Winfree and Gifford [12]. 5. T. H. LaBean, H. Yan, J. Kopatsch, F. Liu, E. Winfree, H. Reif, and N. Seeman. The construction, analysis, ligation and self-assembly of DNA triple crossover complexes. J. Am. Chem. Soc., 122:1848–1860, 2000. 6. I. V. Markov. Crystal Growth for Beginners: Fundamentals of Nucleation, Crystal Growth, and Epitaxy. World Scientific, Singapore, 1995. 7. P. Rothemund and E. Winfree. The program-size complexity of self-assembled squares. In F. F. Yao, editor, Proceedings of the 32nd Annual ACM Symposium on Theory of Computing, Portland, OR, 21–23 May 2000. ACM Special Interest Group on Algorithms and Computation Theory. 8. N. C. Seeman. Nucleic-acid junctions and lattices. Journal of Theoretical Biology, 2:237–247, 1982. 9. H. Wang. Proving theorems by pattern recognition. Bell System Technical Journal, 40:1–42, 1961. 10. E. Winfree. On the computational power of DNA annealing and ligation. In E. B. Baum and R. J. Lipton, editors, DNA Based Computers, DIMACS: Series in Discrete Mathematics and Theoretical Computer Science, pages 199–210. American Mathematical Society, May 1995. 11. E. Winfree, T. Eng, and G. Rozenberg. String tile models for DNA computing by self-assembly. In A. Condon and G. Rozenberg, editors, DNA Based Computers VI, Leiden, The Netherlands, 13–17 June 2000. Leiden Center for Natural Computing. 12. E. Winfree and D. Gifford, editors. Preliminary Proceedings, Fifth International Meeting on DNA Based Computers, Cambridge, Massachusetts, 14–15 June 1999. DIMACS. 13. E. Winfree, F. Liu, L. A. Wenzler, and N. C. Seeman. Design and self-assembly of two-dimensional DNA crystals. Nature, 394:539–544, 1998.
5cs.CE
Context Generation from Formal Specifications for C Analysis Tools Michele Alberti1? and Julien Signoles2 TrustInSoft, Paris, France [email protected] CEA LIST, Software Reliability and Security Laboratory F-91191 Gif-sur-Yvette Cedex, France [email protected] 1 arXiv:1709.04497v1 [cs.PL] 5 Sep 2017 2 Abstract. Analysis tools like abstract interpreters, symbolic execution tools and testing tools usually require a proper context to give useful results when analyzing a particular function. Such a context initializes the function parameters and global variables to comply with function requirements. However it may be error-prone to write it by hand: the handwritten context might contain bugs or not match the intended specification. A more robust approach is to specify the context in a dedicated specification language, and hold the analysis tools to support it properly. This may mean to put significant development efforts for enhancing the tools, something that is often not feasible if ever possible. This paper presents a way to systematically generate such a context from a formal specification of a C function. This is applied to a subset of the ACSL specification language in order to generate suitable contexts for the abstract interpretationbased value analysis plug-ins of Frama-C, a framework for analysis of code written in C. The idea here presented has been implemented in a new Frama-C plugin which is currently in use in an operational industrial setting. Keywords: Formal Specification, Code Generation, Transformation, Code Analysis, Frama-C, ACSL 1 Introduction Code analysis tools are nowadays effective enough to be able to provide suitable results on real-world code. Nevertheless several of these tools including abstract interpreters, symbolic execution tools, and testing tools must analyze the whole application from the program entry point (the main function); or else either they just cannot be executed, or they provide too imprecise results. Unfortunately such an entry point does not necessarily exist, particularly when analyzing libraries. In such a case, the verification engineer must manually write the context of the analyzed function f as a main function which initializes the parameters of f as well as the necessary global variables. This mandatory initialization step must enforce the function requirements and may restrict the possible input values for the sake of memory footprint and time efficiency of the analysis. This approach is however error-prone: ? This work was done when the first author was at CEA LIST, Software Reliability and Security Laboratory. II additionally to usual pitfalls of software development (e.g. bugs, code maintenance, etc.), the handwritten context may not match the function requirements, or be over restrictive. Moreover this kind of shortcomings may be difficult to detect due to the fact that the context is not explicitly the verification objective. A valid and more robust alternative is to specify such a context in a dedicated specification language, and make the analysis tools handle it properly. This is often an arduous approach as the support for a particular specification language feature may entail a significant development process, something that is often not feasible if ever possible. Also, it requires to do so for every tool. This paper presents a way to systematically generate an analysis context from a formal specification of a C function. The function requirements as well as the additional restrictions over the input domains are expressed as function preconditions in the ANSI/ISO C Specification Language (in short, ACSL) [2]. This specification S is interpreted as a constraint system, simplified as much as possible, then converted into a C code C which exactly implements the specification S. Indeed not only every possible execution of C satisfies S but conversely, there is an execution of C for every possible input satisfying the constraints expressed by S. We present the formalization of this idea for an expressive subset of ACSL including standard logic operators, integer arithmetic, arrays and pointers, pointer arithmetic, and built-in predicates for the validity and initialization properties of memory location ranges. We also provide implementation details about our tool, named CfP for Context from Preconditions, implemented as a Frama-C plug-in. Frama-C is a code analysis framework for code written in C [11]. Thanks to the aforementioned technique, CfP generates suitable contexts for two abstract interpretation-based value analysis tools, namely the the Frama-C plug-in EVA [3] and TIS-Analyzer [8] from the TrustInSoft company. Both tools are actually distinct evolved versions of an older plug-in called Value [6]. In particular, TrustInSoft successfully used CfP on the mbed-TLS library (also known as PolarSSL), an open source implementation of SSL/TLS3 , when building its verification kit [21]. It is worth noting that CfP revealed some mistakes in contexts previously written by hand by expert verification engineers when comparing its results with these pieces of code. Also, CfP generates code as close as possible to human-written code: it is quite readable and follows code patterns that experts of these tools manually write. Contributions The contributions of this paper are threefold: a novel technique to systematically generate an analysis context from a formal specification of a C function, a precise formalization of this technique, and a presentation of a tool implementing this technique which is used in an operational industrial setting. Outline Section 2 presents an overview of our technique through a motivating example. Section 3 details preconditions to constraints conversion, while Section 4 explains the C code generation scheme for these latter. Section 5 evaluates our approach and Section 6 discusses related work. Section 7 concludes this work by also discussing future work. 3 https://tls.mbed.org/ III 2 Overview and Motivating Example We illustrate our approach on context generation through the function aes crypt cbc, a cryptographic utility implemented by the mbed-TLS library. Figure 1 shows its prototype and ACSL preconditions as written by TrustInSoft for its verification kit [21]. 1 2 3 4 5 typedef struct { int nr; unsigned long *rk; unsigned long buf[68]; } aes_context; /* /* /* number of rounds AES round keys unaligned data */ */ */ 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 /*@ @ @ @ @ @ @ @ @ @ @ @ int requires ctx_valid: \valid(ctx); requires ctx_init: \initialized(ctx->buf + (0 .. 63)); requires ctx_rk: ctx->rk == ctx->buf; requires ctx_nr: ctx->nr == 14; requires mode: mode == 0 || mode == 1; requires length: 16 <= length <= 16672; requires length_mod: length % 16 == 0; requires iv_valid: \valid(iv + (0 .. 15)); requires iv_init: \initialized(iv + (0 .. 15)); requires input_valid: \valid_read(input + (0 .. length - 1)); requires input_init: \initialized(input + (0 .. length - 1)); requires output_valid: \valid(output + (0 .. length - 1)); */ aes_crypt_cbc(aes_context *ctx,int mode,size_t length,unsigned char iv[16], const unsigned char *input,unsigned char *output); Fig. 1: ACSL preconditions of the mbed-TLS function aes crypt cbc. Specification The function aes crypt cbc provides encryption and decryption of a buffer according to the AES cryptographic standard and the CBC encryption mode. The function takes six parameters. The last two are the input and the output strings. The parameter ctx stores the necessary information to the AES substitution-permutation network, in particular the number of rounds and the round keys defined in a dedicated structure at lines 1–5. The parameter mode indicates whether the function should encrypt or decrypt the input. The parameter length indicates the length of the input string. Finally the parameter iv provides an initialization vector for the output of 16 characters (unsigned char iv[16]). This declared length is actually meaningless for most C tools because an array typed parameter is adjusted to have a pointer type [10, Section 6.9.1 and also footnote 79 at page 71], but CfP nevertheless considers it as part of the specification in order to generate a more precise context. ACSL annotations are enclosed in /*@ ... */ as a special kind of comments. Therefore they are ignored by any C compiler. A function precondition is introduced by the keyword requires right before the function declaration or definition. It must be satisfied at every call site of the given function. Here the function aes crypt cbc has 12 precondition clauses, and the whole function precondition is the conjunction of all of them. Clauses may be tagged with names, which are logically meaningless but provide a way to easily refer to and to document specifications. For instance, the first precondition (line 7) is named ctx valid while the second (line 8) is named ctx init. We now detail the meaning of each precondition clause. All pointers must be valid, that is properly allocated, and point to a memory block of appropriate length that the program can safely access either in read-only mode (predicate \valid_read), or in read-write mode (predicate \valid) . That is the purpose of preconditions ctx valid, IV iv valid, input valid and output valid: ctx must point to a memory block containing at least a single aes context struct, iv must be able to contain at least 16 unsigned characters (ranging from 0 to 15), while input and output must be able to contain at least length unsigned characters (ranging from 0 to length − 1). Memory locations, which are read by the function, must be properly initialized. That is the purpose of the precondition clauses ctx init, iv init, and input init which initialize the first 64 cells of ctx->buf as well as every valid cell of iv and input. The specification clause mode specifies that the mode must be either 0 (encryption) or 1 (decryption), while the specification clause length mod specifies that the length should be a multiple of the block size (i.e. 16) as specified in mbed-TLS. The other clauses restrict the perimeter of the analysis in order to make it tractable. The clause ctx rk is a standard equality for an AES context, while the clause ctx nr is true for 256-bit encryption keys. Finally the clause length aims to restrict the analysis to buffers of size from 16 to 16672 unsigned characters. Context Generation A naive approach for context generation would consider one precondition clause after the other and directly implement it in C code. However, this would not work, in general, since requirements cannot be treated in any order. In our running example, for instance, variables input and output depends on the variable length: the precondition clauses over this latter must be treated before those over the former, as well as the generated code for these variables must initialize the latter, first, and the former afterwards, to be sound. To solve such problems, one could first record every dependency among the left-values involved in the specification, and then proceed to generate C code accordingly. An approach based only on a dependency graph is nonetheless insufficient for those preconditions that need an inference reasoning in order to be implemented correctly. As an example, treating the precondition /*@requires \valid(x+(0..3)) && *(x+4)==1;*/ demands to infer x as an array of 5 elements in order to consider the initialization x[4] = 1; correct. We now give an overview on how we treat context generation by means of the plug-in CfP of Frama-C. On the aes crypt cbc function contract, CfP provides the result shown in Figure 2 (assuming that the size of unsigned long is 4 bytes4 ). First note that every execution path ends by a call to the function aes crypt cbc. Up to these calls, the code initializes the context variables (prefixed by cfp) in order to satisfy the precondition of this function, while the different paths contribute to cover all the cases of the specification. The initialization code is generated from sets of constraints that are first inferred for every left-value involved in the precondition. While inferring these constraints from the precondition clauses, the implicit dependencies among left-values are made explicit and recorded in a dependency graph. This latter is finally visited to guide the code generation process in order to obtain correct C code. Let us start detailing the generated code for both preconditions about length (Figure 1, lines 12–13). First CfP declares a variable cfp length of the same type as length (line 4). Then it initializes it by means of the Frama-C library function Frama C unsigned int interval (line 7). It takes two unsigned int arguments and returns a random value comprised between the two. This allows to fulfill 4 This kind of system-dependent information is customizable within Frama-C. V 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 int cfp_aes_crypt_cbc(void) { unsigned char *cfp_output, *cfp_input; unsigned char cfp_iv[16]; size_t cfp_length; aes_context cfp_ctx; int cfp_disjunction; cfp_length = Frama_C_unsigned_int_interval(16, 16672); if (cfp_length % 16 == 0) { Frama_C_make_unknown((char *)cfp_ctx.buf,256); cfp_ctx.nr = 14; cfp_ctx.rk = cfp_ctx.buf; Frama_C_make_unknown((char *)cfp_iv,16); cfp_input = (unsigned char *)malloc(cfp_length); if (cfp_input != (unsigned char *)0) { Frama_C_make_unknown((char *)cfp_input, cfp_length); cfp_output = (unsigned char *)malloc(cfp_length); if (cfp_output != 0) { cfp_disjunction = Frama_C_int_interval(0,1); if (cfp_disjunction) { int cfp_mode; cfp_mode = 1; aes_crypt_cbc(&cfp_ctx,cfp_mode,cfp_length,cfp_iv,cfp_input,cfp_output); } else { int cfp_mode; cfp_mode = 0; aes_crypt_cbc(&cfp_ctx,cfp_mode,cfp_length,cfp_iv,cfp_input,cfp_output); } } } } return 0; } Fig. 2: Slightly simplified version of the code generated by CfP for the specification in Figure 1. Compared to the actual version, only a few integer casts have been removed for reasons of brevity. the former requirement and to guarantee that Frama-C-based abstract interpreters will interpret this result with exactly the required interval. Also, it corresponds to the way that expert engineers would write a general context for such analyzers. Finally, the requirement length % 16 == 0 is implemented by the conditional at line 8. Lines 9–11 implement the preconditions about ctx, a pointer to an aes context. Instead of allocating such a pointer, the generated code just declares a local variable cfp ctx and passes its address to the function calls. This automatically satisfies the precondition on pointer validity. Line 9 initializes the 256 first bytes of the structure field buf by using the Frama-C library function Frama C make unknown. Assuming that the size of unsigned long is 4 bytes, 256 bytes is the size of 64 values of type unsigned long. Again, an expert engineer would also use this library function. Lines 10 and 11 initialize the fields ctx->nr and ctx->rk by single assignments. Here CfP fulfills the equality requirement ctx->rk == ctx->buf with respect to ctx->rk instead of ctx->buf because the latter already refers to a memory buffer. The requirements on function arguments iv, input, and output are implemented by lines 12–17. Let us just point out how CfP defines the respective variables: while ctx iv is as an array of 16 unsigned char, ctx input and ctx output are just pointers to dynamically allocated memory buffers. Indeed, while CfP can infer the exact dimension of the former from the specification, the dimension of these latter depends on the value of ctx length, which is determined only at runtime. VI The last part of the generated code (lines 18–29) handles the requirement on mode, which is either 0 or 1. Although the generated conditional may seem excessive in the case of these particular values, it is nonetheless required in the general case (for instance, consider the formula mode == 5 || mode == 7). 3 Simplifying ACSL Preconditions into State Constraints This section presents a way to systematically reduce a function precondition to a set of constraints on the function context (i.e. function parameters and global variables). We first introduce an ACSL-inspired specification language on which we shall formalize our solution. Then, we define the notion of state constraint as a form of requirement over a C left-value, which in turn we generate as C code for initializing it. In order to simplify state constraints the most, we make use of symbolic ranges, originally introduced by Blume and Eigenmann [4] for compiler optimization. We finally provide a system of inference rules that formalizes such a simplification process. 3.1 Core Specification Language In this work we shall consider the specification language in Figure 3. It is almost a subset of ACSL [2] but for the predicate defined, which subsumes the ACSL predicates \initialized and \valid (see below). Predicates P ::= T cop T | defined(M ) | P ∧ P | P ∨ P | ¬P term comparison (cop ∈ {≡, ≤, <, ≥, >}) M is defined logic formula Terms T ::= z | M | T bop T integer constant (z ∈ Z) memory value arithmetic operation (bop ∈ {+, -, ×, /, %}) Memory Values M ::= L | M ++ T | M ++ T ..T left-value single displacement displacement range Left-Values L ::= x | ?M C variable dereference Types κ ::= ι | κ? integer pointer Fig. 3: Predicates, terms, and types. Predicates are logic formulæ defined on top of typed term comparisons and predicates defined. Terms are arithmetic expressions combining integer constants and memory values by means of the classic arithmetic operators. Memory values include left-values, which are C variables and pointer dereferences (?), and memory displacements through the operator (++). In particular, M ++ T1 ..T2 defines the set of memory values {M ++ T1 , . . . , M ++ T2 } and may only appear as the outermost construct in a predicate defined. On integers, defined(L) holds whenever L is an initialized left-value. On pointers, defined(M ) holds whenever M is a properly allocated and initialized memory region. VII Term typing Terms of our language are typed. A left-value may take either an integer (ι) or a pointer (κ?) type, while memory values are pointers. We omit the typing rules for terms, which are quite standard. Let us just specify that memory values of the form M ++ T have pointer type, as well as the recursive occurrence M , while T must have integer type. (Memory values M ++ T ..T are typed as set of pointers [2].) Since we do not consider any kind of coercion construct, terms of pointer type cannot appear where integer terms are expected, that is, they cannot appear in arithmetic expressions. It also follows that term comparisons only relate terms of the same type. Term normal forms For the sake of concision and simplicity, the remainder of this work assumes some simplifications to take place on terms in order to consider term normal forms only. In particular, arithmetic expressions are maximally flattened and factorized (e.g. by means of constant folding techniques, etc.). We will conveniently write single displacements M ++ T as M ++ T ..T . We also assume memory values with displacement ranges to be either of the form x ++ T1 ..T2 or ?L ++ T1 ..T2 . To this end, terms of the form (L ++ T1 ..T2 ) ++ T3 ..T4 simplify into L ++ (T1 + T3 )..(T2 + T4 ). Finally, memory values L ++ 0..0 normalize to L. Disjunctive normal forms A precondition is a conjunction of predicate clauses, each one given by an ACSL requires (cf. example in Figure 1). As a preliminary step, we W V shall rewrite this conjunctive clause into its disjunctive normal form i j Pij , where each Pij is a predicate literal (or simply literal), that is, a predicate without nested logic formulæ. A negative literal is either of the form ¬defined(M ) or ¬(M1 ≡ M2 ), with M1 , M2 pointers, as every other negative literal in the input predicates is translated into a positive literal by applying standard arithmetic and logical laws. A non-negative literal is called a positive literal. Most of the rest of this section focuses on positive literals: negative literals and conjunctive clauses are handled in the very end, while disjunctive clauses will be considered when discussing code generation in Section 4. 3.2 State Constraints We are interested in simplifying a predicate literal into a set of constraints over C leftvalues, called state constraints. These are meant to indicate the minimal requirements that the resulting C function context must implement for satisfying the function precondition. In Section 4, they will be, in turn, converted into C code. We intuitively consider a state constraint to represent the domain of definition of a C left-value of the resulting function context state. Since such domains might not be determined in terms of integer constants only, we shall found their definition on the notion of symbolic ranges [4]. As we want to simplify state constraints the most, we define them in terms of the symbolic range algebra proposed by Nazaré et al. [14]. Our definitions are nonetheless significantly different, even though inspired from their work. Symbolic Expressions A symbolic expression E is defined by the following grammar, where z ∈ Z, bop ∈ {+, -, ×, /, %}, and max and min are, respectively, the largest and the smallest expression operators. We denote E the set of symbolic expressions. E ::= z | x | ?E | E bop E | max(E, E) | min(E, E). VIII In the rest of this section, we assume a mapping from memory values to their respective symbolic expression, and let the context discriminate the former from the latter. In Section 3.3 we shall simplify symbolic expressions. For this, we need a domain structure. Let us denote E∞ = E ∪ {−∞; +∞} and Z∞ = Z ∪ {−∞; +∞}. We define a valuation of a symbolic expression E every map V(E), from E∞ to Z∞ , obtained by substituting every C variable in E with a distinct integer, the symbol ? with a natural number strictly greater than 1 as a multiplicative coefficient, and interpreting the operators {bop, min, max} as their respective functions over Z∞ × Z∞ . If we denote ≤∞ the standard ordering relation on Z∞ , then the preorder 4 on E∞ is defined as follows: E1 4 E2 ⇐⇒ ∀V, V(E1 ) ≤∞ V(E2 ). The partial order  over E∞ is therefore the one induced from 4 by merging in the same equivalence class elements x and y of E∞ such that x 4 y and y 4 x. As an example, the elements 0 and min(0, 0) are equivalent. Lattice of Symbolic Expression Ranges A symbolic range R is a pair of symbolic expressions E1 and E2 , denoted [E1 , E2 ]. Otherwise said, a symbolic range is an interval with no guarantee that E1  E2 . We denote R the set of symbolic ranges extended with the empty range ∅ and v its partial ordering which is the usual partial order over (possibly empty) ranges. Any symbolic range [E1 , E2 ] such that E2 ≺ E1 is therefore equivalent to ∅. Consequently (R, v) is a domain. Its infimum is ∅ while its supremum is [−∞, +∞]. We denote t and u its join and meet operators, respectively. It is worth noting that, given (Ei )1≤i≤4 four symbolic expressions, the following equations hold: [E1 , E2 ] t [E3 , E4 ] = [min(E1 , E3 ), max(E2 , E4 )] [E1 , E2 ] u [E3 , E4 ] = [max(E1 , E3 ), min(E2 , E4 )] . In words, min and max are compliant with our ordering relations. In Section 3.3, when simplifying literals, they will be introduced as soon as incomparable formulæ will be associated to the same left-value, resulting into an unsimplifiable constraint. Also, it is worth noting that t and u are, in general, not statically computable operators. To solve this practical issue, when these are not computable on some symbolic expressions, CfP relies on the above equations in order to delay their evaluations at runtime. Eventually, the code generator will convert them into conditionals. State Constraints as Symbolic Ranges with Runtime Checks Symbolic ranges capture most minimal requirements over the C left-values of a function precondition: for integer typed left-values, a symbolic range represents the integer variation domain, while for pointer typed left-values, it represents a region of valid offsets. They are commonly used in abstract interpreters for range [7,13] and region analysis [14,18], respectively. However, some predicate literals cannot be simplified into symbolic ranges, requiring their encoding as runtime checks, that is, to be verified at runtime by means of conditionals. We denote RTC(T1 cop T2 ) a runtime check between two terms T1 and T2 . We then call state constraint any pair C = R ⊕ X given by a symbolic range R and a set X of runtime checks. We denote π1 (C) (resp. π2 (C)) the first (resp. the second) projection of C, that is, R (resp. X). IX 3.3 Inferring State Constraints We now formalize our solution for simplifying a positive literal into a set of state constraints as a system of inference rules. Negative literals, as well as conjunctive clauses, are handled separately at the end of the section. Simplification Judgments Simplification rules are given over judgments of the form Σ ` P ⇒ Σ0, where P is a predicate literal, and Σ, Σ 0 are maps from left-values to state constraints. Each judgment associates a set of state constraints Σ and a literal P with the result of simplifying P with respect to the left-values appearing in it, that is, an updated map Σ 0 equal to Σ but for the state constraints on these latter. Figures 4 shows the formalization of the main literal simplifications. This system does not assume the consistency of the precondition: if this is inconsistent, no rule applies and the simplification process fails. Predicates defined Figure 4a provides the simplification rules for literal defined. Rules VARIABLE and D EREFERENCE enforce the initialization of a left-value L in terms of the symbolic range neutral ival(κ). This latter is respectively defined as ∅, for κ a pointer type, and [−∞, +∞], for κ integer type. These are quite common initial approximations when inferring variation domains of either memory or integer values. Rules R ANGE -1 and R ANGE -2 enforce the validity of a memory region determined by the displacement range L ++ (T1 ..T2 ). The first premise of these rules established whether L is already enforced in Σ to be an alias of a memory value M , as indicated by the singleton range [M ; M ]. If not, rule R ANGE -1 first enforces the initialization of L and the soundness of the displacement bound determined by T1 and T2 , and then it updates the region of valid offsets pointed to by L to include the range [0; T2 ]. In practice, predicates 0 ≤ T1 ≤ T2 are added only if not statically provable. Moreover, note that we do not consider T1 as the lower bound of the symbolic range, because C memory regions must start at index 0. Rule R ANGE -2 handles the case of L alias of M in Σ by enforcing the validity of the memory region determined by M to take into account the displacement range (T1 ..T2 ). In particular, since single displacements only may appear in memory equality predicates (cf. rule M EMORY-E Q), M is of the form L0 ++ (T3 ..T3 ), and the validity of the alias L within the range (T1 ..T2 ) is obtained by requiring the validity of the displacement range L0 ++ (min(T1 , T3 )..max(T2 , T3 )). Rule I DEMPOTENCE is provided only to allow the inference process to progress. Term comparison predicates Rules in Figure 4b formalize the simplification of integer term comparison and memory equality predicates. The first two are actually rule schema, as C MP -1 and C MP -2 describe term comparison simplifications over the integer comparison operators {≡, ≤, ≥}. (Strict operators are treated in terms of nonstrict ones.) Let us detail rule C MP -1 with respect to a generic operator cop. The rule applies whenever T1 cop T2 can be rewritten by means of classic integer arithmetic transformations as L cop T3 , that is, as a left-value in relation cop with an integer term T3 . If so, C MP -1 reduces the symbolic range of L with respect to the one given by ival(cop, T3 ). This latter function takes a comparison operator cop and an integer X I DEMPOTENCE L∈Σ VARIABLE x 6∈ Σ type(x) = κ Σ 0 = Σ ∪ {x 7→ neutral ival(κ)} Σ ` defined(x) ⇒ Σ 0 Σ ` defined(L) ⇒ Σ D EREFERENCE ?M 6∈ Σ Σ ` defined(M ) ⇒ Σ 0 00 type(?M ) = κ Σ = Σ 0 ∪ {?M 7→ neutral ival(κ)} Σ ` defined(?M ) ⇒ Σ 00 R ANGE -1 π1 (Σ (L)) 6= [M ; M ]   Σ ` defined(L) ∧ 0 ≤ T1 ≤ T2 ⇒ Σ 0 Σ 00 = Σ 0 L ← π1 (Σ 0 (L)) t [0; T2 ] Σ ` defined(L ++ (T1 ..T2 )) ⇒ Σ 00 R ANGE -2 π1 (Σ (L)) = [M ; M ] base(M ) = L0 offset(M ) = T3 0 Σ ` defined(L ++ (min(T1 , T3 )..max(T2 , T3 ))) ⇒ Σ 0 Σ ` defined(L ++ (T1 ..T2 )) ⇒ Σ 0 (a) Simplification of literal defined. C MP -1 T1 cop T2 L ∈ {T1 , T2 } ^ Σ ` defined(L) ∧ defined(L0 ) ⇒ Σ 0 L cop T3 L0 ∈T3   Σ 00 = Σ 0 L ← π1 (Σ 0 (L)) u ival(cop, T3 ) Σ ` T1 cop T2 ⇒ Σ 00 C MP -2 Σ` L ∈ {T1 , T2 } ^ defined(L) ⇒ Σ 0 L∈{T1 ,T 2} 00 0 Σ = Σ L ← π2 (Σ 0 (L)) ∪ RTC(T1 cop T2 )  Σ ` T1 cop T2 ⇒ Σ 00 M EMORY-E Q i, j ∈ {1, 2} ∧ i 6= j base(M{i,j} ) = L{i,j} offset(M{i,j} ) = T{i,j} T3 = Tj + (−Ti ) 0 M 0 = Lj ++ (T3 ..T3 ) Σ ` defined(Li ) ∧ defined(M ) ⇒ Σ0  0 0 0 00 0 0  π1 (Σ (Li )) v π1 (Σ (Lj )) Σ = Σ Li ← M ; M Σ ` M1 ≡ M2 ⇒ Σ 00 (b) Simplification of term comparison and memory equality literals. N OT-D EFINED M 6∈ Σ Σ ` ¬ defined(M ) ⇒ Σ M EMORY-N EQ Σ ` defined(M1 ) ∧ defined(M2 ) ⇒ Σ 0 base(M{i,j} ) = L{i,j} [Li ; Li ] 6v π1 (Σ 0 (Lj )) i, j ∈ {1, 2} ∧ i 6= j [Lj ; Lj ] 6v π1 (Σ 0 (Li )) Σ ` M1 6≡ M2 ⇒ Σ 0 (c) Simplification of negative literals. Fig. 4: Simplification of literals into state constraints. XI term T as arguments, and returns as result the symbolic range [T ; T ] when cop is ≡, [−∞; T ] (resp. [T ; +∞]) when cop is ≤ (resp. ≥). Since both L and T3 are integer typed terms, there is no aliasing issue here. Rule C MP -2 can always be applied, although we normally consider it when C MP -1 cannot. In that case, rule C MP -2 conservatively enforces the validity of the term comparison by means of a runtime check. Aliasing Rule M EMORY-E Q handles aliasing between two pointers with single displacement M1 and M2 . Assuming both of the form L{i,j} ++ T{i,j} , with distinct i, j ∈ {1, 2}, a pointer M 0 is first defined as Lj with single displacement T3 , this latter determined by summing the offsets −Ti and Tj together. Such a pointer is then enforced to be defined, and in the case that the actual region pointed by Lj is established to be larger then the one pointed by Li , then Li is considered an alias of M 0 . Although rather conservative, due to the fact that v is not statically computable in general, the second to last premise is important for ensuring soundness. Negative literals Figure 4c shows the rules for negative literals. These rules do not simplify literals into state constraints, but rather ensure precondition consistency. For instance, ¬defined(x) ∧ x == 0 is inconsistent as x should be defined with value 0 and undefined at the same time. In such a case, the system must prevent code generation. Rule N OT-D EFINED just checks that the memory value M does not appear in the map Σ, which suffices to ensure that M is not yet defined. Rule M EMORY-N EQ applies under the hypothesis that both pointers M1 and M2 determine different memory regions. In particular, the two are not aliases whenever each base address of one pointer does not overlap with the memory region of the other. V Conjunctive Clauses i Pi , on either positive or negative literals Pi , are handled sequentially through the following A ND rule. Given the definition of M EMORY-N EQ and N OT-D EFINED, it assumes that negative literals are treated only after the positive ones, by exhaustively applying rule M EMORY-N EQ first, and rule N OT-D EFINED afterwards. A ND Σ0 ` P 1 ⇒ Σ1 Σ1 ` P 2 ⇒ Σ2 ··· ^ Σ0 ` P i ⇒ Σn Σn−1 ` Pn ⇒ Σn i Dependency Graph on Memory Values On a conjunctive clause, the system of inference rules in Figure 4 not only generates a map Σ, but it also computes a dependency graph G on memory values. (Considering only the formalization of this section, the memory values of the graph are actually left-values only. However, when considering separately the ACSL predicates \initialized and \valid instead of defined, this is not true anymore.) This graph is necessary for ensuring, first, the soundness of the rule system with respect to mutual dependency on left-values in Σ, and, consequently, for the correct ordering of left-value initializations when generating C code (cf. Section 4). Generally speaking, each time a rule that needs inference is used in a state constraint derivation for some left-value L (e.g. D EREFERENCE, R ANGE -1, C MP -1, etc.), edges from L to every other left-value involved in some premise are added to the dependency graph G. Such derivation fails as soon as this latter operation makes the graph G cyclic. XII Example When applying the inference system on our example in Figure 1, the final map associates the integer length to [16, 16672] ⊕ {RTC(length%16 ≡ 0)} and the array input to [0, length − 1] ⊕ ∅, along with the dependency graph in Figure 5. ctx iv *ctx iv + (0 .. 15) input + (0 .. length - 1) *(iv + (0 .. 15)) *(input + (0 .. length - 1)) ctx->nr ctx->rk ctx->buf mode input length output output + (0 .. length - 1) ctx->buf[0 .. 63] Fig. 5: Dependency graph for the aes crypt cbc preconditions generated by CfP. The system of inference rule in Figure 4 is sound: given a conjunctive clause P , the simplification procedure on P always terminates, either with Σ or it fails. In the former case, for each left-value L in P , state constraints in Σ satisfy respective literals in P (that we denote as Σ |= P ). Theorem 1. For all conjunctive clause P , either ∅ ` P ⇒ Σ and Σ |= P , or it fails. 4 Generating C Code from State Constraints This section presents the general scheme for implementing preconditions, through state constraints, in a C language enriched with one primitive function for handling ranges. In practice, such primitive is meant to be analyzer-specific so as to characterize state constraints as precisely as possible. As an example, we report on the case of our tool CfP. However, for the sake of conciseness, we do neither detail nor formalize the code generation scheme. We nevertheless believe that the provided explanation should be enough to both understand and implement such a system in a similar setting. Generating Code from a Conjunctive Clause Consider a conjunctive clause C and the pair (Σ, G), respectively given by the map of state constraints and the dependency graph of C, inferred by the system Wn of rules in Figure 4. We shall show the general case of disjunctive normal forms i=1 Ci later on. To generate semantically correct C code, we topologically iterate over the leftvalues of G so as to follow the dependency ordering. For every visited left-value L, we consider its associated state constraint C = R ⊕ X in Σ. Then, the symbolic range R is handled by generating statements that initialize L. For most constructs, these statements are actually a single assignment, although a loop over an assignment may be sometimes needed (e.g. when initializing a range of array cells). In particular, initializations of left-values L to symbolic ranges [T1 , T2 ] are implemented by means of the primitive function make range(κ, T1 , T2 ), where κ is integer or pointer type. In practice, this function must be provided by the analyzer for which the context is generated, so that, when executed symbolically, the analyzer’s abstract state will associate abstract XIII values [T1 , T2 ] to respective left-values L. Finally, conditionals are generated to initialize left-values with symbolic expressions involving min and max. Once L has been initialized, the rest of the code is guarded by conditionals generated from runtime checks in X. To resume, the generation scheme for L is the following: 1 /* initialization of L from R through assignments */ if (/* runtime checks from X */) { /* code for initializing the next left-values */ ...; } } 2 3 After the initialization of the last left-value, the function under consideration (in our running example, the function aes crypt cbc) is called with the required arguments. Wn Handling Disjunctions We rewrite preconditions into disjunctive normal form i=1 Ci as a preliminary step. Then we process each disjunct Ci independently by applying the inference system in Figure 4 and the code generation scheme previously W described. n We now describe the code generation scheme of such a precondition i=1 Ci given the code fragments for each and every of its disjunct Ci . If n = 1, then the code fragment of C1 is directly generated. Otherwise, an additional variable cfp disjunction is generated and initialized to the interval [1, n]. Then, a switch construct (or a conditional if n = 2) is generated, where each case contains the fragment Bi respective to Ci . To resume, the context is generated as a function including the following code pattern: 1 cfp_disjunction = make_range(ι, 1, n); switch (cfp_disjunction) { case 1: { B_1; break; } case 2: { B_2; break; } ... case n: { B_n; break; } } 2 3 4 5 6 7 Primitives in CfP Our tool CfP follows the generation scheme just described. It implements make range in terms of the Frama-C built-ins Frama C τ interval, with τ a C integral type, and Frama C make unknown to handle symbolic ranges for integers and pointers, respectively. These built-ins are properly supported by the two abstract interpretation-based value analysis tools EVA [3] and TIS-Analyzer [8]. 5 Implementation and Evaluation We have implemented our context generation mechanism as a Frama-C plug-in, called CfP for Context from Preconditions, written in approximately 3500 lines of OCaml. (Although Frama-C is open source, CfP is not, due to current contractual obligations.) CfP has been successfully used by the company TrustInSoft for its verification kit [21] of the mbed-TLS library, an open source implementation of the SSL/TLS protocol. We now evaluate our approach, and in particular CfP, in terms of some quite natural properties, that is, usefulness, efficiency, and quality of the generated contexts. This work provides a first formal answer to a practical and recurring problem when analyzing single functions. Indeed, the ACSL subset considered is expressive enough for most real-world C programs. Most importantly, CfP enables any tool to support a compelling fragment of ACSL at the minor expense of implementing two Frama-C built-ins, particularly so if compared to the implementation of a native support (if ever possible). Finally, CfP has proved useful in an operational industrial setting in revealing some mistakes in contexts previously written by hand by expert verification engineers. XIV Although we cannot disclose precise data about these latter, CfP revealed, most notably, overlooked cases in disjunctions and led to fix incomplete specifications. CfP is able to efficiently handle rather complex ACSL preconditions: the generation of real-world contexts (e.g. the one of Figure 2) is usually instantaneous. Although the disjunctive normal form can be exponentially larger than the original precondition formula, such transformation is used in practice [17,12] and leads to better code in terms of readability and tractability by the verification tools. This approach is further justified by the fact that, in practice, just a small number of disjuncts are typically used in manually-written ACSL specifications. Our approach allows to generate contexts which are reasonably readable and follows code patterns that experts of the Frama-C framework use to manually write. In particular, when handling disjunctions, CfP factorizes the generated code for a particular left-value as soon as the rule system infers the very same solution in each conjunctive clause. For instance, in our running example, only the initialization of the variable mode depends on the disjunction mode == 0 || mode == 1. Hence all the other left-values are initialized before considering cfp disjunction (cf. Figure 2). We conclude by briefly discussing some current limitations. Our ACSL fragment considers quantifier free predicate formulæ, and no coercion constructs are allowed. Support for casts among integer left-values should be easy to add, whereas treating memory addresses as integers is notoriously difficult. We leave these for future work. 6 Related Work Similarly to our approach, program synthesis [12,20,16] automatically provides program fragments from formal specifications. However, the two approaches have different purposes. Once executed either symbolically or concretely, a synthesized program provides one computational state that satisfies the specification, while a context must characterize all such states. In particular, not only every state must satisfy the specification but, conversely, this set of states must contain every such possible one. In software testing, contexts are useful for concentrating the testing effort on particular inputs. Most test input generation tools, like CUTE [19] and PathCrawler [5,9], allow to express contexts as functions which, however, the user must manually write. Some others, like Pex [1], directly compile formal preconditions for runtime checking. The tool STADY [15] shares some elements of our approach. It instruments C functions with additional code for ensuring pre- and postconditions compliance, allowing monitoring and test generation. However, the tool performs a simple ACSL-to-C translation, it does neither take into account dependencies among C left-values, nor it inferences their domain of definition. 7 Conclusion This paper has presented a novel technique to automatically generate an analysis context from a formal precondition of a C function. The core of the system has been formalized, while we provide enough details about code generation to allow similar systems to be implemented. Future work includes the formalization of code generation as well as statements and proofs of the fundamental properties of the system as a whole. A running example from the real world has also illustrated our presentation. The whole system is XV implemented in the Frama-C plug-in CfP. It generates code as close as possible to human-written code. It is used in an operational industrial setting and already revealed some mistakes in contexts previously written by hand by expert verification engineers. Acknowledgments Part of the research work leading to these results has received funding for the S3P project from French DGE and BPIFrance. The authors thank TrustInSoft for the support and, in particular, Pascal Cuoq, Benjamin Monate and Anne Pacalet for providing the initial specification, test cases and insightful comments. Thanks to the anonymous reviewers for many useful suggestions and advice. References 1. M. Barnett, M. Fähndrich, P. de Halleux, F. Logozzo, and N. Tillmann. Exploiting the synergy between automated-test-generation and programming-by-contract. In ICSE’09. 2. P. Baudin, J.-C. Filliâtre, C. Marché, B. Monate, Y. Moy, and V. Prevosto. ACSL: ANSI/ISO C Specification Language. http://frama-c.com/acsl.html. 3. S. Blazy, D. Bühler, and B. Yakobowski. Structuring Abstract Interpreters through State and Value Abstractions. In VMCAI’17. 4. W. Blume and R. Eigenmann. Symbolic Range Propagation. In IPPS’95. 5. B. Botella, M. Delahaye, S. H. T. Ha, N. Kosmatov, P. Mouy, M. Roger, and N. Williams. Automating Structural Testing of C Programs: Experience with PathCrawler. In AST’09. 6. G. Canet, P. Cuoq, and B. Monate. A Value Analysis for C Programs. In SCAM’09. 7. P. Cousot and R. Cousot. Abstract Interpretation: A Unified Lattice Model for Static Analysis of Programs by Construction or Approximation of Fixpoints. In POPL’77. 8. P. Cuoq and R. Rieu-Helft. Result graphs for an abstract interpretation-based static analyzer. In JFLA’17. 9. M. Delahaye and N. Kosmatov. A Late Treatment of C Precondition in Dynamic Symbolic Execution. In CSTVA’13. 10. ISO. The ANSI C standard (C99). Technical Report WG14 N1124, ISO/IEC, 1999. http: //www.open-std.org/JTC1/SC22/WG14/www/docs/n1124.pdf. 11. F. Kirchner, N. Kosmatov, V. Prevosto, J. Signoles, and B. Yakobowski. Frama-C: A Software Analysis Perspective. Formal Aspects of Computing, 2015. 12. V. Kuncak, M. Mayer, R. Piskac, and P. Suter. Complete Functional Synthesis. In PLDI’10. 13. F. Logozzo and M. Fähndrich. Pentagons: A Weakly Relational Abstract Domain for the Efficient Validation of Array Accesses. In SAC’08. 14. H. Nazaré, I. Maffra, W. Santos, L. Barbosa, L. Gonnord, and F. M. Quintão Pereira. Validation of Memory Accesses Through Symbolic Analyses. SIGPLAN Not., 49(10), 2014. 15. G. Petiot, B. Botella, J. Julliand, N. Kosmatov, and J. Signoles. Instrumentation of Annotated C Programs for Test Generation. In SCAM’14. 16. N. Polikarpova, I. Kuraj, and A. Solar-Lezama. Program Synthesis from Polymorphic Refinement Types. In PLDI’16. 17. W. Pugh. A Practical Algorithm for Exact Array Dependence Analysis. Comm. ACM, 1992. 18. R. Rugina and M. Rinard. Symbolic Bounds Analysis of Pointers, Array Indices, and Accessed Memory Regions. In PLDI’00. 19. K. Sen, D. Marinov, and G. Agha. CUTE: A Concolic Unit Testing Engine for C. In FSE’13. 20. A. Solar-Lezama, G. Arnold, L. Tancau, R. Bodik, V. Saraswat, and S. Seshia. Sketching Stencils. In PLDI’07. 21. TrustInSoft. PolarSSL 1.1.8 verification kit, v1.0. Technical report. http:// trust-in-soft.com/polarSSL_demo.pdf.
6cs.PL
Eldan’s Stochastic Localization and the KLS Hyperplane Conjecture: An Improved Lower Bound for Expansion arXiv:1612.01507v2 [math.FA] 9 Dec 2016 Yin Tat Lee∗, Santosh S. Vempala† December 12, 2016 Abstract 1/4 We show that the KLS constant √ for n-dimensional isotropic logconcave measures is O(n ), improving on the current best bound of O(n1/3 log n). As corollaries we obtain the same improved bound on the thin-shell estimate, Poincaré constant and exponential concentration constant and an alternative proof of this bound for the isotropic constant; it also follows that the ball walk for sampling from an isotropic logconcave density in Rn converges in O∗ (n2.5 ) steps from a warm start. 1 Introduction The isoperimetry of a subset is the ratio of the measure of the boundary of the subset to the measure of the subset or its complement, whichever is smaller. The minimum such ratio over all subsets is the Cheeger constant, also called expansion or isoperimetric coefficient. This fundamental constant appears in many settings, e.g., graphs and convex bodies and plays an essential role in many lines of study. In the geometric setting, the KLS hyperplane conjecture [21] asserts that for any distribution with a logconcave density, the minimum expansion is approximated by that of a halfspace, up to a universal constant factor. Thus, if the conjecture is true, the Cheeger constant can be essentially determined simply by examining hyperplane cuts. More precisely, here is the statement. We use c, C for absolute constants, and kAk2 for the spectral/operator norm of a matrix A. Conjecture 1 ([21]). For any logconcave density p in Rn with covariance matrix A, R p(x)dx c 1 def ∂S o ≥p nR = inf n . R S⊆R ψp kAk2 min S p(s)dx, Rn \S p(x)dx For an isotropic logconcave density (all eigenvalues of its covariance matrix are equal to 1), the conjectured isoperimetric ratio is an absolute constant. Note that the isoperimetric constant or KLS constant ψp is the reciprocal of the minimum expansion or Cheeger constant (this will be more convenient for comparisons with other constants). This conjecture was formulated by Kannan, Lovász and Simonovits in the course of their study of the convergence of a random process (the ball walk) in a convex body and they proved the following weaker bound. Theorem 2 ([21]). For any logconcave density p in Rn with covariance matrix A, the KLS constant satisfies p ψp ≤ C Tr(A). √ For an isotropic distribution, the theorem gives a bound of O ( n), while the conjecture says O (1).  The conjecture has several important consequences. It implies that the ball walk mixes in O∗ n2 steps from a warm start in any isotropic convex body (or logconcave density) in Rn ; this is the best possible bound, and is tight e.g., for a hypercube. The KLS conjecture has become central to modern asymptotic convex geometry. It is equivalent to a bound on the spectral gap of isotropic logconcave functions [25]. Although it was formulated due to an algorithmic motivation, it implies several well-known conjectures in asymptotic convex geometry. We describe these next. The thin-shell conjecture (also known as the variance hypothesis) [29, 6] says the following. ∗ Microsoft † Georgia Research and University of Washington, [email protected] and [email protected] Tech, [email protected] 1 Conjecture 3 (Thin-shell). For a random point X from an isotropic logconcave density p in Rn , √ def σp2 = E((kXk − n)2 ) = O(1). It implies that a random point X from an isotropic logconcave density lies in a constant-width annulus (a thin shell) with constant probability. Noting that √ 1 σp2 = E((kXk − n)2 ) ≤ Var(kXk2 ) ≤ Cσp2 , n 2 the conjecture is equivalent to asserting that Var(kXk ) = O(n) for an isotropic logconcave density. The following 1 connection is well-known: σp ≤ Cψp . The current best bound is σp ≤ n 3 by Guedon and Milman [20], improving on a line of work that started with Klartag [23, 24, 18]. Eldan [14] has shown that the reverse inequality holds approximately, in a worst-case sense, namely the worst possible KLS constant over all isotropic logconcave densities in Rn is bounded by the thin-shell estimate to within roughly a logarithmic factor in the dimension. This results 1√ in the current best bound of ψp ≤ n 3 log n. A weaker inequality was shown earlier by Bobkov [5] (see also [30]). The slicing conjecture, also called the hyperplane conjecture [8, 4] is the following. Conjecture 4 (Slicing/Isotropic constant). Any convex body of unit volume in Rn contains a hyperplane section of at least constant volume. Equivalently, for any convex body K of unit volume with covariance matrix L2K I, the isotropic constant LK = O(1). The isotropic constant of a general isotropic logconcave density p with covariance a multiple of the identity is defined as Lp = p(0)1/n . The best current bound is Lp = O(n1/4 ), due to Klartag [22], improving on Bourgain’s bound of Lp = O(n1/4 log n) [7]. The study of this conjecture has played an influential role in the development of convex geometry over the past several decades. It was shown by Ball that the KLS conjecture implies the slicing conjecture. More recently, Eldan and Klartag [15] showed that the thin shell conjecture implies slicing, and therefore an alternative (and stronger) proof that KLS implies slicing: Lp ≤ Cσp . The next conjecture is a bound on the Poincaré constant for logconcave distributions. Conjecture 5 (Poincaré constant). For any isotropic logconcave density p in Rn , we have Q2p = def Varp (g(x))   = O(1). smooth Ep k∇g(x)k2 2 sup g It was shown by Maz’ja [34] and Cheeger [11] that this Poincaré constant is bounded by twice the KLS constant (Qp ≤ 2ψp ). The current best bound is the same as the KLS bound. Finally, it is conjectured that Lipschitz functions concentrate over isotropic logconcave densities. Conjecture 6 (Lipschitz concentration). For any L-Lipschitz function g in Rn , and isotropic logconcave density p, Px∼p (|g(x) − Eg| > t) ≤ e−t/(Dp L) where Dp = O(1). Gromov and Milman [19] showed that Dp is also bounded by the KLS constant (see Lemma ??). For more background on these conjectures, we refer the reader to [10, 2, 3]. 1.1 Results We prove the following bound, conjectured in this form in [33]. Theorem 7. For any logconcave density p in Rn , with covariance matrix A, 1/4 . ψp ≤ C Tr A2 1 For isotropic p, this gives a bound of ψp ≤ Cn 4 , improving on the current best bound. The following corollary is immediate. Corollary 8. For any logconcave density p in Rn , the isotropic (slicing) constant Lp , the  Poincare constant Qp , the thin-shell constant σp and the concentration coefficient Dp are all bounded by O n1/4 . We mention an algorithmic consequence. Corollary 9. The mixing time of the ball walk to sample from an isotropic logconcave density from a warm start is O∗ n2.5 . 2 1.2 Approach The KLS conjecture is true for Gaussian distributions. More generally, for any distribution whose density function is the product of the Gaussian density for N (0, σ 2 I) and any logconcave function, it is known that the expansion is Ω(1/σ). This fact is used crucially in the Gaussian cooling algorithm of [13] for computing the volume of a convex body by starting with a standard Gaussian restricted to a convex body and gradually making the variance of the Gaussian large enough that it is effectively uniform over the convex body of interest. Our overall strategy is similar in spirit — we start with an arbitrary isotropic logconcave density and gradually introduce a Gaussian term in the density of smaller and smaller variance. The isoperimetry of the resulting distribution after sufficient time will be very good since it has a large Gaussian factor. And crucially, it can be related to the isoperimetry of initial distribution. To achieve the latter, we would like to maintain the measure of a fixed subset close to its initial value as the distribution changes. For this, our proof uses the localization approach to proving high-dimensional inequalities [27, 21], and in particular, the elegant stochastic version introduced by Eldan [14] and used in subsequent papers [17, 16]. We fix a subset E of the original space with the original logconcave measure of measure 12 . This is without loss of generality due to a result of [30]. In standard localization we then bisect space using a hyperplane that preserves the volume fraction of E. The limit of this process is 1-dimensional logconcave measures (“needles”), for which inequalities are much easier to prove. This approach runs into major difficulties for proving the KLS conjecture. While the original measure might be isotropic, the 1-dimensional measures could, in principle, have variances roughly equal to the trace of the original covariance (i.e., long thin needles), for which only much weaker inequalities hold. Stochastic localization can be viewed as the continuous time version of this process, where at each step, we pick a random direction and multiply the current density with a linear function along the chosen direction. Over time, the distribution can be viewed as a spherical Gaussian times a logconcave function, with the Gaussian gradually reducing in variance. When the Gaussian becomes sufficiently small in variance, then the overall distribution has good isoperimetric coefficient, determined by the inverse of the Gaussian standard deviation (such an inequality can be shown using standard localization, as in [12]). An important property of the infinitesimal change at each step is balance – the density at time t is a martingale and therefore the expected measure of any subset is the same as the original measure. Over time, the measure of a set E is a random quantity that deviates from its original value of 21 over time. The main question is then what direction to use at each step so that (a) the measure of E remains bounded and (b) the Gaussian part of the density has small variance. We show that the simplest choice, namely a pure random direction chosen from the uniform distribution suffices. The analysis needs a potential function that grows slowly but still maintains good control over the spectral norm of the current covariance matrix. The direct choice of kAt k2 , where At is the covariance matrix of the distribution at time t, is hard to control. We use Tr(A2t ). This gives us the improved bound of O(n1/4 ). In the appendix, we show that a third moment assumption implies further improvement via the same localization technique1 . 2 Preliminaries In this section, we review some basic definitions and theorems that we use. 2.1 Stochastic calculus In this paper, we only consider stochastic processes given by stochastic differential equations. Given real-valued stochastic processes xt and yt , the quadratic variations [x]t and [x, y]t are real-valued stochastic processes defined by [x]t = lim |P |→0 [x, y]t = lim |P |→0 ∞ X n=1 ∞ X n=1 xτn − xτn−1 2 , xτn − xτn−1   yτn − yτn−1 , where P = {0 = τ0 ≤ τ1 ≤ τ2 ≤ · · · ↑ t} is a stochastic partition of the non-negative real numbers, |P | = maxn (τn − τn−1 ) is called the mesh of P and the limit is defined using convergence in probability. Note that [x]t 1 In the first arXiv version of this paper, we incorrectly claimed the assumption as a lemma 3 is non-decreasing with t and [x, y]t can be defined via polarization as [x, y]t = 1 ([x + y]t − [x − y]t ) . 4 For example, if the processes xt and yt satisfy the SDEs dxt = µ(xt )dt + σ(xt )dWt and dyt = ν(yt )dt + η(yt )dWt Rt Rt where Wt is a Wiener process, we have that [x]t = 0 σ 2 (xs )ds and [x, y]t = 0 σ(xs )η(ys )ds and d[x, y]t = σ(xt )η(yt )dt; for a vector-valued SDE dxt = µ(xt )dt + Σ(xt )dWt and dyt = ν(yt )dt + M (yt )dWt , we have that Rt Rt [xi , xj ]t = 0 (Σ(xs )ΣT (xs ))ij ds and d[xi , y j ]t = 0 (Σ(xs )M T (ys ))ij ds. Lemma 10 (Itô’s formula). Let x be a semimartingale and f be twice continuously differentiable function, then df (xt ) = X df (xt ) i dxi dxi + 1 X d2 f (xt ) i j d[x , x ]t . 2 i,j dxi dxj The next two lemmas are well-known facts about Wiener processes; first the reflection principle. Lemma 11 (Reflection principle). Given a Wiener process W (t) and a, t ≥ 0, then we have that P( sup W (s) ≥ a) = 2P(W (t) ≥ a). 0≤s≤t Second, a decomposition lemma for continuous martingales. Theorem 12 (Dambis, Dubins-Schwarz theorem). Every continuous local martingale Mt is of the form Mt = M0 + W[M]t for all t ≥ 0 where Ws is a Wiener process. 2.2 Logconcave functions Lemma 13 (Dinghas; Prékopa; Leindler). The convolution of two logconcave functions is also logconcave; in particular, any linear transformation or any marginal of a logconcave density is logconcave. The next lemma about logconcave densities is folklore, see e.g., [28]. Lemma 14 (Logconcave moments). Given a logconcave density p in Rn , and any positive integer k, k/2  2 k . Ex∼p kxk ≤ (2k)k Ex∼p kxk The following elementary concentration lemma is also well-known (this version is from [28]). Lemma 15 (Logconcave concentration). For any isotropic logconcave density p in Rn , and any t > 0, √  Px∼p kxk > t n ≤ e−t+1 . A much stronger concentration bound was shown by Paouris [32]. Lemma 16 ([32]). For any isotropic logconcave distribution and any t > C, √ √  Px∼p kxk ≥ t n ≤ e−c nt . The following inequality bounding the small ball probability is from [3]. Lemma 17 ([3, Thm. 10.4.7]). For any isotropic logconcave density p, and any ǫ < ǫ0 , √ √  Px∼p kxk ≤ ǫ n ≤ ǫc n were ǫ0 , c are absolute constants. Definition 18. We define ψn as the supremum of the KLS constant over all isotropic logconcave distributions in Rn . 4 The next lemma follows from the fact that the Poincaré constant is bounded by the KLS constant and Lemma 13. Lemma 19. For any matrix A, and any isotropic logconcave density p,    2 Varx∼p xT Ax ≤ O(ψr2 )Ex∼p kAxk where r = rank(A + AT ). To prove a lower bound on the expansion, it suffices to consider subsets of measure 1/2. This follows from the concavity of the isoperimetric profile. We quote a theorem from [30, Thm 1.8], which applies even more generally to Riemannian manifolds under suitable convexity-type assumptions. Theorem 20. The Cheeger constant of any logconcave density is achieved by a subset of measure 1/2. 2.3 Matrix inequalities √ For any symmetric matrix B, we define |B| = B 2 , namely, the matrix formed by taking absolute value of all eigenvalues of B. For any matrix A, we define R(A) to be the span of the rows of A and N (A) to be the null space of A. For any vector x and any positive semi-definite matrix A, we definekxk2A = xT Ax. Lemma 21 (Matrix Hölder inequality). Given a symmetric matrices A and B and any s, t ≥ 1 with s−1 + t−1 = 1, we have 1/t  t s 1/s Tr |B| . Tr(AB) ≤ (Tr |A| ) Lemma 22 (Lieb-Thirring Inequality [26]). Given positive semi-definite matrices A and B and r ≥ 1, we have Tr((B 1/2 AB 1/2 )r ) ≤ Tr(B r/2 Ar B r/2 ). Since the following lemma is stated differently in [14, 1], we show the proof from Eldan [14] here for completeness. Lemma 23 ([14, 1]). Given a symmetric matrix B, a positive semi-definite matrix A and α ∈ [0, 1], we have Tr(Aα BA1−α B) ≤ Tr(AB 2 ). Proof. Without loss of generality, we can assume A is diagonal. Hence, we have that X 1−α 2 Aα Tr(Aα BA1−α B) = ii Ajj Bij i,j ≤ X i,j =α 2 (αAii + (1 − α)Ajj ) Bij X i,j 3 2 Aii Bij + (1 − α) X 2 Ajj Bij = Tr(AB 2 ). i,j Eldan’s stochastic localization In this section, we consider the stochastic localization scheme introduced in [14] in slightly more general terms. In discrete localization, the idea would be to restrict the distribution with a random halfspace and repeat this process. In stochastic localization, this discrete step is replaced by infinitesimal steps, each of which is a renormalization with a linear function in a random direction. One might view this √ informally as an averaging over infinitesimal needles. The discrete time equivalent would be pt+1 (x) = pt (x)(1 + h(x − µt )T w) for a sufficiently small h and 1 2 random Gaussian vector w. Using the approximation 1 + y ∼ ey− 2 y , we see that over time this process introduces a negative quadratic factor in the exponent, which will be the Gaussian factor. As time tends to ∞, the distribution tends to a more and more concentrated Gaussian and eventually a delta function, at which point any subset has measure either 0 or 1. The idea of the proof is to stop at a time that is large enough to have a strong Gaussian factor in the density, but small enough to ensure that the measure of a set is not changed by more than a constant. 5 3.1 The process and its basic properties Given a distribution with logconcave density p(x), we start at time t = 0 with this distribution and at each time t > 0, we apply an infinitesimal change to the density. This is done by picking a random direction from a Gaussian with a certain covariance matrix Ct , called the control matrix. In Section 4 and 6, we use this process with Ct = I. In Section 7, we use a varying Ct to get a bound for non-isotropic distributions. In order to construct the stochastic process, we assume that the support of p is contained in a ball of radius R > n. There is only exponentially small probability outside this ball, at most e−cR by Lemma 16. Moreover, since by Theorem 20, we only need to consider subsets of measure 1/2, this truncation does not affect the KLS constant of the distribution. Definition 24. Given a logconcave distribution p, we define the following stochastic differential equation: 1/2 c0 = 0, dct = Ct B0 = 0, (3.1) dWt + Ct µt dt, dBt = Ct dt, where the probability distribution pt , the mean µt and the covariance At are defined by T pt (x) = R 2 1 ect x− 2 kxkBt p(x) Rn T 1 2 ect y− 2 kykBt p(y)dy , At = Ex∼pt (x − µt )(x − µt )T , µt = Ex∼pt x, and the control matrices Ct are symmetric matrices to be specified later. In Section 4 and 6, we only consider the process with Ct = I for all t ≥ 0. In this case, we have that T Bt = tI, pt (x) = R 2 t ect x− 2 kxk2 p(x) Rn T t 2 ect y− 2 kyk2 p(y)dy . Also, since µt is a bounded function that is Lipschitz with respect to c and hence standard existence and uniqueness theorems (e.g. [31, Sec 5.2]) show the existence and uniqueness of the solution on time [0, T ] for any T > 0. In general, we have the following result: 1/2 Lemma 25 (Existence and Uniqueness). If p(x) has compact support and if Ct are bounded and Lipschitz functions of At and Bt , the stochastic differential equation (3.1) has a unique solution. We defer all proofs for statements in this section, considered standard in stochastic calculus, to Section 5. Now we proceed to analyzing the process and how its parameters evolve. Roughly speaking, the first lemma below says that the stochastic process is the same as continuously multiplying pt (x) by a random infinitesimally small linear function. Lemma 26 ([14, Lem 2.1]). We have that 1/2 dpt (x) = (x − µt )T Ct n for any x ∈ R . dWt pt (x) By considering the derivative d log pt (x), we see that applying dpt (x) as in the lemma above results in the distribution pt (x), with the Gaussian term in the density: d log pt (x) = dpt (x) 1 d[pt (x)]t − pt (x) 2 pt (x)2 1 1/2 = (x − µt )T Ct dWt − (x − µt )T Ct (x − µt )dt 2   1 1 1/2 1/2 T = x Ct dWt + Ct µt dt − xT Ct xdt − (µTt Ct dWt + µTt Ct µt dt) 2 2 1 = xT dct − xT dBt xdt + g(t) 2 where the last term is independent of x and the first two terms explain the form of pt (x) and the appearance of the Gaussian. Next we analyze the change of the covariance matrix. Lemma 27 ([14]). We have that Z   1/2 (x − µt )(x − µt )T (x − µt )T Ct dWt pt (x)dx − At Ct At dt. dAt = Rn 6 3.2 Bounding expansion Our plan is to bound the expansion by the spectral norm of the covariance matrix at time t. First, we bound the measure of a set of initial measure 21 . R Lemma 28. For any set E ⊂ Rn with E p(x)dx = 21 and t ≥ 0, we have that P( Proof. Let gt = R E 1 ≤ 4 Z E Z t 3 9 )≥ − P( Cs1/2 As Cs1/2 4 10 0 pt (x)dx ≤ 2 ds ≥ 1 ). 64 pt (x)dx. Then, we have that Z 1/2 (x − µt )T Ct dWt pt (x)dx dgt = E  Z 1/2 = (x − µt )pt (x)dx, Ct dWt E where the integral might not be 0 because it is over the subset E and not all of Rn . Hence, we have, Z d[gt ]t = 1/2 E Ct 2 (x − µt )pt (x)dx dt 2 2 = max ζ − µt )pt (x)dx dt kζk2 ≤1 E Z  Z 2 1/2 ≤ max ζ T Ct (x − µt ) pt (x)dx pt (x)dxdt kζk2 ≤1 Rn Rn   1/2 1/2 = max ζ T Ct At Ct ζ dt Z T 1/2 Ct (x kζk2 ≤1 1/2 = Ct Hence, we have that d[gt ]t dt ≤ 1/2 Ct 1/2 At Ct 1/2 At Ct 2 2 dt. . By the Dambis, Dubins-Schwarz theorem, there exists a Wiener process W̃t such that gt − g0 has the same distribution as W̃[g]t . Using g0 = 21 , we have that P( 1 3 −1 1 ≤ gt ≤ ) = P( ≤ W̃[g]t ≤ ) 4 4 4 4 1 1 ≥ P( min1 W̃s ≤ and [g]t ≤ ) 4 64 0≤s≤ 64 1 1 ) ≥ 1 − P( max1 W̃s > ) − P([g]t > 4 64 0≤s≤ 64 1 1 1 1 > ) − P([g]t > ) ≥ 1 − 4P(W̃ 64 4 64 2 9 1 ≥ − P([g]t > ) 10 64 where we used reflection principle for 1-dimensional Brownian motion in 1 and the concentration of normal distribution in 2 , namely Px∼N (0,1) (x > 2) ≤ 0.0228. Theorem 29 (Brascamp-Lieb [9]). Let γ : Rn → R+ be the standard Gaussian density in Rn . Let f : Rn → R+ be any logconcave function. Define the density function h as follows: f (x)γ(x) . Rn f (y)γ(y) dy h(x) = R Fix a unit vector v ∈ Rn , let µ = Eh (x). Then, for any α ≥ 1, Eh (|v T (x − µ)|α ) ≤ Eγ (|v T x|α ). Using this we derive the following well-known isoperimetric inequality that was proved in [12] and was also used in [14]. 7 R 1 T 1 T Theorem 30 ([12, Thm. 4.4]). Let h(x) = f (x)e− 2 x Bx / f (y)e− 2 y By dy where f : Rn → R+ is an integrable logconcave function and B is positive definite. Then h is logconcave and for any measurable subset S of Rn , (Z ) Z Z  1 − h(x)dx = Ω B −1 2 2 min h(x)dx . h(x)dx, ∂S Rn \S S In other words, the expansion of h is Ω  B −1 − 21 2  . Proof. The proof uses the localization lemma to reduce the statement to a 1-dimensional statement about a Gaussian  times a logconcave density, where the Gaussian is a projection of the Gaussian N 0, B −1 (but the logconcave function might be different as the limit of localization is the original function along an interval times an exponential function). We then apply the Brascamp-Lieb inequality in one dimension (Theorem 29) to prove that for the resulting one-dimensional distribution, the variance is at most that of the Gaussian, therefore at most B −1 . The isoperimetric constant is bounded by the inverse of the standard deviation times a constant. The complete proof, in more general terms, is carried out in [12, Thm. 4.4]. We can now prove a bound on the expansion. Lemma 31. Given a logconcave distribution p. Let At be defined by Definition 24 using initial distribution p. Suppose that there is T > 0 such that ! Z T 3 1 and BT  uI ≥ P Cs1/2 As Cs1/2 ds ≤ 64 4 2 0  Then, we have that ψp = Ω u−1/2 . Proof. By Milman’s theorem [30], it suffices to consider subsets of measure 12 . Consider any measurable subset E of Rn of initial measure 21 . By Lemma 26, pt is a martingale and therefore Z  Z Z p0 (x)dx = E p(x)dx = pt (x)dx . ∂E ∂E ∂E cT x− 1 kxk2 Next, by the definition ofpT (3.1), we have that pT (x) ∝ e T 2 BT p(x) and Theorem 30 shows that the expansion of E is Ω λmin (BT )−1/2 . Hence, we have Z Z p(x)dx = E pT (x)dx ∂E ∂E  Z  Z −1/2 = Ω(u )E 1BT uI min pT (x)dx pT (x)dx, Ē E   Z 3 1 −1/2 pT (x)dx ≤ ≥ Ω(u )P BT  uI and ≤ 4 4 E     Z 3 1 −1/2 − P(BT  uI is false) pT (x)dx ≤ ≤ = Ω(u ) P 4 4 E   Z t 9 1 −1/2 1/2 1/2 ≥ Ω(u ) − P( ) − P(BT  uI is false) (Lem 28) Cs As Cs ds ≥ 10 64 2 0 = Ω(u−1/2 )  where we used the assumption at the end. Using Theorem 20, this shows that ψp = Ω u−1/2 . 4 Controlling At via the potential Tr(A2t ) In this section, we only use Ct = I for the control matrix. 8 4.1 Third moment bounds Here are two key lemmas about the third-order tensor of a log-concave distribution. A special case of the first inequality was used in [14]. For our main theorem, we only the first lemma with B = I, but we need the general case for the proof in Section 7. Lemma 32. Given a logconcave distribution p with mean µ and covariance A. For any B  0, symmetric matrix C, we have that   1/2 Ex∼p B 1/2 (x − µ)(x − µ)T C(x − µ) = O A1/2 BA1/2 Tr A1/2 CA1/2 . 2 2 Proof. We first consider the case C = vv T . Taking y = A−1/2 (x − µ) and w = A1/2 v. Then, y follows an isotropic log concave distribution p̃ and the statement becomes   1/2 2 2 Ey∼p̃ B 1/2 A1/2 y y T w = O A1/2 BA1/2 kwk2 . 2 2 Then, we calculate that Ey∼p̃ B 1/2 A1/2 y y T w 2 2 = max Ey∼p̃ (B 1/2 A1/2 y)T ζ y T w kζk2 ≤1 2 q 2 q 4 ≤ max Ey∼p̃ (B 1/2 A1/2 y)T ζ Ey∼p̃ (y T w) kζk2 ≤1 q  2 =O A1/2 BA1/2 2 kwk2 where we used the fact that for a fixed w, y T w has a one-dimensional logconcave distribution (Lemma 13) and hence Lemma 14 shows that  4 2 2 4 = O(kwk2 ). Ey∼p̃ y T w = O(1) Ey∼p̃ y T w For a general symmetric matrix C, we write C = Hence, we have that Ex∼p B 1/2 (x − µ)(x − µ)T C(x − µ) 2 ≤ P λi vi viT where λi , vi are eigenvalues and eigenvectors of C. X i |λi | Ex∼p B 1/2 (x − µ)(x − µ)T vi viT (x − µ) ≤ O(1) X i |λi | A1/2 BA1/2 = O(1) A1/2 BA1/2 = O(1) A1/2 BA1/2 1/2 2 1/2 2 X i 1/2 2 A1/2 vi 2 2   Tr A1/2 |λi |vi viT A1/2 Tr A1/2 CA1/2 . Lemma 33. Given a logconcave distribution p with mean µ and covariance A. We have  3/2  3 . Ex,y∼p |hx − µ, y − µi| = O Tr A2 Proof. Without loss of generality, we assume µ = 0. For a fixed x and random y, hx, yi follows a one-dimensional logconcave distribution (Lemma 13) and hence Lemma 14 shows that 3/2 3/2 3 = O xT Ax Ey∼p |hx, yi| ≤ O(1) Ey∼p hx, yi2 . Next, we note that A1/2 x follows a logconcave distribution (Lemma 13) and hence Lemma 14 shows that    2 3/2 3 3/2  3 . = O Tr A2 Ex,y∼p |hx, yi| = O(1)Ex∼p A1/2 x ≤ O(1) Ex∼p A1/2 x 9 4.2 Analysis of At Using Itô’s formula and Lemma 27, one can compute the derivatives of TrA2t . Since a similar calculation appears in Sections 4, 6 and 7, we prove a common generalization in Lemma 36. Lemma 34. Let At be defined by Definition 24. We have that 3 dTrA2t =2Ex∼pt (x − µt )T At (x − µt )(x − µt )T dWt − 2Tr(A3t )dt + Ex,y∼pt (x − µt )T (y − µt ) dt. Lemma 35. Given a logconcave distribution p with covariance matrix A s.t.TrA2 = n. Let At defined by Definition 24 using initial distribution p. There is a universal constant c1 such that  P( max Tr A2t ≥ 8n) ≤ 0.01 t∈[0,T ] with c1 T = √ . n Proof. Let Φt = TrA2t . By Lemma 34, we have that 3 dΦt = − 2Tr(A3t )dt + Ex,y∼pt (x − µt )T (y − µt ) dt + 2Ex∼pt (x − µt )T At (x − µt )(x − µt )T dWt def =δt dt + vtT dWt . (4.1) For the drift term δt dt, Lemma 33 shows that  3/2  3 3/2 ≤ C ′ Φt δt ≤ Ex,y∼pt (x − µt )T (y − µt ) = O Tr A2t (4.2) for some universal constant C ′ . Note that we dropped the term −2Tr(A3t ) since At is positive semidefinite and therefore the term is negative. For the martingale term vtT dWt , we note that kvt k2 = Ex∼pt (x − µt )T At (x − µt )(x − µt ) ≤ ≤ 1/2 kAt k2 Tr 5/4 O(Φt ). 2 A2t (Lem 32) 5/4 √ So the drift term grows roughly as Φ3/2 t while the stochastic t. Thus, both bounds (on the drift  grows as Φt  term 1 term and the stochastic term) suggest that for t up to O √n , the potential Φt remains O(n). We now formalize this, by decoupling the two terms. Let 1 . f (a) = − √ a+n By (4.1) and Itô’s formula, we have that 1 df (Φt ) = f ′ (Φt )dΦt + f ′′ (Φt )d[Φ]t 2 ! 2 kvt k2 1 vtT dWt 3 δt 1 dt + − = 2 (Φt + n)3/2 8 (Φt + n)5/2 2 (Φt + n)3/2 ≤ C ′ dt + dYt (4.3) v T dW t where dYt = 21 (Φtt+n)3/2 , Yt = 0 and C ′ is the universal constant in (4.2). Note that 2 d[Y ]t Φ5/2 C 1 kvt k2 = O(1) ≤√ . = 3 3 dt 4 (Φt + n) (Φt + n) n By Theorem 12, there exists a Wiener process W̃t such that Yt has the same distribution as W̃[Y ]t . Using the reflection principle for 1-dimensional Brownian motion, we have that √ γ2 n ). P( max Yt ≥ γ) ≤ P( max W̃t ≥ γ) = 2P(W̃ √C T ≥ γ) ≤ 2 exp(− n 2CT t∈[0,T ] t∈[0, √Cn T ] 10 Since Φ0 = kAp k2F = n, we have that f (Φ0 ) = − √12n and therefore (4.3) shows that √ γ2 n 1 ′ ). P( max f (Φt ) ≥ − √ + C T + γ) ≤ 2 exp(− 2CT t∈[0,T ] 2n Putting T = 1 √ 256(C ′ +C) n and γ = 1 √ , 4 n we have that 1 P( max f (Φt ) ≥ − √ ) ≤ 2 exp(−8)). 3 n t∈[0,T ] Note that f (Φt ) ≥ − 3√1 n implies that Φt ≥ 8n. Hence, we have that P( max Φt ≥ 8n) ≤ 0.01. t∈[0,T ] 4.3 Proof of Theorem 7 Proof of Theorem 7. By rescaling, we can assume TrA2 = n. By Lemma 35, we have that  c1 P( max Tr A2s ≤ 8n) ≥ 0.99 with t = √ . n s∈[0,t] √  Since Tr A2t ≤ 8n implies that kAt k2 ≤ 8n, we have that Z P( where T = min 5 n 1√ ,c 64 8 1 T 0 kAs k ds ≤ 1 and BT  T · I) ≥ 0.99 64 o √ / n. Now the theorem follows from Lemma 31. Localization proofs We begin with the proof of existence of a unique solution for the SDE. Proof of Lemma (25). We can write the stochastic differential equation as dct = C 1/2 (At , Bt )dWt + C(At , Bt )µ(ct , Bt )dt and dBt = C(At , Bt )dt where Z xq(c, B, x)dx µ(c, B) = and At (c, B) = Z Rn Rn and q(c, B, x) = R ec Rn T (x − µ(c, B))(x − µ(c, B))T q(c, B, x)dx x− 12 kxk2B p(x) 2 1 T ec y− 2 kykB p(y)dy . Since p has compact support, we have that q is Lipschitz in c and B variables, so are the functions µ and A. Next, we note that both µ and A are bounded since p has compact support. Since C 1/2 is bounded and Lipschitz function in c and B variables, so is C. Therefore, we can use a standard existence and uniqueness theorem (e.g. [31, Sec 5.2]) to show the existence and uniqueness of the solution on time [0, T ] for any T > 0. Next is the proof of the infinitesimal change in the density. T 1 2 Proof of Lemma (26). Let qt (x) = ect x− 2 kxkBt p(x). By Itô’s formula, applied to f (c, B) = ec have that    1 1 1 d[cTt x]t − d[hBt x, xi]t qt (x) dqt (x) = dcTt x − hdBt x, xi + 2 2 2 def 11 T x− 21 kxk2B p(x), we Note that Hence, the quadratic variations of cTt x is D E 1/2 dcTt x = Ct dWt + Ct µt dt, x . d[cTt x]t = hCt x, xi dt. Also, dBt is a predictable process (namely, does not have a stochastic term) and hence d[hBt x, xi]t = 0. Therefore, this gives D E 1/2 dqt (x) = Ct dWt + Ct µt dt, x qt (x). (5.1) Let Vt = R Rn qt (y)dy. Then, we have dVt = Z dqt (y)dy n ZR D E 1/2 = Ct dWt + Ct µt dt, y qt (y)dy Rn E D 1/2 = Vt Ct dWt + Ct µt dt, µt . By Itô’s formula, we have that 1 1 dVt + 3 d[V ]t 2 Vt Vt D E 1/2 −1 = −Vt Ct dWt + Ct µt dt, µt + Vt−1 hCt µt , µt i dt E D 1/2 = −Vt−1 Ct dWt , µt . dVt−1 = − (5.2) Combining (5.1) and (5.2), we have that dpt (x) =d(Vt−1 qt (x)) =qt (x)dVt−1 + Vt−1 dqt (x) + d[Vt−1 , qt (x)]t E D E D E D 1/2 1/2 1/2 1/2 = − qt (x)Vt−1 Ct dWt , µt + Vt−1 Ct dWt + Ct µt dt, x qt (x) − Vt−1 Ct µt , Ct x qt (x)dt D E 1/2 =pt (x) Ct dWt , x − µt . The next proof is for the change in the covariance matrix. Proof of Lemma (27). Recall that At = Z Rn (x − µt )(x − µt )T pt (x)dx. Viewing At = f (µt , pt ), i.e., as a function of the variables µt and pt , we apply Itô’s formula. In the derivation below, we use [µt , µTt ]t to denote the matrix whose i, j coordinate is [µt,i , µt,j ]t . Similarly, [µt , pt (x)]t is a column vector and [µTt , pt (x)]t is a row vector. Z (x − µt )(x − µt )T dpt (x)dx dAt = n R Z Z (x − µt )(dµt )T pt (x)dx dµt (x − µt )T pt (x)dx − − Rn Rn Z Z 1 1 T − ·2 (x − µt )d[µt , pt (x)]t dx − · 2 d[µt , pt (x)]t (x − µt )T dx 2 2 Rn Rn Z 1 pt (x)dx + · 2d[µt , µTt ]t 2 Rn 12 where the factor 2 comes from the Hessians of x2 and xy. Now the second term vanishes because Z Z T (x − µt )pt (x)dx)T = 0. dµt (x − µt ) pt (x)dx = dµt ( Rn Rn Similarly, the third term also vanishes: Z Rn (x − µt )(dµt )T pt (x)dx = 0. To compute the last 3 terms, we note that Z xpt (x)dx dµt = d Rn Z 1/2 x(x − µt )T Ct dWt pt (x)dx = Rn Z Z T 1/2 = (x − µt )(x − µt ) Ct dWt pt (x)dx + Rn 1/2 Rn 1/2 = At Ct µt (x − µt )T Ct dWt pt (x)dx dWt . Therefore, we have for the last term    X  1/2 1/2 1/2 1/2 d[µt , µTt ]t ij = At Ct At Ct dt = (At Ct (Ct )T ATt )ij dt = (At Ct At )ij dt iℓ ℓ jℓ which we can simply write as d[µt , µTt ]t = At Ct At dt. Similarly, we have d[µt , pt (x)]t = pt (x)At Ct (x − µt )dt. This gives the fourth term Z Z (x − µt )d[µTt , pt (x)]t dx = Rn Rn Similarly, we have the fifth term (x − µt )(x − µt )T Ct At pt (x)dtdx = At Ct At dt. d[µt , pt (x)]t (x − µt )T dx = At Ct At dt. Combining all the terms, we have that Z (x − µt )(x − µt )T dpt (x)dx − At Ct At dt. dAt = R Rn Rn Next is the proof of stochastic derivative of the potential Φt = Tr((At − γI)q ). Lemma 36. Let At be defined by Definition 24. For any integer q ≥ 2, we have that 1/2 dTr((At − γI)q ) =qEx∼pt (x − µt )T (At − γI)q−1 (x − µt )(x − µt )T Ct dWt − qTr((At − γI)q−1 A2t Ct )dt q X Ex,y∼pt (x − µt )T (At − γI)α (y − µt )(x − µt )T (At − γI)β (y − µt )(x − µt )T Ct (y − µt )dt. + 2 α+β=q−2 Proof. Let Φ(X) = Tr((X − γI)q ). Then the first and second-order directional derivatives of Φ at X is given by ∂Φ ∂X H = qTr((X − γI)q−1 H) and ∂2Φ ∂X∂X =q H1 ,H2 q−2 X k=0 Tr((X − γI)k H2 (X − γI)q−2−k H1 ). Using these and Itô’s formula, we have that dTr((At − γI)q ) = qTr((At − γI)q−1 dAt ) + q 2 X X α+β=q−2 ijkl Tr((At − γI)α eij (At − γI)β ekl )d[Aij , Akl ]t where eij is the matrix that is 1 in the entry (i, j) and 0 otherwise, and Aij is the real-valued stochastic process defined by the (i, j)th entry of At . 13 Using Lemma 27 and Lemma 26, we have that 1/2 dAt = Ex∼pt (x − µt )(x − µt )T (x − µt )T Ct T T = Ex∼pt (x − µt )(x − µt ) (x − µt ) dWt − At Ct At dt 1/2 Ct ez dWt,z − At Ct At dt (5.3) where Wt,z is the z th coordinate of Wt . Therefore,   X 1/2 1/2 d[Aij , Akl ]t = Ex∼pt (x − µt )i (x − µt )j (x − µt )T Ct ez Ex∼pt (x − µt )k (x − µt )l (x − µt )T Ct ez dt z = Ex,y∼pt (x − µt )i (x − µt )j (y − µt )k (y − µt )l (x − µt )T Ct (y − µt )dt. (5.4) Using the formula for dAt (5.3) and d[Aij , Akl ]t (5.4), we have that dTr((At − γI)q ) 1/2 =qEx∼pt (x − µt )T (At − γI)q−1 (x − µt )(x − µt )T Ct dWt − qTr((At − γI)q−1 A2t Ct )dt q X X + Tr((At − γI)α eij (At − γI)β ekl )Ex,y∼pt (x − µt )i (x − µt )j (y − µt )k (y − µt )l (x − µt )T Ct (y − µt )dt 2 α+β=q−2 ijkl 1/2 =qEx∼pt (x − µt )T (At − γI)q−1 (x − µt )(x − µt )T Ct dWt − qTr((At − γI)q−1 A2t Ct )dt q X Ex,y∼pt (x − µt )T (At − γI)α (y − µt )(x − µt )T (At − γI)β (y − µt )(x − µt )T Ct (y − µt )dt. + 2 α+β=q−2 Acknowledgement. We thank Ravi Kannan, Laci Lovász, Assaf Naor and Nisheeth Vishnoi for their continuous support and encouragement. We also thank Sébastien Bubeck, Ben Cousins, Ronen Eldan, Bo’az Klartag, Anup B. Rao and Ting-Kam Leonard Wong for helpful discussions. References [1] Zeyuan Allen-Zhu, Yin Tat Lee, and Lorenzo Orecchia. Using optimization to obtain a width-independent, parallel, simpler, and faster positive sdp solver. In Proceedings of the Twenty-Seventh Annual ACM-SIAM Symposium on Discrete Algorithms, pages 1824–1831. SIAM, 2016. [2] David Alonso-Gutiérrez and Jesús Bastero. Approaching the Kannan-Lovász-Simonovits and variance conjectures, volume 2131. Springer, 2015. [3] Shiri Artstein-Avidan, Apostolos Giannopoulos, and Vitali D Milman. Asymptotic Geometric Analysis, Part I, volume 202. 2015. [4] K. M. Ball. Logarithmically concave functions and sections of convex sets in rn. Studia Mathematica, 88:69–84, 1988. [5] S. Bobkov. On isoperimetric constants for log-concave probability distributions. Geometric aspects of functional analysis, Lect. notes in Math., 1910:81–88, 2007. [6] S. G. Bobkov and A. Koldobsky. On the Central Limit Property of Convex Bodies, pages 44–52. Springer Berlin Heidelberg, Berlin, Heidelberg, 2003. [7] J. Bourgain. On the distribution of polynomials on high dimensional convex sets. 1469:127–137, 1991. [8] Jean Bourgain. On high dimensional maximal functions associated to convex bodies. American Journal of Mathematics, 108(6):1467–1476, 1986. [9] 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. 14 [10] Silouanos Brazitikos, Apostolos Giannopoulos, Petros Valettas, and Beatrice-Helen Vritsiou. Geometry of isotropic convex bodies, volume 196. American Mathematical Society Providence, 2014. [11] Jeff Cheeger. A lower bound for the smallest eigenvalue of the Laplacian, pages 195–199. Princeton Univ. Press, 1969. [12] B. Cousins and S. Vempala. A cubic algorithm for computing Gaussian volume. In SODA, pages 1215–1228, 2014. [13] B. Cousins and S. Vempala. Bypassing KLS: Gaussian cooling and an O∗ (n3 ) volume algorithm. In STOC, pages 539–548, 2015. [14] R. Eldan. Thin shell implies spectral gap up to polylog via a stochastic localization scheme. Geometric and Functional Analysis, 23:532–569, 2013. [15] R. Eldan and B. Klartag. Approximately gaussian marginals and the hyperplane conjecture. Contermporary Mathematics, 545, 2011. [16] Ronen Eldan and James R. Lee. Talagrand’s convolution conjecture on gaussian space. In IEEE 56th Annual Symposium on Foundations of Computer Science, FOCS 2015, Berkeley, CA, USA, 17-20 October, 2015, pages 1395–1408, 2015. [17] Ronen Eldan and Joseph Lehec. Bounding the norm of a log-concave vector via thin-shell estimates. 2013. [18] B. Fleury. Concentration in a thin Euclidean shell for log-concave measures. J. Funct. Anal., 259(4):832–841, 2010. [19] M. Gromov and V. D. Milman. A topological application of the isoperimetric inequality. Amer. J. Math., 105(4):843–854, 1983. [20] Olivier Guedon and Emanuel Milman. Interpolating thin-shell and sharp large-deviation estimates for isotropic log-concave measures. Geometric and Functional Analysis, 21(5):1043–1068, 2011. [21] R. Kannan, L. Lovász, and M. Simonovits. Isoperimetric problems for convex bodies and a localization lemma. Discrete & Computational Geometry, 13:541–559, 1995. [22] B. Klartag. On convex perturbations with a bounded isotropic constant. Geom. and Funct. Anal., 16(6):1274– 1290, 2006. [23] B. Klartag. A central limit theorem for convex sets. Invent. Math., 168:91–131, 2007. [24] B. Klartag. Power-law estimates for the central limit theorem for convex sets. J. Funct. Anal., 245:284–310, 2007. [25] M. Ledoux. Spectral gap, logarithmic sobolev constant, and geometric bounds. In Surveys in Diff. Geom., Vol. IX, pages 219–240. Int. Press, 2004. [26] E Lieb and W Thirring. Inequalities for the moments of the eigenvalues of the Schrödinger equation and their relation to Sobolev inequalities. Studies in Mathematical Physics: Essays in honor of Valentine Bargman, Lieb, E., Simon, B., Wightman, AS (eds.), pages 269–303, 1976. [27] 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. [28] L. Lovász and S. Vempala. The geometry of logconcave functions and sampling algorithms. Random Structures and Algorithms, 30(3):307–358, 2007. [29] Irini Perissinaki Milla Anttila, Keith Ball. The central limit problem for convex bodies. Transactions of the American Mathematical Society, 355(12):4723–4735, 2003. [30] E. Milman. On the role of convexity in isoperimetry, spectral gap and concentration. Invent. Math., 177(1):1–43, 2009. 15 [31] Bernt Oksendal. Stochastic differential equations: an introduction with applications. Springer Science & Business Media, 2013. [32] G. Paouris. Concentration of mass on convex bodies. Geometric and Functional Analysis, 16:1021–1049, 2006. [33] S. S. Vempala. Algorithmic aspects of convexity. Lecture notes from the Institut Henri Poincare Winter School, January 19-23, 2015. [34] V.G.Maz’ja. Classes of domains and imbedding theorems for function spaces. Dokl. Acad. Nauk SSSR (Engl. transl. Soviet Math. Dokl., 1 (1961) 882-885), 3:527–530, 1960. 6 A reduction to a third moment assumption In this section, we use the following assumption. In the first arXiv version of this paper, we claimed this assumption as a lemma. While it might be true, our proof was not correct.   3 Assumption (Third Moment). For an isotropic logconcave distribution p ∈ Rn , Ex,y∼p hx, yi = O (nψn ).  P  3 Note that Ex,y∼p hx, yi = i,j,k Ex (xi xj xk )2 . Under this assumption we prove the following. Theorem 37. Under the third moment assumption above, any isotropic logconcave density p in Rn , the KLS √ O( log n log log n) constant is ψp = e . The proof will use the same process with Ct = I, but with a more sensitive potential function Φt = Tr((At − I)q ) for even integers q. 6.1 Tensor bounds Definition 38 (3-Tensor). For any isotropic logconcave distribution p in Rn and any symmetric matrices A, B and C, we define Tp (A, B, C) = Ex,y∼p (xT Ay)(xT By)(xT Cy). Often, we drop the subscript p to indicate the worst case bound def T (A, B, C) = sup isotropic logconcave p Tp (A, B, C). Remark. It is clear from the definition that T is symmetric, namely T (A1 , A2 , A3 ) = T (Aσ(1) , Aσ(2) , Aσ(3) ) for any permutation σ. We first start with some simple equalities about a 3-tensor. Here we repeatedly use the elementary facts  Tr(AB) = Tr(BA), xT Ay = Tr AyxT . Lemma 39. For any isotropic logconcave distribution p and any symmetric matrices A, B and C, we have that X Tr(A∆i B∆i ) Tp (A, B, I) = i and Tp (A, B, I) = X Aij Tr(∆i B∆j ) i,j where ∆i = Ex∼p xxT xi . Proof. Direct calculation shows that Tp (A, B, I) = Ex,y∼p xT AyxT ByxT y = X Ex,y∼p xT AyxT Byxi yi i = X i  X Tr(A∆i B∆i ) Ex,y∼p Tr Axx Byy xi yi = T T i 16 and Tp (A, B, I) = Ex,y∼p xT AyxT ByxT y = X Aij Ex,y∼p xi yj xT ByxT y i,j = X i,j  X Aij Tr(∆i B∆j ). Aij Ex,y∼p Tr xx Byy T xi yj = T i,j Lemma 40. For any A1 , A2 , A3  0, we have that T (A1 , A2 , A3 ) ≥ 0 and for any symmetric matrices B1 , B2 , B3 , we have that T (B1 , B2 , B3 ) ≤ T (|B1 | , |B2 | , |B3 |). 1/2 Proof. Fix any isotropic logconcave distribution p. We define ∆i = Ex∼p xxT xT A3 ei which is well defined since A3  0. Then, we have that Tp (A1 , A2 , A3 ) =Ex,y∼p xT A1 yxT A2 yxT A3 y X Tr(A1 ∆i A2 ∆i ). = i 1/2 1/2 Since ∆i is symmetric and A1 , A2  0, we have that A1 ∆i A2 ∆i A1  0 and Tr(A1 ∆i A2 ∆i ) ≥ 0. Therefore, T (A1 , A2 , A3 ) ≥ Tp (A1 , A2 , A3 ) ≥ 0. (1) (2) (1) (2) (1) (2) For the second part, we write B1 = B1 − B1 where B1  0, B1  0 and |B1 | = B1 + B1 . We define (1) (2) (1) (2) B2 , B2 , B3 , B3 similarly. Note that (1) (1) (1) (1) (1) (2) (1) (2) (1) (1) (2) (2) T (B1 , B2 , B3 ) =T (B1 , B2 , B3 ) − T (B1 , B2 , B3 ) − T (B1 , B2 , B3 ) + T (B1 , B2 , B3 ) (2) (1) (1) (2) (1) (2) (2) (2) (1) (2) (2) (2) − T (B1 , B2 , B3 ) + T (B1 , B2 , B3 ) + T (B1 , B2 , B3 ) − T (B1 , B2 , B3 ). (i) (i) (j) (k) Since Bj  0, the first part of this lemma shows that every term T (B1 , B2 , B3 ) ≥ 0. Hence, we have that (1) (1) (1) (1) (1) (2) (1) (2) (1) (1) (2) (2) T (B1 , B2 , B3 ) ≤T (B1 , B2 , B3 ) + T (B1 , B2 , B3 ) + T (B1 , B2 , B3 ) + T (B1 , B2 , B3 ) (2) (1) (1) (2) (1) (2) (2) (2) (1) (2) (2) (2) + T (B1 , B2 , B3 ) + T (B1 , B2 , B3 ) + T (B1 , B2 , B3 ) + T (B1 , B2 , B3 ) =T (|B1 | , |B2 | , |B3 |). Lemma 41. Suppose that ψk ≤ αk β for all k ≤ n for some 0 ≤ β ≤ 21 and α ≥ 1. Given an isotropic logconcave distribution p and an unit vector v, we define ∆ = Ex∼p xxT xT v. Then, we have that 1. For any orthogonal projection matrix P with rank r, we have that 2 Tr(∆P ∆) ≤ O(ψmin(2r,n) ). 2. For any symmetric matrix A, we have that 2β  Tr(∆A∆) ≤ O(α2 log n) Tr |A|1/(2β) . Proof. We first bound Tr(∆P ∆). This part of the proof is generalized from a proof by Eldan [14]. Note that Tr(∆P ∆) = Ex∼p xT P ∆xxT v. Since ExT v = 0, we have that q q Lem 19 q p 2 T 2 T Tr (∆P ∆). Tr(∆P ∆) ≤ E(x v) Var (x P ∆x) ≤ O ψrank(P ∆+∆P ) Ex kP ∆xk = O ψrank(P ∆+∆P ) 17 2 This gives Tr(∆P ∆) ≤ O(ψmin(2r,n) ). Now we bound P Tr(∆A∆). Since Tr(∆A∆) ≤ Tr(∆ |A| ∆), we can assume without loss of generality that A  0. We write A = i Ai + B where each Ai has eigenvalues between (kAk2 2i /n, kAk2 2i+1 /n] and B has eigenvalues smaller than or equals to kAk2 /n. Clearly, we only need at most ⌈log(n) + 1⌉ many such Ai . Let Pi be the orthogonal projection from Rn to the span of the range of Ai . Using kAi k2 Pi  Ai , we have that   X 2 2 rank(Ai )2β kAi k2 kA k ≤ O(α ) Tr(∆Ai ∆) ≤ kAi k2 Tr(∆Pi ∆) ≤ O ψmin(2rank(A i ),n) 2 i i where we used the first part of this lemma in the last inequality. Similarly, we have that  Tr(∆B∆) ≤ O ψn2 kBk2 ≤ O(n kBk2 ) ≤ O(1) kAk2 . Combining the bounds on Tr(∆Ai ∆) and Tr(∆B∆), we have that X rank(Ai )2β kAi k2 + O(1) kAk2 Tr(∆A∆) ≤ O(α2 ) i ≤ O(α2 ) X i rank(Ai ) kAi k1/(2β) 2 !2β log(n)1−2β 2β  1/(2β) ≤ O(α2 log n) Tr |A| . In the next lemma, we collect tensor related inequalities that will be useful. Lemma 42. Suppose that ψk ≤ αk β for all k ≤ n for some 0 ≤ β ≤ distribution p in Rn and symmetric matrices A and B , we have that 1 2 and α ≥ 1. For any isotropic logconcave 1. Ex (xT Ax)2 ≤ O(1)(Tr |A|)2 , 2 2. Ex∼p xT Ax − TrA ≤ O(ψn2 )TrA2 , 3. T (A, I, I) ≤ O(ψn ) kAk2 n, 4. T (A, I, I) ≤ O(ψn2 )Tr |A|, 5. T (A, B, I) ≤ O(ψr2 ) kBk2 Tr |A| where r = min(2rank(B), n), 2β  6. T (A, B, I) ≤ O(α2 log n) Tr |B|1/(2β) Tr |A|, 1/s s 7. T (A, B, I) ≤ (T (|A| , I, I))  1/t t for any s, t ≥ 1 with s−1 + t−1 = 1. T (|B| , I, I) Proof. Without loss of generality, we can assume A is diagonal by rotating space. In particular, if we want to prove something for Tr(Aα ∆Aβ ∆) where A, ∆ are symmetric matrices, we use the spectral decomposition A = U ΣU T to rewrite this as   Tr U Σα U T ∆U Σβ U T ∆ = Tr Σα (U T ∆U )Σβ (U T ∆U ) which puts us back in the same situation, but with a diagonal matrix A. Let ∆i = Ex∼p xxT xi . For inequality 1, we note that Ex (xT Ax)2 = X ij Aii Ajj Ex x2i x2j ≤ X ij q |Aii | |Ajj | Ex4i Ex4j Lem ≤ 14 O(1) X i |Aii | For inequality 2, we note that Ex∼p xT Ax = TrA. Hence, 2  Lem 19 Ex∼p xT Ax − TrA = Var xT Ax ≤ O(ψn2 )Ex kAxk2 = O(ψn2 )TrA2 . 18 !2 . For remaining inequalities, it suffices to upper bound T by upper bounding Tp for any isotropic logconcave distribution p. For inequality 3, we note that Tp (A, I, I) X 39 X Lem 39 Tr(∆2i ) = kAk2 T (I, I, I) ≤ O(nψn ) kAk2 = Aii Tr(∆2i ) ≤ kAk2 Lem i i where the last inequality is from the third moment assumption. For inequality 4, we note that Lem 41 X 39 X Aii Tr(∆2i ) ≤ |Aii | O(ψn2 ) = O(ψn2 )Tr |A| . = Lem Tp (A, I, I) i i For inequality 5, we let P be the orthogonal projection from Rn to the span of the range of B. Let r = rank(P ). Then, we have that (Lem 40) Tp (A, B, I) ≤ Tp (|A|, |B|, I) X |Aii | Tr(∆i |B|∆i ) = (Lem 39) i X 1 |Aii | Tr(∆i P ∆i ) ≤ kBk2 i ≤ O(ψr2 )Tr|A| kBk2 . (Lem 41) where we used that |B|  kBk2 P in 1 . For inequality 6, we note that 2β  Lem 41 39 X 1/(2β) Aii Tr(∆i B∆i ) ≤ O(α2 log n)Tr |A| Tr |B| = . Lem Tp (A, B, I) i For inequality 7, we note that (Lem 40) Tp (A, B, I) ≤ Tp (|A| , |B| , I) X = Tr(|A| ∆i |B| ∆i ) (Lem 39) i ≤ = X i X i Tr(|A| |∆i | |B| |∆i |) Tr(|∆i | ≤ X ≤ X = X i i  |A| |∆i | |∆i | 1/s 1/s X i s Tr |A| s s 1/t |B| |∆i | s 1/s  1/t Tr !1/s  1/s )  |∆i | 1/t |B| |∆i | 1/t   1/t t Tr |∆i | |B| |∆i | 1/s   t 2 1/t Tr |B| ∆i ∆2i = (Tp (|A| , I, I)) 1/s 1/s s Tr |A| ∆2i |∆i | |A| |∆i | (Tr (|∆i | |A| |∆i |)) i ≤ Tr 1/s X i   t Tr |B| ∆2i t 1/t (Lem 22) !1/t  1/t t . Tp (|B| , I, I) Lemma 43. For any positive semi-definite matrices A, B, C and any α ∈ [0, 1], then T (B 1/2 Aα B 1/2 , B 1/2 A1−α B 1/2 , C) ≤ T (B 1/2 AB 1/2 , B, C). 19 (Lem 21) (Lem 39) Proof. Fix any isotropic logconcave distribution p. Let ∆i = Ex∼p B 1/2 xxT B 1/2 xT C 1/2 ei . Then, we have that Tp (B 1/2 Aα B 1/2 , B 1/2 A1−α B 1/2 , C) = Ex,y∼p xT B 1/2 Aα B 1/2 yxT B 1/2 A1−α B 1/2 yxT Cy    X  E y T B 1/2 Aα B 1/2 x xT B 1/2 A1−α B 1/2 y xT C 1/2 ei y T C 1/2 ei = i = X i = X      E Tr Aα B 1/2 xxT B 1/2 A1−α B 1/2 yy T B 1/2 xT C 1/2 ei y T C 1/2 ei Tr(Aα ∆i A1−α ∆i ) i Using Lemma 23, we have that X X Tr(A∆2i ) = Ex,y∼p xT B 1/2 AB 1/2 yxT ByxT Cy = Tp (B 1/2 AB 1/2 , B, C). Tr(Aα ∆i A1−α ∆i ) ≤ i i Taking the supremum over all isotropic logconcave distributions p, we get the result. 6.2 Derivatives of the potential Lemma 44. Let At be defined by Definition 24. For any integer q ≥ 2, we have that dTr((At − I)q ) =qEx∼pt (x − µt )T (At − I)q−1 (x − µt )(x − µt )T dWt − qTr((At − I)q−1 A2t )dt q X + Ex,y∼pt (x − µt )T (At − I)α (y − µt )(x − µt )T (At − I)β (y − µt )(x − µt )T (y − µt )dt. 2 α+β=q−2 We give the proof in Section 5. The next lemma bounds the stochastic process that controls this potential function. Lemma 45. Let At and pt be defined by Definition 24. Let Φt = Tr((At − I)q ) for some even integer q ≥ 2, then we have that dΦt = δt dt + vtT dWt with δt ≤ 1+ 1 1− 1 1 1 q(q − 1)T (At (At − I)q−2 , At , At ) + q(Φt q + Φt q n q ) 2 and kvt k2 ≤ q Ex∼p (x − µt )T (A − I)q−1 (x − µt )(x − µt )T 2 . Proof. By Lemma 44, we have dΦt =qEx∼pt (x − µt )T (At − I)q−1 (x − µt )(x − µt )T dWt − qTr((At − I)q−1 A2t )dt q X + Ex,y∼pt (x − µt )T (At − I)α (y − µt )(x − µt )T (At − I)β (y − µt )(x − µt )T (y − µt )dt 2 α+β=q−2 =qEx∼p (x − µt )T (A − I)q−1 (x − µt )(x − µt )T dWt − qTr((At − I)q−1 A2t )dt q X Ex,y∼p̃t xT At (At − I)α yxT At (At − I)β yxT At ydt + 2 α+β=q−2 def =δt dt + vtT dWt . 1/2 where p̃t is the isotropic version of pt defined by p̃t (x) = p(At x + µt ), δt dt is the drift term in dΦt and vtT dWt is the martingale term in dΦt . For the drift term αt dt, we have q X T (At (At − I)α , At (At − I)β , At ) − qTr((At − I)q−1 A2t ). δt ≤ 2 α+β=q−2 The first term in the drift is q X q T (At (At − I)α , At (At − I)β , At ) ≤ 2 2 α+β=q−2 X α+β=q−2 α β T (At |At − I| , At |At − I| , At ) ≤ q 2 = q(q − 1) T (At (At − I)q−2 , At , At ). 2 X α+β=q−2 20 T (At |At − I| q−2 , At , At ) (Lem 40) (Lem 43) For the second term in drift, since q is even, we have that −qTr((At − I)q−1 A2t ) = − qTr((At − I)q−1 (At − I + I)2 ) ≤ − qTr((At − I)q+1 ) − qTr((At − I)q−1 ) 1+ 1q ≤qΦt 1− 1q + qΦt 1 nq . For the martingale term vtT dWt , we note that kvt k2 = q Ex∼p (x − µt )T (A − I)q−1 (x − µt )(x − µt )T . 6.3 Analysis of At We first bound the drift term from Lemma 44. Lemma 46. Suppose that ψk ≤ αk β for all k ≤ n for some 0 ≤ β ≤ 21 and α ≥ 1. Let Φ = Tr((A − I)q ) for some even integer q ≥ 2 and A  0. If βq ≥ 2, then    2β− 2β + 2 1− 2 2β 2 2β− β + q1 1− 1q 2β− 2βq+1 2β− q1 1+ q1 q−2 2 q q q q . Φ +n Φ +n Φ + (log n)n Φ n T (A(A − I) , A, A) ≤ O α Proof. We have that T (A(A − I)q−2 , A, A) =T ((A − I)q−1 + (A − I)q−2 , (A − I) + I, (A − I) + I) =T ((A − I)q−1 , A − I, A − I) + 2T ((A − I)q−1 , A − I, I) + T ((A − I)q−1 , I, I) + T ((A − I)q−2 , A − I, A − I) + 2T ((A − I)q−2 , A − I, I) + T ((A − I)q−2 , I, I) ≤T (|A − I|q−1 , |A − I|, |A − I|) + 2T (|A − I|q−1 , |A − I|, I) + T (|A − I|q−1 , I, I) q−2 + T ((A − I) ≤T (|A − I| q−1 q−2 , |A − I|, |A − I|) + 2T ((A − I) q−1 , |A − I|, |A − I|) + 3T (|A − I| + 3T (|A − I| q−1 q−2 , I, I) + T ((A − I) , I, I) q−2 , |A − I|, I) + T ((A − I) (Lem 40) , I, I) (6.1) , |A − I|, I) where we used Lemma 43 at the end. For the first term in (6.1), we have that T (|A − I|q−1 , |A − I|, |A − I|) ≤ T (|A − I|q , |A − I|, I) 2β  ≤ O(α2 log n)Φ Tr|A − I|1/2β 2β  = O(α2 log n)Φ (Tr|A − I|q )1/(2βq) n1−1/(2βq) (Lem 43) (Lem 42.6) 1 ≤ O(α2 log n)n2β− q Φ1+1/q where we used 2βq ≥ 1 at the last line. For the second term in (6.1), we write |A − I| = B1 + B2 where B1 consists of the eigen-components of |A − I| with eigenvalues ≤ η and B2 is the remaining part where we will pick η ≥ 0 later. Then, we have that T (|A − I| q−1 , |A − I|, I) = T (B1q−1 , B1 , I) + T (B1q−1 , B2 , I) + T (B2q−1 , B1 , I) + T (B2q−1 , B2 , I). (6.2) For the first term in (6.2), we note that T (B1q−1 , B1 , I) ≤ T (B1q , I, I) q ≤ O(ψn n) kB1 k ≤ O(η q ψn n). 21 (Lem 43) (Lem 42.3) For the second term in (6.2), we note that T (B1q−1 , B2 , I) ≤ T (B1q , I, I) ≤ O(η q ψn n) where we used kB1 k2 ≤ η and have TrB2q q−1 q q−1 q 1 T (B2q , I, I) q O(ψn2 Φ) (Lem 42.7) 1 q (Lem 42.3 and Lem 42.4) q ≤ Tr |A − I| = Φ at the last line. For the third term in (6.2), similarly, we T (B2q−1 , B1 , I) ≤ T (B2q , I, I) ≤ O(ψn2 Φ) q−1 q q−1 q 1 T (B1q , I, I) q (Lem 42.7) 1 q q (Lem 42.3 and Lem 42.4) O(η ψn n) . For the fourth term in (6.2), we let P be the orthogonal projection from Rn to the range of B2 . We have that T (B2q−1 , B2 , I) = T (P B2q−1 P, P B2 P, I) ≤ T (P B2q P, P, I) ≤ ≤ where r ≤ 2rank(P ) ≤ T (|A − I| q−1 2Φ ηq . (Lem 43) O(ψr2 )TrB2q O(ψr2 )Φ (Lem 42.5) Using ψk ≤ αk β and combining all four terms, we have that q−1 q−1 1 1 , |A − I|, I) ≤ O(η q ψn n) + O(η q ψn n) q O(ψn2 Φ) q + O(ψn2 Φ) q O(η q ψn n) q + O(ψr2 )Φ   1 1 Φ1+2β + β(q+1) +β(2− 1q ) q−1 2 q 1+β q−1 q−1 q q q q q Φ + ηn Φ + 2βq . ≤ O(α ) η n +η n η 1 β 1 Balancing the last two terms and setting η = Φ q n− q + q(2βq+1) , we get that   2β 2 (q−1) 2β 2 2β 2 2β 2 q q−1 T (|A − I| , |A − I|, I) ≤ O(α2 Φ) n2β− 1+2βq + n2β− 1+2βq + n2β− 1+2βq + n2β− 1+2βq β ≤ O(α2 n2β (1− 2βq+1 ) Φ) where we used q ≥ 2 and β ≥ 0. For the third term in (6.1), we have that T (|A − I| q−1 , I, I) = T (B1q−1 , I, I) + T (B2q−1 , I, I)   Φ ≤ O αη q−1 n1+β + α2 n2β η ≤ O(α2 n β−1 1−β q +2β (Lem 42.3 and Lem 42.4) 1 Φ1− q ) 1 where we set η = n q Φ q at the last line. For the fourth term in (6.1), we have that T (|A − I|q−2 , I, I) = T (B1q−2 , I, I) + T (B2q−2 , I, I) Φ ≤ O(αη q−2 n1+β + α2 n2β 2 ) η ≤ O(α2 n β−1 2(1−β) +2β q (Lem 42.3 and Lem 42.4) 2 Φ1− q ) 1 where we set η = n q Φ q at the last line. Combining all terms, we have the result. Next we bound the martingale term. Lemma 47. Let p be a logconcave distribution with covariance matrix A. Let Φ = Tr((A − I)q ) for some even integer q ≥ 2. Then, Ex∼p (x − µt )T (A − I)q−1 (x − µt )(x − µt )T 22 1 2 1 1 1 ≤ O(Φ1− 2q n q + Φ1+ 2q + n q ). Proof. Note that Ex∼p (x − µt )T (A − I)q−1 (x − µt )(x − µt )T 1/2 ≤ O (1) kAk1/2 (A − I)q−1 A1/2 2 Tr A 2 1/2 ≤ O (1) kAk2 1/2 Tr|A − I|q−1 + O (1) kAk2 1 1 (Lem 32) 1 1 ≤ O(1 + Φ 2q )Φ1− q n q + O(1 + Φ 2q )Φ 1 1 Tr|A − I|q 1 1 ≤ O(Φ1− 2q n q + Φ1+ 2q + n q ). Using Lemma 46 and Lemma 47, we know that Φt = Tr((At − I)q ) satisfies the stochastic equation dΦt = δt dt + vtT dWt with    β 2β 2 2β 2 1 1 1− 2 1− 1 1+ 1 δt ≤O α2 q 2 n2β− q + q Φt q + n2β− q + q Φt q + n2β− 2βq+1 Φt + (log n)n2β− q Φt q 1+ q1 + q(Φt ≤O α2 q 2 and   1− 1q + Φt n2β− 2β q 1 nq ) + q2 1− q2 Φt 2 kvt k2 β 1 1− 1q + n2β− q + q Φt 2 ≤ O(q )  2− 1 2 Φt q n q 2β 2 1 1+ q1 + n2β− 2βq+1 Φt + (log n)n2β− q Φt + 2+ 1 Φt q +n 2 q   (6.3) (6.4) where we used α ≥ 1, 2βq ≥ 1 and q ≥ 1 in (6.3). Using these, one can bound the growth of Φt using a stochastic Grönwall’s inequality. For completeness, we bound Φt directly below. Lemma 48. Suppose that ψk ≤ αk β for all k ≤ n for some 0 ≤ β ≤ 12 and α ≥ 1. Given an isotropic logconcave distribution p. Let At be defined by Definition 24 using initial distribution p. Let Φt = Tr((At − I)q ) for some even integer q ≥ 2. If βq ≥ 2 and n ≥ q ηq for some large constant η, then there is a universal constant c such that β β q P( max Φt ≥ n1− 2 log− 2 n) ≤ 0.01 t∈[0,T ] with T = cn−2β+ 2q qα2 log n Proof. The idea is to choose a a function Ψt = f (Φt , t) so that the resulting stochastic equation for Ψt effectively decouples the drift and martingale terms. We use  2q1  q f (a, t) = a + 1 + Etq + F t 2 with q E = q q α2q n1−β+2βq and F = q 2 αq n1−β+βq . By 45 and Itô’s formula, we have that df 1 d2 f df dt + dΦt + d[Φ]t dt dΦ 2 dΦdΦ df df df T ≤ dt + δt dt + v dWt dt dΦ dΦ t where we used f (a, t) is concave in a in the last line and dropped the second derivative term. The rationale for our q choice of f (a, t) is that 1 + Etq + F t 2 is our guess for the solution of the SDE for Φt , and the power 1/2q is chosen so that Φt can be eliminated from the stochastic term in the bound for Ψt above. df δt dt, we use (6.3) and get that For the term dΦ dΨt = df δt 1 δt = dΦ 2q (Φt + 1 + Etq + F t q2 )1− 2q1   2β β 2 1 1− 2 1− 1 n2β− q + q Φt q n2β− q + q Φt q 2   ≤O(qα ) 1 + 1 q q (Φt + 1 + Etq + F t 2 )1− 2q (Φt + 1 + Etq + F t 2 )1− 2q   1 2β 2 2β− q1 1+ q 2β− 2βq+1 Φt Φt (log n)n n . + + O(qα2 )  1 q 1− 1 q q q 2q (Φt + 1 + Et + F t 2 ) (Φt + 1 + Et + F t 2 )1− 2q 23 (6.5) For the first term in (6.5), we note that n2β− 2β 2 q +q 1− 2q Φt 1 q (Φt + 1 + Etq + F t 2 )1− 2q n2β− ≤ 2β 2 q +q 2 1 q (Φt + 1 + Etq + F t 2 )1− 2q −(1− q ) ≤ n2β− 2β 2 q +q q 1 = 3 (F t 2 ) 2q F 2q 3 qα2 t 4 q where we used F = q 2 αq n1−β+βq at the end. For the second term in (6.5), we note that β 1− q1 1 β n2β− q + q Φt 1 q (Φt + 1 + Etq + F t 2 )1− 2q ≤ 1 1 n2β− q + q 1 (Etq ) 2q = E 2q √ qα2 t β q where we used E = q q α2q n1−β+2βq at the end. For the third term in (6.5), assuming Φt ≤ n1− 2 log− 2 n, we have that 2β 2 β β 2β 2 2β 2 1 1 1 1/q n2β− 2βq+1 Φt n2β− 2βq+1 Φt n2β− 2βq+1 n q − 2q 1 n2β− q + q 2 E 2q √ ≤ ≤ = 1 1 1 1 ≤ q qα2 t (Φt + 1 + Etq + F t 2 )1− 2q (Etq ) 2q (Etq ) 2q (Etq ) 2q where we used that 2qβ ≥ 1 implies 2β − the fourth term in (6.5), assuming Φt ≤ n 1 2β 2 1 2βq+1 + q q β −2 1− 2 log 1+ 1q β 2q ≤ 2β − 1 (Φt + 1 + Etq + F t 2 )1− 2q ≤ β q + 1 q at 1 and E = q q α2q n1−β+2βq at 2 . For n, we have that 1 (log n)n2β− q Φt q − 2 (log n)n2β− q Φtq 1 (Etq ) 2q β ≤ 1 n2β− q + q 1 (Etq ) 2q 1 E 2q √ = qα2 t where we used E = q q α2q n1−β+2βq at the end. Combining all four terms in (6.5), we have that   1 1 1 3 df δt ≤ O E 2q t− 2 + F 2q t− 4 . dΦ For the term df dt dt, we have that q  1 1  qEtq−1 + 2q F t 2 −1 1 3 df 1 = O E 2q t− 2 + F 2q t− 4 . = q 1− 1 dt 2q (Φt + 1 + Etq + F t 2 ) 2q For the term df T dΦ vt dWt , q β using (6.4) and assuming Φt ≤ n1− 2 log− 2 n, we have that   2 2− 1 2 2 kvt k2 ≤ O(q 2 ) Φt q n q + n q . Hence, we have that df vt dΦ Combining the terms df df dΦ δt dt, dt dt 2 2 2 ≤ 2− 1 2 Φt q n q 2 q  O(q ) +n 2 1 ≤ O(n q ). q 2− 1 2 4q (Φt + 1 + Etq + F t 2 ) q df T dΦ vt dWt , and  β q we have that, when Φt ≤ n1− 2 log− 2 n, df df 1 d2 f dt + dΦt + d[Φ]t dt  dΦ 2 dΦdΦ  1 1 1 3 ≤ C1 E 2q t− 2 + F 2q t− 4 dt + dYt dΨt = (6.6) ]t 2/q where Yt is a martingale with Y0 = 0 and d[Y for some universal constant C1 , C2 ≥ 1. dt ≤ C2 n By Theorem 12, there exists a Wiener process W̃t such that Yt has the same distribution as W̃[Y ]t . Using the reflection principle for 1-dimensional Brownian motion, we have that P( max Yt ≥ γ) ≤ P( t∈[0,T ] 1 β max t∈[0,C2 n2/q T ] W̃t ≥ γ) = 2P(W̃C2 n2/q T ≥ γ) ≤ O(exp(− 1 γ2 )). 2C2 n2/q T Let Ψu = n 2q − 4q log− 4 n. As long as Ψt ≤ Ψu , the estimate (6.6) is valid and hence Z T  1 1  1 3 P( max Ψt ≥ Ψu ) ≤ P( max Yt ≥ Ψu − 1 − C1 E 2q t− 2 + F 2q t− 4 dt) t∈[0,T ] t∈[0,T ] 0 24 where we used that Ψ0 = 1 at the last line. Note that Z T   1   1 1 √ 1−β 1−β β 1 1 √ 1 1 1 3 C1 E 2q t− 2 + F 2q t− 4 dt = 2C1 E 2q T + 4C1 F 2q T 1/4 ≤ 4C1 q 2 αn 2q +β T + q 4 α 2 n 2q + 2 T 1/4 . 0 Setting T = −2β+ β 2q n 216 C14 qα2 log n and using n ≥ q ηq for some large constant η, we have that Z T 0 Hence, we have that  1 1  1 3 Ψu − 1. C1 E 2q t− 2 + F 2q t− 4 dt < 2 Ψu P( max Ψt ≥ Ψ ) ≤ P( max Yt ≥ ) = O(exp(− 2 t∈[0,T ] t∈[0,T ] u  Ψu 2 2 1 )). 2C2 n2/q T Note that  Ψu 2 2 1 β 1 1 1+β p n q − 2q log− 2 n 216 C14 qα2 log n 1 = log n ≥ C2−1 nβ = 213 C2−1 C14 qα2 n2β− q β 2/q 2/q 2C2 n T 8n C2 n−2β+ 2q 1 where we used qβ ≥ 2, 0 ≤ β ≤ 21 , C1 ≥ 1, α ≥ 1, q ≥ 1 at 1 . Using the fact that Ψt ≥ Φt2q , we have that q β P( max Φt ≥ n1− 2 log− 2 n) = O(exp(−C2−1 nβ )) ≤ 0.01 t∈[0,T ] where we used that qβ ≥ 2 and n ≥ q ηq for some large constant η. Lemma 49. Suppose that ψk ≤ αk β for all k ≤ n for some 0 ≤ β ≤ 21 and α ≥ 1. For any even integer q ≥ 2 with βq ≥ 2, if n ≥ q ηq for some large constant η, we have that p β ψn ≤ Cα q log nnβ− 4q for some universal constant C. Proof. By Lemma 48, for t up to T = −2β+ β 2q cn qα2 log n , with probability 0.99, q β Tr((At − I)q ) = Φt ≤ n1− 2 log− 2 n for all 0 ≤ t ≤ T. Assuming this event, we have 1 β 1 kAt k2 ≤ 1 + n q − 2q log− 2 n and Z which is less than get that 1 64 1 T 0 for all 0 ≤ t ≤ T. kAt k2 dt ≤ T · (1 + n β 1 q − 2q log − 21 n) ≤ c1 n q −2β qα2 log3/2 n when n is large enough. Also, we have that BT = T · I. Hence, we can apply Lemma 31 and   p β ψp = O α q log nnβ− 4q . Since this argument holds for any isotropic logconcave distribution, this gives the bound for ψn . Proof of Theorem 37. Fix a large enough n. We start with a known bound: ψk ≤ α1 k β1 for all k ≤ n wherelα1m is some universal constant larger than 1 and β1 = q = 2 β1 . Hence, we have that − 12 p ψk ≤ 4Cα1 β1 1 2. 2 β1 Now, we apply Lemma 49 for every k ≤ n with log nk β1 − 16 for all k ≤ n. 25 Repeating this process, we have that ψk ≤ αℓ k βℓ for all k ≤ n with − 12 p αℓ+1 = 4Cαℓ βℓ βℓ+1 = βℓ − By induction, we have that αℓ = O(ℓ log n)ℓ/2 and βℓ ≤ βℓ2 16 16 ℓ . log n, . Hence, we have that ψn ≤ O(ℓ log n)ℓ n for all ℓ ≥ 1. Setting ℓ = lp m log n/ log log n , we have that ψn = n 7 16 ℓ O q log log n log n    p log n log log n . = exp O Adaptive localization for anisotropic distributions In this section, we show that the same third moment assumption gives the following bound on the KLS constant for arbitrary logconcave distributions. Theorem 50. Under the third moment assumption of Section 6, for any logconcave density p in Rn with covariance matrix A, for any integer q ≥ 1, the KLS constant is bounded as 1 ψp ≤ Cq O(q) (Tr (Aq )) 2q . 7.1 Controlled stochastic localization Definition 51. Given a symmetric matrix B, let E<u (B) be the span of all eigenvectors in B with eigenvalues less than u and Λ<u (B) = dim E<u (B). We define E≥u , Λ≥u , etc similarly. For this reduction, we apply localization only in the subspace where the matrix Bt controlling the Gaussian has small eigenvalues. At time t, the control matrix is chosen so that it is the inverse of the projection of the current covariance matrix At to the subspace of the small eigenvalue of Bt . This is captured in the next definition. Definition 52. Given a logconcave distribution p and a threshold u, we define the following process: p0 = p, c0 = 0, B0 = 0, τ0 = 0 and for k ≥ 1, 1. τk = inf{t > τk−1 such that Λ<u (Bt ) 6= Λ<u (Bτk−1 )}. 2. pt , ct , Bt are defined by Definition 24 on [τk−1 , τk ) with the initial data cτk−1 , Bτk−1 , pτk−1 (instead of 0, 0 and p) and with the control matrix Ct given by −2 (k) −1 Ct = ψ2r ) (k) lim (I + At + sP s→∞ where At is the covariance matrix of pt , r(k) = Λ<u (Bτk−1 ), P (k) is the orthogonal projection onto E≥u (Bτk−1 ) and ψr is any known bound on the KLS constant for isotropic logconcave densities. Let rt = rank(Ct ). The following lemma gives an alternative definition of Ct . Lemma 53. For any A ≻ 0 and an orthogonal projection matrix P , we let T = lims→∞ (A + sP )−1 . Then, we have that T = ((I − P )A(I − P ))† where † denotes pseudoinverse. Furthermore, we have that R(P ) = N (T ), i.e., the rowspace of P equals the nullspace of T . 26 Proof. By taking P = U T ΣU , we can see that lim (A + sP )−1 = U T lim (U AU T + sΣ)−1 U s→∞ and s→∞ † ((I − P )A(I − P ))† = U T (I − Σ)U AU T (I − Σ) U. Hence, it suffices to prove the case P is a diagonal matrix whose first r diagonal entries are 0 and the remaining diagonal entries are 1. Write   A1 A2 A= AT2 A3 where A1 is a r × r matrix. Then, we have that −1 (A + sP ) =  A1 AT2 A2 A3 + sI −1 =  −1 T −1 A−1 1 + A1 A2 F A2 A1 T −1 −F A2 A1 −A−1 1 A2 F F  . −1 where F = (A3 + sI − AT2 A−1 . As s → ∞, we have that F → 0 and hence 1 A2 )   −1 A1 0 † = ((I − P )A(I − P )) . lim (A + sP )−1 = s→∞ 0 0 For any x ∈ R(P ), we have that x is 0 in the first r coordinates and hence 2 0 ≤ xT T x ≤ xT (I + sP )−1 x = kxk . 1+s Taking s → ∞, we have that xT T x = 0. Using T  0, this shows that R(P ) ⊂ N (T ). On the another hand, we have that A + sP  kAk2 (I − P ) + sP and hence −1 (A + sP )−1  kAk2 (I − P ) + s−1 P. Taking the limit, we have that T  kAk−1 2 (I − P ). This shows that N (T ) ⊂ R(P ). Hence, we have R(P ) = N (T ). The specific formula above is not important and the reduction of this section uses only the following properties of the control matrix Ct . Lemma 54. For any t ≥ 0, we have that −2 −1 1. (Focus on small values in At ) 0  Ct  ψ2r At . t 2. (Focus on small values in Bt ) Bt  uI and rt = r(k) = Λ<u (Bt ) for t ∈ [τk−1 , τk ). 1+ q1 3. (Large step size) TrCt ≥ rt 1/q 2 (Φt /(ψ2r t + 1)). −2 −1 Proof. For the first part, since I + At + sP (k)  At , we have that ψ2r  Ct  0. (k) At 2 For Bt  uI in the second part, we prove it by a continuous induction. Let t′ = inf t≥0 {xT Bt x > u for some kxk = ′ ′ 1}. Suppose that t < +∞. By the definition, we have that Bt  uI for t ≤ t . Fix any t ∈ [τk−1 , τk ). Since t Bt  uI, we can write Bt = Bt′ + Bt′′ where all eigenvalues of Bt′ are u and Bt′′ ≺ uI. Since dB dt = Ct  0 and since ′ ′ the number of eigenvalues being u is unchanged during [τk−1 , τk ), we know that Bt = Bτk−1 . By the definition of P (k) , we have that R(P (k) ) = E≥u (Bτ′ k−1 ) = E≥u (Bt′ ). For any xT Bt x ≥ u kxk2 , we have that x ∈ E≥u (Bt′ ) because Bt  uI. Hence, we have that x ∈ R(P (k) ) and d Lemma 53 shows that R(P (k) ) = N (Ct ) and hence xT Ct x = 0. Since dt Bt = Ct , we have that xT dBt 2 x = 0 for any xT Bt x ≥ u kxk and any t ≤ t′ . dt 27 This contradicts the definition of t′ . Therefore, we have that Bt  uI for all t. For rt = r(k) = Λ<u (Bt ) in the second part, Lemma 53 shows that R(P (k) ) = N (Ct ). Therefore, we have that n − rt = dim N (Ct ) = rank(P (k) ) = n − r(k) = n − Λ<u (Bτk−1 ) = n − Λ<u (Bt ) where we used that the number of eigenvalues being u is unchanged during [τk−1 , τk ) at the end. For the third part, we use the inequality r≤ r X xqi i=1 1 ! 1+q r X x−1 i i=1 q ! 1+q and the fact that Ct is a rank rt matrix. We have that 1   1+q q rt ≤ TrCt†q (TrCt ) 1+q (7.1) where we use Ct†q to denote the q th power of pseudo inverse of Ct . By Lemma 53, we have that 2 (I − P (k) )(I + At )(I − P (k) ). Ct† = ψ2r t Hence, we have that TrCt†q Lem ≤ 22 2q 2q Tr(I + At )q . Tr(I − P (k) )q (I + At )q (I − P (k) )q ≤ ψ2r ψ2r t t Putting this in (7.1) gives that 1+ q1 TrCt ≥  7.2 rt TrCt†q 1+ 1q  1q ≥ rt 1/q 2 (Φ ψ2r t t + 1) . Analysis of At Lemma 55. Let At be defined by Definition 52. For any integer q ≥ 2, we have that 1/2 Ct )dt dTr(Aqt ) =qEx∼pt (x − µt )T Atq−1 (x − µt )(x − µt )T Ct dWt − qTr(Aq+1 t q X T α T β + Ex,y∼pt (x − µt ) At (y − µt )(x − µt ) At (y − µt )(x − µt )T Ct (y − µt )dt. 2 α+β=q−2 Proof. Note that At is defined by concatenating solutions of finitely many SDEs. Therefore, it suffices to prove this equality for each SDE solution and this follows from Lemma 36. In Section 6 that At − I may not be positive semi-definite and hence we need to take q to be even integer. But in this section, we analyze the process by the potential Tr(Aqt ) and hence we do not require that q to be even. Lemma 56. Let At be defined by Definition 52. Let Φt = Tr(Aqt ) for some integer q ≥ 2, then we have that dΦt = δt dt + vtT dWt with δt ≤ O(q 2 )Φt and kvt k2 ≤ O(q)Φt . Proof. By Lemma 55, we have 1/2 Ct )dt dΦt =qEx∼pt (x − µt )T Atq−1 (x − µt )(x − µt )T Ct dWt − qTr(Aq+1 t q X T α T β + Ex,y∼pt (x − µt ) At (y − µt )(x − µt ) At (y − µt )(x − µt )T Ct (y − µt )dt 2 α+β=q−2 1/2 =qEx∼p (x − µt )T Atq−1 (x − µt )(x − µt )T Ct dWt − qTr(Aq+1 Ct )dt t q X 1/2 T α+1 T β+1 T 1/2 Ex,y∼p̃t x At yx At yx At Ct At ydt + 2 α+β=q−2 =δt dt + vtT dWt . def 28 1/2 where p̃t is the isotropic version of pt defined by p̃t (x) = p(At x + µt ), δt dt is the drift term in dΦt and vtT dWt is the martingale term in dΦt . For the drift term δt dt, using that Ct  0, we have q X 1/2 1/2 T (Aα+1 , Aβ+1 , At Ct At ) − qTr(Aq+1 Ct ) δt ≤ t t t 2 α+β=q−2 q X 1/2 1/2 ≤ T (Aα+1 , Aβ+1 , At Ct At ) t t 2 α+β=q−2 q X 1/2 1/2 ≤ T (Aqt , I, At Ct At ) (Lem 43) 2 α+β=q−2 1/2 1/2 ≤ q T (Aqt , At Ct At , I) 2 1/2 1/2 2 )Φt At Ct At ≤ O(q 2 ψ2r t (Lem 42.5) 2 ≤ O(q 2 Φt ). (Lem 54) For the martingale term vtT dWt , we note that 1/2 kvt k2 = q Ex∼pt (x − µt )T Atq−1 (x − µt )(x − µt )T Ct 1/2 1/2 ≤ O (q) At Ct At 1/2 2 1/2 1/2 Tr At Atq−1 At (Lem 32) −2 ≤ O(qψ2r )Φt ≤ O(q)Φt . t where we used that ψ2rt = Ω(1) at the last line. Using these, one can bound the growth of Φt . Lemma 57. Let At be defined by Definition 52 using initial distribution p. Let Φt = Tr(Aqt ) for some integer q ≥ 2. Suppose that Φ0 = n, there is a universal constant c such that P( max Φt ≥ 2n) ≤ 0.01 t∈[0,Tmax ] with Tmax = 64(C ′ 1 . + C)q 2 Proof. By Lemma 56 and Itô’s formula, we have that 1 −2 d log Φt = Φ−1 t dΦt − Φt d[Φ]t 2  δt dt + vtT dWt ≤ Φ−1 t T ≤ O(q 2 )dt + Φ−1 t vt dWt ≤ Cq 2 dt + dYt (7.2) T where dYt = Φ−1 t vt dWt , Yt = 0 and C is some universal constant. Note that d[Y ]t 2 2 ′ 2 = Φ−2 t kvt k2 = O(q ) ≤ C q dt for some universal constant C ′ . By Theorem 12, there exists a Wiener process W̃t such that Yt has the same distribution as W̃[Y ]t . Using the reflection principle for 1-dimensional Brownian motion, we have that P( max Yt ≥ γ) ≤ P( t∈[0,T ] max ′ 2 t∈[0,C q T ] W̃t ≥ γ) = 2P(W̃C ′ q2 T ≥ γ) ≤ 2 exp(− Since Φ0 = n, we have that log Φ0 = log n and therefore (7.2) shows that P( max log Φt ≥ log n + Cq 2 T + γ) ≤ 2 exp(− t∈[0,T ] Putting T = 1 64(C ′ +C)q2 γ2 ). 2C ′ q 2 T and γ = 12 , we have that 2 P( max log Φt ≥ log n + ) ≤ 2 exp(−8)) ≤ 0.01. 3 t∈[0,T ] 29 γ2 ). 2C ′ q 2 T 7.3 Proof of Theorem 50 Lemma 58. Let At be defined by Definition 52 using initial distribution p. Suppose that Tr(Aqt ) = n. Then, we have that 1 and u = q −c2 q n−1/q P(BTmax = uI) ≥ 0.99 with Tmax = c1 q 2 where c1 and c2 are universal constants. Proof. By Lemma 57 and Lemma 54, we have that Φt ≤ 2n for all 0 ≤ t ≤ Tmax with 0.99 probability, subject to 1+ q1 −2 r this event, we have that TrCt ≥ cψ2r t t n−1/q . Let Ψt = TrBt . Then this shows that 1 dΨt −2 1+ q −1/q ≥ cψ2r r n ≥ 0. t t dt By Theorem ??, we have that ψn−2 ≥ e−C √ log n log log n for some universal constant C ≥ 0. Hence, we have that √ 1+ 1 ce−C log rt log log rt rt q n−1/q dΨt ≥ ≥ 0. dt Also, Lemma 54 shows that rt = Λ<u (Bt ). Therefore, we have un ≥ Ψt ≥ u(n − rt ). Let Tk = inf t≥0 {Ψt ≥ un(1 − 2−k )}. For any t ∈ [Tk−1 , Tk ), we have that Since e−C √ 1 log r log log r 1+ q r rt ≥ n − Ψt ≥ n2−k . u is an increasing function in r, for t ∈ [Tk−1 , Tk ), we have that √ 1 dΨt −k −k ≥ ce−C log(n2 ) log log(n2 ) (n2−k )1+ q n−1/q dt √ −k −k = n2−k · c2−k/q e−C log(n2 ) log log(n2 ) . From the definition of Tk , we see that Tk − Tk−1 ≤ un2−k √ −C n2−k · c2−k/q √e log(n2−k ) log log(n2−k ) log(n2−k ) log log(n2−k ) = O(u)2k/q eC . Therefore, we have that log2 n Tlog2 n ≤ O(u) X 2k/q eC √ log(n2−k ) log log(n2−k ) = uq O(q) n1/q k=0 where the last inequality can be seen by noting that the sequence is exponentially increasing with rate 1/q until 2 the maximal at 2k = n/q Θ(q ) . Setting u = qO(q)1n1/q , we have that Tlog2 n ≤ Tmax and hence Ψt increases to un and Bt = uI before time Tmax . After Bt has increased to uI, Ct = 0 and the localization process freezes. Proof of Theorem 50. The case q = 1 is proven in Theorem 2. So, we assume q ≥ 2. By rescaling, we can assume TrAq = n. To apply Lemma 31, we note that by Lemma 58, we have that 1 and u = q −c2 q n−1/q . P(BTmax = uI) ≥ 0.99 with Tmax = c1 q 2 Furthermore, Lemma 54 shows that 1/2 Ct 1/2 At Ct 1/2 2 1/2 = At Ct At 2 −2 = O(1). ≤ ψ2r t Therefore, P Z Tmax 0 Cs1/2 As Cs1/2 1 and BTmax  uI ds ≤ 64 2 ! ≥ 0.99. Hence, Lemma 31 shows that   1/2q . ψp = Ω u−1/2 = q O(q) n1/2q = q O(q) (TrAq ) 30
8cs.DS
Image Registration Techniques: A Survey 1 Sayan Nag* Department of Electrical Engineering Jadavpur University 1 Abstract— Image Registration is the process of aligning two or more images of the same scene with reference to a particular image. The images are captured from various sensors at different times and at multiple view-points. Thus to get a better picture of any change of a scene/object over a considerable period of time image registration is important. Image registration finds application in medical sciences, remote sensing and in computer vision. This paper presents a detailed review of several approaches which are classified accordingly along with their contributions and drawbacks. The main steps of an image registration procedure are also discussed. Different performance measures are presented that determine the registration quality and accuracy. The scope for the future research are presented as well. Keywords—Image registration, classification, contribution, drawback, performance measures, registration quality, accuracy, future research. I. INTRODUCTION Image Registration is interpreted as the process of overlaying two or more images of the same scene with respect to a particular reference image. The images may be taken at various circumstances (time-points), from various perspectives (view-points), and additionally by various sensors. The reference image is generally one of these captured images. It geometrically transforms different sets of data into a particular reference co-ordinate system. The discrepancies among these images are interposed owing to the disparate imaging conditions. Image acquisition devices underwent rapid modifications and proliferating amount and diversity of acquired images elicited the research on automatic image registration. In image analysis ventures, one of the most significant step is Image Registration. It is a necessary step to obtain the final information from a combination of a multitude of divergent sources capturing the same information in varied circumstances and diverse manners. Essentially the objective is to detect the concealed relationship existing between the input and the reference images which is usually indicated by a coordinate transformation matrix. Accordingly, an image registration can be essentially devised as an optimization problem. Image registration plays a crucial role in many real-world applications. Image registration finds applications in remote sensing [13] involving multispectral classification, environmental __________________________________________________ * Corresponding author mail id: [email protected] monitoring, change detection, image mosaicing, weather forecasting, creating super-resolution images and integrating information into geographic information systems (GIS), in medicine [4-8] including fusion of computer tomography (CT) and NMR data to obtain more complete information about the patient, multi-modal analysis of different diseases like epilepsy where the protocols incorporate functional EEG/MEG data along with anatomical MRI, monitoring tumor evolution, treatment verification, juxtaposition of the patient’s data with anatomical atlases, in cartography for map updating, and in computer vision for target localization, automatic quality control and motion tracking. According to the manner of image acquisition the application of Image Registration can be segregated into the following groups. 1. Multi-view Analysis: Images of the similar object or scene are captured from multiple viewpoints to gain a better representation of the scanned object or scene. Examples include mosaicing of images and shape recovery from the stereo. 2. Multi-temporal Analysis: Images of the same object/ scene are captured at various times usually under dissimilar conditions to notice changes in the object/ scene which emerged between the successive images acquisitions. Examples include motion tracking, tracking the growth of tumors. 3. Multi-modal Analysis: Different sensors are used to acquire the images of the same object/scene to merge the information obtained from various sources to obtain the minutiae of the object/scene. Examples include integration of information from sensors with disparate characteristics providing better spatial and spectral resolutions independent of illumination-this depends upon the robustness of the registration algorithm, combination of sensors capturing the anatomical information like magnetic resonance image (MRI), ultrasound or CT with sensors acquiring functional information like positron emission tomography (PET), single photon emission computed tomography (SPECT) or magnetic resonance spectroscopy (MRS) to study and analyze seizure disorders, Alzheimer’s disease, depression and other diseases. Figure 1 shows a MEG-MRI co-registration, an example of Multi-Modal Registration. Section 2 presents steps involved in Image registration, Section 3 contains classification criteria, Registration methods are presented in Section 4, Transform Model Estimation and Performance Analysis are discussed in Sections 5 and 6 respectively while Section 7 contains the conclusion. Fig. 1. Multimodal MRI-MEG Co-registration. Top-Yellow dots represent anatomical landmarks or fiducial points in the axial view of the brain image (anatomical information). Bottom- Pink dots represent the MEG sensors locations and the Green dots represent the scalp-EEG sensors locations. These MEG and EEG data contain the functional information and the bottom picture shows the coregistered brain image (sagittal view). II. STEPS INVOLVED IN IMAGE REGISTRATION An Image Registration task involves the following steps as follows: 1. Feature detection: This is an important task of the Image Registration process. The detection process can be manual or automatic depending upon the complexity though automatic detection of features is preferred. Closed-boundary regions [9-16], edges, contours [17-26], line intersections, corners [27] along with their point representatives like center of gravity or line endings (collectively known as Control Points) can serve as features. These features consisting of distinctive objects must be easily detectable, that is, the features will be physically interpretable and identifiable. The feature set of the reference image must be sharing sufficient common features with the non-aligned image(s) irrespective of any undesired occlusions or unexpected changes for proper registration. The algorithm for detection should be robust enough to be able to detect the same features in all projections of the scene without being affected by any specific image deformation or degradation. 2. Feature matching: This step essentially establishes the correspondence between the features detected in the non-aligned sensed image and those detected in the reference image [28-36]. Different feature descriptors and similarity measures besides spatial relationships among the features are adopted to set up an accurate accordance. The feature descriptors must so formulated such that they remain unchanged in spite of any degradations and concurrently they must be able to properly discriminate among diverse features while remaining unaffected by noise. 3. Transform model assessment: For alignment of the sensed image with the reference image the parameters of the mapping functions are to be estimated [37-43]. These parameters are computed with the established feature correspondence obtained from the previous step. The selectivity of a mapping function depends on a priori knowledge regarding the acquisition process and expected image deformations. In absence of any a priori information the flexibility of the model must be ensured to tackle image deformations. 4. Image transformation: The sensed image is transformed for alignment employing the mapping functions. The above mentioned image registration steps are generally followed. Figure 2 shows a pictorial representation of the steps involved in image registration. Though it is noteworthy to mention that it is difficult to fabricate a universal method applicable to all registration assignments the reason attributed to the diversity of images to be registered obtained from a miscellany of sources and the several types of degradations introduced in the images. Besides geometric deformation between the images, the radiometric deformations and noise corruptions should be taken into account for proper registration of images. Fig. 2. Steps Involved in Image Registration Fig. 3. Steps Involved in Image Registration. Top Left- Reference Image. Top Right- Non-Aligned Image. Bottom- Aligned Image. Yellow dots represent the extracted features and there are enough common features in both the images. A mapping function is established which gives the bottom image as the final output. III. CLASSIFICATION CRITERIA OF IMAGE REGISTRATION TECHNIQUES Image registration techniques can be classified based on some criteria [44-45]. These are as follows: 1. Dimensionality: This specifies the dimensions of different possible registrations. It may be 2D-2D, 2D3D or 3D-3D based on the requirement. 2. Domain of transformation: It may be global when the entire image is to be registered or it may be local when a portion of the image is taken into consideration for registration purpose. 3. Type of transformation: It may be rigid (translation, rotation, reflection), affine (translation, rotation, scaling, reflection, shearing), projective or non-linear. 4. Registration Quality: Depending on the data or the features extracted several measures can be adopted and applied. 5. Parameters of Registration: These are obtained employing search oriented methods. The optimum parameters found from a search method (e.g., a heuristic search method) determines the quality of transformation and hence the registration. 6. Subject of Registration: Same subject is considered for intra-subject registration. If the subjects are different then it is known as inter-subject registration. 7. Object of Registration: Different objects include head, abdomen, thorax, knee, etc. 8. Nature of Registration basis: It may be extrinsic (based on foreign objects which are easily detectable, e.g., markers glued to skin), intrinsic (based on image information) or non-image based (where imaging coordinates of the two devices are matched). 9. Interaction: It may be interactive, semi-automatic or entirely automatic. 10. Modalities involved: It may be mono-modal (which is also termed as intra-modal) using modalities like Computed Tomography (CT), Magnetic Resonance Imaging (MRI), Positron Emission Tomography (PET), Single Photon Emission Computed Tomography (SPECT), Ultra Sound (US), or Xray or Digital Subtraction Angiography (DSA) or multimodal (which is also known as inter-modal image) employing two or more modalities mentioned above. IV. METHODS OF IMAGE REGISTRATION Various methods of Image Registration are as follows. 1. Extrinsic Methods In this method artificial foreign objects which are easily detectable are attached to the patient body [46-53]. They serve as external features to be used for feature matching. The complexity is lessened and hence computational is fast and accuracy is also maintained. Examples are markers glued to patient’s skin or stereo-tactic frame attached rigidly to the patient’s outer skull for invasive neurosurgery related purposes. 2. Surface Methods Surfaces or boundaries or contours are generally distinct in medical images unlike landmarks. For example, surface-based approach is employed for registering multimodality brain image. These surface matching algorithms are generally applied to rigid body registration. A collection of points, generally called a point set is extracted from the contours in an image. If two surfaces are considered for registration then there will be two such sets. The surface covering the larger volume of the patient, or that having a higher resolution if volume coverage is comparable, is generally considered for generation of the surface model. Iterative Closest Point Algorithm and Correspondence Matching Algorithm are successfully applied as registration algorithms for surface-based techniques [54-63]. Meta-heuristics and Evolutionary Optimization are also seen to solve these high dimensional optimization problems of surface registrations. 3. Moments and Principle Axes Methods The orthogonal axes about which the moments of inertia are minimized are known as the principle axes. Two identical objects can be registered accurately by bringing their principal axes into concurrence without employing any rigid/affine transformations. If the objects are not identical but similar in appearance then they can be approximately registered by this technique [16, 64]. For moment based methods presegmentation is done in many cases to engender satisfactory outcomes. 4. Correlation Based Methods This method is essentially useful for registration of monomodal images and for comparison of several images of the similar object [65]. It has immense usage in the field of medical sciences for analyzing and treatment of disease. Extracted features from the images are also used to obtain the cross-correlation coefficients for image registration. [66-69]. Cross-correlation and Phase-correlation techniques based on Fourier domain are also used for image registration. Successful yet complex ventures have been significantly made using subspace-based frequency estimation approach for the Fourier based image registration problem employing multiple signal classification algorithm (MUSIC) to proliferate robustness eventually yielding accurate results [70]. Normalized mutual information between the images have been used for image registration purposes adopting an Entropy Correlation Coefficient (ECC) [71]. Fourier-based techniques accompanied by search algorithms have been exploited to evaluate the transformation between two input images [72]. 5. Mutual Information Based Methods In mutual information-based registration methods the joint probability of the intensities of comparable voxels in the images under consideration are estimated. Mutual information based measures are utilized to aid Voxel-based Registration. Mutual information can be fruitfully utilized for establishing the correspondence between the features of the reference and the sensed images as mentioned in the step of featurematching. Correlation methods have proved inefficient for multi-modal registration. But, the mutual information based methods do not suffer from such a problem, rather they are found to perform effectively in multi-modal registration tasks. Gradient descent optimization methods have been employed to maximize mutual information [73]. Window and pyramid based approaches are used to achieve image registration using mutual information [74]. Other methods used include hierarchical search strategies along with simulated annealing [35] and the Powell’s multi-dimensional direction set method [66]. Recently various optimization methods and multiresolution strategies are adopted for mutual information maximization. 6. Wavelet Based Methods Wavelet Transform was introduced to get an idea of the time instant at which a particular frequency exists. The width of the window is altered as the transform is computed for each spectral component- the most important characteristic of the multi-resolution wavelet transform. It offers both time and frequency selectivity, that is, it is able to localize properties in both temporal and frequency domains. The wavelet-based image registration can be effectively. After choosing several wavelet coefficients by selection rules like the maximum absolute wavelet coefficient in the multi-spectral image and the high-resolution image for individual band the partial wavelet coefficients of the high-resolution image are replaced with those of the multi-spectral low-resolution image. The pyramidal approaches also use wavelet decomposition owing to its intrinsic multiresolution properties. Different types of wavelets like the Haar, Symlet, Daubechies [75] and Coiflets are applied for finding the correspondence with different sets of wavelet coefficients. Wavelet-based feature extraction techniques along with normalized cross-correlation matching and relaxation-based image matching techniques are used thereby incorporating sufficient control points to reduce the local degradations, for image registration [76]. 7. Soft Computing Based Methods These methods are comparatively recent and advanced and are successfully applied to image registration tasks. They include Artificial Neural Networks, Fuzzy Sets and several Optimization Heuristics. a) Artificial Neural Networks: An artificial neural network (ANN) is a computational model which is formulated based on biological neural networks. It is also known as Multi-Layer Perceptron (MLP) since it contains a number of hidden layers. These layers consist of an interconnected group of artificial neurons an information is passed on from one layer to the next layer. Artificial Neural Networks or simply Neural Networks learns adaptively in the learning phase when information flows through the network and updates the neuron-links accordingly by assigning various weights to them. Neural Networks can be viewed upon as non-linear statistical data modeling tools employed to model complex relationships between inputs and outputs or to recognize patterns in data, also called Pattern Recognition. There are two types of schemes: (1) feed-forward networks, where the links are devoid of any loop (e.g., multilayer perceptron (MLP) and radial basis function neural networks (RBF) and (2) recurrent networks which include loops (e.g., selforganizing maps (SOM) and Hopfield Neural Networks). A priori information about the output is an essential requirement for training feed forward networks, on the other hand, recurrent neural networks generally do not require any such previous knowledge regarding the expected output. The rigorous training process in an ANN modifies and adaptively updates the network architecture abreast the connection weights or link weights to be able to learn complex non-linear input-output relationships thereby parlaying the robustness and efficacy of performance. Multilayer Perceptron, Radial basis functions, self-organizing maps and Hopfield networks have been utilized for different computational and optimization aspects and for designing registration matrices in Image Registration problems [77]. Neural Networks have also been used for solving monomodal and multi-modal medical image registration problems [78]. b) Fuzzy Sets: A fuzzy set is a collection of elements having a continuous sequence of membership grades or degrees. Fuzzy sets was introduced by L. A. Zadeh in 1965. Fuzzy sets follow the properties of inclusion, union, complement, intersection, etc. In classical set theory, the membership values of elements in a set are decided in binary terms depending upon whether an element belongs or does not belong to the set. In contrast, fuzzy set theory allows the grading of the membership of elements in a fuzzy set as decided with the assistance of a membership function which assigns values residing in the interval [0, 1]. Fuzzy Sets manifest the perception of partial membership of an element within the set- this permits Fuzzy sets to tackle uncertainty and inaccuracies. Fuzzy Sets have been explicitly applied to Image registration techniques [79-80]. It has also been utilized to choose and pre-process the extracted features to be registered. Fuzzy logic is used to enhance the precision in the transformation parameters as estimated approximately previously eventually leading to accurate registration estimates [81]. Optimization Heuristics: Optimization problems applied in several domains of Engineering Design and Optimization have some mathematical models and objective functions. They may be unconstrained (without constraints) or constrained (with constraints) having both continuous as well as discrete variables. The task of finding the optimal solutions is difficult with numerous curtailments being active at the points of global optima. Traditional methods including Gradient Descent, Dynamic Programming and Newton Methods are computationally less efficient, whereas provide feasible solutions in a stipulated time. The list of metaheuristics include Genetic Algorithm (GA) [82], Particle Swarm Optimization (PSO) [83], Gravitational Search Algorithm (GSA) [84], Ant Colony Optimization (ACO) [85-86], Stimulated Annealing (SA) [87-88], and Plant Propagation Algorithm (PPA) [89-90] and so on. GA is a relatively old, approximate search technique used in computing. These global search heuristics form an important class of evolutionary algorithms that mimics evolutionary biological processes such as mutation, selection, and crossover and abandonment. Likewise, Particle Swarm Optimization and Differential Evolution along with their existing variants are relatively advanced heuristics than can efficiently solve Optimization problems. These optimization heuristics are applied to image registration problems for finding the optimal parameters necessary for designing a transformation model [91]. V. TRANSFORM MODEL ESTIMATION A transformation is expounded as the process of mapping a set of points to various other locations. The objective is to design a proper transformation model which transforms the sensed image with respect to the original image with maximum accuracy. The transformations that may be performed are translation, rotation, scaling, shearing and reflection. These are collectively known as affine transformation. Also there are projective and non-linear transformations as well. 1. Translation Let a point x is to be translated by t units, then the matrix representation of this transformation is given as: (1) where, y1, y2 = new point, x1, x2 = old point, t1, t2 = translation value. 2. Rotation A point with co-ordinate P1(x1, x2) on a 2-D plane is rotated by an angle θ with respect to origin then the relationship between the final point P2(y1, y2) and the initial point is given as: (2) c) where, y1, y2 = new point, x1, x2 = old point, θ = rotational parameter. 3. Scaling Scaling is required to resize an image, or to work with images whose voxel sizes differ between images. It is represented as: (3) where, y1, y2 = new point, x1, x2 = old point, s1, s2 = scaling parameters. 4. Shearing In shearing the parallel lines are only preserved. It may be represented as: (4) where, y1, y2 = new point, x1, x2 = old point, a11, a12, a13, a21, a22, a23, = shearing parameters. Fig. 4. shows an example of shearing transformation. selection of similarity measures depends on modality of images to be registered. Correlation based metrics like Correlation Coefficient is applicable to mono-modal registration and Mutual Information is utilized for multi-modal image registration purposes. a) Correlation Coefficient (CC): CC is essentially a similarity measure which gives an idea of how well the reference and transformed images are identical [32-34]. If two images are perfectly identical, CC gives a value equal to 1, whereas, if the two images are completely uncorrelated CC value is equal to 0 and CC value equal to -1 indicates that the images are completely anti-correlated, which means one image is the negative of the other. It gives satisfactory results with mono-modal registration. It is represented as: (5) where xi , yi = intensity of ith pixel in the reference and sensed image respectively, and xm , ym = mean intensity of reference and sensed image respectively. b) Mutual Information (MI): MI is yet another measure determining the degree of similarity measured between the image intensities of corresponding voxels in both images [35-36]. MI is maximized when both the images are accurately aligned. The values of MI are non-negative and symmetric. The range of MI values starts from zero and can vary up to a high value. High MI value depicts large reduction in uncertainty whereas zero MI value is clear indication that the two variables are independent. It is represented as: (6) where p(x, y) = joint distribution function and p1(x) , p2(y) = marginal distribution functions. Fig. 4. Example of Affine Transformations (Translation, Rotation, Scaling and Shearing) VI. PERFORMANCE ANALYSIS It is required to estimate how accurate the registration actually is. Also to qualitatively analyze the performance of the algorithms some metrics are used. They also serve as the basis for improvement in the registration in each iteration. The Fig. 5. Example of Multi-modal Image registration using Mutual Information as similarity measure. Top Left- Reference MRI brain image (axial view), Top Right- Non- Aligned PET brain image (axial view), Bottom- Transformed PET brain image (axial view). VII. CONCLUSION This paper tries to present a survey of the registration methods along with the detailed classifications among various approaches. Image registration is an essential step for integrating or fusing and analyzing information from various sensors (sources). It has immense applications in fields of medical sciences, computer vision and remote sensing. Image registrations with complex nonlinear distortions, multi-modal registration and registrations of occluded images despite being affected by illumination factors among others thus contributing to the robustness of the approaches belong to the most challenging tasks at the present scenario. Generation of features or control points and the mapping or transformation functions are essential steps and a lot of research work needs to be done to enhance the accuracy. In multimodal registration, MI technique has gained popularity in particular whereas for mono-modal images correlation based similarity metrics are preferred. Robustness and Reliability can be proliferated by hybrid approaches combining MI based techniques with feature-based measures. Several soft computing methods including the optimization heuristics are applied to find the optimum parameters mostly in case of affine transformations based registration. No gold standard algorithms or approaches can be developed for image registration purposes because of the dependency on the images under consideration. Thus, despite a lot of work has been done, automatic image registration is still considered as an open problem. The future works will be introducing new feature-based methods, where apt modality-insensitive features can provide robust as well as accurate outcomes for the registration. ACKNOWLEDGMENT I would like to extend my sincere gratitude to Professor Sugata Munshi, Professor Amitava Chatterjee and Professor Mita Dutta for their support and guidance. [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] REFERENCES [1] [2] [3] [4] [5] L.M.G. Fonseca, B.S. Manjunath, Registration techniques for multisensor remotely sensed imagery, Photogrammetric Engineering and Remote Sensing 62 (1996) 1049–1056.J. Clerk Maxwell, A Treatise on Electricity and Magnetism, 3rd ed., vol. 2. Oxford: Clarendon, 1892, pp.68–73. E. Gu¨lch, Results of test on image matching of ISPRS WG, ISPRS Journal of Photogrammetry and Remote Sensing 46 (1991) 1–18 J. le Moigne, First evaluation of automatic image registration methods, Proceedings of the International Geoscience and Remote Sensing Symposium IGARSS’98, Seattle, Washington, 1998, pp. 315–317. D.L.G. Hill, P.G. Batchelor, M. Holden, D.J. Hawkes, Medical image registration, Physics in Medicine and Biology 46 (2001) R1–R45. H. Lester, S.R. Arridge, A survey of hierarchical non-linear medical image registration, Pattern Recognition 32 (1999) 129– 149. [18] [19] [20] [21] [22] P.A. van den Elsen, E.-J.D. Pol, M.A. Viergever, Medical image matching-a review with classification, IEEE Engineering in Medicine and Biology 12 (1993) 26–39. J.B.A. Maintz, M.A. Viergever, A survey of medical image registration, Medical Image Analysis 2 (1998) 1–36. Damas, Sergio, Oscar Cordón, and Jose Santamaría. "Medical image registration using evolutionary computation: An experimental survey." IEEE Computational Intelligence Magazine 6.4 (2011): 26-42. A. Goshtasby, G.C. Stockman, C.V. Page, A region-based approach to digital image registration with subpixel accuracy, IEEE Transactions on Geoscience and Remote Sensing 24 (1986) 390–399 A. Goshtasby, G.C. Stockman, Point pattern matching using convex hull edges, IEEE Transactions on Systems, Man and Cybernetics 15 (1985) 631–637. Y.C. Hsieh, D.M. McKeown, F.P. Perlant, Performance evaluation of scene registration and stereo matching for cartographic feature extraction, IEEE Transactions on Pattern Analysis and Machine Intelligence 14 (1992) 214–237 M. Holm, Towards automatic rectification of satellite images using feature based matching, Proceedings of the International Geoscience and Remote Sensing Symposium IGARSS’91, Espoo, Finland, 1991, pp. 2439–2442 P.A. Brivio, A.D. Ventura, A. Rampini, R. Schettini, Automatic selection of control points from shadow structures, International Journal of Remote Sensing 13 (1992) 1853–1860. M. Sester, H. Hild, D. Fritsch, Definition of ground control features for image registration using GIS data, Proceedings of the Symposium on Object Recognition and Scene Classification from Multispectral and Multisensor Pixels, CD-ROM, Columbus, Ohio, 1998, 7 pp M. Roux, Automatic registration of SPOT images and digitized maps, Proceedings of the IEEE International Conference on Image Processing ICIP’96, Lausanne, Switzerland, 1996, pp. 625–628 J. Flusser, T. Suk, A moment-based approach to registration of images with affine geometric distortion, IEEE Transactions on Geoscience and Remote Sensing 32 (1994) 382–387. Y.C. Hsieh, D.M. McKeown, F.P. Perlant, Performance evaluation of scene registration and stereo matching for cartographic feature extraction, IEEE Transactions on Pattern Analysis and Machine Intelligence 14 (1992) 214–237. S. Moss, E.R. Hancock, Multiple line-template matching with EM algorithm, Pattern Recognition Letters 18 (1997) 1283– 1292 W.H. Wang, Y.C. Chen, Image registration by control points pairing using the invariant properties of line segments, Pattern Recognition Letters 18 (1997) 269–281. X. Dai, S. Khorram, Development of a feature-based approach to automated image registration for multitemporal and multisensor remotely sensed imagery, International Geoscience and Remote Sensing Symposium IGARSS’97, Singapore, 1997, pp. 243–245. V. Govindu, C. Shekhar, R. Chellapa, Using geometric properties for correspondence-less image alignment, Proceedings of the International Conference on Pattern Recognition ICPR’98, Brisbane, Australia, 1998, pp. 37–41. G.P. Penney, J. Weese, J.A. Little, P. Desmedt, D.L.G. Hill, D.J. Hawkes, A comparison of similarity measures for use in 2D–3D [23] [24] [25] [26] [27] [28] [29] [30] [31] [32] [33] [34] [35] [36] [37] [38] [39] [40] medical image registration, IEEE Transactions on Medical Imaging 17 (1998) 586–595. G. Medioni, R. Nevatia, Matching images using linear features, IEEE Transactions on Pattern Analysis and Machine Intellingence 6 (1984) 675–685. D. Shin, J.K. Pollard, J.P. Muller, Accurate geometric correction of ATSR images, IEEE Transactions on Geoscience and Remote Sensing 35 (1997) 997–1006 S.Z. Li, J. Kittler, M. Petrou, Matching and recognition of road networks from aerial images, Proceedings of the Second European Conference on Computer Vision ECCV’92, St Margherita, Italy, 1992, pp. 857–861 N. Vujovic, D. Brzakovic, Establishing the correspondence between control points in pairs of mammographic images, IEEE Transactions on Image Processing 6 (1997) 1388–1399. A. Noble, Finding corners, Image and Vision Computing 6 (1988) 121–128. R.J. Althof, M.G.J. Wind, J.T. Dobbins, A rapid and automatic image registration algorithm with subpixel accuracy, IEEE Transactions on Medical Imaging 16 (1997) 308–316. D.I. Barnea, H.F. Silverman, A class of algorithms for fast digital image registration, IEEE Transactions on Computing 21 (1972) 179–186. W.K. Pratt, Correlation techniques of image registration, IEEE Transactions on Aerospace and Electronic Systems 10 (1974) 353–358. H. Hanaizumi, S. Fujimura, An automated method for registration of satellite remote sensing images, Proceedings of the International Geoscience and Remote Sensing Symposium IGARSS’93, Tokyo, Japan, 1993, pp. 1348–1350 R. Berthilsson, Affine correlation. Proceedings of the International Conference on Pattern Recognition ICPR’98, Brisbane, Australia, 1998, p. 1458–1461. A. Simper, Correcting general band-to-band misregistrations, Proceedings of the IEEE International Conference on Image Processing ICIP’96, Lausanne, Switzerland, 1996, 2, pp. 597– 600 W.K. Pratt, Digital Image Processing, 2nd ed., Wiley, New York, 1991. N. Ritter, R. Owens, J. Cooper, R.H. Eikelboom, P.P. van Saarloos, Registration of stereo and temporal images of the retina, IEEE Transactions on Medical Imaging 18 (1999) 404– 418. C. Studholme, D.L.G. Hill, D.J. Hawkes, An overlap invariant entropy measure of 3D medical image alignment, Pattern Recognition 32 (1999) 71–86. J.M. Fitzpatrik, J.B. West, The distribution of target registration error in rigid-body point-based registration, IEEE Transactions on Medical Imaging 20 (2001) 917–927 J. Flusser, An adaptive method for image registration, Pattern Recognition 25 (1992) 45–54. R.B. Huseby, O.M. Halck, R. Solberg, A model-based approach for geometrical correction of optical satellite images, Proceedings of the International Geoscience Remote Sensing Symposium IGARSS’99, Hamburg, Germany, 1999, pp. 330– 332. O. Thepaut, K. Kpalma, J. Ronsin, Automatic registration of ERS and SPOT multisensor images in a data fusion context, Forest Ecology and Management 128 (2000) 93–100. [41] A. Goshtasby, Piecewise linear mapping functions for image registration, Pattern Recognition 19 (1986) 459–466. [42] A. Goshtasby, Piecewise cubic mapping functions for image [43] [44] [45] [46] [47] [48] [49] [50] [51] [52] [53] [54] [55] [56] registration, Pattern Recognition 20 (1987) 525–533. A. Goshtasby, Image registration by local approximation methods, Image and Vision Computing 6 (1988) 255–261. P. A. Van Den Elsen, E. J. D. Pol and M. A. Viergever, “Medical image matching: a review with classification”, IEEE Engineering in medicine and biology, 12(1):1993,26-39 J. B. Antoine Maintz and Max A. Viergever, “A Survey of Medical Image Registration”, Medical Image Analysis (1998) Volume2, number 1, pp 1-36, Oxford University Press L. Lemieux, N. D. Kitchen, S. W. Hughes and D. G. T. Thomas, “Voxel-based localization in frame-based and frameless stereotaxy and its accuracy”. Medical physics, 21(8):1301–1310, 1994. L. Lemieux and R. Jagoe, “Effect of fiducial marker localization on stereotactic target coordinate calculation in CT slices and radiographs” Physics in medicine and biology, 39:1915–1928, 1994. K. P. Gall and L. J. Verhey, “Computer-assisted positioning of radiotherapy patients using implanted radioopaque fiducials”, Medical physics, 1993, 1152–1159 C. R. Maurer, G. B. Aboutanos, B. M. Dawant, R. A. Margolin, R. J. Maciunas and J. M. Fitzpatrick., “Registration of CT and MR brain images using a combination of points and surfaces”, Medical imaging: image processing, volume 2434, Bellingham, WA, 1995. SPIE Press, 109-123 R. E. Ellis, S. Toksvig-Larsen, M. Marcacci, D. Caramella, and M. Fadda., “A biocompatible fiducial marker for evaluating the accuracy of CT image registration”, Computer assisted radiology, volume 1124 of Excerpta medica - international congress series, Amsterdam, 1996,693-698 C. R. Maurer, R. Calvin, J. J. McCrory, and J. M. Fitzpatrick, “Estimation of accuracy in localizing externally attached markers in multimodal volume head images”, In M. H. Loew, editor, Medical imaging: image International Journal of Signal Processing, Image Processing and Pattern Recognition Vol. 2, No.3, September 2009 22 processing, volume 1898, 1993, SPIE Press, 43-54 A. C. Evans, S. Marrett, J. Torrescorzo, S. Ku, and L.Collins, “MRI-PET correlation in three dimensions using a volume of interest (VOI) atlas”, Journal of cerebral blood flow and metabolism , 11, A69–A78, 1991 W. D. Leslie, A. Borys, D. McDonald, J. O. Dupont and A. E. Peterdy, “External reference markers for the correction of head rotation in brain single-photon emission tomography”, European journal of nuclear medicine, 22(4):351–355, 1995. C. Dorai, G. Wang, A.K. Jain, C. Mercer, “Registration and integration of multiple object views for 3D model construction”, IEEE Trans. Pattern Anal. Machine Intelligence. 20 (1),(1998), 83–89. T. Masuda, K. Sakaue, N. Yokoya, “Registration and integration of multiple range images for 3-D model construction”, Proceedings of the 13th International Conference on Pattern Recognition, Vol. 1, 1996, 879–883. P.J. Besl, N.D. McKay, “A method for registration of 3-D shapes”, IEEE Trans. Pattern Analysis Machine Intelligence 14 (2) (1992), 239–256. [57] G. Blais, M.D. Levine, “Registering multiview range data to [74] P. Thevenaz, M. Unser, Spline pyramids for inter-modal image create 3D computer objects”, IEEE Trans. Pattern Analysis and .Machine Intelligence 17 (8) (1995) 820–824. T. Masuda, N. Yokoya, “A robust method for registration and segmentation of multiple range images”, Proceedings of the Second Workshop on CAD-Based Vision, 1994, 106–113. S.M. Yamany, A.A. Farag, “Free-form surface registration using surface signatures” Proceedings of the Seventh IEEE International Conference on Computer Vision, Vol. 2, 1999, 1098–1104. C. Schutz, T. Jost, H. Hugli, “Multi-feature matching algorithm for free-form 3D surface registration”, Proceedings of the 14th International Conference on Pattern Recognition, Vol. 2, 1998, 982–984. A.E. Johnson, M. Hebert, “Surface registration by matching oriented points”, Proceedings of the International Conference on Recent Advances in 3-D Digital Imaging and Modeling, 1997, 121–128. W.R. Fright, A.D. Linney, “Registration of3-D head surfaces using multiple landmarks”, IEEE Trans. on Medical Imaging 12 (3) (1993), 515–520. Chi Kin Chow, Hung Tat Tsui, Tong Lee, “Surface registration using a dynamic genetic algorithm”, Pattern Recognition 37, (2004), 105-117 J. Flusser, T. Suk, “Pattern recognition by affine moment invariants”, Pattern Recognition 26, (1993), 167– 174 B.K. Ghaffary, A.A. Sawchuk, “A survey of new techniques for image registration and mapping”, Proceedings of the SPIE: Applications of Digital Image Processing 432 (1983) 222–239. F. Maes, A. Collignon, D. Vandermeulen, G. Marchal, and Suetens, “Multimodality image registration by maximization of mutual information,” IEEE Transactions on Medical Imaging, vol. 16, no. 2, (1997), 187–198 S. Sanjay-Gopal, H. P. Chan, T. Wilson, M. Helvie, N. Petrick and B. Sahiner, “A regional registration technique for automated interval change analysis of breast lesions on mammograms,” Medical Physics, vol. 26, no. 12, (1999), 2669–2679 L. Junck, J. G. Moen, G. D. Hutchins, M. B. Brown, and D. E. Kuhl, “Correlation methods for the centering, rotation, and alignment of functional brain images”, Journal of nuclear medicine, 31,(1990), 1220–1276 S. L. Bacharach, M. A. Douglas, R. E. Carson, P. J. Kalkowski, N. M. T. Freedman, P. Perrone-Filardi and R.O.Bonow, “Threedimensional registration of cardiac positron emission tomography attenuation scans”, Journal of nuclear medicine, 34(2), (1993), 311–321 Min Xu Varshney P.K. ,“ A Subspace Method for Fourier-Based Image Registration”, Geoscience and Remote Sensing Letters, IEEE 33, Volume 6, Issue 3 (July 2009) , 491-494 F. Maes, A. Collignon, D. Vandermeulen, G. Marchal, and Suetens, “Multimodality image registration by maximization of mutual information,” IEEE Transactions on Medical Imaging, vol. 16, no. 2, (1997), 187–198 Samritjiarapon O. Chitsobhuk O. , “An FFT-Based Technique and Best-first Search for Image Registration”, International Symposium on Communications and Information Technologies, ISCIT 2008. P.Viola, W.M. Wells, “Alignment by maximization of mutual information”, International Journal of Computer Vision 24, (1997), 137–154. registration using mutual information, Proceedings of SPIE: Wavelet Applications in Signal and Image Processing, San Diego, CA, (1997), 236– 247. J. le Moigne, “Parallel registration of multi-sensor remotely sensed imagery using wavelet coefficients”, Proceedings of the SPIE: Wavelet Applications, Orlando, Florida, 2242, (1994), 432–443 Gang Hong Yun hang , “Combination of feature-based and areabased image registration technique for high resolution remote sensing image”, IEEE international symposium on Geoscience and remote sensing, IGARSS 2007 (July 2007), 377-380 ]Heng Liua,, Jingqi Yan,, David Zhang, “Three-dimensional surface registration: A neural network strategy” Neurocomputing 70, (2006), 597–602 ]Lifeng Shang, Jian Cheng Lv, Zhang Yi, “Rigid medical image registration using PCA neural network”, Neurocomputing 69 (2006), 1717–1722 G. Berks, A. Ghassemi, and D. G. von Keyserlingk, "Spatial registration of digital brain atlases based on fuzzy set theory," Comput. Med. Imaging Graph., vol. 25, (Jan. 2001), 1-10 Y. Hata, S. Kobashi, S. Hirano, and M. Ishikawa, "Registration of multi-modality medical images by soft computing approach," in Proc. ICONIP' 99, (1999), 878-883. Ramirez L. Durdle N.G. Raso V.J. “A Parameters Selection Scheme for Medical Image Registration”, Fuzzy Information Processing Society, 2006. NAFIPS 2006. Annual meeting of the North American ,(June2006), 505-510 S.-J. Wu and P.-T. Chow, Genetic algorithms for nonlinear mixed discrete-integer optimization problems via meta-genetic parameter optimization, Engineering Optimization, vol. 24, no. 2, pp. 137–159, 1995. [27] R. Eberhart and J. Kennedy, A new optimizer using particle swarm theory, in Proceedings of the 6th International Symposium on Micro Machine and Human Science (MHS ’95), pp. 39– 43, IEEE, Nagoya, Japan, October 1995. [28] Rashedi, E., Nezamabadi-pour, H., Saryazdi, S., GSA: A Gravitational Search Algorithm 179(13), 2232–2248 (2009). [29] M. Dorigo and G. D. Caro, Ant algorithms for discrete optimization, Artificial Life, vol. 5, no. 3, (1999), pp. 137-172. [30] M. Dorigo and L. M. Gambardella, Ant colony system: a cooperative learning approach to the traveling salesman problem, IEEE Transactions on Evolutionary Computation, vol. 1, no. 1, (1997), pp. 53-66. C. Zhang and H.-P. Wang, Mixed-discrete nonlinear optimization with simulated annealing, Engineering Optimization, vol. 21, no. 4, pp. 277–291, 1993. E. H. L. Aarts, J. H. M. Korst, and P. J. M. van Laarhoven, Simulated annealing, in Local Search in Combinatorial Optimization, pp. 91–120, 1997. Nag S. Adaptive Plant Propagation Algorithm for Solving Economic Load Dispatch Problem. arXiv preprint arXiv:1708.07040. 2017 Aug 4. Nag S. A Type II Fuzzy Entropy Based Multi-Level Image Thresholding Using Adaptive Plant Propagation Algorithm. arXiv preprint arXiv:1708.09461. 2017 Aug 23. J.M. Rouet, J.J. Jacq, and C. Roux, "Genetic algorithms for a robust 3-D MR-CT registration," IEEE Trans. Inform. Technol. Biomed., vol. 4, (Jun. 2000), 126-136 [58] [59] [60] [61] [62] [63] [64] [65] [66] [67] [68] [69] [70] [71] [72] [73] [75] [76] [77] [78] [79] [80] [81] [82] [83] [84] [85] [86] [87] [88] [89] [90] [91]
1cs.CV
Unique Parallel Decomposition for the π -calculus ∗ Matias David Lee Univ. Lyon, ENS de Lyon, CNRS, UCB Lyon 1, LIP, France. [email protected] Bas Luttik Eindhoven University of Technology, The Netherlands. [email protected] A (fragment of a) process algebra satisfies unique parallel decomposition if the definable behaviours admit a unique decomposition into indecomposable parallel components. In this paper we prove that finite processes of the π -calculus, i.e. processes that perform no infinite executions, satisfy this property modulo strong bisimilarity and weak bisimilarity. Our results are obtained by an application of a general technique for establishing unique parallel decomposition using decomposition orders. 1 Introduction A (fragment of a) process algebra has unique parallel decomposition (UPD) if all definable behaviours admit a unique decomposition into indecomposable parallel components. In this paper we prove that finite processes definable in the π -calculus satisfy this property modulo strong bisimilarity and modulo weak bisimilarity. From a theoretical point of view, this property is interesting because it can be used to prove other theoretical properties about process calculi. For instance, relying on unique parallel decomposition, Moller proves in [18, 19] that PA and CCS cannot be finitely axiomatized without auxiliary operations, and Hirshfeld and Jerrum prove in [12] that bisimilarity is decidable for normed PA. Unique parallel decomposition can be also used to define a notion of normal form. Such a notion of normal form is useful in completeness proofs for equational axiomatizations in settings in which an elimination theorem for parallel composition is lacking (see, e.g., [1, 2, 3, 9, 11]). In [13], UPD is used to prove complete axiomatisation and decidability results in the context of a higher-order process calculus. From a practical point of view, unique parallel decomposition can be used to devise methods for finding the maximally parallel implementation of a behaviour [6], or for improving verification methods [10]. In [8], a unique parallel decomposition result is used as a tool in the comparison of different security notions in the context of electronic voting. The UPD property has been widely studied for different process calculi and variants of the parallel operator. Milner and Moller were the first to establish a unique parallel decomposition theorem; they proved the property for a simple process calculus that allows the specification of all finite behaviours up to strong bisimilarity and includes parallel composition in the form of pure interleaving without interaction between its components [16]. Moller, in his dissertation [17], extended this result replacing interleaving parallel composition by CCS parallel composition, and then also considering weak bisimilarity. Christensen, also in his dissertation [5], proved unique decomposition for normed behaviours recursively definable modulo strong bisimilarity, and for all behaviours recursively definable modulo ∗ M.D. Lee has been supported by the project ANR 12IS02001 PACE D. Gebler and K. Peters (Eds.): Combined Workshop on Expressiveness in Concurrency and Structural Operational Semantics (EXPRESS/SOS 2016). EPTCS 222, 2016, pp. 45–59, doi:10.4204/EPTCS.222.4 46 Unique Parallel Decomposition for the π-calculus distributed bisimilarity; the proof of the latter result relies on a cancellation law for parallel composition up to distributed bisimilarity, first established by Castellani as [4, Lemma 4.14]. Most of the aforementioned unique parallel decomposition results were established with subsequent refinements of an ingenious proof technique attributed to Milner. In [15], the notion of decomposition order is introduced in order to formulate a sufficient condition on commutative monoids that facilitates an abstract version of Milner’s proof technique. It is then proved that if a partial commutative monoid can be endowed with a decomposition order, then it has unique decomposition. Thus, an algebraic tool is obtained that allows one to prove UPD for a process calculus by finding a decomposition order. The tool can deal with most of the settings aforementioned. In this paper, we show how the tool can also be applied to obtain unique parallel decomposition results for finite processes of the π -calculus w.r.t. strong bisimilarity and w.r.t. weak bisimilarity. But, to this end, we do face two complications: The first complication, in the context of the π -calculus is that, as opposed to previous settings, the decomposition order is not directly induced on the commutative monoid of processes by the transition relation. The culprit is that, in general, two parallel components may fuse into a single indecomposable process as a result of scope extrusion. To define the decomposition order we consider a fragment of the transition relation that avoids this phenomenon. The second complication, which arises only in the case of weak bisimilarity, is that certain transitions are deemed unobservable, and that, as a consequence, there are transitions that do not change state (are between weakly bisimilar processes). We demonstrate that a decomposition order can, nevertheless, be obtained by ignoring such stuttering transitions. The paper [7] studies unique parallel decomposition w.r.t. both strong bisimilarity and weak bisimilarity for the applied π -calculus. The applied π -calculus is a variant of the π -calculus that was designed for the verification of cryptographic protocols. Its main feature is that channels can only transmit variables and the values of the variables are set using active substitutions. Roughly, active substitution is an extension of the grammar of the π -calculus that works as a ‘memory’ that save the value of a variable. Because the variables in a transition are observable but the ‘memories’ are not, it is possible to mask sensitive information. The proof of the result for the strong case in [7] relies on induction over the norm of a process and the fact that the norm of the arguments of a parallel composition is less than the norm of the parallel composition. Unfortunately, this property is not true because of the restriction operator (see Section 4 for a counter example). This is the reason why we restrict ourselves to finite processes in the strong setting. The proof of the weak case in [7] follows the proof technique attributed to Milner. The general techniques from [15] cannot be applied directly in the setting of the applied π -calculus due to the active substitutions. In [14], the second author presented an adaptation of the general result of [15] in order to make it suitable for establishing unique parallel decomposition in settings with a notion of unobservable behaviour. The ensued technique amounts to showing that the transition relation induces a so-called weak decomposition order satisfying a property that is called power cancellation. In the present paper, we show how, instead of using the adapted technique from [14], the original technique from [15] may be applied in settings with a notion of unobservable behaviour, considering a stutter-free fragment of the transition relation. This method appears to be simpler than the method suggested by the result in [14]. The paper is organized as follows. In Section 2, we briefly recall the abstract framework introduced in [15] to prove UPD results. In Section 3 we recall the syntax and different semantics of the π -calculus. Section 4 is composed of two subsections. In Section 4.1 we introduce the notion of depth of a process and we prove some properties of this notion. In Section 4.2 we use these results and the result in Section 2 to prove that finite processes of the π -calculus satisfy unique parallel decomposition w.r.t. strong bisimilarity. Section 5 follows a similar structure. In Section 5.1 we introduce the notion of processes without stuttering transitions and we prove some properties of this kind of processes. These properties M.D. Lee and B. Luttik 47 and the result in Section 2 are used in Section 5.2 to prove that finite processes of the π -calculus satisfy unique parallel decomposition w.r.t. weak bisimilarity. In Section 6 we present some final remarks. 2 Decomposition orders In this section, we briefly review the theory of unique decomposition for commutative monoids that we shall apply in the remainder of the paper to prove UPD results in the context of the π -calculus. Definition 1. A commutative monoid is a set M with a distinguished element e and a binary operation on M denoted by ⋅ such that for all x,y,z ∈ M : • x ⋅ (y ⋅ z) = (x ⋅ y) ⋅ z (associativity); • x ⋅ y = y ⋅ x (commutativity); • x ⋅ e = e ⋅ x = x (identity). In the remainder of the paper we often suppress the symbol ⋅ or use ∥. Definition 2. An element p of a commutative monoid M is called indecomposable if p ≠ e and p = xy implies x = e or y = e. Definition 3. Let M be a commutative monoid. A decomposition in M is a finite multi-set *p1 ,... , pk + of indecomposable elements of M such that p1 ⋅ p2 ⋯pk is defined. The element p1 ⋅ p2 ⋯pk in M will be called the composition associated with the decomposition *p1 ,... , pk +, and, conversely, we say that *p1 ,..., pk + is a decomposition of the element p1 ⋅ p2 ⋯pk of M. Decompositions d = *p1 ,..., pk + and d ′ = *p′1 ,... , p′l + are equivalent in M (notation d ≡ d ′ ) if they have the same composition, i.e. p1 ⋅ p2 ⋯pk = p′1 ⋯p′l . A decomposition d in M is unique if d ≡ d ′ implies d = d ′ for all decompositions d ′ in M. We say that an element x of M has a unique decomposition if it has a decomposition and this decomposition is unique. If every element of M has a unique decomposition, then we say that M has unique decomposition. Theorem 1 below gives a sufficient condition to ensure that a commutative monoid M has unique decomposition. It requires the existence of a decomposition order for M. Definition 4. Let M be a commutative monoid; a partial order ≼ on M is a decomposition order if 1. it is well-founded, i.e., for every non-empty subset M̂ ⊆ M there is m ∈ M̂ such that for all m′ ∈ M, m′ ≼ m implies m′ = m. In this case, we say that m is a ≼-minimal element of M̂; 2. the identity element e of M is the least element of M with respect to ≼, i.e., e ≼ x for all x in M; 3. ≼ is strictly compatible, i.e., for all x,y,z ∈ M if x ≺ y (i.e. x ≼ y and x ≠ y) and yz is defined, xz ≺ yz; 4. it is precompositional, i.e., for all x,y,z ∈ M x ≼ yz implies x = y′ z′ for some y′ ≼ y and z′ ≼ z; and 5. it is Archimedean, i.e., for all x,y ∈ M xn ≼ y for all n ∈ N0 implies that x = e. Theorem 1 ([15]). Every commutative monoid M with a decomposition order has unique decomposition. 3 The π -calculus We recall the syntax of the π -calculus and the rules to define the transition relation [20]. We assume a set of names or channels V. We use a,b,c,x,y,z to range over V. Unique Parallel Decomposition for the π-calculus 48 α (Out) xy xy.P Ð→ P xy x(z).P Ð→ P{y/z} (Inp) P Ð→ P′ (Sum-L) α P + Q Ð→ P′ xy x(z) τ z ∈/ fn(Q) α z /∈ n(α ) (Res) P Ð→ P′ !P Ð → (P′ ∣ P′′ ) ∣!P z≠x x(z) (Open) ν z(P) ÐÐ→ P′ xy P Ð→ P′′ x(z) (Close-L) P Ð→ P′ α !P Ð→ P′ ∣!P (Rep-Act) xz P ÐÐ→ P′ (Rep-Comm) (Par-L) α xz ν z(P) Ð→ ν z(P′ ) τ Q Ð→ Q′ P∣QÐ → ν z(P′ ∣ Q′ ) α P Ð→ P′ (Mat) xz P ÐÐ→ P′ (Comm-L) τ xy bn(α ) ∩ fn(Q) = ∅ α P ∣ Q Ð→ P′ ∣ Q xy Q Ð→ Q′ P∣QÐ → P′ ∣ Q′ P Ð→ P′ α [x = x]π .P Ð→ P α α P Ð→ P′ P Ð→ P′ τ τ .P Ð →P π .P Ð→ P (Tau) P Ð→ P′′ τ !P Ð → (ν z(P′ ∣ P′′ )) ∣!P z /∈ fn(P) (Rep-Close-L) Table 1: Transition rules for the π -calculus Definition 5. The processes, summations and prefixes of the π -calculus are given respectively by P ∶∶= M ∣ P ∣ P′ ∣ ν z.P ∣ !P π .P ∣ M + M π ∶∶= xy ∣ x(z) ∣ τ ∣ [x = y]π ′ M ∶∶= 0 ∣ We denote with Π the set of processes of the π -calculus. An occurrence of a name z ∈ V is bound in a process P if it is in the scope of a restriction ν z or of an input a(z). A name a ∈ V is free in a process P if there is at least one occurrence of a that is not bound. We write bn(P) and fn(P) to denote, respectively, the set of bound names and free names of a process P. The set of names of a process P is defined by n(P) = bn(P)∪ fn(P). We employ the following convention of the π -calculus w.r.t. names. Convention 1. [20, P.47] In any discussion, we assume that the bound names of any processes or actions under consideration are chosen to be different from the names free in any other entities under consideration, such as processes, actions, substitutions, and sets of names. This convention is subject to the x(z) limitation that in considering a transition P ÐÐ→ Q, the name z that is bound in x(z) and in P may occur free in Q. This limitation is necessary for expressing scope extrusion. The transition relation associated to a term is defined by the rules in Table 1, where we have omitted the symmetric version of the rules (Sum-L), (Par-L), (Comm-L) and (Close-L). We denote with A the set of visible actions that can be executed by a process P ∈ Π, i.e. A = {xy ∣ x,y ∈ V} ∪ {xy ∣ x,y ∈ V} ∪ {x(z) ∣ x,z ∈ V}. The action τ is the internal action. We define Aτ = A ∪ {τ }. For P,P′ ∈ Π and α ∈ Aτ , we write α α P Ð→ P′ if there is a derivation of P Ð→ P′ with rules in Table 1. Definition 6. Strong bisimilarity is the largest symmetric relation over Π, notation ∼, such that whenever α α P ∼ Q, if P Ð→ P′ then there is Q′ s.t. Q Ð→ Q′ and P′ ∼ Q′ . M.D. Lee and B. Luttik 49 The relation ∼ is not compatible with input prefix: We have that zx ∣ a(y) ∼ zx.a(y) + a(y).zx , whereas b(a).(zx ∣ a(y)) ∼/ b(a).(zx.a(y) + a(y).z), because when z is received over the channel a, we have (zx ∣ a(y)){a/z} ∼/ (zx.a(y) + a(y).z){a/z} . Hence, ∼ is not a congruence for the full syntax of the π -calculus. It is, however, a so-called non-input congruence (see [20, Theorem 2.2.8]): it is compatible with all the other constructs in the syntax. In the present paper we shall only use the fact that ∼ is compatible with parallel composition, i.e., if P1 ∼ Q1 and P2 ∼ Q2 , then P1 ∣ P2 ∼ Q1 ∣ Q2 . We recall now the weak variant of bisimilarity. We write P Ô⇒ P′ if P = P′ or if there are P0 ,... ,Pn α τ τ → ... Ð → Pn = P′ . We write P Ô⇒ Q with α ∈ Aτ if there are P′ ,Q′ s.t. P Ô⇒ with n > 0 s.t. P = P0 Ð τ α P′ Ð→ Q′ Ô⇒ Q. Notice the difference between P Ô⇒ P′ and P Ô⇒ P′ , in the second case, at least one τ -transition is executed. Definition 7. Weak bisimilarity is the largest symmetric relation over Π, notation ≈, such that whenever α α τ P ≈ Q, (i) if P Ð→ P′ with α ∈ A then there is Q′ s.t. Q Ô⇒ Q′ and P′ ≈ Q′ and (ii) if P Ð → P′ then there is Q′ s.t. Q Ô⇒ Q′ and P′ ≈ Q′ . Like strong bisimilarity, it is only possible to prove that ≈ is a congruence for non-input contexts (see [20, Theorem 2.4.22]). 4 Unique decomposition with respect to strong bisimilarity In this section, we shall use the result presented in Section 2 to prove that every finite π -calculus process has a unique parallel decomposition w.r.t. strong bisimilarity. In Section 4.1 we introduce the definition of depth of a process and some of its properties. We also explain why we restrict our development to finite processes. In Section 4.2 we present the unique decomposition result. 4.1 The depth of a process Given a set X , we denote with X ∗ the set of finite sequences over X , where ε ∈ X ∗ is the empty sequence. α1 ω For ω = α1 α2 ⋯αn ∈ Aτ∗ with n > 0, we write P Ð→ P′ if there are processes P0 ,P1 ,... ,Pn s.t. P = P0 Ð→ α2 αn ω ω P1 Ð→ ... Ð→ Pn = P′ . If ω = ε , then P Ð→ P′ implies P′ = P. If we are not interested in P′ , we write P Ð→. α /. In addition, we write P ↓ if for all α ∈ Aτ , P Ð→ Definition 8. Let length ∶ A∗τ → N0 be the function defined by ⎧ 0 ⎪ ⎪ ⎪ ⎪ length(ω ) = ⎨length(ω ′ ) + 1 ⎪ ⎪ ⎪ ′ ⎪ ⎩length(ω ) + 2 if ω = ε , if ω = αω ′ and α ≠ τ if ω = αω ′ and α = τ Unique Parallel Decomposition for the π-calculus 50 ω Definition 9. A process P ∈ Π is normed if there is ω ∈ Aτ∗ such that P Ð→ P′ ↓. We denote with Πn the set of normed processes. The depth ∶ Πn → N0 ∪ {∞} and the norm ∶ Πn → N0 of a normed process P ∈ Π are defined, respectively, by ω depth(P) =sup({length(ω ) ∣ P Ð→ P′ and P′ ↓}) ω norm(P) =inf({length(ω ) ∣ P Ð→ P′ and P′ ↓}) Where sup(X ) = ∞ whenever X is an infinite set, and inf(∅) = ∞. We remark that we have assigned a higher weight to occurrences of the label τ in the definition of the length of a sequence ω ∈ A∗τ . This is to ensure that depth is additive w.r.t. parallel composition (i.e., the depth of a parallel composition is the sum of the depths of its components), as we shall prove in Lemma 6) below. As opposed to other process calculi for which unique decomposition has been established (see, e.g. [15]), due to scope extrusion, norm is not additive for the π -calculus: Consider P = P0 ∣ P1 = ν z(az) ∣ a(x).!xa τ → ν z(0 ∣!za) ↓ but P1 is not because it only performs an execution of infinite P is normed because P Ð length. Then, to ensure this kind of properties, one approach could be just consider normed processes. Unfortunately this is not enough. Consider Q = Q0 ∣ Q1 = ν z(az) ∣ a(x).xa Processes Q, Q0 and Q1 are normed and, moreover, they perform no infinite execution. Despite this, τ we have that norm(Q) = 2, because Q Ð → ν z(0 ∣ za) ↓, and norm(Q0 ) + norm(Q1 ) = 1 + 2 = 3. Moreover, notice that the norm of the arguments of a parallel composition is not less than the norm of the parallel composition, i.e. norm(Q) = 2 and norm(Q1 ) = 2. In particular, these examples show that item 4 in Lemma 3 of [7] (norm is additive) is false, and, as a consequence, some proofs in [7] are flawed. The authors of [7] proposed a solution to this problem that we discuss in the conclusion of this paper. So, to facilitate inductive reasoning, we will consider finite processes and depth. Definition 10. A process P ∈ Π is finite if there is n ∈ N0 s.t. there is no ω = α1 α2 ⋯αn+1 ∈ Aτ∗ such that ω P Ð→. We denote with Π f the set of finite processes of Π. Following the last example, we have that Q, Q0 ,Q1 ∈ Π f and depth(Q) = 3 = depth(Q0 ) + depth(Q1 ). To conclude this section we present a collection of results including lemmas and theorems. Most of the lemmas are only needed to prove the theorems. The theorems and only few lemmas will be used in the next section. Theorem 2 states that bisimilar processes have the same depth. Theorem 3 states that the depth of a parallel composition of two processes not bisimilar to 0 is greater than the depth of each process. Thanks to these results, we will able to extend the notion of depth to equivalence classes and apply inductive reasoning. Lemma 1. For all P ∈ Π f , P ∼/ 0 implies depth(P) > 0. α Lemma 2. If P ∈ Π f and P Ð→ P′ , α ∈ Aτ , then P′ ∈ Π f and depth(P) > depth(P′ ). Theorem 2. If P ∼ Q then P ∈ Π f iff Q ∈ Π f ; moreover, depth(P) = depth(Q). M.D. Lee and B. Luttik 51 ω ω Proof. Suppose that P ∼ Q. Then, clearly, P Ð→ iff Q Ð→, and hence P ∈ Π f iff Q ∈ Π f . To prove that depth(P) = depth(Q), first note that if P,Q ∈/ Π f , then depth(P) = ∞ = depth(Q). In the case that remains, both depth(P) and depth(Q) are natural numbers; we proceed by induction over depth(P). If depth(P) = 0 then P ∼ 0 by Lemma 1 , so Q ∼ 0 and therefore depth(Q) = 0. Suppose now depth(P) = n > 0. Assume that the statement holds for processes with depth less than n. Suppose α depth(Q) = m > n then there is Q′ s.t. Q Ð→ Q′ and m = length(α ) + depth(Q′ ). By definition of ∼, we get α P Ð→ P′ , P′ ∼ Q′ . By Lemma 2, depth(P′ ) < depth(P), therefore depth(P′ ) = depth(Q′ ) and depth(P) ≥ depth(P′ ) + length(α ) = m > n = depth(P), i.e. we get a contradiction. Similarly, for the case depth(Q) = α m < n, we can reach a contradiction by considering a transition P Ð→ P′ with n = length(α ) + depth(P′ ). Then we can conclude depth(P) = depth(Q). α ω′ Lemma 3. Let P,P′ ∈ Π f , ω = αω ′ ∈ A∗τ be such that P Ð→ P′ Ð→ and depth(P) = length(ω ). Then depth(P′ ) = length(ω ′ ) and therefore depth(P) = depth(P′ ) + length(α ). Lemma 4. For all P ∈ Π f , depth(P) ≥ depth(ν z(P)) for all z ∈ V. ω Lemma 5. Let P,Q ∈ Π f and ω ∈ Aτ∗ be such that P ∣ Q Ð→ and length(ω ) = depth(P ∣ Q). Then, there ω1 ω2 are ω1 , ω2 ∈ Aτ∗ such that P Ð→, Q Ð→ and length(ω1 ) + length(ω2 ) = length(ω ). Proof. We proceed by complete induction on n = depth(P) + depth(Q). Suppose that the property holds for parallel compositions of finite processes such that the sum of the depths is smaller than n > 0. Let α ω′ ω = αω ′ and R be such that length(ω ) = n and P ∣ Q Ð→ R Ð→. We analyse the different ways of deriving the first transition (we omit the symmetric cases). α • Case (Par-L). Then P Ð→ P′ and R = P′ ∣ Q. By Lemma 3 and induction depth(P′ ∣ Q) = length(ω ′ ) < ω1 ω2 n and then there are ω1 and ω2 s.t. P′ Ð→, Q Ð→ and length(ω1 ) + length(ω2 ) = length(ω ′ ). Then αω1 P ÐÐ→ and length(αω1 ) + length(ω2 ) = length(ω ). xy xy • Case (Comm-L). Then P Ð→ P′ , Q Ð→ Q′ and R = P′ ∣ Q′ and α = τ . By Lemma 3 and induction ω1 depth(P′ ∣ Q′ ) = length(ω ′ ) < length(τ ) + length(ω ′ ) = n and then there are ω1 and ω2 s.t. P′ Ð→, xyω1 ω2 xyω2 Q′ Ð→ and length(ω1 ) + length(ω2 ) = length(ω ′ ). Then P ÐÐ→ and Q ÐÐ→ and length(xyω1 ) + length(xyω2 ) = length(τ ) + length(ω ′ ) = length(ω ). x(z) xz • Case (Close-L). Then P ÐÐ→ P′ ,Q Ð→ Q′ , α = τ and R = ν z(P′ ∣ Q′ ). The side condition of x(z)xz (Close-L) allows us to use the rules (Par-L) and its symmetric version, then P ∣ Q ÐÐÐ→ P′ ∣ Q′ . On one hand, by Lemma 4, depth(P′ ∣ Q′ ) ≥ depth(ν z(P′ ∣ Q′ )). On the other hand, depth(P′ ∣ Q′ ) ≤ depth(ν z(P′ ∣ Q′ )) because ω = τω ′ is a maximal execution, length(τ ) = length(xzxz), ω′ ν z(P′ ∣ Q′ ) Ð→ and by Lemma 3. Then depth(P′ ∣ Q′ ) = depth(ν z(P′ ∣ Q′ )) < n. Moreover, there ω ′′ x(z) xzω ′′ is ω ′′ such that P′ ∣ Q′ ÐÐ→ and length(xzxzω ′′ ) = depth(P ∣ Q). Then P ∣ Q ÐÐ→ P′ ∣ Q ÐÐÐ→ with length(xzω ′′ ) < n. From this point we can repeat the proof of the first case. Lemma 6. For all processes P,Q ∈ Π f , depth(P ∣ Q) = depth(P) + depth(Q). Proof. By Lemma 5 we can ensure depth(P ∣ Q) ≤ depth(P) + depth(Q). On the other hand, by Conω ω ω vention 1, we have that P Ð→ or Q Ð→ implies P ∣ Q Ð→. This allows us to conclude depth(P ∣ Q) ≥ depth(P) + depth(Q) and therefore depth(P ∣ Q) = depth(P) + depth(Q). Unique Parallel Decomposition for the π-calculus 52 Lemma 7. For all P,Q ∈ Π, P,Q ∈ Π f iff P ∣ Q ∈ Π f . Theorem 3. If P,Q,R ∈ Π f , P ∼/ 0, Q ∼/ 0 and P ∣ Q ∼ R then depth(P) < depth(R) and depth(Q) < depth(R). Proof. By Lemma 1, depth(P) > 0, depth(Q) > 0. By Theorem 2, depth(R) = depth(P ∣ Q). By Lemma 6, depth(R) = depth(P) + depth(Q) and we conclude depth(P) < depth(R) and depth(Q) < depth(R). 4.2 Unique decomposition The commutative monoid associated with Π f modulo ∼ is defined by • P∼ = {[P]∼ ∶ P ∈ Π f } where [P]∼ = {P′ ∶ P′ ∼ P} • e = [0]∼ ∈ P∼ . • ∥ ∶ P∼ × P∼ → P∼ is such that [P]∼ ∥ [Q]∼ = [P ∣ Q]∼ By Lemma 7 we have that the definition of ∥ is sound. By Theorem 2 we have that all P′ ∈ [P]∼ have the same depth. Then we can lift function depth to P∼ , i.e. depth([P]∼ ) = depth(P). Lemma 8. P∼ with neutral element [0]∼ and binary operation ∥ is a commutative monoid. I.e., ∥ ⊆ P∼ × P∼ satisfies the associativity, commutativity and identity properties. In order to use the Theorem 1 we need to define on P∼ a decomposition order. In [15, 14], it is shown that the transition relation directly induces a decomposition order on a commutative monoid of processes. In the case of the π -calculus, however, the order induced by the transition relation cannot be directly used, as is illustrated by the following example: Define a binary relation ↝ ⊆ P∼ × P∼ by α [R]∼ ↝ [S]∼ if there is R′ ∈ [R]∼ and S′ ∈ [S]∼ such that R′ Ð→ S′ . We denote the inverse of the reflexivetransitive closure of ↝ by ≼↝ , i.e., ≼↝ = (↝∗ )−1 . The order ≼↝ is not precompositional. Consider the processes P = ν z.(az.zc.ca) and Q = a(x).x(y).yb. Then τ • P ∣ Q = ν z.(az.zc.ca) ∣ a(x).x(y).yb Ð → ν z.(zc.ca ∣ z(y).yb) = R and therefore • [P]∼ ∥ [Q]∼ = [P ∥ Q]∼ ↝ [R]∼ = [ν z.(zc.ca ∣ z(y).yb)]∼ . τ • Note that R executes only one transition, i.e. ν z.(zc.ca ∣ z(y).yb) Ð → ν z(ca ∣ cb), then it is clear that ′ ′ there are no processes P and Q s.t. [ν z.(az.zc.ca)]∼ ↝∗ [P′ ]∼ [a(x).x(y).yb]∼ ↝∗ [Q′ ]∼ [P′ ]∼ ∥ [Q′ ]∼ = [ν z(zc.ca ∣ z(y).yb)]∼ The particularity of this example is the scope extrusion. We need to define an order based on a fragment of the transition relation that avoids this phenomenon. We shall define the partial order ≼ over P∼ as the reflexive-transitive closure of the relation Ð → ⊆ P∼ × P∼ , which is, in turn, defined as follows: α Ð →0 = {([P]∼ ,[Q]∼ ) ∶ P Ð→ Q, α ∈ Aτ and ∃/ P0 ,P1 ∈ Π f s.t. P0 ∼/ 0,P1 ∼/ 0,P0 ∣ P1 ∼ P} Ð →k+1 = {([P0 ∣ P1 ]∼ ,[Q0 ∣ P1 ]∼ ) ∶ [P0 ]∼ Ð →k [Q0 ]∼ ,P1 ∈ Π f } ∪ {([P0 ∣ P1 ]∼ ,[P0 ∣ Q1 ]∼ ) ∶ [P1 ]∼ Ð →k [Q1 ]∼ ,P0 ∈ Π f } ∞ Ð →= ⋃ Ð →n . k=0 The partial order ≼ is defined as the inverse of the reflexive-transitive closure of Ð → i.e., ≼ = (Ð →∗ )−1 . We write [P]∼ ≺ [Q]∼ if [P]∼ ≼ [Q]∼ and [P]∼ ≠ [Q]∼ . Notice that the definition of Ð → avoids any kind of communications between the arguments of the parallel operator, this ensures that the scope extrusion is also avoided. M.D. Lee and B. Luttik 53 Lemma 9. If [P]∼ Ð → [Q]∼ then depth([Q]∼ ) < depth([P]∼ ). Lemma 10. ≼ is a partial order. Proof. We have to prove that ≼ is reflexive, antisymmetric, and transitive. ≼ is reflexive and transitive because it is the reflexive-transitive closure of Ð →. To prove that ≼ is antisymmetric notice that [P]∼ ≺ [Q]∼ implies [Q]∼ = [Pn ]∼ Ð → ... Ð → [P1 ]∼ Ð → [P0 ]∼ = [P]∼ for n > 0 and then, by Lemma 9, depth([P]∼ ) < depth([Q]∼ ). Therefore [P]∼ ≼ [Q]∼ and [Q]∼ ≼ [P]∼ implies [P]∼ = [Q]∼ . In Lemma 12, we prove that ≼ is a decomposition order. To prove this result we need to add a last auxiliary result, Lemma 11. → [Q]∼ . Lemma 11. If P ∈ Π f and depth(P) > 0 then there is Q s.t. [P]∼ Ð Proof. We proceed by complete induction over n = depth(P). Assume that the hypothesis holds for values less than n ≥ 1. Suppose there are no P0 ,P1 ∈ Π f such that P ∼ P0 ∣ P1 , P0 ∼/ 0 and P1 ∼/ 0. Given that α →0 [P′ ]∼ and therefore [P]∼ Ð → [P′ ]∼ . Finally, we can n ≥ 1 then there is α ∈ Aτ s.t. P Ð→ P′ . Then [P]∼ Ð ′ define [Q]∼ = [P ]∼ . Suppose there are P0 ,P1 ∈ Π f such that P ∼ P0 ∣ P1 , P0 ∼/ 0 and P1 ∼/ 0, then [P]∼ = [P0 ∣ P1 ]∼ . By Theorem 3 depth(P0 ) < depth(P) and by Lemma 1 depth(P0 ) > 0. By induction there is Q0 s.t. [P0 ]∼ Ð → [Q0 ]∼ and therefore there is k s.t. [P0 ]∼ Ð →k [Q0 ]∼ By definitions of Ð →k+1 and Ð →, [P0 ∣ P1 ]∼ Ð →k+1 [Q0 ∣ P1 ]∼ and [P0 ∣ P1 ]∼ Ð → [Q0 ∣ P1 ]∼ . Therefore if we define [Q]∼ = [Q0 ∥ P1 ]∼ the proof is complete. Lemma 12. ≼ ⊆ P∼ × P∼ is a decomposition order. Proof. 1. ≼ is well-founded. We have to prove that every non-empty subset of P∼ has a ≼-minimal element. Let X ⊆ P∼ with X ≠ ∅. Let [P]∼ be s.t. [P]∼ ∈ X and depth([P]∼ ) = min{depth([Q]∼ ) ∣ [Q]∼ ∈ X }, then [P]∼ is a minimal element of X by Lemma 9 and definition of ≼. 2. [0]∼ is the least element of P∼ w.r.t. ≼. We consider [P]∼ and proceed by induction on depth(P). If depth(P) = 0, then P ∼ 0 and therefore [P]∼ = [0]∼ . Suppose that depth(P) = n > 0. By Lemma 11 there is Q s.t. [P]∼ Ð → [Q]∼ . By Lemma 9, depth(Q) < depth(P). By induction and definition of ≼, [0]∼ ≼ [Q]∼ ≼ [P]∼ . 3. ≼ is strictly compatible. Suppose [Q]∼ ≺ [P]∼ and consider [P]∼ ∥ [S]∼ . By definition of ≺ there are P0 ,...,Pn ∈ Π f , with n > 0, s.t. [P]∼ = [P0 ]∼ Ð → [P1 ]∼ Ð → ... Ð → [Pn ]∼ = [Q]∼ . By definition of Ð →, for each i = 0,... n − 1 there is ki s.t. [Pi ]∼ Ð →ki [Qi ]∼ . Define k = max{ki ∶ i = 0,... n − 1}. Then [P]∼ ∥ [S]∼ = [P0 ]∼ ∥ [S]∼ = [P0 ∣ S]∼ Ð →k+1 ... Ð →k+1 [Pn ∣ S]∼ = [Pn ]∼ ∥ [S]∼ = [Q]∼ ∥ [S]∼ By definition of Ð →, [P]∼ ∥ [S]∼ = [P0 ]∼ ∥ [S]∼ = [P0 ∣ S]∼ Ð → ... Ð → [Pn ∣ S]∼ = [Pn ]∼ ∥ [S]∼ = [Q]∼ ∥ [S]∼ By Lemma 9 and n > 0, depth([P]∼ ∥ [S]∼ ) > depth([Q]∼ ∥ [S]∼ ). Then [Q]∼ ∥ [S]∼ ≺ [P]∼ ∥ [S]∼ . 4. ≼ is precompositional. Suppose [P]∼ ≼ [Q]∼ ∥ [R]∼ , we have to prove there are [Q′ ]∼ ≼ [Q]∼ and [R′ ]∼ ≼ [R]∼ s.t. [P]∼ = [Q′ ]∼ ∥ [R′ ]∼ . If Q ∼ R ∼ 0 then Q′ ∼ R′ ∼ 0 and the conditions are satisfied. Suppose that only one of both processes is bisimilar to 0. W.l.o.g. suppose Q ∼/ 0 and R ∼ 0. In this case, [P]∼ ≼ [Q]∼ ∥ [R]∼ = [Q]∼ , then if we define [Q′ ]∼ = [P]∼ and [R′ ]∼ = [0]∼ , the conditions are also satisfied. Suppose now that Q ∼/ 0 and R ∼/ 0. By definition of ≼ there are n ≥ 0 and Unique Parallel Decomposition for the π-calculus 54 processes Sn ,...,S0 s.t. [Q]∼ ∥ [R]∼ = [Q ∣ R]∼ = [Sn ]∼ Ð → ... Ð → [S0 ]∼ = [P]∼ . The proof proceed by induction on n. Suppose that the hypothesis holds for n, we prove the case n + 1. Given that [Sn+1 ]∼ = [Q ∣ R]∼ = [Q]∼ ∥ [R]∼ Ð → [Sn ]∼ , by definition of Ð →, there is T s.t. either [Q]∼ Ð → [T ]∼ and [Sn ]∼ = [T ∣ R]∼ or, [R]∼ Ð → [T ]∼ and [Sn ]∼ = [Q ∣ T ]∼ . (We have omitted the sub-index of Ð → because it does not play any role.) W.l.o.g. suppose that [Q]∼ Ð → [T ]∼ and [Sn ]∼ = [T ∣ R]∼ . Then [P]∼ ≼ [T ∣ R]∼ = [T ]∼ ∥ [R]∼ . By induction there are [T ′ ]∼ and [R′ ]∼ s.t. [T ′ ]∼ ≼ [T ]∼ , [R′ ]∼ ≼ [R]∼ and [P]∼ = [T ′ ]∼ ∥ [R′ ]∼ . Because [T ]∼ ≼ [Q]∼ and ≼ is a partial order, we have that [T ′ ]∼ ≼ [Q]∼ and we can conclude the proof. 5. ≼ is Archimedean. Suppose that [P]∼ ,[Q]∼ ∈ P∼ are s.t. [P]n∼ ≼ [Q]∼ for all n ∈ N0 . By Lemma 6, depth(Pn ) = n ⋅ depth(P). Given that depth(Q) ∈ N0 we can conclude that depth(P) = 0 and therefore [P]∼ = [0]∼ . By Theorem 1, it follows that P∼ has unique decomposition. Corollary 1. The commutative monoid P∼ has unique decomposition. 5 Unique parallel decomposition with respect to weak bisimilarity To prove the result of unique parallel decomposition w.r.t. strong bisimilarity, we relied on the definition of depth and on the properties that are satisfied when we take into account strong bisimilarity. In particular, we proved that all strongly bisimilar processes have the same depth. For the weak bisimilarity we do not have the same property. Consider the following processes P = xy.0 P′ = τ .xy.0 P′′ = τ .τ .xy.0 Notice that P ≈ P′ ≈ P′′, despite this, depth(P) < depth(P′ ) < depth(P′′ ). To avoid this problem and to adapt the ideas behind results in the previous section, we will consider processes without stuttering α transitions. A transition P Ð→ P′ is a stuttering transition if α = τ and P ≈ P′ . We could not establish UPD for normed processes in the strong setting, because the norm of the arguments of a parallel composition is not necessarily less than the norm of the parallel composition. In the weak setting, it is known that normed processes of Π do not satisfy UPD w.r.t. bisimilarity. Consider τ the following counter example [7]: define P = ν z(zc ∣ z(x).!ab ∣ z(y)). P is normed because P Ð → ν z(0 ∣ z(x).!ab ∣ 0) ↓ but there is no a unique parallel decomposition of P because P ≈ P ∣ P. We study processes without stuttering transitions in Section 5.1. Using the results developed in that section and Theorem 1, in Section 5.2 we prove that for finite processes there is a unique parallel decomposition w.r.t. weak bisimilarity. 5.1 Processes without stuttering steps ω a1 For ω = a1 a2 ⋯an ∈ Aτ∗ with n > 0, we write P Ô⇒ P′ if there are processes P0 ,P1 ,... ,Pn s.t. P = P0 Ô⇒ a2 an ω P1 Ô⇒ ... Ô⇒ Pn = P′ . If ω = ε , then P Ô⇒ P′ implies P Ô⇒ P′ . Definition 11. A process P ∈ Π f is a process without stuttering transitions if there are no ω ∈ A∗ and ω τ → P′′ and P′ ≈ P′′ . We denote with Π↻ P′ ,P′′ ∈ Π f s.t. P Ô⇒ P′ Ð / the set of processes of Π f without stuttering transitions. M.D. Lee and B. Luttik 55 In Section 4.1 we discussed why we do not consider infinite processes, this discussion also applies for weak bisimilarity. By definition, Π↻ / ⊆ Π f . This fact and Lemma 14 ensure that we can use processes in Π↻ / to define properties over equivalence classes of processes in Π f w.r.t. weak bisimilarity. To prove Lemma 14 we need to introduce some notation and Lemma 13. We write x(z).P to denote ν z.xz.P. We call x(z) a bound-output prefix. We use λ to range over prefixes, including bound-outputs. Lemma 13. For all P ∈ Π f there are prefixes λ1 ,..., λn and processes P1 ,... ,Pn such that P ∼ ∑ni=1 λi .Pi . Proof. The proof proceeds by structural induction on P. Cases P = 0, P = π .P′ are straightforward by definition. For the case P = P1 + P2, by induction hypothesis there are processes Q1 = ∑i∈I λi .Pi and Q2 = ∑ j∈J λ j .Pj and bisimulations R1 and R2 s.t. Pk Rk Qk for k = 1,2. It is easy to see that {(P,Q1 + Q2 )}∪ R1 ∪ R2 is a bisimulation. Case P = P1 ∣ P2 is straightforward by induction and the Expansion Lemma for ∼ in the π -calculus [20, Lemma 2.2.14]. Thanks this lemma we can state that for all P = ∑i∈I λi Pi and Q = ∑ j∈J λ j Q j there is R = ∑k∈K λk Rk s.t. P ∣ Q ∼ R. Case P = ν z.P′ proceeds by structural induction on P′ . If P′ = 0 then ν z.P′ ≈ 0 = ∑0i=1 λi .Pi . If P′ = π .P′′ then there are three cases to analyse: (i) z ∈/ n(π ) then P ∼ π .(ν z.P′′ ), (ii) π = xz then ν z.P′ can be denoted by x(z)P′′ , (iii) z ∈ n(π ) and π ≠ xz then ν z.π .P′′ ∼ 0. If P′ = P0 + P1 then notice that ν z(P0 + P1 ) ∼ ν z.P0 + ν z.P1 ; by induction there are processes ∑i∈I λi Pi and ∑ j∈J λ j Pj s.t. ν z.P0 ∼ ∑i∈I λi Pi and ν z.P1 ∼ ∑ j∈J λ j Pj . From this point, the proof follows as in the case P = P1 + P2 . Finally, case P′ = P0 ∣ P1 can be reduced to the previous case using the Expansion Lemma for ∼ ([20, Lemma 2.2.14]). Lemma 14. For every process P ∈ Π f there is Q ∈ Π↻ / s.t. P ≈ Q. Proof. The proof of the result follows by complete induction on n = depth(P). By Lemma 13 for P ∈ Π f there are prefixes λ1 ,... , λn and processes P1 ,...,Pn such that P ∼ ∑ni=1 λi .Pi . By induction and Lemma 2, for each i there is Qi ∈ Π↻ / s.t. Pi ≈ Qi . Then if we define Q = ∑i∈{1,...n} and P/≈Pi λi .Qi we get Q s.t. Q ∈ Π↻ / and P ≈ Q. We cannot restrict our attention only to processes in Π↻ / because the property of not executing stuttering transitions is not preserved by parallel composition. Consider the processes P0 = ν z(az) and P1 = a(x).(xb + τ .cb). Both P0 ,P1 ∈ Π↻ / Π↻ / but P0 ∥ P1 ∈ / because τ → ν z(0 ∥ (zb + τ .cb)) ∼ τ .cb ≈ cb P0 ∥ P1 = ν z(az) ∥ a(x).(xb + τ .cb) Ð If we compare this fact with the strong setting, we can say that it is not possible to prove a lemma similar to Lemma 7 for processes in Π↻ / . As in Section 4.1, we conclude with a collection of theorems and lemmas. Theorems 4 and 5 are equivalent, respectively, to Theorems 2 and 3 but w.r.t. processes in Π↻ / and weak bisimilarity. Most of the lemmas are needed to prove these results and only a few of them are used in the next section. ω ∗ Lemma 15. If P ∈ Π↻ / and P Ô⇒ Q for ω ∈ Aτ then Q ∈ Π↻ / . ω′ τ ′ ∗ ′ ′′ ′ → Q′′ with Q′ ≈ Q′′ . Let Proof. Suppose Q /∈ Π↻ / , then there are ω ∈ A and Q ,Q ∈ Π f s.t. Q Ô⇒ Q Ð ω̃ω ′ τ ω̃ obtained from ω by removing τ ’s actions. Then P Ô⇒ Q′ Ð → Q′′ and therefore P ∈/ Π↻ / , which is a contradiction. Unique Parallel Decomposition for the π-calculus 56 α α Lemma 16. If P,Q ∈ Π↻ → P′ with α ∈ Aτ , then Q Ô⇒ Q′ , i.e. Q executes at least / are s.t. P ≈ Q and P Ð a transition, and P′ ≈ Q′ τ Proof. If α ≠ τ the result is straightforward by Def. 7. If α = τ and there is no transition Q0 Ð → Q1 s.t. τ α ′ ′ ′ ′ ′ Q Ô⇒ Q0 Ð → Q1 Ô⇒ Q and P ≈ Q then P ≈ Q since P ≈ Q. This implies that P ≈ Q ≈ P , i.e. P Ð→ P′ is a stuttering transition. This contradicts P ∈ Π↻ / . Theorem 4. If P,Q ∈ Π↻ / and P ≈ Q then depth(P) = depth(Q). Proof. We proceed by complete induction over n = depth(P). If depth(P) = 0, then P ∼ 0 and moreover α P ≈ 0. Because P ≈ Q and P ∼ 0, there is no α ∈ A s.t. Q Ô⇒. Taking into account this fact, if there τ τ → Q′ , Q′ is such that Q′ ≈ 0. This creates a contradiction because Q Ð → Q′ is a stuttering is Q′ s.t. Q Ð transition and Q ∈ Π↻ / . Then Q ∼ 0 and therefore depth(Q) = 0 = depth(P). Suppose depth(P) = n + 1. α ω′ Let ω = αω ′ ∈ A∗τ and P′ be s.t. length(ω ) = n + 1 and P Ð→ P′ Ð→. Because P ≈ Q and Lemma 16 α there are Q0 , Q1 , Q′ s.t. Q Ô⇒ Q0 Ð→ Q1 Ô⇒ Q′ and P′ ≈ Q′ . By induction depth(P′ ) = depth(Q′ ) and therefore depth(Q) ≥ depth(P) = n + 1. We prove now that when we assume depth(Q) > n + 1 we reach a contradiction; it then follows that depth(Q) = n + 1. Assume depth(Q) > n + 1 and let ω = αω ′ ∈ A∗τ α ω′ be such that Q Ð→ Q̃ Ð→ Q̃′ ↓ and length(ω ) = depth(Q). Because P ≈ Q and Lemma 16 there is P̃ s.t. α P Ô⇒ P̃, P̃ ≈ Q̃ and depth(P) = n+ 1 > depth(P̃). By the complete induction depth(P̃) = depth(Q̃). Then, we reach a contradiction, n + 1 > depth(P̃) = depth(Q̃) ≥ n + 1. α Lemma 17. If P ∈ Π f and P Ð→ P′ with α ≠ τ then P ≈/ P′ . ω αω Proof. Let ω ∈ A∗ be the largest sequence s.t. P′ Ô⇒ P′′ ↓. Then there is no Q s.t. P′ Ô⇒ Q. On the αω other hand P Ô⇒, therefore P ≈/ P′ . α α′ Lemma 18. If P ∈ Π↻ / 0 and for all P′ ∈ Π f , α ∈ Aτ , P Ð→ P′ ↓, then there is α ′ ≠ τ s.t. P Ð→. / is s.t. P ∼ α α Proof. Because P ∼/ 0 there is α s.t. P Ð→. If for all P′ ∈ Π f , α ∈ Aτ , P Ð→ P′ ↓ and α = τ then P ≈ 0 and therefore all transitions that can be executed by P are stuttering transitions. This contradicts P ∈ Π↻ / . Theorem 5. If P,Q,R ∈ Π↻ / 0, Q ≈/ 0 and P ∥ Q ≈ R then depth(P) < depth(R) and depth(Q) < / , P ≈ depth(R). Proof. We prove depth(P) < depth(R), the proof that depth(Q) < depth(R) is analogous. Note that, since ω Q ≈/ 0, there is Q′ with depth(Q′ ) = 1 that is reachable from Q, that is, there exists ω ∈ A∗ s.t. Q Ô⇒ Q′ and α Q′ ∼/ 0 (we remark the symbol ∼/ ) and for all Q′′ ∈ Π f , α ∈ Aτ , Q′ Ð→ Q′′ ↓. Then, by Lemma 15, Q′ ∈ Π↻ / α and, by Lemma 18, Q′ Ð→ with α ≠ τ . Furthermore, by Convention 1 and the symmetric version of rule ω α (Par-L) we have that P ∥ Q Ô⇒ P ∥ Q′ . By Lemma 17, P ∥ Q′ Ð→ P ∥ 0 and α ≠ τ imply P ∥ Q′ ≈/ P ∥ 0 ≈ P. ′ Because P ∈ Π↻ / , whenever S ∈ Π↻ / and S ≈ P ∥ Q , depth(S) ≥ 1 + depth(P) (⋆). Given that R ≈ P ∥ Q, ω ω P ∥ Q Ô⇒ P ∥ Q′ implies there is R′ s.t. R Ô⇒ R′ and R′ ≈ P ∥ Q′ . By Lemma 15, R′ ∈ Π↻ / . In addition, ′ ′ by (⋆), depth(R ) ≥ 1 + depth(P). Finally depth(R) ≥ depth(R ) ≥ 1 + depth(P) > depth(P). α α ′ ′ ′ Lemma 19. If P,Q ∈ Π↻ / , P ≈ Q and P Ô⇒ P , with α ∈ Aτ , then there is Q s.t. Q Ô⇒ Q . M.D. Lee and B. Luttik 57 5.2 Unique parallel decomposition The development in this section is similar to the development in Section 4.2, for this reason in some cases we use the same notation. This will not be a problem because both developments are independent. In order to use Theorem 1 we need to define a commutative monoid with a decomposition order. The commutative monoid is defined by • P≈ = {[P]≈ ∶ P ∈ Π f } where [P]≈ = {P′ ∶ P′ ≈ P} • e = [0]≈ ∈ P≈ . • ∥ ⊆ P≈ × P≈ is s.t. [P]≈ ∥ [Q]≈ = [P ∣ Q]≈ Notice that we cannot ensure that for all P′ ,P′′ ∈ [P]≈ , depth(P′ ) = depth(P′′ ). Then, we extend the / ′ notion of depth in the following way. Define [P]↻ / . For [P]≈ ∈ P≈ , depth([P]≈ ) = depth(P ) ≈ = [P]≈ ∩ Π↻ ↻ / ′ with P ∈ [P]≈ . This definition is sound because of Lemma 14 and Theorem 4. Lemma 20. P≈ with neutral element [0]≈ and binary operation ∥ is a commutative monoid. I.e., ∥ ⊆ P≈ × P≈ satisfies the associativity, commutativity and identity properties. We shall define the partial order ≼ over P≈ using the relation Ð → ⊆ P≈ × P≈ defined as follows: α / ↻ / ′ ′ ′ Ð →0 = {([P]≈ ,[Q]≈ ) ∶ ∃P′ ∈ [P]↻ ≈ ,Q ∈ [Q]≈ ∶ P Ô⇒ Q , α ∈ Aτ and ∃/ P0 ,P1 ∈ Π↻ / 0,P1 ≈/ 0,P0 ∣ P1 ≈ P} / s.t. P0 ≈ Ð →k+1 = {([P0 ∣ P1 ]≈ ,[Q0 ∣ P1 ]≈ ) ∶ [P0 ]≈ Ð →k [Q0 ]≈ ,P1 ∈ Π f } ∪ {([P0 ∣ P1 ]≈ ,[P0 ∣ Q1 ]≈ ) ∶ [P1 ]≈ Ð →k [Q1 ]≈ ,P0 ∈ Π f } ∞ Ð →= ⋃ Ð →k k=0 The partial order ≼ is defined as the inverse of the reflexive-transitive closure of Ð → i.e., ≼ = (Ð →∗ )−1 . We write [P]≈ ≺ [Q]≈ if [P]≈ ≼ [Q]≈ and [P]≈ ≠ [Q]≈ . Notice that in this case Ð → takes into account processes in Π↻ / and weak transitions that execute at least one transition. Also notice that we are avoiding communications between the arguments of the parallel composition in order to avoid scope extrusion. Similarly to the strong setting, we need two lemmas, Lemmas 21 and 22, to prove that ≼ is a partial order (Lemma 23). In addition, to prove that ≼ is a decomposition order, we need the Lemma 24 that is equivalent to Lemma 11. The proofs of these results follow similarly to their respective counterpart in the strong setting. (The complete proofs are in the appendix.) α Lemma 21. If [P]≈ Ð → [Q]≈ then for all P̃ ∈ [P]≈ there are α ∈ Aτ and Q̃ ∈ [Q]≈ s.t. P̃ Ô⇒ Q̃. Lemma 22. If [P]≈ Ð → [Q]≈ then depth([P]≈ ) > depth([Q]≈ ). Lemma 23. ≼ is a partial order. Lemma 24. If P ∈ Π↻ → [Q]≈ . / and depth(P) > 0 then there is Q s.t. [P]≈ Ð We are ready to prove that ≼⊆ P≈ × P≈ is a decomposition order. This proof does not present changes w.r.t. proof of Lemma 12 except that for proving ≼ is Archimedean, we use Theorem 5. Notice that there is no lemma equivalent to Lemma 6 in the weak setting. Lemma 25. ≼ ⊆ P≈ × P≈ is a decomposition order. By Theorem 1, it follows that P≈ has unique decomposition. Corollary 2. The commutative monoid P≈ has unique decomposition. Unique Parallel Decomposition for the π-calculus 58 6 Final Remarks In this paper we have proved that finite processes of the π -calculus satisfy UPD w.r.t. both strong bisimilarity and weak bisimilarity. We have obtained these results using the technique presented in [15] (see Theorem 1) and different properties that are satisfied in each setting. For the strong setting, we had to prove properties related to the depth of processes. For the weak setting, we had to prove properties related to processes that execute no stuttering transitions. Our results show that the abstract framework of [15] can be used in the context of the π -calculus, dealing with the complications that arise from scope extrusion. In addition, the same framework can be used to deal with the weak setting if one considers processes without stuttering transitions. In this way, we have avoided the abstract technique introduced in [14] which is considerably more involved than the technique that we have used in this paper. In Section 4 we showed with two examples that norm is not additive for the π -calculus and therefore some proofs in [7] are flawed. After pointing out this problem to Dreier et al., they proposed us an alternative definition of norm to solve it. Call this variant norm′ . Roughly, norm′ should not consider traces where there is a scope extrusion of processes. We think this solution may work for the applied π -calculus, but is not suitable for the variant of the π -calculus considered in the present paper. We first explain what is the problem in our context, and then why this problem is not present in applied π . In the first example in Section 4, we had P = P0 ∣ P1 = ν z(az) ∣ a(x).!xa. Process P is not normed, i.e. τ → ν z(0 ∣!za) ↓, goes through a norm′ (P) = ∞, because the only finite trace that the process executes, P Ð scope extrusion. Now, consider the process P′ = ν z(az).(0 ∣ a(x).!xa) + a(x).(ν z(az) ∣!xa) + τ .(ν z(0 ∣!za)) ; it would be normed according to the alternative definition suggested above (the τ -transition from P′ is not the result of a scope extrusion). Now, since P′ is just the expansion of P, it is clear that P ∼ P′ . Thus, we find that the property of being normed is not compatible with bisimilarity. Since the applied π -calculus does not include the construct for non-deterministic choice needed for the expansion, this problem is not present there. An open question that leaves this paper is related with UPD of the π -calculus w.r.t. strong full bisimilarity[20]. Strong full bisimilarity is a stronger notion of bisimulation that is a congruence for all constructs of the π -calculus. We have tried to apply the abstract technique in this setting so far without success. When we tried to repeat the result in Section 4, taking into account the universal quantification in the definition of strong full bisimilarity, a problem arose when we wanted to prove that the order is a decomposition order. Particularly, we were not able to prove that the order is strict compatible. Notice that this problem is not present in the asynchronous π -calculus[20], a well-known fragment of the π -calculus, because (strong) bisimilarity and (strong) full bisimilarity coincide. Acknowledgement. The authors thank Daniel Hirschkoff for discussions, comments and suggestions on various drafts of this paper, and anonymous reviewers for their thorough reviews and good suggestions. References [1] L. Aceto, W. Fokkink, A. Ingólfsdóttir & B. Luttik (2005): CCS with Hennessy’s merge has no finiteequational axiomatization. Theor. Comput. Sci. 330(3), pp. 377–405, doi:10.1016/j.tcs.2004.10.003. [2] L. Aceto, W. Fokkink, A. Ingólfsdóttir & B.. Luttik (2009): A finite equational base for CCS with left merge and communication merge. ACM Trans. Comput. Log. 10(1), doi:10.1145/1459010.1459016. M.D. Lee and B. Luttik 59 [3] L. Aceto, A. Ingólfsdóttir, B. Luttik & P. van Tilburg (2008): Finite Equational Bases for Fragments of CCS with Restriction and Relabelling. In: IFIP 20th World Computer Congress, TC 1, Foundations of Computer Science, pp. 317–332, doi:10.1007/978-0-387-09680-3 22. [4] I. Castellani (1998): Bisimulations for Concurrency. Ph.D. thesis, University of Edinburgh. Also published as LFCS-88-51. [5] S. Christensen (1993): Decidability and Decomposition in Process Algebra. Ph.D. thesis, University of Edinburgh. [6] F. Corradini, R. Gorrieri & D. Marchignoli (1998): Towards parallelization of concurrent systems. Informatique théorique et applications 32(4-6), pp. 99–125. [7] J. Dreier, C. Ene, P. Lafourcade & Y. Lakhnech (2016): On the existence and decidability of unique Theor. Comput. Sci. 612, pp. 102–125, decompositions of processes in the applied π -calculus. doi:10.1016/j.tcs.2015.11.033. [8] J. Dreier, P. Lafourcade & Y. Lakhnech (2012): Defining Privacy for Weighted Votes, Single and Multi-voter Coercion. In: ESORICS 2012, pp. 451–468, doi:10.1007/978-3-642-33167-1 26. [9] W. Fokkink & B. Luttik (2000): An omega-Complete Equational Specification of Interleaving. In: Automata, Languages and Programming, 27th International Colloquium, ICALP 2000, pp. 729–743, doi:10.1007/3-540-45022-X 61. [10] J. Friso Groote & F. Moller (1992): Verification of Parallel Systems via Decomposition. In: CONCUR ’92, Third International Conference on Concurrency Theory, pp. 62–76, doi:10.1007/BFb0084783. [11] D. Hirschkoff & D. Pous (2008): A Distribution Law for CCS and a New Congruence Result for the π calculus. Logical Methods in Computer Science 4(2), doi:10.2168/LMCS-4(2:4)2008. [12] Y. Hirshfeld & M. Jerrum (1999): Bisimulation Equivalence Is Decidable for Normed Process Algebra. In: Automata, Languages and Programming, 26th International Colloquium, ICALP’99, pp. 412–421, doi:10.1007/3-540-48523-6 38. [13] I. Lanese, J. A. Pérez, D. Sangiorgi & A. Schmitt (2011): On the expressiveness and decidability of higherorder process calculi. Inf. Comput. 209(2), pp. 198–226, doi:10.1016/j.ic.2010.10.001. [14] B. Luttik (2016): Unique parallel decomposition in branching and weak bisimulation semantics. Theor. Comput. Sci. 612, pp. 29–44, doi:10.1016/j.tcs.2015.10.013. [15] B. Luttik & V. van Oostrom (2005): Decomposition orders another generalisation of the fundamental theorem of arithmetic. Theor. Comput. Sci. 335(2-3), pp. 147–186, doi:10.1016/j.tcs.2004.11.019. [16] R. Milner & F. Moller (1993): Unique Decomposition of Processes. Theor. Comput. Sci. 107(2), pp. 357– 363, doi:10.1016/0304-3975(93)90176-T. [17] F. Moller (1989): Axioms for Concurrency. Ph.D. thesis, University of Edinburgh. [18] F. Moller (1990): The Importance of the Left Merge Operator in Process Algebras. In: Automata, Languages and Programming, 17th International Colloquium, ICALP90, pp. 752–764, doi:10.1007/BFb0032072. [19] F. Moller (1990): The Nonexistence of Finite Axiomatisations for CCS Congruences. In: Proceedings of LICS ’90, pp. 142–153, doi:10.1109/LICS.1990.113741. [20] D. Sangiorgi & D. Walker (2001): π -Calculus: A Theory of Mobile Processes. Cambridge University Press, New York, NY, USA.
6cs.PL
arXiv:1801.08207v1 [math.AC] 24 Jan 2018 MODULES OF INFINITE REGULARITY OVER COMMUTATIVE GRADED RINGS LUIGI FERRARO Abstract. In this work, we prove that if a graded, commutative algebra R over a field k is not Koszul then, denoting by m the maximal homogeneous ideal, the nonzero modules of the form mM have infinite CastelnuovoMumford regularity. We also prove that over complete intersections which are not Koszul, a nonzero direct summand of a syzygy of k has infinite regularity. Finally, we relate the vanishing of the graded deviations of R to having a nonzero direct summand of a syzygy of k of finite regularity. Introduction Let k[x1 , . . . , xn ] be a polynomial ring, graded by setting deg xi = di ≥ 1, and let R = k[x1 , . . . , xn ]/I where I is a homogeneous ideal. We denote by m the maximal homogeneous ideal of R. The size of a minimal free resolution of a graded Rmodule M is measured by its graded Betti numbers βi,j (M ) = rankk Exti,j R (M, k). Invariants arising from the Betti numbers of M are its projective dimension and its Castelnuovo-Mumford regularity. In [4], Avramov and Eisenbud prove that the regularity of k is finite if and only if the regularity of every finitely generated module is finite. In [3], Avramov proves that nonzero modules of the form mM have infinite projective dimension, provided that R is not regular. In this article, we prove that nonzero modules of the form mM also have infinite regularity, provided that R is not Koszul. In section 2, we prove that a nonzero direct summand of a syzygy of k has infinite regularity, provided that R is a complete intersection that is not Koszul. We ask whether or not this holds true for any non-Koszul ring. In section 3, we provide a connection between having a nonzero direct summand of a syzygy of k of finite regularity and the vanishing of the graded deviations of R. 1. Tightly embeddable modules In this section we construct a class of modules, that have infinite regularity over non-Koszul rings. Definition. Let M be a graded R-module. We say that M is tightly embeddable if there exists a finitely generated graded R-module L such that mM & mL ⊆ M ⊆ L. In this case, M ⊆ L is a tight embedding. 1.1. It follows from Nakayama’s Lemma that if L is finitely generated, then mi L ⊆ mi−1 L is a tight embedding for each i ≥ 1 such that mi L is not zero. 1 2 LUIGI FERRARO Motivated by the results in [3], we explore the relation between tightly embeddable modules and regularity. We establish the convention that if V is a graded k-vector space then V j = V−j : 1.2. The Hilbert series of a graded k-vector space V is X rankk Vj sj . HV (s) = j 1.3. The bigraded Poincaré series of a finitely generated graded R-module M is X R R βi,j (M )sj ti ∈ Z[s±1 ][[t]]. PM (s, t) = 1.4. Let X i ai ti and then we write X i,j bi ti be formal power series in Z[[t]]. If ai ≤ bi for every i, i X a i ti  X b i ti  X i i or X b i ti a i ti . i i 1.5. If A is a graded k-algebra and X is a graded A-module, then the sth shift of X is the graded A-module (Σs X)i = X i−s . Here, the A-action is defined as a · x = (−1)|a|s ax, where |a| denotes the degree of a. Remark 1.6. In accordance with a bigraded version of Gulliksen and Levin [6], the algebra ExtR (k, k) is a (bi-)graded Hopf k-algebra. This algebra is the universal enveloping algebra of a (bi-)graded Lie algebra π ∗,∗ (R) where the first degree is homological and the second is the internal degree. This follows from bigraded versions of the theorems in [8, (5.18)] (characteristic 0), [1, Theorem 17] (positive odd characteristic) [9, Theorem 2] (characteristic 2). Notation 1.7. We denote by E the algebra ExtR (k, k). For every R-module M , we denote by E(M ) the left E-module ExtR (M, k). The following theorem is a graded version of [3, Lemma 6] and has a similar proof. Theorem 1.8. If M ⊆ L is a tight embedding, then, with V = coefficient-wise inequality n Y R HV (s)PkR (s, t)  PM (s, t) (1 + sdi t). i=1 Proof. We set the following notation M = M/mM, L = L/mL, N = L/M, W = L/mM. Consider the following commutative diagram /L /N /M (1.8.1) 0 0  /M  /W /N /0 /0 mL mM , there exists a MODULES OF INFINITE REGULARITY OVER COMMUTATIVE GRADED RINGS 3 This induces a commutative diagram of homomorphisms of bigraded left E-modules. (1.8.2) E(L) O / E(M ) O ð / ΣE(N ) E(W ) / E(M ) δ / ΣE(N ). ∨ As m annihilates M and N , there are natural isomorphisms E(M ) ∼ = E ⊗k M and E(N ) ∼ = E ⊗k N ∨ . Let K denote the universal enveloping algebra of π ≥2,∗ (R). Consider the following commutative diagram E(M ) O M ∨ δ / ΣE(N ) O δ0 / E 1 ⊗k N ∨ where the vertical maps are natural injective maps. Fix the k-basis ∨ ν1 , . . . , νn of N ∨ , µ1 , . . . , µm of M , ξ1 , . . . , ξe of E 1 . The map δ is E-linear and so is also K-linear. Hence, if ε ∈ E δ(ε ⊗ µh ) = εδ 0 (µh ) = Σi,j ai,j,h εξj ⊗ νi where δ 0 (µh ) = Σi,j ai,j,h ξj ⊗ νi with ai,j,h ∈ k. By the Poincaré-Birkhoff-Witt theorem, E is a free K-module with basis (1.8.3) {ξj1 · · · ξjk }j1 <···<jk . Hence, E(N ) is a free K-module with basis (1.8.4) {ξj1 · · · ξjk ⊗ νi }j1 <···<jk ,i . If κ ∈ K, then δ(κ ⊗ µh ) = Σi,j ai,j,h κξj ⊗ νi . This means that as a K-module Im δ|K⊗k M ∨ is generated by the elements δ 0 (µh ). We can change the basis of M ∨ such that the coordinate vectors of δ 0 (µ1 ), . . . , δ 0 (µm′ ), with respect to the basis (1.8.4), are linearly independent over k and δ 0 (µm′ +1 ), . . . , δ 0 (µm ) are all zero. Because the elements ξj ⊗ νi are part of a K-basis of E(N ) we deduce that δ 0 (µ1 ), . . . , δ 0 (µm′ ) are linearly independent over K. As a result Im δ|K⊗k M ∨ = ΣK ⊗k Im δ 0 . This means that E(N ) contains a copy of K ⊗k Im δ 0 , and based on the commutativity of the diagram (1.8.2), this gives HE(M) (s, t)  HK⊗k Im δ0 (s, t) = HK (s, t)HIm δ0 (s). 4 LUIGI FERRARO According to (1.8.3), there is an equality of formal power series HK (s, t) = HE (s, t) . HV E 1 (s, t) Because E 1 ∼ = (m/m2 )∨ and HX ∨ (t) = HX (t−1 ) for every R-module X, we deduce Y (1 + s−di t). HV E 1 (s, t) = i Now, consider the following chain of equalities of Hilbert series HIm δ0 (s) = HM ∨ (s) − HW ∨ (s) + HN ∨ (s) = HM (s−1 ) − HW ∨ (s) + HN (s−1 ) = HW (s−1 ) − HW ∨ (s) = HV (s−1 ) + HL (s−1 ) − HW ∨ (s) = HV (s−1 ). The first equality follows from the exact sequence in cohomology induced by the first row in (1.8.1), i.e., 0 → N ∨ → (W )∨ → M ∨ → Im δ 0 → 0, the second equality follows from the already mentioned fact that HX ∨ (t) = HX (t−1 ) for every R-module X. The third equality follows from the second row in (1.8.1), the fourth equality follows from 0 → V → W → L → 0, and the last equality follows from HW ∨ (s) = HL (s−1 ). Holistically we obtain HE(M) (s, t)  HK⊗k Im δ0 (s, t) = HK (s, t)HIm δ0 (s, t) HE (s, t) H (s−1 ). −di t) V (1 + s i=1 = Qn Now, we observe that R −1 HE(M) (s, t) = PM (s , t) and HE (s, t) = PkR (s−1 , t). Hence, we obtain P R (s−1 , t) R −1 PM (s , t)  Qn k H (s−1 ), −di t) V i=1 (1 + s and replacing s−1 with s, we obtain the desired inequality.  Let M be a finitely generated graded R-module. The Castelnuovo-Mumford regularity of M is reg M = sup{j − i | βi,j (M ) 6= 0}. Definition. A ring R is Koszul if the algebra ExtR (k, k) is generated by Ext1,∗ R (k, k). According to [5], if reg k < ∞, then reg k = Σi (di − 1); this result can happen if and only if R is Koszul. MODULES OF INFINITE REGULARITY OVER COMMUTATIVE GRADED RINGS 5 Corollary 1.9. If M is a tightly embeddable module and reg M < ∞, then R is Koszul. R Proof. Set r := reg M . If reg M < ∞, then βi,j (M ) = 0 for j − i > r. If Y R Σi,j ai,j sj ti = PM (s, t) (1 + sdi t), i then ai,j = 0 for j − i > r′ . By Theorem 1.8, if Σi,j ci,j sj ti = HV (s)PkR (s, t), R then ci,j = 0 if j − i > r′ for some r′ . Because mL/mM 6= 0 we deduce βi,j (k) = 0 ′′ ′′ if j − i > r for some r , which is equivalent to reg k < ∞.  2. Direct summands of syzygies of the residue field In this section, we prove that nonzero direct summands of syzygies of k have infinite regularity if R is a complete intersection that is not generated by quadrics. Special homological properties of this class of modules were already noticed in [3, 7, 10]. Theorem 2.1. If R is a complete intersection, M = Ωm k, β : M → N is an Rmodule homomorphism of finitely generated graded R-modules such that for some n, the map β n : ExtnR (N, k) → ExtnR (M, k) is not zero, then for some b ∈ Z, there is a coefficient-wise inequality n Y sb PkR (s, t)  PΩRn N (s, t) (1 + sdi t). i=1 Proof. We set the following notation N ′ = Ωn N, ′ N = N ′ /mN ′ , M ′ = Ωm+n k., Let π be the canonical projection N ′ → N ′ /mN ′ and β ′ be a morphism M ′ → N ′ obtained by extending β to a morphism of free resolutions. Let ξ denote the composed map ∗ ′∗ ∗ ′ ′ π β α ξ : E ⊗k (N )∨ ∼ = E(N ) −→ E(N ′ ) −−→ E(M ′ ) −−→ Σm+n E ≥m+n,∗ , where α∗ is an iterated connecting homomorphism, and hence is an isomorphism. By construction, ξ 0 6= 0. V As a result of the Poincaré-Birkhoff-Witt Theorem, E ∼ = K⊗k E 1 as (bi-)graded left K-modules, if R is a complete intersection, then π i,∗ (R) = 0 if i ≥ 3 (see for example, [2, Theorem 7.3.3 and Theorem 10.1.2] and the references given there). Because π i,∗ (R) = 0 if i ≥ 3, K is a polynomial ring. Hence, Im ξ is a torsion-free K-module (because E ≥m+n is a submodule of a free module over the polynomial ring K). As a result, any nonzero element in the image of ξ 0 generates a copy of K in Im ξ, whose internal degree might be shifted by some b ∈ Z. It follows that HE (s, t) . −di t) i=1 (1 + s HE(N ′ ) (s, t)  sb HK (s, t) = sb Qn Now, we conclude as in Theorem 1.8.  Corollary 2.2. Let R be a complete intersection with reg k = ∞. For any n ≥ 0, each nonzero direct summand of Ωn k has infinite regularity. 6 LUIGI FERRARO We raise the following question: Question 2.3. If β : Ωm k → N is an R-module homomorphism of finitely generated graded R-modules such that for some n the map β n : ExtnR (N, k) → ExtnR (Ωm k, k) is not zero and N has finite regularity, then is R Koszul? 3. On the vanishing of the graded deviations In this section, we relate Question 2.3 and the vanishing of the graded deviations of R. Let RhXi be an acyclic closure of k (see [2, 6.3] for the definition). Over graded rings, we require the differential of the acyclic closure to be a homogeneous map. For the differential to be homogeneous, we must give the elements of X an internal grading, making X a bigraded set. Definition. The (i, j)th graded deviation of R is εi,j (R) := Card(Xi,j ), where Xi,j is the set of variables in the acyclic closure of homological degree i and internal degree j. Theorem 3.1. If M = Ωm k and β : M → N is a homomorphism of finitely generated graded R-modules such that for some n the map β n : ExtnR (N, k) → ExtnR (M, k) is not zero and reg N < ∞, then εi,j (R) = 0 for i > m + n and i 6= j. Proof. We set the following notation ′ N ′ = Ωn N, N = N ′ /mN ′ , M ′ = Ωm+n k. Let π be the canonical projection N ′ → N ′ /mN ′ and β ′ be a morphism M ′ → N ′ obtained by extending β to a morphism of free resolutions. Let V be the universal enveloping algebra of π >m+n,∗ (R). Let ξ denote the composed map β ′∗ π∗ ′ α∗ ξ : E(N ) −→ E(N ′ ) −−→ E(M ′ ) −−→ Σm+n E ≥m+n,∗ . Consider the following commutative diagram ξ ′ E(N ) O / Σm+n E ≥m+n,∗ O ξ0 ′ (N )∨ / E m+n,∗ By the Poincaré-Birkhoff-Witt theorem, a V-basis of E ≥m+n is given by (3.1.1) (i ) {θ1 1 · · · θn(in ) ||θ1 | ≤ · · · ≤ |θn |, ij ≤ 1 if |θj | odd , X ij |θj | ≥ m + n, θj ∈ π <m+n,∗ (R)}. j The V-module Im ξ|V⊗k (N ′ )∨ is generated by the elements ξ 0 (νh ), where ν1 , . . . , νm MODULES OF INFINITE REGULARITY OVER COMMUTATIVE GRADED RINGS 7 ′ is a k-basis of (N )∨ . We set X (i ) ξ 0 (νh ) = ai1 ,...,in θ1 1 · · · θn(in ) , ai1 ,...,in ∈ k. ′ We can change the basis of (N )∨ so that the coordinate vectors of ξ 0 (ν1 ), . . . , ξ 0 (νn′ ), with respect to the basis (3.1.1), are linearly independent over k and ξ 0 (νn′ +1 ), . . . , ξ 0 (νn ) (i ) (i ) are all zero. Because the elements θ1 1 · · · θn n form a basis of E ≥m+n,∗ over V, we deduce that ξ 0 (ν1 ), . . . , ξ 0 (νn′ ) are also linearly independent over V. Therefore Im ξ|V⊗k (N ′ )∨ = Σm+n V ⊗ Im ξ 0 . This means that Im ξ contains a copy of V and by the construction of ξ so does E(N ′ ). Now, we recall that by [2, Theorem 10.2.1] dimk π i,j (R) = εi,j (R). If there is an even i > m + n such that εi,j (R) 6= 0 and i 6= j, then there is a nonzero element x ∈ π i,j (R). The powers of x belong to V. However, a copy of V is contained in E(N ′ ). Because bideg x = (i, j), then bideg x(l) = (li, lj) and lj − li = l(j − i) goes to ∞ as l goes to ∞. This implies that reg N ′ = ∞, which is a contradiction. If there are infinitely many i with i > m + n, i odd, i 6= 0, and εi,j (R) 6= 0, then there are infinitely many nonzero xt with t = 1, 2, . . . belonging to π it ,jt (R). The products x1 x2 · · · xs belong to V. However, a copy of V is contained in E(N ′ ). The bidegree of this product is bideg x1 x2 · · · xs = (i1 + i2 + · · · + is , j1 + j2 + · · · + js ), and because jt − it ≥ 1 for every t, the following inequality holds j1 + j2 + · · · + js − (i1 + i2 + · · · + is ) ≥ s, and as s goes to ∞, we obtain reg N ′ = ∞, which is a contradiction. Now, we assume that εi,j (R) 6= 0 for finitely many i with i > m + n, i odd, and i 6= j. Let RhXi be an acyclic closure of k. Then we can choose an element y ∈ X that is of odd degree, off-diagonal, and of maximal homological degree. We denote by |.| the homological degree of a homogeneous element in the acyclic closure and by deg its internal degree. We claim that A = RhX\{y}i is a DG subalgebra of the acyclic closure. Indeed, if x1 , . . . , xn , y are all the odd elements and off-diagonal, then, by [5, Lemma 7], RhX\{x1 , . . . , xn , y}i is a DG subalgebra of the acyclic closure. By the maximality of y, A is a DG subalgebra of the acyclic closure. Hence, A is a DG algebra, and the acyclic closure of k can be written as Ahyi, implying (by [5, Lemma 6]) that |y| = 1, which is a contradiction because m ≥ 1.  Proposition 3.2. Let d ≥ 4 be an even number. If εi,j (R) = 0 for i ≥ d and i 6= j, then εi,j (R) = 0 for i ≥ d − 1 and i 6= j. 8 LUIGI FERRARO Proof. Let RhXi be an acyclic closure of k. Let y be an element of X of homological degree d − 1, we need to prove that deg y = d − 1. We assume that y appears in a boundary of a (bi)homogeneous element x with |x| ≥ d X dx = ri ai + rwy. The following string of (in)equalities is observed deg w + deg y = deg(wy) ≥ |wy| = |x| − 1 = deg x − 1 = deg w + deg y + deg r − 1 ≥ deg w + deg y. We deduce that deg w + deg y = |w| + |y|. If deg y > |y|, then deg w < |w|, which is not possible; hence, deg y = |y|. If y does not appear in the boundary of any element, then we can write the acyclic closure as Ahyi with A = RhX\{y}i, and by [5, Lemma 6] |y| = 1, hence d = 2, which is not possible.  We set εi (R) = Σj εi,j (R). It is known that if εi (R) = 0 for i ≫ 0, then εi (R) = 0 for i ≥ 3, see [2, Theorem 7.3.3]. Motivated by this and by the previous proposition, we raise the following question Question 3.3. If εi,j (R) = 0 when i ≫ 0 and i 6= j, is it true that εi,j (R) = 0 when i ≥ 3 and i 6= j? By [2, Theorem 7.3.3] and [2, Theorem 7.3.2], 1) εi (R) = 0 for i ≥ 2 if and only if R is regular, and 2) εi (R) = 0 for i ≥ 3 if and only if R is a complete intersection. By [5, Theorem 2], if εi,j (R) = 0 when i ≥ 2 and i 6= j, then the ring R is of the form Q ⊗k S with Q regular and S a standard graded Koszul ring. Motivated by these results, we raise the following question Question 3.4. If εi,j (R) = 0 when i ≥ 3 and i 6= j, then is the ring R of the form Q ⊗k S with Q a complete intersection and S a standard graded Koszul ring? Acknowledgements The author would like to thank his advisors L. Avramov and S. Iyengar for helpful conversations. References [1] M. André, Hopf algebras with divided powers, J. Algebra 18 1971 19-50. [2] L. L. Avramov, Infinite free resolutions, Six Lectures on Commutative Algebra (Bellaterra, 1996), Progr. Math. 166, Birkhäuser, Basel, 1998; pp. 1–118. [3] L. L. Avramov Modules with extremal resolutions, Math. Res. Lett. 3 (1996), 319-328. [4] L. L. Avramov, D. Eisenbud, Regularity of modules over a Koszul algebra, J. Algebra 153 (1992), no. 1, 85-90. [5] L. L. Avramov, I. Peeva, Finite regularity and Koszul algebras, Amer. J. Math. 123 (2001), 275–281 [6] T. H. Gulliksen, G. Levin, Homology of local rings, Queens Papers Pure Appl. Math. 20, Queens Univ., Kingston, ON (1969). MODULES OF INFINITE REGULARITY OVER COMMUTATIVE GRADED RINGS 9 [7] A. Martsinkovsky, A remarkable property of the (co) syzygy modules of the residue field of a nonregular local ring, J. Pure Appl. Algebra 110 (1996), no. 1, 9-13. [8] J. W. Milnor, J. C. Moore, On the structure of Hopf algebras, Ann. of Math. (2) 81 1965 211-264. [9] G. Sjödin, Hopf algebras and derivations, J. Algebra 64 (1980), no. 1, 218-229. [10] R. Takahashi, Syzygy modules with semidualizing or G-projective summands, J. Algebra 295 (2006), no. 1, 179-194.
0math.AC
arXiv:1802.01239v1 [cs.DS] 5 Feb 2018 Counting and Uniform Sampling from Markov Equivalent DAGs AmirEmad Ghassami,1 Saber Salehkaleybar,2 Negar Kiyavash1 1 Department of ECE, Coordinated Science Laboratory, University of Illinois at Urbana-Champaign, Urbana, IL, USA 2 Electrical Engineering Department, Sharif University of Technology, Tehran, Iran 1 {ghassam2,kiyavash}@illinois.edu, 2 [email protected] We propose an exact solution for the problem of finding the size of a Markov equivalence class (MEC). For the bounded degree graphs, the proposed solution is capable of computing the size of the MEC in polynomial time. Our proposed approach is based on a recursive method for counting the number of the elements of the MEC when a specific vertex is set as the source variable. We will further use the idea to design a sampler, which is capable of sampling from an MEC uniformly in polynomial time. 1 Introduction Directed acyclic graphs (DAGs) are the most commonly used graphical model to represent causal relationships among a set of variables. In a DAG representation, a directed edge indicates a direct causal relationship between the corresponding variables. Under Markov property and faithfulness assumptions, conditional d-separation of variables in a DAG is in bijective correspondence with conditional independencies of the variables in the underlying joint probability distribution (Spirtes et al., 2000), and hence, a DAG representation demonstrates conditional independencies among its variables. The general approach for learning a causal structure is to use statistical data from the variables to find a DAG which is the most consistent with the conditional independencies in the given data. However, a DAG representation of a set of conditional independencies is not always unique. 1 This restricts the learning of the causal structure to Markov equivalence classes (MECs), where elements of each class represent the same set of conditional independencies. There is no preference between the elements of an MEC. Therefore, for a given set of data, or more generally, for a given joint probability distribution on the variables, the size of the MEC, i.e., the number of its elements, is a clear metric for measuring the success of an observational structure learning approach, and indicates the necessity of using interventional experiments. This indicates the importance of awareness about the size of the MEC for a given structure of interest. Moreover, as mentioned earlier, one can compare different DAGs to find the most consistent one with a given joint distribution over the variables. Here, the space of DAGs , or the space of MECs can be chosen as the search space. Chickering showed that when the size of the MECs are large, searching over the space of MECs is more efficient (Chickering, 2002). This again indicates the importance of learning the size of MECs. To the best of our knowledge, the main existing solution to the problem of finding the size of MECs is to use Markov chain methods (He et al., 2013, Bernstein and Tetali, 2017). According to this method, a Markov chain is constructed over the elements of the MEC whose properties ensure that the stationary distribution is uniform over all the elements. The main problems with the Markov chain method are its non-negligible time required for convergence and computational issues, which in some cases prevents its use in practice. In this paper, we propose an exact solution for the problem of finding the size of an MEC. For the bounded degree graphs, the proposed solution is capable of computing the size of MEC in polynomial time. Our proposed approach is based on a recursive method for counting the number of the elements of the MEC when a specific vertex being set as the source variable. As mentioned earlier, in an observational setting, there is no preference between the elements of an MEC. Therefore, a reasonable approach for testing the performance of an algorithm on an MEC is to test it on uniformly drawn samples from the MEC. This indicates the importance of the ability of sampling from an MEC uniformly. We will use the introduced idea to design a sampler, which is capable of sampling from an MEC uniformly in polynomial time. This approach is applied to finding the best set of variables to intervene on when we are restricted to a certain budget for the number of experiments (Ghassami et al., 2017). The rest of the paper is organized as follows. In Section 2, we present the problem description. The method for counting the elements of an MEC is presented in Section 3. The counting idea is then used in Section 4 to design a uniform sampler from Markov equivalent DAGs. 2 2 Problem Description An MEC is usually represented by a mixed graph M = (V, A, E), which is a graph containing both directed and undirected edges. V , A, and E denote the set of vertices, the set of directed edges and the set of undirected edges, respectively. The directed edges are those that have the same direction in all elements of the class, that is, their directions are essential. This is the reason that these mixed graphs are referred to as essential graph in the literature (Andersson et al., 1997). For the rest of the edges, which are undirected, there exist two elements of the class which do not agree on the direction of that edge. Essential graphs are also called complete partial directed acyclic graphs (PDAGs) (Chickering, 2002), and maximally oriented graphs (Meek, 1995). We define the skeleton of a DAG as an undirected graph on the same set of vertices as the original DAG, and with undirected version of the edges of the DAG. We also define v-structure as a structure comprising two converging directed edges whose tails are not connected by an edge. The following result due to Verma and Pearl (Verma and Pearl, 1991) characterizes Markov equivalence. Proposition 1 (Verma and Pearl, 1991). Two DAGs are Markov equivalent if and only if they have the same skeleton and the same v-structures. Proposition 1 indicates that all the edges which are a part of a v-structure are directed in the essential graph, i.e., in none of the members of an MEC, the subgraph corresponding to the undirected part of the essential graph is allowed to contain a v-structure. Let M be an essential graph. Consider the undirected graph resulted from removing all the directed edges from M . This graph consists of disconnected chain components {G1 , ..., Gc }. Note that each of these components will be an essential graph themselves. When the entire essential graph is undirected, it forms a single chain component. Andersson et al. showed that each of the chain components are chordal graphs (Andersson et al., 1997). Let Size(M ) denote the size of the MEC corresponding to M . Gillispie and Perlman showed that Size(M ) can be calculated as follows (Gillispie and Perlman, 2002). c Y Size(M ) = Size(Gi ). i=1 This result suggests that one can study each chain component separately. Therefore, we will study the problem of finding the size of an MEC for which the essential graph is a connected undirected chordal graph, and hence, none of the members of the MEC are allowed to have any v-structures. 3 3 Counting the Members of an MEC The goal in this section is to count the members of an MEC, for which the essential graph is a connected undirected chordal graph G = (V (G), E(G)). Define a source variable in a digraph, as one for which the incoming degree is zero. Also, let dG (v, u) be the distance between vertices v and u on G. The following result from (Bernstein and Tetali, 2017) is used in our proposed method. Proposition 2 (Bernstein and Tetali, 2017). Any acyclic and v-structure-free orientation of a connected graph G has a unique source variable. The unique source v, determines the orientation of all edges {u, w}, for which dG (v, u) 6= dG (v, w). Proposition 2 determines that the direction of some edges will be resolved when the source vertex is known. These are the edges with one endpoint closer to the source vertex than the other. We note that removing the resolved edges, the obtained digraph will remain acyclic and v-structure-free: Lemma 1. If the original digraph is acyclic and v-structure-free with source vertex v, the graph resulting from removing edges (u, w) with dG (v, u) 6= dG (v, w) is also acyclic and v-structurefree. Proof. Acyclicity is obvious as we are removing edges. To show the v-structure-freeness, consider a v-structure x → y ← z. We note that if a v-structure is created, it means that the shielding vertex {x, z} has been removed, that is, dG (v, x) 6= dG (v, z). But since (x, y) and (z, y) are unresolved, dG (v, x) = dG (v, y), and dG (v, y) = dG (v, z), which is a contradiction. Due to Lemma 1, we can orient the edges of G and obtain a member of the corresponding MEC as follows. First one vertex is chosen to be the source vertex. This will determine the orientation of some edges according to Proposition 2. Removing the resolved edges and resulted isolated vertices, we will have (possibly) disconnected components, where the components should again not contain cycles or v-structures. In each component, one vertex is chosen as the source vertex of that component. This procedure is repeated until no unresolved edge is left. The idea in the aforementioned procedure can be used in a recursive manner to count the members of the MEC. The main tool in our approach is presented in Theorem 1. Theorem 1. Let W(v, G) be the number of elements of the MEC with connected and undirected essential graph G, in which v is the source vertex; and let H be the undirected graph remained 4 after removing edges with one endpoint closed to v than the other, as well as removing the resulting isolated vertices. We have W(v, G) = Y X W(u, G0 ), G0 ∈comp(H) u∈V (G0 ) where comp(H) denotes the set of the components of H, and by convention, empty product (nullary product) is assumed to be the multiplicative identity 1. Proof. For each component of H, choosing different variables of that component as the source partitions the set of elements of the MEC. That is, two different choices for the source do not lead to the same DAG (due to Proposition 2), and no elements will be remained uncounted, as each variable is chosen as the source once. Therefore, we have the inner summation. To justify the outer product, we need to show that orientation of one component of H does not cause any restrictions on the possible orientations in any other component. This is due to the fact that each component is at a certain depth level from the source and they cannot create v-structures pointing to lower levels. Also, for the same reason and the fact that the edges from the source are towards each component, the edges in two component cannot create a cycle. Therefore, using Theorem 1, in order to count the members of an MEC, it suffices to calculate W(v, G) for all v ∈ V (G) and sum them up, that is, X Size(G) = W(v, G). (1) v∈V (G) The pseudo-code of our approach is presented in Algorithm 1. This code consists of two functions F LOWED and W. The function F LOWED takes an undirected and connected graph with one of its vertices as the input, and returns the set of edges whose orientation is resolved when the input vertex is set as the source vertex. Function W applies Theorem 1 in a recursive manner to calculate the number of elements of the MEC with connected and undirected essential graph G, when input vertex v is set as the source vertex. Theorem 2. Let n and ∆ denote the order and the maximum degree of the graph G, respectively. The computational complexity of Algorithm 1 is O(n∆ ). Proof. We consider the operation of Algorithm 1 in rounds. In the first round, F LOWED is called for all pairs (G, v1 ), v1 ∈ V (G). For any specific v1 ∈ V (G), we obtain undirected components Gv11 , Gv21 , ..., GvK11 . In the second round, for each component Gvk1 , 1 ≤ k ≤ K1 , we 5 Algorithm 1 MEC Size Calculator Input: P Undirected graph G = (V (G), E(G)). Size = v∈V (G) W(v, G). Output: Size. function F LOWED(v,G) Initiate: A = ∅. Set v as the source variable in G. for {u, w} ∈ E(G) do if dG (v, u) < dG (v, w) then A = A ∪ (u, w). end if if dG (v, u) > dG (v, w) then A = A ∪ (w, u). end if end for return A. end function function W(v,G) F = Undirected version of elements of F LOWED(v, G). G0 = G\F . Remove isolated vertices from G0 . Y X return W(u, G) G∈comp(G0 ) u∈V (G) end function call F LOWED for all pairs (Gvk1 , v2 ), v2 ∈ V (Gvk1 ). For any specific v2 ∈ V (Gvk1 ), we obtain undirected components Gv11 v2 , Gv21 v2 , ..., GvK12v2 , and we continue this procedure. It suffices to show that this procedure could be repeated only for ∆ rounds. Therefore, since in each round the function F LOWED is called at most n times, we get the desired result. Suppose that in a round, we obtain an undirected component G0 and execute F LOWED on it for a pair (G0 , v), where v ∈ V (G0 ). Let G01 , · · · , G0K be the resulting undirected components. We first show that for any vertex u ∈ V (G0i ), (1 ≤ i ≤ K), we have obtained a directed edge in G0 from some vertex w to u after applying F LOWED. By contradiction, suppose that there is no such directed edge. Consider the shortest path from v to u. This path must pass through one of neighbors of u in G0i such as w. Since d(v, w) < d(v, u), (u, w) should be oriented as w → u by calling F LOWED procedure. But it is in contradiction with the fact that u and w are in G0i and thus there should be such a directed edge in G0 . For any vertex u ∈ V (G), consider the set of all edges in E(G) which intersect with u. 6 𝑣1 𝐺 𝑣2 𝑣1 (𝑏) 𝑣4 𝑣4 𝑣3 (𝑐) 𝑣2 (𝑎) 𝐺′ 𝑣4 𝑣3 𝑣2 𝑣3 𝑣2 𝑣1 𝑣3 (𝑑) 𝑣4 𝐺′′ 𝑣1 𝑣3 (𝑒) Figure 1: Graphs related to Example 1. Based on the reasoning above, at least one of these edges will be oriented in a round if vertex u is still in one of undirected components before that round. Since the degree of u is at most ∆, all of these edges will be oriented after at most ∆ rounds. Example 1. Consider the undirected graph presented in Figure 1(a) as the essential graph given as the input to Algorithm 1. Setting vertex v1 as the source vertex, the direction of edges (v1 , v2 ), (v1 , v3 ), (v2 , v4 ), and (v3 , v4 ) will be obtained using function F LOWED(v1 , G), as shown in Figure 1(b). Therefore, the remaining undirected graph is G0 , shown in Figure 1(c). Setting each vertex in G0 as the source vertex, no undirected component will be remained. Hence, W(v2 , G0 ) = W(v3 , G0 ) = 1. Therefore, W(v1 , G) = W(v2 , G0 ) + W(v3 , G0 ) = 2. Due to the symmetry in the structure, we have W(v4 , G) = 2 as well. Setting vertex v2 as the source vertex, the direction of edges (v2 , v1 ), (v2 , v3 ), and (v2 , v4 ) will be obtained using function F LOWED(v2 , G), as shown in Figure 1(d). Therefore, the remaining undirected graph is G00 , shown in Figure 1(e). Setting each vertex in G00 as the source vertex, no undirected component will be remained. Hence, W(v1 , G00 ) = W(v3 , G00 ) = W(v4 , G00 ) = 1. Therefore, W(v2 , G) = W(v1 , G00 ) + W(v3 , G00 ) + W(v4 , G00 ) = 3. Due to the symmetry in the structure, we have W(v3 , G) = 3 as well. Finally, using equation (1), we obtain that the number of the elements of the MEC corresponding to essential graph G is equal to 10. 7 Algorithm 2 Uniform Sampler Input: Undirected graph G = (V (G), E(G)). Output: Directed graph (V (G), R AND E DGE(G, ∅)). function R AND E DGE(G,A) Set v ∗ ∈ V (G) as the source variable of G with probability P W(v ∗ , G) . v∈V (G) W(v, G) A = A ∪ F LOWED(v ∗ , G). F = Undirected version of elements of F LOWED(v ∗ , G). G0 = G\F . Remove isolated vertices from G0 . [ A=A R AND E DGE(G, A). G∈comp(G0 ) return A. end function 4 Uniform Sampling from an MEC As mentioned earlier in Section 1, in some applications, the performance of an action is needed to be tested on an MEC with large size. In these cases, one can optimize the behavior on uniform samples drawn from the MEC. In this section we introduce two samplers for providing random DAGs from an MEC. The first sampler, presented in Subsection 4.1, is based on the counting idea in Section 3. In the case of bounded degree graphs, this sampler is capable of producing uniform samples in polynomial time. If the degree is not bounded, in the worst case, this sampler has high computational complexity. Therefore, in Subsection 4.2, we provide another sampler, originally introduced in (Ghassami et al., 2017), for the case of unbounded degree graphs. Although this sampler is not unbiased, our extensive experimental results confirms that the sampling distribution of the second sampler is very close to uniform. 4.1 Uniform Sampler The pseudo-code of our uniform sampler is presented in Algorithm 2, where functions F LOWED and W are defined in the pseudo-code for Algorithm 1. In this sampler, first the weights W(v, G) is calculated for all vertices v ∈ V (G) and vertex v ∗ is chosen as the source variable with P probability W(v ∗ , G)/ v∈V (G) W(v, G). The source variable will determine the orientation of some edges according to Proposition 2. Removing the directed edges and resulted isolated vertices, we will have (possibly) disconnected components. Choosing a source variable in each 8 resulting component is repeated until all the edges are directed. Since we choose each vertex as the source variable according to the portion of members of the MEC having that vertex as the source, we will have the following result. Theorem 3. The sampler proposed in Algorithm 2 is uniform. Proof. Let g be a member of the MEC. For the clarity of the proof, we assume that g is obtained form three rounds of choosing source vertices, otherwise, the idea is easily extendable to the case with arbitrary many rounds. Therefore, assume g is obtained by having v1 as the chosen source vertex in G in round 1, v21 , ..., v2K1 as the sources in components G11 , ..., G1K1 in round 2, and v31 , ..., v3K2 as the sources in components G21 , ..., G2K2 in round 3. We have W (v21 , G11 ) · · · W (v2K1 , G1K1 ) W (v1 , G) × QK1 P 1 v∈V (G) W (v, G) k=1 v∈V (G1 ) W (v, Gk ) P (g) = P k W (v31 , G21 ) · · · W (v3K2 , G2K2 ) . × QK1 Q P 2 k=1 G2 ∈comp(G1 ) v∈V (G2 ) W (v, Gj ) j j k Since the process is terminated in three rounds, we have W (v3k , G2k ) = 1, for all 1 ≤ k ≤ K2 . Therefore, 1 W (v1 , G) × QK1 P 1 v∈V (G) W (v, G) k=1 v∈V (G1 ) W (v, Gk ) P (g) = P k × K1 Y W (v2k , G1k ) Q k=1 G2j ∈comp(G1k ) P v∈V (G2j ) W (v, G2j )) . By Theorem 1, we have the second fraction and all the fractions in the product are equal to 1. Therefore, 1 1 = , Size(G) v∈V (G) W (v, G) P (g) = P where the last equality follows from equation (1). Regarding the complexity of the sampler in Algorithm 2 we have the following result as a corollary of Theorem 2. Corollary 1. Let n and ∆ denote the order and the maximum degree of the graph G, respectively. The computational complexity of Algorithm 2 is O(n∆ ). 9 Algorithm 3 Heuristic Sampler Input: Undirected graph G = (V (G), E(G)). Uniformly shuffle the order of the elements of V (G). while the induced subgraph on any subset of size 3 of the variables is not directed, or a directed cycle, or a v-structure do for all {vi , vj , vk } ⊆ V (G) do Orient the undirected edges among {vi , vj , vk } independently according to Bern( 12 ) until it becomes a directed structure which is not a directed cycle or a v-structure. end for end while Output: Resulted directed graph. 4.2 Heuristic Sampler For the case of unbounded degree, the computational complexity of Algorithm 2 will be high in the worst case. Therefore, we also provide a heuristic sampler for this case, which was first introduced in (Ghassami et al., 2017). Although not unbiased, the experimental results indicate that this sampler has a performance very close to the uniform sampler. The pseudo-code of the heuristic sampler is presented in Algorithm 3. In this algorithm we consider all subsets of size 3 from V (G) in a uniformly random order (achieved by uniformly shuffling the labels of elements of V (G)). For each subset {vi , vj , vk }, we orient the undirected edges among {vi , vj , vk } independently according to Bernoulli( 12 ) distribution. If the resulting orientation on the induced subgraph on {vi , vj , vk } became a directed cycle or a v-structure, we redo the orienting. We keep checking all the subsets of size 3 until the induced subgraph on all of them are directed and none of them is a v-structure or a directed cycle. Theorem 4. Each generated directed graph in Algorithm 3 belongs to the Markov equivalence class corresponding to the essential graph G. We require the following lemma for the proof. Lemma 2. A chordal graph has a directed cycle only if it has a directed cycle of size 3. Proof. If the directed cycle is of size 3 itself, the lemma is trivial. Suppose the cycle Cn is of size n > 3. Relabel the vertices of Cn to have Cn = (v1 , ..., vn , v1 ). Since the graph is chordal, Cn has a chord and hence we have a triangle on vertices {vi , vi+1 , vi+2 } for some i. If the direction of {vi , vi+2 } is (vi+2 , vi ), we have the directed cycle (vi , vi+1 , vi+2 , vi ) which is of size 3. Otherwise, we have the directed cycle Cn−1 = (v1 , ..., vi , vi+2 , .., vn , v1 ) on n − 1 10 vertices. Relabeling the vertices from 1 to n − 1 and repeating the above reasoning concludes the lemma. Proof of Theorem 4. The undirected graph G is chordal (Hauser and Bühlmann, 2012). Therefore, by Lemma 2, to insure that a generated directed graph is a DAG, it suffices to make sure that it does not have any directed cycles of length 3, which is one of the checks that we do in the proposed procedure. For checking if the generated DAG is in the Markov equivalence class corresponding to G, by Proposition 1, it suffices to check if they have the same set of v-structures, which is the other check that we do in the proposed procedure. 11 References and Notes Andersson et al., 1997. Andersson, S. A., Madigan, D., Perlman, M. D., et al. (1997). A characterization of markov equivalence classes for acyclic digraphs. The Annals of Statistics, 25(2):505–541. Bernstein and Tetali, 2017. Bernstein, M. and Tetali, P. (2017). On sampling graphical markov models. arXiv preprint arXiv:1705.09717. Chickering, 2002. Chickering, D. M. (2002). Optimal structure identification with greedy search. Journal of machine learning research, 3(Nov):507–554. Ghassami et al., 2017. Ghassami, A., Salehkaleybar, S., Kiyavash, N., and Bareinboim, E. (2017). Budgeted experiment design for causal structure learning. arXiv preprint arXiv:1709.03625. Gillispie and Perlman, 2002. Gillispie, S. B. and Perlman, M. D. (2002). The size distribution for markov equivalence classes of acyclic digraph models. Artificial Intelligence, 141(1-2):137– 155. Hauser and Bühlmann, 2012. Hauser, A. and Bühlmann, P. (2012). Characterization and greedy learning of interventional markov equivalence classes of directed acyclic graphs. Journal of Machine Learning Research, 13(Aug):2409–2464. He et al., 2013. He, Y., Jia, J., Yu, B., et al. (2013). Reversible mcmc on markov equivalence classes of sparse directed acyclic graphs. The Annals of Statistics, 41(4):1742–1779. Meek, 1995. Meek, C. (1995). Causal inference and causal explanation with background knowledge. In Proceedings of the Eleventh conference on Uncertainty in artificial intelligence, pages 403–410. Morgan Kaufmann Publishers Inc. Spirtes et al., 2000. Spirtes, P., Glymour, C. N., and Scheines, R. (2000). Causation, prediction, and search. MIT press. Verma and Pearl, 1991. Verma, T. and Pearl, J. (1991). Equivalence and synthesis of causal models. In Proceedings of Sixth Conference on Uncertainty in Artificial Intelligence, pages 220–227. 12
2cs.AI
arXiv:1410.5850v2 [math.OC] 27 Apr 2017 A Fast Hybrid Primal Heuristic for Multiband Robust Capacitated Network Design with Multiple Time Periods✩ Fabio D’Andreagiovannia,b,c,∗, Jonatan Krolikowskia , Jonad Pulaja a Department of Optimization, Zuse-Institut Berlin (ZIB), Takustr. 7, 14195 Berlin, Germany b DFG Research Center MATHEON, Technical University Berlin, Straße des 17. Juni 135, 10623 Berlin, Germany c Einstein Center for Mathematics Berlin (ECMath), Straße des 17. Juni 135, 10623 Berlin, Germany Abstract We investigate the Robust Multiperiod Network Design Problem, a generalization of the Capacitated Network Design Problem (CNDP) that, besides establishing flow routing and network capacity installation as in a canonical CNDP, also considers a planning horizon made up of multiple time periods and protection against fluctuations in traffic volumes. As a remedy against traffic volume uncertainty, we propose a Robust Optimization model based on Multiband Robustness (Büsing and D’Andreagiovanni, 2012), a refinement of classical Γ-Robustness by Bertsimas and Sim (2004) that uses a system of multiple deviation bands. Since the resulting optimization problem may prove very challenging even for instances of moderate size solved by This is the authors’ final version of the paper published in Applied Soft Computing 26, 497-507, 2015, DOI: 10.1016/j.asoc.2014.10.016 . The final publication is available at Elsevier ScienceDirect via http://dx.doi.org/10.1016/j.asoc.2014.10.016. Please note that this paper is an extended, improved journal version of the paper “A hybrid primal heuristic for Robust Multiperiod Network Design” presented at EvoComNet2014 and published in: EvoApplications 2014: Applications of Evolutionary Computation, Granada, Spain, April 23-25, 2014, LNCS 8602, pp. 15-26, Springer, 2014. DOI: 10.1007/978-3-662-45523-4 2. The paper was awarded the EvoComNet Best Paper Award at EvoStar 2014. ✩ ∗ Corresponding author Email addresses: [email protected] (Fabio D’Andreagiovanni), [email protected] (Jonatan Krolikowski), [email protected] (Jonad Pulaj) URL: http://www.dis.uniroma1.it/~fdag/ (Fabio D’Andreagiovanni) a state-of-the-art optimization solver, we propose a hybrid primal heuristic that combines a randomized fixing strategy inspired by ant colony optimization and an exact large neighbourhood search. Computational experiments on a set of realistic instances from the SNDlib (2010) show that our original heuristic can run fast and produce solutions of extremely high quality associated with low optimality gaps. Keywords: Capacitated Network Design, Multiperiod Design, Multiband Robust Optimization, Traffic Uncertainty, Metaheuristic, Ant Colony Optimization, Exact Large Neighborhood Search. 1. Introduction In the last two decades, telecommunications have increasingly pervaded our everyday life and the volume of traffic sent and exchanged over networks has astonishingly increased: major companies like Nokia Siemens Networks expect that the increase in the amount of traffic will strongly continue, reaching a volume of more than 1000 exabyte per year in fixed networks by 2015 (Theimer, 2010). This dramatic growth that telecommunications have experienced has greatly compounded the challenge for network professionals, who are facing design problems of increasing complexity and difficulty. In order to cope with traffic growth, the professionals have to plan much in advance how the network will be expanded in topology and capacity to accommodate the new traffic. This is especially important in the case of fixed networks, which require (costly) digging operations for the installation of cables in areas with possibly high population density. To make the design task even more complicated, the future behaviour of traffic over a network is not exactly known when the network is designed and thus the decision problem is also affected by tricky data uncertainty. Until recent times, data uncertainty has been generally neglected in real studies. However, as indicated by recent industrial cooperations between industry and academia, (e.g., Bauschert et al. 2014; Belotti et al. 2011; Bley et al. 2013; Koster et al. 2013), professionals are not only becoming aware of the importance of adopting mathematical optimization to take better decisions, but are also understanding the necessity of considering data uncertainty, in order to avoid unpleasant surprises like infeasibility of implemented solutions due to data deviations. The task of designing a telecommunication network essentially consists in establishing the topology of the network and the technological features (e.g., transmission capacity and rate) of its elements, namely nodes and 2 links. One of the most studied problem in network design is the Capacitated Network Design Problem (CNDP): the CNDP consists in minimizing the total installation cost of capacity modules in a network to route traffic flows generated by users. The CNDP is a central problem in network optimization, which appears in many real-world applications. For an exhaustive introduction to it, we refer the reader to Ahuja et al. (1993); Bertsekas (1998); Bienstock et al. (1998). In this paper, we focus on the development of a new Robust Optimization model to tackle traffic uncertainty in the Multiperiod Capacitated Network Design Problem (MP-CNDP). This problem constitutes a natural extension of the classical CNDP, where, instead of a single design period, we consider the design over a time horizon made up of multiple periods. Moreover, traffic uncertainty is taken into account to protect design solutions against deviations in the traffic input data, which may compromise feasibility and optimality of solutions. We immediately stress that, though the problem of optimally designing networks over multiple time periods is not new and can be traced back at least to the seminal work by Christofides and Brooker (1974), to the best of our knowledge, the MP-CNDP has received very little attention and just a few works have investigated it - essentially, Lardeux et al. (2007) and Gavros and Raghavan (2012). Checking literature, several other works dealing with multiperiod design of networks can be found (just to make a couple of examples, Gendrau et al. 2006 and Gupta and Grossmann 2012): however, all these works consider problems that are application-specific or are sensibly different from the more general setting that we consider here and we thus avoid a more detailed discussion of them (Gendrau et al. (2006) study capacity expansion problem in access networks with tree topology, whereas Gupta and Grossmann (2012) consider the design of utility networks modeled by non-linear mathematical programs). Our main references for this work, namely Lardeux et al. (2007) and Gavros and Raghavan (2012), point out the difficulty of solving multiperiod CNDP problems already for just two periods and even in (easier) contexts: Lardeux et al. (2007) consider the CNDP when traffic flows may be split, whereas Gavros and Raghavan (2012) consider a pure routing problem in satellite communications. Our direct and more recent computational experience have confirmed the challenging nature of the MP-CNDP, even for instances of moderate size with a low number of time periods and solved by a state-of-the-art optimization solver. Uncertain versions of the MP-CNDP where traffic uncertainty is considered have also been neglected, even though especially in the last years there 3 has been an increasing interest in network design under traffic uncertainty for the single design period case (e.g., Bauschert et al. 2014; Belotti et al. 2011; Koster et al. 2013). In this work, our main original contributions are: 1. the first Robust Optimization model for tackling traffic uncertainty in Multiperiod CNDP. Specifically, we adopt Multiband Robustness, a new model for Robust Optimization recently introduced by Büsing and D’Andreagiovanni (2012); 2. a hybrid primal heuristic, based on the combination of a randomized rounding heuristic resembling ant colony optimization (Dorigo et al., 1999) with an exact large neighborhood search called RINS (Danna et al., 2005). We stress here that our aim was not to use a standard implementation of an ant colony algorithm: we wanted instead to strengthen the performance of the ant algorithm using highly valuable information from linear relaxations of the considered optimization problems. Using this information allowed us to define a very strong ant construction phase, which produces very high quality solutions already before the execution of any local search; 3. analytically proving how to solve the linear relaxation of the Multiperiod CNDP in closed form, thus obtaining a substantial reduction in solution times w.r.t. our first algorithm presented in (D’Andreagiovanni et al., 2014); 4. computational experiments over a set of realistic instances derived from the Survivable Network Design Library (SNDlib, 2010), showing that our hybrid algorithm is able to produce solutions of extremely high quality associated with very small optimality gap. The remainder of this paper is organized as follows: in Section 2, we review a canonical model for the CNDP; in Section 3, we introduce the Multiperiod CNDP and we study its linear relaxation; in Section 4, we introduce the new formulation for Robust Multiperiod CNDP; in Sections 5 and 6, we present our hybrid heuristic and computational results. 2. The Capacitated Network Design Problem The CNDP is a central and highly studied problem in Network Optimization that appears in a wide variety of real-world applications (see Ahuja et al. (1993) and Bertsekas (1998) for an exhaustive introduction to it) and can be essentially described as follows: given a network and a set 4 of demands whose flows must be routed between vertices of the network, we want to install capacities on network edges and route the flows through the network, so that the capacity constraint of each edge is respected and the total cost of installing capacity is minimized. More formally, we can characterize the CNDP through the following definition. Definition 1 (The Capacitated Network Design Problem - CNDP). Given • a network represented by a graph G(V, E), where V is the set of vertices and E the set of edges, • a set of commodities C, each associated with a traffic flow dc to route from an origin sc to a destination tc , • a set of admissible paths Pc for routing the flow of each commodity c from sc to tc , • a cost γe for installing one module of capacity φ > 0 on edge e ∈ E, the CNDP consists in establishing the number of capacity modules installed on each edge e ∈ E such that the resulting capacity installation has minimum cost and supports a feasible routing of the commodities. A feasible routing assigns each commodity c ∈ C to exactly one feasible path p ∈ Pc . Referring to the notation introduced above and introducing the following two families of decision variables: • binary path assignment variables xcp ∈ {0, 1} ∀ c ∈ C, p ∈ Pc such that:  1 if the entire traffic of commodity c is routed on path p xcp = 0 otherwise, • integer capacity variables ye ∈ Z+ , ∀ e ∈ E, representing the number of capacity modules installed on edge e, 5 we can model the CNDP as the following integer linear program: X min γe y e (CNDP-IP) e∈E X X X xcp = 1 dc xcp ≤ φ ye e∈E (1) c∈C (2) c∈C p∈Pc : e∈p p∈Pc xcp ∈ {0, 1} c ∈ C, p ∈ Pc ye ∈ Z+ e∈E. The objective function minimizes the total cost of capacity installation. Capacity constraints (1) impose that the summation of all flows routed through an edge e ∈ E must not exceed the capacity installed on e (equal to the number of installed modules represented by ye multiplied by the capacity φ granted by a single module). Constraints (2) impose that the flow of each commodity c ∈ C must be routed through a single path. Remark 1. This is an unsplittable version of the CNDP, namely the traffic flow of a commodity c ∈ C cannot be split over multiple paths going from sc to tc , but must be routed on exactly one path. Moreover, the set of feasible paths Pc of each commodity is preset and constitutes an input of the problem. This is in line with other works based on industrial cooperations (e.g., Bley et al. 2000) and with our experience (Bauschert et al. 2014), in which a network operator typically considers just a few paths that meet its own specific business and quality-of-service considerations and uses stateof-the-art routing schemes based on an Open Shortest Path First protocol. 3. The Multiperiod Capacitated Network Design Problem We define the multiperiod generalization of the CNDP by introducing a time horizon made up of a set of elementary periods T = {1, 2, . . . , |T |}. From a modeling point of view, this generalization requires to add a new index t ∈ T to the decision variables, to represent routing and capacity installation decisions taken in each period. This is a simple modeling operation, which, however, greatly increases the size and complexity of the problem as pointed out in our computational section and by Gavros and Raghavan (2012) and Lardeux et al. (2007). The introduction of the new index leads 6 to the new integer linear program: XX min γet yet (MP-CNDP-IP) e∈E t∈T X X X xtcp = 1 c∈C p∈Pc : e∈p dtc xtcp ≤φ t X yeτ e ∈ E, t ∈ T (3) τ =1 c ∈ C, t ∈ T p∈Pc xtcp ∈ {0, 1} yet ∈ Z+ c ∈ C, p ∈ Pc , t ∈ T e ∈ E, t ∈ T . Besides including the new index t ∈ T , the program presents a modified right-hand-side in the capacity constraint (3): for each time period t, we must consider the presence of all the capacity modules that are installed on an edge e ∈ E from period τ = 1 to period τ = t. Concerning costs and traffic demands, in what follows, we realistically assume that the cost per unit of capacity is non-increasing over time and that the demand associated with each commodity is non-decreasing over time (i.e., γet ≥ γet+1 , ∀ t = 1, . . . , |T | − 1 and dtc ≤ dt+1 c , ∀ t = 1, . . . , |T | − 1). 3.1. Computing the linear relaxation of MP-CNDP-IP After having introduced the problem MP-CNDP-IP, we proceed to formally characterize in closed-form the value and optimal solution of its linear relaxation, namely the problem that we obtain if we relax the integrality requirements on variables x and y (so we have 0 ≤ xtcp ≤ 1, ∀c ∈ C, p ∈ Pc , t ∈ T and yet ≥ 0, ∀e ∈ E, t ∈ T ). We refer to such relaxation as MP-CNDP-LP. Characterizing the optimal value and the structure of an optimal solution of MP-CNDP-LP has been a crucial objective for us. In our preliminary computational experience presented in the proceeding version of this paper (D’Andreagiovanni et al., 2014), solving MP-CNDP-LP by using the stateof-the-art optimization solver IBM ILOG CPLEX (2014) proved indeed slow. Using a solver like CPLEX to solve linear relaxations thus constituted a bottleneck that limited the possibility of running the heuristic a large number of times within the time limit. By using instead the closed-form expression coming from our new theoretical results presented in this section, we were able to efficiently solve MP-CNDP-LP without using CPLEX, run the algorithm an incredibly higher number of times in the same time limit and gain a determinant speed up in the overall execution of the algorithm. 7 In the case of an MP-CNDP including a single time period (i.e., |T | = 1), it is well known that an optimal solution of the linear relaxation MP-CNDPLP can be obtained by just considering the shortest path p∗ ∈ Pc for each commodity c ∈ C and then by installing on each edge of p∗ the smallest number of capacity modules needed to support the traffic request dc of c (see Ahuja et al. 1993). Through the following propositions, we investigate how the optimal value and an optimal solution of the MP-CNDP-LP with |T | > 1 look like, proving that they can be characterized efficiently. Note that in order to keep the exposition light, we decided to move the more complex proofs of the statements to the Appendix A. As first step, we characterize the relation between flows in consecutive time periods. Proposition 1. Let x̄tcp := 0, dtcp := 0 and γet := ∞ for t = 0. There exists an optimal solution x̄ of MP-CNDP-LP such that: ≤ dtc x̄tcp dt−1 x̄t−1 cp c ∀ c ∈ C, p ∈ Pc , t ∈ T (4) Proof. See the Appendix A. Using the previous Proposition, we are able to derive the following Theorem, which characterizes an optimal solution for the linear relaxation of MPCNDP-IP. In particular, we can show that to get an optimal solution we just need to identify for each commodity c ∈ C and time period t ∈ T a shortest path in edge length p∗c ∈ Pc among the feasible paths Pc of c. Of course, this operation can be done very fast and efficiently. Remark 2. We stress that in what follows, we will just focus on the determination of the optimal flows, since once we have an optimal flow, the capacity installation can be immediately derived over the network. Theorem 1. Consider problem MP-CNDP-LP, namely the linear relaxation of MP-CNDP-IP, and let p∗c ∈ Pc be a shortest path in edge length for each commodity c ∈ C. An optimal solution of MP-CNDP-LP can be defined by routing in each time period t ∈ T the entire flow of each commodity c ∈ C on the shortest path p∗c and by installing on each edge of p∗c the exact capacity needed to route the traffic flow dtc . Proof. See the Appendix A. 8 The previous theorem efficiently characterizes an optimal solution for MPCNDP-LP. However, our hybrid algorithm requires a feasible solution of the linear relaxation when the routing and capacity installation has been established for a number of consecutive time periods (see Section 5 for details). The following Corollary shows how to characterize a feasible solution for the modified linear relaxation and identifies the conditions under which this solution becomes optimal. Corollary 1. Consider problem MP-CNDP-IP and suppose that for time periods t = 1, . . . , τ − 1, τ ≤ |T | and for all the commodities c ∈ C, feasible path assignments and capacity installations have been established (thus fixing the values of the corresponding variables x and y). Moreover, suppose that for period t = τ feasible path assignments and capacity installations have been established for a subset of commodities C ′ ⊆ C. Denote now by MP-CNDP-IPF IX the version of MP-CNDP-IP obtained from this variable fixing and consider the corresponding linear relaxation MP-CNDP-LPF IX . Let p∗c ∈ Pc be a shortest path in edge cost for each commodity c ∈ C. A feasible solution for MP-CNDP-LPF IX can be defined by: • routing in time period t = τ the entire flow of each c ∈ C \ C ′ on the shortest path p∗c and by installing on each edge of p∗c the minimum number of capacity modules needed to route the traffic flow dτc ; • routing in each time period t = τ + 1, . . . , |T | the entire flow of each c ∈ C on the shortest path p∗c and by installing on each edge of p∗c the minimum number of capacity modules needed to route the traffic flow dtc ; Furthermore, the solution determined above is optimal when for all the commodities c ∈ C, the path p∗c is chosen in every t ∈ T . Proof. The feasibility of the solution built as specified above is clear. The optimality condition is instead a straightforward consequence of Theorem 1 and we omit the proof. The new theoretical results that we have introduced provide an alternative way to compute an (optimal) feasible solution of MP-CNDP-LP, which prove dramatically faster than the direct use of CPLEX. This allows us to greatly increase the number of executions of the ant construction phase in the same time limit. 9 4. Robust Optimization for traffic-uncertain Multiperiod Network Design After having introduced the multiperiod generalization MP-CNDP, we can proceed to consider its version that takes into account traffic uncertainty. To this end, in this section, we first state what we mean by traffic uncertainty, then we present fundaments of Robust Optimization, the methodology that we adopt to tackle data uncertainty, and finally we present a Robust Optimization model for the traffic-uncertain version of the MP-CNDP. 4.1. Traffic uncertainty and Robust Optimization Uncertainty of traffic is naturally present in telecommunications network design, since the future behaviour of customers is not known in advance: the number of users and the traffic generated by them can just be estimated and these estimates can deeply differ from actual traffic conditions that will occur in the future (see Bauschert et al. 2014). In what follows, we thus assume that the demands dc are uncertain for all the commodities c ∈ C, i.e. their value is not known exactly when the optimization problem is solved. In order to clarify the concept of traffic uncertainty, we anticipate here that we will model data uncertainty by a refined interval deviation model. In an interval model, we assume to know a nominal value of traffic d¯c and maximum negative and positive deviations δc− ≤ 0, δc+ ≥ 0 from it. The (unknown) actual value dc is thus assumed to belong to the interval: dc ∈ [d¯c + δc− , d¯c + δc+ ] . In our direct experience with real-world network design, we have observed that professionals often identify d¯c with the value of forecast traffic volume (e.g., an expected value derived from historical data), whereas the deviations δc− , δc+ are identified as the maximum deviations from the forecast considered relevant by the network designer, again using historical data as reference. Example 1 (traffic uncertainty). Consider two commodities c1 , c2 associated with nominal traffic demands d¯c1 = 200 Mb, d¯c2 = 300 Mb and suppose that these values may deviate up to 10%. So the maximum negative and positive deviations for c1 , c2 are δc−1 = −20, δc+1 = 20 Mb, δc−2 = −30, δc+2 = 30 Mb, respectively. The actual values of traffic are therefore dc1 ∈ [180, 220] Mb, dc2 ∈ [270, 330] Mb. As it is well-known from sensitivity analysis, dealing with data uncertainty in optimization problems may result really tricky: small variations in the value 10 of input data may completely compromise the optimality and feasibility of produced solutions. Solutions that are supposed to be optimal may reveal to be heavily suboptimal, whereas solutions supposed to be feasible may reveal to be infeasible and thus meaningless when implemented. For a detailed discussion of the issues associated with data uncertainty, we refer the reader to (Ben-Tal et al., 2009; Bertsimas et al., 2011). The following example can immediately help to visualize the possibly catastrophic effects of neglecting data uncertainty. Example 2 (infeasibility caused by deviations). Consider again the commodities of Example 1 and suppose that in some link we have installed exactly the capacity to handle the sum of their nominal values (i.e., we have installed 200 + 300 Mb of capacity). This capacity installation neglects the fact that the demands may deviate up to 10%. So, it is sufficient that just one commodity experiences a positive deviation to violate the capacity constraint of the link, thus making the design solution infeasible in practice. The previous example makes clear that we cannot afford to neglect traffic uncertainty and therefore risk that our design solution will turn out to be infeasible or of bad quality when implemented. As a consequence, we have decided to tackle data uncertainty by adopting a Robust Optimization (RO) approach. RO is a methodology for dealing with data uncertainty that has received a lot of attention in recent times and has been preferred to traditional methodologies like Stochastic Programming, especially thanks to its accessibility and computational tractability. We refer the reader to Ben-Tal et al. (2009) and Bertsimas et al. (2011) for an exhaustive introduction to theory and applications of RO and for a discussion about its determinant advantages over Stochastic Programming. RO is founded on two main facts: • the decision maker must define an uncertainty set, which reflects his risk aversion and identifies the deviations of coefficients against which protection must be guaranteed; • protection against deviations included in the uncertainty set is guaranteed through hard constraints that cut off all those feasible solutions that may become infeasible for some deviations of the uncertainty set. In a more formal way, suppose that we are given a generic integer linear program: v = max c′ x subject to x ∈ F = {A x ≤ b, x ∈ Zn+ } 11 whose coefficient matrix A is uncertain, namely we do not know the exact value of its entries. However, we can identify a family A of coefficient matrices that constitute possible valorizations of the uncertain matrix A. The family A is the uncertainty set of the robust problem. A robust optimal solution, i.e. a solution that is protected against data deviations, can then be found by considering the following robust counterpart of the original problem: v R = max c′ x subject to x ∈ R = {Ā x ≤ b ∀Ā ∈ A, x ∈ Zn+ } The feasible set R of the robust counterpart includes only the solutions of F that are feasible for all the coefficient matrices in the uncertainty set A. Consequently, R is a subset of the feasible set of the original problem, i.e. R ⊆ F. We stress that the definition of robust counterpart can be extended to any mixed-integer linear program, involving continuous and integer variables at the same time. Additionally, we remark that the decision maker should include in A coefficient matrices that reflect his specific risk aversion. Ensuring protection against data deviations according to an RO paradigm comes at a price: the so-called price of robustness (PoR) (Bertsimas and Sim, 2004). The PoR is the deterioration of the optimal value of the robust counterpart w.r.t. the optimal value of the original problem (we have v R ≤ v) and is caused by the hard constraints imposing robustness, which restrict the feasible set F to the (in general smaller ) set of robust solutions R. The PoR depends upon the features of the uncertainty set: uncertainty sets reflecting higher levels of risk aversion of the decision maker will include more unlikely and extreme deviations, leading to higher protection yet associated with higher PoR; uncertainty sets reflecting low risk aversion will instead tend to neglect unlikely deviations, thus guaranteeing lower protection yet associated with lower PoR. Example 3 (protection against deviations). Following Example 2, a simple way to grant protection would be to install sufficient capacity to deal with the peak deviations of each commodity. So we should install 220+330 Mb of capacity. We note that in practice it is unlikely that all coefficients will experience the worst deviation, so one of the aim of “smart” RO models is to define appropriate uncertainty sets that result not too conservative, while guaranteeing a satisfying level of protection (for example, we could assume that at most one of the two demands will deviate from its nominal value). 12 In the next paragraph, we provide a description of the model of uncertainty that we adopt. 4.2. A concise introduction to Multiband Robust Optimization In this work, we tackle uncertainty through Multiband Robust Optimization (MB), a new robust optimization model based on cardinalityconstrained uncertainty set that was proposed by Büsing and D’Andreagiovanni (2012) and then extended and applied in a series of successive works (e.g, Büsing and D’Andreagiovanni 2012, 2013, 2014; Büsing et al. 2014; Bauschert et al. 2014). MB represents a refinement and generalization of the well-known Γ-Robustness (Γ-Rob) by Bertsimas and Sim (2004) that we developed to satisfy practical needs of our industrial partners in real-world applications (see Büsing and D’Andreagiovanni 2013; Bauschert et al. 2014). We recall here the main results of MB, referring to the following generic uncertain Mixed-Integer Linear Program (MILP): X max cj xj (M ILP ) j∈J X aij xj ≤ bi i ∈ I = {1, . . . , m} j∈J xj ≥ 0 j ∈ J = {1, . . . , n} xj ∈ Z + j ∈ JZ ⊆ J . where w.l.o.g we assume that the uncertainty only affects the coefficients aij (uncertainty affecting cost coefficients or the right-hand-sides can be easily reformulated as coefficient matrix uncertainty). Moving from the hypothesis that the actual value aij of the coefficients is unknown, the multiband uncertainty model at the basis of MB assumes that: 1. for each coefficient aij , the decision maker knows its nominal value − K+ āij as well as the maximum negative and positive deviations dK ij , dij − K+ from āij (so aij ∈ [āij + dK ij , āij + dij ]); K+ 2. the overall single deviation band [dK− ij , dij ] of each coefficient aij is partitioned into K bands, defined on the basis of K deviation values: + − −1 0 1 K −∞ < dK ij < · · · < dij < dij = 0 < dij < · · · < dij < +∞; 3. through these deviation values, K deviation bands are defined, namely: a set of positive deviation bands k ∈ {1, . . . , K + } and a set of negative 13 deviation bands k ∈ {K − + 1, . . . , −1, 0}, such that a band k ∈ {K − + k−1 k 1, . . . , K + } corresponds to the range (dij , dij ], and band k = K − − corresponds to the single value dK ij ; 4. for each constraint i ∈ I and each band k ∈ K, a lower bound lik and an upper bound uik on the number of deviations that may fall in k are defined, so 0 ≤ lik ≤ uik ≤ n; 5. the number of coefficients that take their nominal value is not limited, i.e. u = n for all i ∈ I; P i0 6. k∈K lik ≤ n for all i ∈ I, so that there always exists a feasible realization of the coefficient matrix. We call this typology of uncertainty set a multiband uncertainty set. MB thus generalizes the uncertainty definition of the Γ-Rob model by Bertsimas and Sim (2004): the single deviation band is partitioned into multiple bands and each band k ∈ K is associated not only with an upper bound uik , but also with a lower bound lik on the number of coefficients deviating in that band. The lower bound improves the modeling power of the decision maker and, more importantly, allows to take into account the presence of negative value deviations, that are neglected in Γ-Rob. Of course, taking into account negative deviations allows to improve the modeling of deviations commonly found in real-world problems and, even more critically, reduces the value of the overall worst deviation and thus the price of robustness. The multiband model results particularly suitable to model histograms that are commonly adopted by practitioners to visualize and analyze data deviations (see Büsing and D’Andreagiovanni 2012; Bauschert et al. 2014). Since the robust optimization paradigm entails that we must be protected against any possible deviation considered in the uncertainty set, the robust counterpart of MILP under multiband uncertainty is: X cj xj (5) max j∈J X āij xj + DEVi (x, M B) ≤ bi i∈I j∈J xj ≥ 0 j∈J xj ∈ Z + j ∈ JZ ⊆ J , where an additional term DEVi (x, M B) is introduced in every feasibility constraint to represent the maximum total deviation that could be incurred by constraint i under the multiband uncertainty set for a solution x. This 14 problem is actually non-linear since the term DEVi (x, M B) hides the following maximization problem: XX k DEVi (x, M B) = max dkij xj yij (6) j∈J k∈K lik ≤ X k yij ≤ uik k∈K (7) j∈J (8) j ∈ J, k ∈ K . (9) j∈J X k yij ≤1 k∈K k yij ∈ {0, 1} k of the problem is equal to 1 when the coefficient j A binary variable yij in constraint i falls in deviation band k and is equal to 0 otherwise. Each coefficient j in the constraint must fall in at most one deviation band, thus requiring the introduction of the family of constraints (7) (note that when P k = 0 then it is like having the coefficient falling in the zero deviation y k∈K ij band). Constraints (8) impose the bounds on the number of coefficients that may deviate in each band k ∈ K. Finally, the objective function (6) aims at maximizing the deviation allowed by the multiband uncertainty set for a given solution x and constraint i. The robust counterpart (5) is a (non-linear) max-max problem, since it includes the binary program (6-9). This is anyway not a real issue, since we have proved that the robust counterpart is equivalent to a compact and linear mixed-integer linear program, as stated in the following theorem. Theorem 2 (Büsing and D’Andreagiovanni 2012). The robust counterpart of problem (MILP) for the multiband uncertainty set M B is equivalent to the following compact and linear mixed-integer program: X max cj xj (Rob-MILP) (10) j∈J X āij xj + X θk wik + X i∈I (11) wik + zij ≥ dkij xj i ∈ I, j ∈ J, k ∈ K (12) wik i ∈ I, k ∈ K (13) zij ≥ 0 i ∈ I, j ∈ J (14) xj ≥ 0 j∈J xj ∈ Z + j ∈ JZ ⊆ J . j∈J k∈K zij ≤ bi j∈J ∈R 15 This problem includes K · m + n · m additional continuous variables (1314) and K · n · m additional constraints (12) to clear up the non-linearity of the trivial robust counterpart (5). Moreover, constraints (11) include additional terms and involve the values θk ≥ 0 that express the number of deviations that occur in each deviation band k ∈ K (these values constitute the so-called profile of the multiband uncertainty set and are derived on the basis of the bounds lk , uk - see Büsing and D’Andreagiovanni (2013) for details). The resulting formulation has thus the nice properties of being compact and linear. The proof of the theorem is based on pointing out the integrality of the polyhedron associated with and on exploiting strong duality. We refer the reader to Büsing and D’Andreagiovanni (2012, 2013) for the formal complete statement and proof of the presented theorem. Theorem (2) is a central result from the theory of Multiband Robust Optimization that we will use to derive a robust model for the MP-CNDP. 4.3. Multiband-Robust Multiperiod Network Design We proceed now to use Multiband Robust Optimization and the related Theorem (2) to tackle traffic uncertainty in the MP-CNDP. If we denote by D the uncertainty set associated with the demands of the commodities, we can write the general form of the robust counterpart of the MP-CNDP-IP as follows: XX min γet yet (15) e∈E t∈T X X X xtcp = 1 d¯tc xtcp + DEVet (x, D) ≤ φ t X yeτ e ∈ E, t ∈ T (16) τ =1 c∈C p∈Pc : e∈p c ∈ C, t ∈ T p∈Pc xtcp ∈ {0, 1} yet ∈ Z+ c ∈ C, p ∈ Pc , t ∈ T e ∈ E, t ∈ T . This robust counterpart differs from the MP-CNDP-IP in the capacity constraints (16): these constraints indeed consider the nominal traffic demands values d¯tc and include the terms DEVet (x, D) to represent the total maximum positive deviation that demands may experience on edge e in period t for a routing vector x and the uncertainty set D. We structure the uncertainty set D according to the principles of Multiband Robust Optimization introduced in the previous subsection. Specifically, we build a multiband uncertainty set for the MP-CNDP as follows: 16 1. for each commodity c ∈ C and time period t ∈ T , we know the nominal value d¯tc of the traffic coefficient and maximum negative and positive deviations δct− ≤ 0, δct+ ≥ 0 from it. The actual value dtc is then such that dtc ∈ [d¯tc + δct− , d¯tc + δct+ ]; 2. the overall deviation range [d¯tc + δct− , d¯tc + δct+ ] of each coefficient dtc is partitioned into K bands, defined on the basis of K deviation values: + −∞ < δct− = δctK < · · · < δct−1 < δct0 = 0 < δct1 < · · · < δctK = δct+ < +∞; − 3. through these deviation values, K deviation bands are defined, namely: a set of positive deviation bands k ∈ {1, . . . , K + } and a set of negative deviation bands k ∈ {K − + 1, . . . , −1, 0}, such that a band k ∈ {K − + − 1, . . . , K + } corresponds to the range (dctk−1 , dtk c ], and band k = K − ; corresponds to the single value dtK c 4. for each capacity constraint (16) defined for an edge e ∈ E and period t ∈ T and for each band k ∈ K, we introduce two values letk , utk e : t to represent the lower and upper bound on the ≤ n 0 ≤ letk ≤ utk e e number of traffic coefficients whose value deviates in band k (nte is the number of uncertain coefficients in the constraint). These bounds can be used to derive the profile of the uncertainty set, namely the values θetk ≥ 0 indicating the exact number of coefficients deviating in each band (see Büsing and D’Andreagiovanni (2013) for details about the definition of profile); 5. the number of coefficients that take their nominal value is not limited, i.e. ut0 = nt for all e ∈ E, t ∈ T ; P e tk e t 6. k∈K le ≤ ne for all e ∈ E, t ∈ T , so that there always exists a feasible realization of the coefficient matrix. By using the previous characterization of the multiband uncertainty set and Theorem (2), we can reformulate the non-linear robust counterpart (15) as 17 the following linear and compact robust counterpart: XX min γet yet (Rob-MP-CNDP) e∈E t∈T X X d¯tc xtcp + c∈C p∈Pc : e∈p + X θetk wetk k∈K + X X t zecp ≤φ t X yeτ e ∈ E, t ∈ T τ =1 c∈C p∈Pc : e∈p t wetk + zecp ≥ δctk xtcp e ∈ E, c ∈ C, p ∈ Pc : e ∈ p, (17) t ∈ T, k ∈ K wetk ∈ R t zecp ≥0 X e ∈ E, t ∈ T, k ∈ K (18) e ∈ E, c ∈ C, p ∈ Pc : e ∈ p, t ∈ T (19) xtcp = 1 c ∈ C, t ∈ T p∈Pc xtcp ∈ {0, 1} yet ∈ Z+ c ∈ C, p ∈ Pc , t ∈ T e ∈ E, t ∈ T . This formulation includes the additional constraints (17) and variables (18), (19) to linearly reformulate the original (non-linear) problem including the term DEVet (x, D) in each capacity constraint. Rob-MP-CNDP is the problem that we want to solve in the computational section to get robust solutions to the MP-CNDP. 5. A hybrid primal heuristic for the Rob-MP-CNDP In principle, we can get a robust optimal solution for Rob-MP-CNDP by using any commercial mixed-integer programming software, such as CPLEX. However, as showed in the computational section, solving Rob-MP-CNDP constitutes a difficult task even when considering a small number of time periods and using a state-of-the-art solver like CPLEX: after several hours of computation, solutions are still typically of low quality and far away from the optimum. As a remedy, we were attracted by the effectiveness of (hybrid) MIP-based and bio-inspired heuristics in hard network design problems. Valid examples of such effectiveness are provided by Crainic and Gendreau 18 (2002), proposing a cooperative parallel tabu search algorithm for the singleperiod CNDP tested on transshipment networks, by Dely et al. (2013), proposing a linear relaxation-based decomposition method for a variant of the single-period CNDP related to fair routing in wireless mesh networks, and Kleeman et al. (2012), proposing a multiobjective evolutionary algorithm to solve a single-period CNDP arising in the design of large communications networks. Concerning hybrid heuristics, we refer the reader to Blum et al. (2011) for a recent survey. In the case of Rob-MP-CNDP, we developed a fast hybrid primal heuristic based on the combination of a randomized variable-fixing strategy resembling Ant Colony Optimization (ACO) and an exact large neighbourhood search. It is widely known that ACO is a metaheuristic that was inspired by the foraging behaviour of ants. The seminal work by Dorigo et al. (1996) presenting an ACO algorithm for combinatorial problems has later been extended to integer and continuous problems (e.g., Dorigo et al. 1999) and has been followed by hundreds of other papers proposing refinements of the basic algorithms (e.g., Gambardella et al. 2012; Maniezzo 1999) and investigating applications to relevant optimization problems (see Blum 2005 for an overview). An ACO algorithm presents the general structure specified in Algorithm 1. A loop consisting of two phases is executed until an arrest condition is satisfied: in a first phase, an ant builds up a solution under the guidance of probabilistic functions of variable fixing that resemble pheromone trails; then the pheromone trails are updated on the basis of how effective the adopted variable fixing has resulted. Once that the arrest condition is reached, a daemon action phase takes place and some solution improvement strategy is applied to bring the feasible solution built by the ants to a (local) optimum. Algorithm 1 General structure of an ACO algorithm (Gen-ACO) 1: while an arrest condition is reached do 2: ant-based solution construction 3: pheromone trail update 4: end while 5: daemon actions We now proceed to detail each phase of the previous sketch for our hybrid ACO-exact algorithm for the Rob-MP-CNDP. Our algorithm is defined hybrid since after having passed the ACO construction phase, the daemon action phase operates an exact large neighborhood search that is formulated as an integer linear program and is solved exactly relying on the power of 19 modern state-of-the-art commercial solvers. 5.1. Ant-based solution construction. In the first step of the inner cycle of (Gen-ACO), a number m ≥ 0 of ants are defined and each ant iteratively builds a feasible solution for the problem. At a generic iteration of the construction, the ant is in a state corresponding with a partial solution and can make a further step towards completing the solution by making a move: a move corresponds to fixing the value of some not-yet-fixed variable. The move that is executed is chosen according to a probability function: the function specifies the probability of implementing a move and thus of fixing a variable and is derived by combining an a priori measure of the efficacy of the move and an a posteriori measure of the efficacy of the move. More in detail, the probability of choosing a move that fixes a variable j after having fixed a variable i is specified by the following canonical formula: δ τijβ + ηij , (20) pij = P β δ f ∈F τif + ηif where τij represents the a priori measure of efficacy, commonly called pheromone trail value, and ηij represents the a posteriori measure of efficacy, commonly called attractiveness. Note that this formula is influenced by the two parameters β, δ that appear as exponents of the measures and should be chosen by the decision maker on the basis of the specific problem considered. For a more detailed description of the elements and actions of this phase, we refer the reader to the paper (Maniezzo, 1999), which presents ANTS, an improved ant algorithm used for solving the quadratic assignment problem, which we have taken as reference for our work. We considered ANTS particularly attractive as it proposes a series of refinements for classical ACO that allow to better exploit polyhedral information about the problem. Specifically, (Maniezzo, 1999) sketches some ideas about how alternative formulations of the original problem could be exploited to define the pheromone trail and the attractiveness values. As additional desirable feature, ANTS makes use of a reduced number of parameters and adopts more efficient mathematical operations w.r.t. the canonical ant algorithms (products instead of exponentiations). For an exhaustive description of ANTS, we refer the reader to the paper by Maniezzo (1999). Before describing how our ANTS implementation is structured, we make some preliminary considerations. The formulation Rob-MP-CNDP is based on four families of variables: 1) the path assignment variables xtcp ; 2) the t coming from capacity variables yet ; 3-4) the auxiliary variables wetk , zecp 20 robust dualization. Though we have to deal with four families, we can notice that once routing decisions are taken over the entire time horizon, then we can immediately derive the capacity installation of minimum cost. Indeed, once the values of all path assignment variables are fixed, the routing is completely established and the worst traffic deviation term DEVet (x, D) can be efficiently derived without need of using the auxiliary variables wetk , t (this can be indeed traced back to solving a min-cost flow problem, as zecp explained in Büsing and D’Andreagiovanni 2012, 2013). So we can easily derive the total traffic Det sent over an edge e in period t in the worst case. We can then derive the minimum cost installation by a sequential evaluation from period 1 to period |T |, keeping in mind that we must have m l Det capacity modules on e in t to accommodate the traffic. In the antφ construction phase, we can consequently limit our attention to the binary assignment variables and we introduce the concept of routing state. S Definition 2 (Routing state - RS). Let P = c∈C Pc and let R ⊆ C × P ×T be the subset of triples (c, p, t) representing the assignment of path p ∈ Pc to commodity c ∈ C in period t ∈ T . A routing state is an assignment of paths to a subset of commodities in a subset of time periods which excludes that multiple paths are assigned to a single commodity. Formally: RS ⊆ R : 6 ∃(c1 , p1 , t1 ), (c2 , p2 , t2 ) ∈ RS : c1 = c2 ∧ p1 , p2 ∈ Pc1 ∧ t1 = t2 . We say that a routing state RS is complete when it specifies the path used by each commodity in each time period (thus |RS| = |C||T |). Otherwise the RS is called partial and we have |RS| < |C||T |). In the ANTS algorithm that we propose, we decided to assign paths considering time periods and commodities in a pre-established order. Specifically, we establish the routing in each time period separately, starting from t = 1 and continuing up to t = |T |, and in each time period commodities are sorted in descending order w.r.t. their nominal traffic demand. Formally, this is operated through the cycle specified in Algorithm 2 that builds a complete routing state. For an iteration (t, c) of the nested cycles of Algorithm 2, the assignment of a path to a commodity is equivalent to an ant that moves from a partial routing state RSi to a partial routing state RSj such that: RSj = RSi ∪ {(c, p, t)} with p ∈ Pc . We note that, by the definition of routing state, a sequence of moves is actually a sequence of fixings of decision variables, as in (Maniezzo, 1999). 21 Algorithm 2 Construction of a complete routing state 1: for t := 1 to |T | do 2: sort c ∈ C in descending order of d¯ct 3: for (sorted c ∈ C) do 4: assign a single path p ∈ Pc to c 5: end for 6: end for The probability that an ant k moves from a routing state i to a more complete routing state j, chosen among a set of feasible routing states, is defined by the improved formula proposed by Maniezzo (1999): pkij = P α τij + (1 − α) ηij , f ∈F α τif + (1 − α) ηif where α ∈ [0, 1] is a parameter assessing the relative importance of trail and attractiveness. This formula presents two peculiar advantages over the canonical formula (20): it adopts the single parameter α in place of the two parameters β, δ and uses α as coefficient of a product instead of an index of an exponentiation. As discussed in Maniezzo (1999), the trail values τij and the attractiveness values ηij should be provided by suitable lower bounds of the considered optimization problem. In our particular case: 1) τij is derived from the values of the variables in the solution associated with the linear relaxation of the robust counterpart Rob-MP-CNDP; 2) ηij is equal to the value of a (good) feasible solution of the linear relaxation MP-CNDP-LP where a subset of the decision variables have fixed values as effect of the fixing decision taken in previous steps of the algorithm. 5.2. Daemon actions: Relaxation Induced Neighborhood Search At the end of the ant-construction phase, we attempt at improving the quality of the feasible solution found by executing an exact local search in a large neighborhood. In particular, we adopt a modified Relaxation Induced Neighborhood Search (RINS) (see Danna et al. (2005) for an exhaustive description of the method). In an integer linear program, we look for a solution that is integral and at the same time guarantees the best objective value. In RINS, it is observed that an optimal solution of the linear relaxation of the problem provides an objective value that is better than that of any feasible solution. However, at the same time, such an optimal solution is fractional and therefore does 22 not guarantee integrality. On the contrary, a feasible solution guarantees integrality, but provides a worse objective value. The fact that a variable is fixed to the same value in the optimal solution of the linear relaxation and in a feasible solution is a good indication that the fixing of the variable is good and should thus be maintained. Given a feasible solution, RINS profits from these observations by defining search neighborhoods, where those variables that have the same value in the feasible solution and in the optimal solution of the linear relaxation are fixed, while the other are free to vary their value. The neighborhood is then explored exhaustively by formulating the search as an integer linear program, which is solved exactly, possibly including an arrest condition such as a solution time limit. In our specific case, let (x̄, ȳ) be a feasible solution of Rob-MP-CNDP found by an ant and (xLR , y LR ) be an optimal (continuous) solution of the linear relaxation of Rob-MP-CNDP. Our modified RINS (mod-RINS) entails to solve exactly through an optimization solver like CPLEX a subproblem of Rob-MP-CNDP where: 1. we fix the variables x whose value in (x̄, ȳ) and (xLR , y LR ) differs of at most ǫ > 0, i.e.: x̄j = 0 ∩ xLR ≤ ǫ =⇒ xj = 0 j x̄j = 1 ∩ xLR ≥ 1 − ǫ =⇒ xj = 1 j 2. impose a solution time limit of τ to the optimization solver. A time limit is imposed since the subproblem may be difficult to solve, so the exploration of the large neighbourhood of x̄, ȳ may need to be truncated. Note that in point 1 we generalize the fixing rule of RINS, in which ǫ = 0. We thus allow that fixed variables may differ up to ǫ in value, in contrast to canonical RINS where they must have exactly the same value in the relaxation and in the feasible solution. 5.3. Pheromone trail update At the end of each ant-construction phase h, we update the pheromone trails of a move τij (h − 1) according to an improved formula proposed by Maniezzo (1999): τij (h) = τij (h − 1) + m X k=1 τijk   z k − LB , with τijk = τij (0) · 1 − curr z̄ − LB (21) where the values τij (0) and LB are set by using the linear relaxation of Rob-MP-CNDP: τij (0) is set equal to the values of the corresponding optimal decision variables and LB equal to the optimal value of the relaxation. 23 k Additionally, zcurr is the value of the solution built by ant k and z̄ is the moving average of the values of the last ψ feasible solutions built. The formula (21) has the desirable property of replacing the pheromone evaporation factor, a parameter whose setting may result tricky, with the moving average ψ, whose setting has been proved to be much less critical. Algorithm 3 shows the structure of our original hybrid exact-ACO algorithm. The algorithm is based on the execution of two nested loops: the outer loop is repeated until a time limit is reached and, during each execution of it, an inner loop defines m ants to build the solutions. Pheromone trail updates are done at the end of each execution of the inner loop. Once the ant construction phase is over, mod-RINS is applied so to try to get an improvement by exact large neighborhood search. Algorithm 3 Hybrid ACO-exact algorithm for (Rob-MP-CNDP) 1: compute the linear relaxation of (Rob-MP-CNDP) and initialize the values of τij (0) by it. 2: while the time limit is not reached do 3: for µ := 1 to m do 4: build a complete routing state 5: derive a complete feasible solution for (Rob-MP-CNDP) 6: end for 7: update τij (t) according to (21) 8: end while 9: apply mod-RINS to the best feasible solution 6. Experimental results In order to assess the performance of our hybrid algorithm, we executed computational tests on a set of 30 instances, based on realistic network topologies from the SNDlib (2010) and defined in collaboration with industrial partners from former and ongoing industrial projects (see e.g., Bley et al. 2011, 2013; Bauschert et al. 2014). The 30 instances consider 10 network topologies, whose main features are presented in Table 1. For each instance, in Table 1 we report its identification code (ID ) and features (|V | = no. vertices, |E| = no. edges, |C| = no. commodities). For each network topology, we defined three instances of Rob-MP-CNDP, each considering a distinct number of time periods, namely 5, 7, and 10. We performed the experiments on a machine with a 2.40 GHz quad-core processor and 16 GB 24 Table 1: Features of the instances Name ID |V | |E| |C| Germany50 Pioro40 Norway Geant France Dfn-Gwin Pdh Ta1 Polska Cost266 I1 I2 I3 I4 I5 I6 I7 I8 I9 I10 50 40 27 22 25 11 11 24 12 37 88 89 51 36 45 47 34 55 18 57 662 780 702 462 300 110 24 396 66 1337 of RAM and using the mixed-integer commercial solver IBM ILOG CPLEX version 12.4. All the instances lead to (very) large and hard to solve Rob-MP-CNDP. We observed that even a state-of-the-art solver like CPLEX had big difficulties in identifying good feasible solutions and in the majority of cases the final optimality gap was over 95%. In contrast, as clear from Table 2, in most cases our hybrid primal heuristic was able to find very high quality solutions associated with very low optimality gaps. The optimality gap indicates how far the best feasible solution found of value v ∗ is from the best lower bound LB available on the optimal value (formally gap% = |v ∗ − LB|/v ∗ · 100). We note that using CPLEX is essential for providing a lower bound in our problem instances and thus a quality guarantee for the given solutions. In the case of solutions not produced by CPLEX, we computed the optimality gap referring to the lower bound produced by CPLEX. On the basis of preliminary tests, we found that an effective setting of the parameters of our heuristic was: α = 0.5 (we thus balanced attractiveness and trail level), m = 10000 ants, ψ = m/10 (width of the moving average equal to 1/10 the number of ants), ǫ = 0.1 (tolerance of fixing in mod-RINS), T = 30 minutes (time limit imposed to the execution of mod-RINS). Each commodity admits 5 feasible paths, i.e. |Pc | = 5, ∀c ∈ C and 5 deviations bands (2 positive, 2 negative and the null deviation band). In contrast to our first computational experience presented in (D’Andreagiovanni et al., 2014), where linear relaxations were solved exactly by CPLEX requiring a non-negligible amount of time, we now 1) compute the linear relaxations of nominal problems by the results presented in Section 3 and 2) we solve 25 the linear relaxation of Rob-MP-CNDP by a time-truncated primal simplex method as implemented by CPLEX. This allowed to greatly reduce the time of execution of the ant construction phase and hugely increase the number of defined ants. The complete set of results is presented in Table 2, where we show the performance of the hybrid solution approach, that is denoted by the three measures c∗ (ACO), c∗ (ACO+RINS), gapAR%, which respectively represent the value of the best solution found by pure ACO, the value of the best solution found by ACO followed by RINS and the corresponding final optimality gap. Moreover, we show the performance of CPLEX, which is denoted by measures c∗ (IP) and gapIP% representing the value of the best solution found and the corresponding final optimality gap. The value of the best solutions found for each instance is highlighted in bold type. The overall time limit for the execution of the heuristic was 1 hour. The same time limit was imposed on CPLEX when used to solve the robust counterpart Rob-MPCNDP. We stress that increasing the time limit did not bring any remarkable benefit to CPLEX: even when letting CPLEX run for many hours, the only effects were getting negligible improvements in the best lower bound (we observed an extremely slow improvement rate of the bound) and running out of memory because of the huge size of the search trees generated. In the case of two instances of I10, CPLEX was not even able to find a feasible solution within the time limit (cases denoted by ∗). The best solutions found by our hybrid algorithm have in most cases a value that is at least one order of magnitude better than those found by CPLEX (3700% better on average, excluding of course the cases for which CPLEX did not find any feasible solutions). The results are of very high quality and, given the very low optimality gap, we can suppose that some of these solutions are actually optimal. The much higher performance is particularly evident for instances I5, I8 and I9. We observe that, in contrast to our conference paper (D’Andreagiovanni et al., 2014) where RINS was able to improve the value of the best solution found by the ant construction phase, in these new computations the role of RINS was reduced: thanks to the dramatic speed-up in solving the linear relaxations, we were able to really implement a swarm exploration of the feasible set, getting solutions that we believe to be optimal or very close to the optimum. So finding an improvement through RINS was impossible or really unlikely. We also think that the fact that a powerful local search like RINS has a minor or null role in finding higher quality solutions is an indication that we have defined a very strong and effective ant construction phase: in contrast to common experience in ACO, we indeed do not really require a final daemon/local 26 search phase to get solution of sufficiently high quality. If we focus on a specific network topology, it may be noticed that the optimality gaps produced by our algorithm tend to become smaller as the number of time periods grows. This may result surprising and counterintuitive at first sight, as one would expect exactly the opposite behaviour. Yet, considering our assumption of non-increasing demands for each commodity, it is reasonable to think that our primal hybrid heuristic discovers converging near-optimal paths when the number of time periods is large, thus performing better. We observe that it is likely that this behaviour would not occur in the case that the non-increasing demand assumption is dropped. As further way to assess the validity and effectiveness of our new heuristic, we also used as benchmark a fast and easy method to define a possibly good feasible solution to Rob-MP-CNDP, which is suggested by the theoretical results presented in Section 3: in each time period, we simply route the entire flow of each commodity on its shortest path. However, as clear from Table 2, where we report the value c(SP ) of the solution found by this approach and the corresponding optimality gap gapSP %, in the vast majority of the instances (in particular instances I4, I6, I7 and I8, for which the performance of our algorithm is far better), this simple approach performed much worse than our heuristic and we believe that this provides further evidence of the solidity of our algorithm. 7. Conclusion and future work In this paper, we have introduced the first Robust Optimization model to handle the uncertainty that affects traffic demands in the Multiperiod Capacitated Network Design Problem (MP-CNDP). Data uncertainty may compromise the quality and feasibility of produced solutions, so, as a remedy, we have proposed a Multiband Robustness model, following the wellestablished methodology of Robust Optimization. We have thus produced robust solutions that are protected against deviations of input traffic data. In general, the MP-CNDP already constitutes a challenging problem, even for state-of-the-art commercial solvers like CPLEX. Accounting for robustness and considering multiple time periods has the effect of further increasing the complexity of the problem. As a matter of fact, solutions found by CPLEX are of low quality and associated with very large optimality gaps. To overcome these difficulties, we have defined a hybrid primal heuristic based on the combination of a randomized fixing algorithm inspired by ant 27 Table 2: Experimental results ID I1 I2 I3 I4 I5 I6 I7 I8 I9 I10 |T | c∗ (ACO) c∗ (ACO+RINS) gapAR% c∗ (SP ) gapSP% c∗ (IP) gapIP% 5 7 10 5 7 10 5 7 10 5 7 10 5 7 10 5 7 10 5 7 10 5 7 10 5 7 10 5 7 10 4.26E+06 9.46E+06 3.07E+07 6.14E+06 1.34E+07 4.32E+07 3.14E+06 6.39E+06 2.02E+07 8.98E+05 2.15E+06 6.49E+06 1.34E+05 2.96E+05 9.43E+05 3.34E+05 6.54E+05 2.08E+06 1.19E+08 2.71E+08 8.29E+08 1.45E+08 2.83E+08 9.14E+08 2.12E+05 4.80E+05 1.60E+06 1.37E+08 2.78E+08 9.26E+08 4.26E+06 9.46E+06 3.07E+07 6.14E+06 1.34E+07 4.32E+07 3.14E+06 6.39E+06 2.02E+07 8.98E+05 2.15E+06 6.49E+06 1.34E+05 2.96E+05 9.43E+05 3.34E+05 6.54E+05 2.08E+06 1.19E+08 2.71E+08 8.29E+08 1.39E+08 2.83E+08 9.14E+08 2.12E+05 4.80E+05 1.60E+06 1.37E+08 2.78E+08 9.26E+08 3.8 2.5 2.0 11.6 11.5 8.4 14.6 6.5 2.2 2.6 11.6 8.8 3.0 1.4 0.7 12.2 5.6 1.7 1.1 0.5 0.2 9.0 3.8 2.1 1.1 0.3 0.1 20.7 12.7 14.9 4.35E+06 9.64E+06 3.10E+07 7.48E+06 1.64E+07 5.45E+07 3.61E+06 7.45E+06 2.37E+07 2.09E+06 4.94E+06 1.98E+07 1.35E+05 2.97E+05 9.42E+05 4.14E+05 8.37E+05 2.77E+06 1.50E+08 3.64E+08 1.27E+09 1.60E+08 3.36E+08 1.08E+09 2.22E+05 5.02E+05 1.68E+06 1.36E+08 3.02E+08 9.84E+08 5.9 4.3 3.0 27.4 27.6 27.3 25.6 19.7 16.8 58.0 61.6 70.1 3.7 1.7 0.6 29.1 26.2 25.9 21.7 25.8 34.8 21.2 19.1 17.2 5.5 4.9 4.9 20.1 19.8 19.8 3.42E+08 8.28E+08 2.89E+09 2.58E+08 6.19E+08 2.13E+09 9.56E+07 2.29E+08 7.88E+08 4.13E+07 9.58E+07 4.18E+08 5.09E+06 1.56E+07 4.46E+07 7.07E+05 6.69E+05 9.84E+07 1.19E+08 2.73E+08 8.34E+08 7.02E+09 1.86E+10 6.44E+10 5.13E+05 6.08E+05 9.80E+06 5.40E+09 * * 98.8 98.9 99.0 97.9 98.1 98.1 97.2 97.4 97.5 97.9 98.0 98.6 97.5 98.1 97.9 58.5 7.7 97.9 1.1 0.9 0.7 98.2 98.5 98.6 59.2 21.5 83.7 98.0 * * 28 colony optimization and an exact large neighborhood search. Computational experiments on a set of 30 realistic instances from the SNDlib have confirmed that our heuristic drastically outperforms CPLEX, finding high quality solutions associated with low optimality gaps in a short amount of time. We believe that many of the best solutions found are actually optimal, so a future objective will be to characterize appropriate families of valid inequalities for the problem, in the attempt to close the gaps and thus possibly prove the optimality of the found solutions. Furthermore, the excellent computational performance suggests the possibility of using the heuristic, conveniently adapted, for other applications and in more general settings, where, for example, the paths of each commodity are not predetermined. We expect our hybrid primal heuristic to perform well even in such different contexts. Acknowledgements This work was partially supported by the German Research Foundation (DFG), project Multiperiod Network Optimization, by the DFG Research Center MATHEON (www.matheon.de), Project B3, by the Einstein Campus for Mathematics Berlin (ECMath) Project ROUAN, and by the German Federal Ministry of Education and Research (BMBF), Project ROBUKOM (Bauschert et al., 2014), grant 05M10PAA. Appendix A. Proofs of the Statements of Section 3 Appendix A.1. Proof of Proposition 1 Statement: Let x̄tcp := 0, dtcp := 0 and γet := ∞ for t = 0. There exists an optimal solution x̄ of MP-CNDP-LP such that: dt−1 x̄t−1 ≤ dtc x̄tcp c cp ∀ c ∈ C, p ∈ Pc , t ∈ T Proof. We prove the statement by induction, considering two consecutive time periods t − 1 and t with t = {1, 2, . . . , |T |}. As basis step, we note that relation (4) trivially holds for t = 1 by definition of x̄tcp := 0, dtcp := 0 for t = 0. As inductive step, suppose that relation (4) holds for t ≤ |T | − 1. We will show that it holds also for t ≤ |T | period. Suppose that relation t−1 t t (4) does not hold for t = |T |, i.e. ∃ c∗ ∈ C, p∗ ∈ Pc∗ : dt−1 c∗ x̄c∗ p∗ > dc∗ x̄c∗ p∗ for some commodity and its corresponding path when t = T . Without 29 loss of generality, we assume that there exists unique c∗ ∈ C, p∗ ∈ Pc∗ that does not respect relation (4) for period |T |, as the argument we use below can be applied iteratively to any number of such deviating inequalities. Moreover, suppose that p∗ ∈ Pc is a shortest path in edge cost for c∗ . Let t−1 t t ∆ = dt−1 c∗ x̄c∗ p∗ − dc∗ x̄c∗ p∗ be the residual flow. For simplicity we assume that ∆ is routed over a single path as the argument similarly holds when it splits over several paths. Given our assumption, it is easy to see that ∆ will be routed on another p′ ∈ PP c∗ and that the objective function value will P path t gain at most γet ∆. When p′ is another shortest path, γe ∆ ≥ e∈E:e∈p′ e∈E:e∈p∗ t−1 t t we get an equality and we see that xt−1 c∗ p∗ dc∗ ≤ xcp∗ dc∗ gives an equivalent optimal solution in terms of the objective function value, otherwise we have a contradiction. Suppose p∗ in xtc∗ p∗ is not a shortest path in edge cost for P P γet ≤ γet then the same argument as above applies. c∗ . If e∈E:e∈p∗ e∈E:e∈p′ P P P γet ∆ − γet > γet then the solution gains at most If ∗ ∗ ′ e∈E:e∈p e∈E:e∈p e∈E:e∈p P γet ∆ > 0. If this is the case, we can reroute ∆ in period |T | − 1 e∈E:e∈p′ from p∗ t−1 = x̄tc∗ p∗ dtc∗ in period T, when in to p′ . Then we have x̄t−1 c∗ p∗ dc∗ t−2 ≤ x̄tc∗ p∗ dtc∗ holds. Then this new solution the deviating inequality x̄t−2 c∗ p∗ dc∗ P P P P γet ∆ − γet−1 ∆ − γet ∆ γet−1 ∆ ≥ gains at most e∈E:e∈p∗ e∈E:e∈p′ e∈E:e∈p∗ e∈E:e∈p′ by the non-increasing cost per unit of capacity. The same argument holds t−2 t t when x̄t−2 c∗ p∗ dc∗ > x̄c∗ p∗ dc∗ . Appendix A.2. Proof of Theorem 1 Statement: Consider problem MP-CNDP-LP, namely the linear relaxation of MP-CNDP-IP, and let p∗c ∈ Pc be a shortest path in edge length for each commodity c ∈ C. An optimal solution of MP-CNDP-LP can be defined by routing in each time period t ∈ T the entire flow of each commodity c ∈ C on the shortest path p∗c and by installing on each edge of p∗c the exact capacity needed to route the traffic flow dct . Proof. Before proceeding to the proof, we recall that in MP-CNDP-LP the capacity variables lose their integrality constraint and thus the capacity installation on each edge in each period will exactly equal the flow. It is well known that the result stated in the theorem holds for one single period (see Ahuja et al. 1993) and we propose a proof of the result, extending below the reasoning to the case with multiple periods. Consider then a 30 single-period problem (in this case, the t apex is thus equal to 1 for all the involved quantities) and a commodity c ∈ C. Suppose that x1cp = k with 0 < k ≤ 1 is a non-zero variable in the optimal solution of the problem for some p ∈ Pc . Hence the contribution to thePobjective function is P γe1 d1c k. Let p′ be a shortest path for c. Then γe1 d1c (x1cp′ +k) ≤ ′ e∈E:e∈p e∈E:e∈p P P γe1 d1c x1cp . Thus the theorem holds for the single γe1 d1c x1cp′ + e∈E:e∈p′ e∈E:e∈p period case. Assume now that the theorem holds for |T |−1 periods. We will show that it holds for |T | periods. By Proposition 1, we may assume that t−1 ≤ xt dt for all c ∈ C, p ∈ P , t ∈ T in an optimal solution of MPxt−1 c cp dc cp c CNDP-LP with |T | periods. Let OP T (|T | − 1) denote the optimal objective function value for |T |−1 periods according to the induction hypothesis. Also, let OP Tt denote the contribution of the optimal solution of the MP-CNDPP OP Tt = LP for |T | periods to the objective function in period t. Then t∈T P P OP Tt + OP T|T | . Suppose OP Tt is determined by, for each t∈T \|T | t∈T \|T | commodity, the same shortest P path in edge cost for each period up to |T |−1. OP Tt . Using a similar argument as in the Hence OP T (|T | − 1) = t∈T \|T | single period case, it is easy to see that the increase in demand for each commodity in period |T | will be routed in the shortest paths that were used in the previous periods. For this case, let OP T |T | denote the contribution of the optimal solution of MP-CNDP-LP to the objective function in period P OP Tt is not determined by, for each commodity, the |T |. Suppose t∈T \|T | same shortest path in edge cost P for each period up to |T | − 1. Then it is clear that OP T (|T | − 1) ≤ OP Tt and OP T (|T |) ≤ OP T|T | . Hence t∈T \|T | P OP T (|T | − 1) + OP T (|T |) ≤ OP Tt + OP T|T | . t∈T \|T | References References Ahuja, R.K., Magnanti, T., Orlin, J.: Network Flows: Theory, Algorithms, and Applications. Prentice Hall, Upper Saddle River (1993) Bauschert, T., Büsing, C., D’Andreagiovanni, F., Koster, A.M.C.A., Kutschka, M., Steglich, U.: Network Planning under Demand Uncertainty with Robust Optimization. IEEE Communications Magazine, 52 (2), 178185 (2014) DOI: 10.1109/MCOM.2014.6736760 31 Belotti, P., Kompella, K., Noronha, L.: A comparison of OTN and MPLS networks under traffific uncertainty. Submitted in 2011. http://myweb.clemson.edu/∼pbelott/papers/robust-opt-network-design.pdf (retrieved on 07.03.2014) (2011) Ben-Tal, A., El Ghaoui, L., Nemirovski, A.: Robust Optimization. Springer, Heidelberg (2009) Bertsekas, D.P.: Network Optimization: Continuous and Discrete Models. Athena Scientific, Belmont (1998) Bertsimas, D., Brown, D., Caramanis, C.: Theory and Applications of Robust Optimization. SIAM Review 53 (3), 464-501 (2011) Bertsimas, D., Sim, M.: The Price of Robustness. Oper. Res. 52 (1), 35-53 (2004) Bienstock, D., Chopra, S., Günlük, O, Tsai, C.: Minimum cost capacity installation for multicommodity network flows. Math. Prog. 81 (2), 177199 (1998) Bley, A., D’Andreagiovanni, F, Hanemann, D.: Robustness in Communication Networks: Scenarios and Mathematical Approaches. In: Proc. of the ITG Symposium on Photonic Networks 2011, 1-8, VDE Verlag, Berlin (2011) Bley, A., D’Andreagiovanni, F, Karch, D.: WDM Fiber Replacement Scheduling. In: Proc. of INOC 2013, Electronic Notes in Discrete Mathematics 41 (5), 189-196 (2013) DOI: 10.1016/j.endm.2013.05.092 Bley, A., Grötschel, M., Wessäly, R.: Design of broadband virtual private networks: Model and heuristic for the B-WiN. DIMACS Series in Discrete Mathematics and Theoretical Computer Science 53, 1-16 (2000) Blum, C.: Ant colony optimization: Introduction and recent trends. Physics Life Rew. 2 (4), 353-373 (2005) Blum., C., Puchinger, J., Raidl, G.R., Roli., A.: Hybrid metaheuristics in combinatorial optimization: A survey. Appl. Soft Comp. 11 (6), 4135– 4151 (2011) Büsing, C., D’Andreagiovanni, F.: New Results about Multi-band Uncertainty in Robust Optimization. In: Klasing, R. (ed.) Experimental Algorithms - SEA 2012, LNCS, vol. 7276, pp. 63-74. Springer, Heidelberg (2012) DOI: 10.1007/978-3-642-30850-5 7 32 Büsing, C., D’Andreagiovanni, F.: Robust Optimization under Multi-band Uncertainty - Part I: Theory. CoRR abs/1301.2734, http://arxiv.org/abs/1301.2734 (2013) Büsing, C., D’Andreagiovanni, F.: A new theoretical framework for Robust Optimization under multi-band uncertainty. In: Helber, S. et al. (eds.) Operations Research Proceedings 2012, pp. 115-121. Springer, Heidelberg (2014) Büsing, C., D’Andreagiovanni, F., Raymond, A.: 0-1 Multiband Robust Optimization. In: Huisman, D. et al. (eds.) Operations Research Proceedings 2013, pp. 89-95. Springer, Heidelberg (2014) Christofides, N., Brooker, P.: Optimal Expansion of an Existing Network. Math. Program. 6, 197-211 (1974) Crainic, T.G., Gendreau, M.: Cooperative Parallel Tabu Search for Capacitated Network Design. J. Heuristics 8 (6), 601-627 (2002) Danna, E., Rothberg, E., Le Pape, C.: Exploring relaxation induced neighborhoods to improve MIP solutions. Math. Program. 102, 71-90 (2005) D’Andreagiovanni, F., Krolikowski, J., Pulaj, J.: A hybrid primal heuristic for Robust Multiperiod Network Design. To appear in Esparcia-Alcazar, A. (ed.) Applications of Evolutionary Computation - 17th European Conference, EvoApplications 2014, Lecture Notes in Computer Sciences. Springer, Heidelberg (2014) Dely, P., D’Andreagiovanni, F., Kassler, A.: Fair optimization of meshconnected WLAN hotspots. Wireless Communications and Mobile Computing (2013) DOI: 10.1002/wcm.2393 Dorigo, M., Di Caro, G., Gambardella, L.M.: Ant algorithms for discrete optimization. Artificial Life 5 (2), 137-172 (1999) Dorigo, M., Maniezzo, V., Colorni, A.: Ant System: Optimization by a colony of cooperating agents. IEEE Trans. Syst. Man Cybern. B 26 (1), 29-41 (1996) Gambardella, L.M., Montemanni, R., Weyland, D.: Coupling ant colony systems with strong local searches. Europ. J. Oper. Res. 220 (3), 831-843 (2012) 33 Gamvros, I., Raghavan, S.: Multi-period traffic routing in satellite networks. Europ. J. Oper. Res. 219 (3), 738-750 (2012) Gendreau, M., Potvin, J., Smires A., Soriano P.: Multi-period capacity expansion for a local access telecommunications network. Europ. J. Oper. Res., 172 (3), 1051-1066 (2006) Gupta, V., Grossmann, I.E.: An Efficient Multiperiod MINLP Model for Optimal Planning of Offshore Oil and Gas Field Infrastructure. Ind. Eng. Chem. Res., 51 (19), 68236840 (2012) IBM ILOG CPLEX, http://www-01.ibm.com/software/integration/optimization/cplex-optimizer. Kleeman, M.P., Seibert, B.A., Lamont, G.B., Hopkinson, K.M., Graham, S.R.: Solving Multicommodity Capacitated Network Design Problems Using Multiobjective Evolutionary Algorithms. IEEE Trans. Evol. Comp. 16 (4), 449-471 (2012) Koster, A.M.C.A., Kutschka, M., Raack, C.: Robust network design: Formulations, valid inequalities, and computations. Networks 61 (2), 128-149 (2013) Lardeux, B., Nace, D., Geffard, J.: Multiperiod network design with incremental routing. Networks 50 (1), 109-117 (2007) Maniezzo, V.: Exact and Approximate Nondeterministic Tree-Search Procedures for the Quadratic Assignment Problem. INFORMS J. Comp. 11 (4), 358-369 (1999) Orlowski, S., Wessäly, R., Pioro, M., Tomaszewski, A.: SNDlib 1.0 - Survivable Network Design Library. Networks 55 (3), 276-286 (2010) Theimer, T: Towards a scalable and flat IP core network. ECOC 2009 Vienna, Austria. (retrieved 07.03.2014) http://conference.vde.com/ecoc-2009/programs/documents/ws4 thomas%20theimer.pdf 34
9cs.NE
arXiv:1702.03368v1 [math.GR] 11 Feb 2017 On the problem of existence and conjugacy of injectors of generalized π-soluble groups∗ Xia Yin, Nanying Yang School of Science, Jiangnan University, Wuxi 214122, P. R. China E-mail: [email protected] N.T. Vorob’ev Department of Mathematics, Masherov Vitebsk State University, Vitebsk 210038, Belarus E-mail: [email protected] Abstract In this paper, we prove the existence and conjugacy of injectors of a generalized π-soluble groups for the Hartley class defined by a invariable Hartley function, and give a description of the structure of the injectors. 1 Introduction Throughout this paper, all groups are finite and p is a prime. G always denotes a group, |G| is the order of G, σ(G) is the set of all primes dividing |G|, π denotes a set of some primes. Let P be the set of all primes, then let π ′ = P \ π. We use Gπ denote a Hall π-subgroup of G. Recall that a class F of groups is called a Fitting class if F is closed under taking normal subgroups and products of normal F-subgroups. As usual, we denote by E, S, N the classes of all groups, all soluble groups, all nilpotent groups, respectively; Eπ , Sπ , Nπ denote the classes of all π-groups, all soluble π-groups, all nilpotent π-groups, respectively; and Sπ and Nπ to denote the classes of all π-soluble groups and all π-nilpotent groups, respectively. It is well known that all the above classes are Fitting classes. From the definition of Fitting class, we see that for each non-empty Fitting class F, every group G has a unique maximal normal F-subgroup, which is called the F-radical of G and denoted by GF . For any non-empty class F of groups, a subgroup V of G is said to be F-maximal if V ∈ F and U = V whenever V ≤ U ≤ G and U ∈ F. A subgroup V of a group G is said to be an F-injector of ∗ Research is supported by a NNSF grant of China (Grant # 11301227) and Natural Science Foundation of Jiangsu Province (grant # BK20130119) Keywords: Finite group, Fitting class, injector, π-soluble group Mathematics Subject Classification (2010): 20D10 1 G if V ∩ K is an F-maximal subgroup of K for every subnormal subgroup K of G. Clearly, every F-injector of G is an F-maximal subgroup of G. Fitting classes play an important role in the theory of groups. The importance of the theory of Fitting classes can firstly be seen in the following theorem proved by Fischer, Gaschütz and Harley [1], which is in fact a generalization of the classical Sylow theorem and Hall theorem. Theorem 1.1 (see [1] or [2, Theorem VIII,2.8]. Let F be a non-empty Fitting class. Then a soluble group possesses exactly one conjugacy class of F-injectors. S For a Fitting class F, we let π(F) = G∈F σ(G). Note that if F = Np is the Fitting class of all p-groups, then the F-injectors of a group G are Sylow p-subgroups of G; If F = Eπ and G has a Hall π-soluble group, then the F-injectors of G are Hall π-subgroups of G (see [3, p.68, Ex.1] or [4, p.238]). About the existence of X-injector of G, Shemetkov posed the following problem. Problem 1.2 (Shemetkov [5, Problem 11.117]). Let X be a Fitting class of soluble groups. Is it true that every finite non-soluble group possesses an X-injector ? This problem has been resolved in [6, 7] for the Fitting classes X ∈ {S, Sπ , N}. In connection with this, a interesting problem is: to find the conjugate class of injectors in any π-soluble groups. The first result in this direction is the following famous Chuchin’s theorem [8]: A π-soluble G possesses a Hall π-subgroup (that is, Eπ -injectors) and any two Hall π-subgroups are conjugate. As a development of Chuchin’s theorem, Shemetkov and Guo proved the following Theorem 1.3 ([9, Theorem 2.2] and [10]). Let F be a Fitting class, π = π(F). If G/GF is π-soluble, then G has an F-injector and any two F-injector of G are conjugate in G. The product FH of two Fitting classes F and H is the class (G | G/GF ∈ H). It is well known that the product of any two Fitting classes is also a Fitting class and the multiplication of Fitting classes satisfies associative law (see [2, Theorem IX, 1.12(a)(c)]). Following [11, 12], a function f : P −→ {nonempty Fitting classes} is called a Hartley function (or in brevity, H-function). A Fitting class F is local if \ \ f (p)Np Ep′ ) F = Eπ(F) ( p∈π(F) for some H-function f . For a H-function h, let π = Supp(h) := {p ∈ P : h(p) 6= ∅}, which is called the support of the T H-function h, and LH(h) = p∈π h(p)Ep′ Np . Then, a Fitting class F is called Hartley class if there exists a H-function h such that H = LH(h). In this case, H is said to be defined by the H-function h or h is an H-function of H. It is clear that N ⊆ LH(h). Hence, if F = LH(h), then π(F) = P. Any Hartley class is a local 2 Fitting class (see [13, p.31]). But the converse is not true in general (see [11, p.207, 4.2]). For two class functions f and h, if f (p) ⊆ h(p) for all p ∈ π, then we write that f ≤ h. Concerning Fitting classes and injectors, the authors in [14] (see also [11]) posed the problem (in the universe S): Let F be a local Fitting class of soluble groups, could we describe the F-injectors of a soluble group? In view of Problem 1.2 and Theorem 1.3, the following more general question (in the class E) naturally arise: Problem 1.4. For a local Fitting class F and a non-soluble group G (in particular, a π-soluble group G), whether G possesses an F-injector and any two F-injectors are conjugate ? Note that there exist non-soluble groups G and non-local Fitting classes F such that G has no F-injector (see, for example, [4, 7.1.3-7.1.4]). In this paper, by developing local method offered by Hartley [11], we will resolve Problem 1.4 for partial π-soluble groups G (in particular, for π-soluble groups) and the Hartley class defined by a invariable Hartley function. In fact, we will prove the following Theorem 1.5. Support that H = LH(h) be a Hartley class defined by a invariable Hartley function h, that is, h(p) = X for all prime p ∈ π = Supp(h), where X is some non-empty Fitting class, and G ∈ XSπ (in particular, G is a π-soluble group). Then the following statements hold: (1) G possesses an H-injector and any two H-injectors are conjugate in G; (2) Every H-injector V of G is of type GXEπ′ L, where L is the subgroup of G such that L/GX is an Nπ -injector of some Hall π-subgroup of G/GX . From Theorem 1.5, a series of new classical conjugate classes of injectors in any π-soluble group are obtained and the structure of injectors of some groups are described. For example, the following results directly follow from Theorem 1.5. Corollary 1.5.1. Every π-soluble group possesses exactly one conjugacy class of XNπ -injectors. Corollary 1.5.2. Every π-soluble group has a injector with limited π-nilpotent length (that is, for any natural number k) and any two of them are conjugate. (Nπ )k -injector If π = {p}, then from Theorem 1.5 we have the following Corollary 1.5.3. If H is an Hartley class of type XEp′ Np , where X is a nonempty Fitting class, and G a group such that G/GX is p-soluble, then G possesses an H-injector and any two of them are conjugate in G. In the case when X = (1), where (1) is the class of all identity groups, taking account of Theorem of Iranzo-Toress in [15], we have Corollary 1.5.4. Every p-soluble group G possesses exactly one conjugacy class of p-nilpotent injectors and each p-nilpotent injector is a maximal p-nilpotent subgroup of G containing the pnilpotent radical of G. Note that even if π $ σ(G) an X ⊆ S, the all statements of Theorem 1.5 and the corollaries are 3 still new results for any soluble group G. All unexplained notations and terminologies are standard. The reader is referred to [2, 4, 16] if necessary. 2 Preliminaries Recall that G is said to be π-soulbe if there exists a series of subnormal subgroups 1 = G0 ⊳ G1 ⊳ G2 · · · ⊳ Gm = G such that every factor Gi /Gi−1 is either a p-group for some p ∈ π or a π ′ -group, for i = 1, 2, · · · , m. In particular, if π = p, then a π-soluble group is said to be p-soluble. If σ(G) ⊆ π, then G is said to be a π-group. A subgroup H of G is said to be a Hall π-subgroup of G if σ(H) ⊆ π and σ(|G : H|) ⊆ π ′ . G is said to be p-nilpotent if G has a normal Hall p′ -subgroup. G is said to be π-nilpotent if G is p-nilpotent for all p ∈ π. If CG (GF ) ⊆ GF , then G is said to be F-constrained. Note that if F = N (F = Nπ , resp.), then the F-radical of G is the Fitting subgroup of G (the π-Fitting subgroup, resp.), which is called nilpotent radical (π-nilpotent radical, resp.) and denoted by GN or F (G) (GNπ or Fπ (G), resp.). The maximal normal π-subgroup (the maximal normal π ′ -subgroup) of G is said to be π-radical of G and denoted by GEπ or Oπ (G) (π ′ -radical of G, and denoted by GEπ′ or Oπ′ (G), resp.). Lemma 2.1 (see [3, Theorems 1.8.18 and 1.8.19] or [17, Corollary 4.1.2]). Support that G ∈ Sπ . Then G is Nπ -constrained, that is, CG (Fπ (G)) ≤ Fπ (G). In particular, if GEπ′ = 1, then G is π-constrained, that is, CG (Oπ (G) ≤ Oπ (G). The following results is well known (see, for example, [2, IX, Remarks (1.3)]). Lemma 2.2. Let F be a non-empty class of groups. 1) If V is an F-injector of G and K ⊳ G, then V ∩ K is an F-injector of K; 2) If V is an F-injector of G and α : G → Ḡ is a isomorphism, then α(V ) is an F-injector of Ḡ; 3) If V is F-maximal subgroup of G and V ∩ M is an F-injector of M for any maximal normal subgroup M of G, then V is an F-injector of G; 4) If V is an F-injector of G, then GF ≤ V and V is an F-maximal subgroup of G. Lemma 2.3 [2, Lemma IX, 1,1(a), Theorem IX, 1.12(b)]. Let F be a non-empty Fitting class. Then: 1) If N is a subnormal subgroup of G, then NF = N ∩ GF ; 2) If H is a non-empty Fitting class, then the H-radical of G/GF is GFH /GF . Lemma 2.4 (see [8] or [18, Chapter 5, Theorem 3.7]). If G ∈ Sπ , then every π-subgroup of G is contained some Eπ -injector of G and any two Eπ -injector of G are conjugate in G. 4 Definition 2.5. Let π = Supp(h), where h is the support of some H-function h of an Hartley class H. Then h is said to be 1) integrated if h(p) ⊆ H for all p ∈ π; 2) full if h(p) ⊆ h(q)Ep′ for all different primes p, q ∈ π; 3) full integrated if h is full and integrated as well; 4) invariable if f (p) = f (q) for all p, q ∈ π. It is easy to see that every Hartley class can be defined by a integrated H-function, and a invariable H-function is full integrated (in fact, since h(p) = h(q) for all p, q ∈ π, we have that T h(p) ⊆ h(p)Eq′ ⊆ h(q)Eq′ , so h(p) ⊆ q∈π h(q)Eq′ Np = H). 3 Proof of Theorem 1.5 The proof of Theorem 1.5 consists of a large number of steps. The following 5 lemmas are the main steps of it. Lemma 3.1. Every π-soluble group G possesses exactly one conjugacy class of π-nilpotent injectors, and each π-nilpotent injector of G is the product of the π ′ -radical of G and an Nπ -injector of some Hall π-subgroup of G. Proof. We prove the lemma by induction on |G|. Let M be any maximal normal subgroup of G. We consider the following two possible cases. Case 1. The π ′ -radical GEπ′ of G is a identity group, that is, GEπ′ = 1. Then MEπ′ = 1. By induction, M possesses exactly one conjugacy class of π-nilpotent injectors and every π-nilpotent injector of M is an Nπ -injector of some Hall π-subgroup of M . Let F1 be an Nπ -injector of some Hall π-subgroup Mπ of M . Since every Hall π-subgroup Gπ of G is soluble, Gπ has an Nπ -injector V and any two Nπ -injectors of Gπ are conjugate in Gπ . Since Mπ = M ∩ Gπ ⊳ Gπ , we have that V ∩ Mπ is an Nπ -injector of M by Lemma 2.2(1). In view of the conjugacy of Nπ injectors of M , we may assume that F1 = V ∩ Mπ . Since a Hall π-subgroup of any π-nilpotent group is a nilpotent π-subgroup, every π-nilpotent injector of Gπ is an Nπ -injector of Gπ . Hence, if we can prove that V is a maximal π-nilpotent subgroup of G, then V is a π-nilpotent injector of G by Lemma 2.2(3), and so V is an Nπ -injector of G. Support that V ≤ V1 where V1 is a maximal π-nilpotent subgroup of G. Since GNπ and (V1 )Eπ′ are normal in V1 , [(V1 )Gπ′ , GNπ ] ≤ (V1 )Eπ′ ∩ GNπ = 1. Hence (V1 )Eπ′ ≤ CG (GNπ ). 5 Since Fπ (G) = GNπ = GNπ and CG (GNπ ) ≤ GNπ by Lemma 2.1, we have that (V1 )Eπ′ = 1. This means that V1 ∈ Nπ and so V = V1 is a maximal π-nilpotent subgroup of G. This shows that the statement of the lemma holds in case 1. Case 2. GEπ′ 6= 1. Let G1 = G/GEπ′ . By Lemma 2.3(2), (G1 )Eπ′ = GEπ′ GEπ′ /GEπ′ = 1. Hence by case 1, we have that G1 possesses exactly one conjugate class of π-nilpotent injectors of type (G1 )Eπ′ V1 , where V1 is an Nπ -injector of some Hall π-subgroup of G1 , and the set of π-nilpotent injectors of G1 are coincide with the set of Nπ -injectors of Hall π-subgroups Gπ GEπ′ /GEπ′ . But since Gπ is soluble, by Theorem 1.1 Gπ has Nπ -injector, V say. Then by Lemma 2.2(2), the subgroup V GEπ′ /GEπ′ is an Nπ -injector of Gπ GEπ′ /GEπ′ . It follows that V GEπ′ is a π-nilpotent subgroup of G. We now prove that V GEπ′ is a maximal π-nilpotent subgroup of G. Assume that V GEπ′ ≤ F and F is a maximal π-nilpotent subgroup of G. Then F = FEπ′ Fπ , where Fπ ∈ Nπ is a Hall π-subgroup of F . Without loss of generality, we may assume that Fπ ⊆ Gπ . Hence V ≤ Fπ ≤ Gπ . But since the Nπ -injector V is Nπ -maximal in Gπ , we have that V = Fπ . It follows from Lemma 2.3 and GEπ′ ⊳ F that (F/GEπ′ )Eπ′ = FEπ′ /GEπ′ . Hence (F/GEπ′ )/(F/GEπ′ )Eπ′ ≃ F/FEπ′ ≃ Fπ = V ∈ Nπ . This shows that F/GEπ′ is π-nilpotent and V GEπ′ /GEπ′ ≤ F/GEπ′ . Thus, GEπ′ V = F is a maximal π-nilpotent subgroup of G. In order to prove that GEπ′ V is a π-nilpotent injector of G, by Lemma 2.2(3) we only need to prove that GEπ′ V ∩ M is a π-nilpotent injector of M . By induction, M has a π-nilpotent injector of type MGE ′ L, where L is an Nπ -injector of some π Hall π-subgroup Mπ of M . Since Mπ = M ∩ Gπ ⊳ Gπ , and any two Nπ -injectors of Mπ are conjugate by Theorem 1.1, we may, without loss of generality, assume that L = V ∩ Gπ . Since GEπ′ V ∩ M E GEπ′ V and GEπ′ V is π-nilpotent, GEπ′ V ∩ M is π-nilpotent. But MEπ′ L ≤ GEπ′ V ∩ M and the π-nilpotent injector MEπ′ L of M is a maximal π-nilpotent subgroup of M . Therefore MEπ′ L = GEπ′ V ∩ M . This shows that GEπ′ V ∩ M is a π-nilpotent injector of M . Therefore, existence of π-nilpotent injector in a π-soluble group has been proved. The conjugacy of π-nilpotent injectors follows from the cojugacy of Nπ -injectors of Hall πsubgroups of any π-soluble group. This shows that the lemma also holds in case 2. The Lemma is proved. In the case when π = {p}, by Lemma 3.1 we directly obtain the following 6 Corollary 3.2. Every p-soluble group G possesses exactly one conjugate class of p-nilpotent injectors, and every p-nilpotent injector of G is of type GEp′ P , where P is a Sylow p-subgroup of G and GEp′ is the p′ -radical of G. Support that X be some set of groups. We use FitX to denotes the Fitting class generated by X, that is, FitX is the smallest Fitting class containing X. For a class F of groups, we use GF to denotes the F-residual of G. Lemma 3.3. Every Hartley class H can be defined by a full integrated H-function h, that is, H = LH(h) such that h(p) ⊆ h(q)Eq′ ⊆ H, for all different primes p, q ∈ π = Supp(h). Proof. Let H be a Hartley class. Then H = LH(h1 ), for some integrated H-function h1 . Following [11], we define: ψ(p) = {G | G ≃ H Ep′ , for some H ∈ h1 (p)}, for all p ∈ π. Let X be a group in ψ(p). Then X ≃ Y Ep′ , for some group Y ∈ h1 (p). Since every Fitting class is closed with respect to normal subgroup, Y Ep′ ∈ h1 (p) and so X ∈ h1 (p). This shows that ψ ≤ h1 , and so ψ(p)Ep′ ⊆ h1 (p)Ep′ . Ep′ If Y1 ∈ h1 (p)Ep′ , then Y1 /(Y1 )h1 (p) ∈ Ep′ and Y1 E ′ (Y1 p )Ep′ E ′ Y1 p , = ing equation: we have E ′ Y1 p ≤ (Y1 )h1 (p) ∈ h1 (p). Moreover, since ∈ ψ(p), that is, Y1 ∈ ψ(p)Ep′ . Therefore, we obtain the followψ(p)Ep′ = h1 (p)Ep′ . (∗) Now, let h be the H-function such that h(p) = Fit(ψ(p)), for all p ∈ π. Let M = ∩p∈π h(p)Ep′ Np . We now prove that M = H. In fact, since ψ ≤ h1 , we have h ≤ h1 , and so h(p)Ep′ ⊆ h1 (p)Ep′ , for all p ∈ π. Then, by the equation (*), we see that Fit(h1 (p)Ep′ ) = h1 (p)Ep′ = Fit(ψ(p)Ep′ ). Therefore h1 (p)Ep′ = Fit(ψ(p)Ep′ ) ⊆ (Fit(ψ(p))Ep′ = h(p)Ep′ . This shows that h(p)Ep′ = h1 (p)Ep′ , for all p ∈ π. Thus, we obtain that M = H. Moreover, since h ≤ h1 and h1 is integrated H-function of H, we have that h is a integrated H-function of H. 7 Now, in order to complete the proof of the lemma, we only need to prove that h(p) ⊆ h(q)Eq′ , for all different primes p, q ∈ π. In fact, let L ∈ h1 (p) and p 6= q ∈ π. Clearly, Nq ⊆ Ep′ , so LEp′ ≤ LNq . However, since L ∈ H, we have L/Lh1 (q)Eq′ ∈ Nq . Hence LNq ≤ Lh1 (q)Eq′ . It follows that LNq ∈ h1 (q)Eq′ . This shows that for every group in h1 (p), its Ep′ -residual is contained in h1 (q)Eq′ . Therefore, if R ∈ ψ(p), then R ≃ V Ep′ for some group V ∈ h1 (p) and thereby R ∈ h1 (q)Eq′ . This induces that ψ(p) ⊆ h1 (q)Eq′ . Thus h(p) = Fit(ψ(p)) ⊆ Fit(h1 (q)Eq′ ) = h1 (q)Eq′ = h(q)Eq′ . This completes the proof of the lemma. By Lemma 3.3, for any Hartley class H, we may always assume that H is defined by a full integrated H-function h. We call the subgroup Gh = Πp∈π Gh(p) the h-radical of G. Lemma 3.4. Let H = LH(h) for a full integrated H-function h, and G a group such that G/Gh is Nπ -constrained (in particular, G/Gh is π-soluble). Then a subgroup V containing GH belongs to H if and only if V /Gh is π-nilpotent. Proof. Assume that V ∈ H and GH ⊆ V . Then Vh(p) ∩ GH = (GH )h(p) = Gh(p) , and so [Vh(p) , GH ] ⊆ Gh(p) . This implies that Vh(p) ⊆ CG (GH /Gh(p) ), for all p ∈ π. T We first prove that GH /Gh = Fπ (G/Gh ). Let Fπ (G/Gh ) = L/Gh . Since GH ∈ H = p∈π h(p)Ep′ Np . and (GH )h(p) = Gh(p) , we have that GH /Gh(p) is p-nilpotent for all p ∈ π. Hence GH /Gh is π-nilpotent. Consequently, GH /Gh ≤ L/Gh and so GH ≤ L. On the other hand, since L/Gh is π-nilpotent, by the isomorphism L/Lh(p) Gh ≃ (L/Gh )/(Lh(p) Gh /Gh ), we have that L/Lh(p) Gh ∈ Ep′ Np for all p ∈ π. It follows that (L/Gh(p) /(Lh(p) Gh /Lh(p) ) ∈ Ep′ Np , for all p ∈ π. In order to prove that L ≤ GH , we only need to prove that L ∈ H. But it only need to prove that Lh(p) Gh /Lh(p) is a p′ -group for all p ∈ π. Since Gh E L, by Lemma 2.3, Gh(p) = (Gh )h(p) = Gh ∩ Lh(p) ≤ Lh(p) . Let q be an arbitrary prime in π and q 6= p. Since Gh(p) Gh(q) /Gh(p) ≃ Gh(q) /Gh(q) ∩ Gh(p) , Gh(p) Gh(q) /Gh(p) ≃ Gh(q) /(Gh(q) )h(p) . But since h is full, we have that h(q) ⊆ h(p)Ep′ . Hence Gh(q) ∈ h(p)Ep′ , and so Gh(q) /(Gh(q) )h(p) ∈ Ep′ . 8 This shows that Gh(p) Gh(q) /Gh(p) is a p′ -group for all different primes p, q ∈ π. Hence Gh /Gh(p) ∈ Ep′ . Then by the isomorphism Lh(p) Gh /Lh(p) ≃ Gh /Gh ∩ Lh(p) ≃ (Gh /Gh(p) )/(Gh ∩ Lh(p) /Gh(p) ), we have that Lh(p) Gh /Lh(p) is a p′ -group for all p ∈ π. Thus L ∈ H, and so GH /Gh = Fπ (G/Gh ). Since G/Gh is Nπ -constrained by the hypothesis and GH /Gh = Fπ (G/Gh ), CG/Gh (GH /Gh ) ≤ GH /Gh and so CG (GH /Gh ) ≤ GH . But, clearly, CG (GH /Gh(p) ) ≤ CG (GH /Gh ). Hence Vh(p) ⊆ GH . T Consequently, Vh(p) = Gh(p) for all p ∈ π. Then by V ∈ H = p∈π h(p)Ep′ Np , we see that V /Gh(p) = V /Vh(p) is p-nilpotent for all p ∈ π. This implies that V /Gh is π-nilpotent. Conversely, if V /Gh is π-nilpotent, then, with a similar argument (as the above proof of L ≤ GH ), we can see that V ∈ H. This completes the proof. Lemma 3.5. Let H = LH(h) for a full integrated H-function h, π = Supp(h) 6= ∅, and G be a group such that G/Gh is Nπ -constrained and σ(Gh ) ⊆ π. If V /Gh is a π-nilpotent injector of G/Gh , then V is an H-injector of G. Proof. We prove the lemma by induction on |G|. Let M be any maximal normal subgroup of G, and p, q are different primes in π. We first prove that Gh /Gh(q) is a q ′ -group for all primes q ∈ π. In fact, since h(p) ⊆ h(q)Eq′ for all different primes p, q ∈ π, by the isomorphism Gh(q) Gh(p) /Gh(q) ≃ Gh(p) /(Gh(p) )Gh(q) , we have that Gh(q) Gh(p) /Gh(q) ∈ Eq′ . This implies that Gh /Gh(q) ∈ Eq′ , that is, Gh /Gh(q) is a q ′ -group. Now let Mh = Πp∈π Mh(p) . Since (Gh ∩ M )Gh(q) /Gh(q) ≃ Gh ∩ M/Mh(q) , Gh ∩ M/Mh(q) is a q ′ -group for all primes q ∈ π. Hence \ Eq′ = Eπ′ . Gh ∩ M/Mh ∈ q∈π It follows from σ(Gh ) ⊆ π that Gh ∩ M/Mh ∈ Eπ ∩ Eπ′ = (1). Thus Gh ∩ M = Mh . We consider the following two possible cases. Case 1. Gh ⊆ M . 9 Then Gh = Mh . Since V /Gh is a Nπ -injector of G/Gh , V ∩ M/Mh is an Nπ -injector of M/Mh by Lemma 2.2(1). Since G/Gh is Nπ -constrained and the class of Nπ -constrained groups is a Fitting class by [19, Theorem B(b)], M/Mh is also Nπ -constrained. Hence, by induction, V ∩ M is an H-injector of M . Assume that V < V1 and V1 is an H-maximal subgroup of G. Since V ∩ M is an H-maximal subgroup of M , we have that V ∩ M = V1 ∩ M. Hence V1 ∩ M is an H-injector of M for any maximal subgroup M of G. It follows from Lemma 2.2(3) that V1 is a H-injector of G. But then GH ≤ V1 , so V1 /Gh is π-nilpotent by Lemma 3.4. As V /Gh is an Nπ -injector of G/Gh , V /Gh is a maximal π-nilpotent subgroup of G/Gh , which contradicts V /Gh < V1 /Gh . Thus V = V1 is an H-maximal subgroup of G. Hence by Lemma 2.2(3), V is an H-injector. Case 2. Gh 6⊆ M . Then G = Gh M . Since V /Gh is a π-nilpotent injector of G/Gh and G/Gh ≃ M/Gh ∩ M = M/Mh , V ∩ M/Mh is an Nπ -injector of M/Mh by Lemma 2.2(2). Then by induction, V ∩ M is an H-injector of M . With a similar argument as in the case 1, we obtain that V is an H-injector of G. The lemma is proved. In view of the above Lemmas, we now may prove our main theorem. Proof of Theorem 1.5. (1) Let M be a maximal normal subgroup of G. Note that h is a invariable H-function as h(p) = X for all p ∈ π. Hence h is a full integrated H-function. Since G ∈ XSπ , G/GX is π-soluble. Therefore G/GX is Nπ -constrained and G/GX has a π-nilpotent injector V /GX by Lemma 3.1. Clearly, Gh = GX , Mh = MX and Gh ∩ M = Mh . Then, with the same arguments as in the proof of Lemma 3.5, we obtain that V is an H-injector of G. Now we prove that if V is an H-injector of G, then V /GX is a π-nilpotent injector of G/GX . In fact, assume that V is an H-injector of G. Then V ∩ S is an H-maximal subgroup of G for any subnormal subgroup S of G. In order to prove that V /Gh is a π-nilpotent injector of G/Gh , we only need to prove that V /GX ∩ S/GX = (V ∩ S)/GX is an Nπ -maximal subgroup of G/GX for T every subnormal subgroup S/GX of G/GX . Since H = LR(h) = p∈π XEp′ Np for all p ∈ π and V ∩ S ∈ H, we have (V ∩ S)/GX ∈ Nπ . Assume that (V ∩ S)/GX is not an Nπ -maximal subgroup of G/GX and let (V ∩ M )/GX < D/GX and D/GX is an Nπ -maximal subgroup of G/GX . Then T clearly D ∈ p∈π XEp′ Np = LR(h) = H. But as V ∩ S is an H-maximal subgroup of G, we have that V ∩ S = D. This contradiction shows that if V is an H-injector of G, then V /GX is a π-nilpotent injector of G/GX . Assume that F is another H-injector of G. Then F/GX is a π-nilpotent injector of G/GX as above. Hence by Lemma 3.1, V /GX and F/GX are conjugate in G/GX . This implies that V and F are conjugate in G. Hence we have (1). 10 (2) Let V is a H-injector of G. Then V /GX is a π-nilpotent injector of G/GX . Hence by Lemma 3.1, we have that V /GX = (G/GX )Eπ′ (L/GX ), where L/GX is an Nπ -injector of some Hall π-subgroup of G/GX . But by Lemma 2.3, (G/GX )Eπ′ = GXEπ′ /GX . This shows that V = GXEπ′ L. Thus (2) holds. The theorem is proved. By Lemma 3.1, we known that every π-soluble group possesses exactly one conjugacy class of π-nilpotent injectors. Note also that every π-soluble group is Nπ -constrained. In connection with this, we put forward the following question: Question 3.1. Support that a group G is Nπ -constrained. Is it true that G possesses exactly one conjugacy class of π-nilpotent injectors? References [1] B. Fischer, W. Gaschütz, B. Hartley, Injektoren endlicher auflösbarer Gruppen, Math. Z., 102 (1967), 337-339. [2] K. Doerk, T. Hawkes, Finite Soluble Groups, Walter de Gruyter, Berlin, New York, 1992. [3] W. Guo, The Theory of Classes of Groups, Science Press-Kluwer Academic Publishers, BeijingNew York-Dordrecht-Boston-London, 2000. [4] A. Ballester-Bolinches, L. M. Ezquerro, Classes of Finite Groups, Springer, Dordrecht, 2006. [5] V. D. Mazurov, E. I. Khuhro, The Kourovka notebook, Unsolved problems in group theory, Institute of Mathematics, Siberian Branch of RAS, Novosibirsk, 2016. [6] P. Förster, Nilpotent injector in finite groups, Bull. Austral Math. Soc., 32 (1925), 292-298. [7] M. J. Iranzo, F. Perez-Monazor, Existencia de injectores en groups finites respecto de ciertas class de Fitting, Publ. Mat. Univ. Autonima Baselona, 32 (1988), 57-59. [8] S. A. Čunihin, On existence and conjugacy of subgroups of a finite group, Mat. Sbornik, 33(1) (1953), 111-132. [9] L. A. Shemetkov, On subgroups of π-soluble groups, in: Finite Groups, pp. 207-212, Hauka i Tehnika, Minsk, 1975. [10] W. Guo, Injectors of finite groups, Chinese Ann. Math. Ser. A 18 (2) (1997), 145-148. 11 [11] B. Hartley, On Fischer’s dualization of formation theory, Proc. London Math. Soc., 3(2) (1969), 193-207. [12] N. T. Vorob’ev, On the Hawkes conjecture for radical classes, Siberian Math. J., 37(6) (1996), 1137-1142. [13] P. Hauck, V. N. Zahurski, A characterization of Dominant local Fitting classes, J. Algebra, 358 (2012), 27-32. [14] Y. Liu, W. Guo and N. T. Vorob’ev, Description of F-injectors of finite soluble groups, Math. SCI. Rec. J, 12(1) (2008), 17-22. [15] M. J. Iranzo, M. Toress, The p∗ p-injectors of a finite group, Rend. Sem. Mat. Uni. Padova, 82 (1989), 233-237. [16] W. Guo, Structure Theory for Canonical Classes of Finite Groups, Springer, 2015. [17] L. A. Shemetkov, Formations of finite groups, Moscow, Nauka, Main Editorial Board for Physical and Mathematical Literature, 1978. [18] M. Suzuki, Group Theory, II, Springer-Verlag, New York, 1986. [19] M. I. Iranzo, P. Monazor, F-constraint with respect to a Fitting class, Arch. Math., 46 (1986), 205-210. 12
4math.GR
Sublinear Time Estimation of Degree Distribution Moments: The Degeneracy Connection (Full Version) arXiv:1604.03661v2 [cs.DS] 16 Feb 2017 Talya Eden∗ Dana Ron† C. Seshadhri‡ Abstract We revisit the classic problem of estimating the degree distribution moments of an undirected graph. Consider anP undirected graph G = (V, E) with n (non-isolated) vertices, and define (for s > 0) µs = n1 · v∈V dsv . Our aim is to estimate µs within a multiplicative error of (1 + ε) (for a given approximation parameter ε > 0) in sublinear time. We consider the sparse graph model that allows access to: uniform random vertices, queries for the degree of any vertex, and queries for a neighbor of any vertex. For the case of s = 1 (the average e √n) queries suffice for any constant ε (Feige, SICOMP 06 and Goldreich-Ron, degree), O( RSA 08). Gonen-Ron-Shavitt (SIDMA 11) extended this result to all integral s > 0, by e 1−1/(s+1) ) queries. (Strictly speaking, their algodesigning an algorithms that performs O(n rithm approximates the number of star-subgraphs of a given size, but a slight modification gives an algorithm for moments.) We design a new, significantly simpler algorithm for this problem. In the worst-case, it exactly matches the bounds of Gonen-Ron-Shavitt, and has a much simpler proof. More importantly, the running time of this algorithm is connected to the degeneracy of G. This is (essentially) the maximum density of an induced subgraph. For the family of graphs with  1−1/s 1/s n 1/s e degeneracy at most α, it has a query complexity of O α + min{α, µs } = 1/s µs e 1−1/s α/µ1/s O(n s ). Thus, for the class of bounded degeneracy graphs (which includes all minor closed families and preferential attachment graphs), we can estimate the average e e √n) degree in O(1) queries, and can estimate the variance of the degree distribution in O( queries. This is a major improvement over the previous worst-case bounds. Our key insight is in designing an estimator for µs that has low variance when G does not have large dense subgraphs. 1 Introduction Estimating the mean and moments of a sequence of n integers d1 , d2 , . . . , dn is a classic problem in statistics that requires little introduction. In the absence of any knowledge of the moments of the sequence, it is not possible to prove anything non-trivial. But suppose these integers formed the degree sequence of a graph. Formally, let G = (V, E) be an undirected graph over n vertices, ∗ School of EE, Tel Aviv University. [email protected] This research was partially supported by a grant from the Blavatnik fund. The author is grateful to the Azrieli Foundation for the award of an Azrieli Fellowship. † School of EE, Tel Aviv University. [email protected] This research was partially supported by the Israel Science Foundation grant No. 671/13 and by a grant from the Blavatnik fund. ‡ Department of Computer Science, University of California, Santa Cruz. [email protected] 1 and let dv denote the degree of vertex v ∈ V , where we assume that dv ≥ 1 for every v.1 Feige √ proved that O ∗ ( n) uniform random vertex degrees (in expectation) suffice to provide a (2+ ε)approximation to the average degree [24]. (We use O ∗ (·) to suppress poly(log n, 1/ε) factors.) The variance can be as large as n for graphs of constant average degree (simply consider a star), but the constraints of a degree distribution allow for non-trivial approximations. Classic theorems of Erdős-Gallai and Havel-Hakimi characterize such sequences [29, 22, 27]. Again, the star graph shows that the (2 + ε)-approximation cannot be beaten in sublinear time through pure vertex sampling. Suppose we could also access random neighbors of a given vertex. In this setting, Goldreich and Ron showed it is possible to obtain a (1+ε)-approximation √ to the average degree in O ∗ ( n) expected time [25]. In a substantial (and complex) generalization, Gonen, Ron, and Shavitt (henceforth, GRS) gave a sublinear-time algorithm that estimates the higher moments of the degree distribution [26]. Technically, GRS gave an algorithm for approximating the number of stars in a graph, but a simple modification yields an algorithm for moments estimation. For precision, let us formally define this problem. The degree distribution is the distribution over the Pdegree of a uniform random vertex. The s-th moment of the degree distribution is µs , n1 · v∈V dsv . The Degree Distribution Moment Estimation (DDME) Problem. Let G = (V, E) be a graph over n vertices, where n is known. Access to G is provided through the following queries. We can (i) get the id (label) of a uniform random vertex, (ii) query the degree dv of any vertex v, (iii) query a uniform random neighbor of any vertex v. Given ε > 0 and s ≥ 1, output a (1 + ε)-multiplicative approximation to µs with probability2 > 2/3. The DDME problem has important connections to network science, which is the study of properties of real-world graphs. There have been numerous results on the significance of heavytailed/power-law degree distributions in such graphs, since the seminal results of BarabásiAlbert [6, 11, 23]. The degree distribution and its moments are commonly used to characterize and model graphs appearing in varied applications [8, 36, 15, 37, 9]. On the theoretical side, recent results provide faster algorithms for graphs where the degree distribution has some specified form [7, 10]. Practical algorithms for specific cases of DDME have been studied by Dasgupta et al and Chierichetti et al. [18, 14]. (These results requires bounds on the mixing time of the random walk on G.) 1.1 Results Let m denote the number of edges in the graph (where m is not provided to the algorithm). For the sake of simplicity, we restrict the discussion in the introduction to case when µs ≤ ns−1 . As observed by GRS, the complexityof the DDME problem is smaller  when µs is significantly larger. 1/(s+1) 1−1/(s+1) 1−1/s ∗ -query algorithm for DDME and /µs +n GRS designed an (expected) O n proved this expression was optimal up to poly(log n, 1/ε) dependencies. (Here O∗ (·) also suppresses additional factors that depend only on s). Note that for a graph without isolated vertices, µs ≥ 1 for every s > 0, so this yields a worst-case O∗ (n1−1/(s+1) ) bound. The s = 1 √ case is estimating the average degree, so this recovers the O ∗ ( n) bounds of Goldreich-Ron. We mention a recent result by Aliakbarpour et al. [3] for DDME, in a stronger model that assumes additional access to uniform random edges. They get a better bound of O∗ (m/(nµs )1/s ) in this stronger model, for s > 1 (and µs ≤ ns−1 ). Note that the main challenge of DDME is 1 The assumption on there being no isolated vertices is made here only for the sake of simplicity of the presentation, as it ensures a basic lower bound on the moments. 2 The constant 2/3 is a matter of convenience. It can be increased to at least 1 − δ by taking the median value of log(1/δ) independent invocations. 2 in measuring the contribution of high-degree vertices, which becomes substantially easier when random edges are provided. In the DDME problem without such samples, it is quite non-trivial to even detect high degree vertices. All the bounds given above are known to be optimal, up to poly(log n, 1/ε) dependencies, and at first blush, this problem appears to be solved. We unearth a connection between DDME and the degeneracy of G. The degeneracy of G is (up to a factor 2) the maximum density over all subgraphs of G. We design an algorithm that has a nuanced query complexity, depending on the degeneracy of G. Our result subsumes all existing results, and provides substantial improvements in many interesting cases. Furthermore, our algorithm and its analysis are significantly simpler and more concise than in the GRS result. We begin with a convenient corollary of our main theorem. A tighter, more precise bound appears as Theorem 3. Theorem 1. Consider the family of graphs with degeneracy at most α. The DDME problem can be solved on this family using !  1−1/s  n α1/s + min{α, µ1/s O∗ s } 1/s µs queries in expectation. The running time is linear in the number of queries. Consider the case of bounded degeneracy graphs, where α = O(1). This is a rich class of graphs. Every minor-closed family of graphs has bounded degeneracy, as do graphs generated by the Barabási-Albert preferential attachment process [6]. There is a rich theory of bounded expansion graphs, which spans logic, graph minor theory, and fixed-parameter tractability [32]. All these graph classes have bounded degeneracy. For every such class of graphs, we get a 1/s (1 + ε)-estimate of µs in O ∗ (n1−1/s /µs ) time. We stress that bounded degeneracy does not imply any bounds on the maximum degree or the moments. The star graph has degeneracy 1, but has extremely large moments due to the central vertex. Consider any bounded degeneracy graph without isolated vertices. We can accurately estimate the average degree (s = 1) in poly(log n) queries, and estimate the variance of the √ degree distribution (s = 2) in n · poly(log n) queries. Contrast this with the (worst-case op√ timal) n bounds of Feige and Goldreich-Ron for average degree, and the O ∗ (n2/3 ) bound of GRS for variance estimation. For general s, our bound is a significant improvement over the 1/(s+1) O∗ (n1−1/(s+1) /µs ) bound of GRS. The algorithm attaining Theorem 1 requires an upper bound on the degeneracy of the graph. When an degeneracy bound is not given, the algorithm recovers the bounds of GRS, with an improvement on the extra poly(log n)/ε factors. More details are in Theorem 3. We note that the degeneracy-dependent bound in Theorem 1 cannot be attained by an algorithm that is only given n as a parameter. In particular, if an algorithm is only provided with n and must work √ on all graphs with n vertices, then it must perform Ω( n) queries in order to approximate the average degree even for graphs of constant degeneracy (and constant average degree). Details are given in Subsection 7.1 in the full version of the paper. The bound of Theorem 1 may appear artificial, but we prove that it is optimal when µs ≤ ns−1 . (For the general case, we also have optimal upper and lower bounds.) This construction is an extension of the lower bound proof of GRS. Theorem 2. Consider the family of graphs with degeneracy α and  where µs ≤ ns−1 . Any  1−1/s 1/s algorithm for the DDME problem on this family requires Ω n 1/s · α1/s + min{α, µs } µs queries. 3 1.2 From degeneracy to moment estimation We begin with a closer look at the lower bound examples of Feige, Goldreich-Ron, and GRS. The core idea is quite simple: DDME is hard when the overall graph is sparse, but there are √ small dense subgraphs. Consider the case of a clique of size 100 n connected to a tree of size n. The small clique dominates the average degree, but any sublinear algorithm with access √ only to random vertices pays Ω( n) for a non-trivial approximation. GRS use more complex constructions to get an Ω(n1−1/(s+1) ) lower bound for general s. This also involves embedding small dense subgraphs that dominate the moments. Can we prove a converse to these lower bound constructions? In other words, prove that the non-existence of dense subgraphs must imply that DDME is easier? A convenient parameter for this non-existence is the degeneracy. But the degeneracy is a global parameter, and it is not clear how a sublinear algorithm can exploit it. Furthermore, DDME algorithms are typically very local; they sample random vertices, query the degrees of these vertices and maybe also query the degrees of some of their neighbors. We need a local property that sublinear algorithms can exploit, but can also be linked to the degeneracy. We achieve this connection via the degree ordering of G. Consider the DAG obtained by directing all edges from lower to higher degree vertices. Chiba-Nishizeki related the properties of the out-degree distribution to the degeneracy, and exploited this for clique counting [13]. Nonetheless, there is no clear link to DDME. (Nor do we use any of their techniques; we state this result merely to show what led us to use the degree ordering). Our main insight is the construction of an estimator for DDME whose variance depends on the degeneracy of G. This estimator critically uses the degree ordering. Our proof relates the variance of this estimator to the density of subgraphs in G, which can be bounded by the degeneracy. We stress that our algorithm is quite simple, and the technicalities are in the analysis and setting of certain parameters. 1.3 Designing the algorithm Designate the weight of an edge (u, v) to be dus−1 +P dvs−1 . A simple calculation yields that the s sum of the weights of all edges is exactly Ms , v dv = n · µs . Suppose we could sample uniform random edges (and knew the total number of edges). Then we could hope to estimate Ms through uniform edge sampling. The variance of the edge weights can be bounded, and this yields an O ∗ (m/(nµs )1/s ) = O∗ (n1−1/s ) algorithm (when no vertex is isolated). Indeed, this is very similar to the approach of Aliakbarpour et al. [3]. Such variance calculations were also used in the classic Alon-Matias-Szegedy result of frequency moment estimation [5]. Our approach is to simulate uniform edge samples using uniform vertex samples. Suppose we sampled a set R of uniform random vertices. By querying the degrees of all these vertices, we can select vertices in R with probability proportional to their degrees, which allows us to uniformly sample edges that are incident to vertices in R. Now, we simply run the uniform edge sampling algorithm on these edges. This algorithmic structure was recently used for sublinear triangle counting algorithms by Eden et al. [20]. Here lies the core technical challenge. How to bound the number of random vertices that is sufficient for effectively simulating the random edge algorithm? This boils down to the behavior of the variance of the “vertex weight” distribution. Let the weight of a vertex be the sum of weights of its incident edges. The weight distribution over vertices can be extremely skewed, and this approach would require a forbiddingly large R. A standard technique from triangle counting (first introduced by Chiba-Nishizeki [13]) helps reduce the variance. Direct all edges from lower degree to higher degree vertices, breaking ties consistently. Now, set the weight of a vertex to be the sum of weights on incident out- 4 edges. Thus, a high-degree vertex with lower degree neighbors will have a significantly reduced weight, reducing overall variance. In the general case (ignoring degeneracy), a relatively simple argument bounds the maximum weight of a vertex, which enables us to bound the variance of the weight distribution. This yields a much simpler algorithm and proof of the GRS bound. In the case of graphs with bounded degeneracy, we need a more refined approach. Our key insight is an intimate connection between the variance and the existence of dense subgraphs in G. We basically show that the main structure that leads to high variance is the existence of dense subgraphs. Formally, we can translate a small upper bound on the density of any subgraph to a bound on the variance of the vertex weights. This establishes the connection to the graph degenearcy. 1.4 Simplicity of our algorithm Our viewpoint on DDME is quite different from GRS and its precursor [25], which proceed by bucketing the vertices based on their degree. This leads to a complicated algorithm, which essentially samples to estimate the size of the buckets, and also the number of edges between various buckets (and “sub-buckets”). We make use of buckets in out analysis, in order to obtain the upper bound that depends on the degeneracy α (in order to achieve the GRS upper bound, our analysis does not use bucketing). As explained above, our main DDME procedure, Moment-estimator is simple enough to present in a few lines of pseudocode (see Figure 1). We feel that the structural simplicity of Moment-estimator is an important contribution of our work. Moment-estimator takes two sampling parameters r and q. The main result Theorem 3 follows from running Moment-estimator with a standard geometric search for the right setting of r and q. In Moment-estimator we use id(v) to denote the label of a vertex v, where vertices have unique ids and there is a complete order over the ids. Moment-estimators (r, q) 1. Select r vertices, uniformly, independently, at random and let the resulting P multi-set be denoted by R. Query the degree of each vertex in R, and let dR = v∈R dv . 2. For i = 1, . . . , q do: (a) Select a vertex vi with probability proportional to its degree (i.e., with probability dvi /dR ), and query for a random neighbor ui of vi . ). Else, set + dus−1 (b) If dvi < dui or dvi = dui and id(vi ) < id(ui ), set Xi = (dvs−1 i i Xi = 0. q P Xi . 3. Return X = 1r · dqR · i=1 Figure 1: Algorithm Moment-estimators for approximating µs . 1.5 Other related work As mentioned at the beginning of this section, Aliakbarpour et al. [3] consider the problem of approximating the number of s-stars for s ≥ 2 when given access to uniformly selected edges. Given the ability to uniformly select edges, they can select vertices with probability proportional to their degree (rather than uniformly). This can be used to get an unbiased estimator of µs (or the s-star count) with low variance. This leads to an O(m/(nµs )1/s ) bound, which is optimal (for µs ≤ ns−1 ). 5 Dasgupta, Kumar, and Sarlos give practical algorithms for average degree estimation, though they assume bounds on the mixing time of the random walk on the graph [18]. A recent paper of Chierichetti et al. build on these methods to sample nodes according to powers of their degree (which is closely related to DDME) [14]. Simpson, Seshadhri, and McGregor give practical algorithms to estimate the entire cumulative degree distribution in the streaming setting [38]. This is different from the sublinear query model we consider, and the results are mostly empirical. In [20], Eden et al. present an algorithm for approximating the number of triangles in a graph. Although this is a very different problem than DDME, there are similar challenges regarding high-degree vertices. Indeed, as mentioned earlier, the approach of sampling random edges through a set of random vertices was used in [20]. The degeneracy is closely related to other “density” notions, such as the arboricity, thickness, and strength of a graph [1]. There is a rich history of algorithmic results where run time depends on the degeneracy [31, 13, 4, 21]. Other sublinear algorithms for estimating various graph parameters include: approximating the size of the minimum-weight spanning tree [12, 17, 16], maximum matching [33, 39] and of the minimum vertex cover [35, 33, 30, 39, 28, 34]. 2 The main theorem Theorem 3. For every graph G, there exists an algorithm that returns a value Z such that Z ∈ [(1 − ε)µs (G), (1 + ε)µs (G)] with probability at least 2/3. Assume that algorithm is given α, an upper bound on the degeneracy of G. (If no such bound is provided, the algorithm assumes a trivial bound of α = ∞.) The expected running time is the minimum of the following two expressions. n n1−1/s · α ns−1 · α o s log n · log(s log n)   α 1/s , · + min O 2s · n1−1/s · log2 n · 1/s µs µs ε2 µs O  n1−1/(s+1) 1/(s+1) µs n ns−1−1/s o s log n · log(s log n) + min n1−1/s , 1−1/s · ε2 µs (1) (2) Equation (2) is essentially the query complexity of GRS (albeit with a better dependence on s, log n, and 1/ε). Thus, our algorithm is guaranteed to be at least as good as that. If α is exactly the degeneracy of G, then we can prove that Equation (1) is less than Equation (2). Within each expression, there is a min of two terms. The first term is smaller iff µs ≤ ns−1 . The mechanism of deriving this rather cumbersome running time is the following. The algorithm of Theorem 3 runs Moment-estimator for geometrically increasing values of r and q, which is in turn derived from a geometrically decreasing guess of µs . It uses this guess to set r and q. There is a setting of values depending on α, and a setting independent of it. The algorithm simply picks the minimum of these settings to achieve the smaller running time. 3 Sufficient conditions for r and q in Moment-estimator In this section we provide sufficient conditions on the parameters r and q that are used by Moment-estimator (Figure 1), in order for the algorithm to return a (1 + ε) estimate of µs . First we introduce some notations. For a graph G = (V, E) and a vertex v ∈ V , let Γ(v) denote 6 the set of neighbors of v in G (so that dv = |Γ(v)|). For any (multi-)set R of vertices, let ER be the (multi-)set of edges incident to the vertices in R. We will think of the edges in ER as ordered pairs; thus (v, u) is distinct from (u, v), and so ER , {(v, u) : v ∈ R, u ∈ Γ(v)}. Observe P that s dR , as defined in Step 1 of Moment-estimator equals |ER |. Let Ms = Ms (G) , v∈V dv , so that µs = Ms /n. In the analysis of the algorithm, it is convenient to work with Ms instead of µs . A critical aspect of our algorithm (and proof) is the degree ordering on vertices. Formally, we set u ≺ v if du < dv or, du = dv and id(u) < id(v). Given the degree ordering, we let + + + + Γ+ (v) , {u ∈ Γ(v) P : v ≺ u}, dv , |Γ (v)|, P and E , {(v, u) : v ∈ V, u ∈ Γ (v)}. Here and elsewhere, we use v as a shorthand for v∈V . Definition 4. We define the weight of an edge e = (v, u) as follows: if v ≺ u define wt(e) , (dvs−1 + dus−1 ). Otherwise, P P wt(e) , 0. wt((v, u)), and for a (multi-)set of wt((v, u)) = For a vertex v ∈ V , wt(v) , vertices R, wt(R) , P u∈Γ+ (v) u∈Γ(v) wt(v). v∈R Observe that given the above notations and definition, Moment-estimator selects uniform edges from ER and sets each Xi (in Step 2b) to wt((vi , ui )). Based on Definition 4, we obtain the next two claims, where the first claim connects between Ms and the weights of vertices. P Claim 5. v wt(v) = Ms . Proof: By the definition of the weights: X X X X X X wt(v) = (dvs−1 + dus−1 ) = (dvs−1 + dus−1 ) = dvs−1 = dsv = Ms , v∈V (v,u)∈E + v∈V u∈Γ(v) {v,u}∈E v∈V and the claim is established. Claim 6. Exp[X] = µs , where X is as defined in Step 3 of the algorithm. P Proof: Recall that wt(R) , v∈R wt(v). Note that Xi (as defined in Step 2b of the algorithm) is exactly wt((vi , ui )). Conditioning on R, X X X 1 1 1 Exp[Xi |R] = · · wt(v) = · wt(R) . wt((v, u)) = |ER | |ER | |ER | + v∈R u∈Γv v∈R By the definition of X in the algorithm (see Step 3), Exp[X|R] = q 1 1 |ER | X Exp[Xi |R] = · wt(R) . · · r q r i=1 P Now, let us remove the conditioning. Since wt(R) , v∈R wt(v), by linearity of the expectation, r X wt(v) , ExpR [wt(R)] = · n v∈V and thus (using Claim 5), Exp[X] = ExpR [Exp[X|R]] = 1 X · wt(v) = µs , n v∈V which completes the proof. 7 3.1 Conditions on the parameters r and q. We next state two conditions on the parameters r and q, which are used in the algorithm, and then establish several claims, based on the conditions holding. The conditions are stated in terms of properties of the graph as well as the approximation parameter ε and a confidence parameter δ. 1. The vertex condition: P 30 · n · v wt(v)2 . r≥ ε2 · δ · Ms2 2. The edge condition: q≥ 2000 · m · M2s−1 . ε2 · δ3 · Ms2 Lemma 7. If Condition 1 holds, then with probability at least 1 − δ/2, all the following hold.     1. wt(R) ∈ 1 − 2ε · nr · Ms , 1 + 2ε · nr · Ms . r 2. |ER | ≤ 12 δ · n · m. P 3. wt ((v, u))2 ≤ 18 δ + (v,u)∈ER · r n · M2s−1 . Proof: First, we look P at the random variable wt(R). By the definition of wt(R) and Claim 5, Exp[wt(R)] = (r/n)· v wt(v) = (r/n)·Ms . Turning to the variance of wt(R), since the vertices in R are chosen uniformly at random, ! 1 X 2 r X 1 X 2 · wt(v) − · wt(v) ≤ · wt(v)2 . VarR [wt(R)] = r · Varv [wt(v)] = r n v n v n v By Chebyshev’s inequality, h i ε Pr wt(R) − Exp[wt(R)] ≥ · Exp[wt(R)] ≤ 2 = 4Var[wt(R)] · Exp[wt(R)]2 P P 4(r/n) v wt(v)2 4n v wt(v)2 = . ε2 · (r/n)2 · Ms2 ε2 · Ms2 · r ε2 Applying the lower bound on r from Condition 1, this probability is at most δ/6. (Indeed, Condition 1 was defined as such to get this bound.) The other bounds follow simply from Markov’s inequality. Observe that Exp[|ER |] = (r/n)(2m), and so Pr[|ER | > (12/δ)(r/n)m] ≤ δ/6. P The random variable Y = (v,u)∈E + wt ((v, u))2 (which is non-negative), satisfies R Exp[Y ] = r · n X wt ((v, u))2 = (v,u)∈E + r ≤ 3· · n X (v,u)∈E + r · n X (dvs−1 + dus−1 )2 (v,u)∈E + (dv2s−2 + du2s−2 ) = 3 · r r X 2s−1 · dv = 3 · · M2s−1 . n v n (3) By Markov’s inequality, Pr[Y ≥ (18/δ)(r/n)M2s−1 ] ≤ δ/6. We apply a union bound to complete the proof. 8 Theorem 8. If Conditions 1 and 2 hold, then X ∈ [(1 − ε)µs , (1 + ε)µs ] with probability at least 1 − δ. Proof: Condition on any choice of R. We have Exp[X|R] = (1/r)wt(R). Turning to the variance, since the edges (vi , ui ) are chosen from ER uniformly at random, # " q  2   2  X 1 |ER | 2 |ER |2 1 Xi R = · Var[X1 |R] · · Var · Var[X|R] = r q r q i=1  2 |ER |2 1 · · Exp[(X1 |R)2 ] ≤ r q  2 X 1 |ER | = · · wt((v, u))2 r q + = 1 |ER | · · q r P (v,u)∈ER + (v,u)∈ER wt ((v, u))2 r . Let us now condition on R such that the bounds of Lemma 7 hold. Note that such an R is chosen with probability at least 1 − δ/2. We get Var[X|R] ≤ 250 1 m M2s−1 · . · · δ2 q n n We apply Chebyshev’s inequality and invoke Condition 2: h i ε Pr (X|R) − Exp[X|R] ≤ · µs ≤ 2 4 · Var[X|R] 1 4 · (250/δ2 ) · m · M2s−1 δ ≤ ≤ . · 2 2 2 2 ε · µs q ε · Ms 2 By Lemma 7, Exp[X|R] = (1/r)wt(R) ∈ [(1 − ε/2)µs , (1 + ε/2)µs ]. By taking into account both the probability that R does not satisfy one (or more) of the bounds in Lemma 7 and the probability that X (conditioned on R satisfying these bounds) deviates by more than (ε/2)µs from its expected value, we get that |X − µs | < εµs with probability at least (1 − δ/2)2 > 1 − δ. 3.2 The Algorithm with Edge Samples As an aside, the above analysis can be slightly adapted to prove the result of Aliakbarpour et al. [3] on estimating moments using random edge queries. Observe that we can then simply set R =P V and r = n in Moment-estimators . This immediately gives wt(R) = Ms , |ER | = 2m, and (v,u)∈E + wt((v, u))2 ≤ 3M2s−1 (as shown in Equation (3)). Similarly to what is shown in R the proof of Theorem 8, Var[X] = O(q −1 · m · M2s−1 ) (where X is as defined in Step 3 of the 2−1/s c algorithm). As shown in Equation (10), M2s−1 ≤ Ms . Thus, if we set q ≥ ε2 ·δq 3 · m1/s (for a Ms sufficiently large constant cq ), we satisfy Condition 2. This is exactly the bound of Aliakbarpour et al. 4 Satisfying Conditions 1 and 2 in general graphs We show how to set r and q to satisfy Conditions 1 and 2 in general graphs. Our setting of r and q will give us the same query complexity as [26] (up to the dependence on 1/ε and log n, on 9 which we improve, and the exponential dependence on s in [26], which we do not incur). In the next section we show how the setting of r and q can be improved using a degeneracy bound. For cr and cq that are sufficiently large constants, we set ) ( s−1/s cq n n cr · , q = 2 3 · min n1−1/s , 1−1/s . (4) r= 2 ε · δ Ms1/(s+1) ε ·δ Ms This setting of parameters requires the knowledge of Ms , which is exactly what we are trying to approximate (up to the normalization factor of n). A simple geometric search argument alleviates the need to know Ms . For details see Section 6. In what follows (and elsewhere) we make use of Hölder’s inequality: Theorem 9 (Hölder’s inequality). For values p and q such that p, q > 1 and k X i=1 |xi · yi | ≤ k X i=1 |xi |p ! p1 k X i=1 |yi |q ! q1 1 p + 1 q = 1, . We refer to p and q as the conjugates of the formula. In order to assert that r as set in Equation (4) satisfies Condition 1, it suffices to establish the next lemma. Lemma 10 (Condition 1 holds). X v Proof: 1/(s+1) Let θ = Ms 1 2− s+1 wt(v)2 ≤ 4Ms . be a degree threshold. We define H , {v : dv > θ} and L , V \H . This partition into “high-degree” vertices (H) and “low-degree” vertices (L) will be Puseful in upper bounding the maximum weight wt(v) of a vertex v, and hence upper bounding v wt(v)2 . Details follow. P 1/(s+1) 1/(s+1) · We first observe that |H| ≤ Ms . This is true since otherwise, v∈H dsv > Ms s Mss+1 = Ms , which is a contradiction. We claim that this upper bound on |H| implies that 1/(s+1) max d+ . v ≤ Ms (5) v 1/(s+1) To verify this, assume, contrary of the claim, that for some v, d+ . But then there v > Ms 1/(s+1) 1/(s+1) + . This contradicts the bound are at least Ms vertices u such that du ≥ dv ≥ dv > Ms on |H|. P It will also be useful to bound u∈H dus−1 . By Hölder’s inequality with conjugates s and s/(s − 1) and the bound on |H|, X dus−1 u∈H = X u∈H 1· dus−1 1/s ≤ |H| X u∈H ! s−1 s dsu 1 s−1 s ≤ Mss(s+1) · Ms s ≤ Mss+1 . (6) We now turn to bounding maxv {wt(v)}. By the definition of wt(v) and the degree ordering, X X X X wt(v) = (dvs−1 + dus−1 ) ≤ 2 dus−1 = 2 dus−1 + 2 dus−1 . (7) u∈Γ+ (v) u∈Γ+ (v) u∈Γ+ (v)∩L 10 u∈Γ+ (v)∩H 1/(s+1) For the first term on the right-hand-side of Equation (7), recall that du ≤ Ms Thus, by Equation (5), s−1 s X s+1 ≤ Mss+1 . dus−1 ≤ d+ v · Ms for u ∈ L. (8) u∈Γ+ (v)∩L For the second term, using Γ+ (v) ∩ H ⊆ H and applying Equation (6), X u∈Γ+ (v)∩H Finally, X v dus−1 ≤ X u∈H s dus−1 ≤ Mss+1 . X wt(v)2 ≤ max{wt(v)} · v v (9) wt(v) ≤ Ms2−1/(s+1) , where the second inequality follows by combining Equations (7)–(9) to get an upper bound on maxv {wt(v)} and applying Claim 5. The next lemma implies that Condition 2 holds for q as set in Equation (4). Lemma 11 (Condition 2 holds). ( min n1−1/s , Proof: ns−1/s 1−1/s Ms ) ≥ 2m · M2s−1 . Ms2 We can bound M2s−1 in two ways. First, by a standard norm inequality, since s ≥ 1, M2s−1 = X v dv2s−1 ≤ X dsv v !(2s−1)/s = Ms2−1/s . (10) We can also use the trivial bound dv ≤ n and get M2s−1 ≤ ns−1 · Ms . Thus, M2s−1 ≤ 2−1/s min{Ms , ns−1 · Ms }. By applying Hölder’s inequality with conjugates s/(s − 1) and s we get that !1/s X X s (s−1)/s dv 2m = 1 · dv ≤ n · = n1−1/s · Ms1/s . (11) v v We multiply the bound by M2s−1 to complete the proof. 5 The Degeneracy Connection The degeneracy, or the coloring number, of a graph G = (V, E) is the maximum value, over all subgraphs G′ of G, of the minimum degree in G′ . In this definition, we can replace “minimum” by “average” to get a 2-factor approximation to the degeneracy (refer to [2]; Theorem 2.4.4 and Corollary nl 5.2.3 mo of [19]). Abusing notation, it will be convenient for us to define α(G) = |E(S)| maxS⊆V . |S|−1 We also make the following observation regarding the relation between α(G) and Ms (G). 1 Claim 12. For every graph G, α(G) ≤ Ms (G) s+1 . 11 Proof: Let S be a subset of vertices that maximizes l m |E(S)| |S|−1 2|E(S)| |S| , and let d(S) denote the m l ≥ |E(S)| average degree in the subgraph induced by S. Then d(S) = |S|−1 = α(G). Hence, |S| ≥ α(G), and by Hölder’s inequality (Theorem 9) with conjugates s/(s − 1) and s, α(G) · |S| ≤ 1 X v∈S dv ≤ X v∈S !1 s dsv 1 · |S|1− s , 1 1 implying that α(G) · |S| s ≤ Ms (G) s . Since |S| ≥ α(G), we get that α(G) ≤ Ms (G) s+1 . In this section, we show that the following setting of parameters for Moment-estimators satisfies Conditions 1 and 2, for every graph G with degeneracy at most α (i.e., α(G) ≤ α), and for appropriate constants cr and cq . (  1/s ) α n cr · min , 2s · n · log2 n · , (12) r= 2 1/(s+1) ε ·δ Ms Ms cq q = 2 3 · min ε ·δ ( n · α ns · α 1−1/s ns−1/s ,n , 1−1/s , 1/s Ms Ms Ms ) . (13) Clearly the setting of r and q in Equation (12) and Equation (13) respectively, can only improve on the setting of r and q for the general case in Equation (4) (Section 4). Equation (12) (when Our main challenge is in proving that Condition 1 holds for r as set in P the graph has degeneracy at most α). Here too, the goal is to upper bound v wt(v)2 . However, as opposed to the proof of Lemma P 10 in Section 4, where we simply obtained an upper bound on maxv {wt(v)} (and bounded v wt(v)2 by maxv {wt(v)} · Ms ), here the analysis is more refined, and uses the degeneracy bound. For details see the proof of our main lemma, stated next. Lemma 13 (Condition 1 holds). For a sufficiently large constant c, X wt(v)2 ≤ c · 2s · α1/s · Ms2−1/s · log2 n . v In order to prove the lemma we first introduce the following definitions and claim. Definition 14. For a set S and a vertex u, let ΓS (u) denote the set Γ(u) ∩ S, and let Γ+ S (u) + denote the set Γ (u) ∩ S. For two sets of vertices S and T (which are not necessarily disjoint), let E + (S, T ) , {(u, v) : (u, v) ∈ E + , u ∈ S, v ∈ T }. Definition 15. We partition the vertices (with degree at least 1) according to their degree. For 0 ≤ i ≤ ⌈log n⌉, let Ui , {u ∈ V : du ∈ (2i−1 , 2i ]} . For each i we partition the vertices in V according to the number of outgoing edges that they have to Ui . Specifically, for 1 ≤ j ≤ ⌈log(n/α)⌉, define n o j−1 j . (v)| ∈ 2 α, 2 α Vi,j , v ∈ V : |Γ+ Ui Also define Vi,0 , i. o n ⌈log(n/α)⌉ (v)| ≤ α . Hence, {Vi,j }j=0 is a partition of V for each v ∈ V : |Γ+ Ui 12 A central building block in the proof of Lemma 13 is the next claim. This claim establishes an upper bound on the number of edges going from vertices in Vi,j to vertices in Ui , for every i and j (within the appropriate intervals). In the proof of this claim we exploit the degeneracy bound. Claim 16. Let Vi,j and Ui be as defined in Definition 15, and let E + (Vi,j , Ui ) be as defined in Definition 14. For every 0 ≤ i ≤ ⌈log n⌉ and every 2 ≤ j ≤ ⌈log(n/α)⌉, |E + (Vi,j , Ui )| ≤ Ms · 2−((i−1)(s−1)+j−1) . Proof: Since G has degeneracy at most α, |E + (Vi,j , Ui )| = |E + (Vi,j , Ui )| = |E(Vi,j , Ui )| ≤ α · (|Vi,j | + |Ui |) . On the other hand, by the definition of Vi,j , |E + (Vi,j , Ui )| ≥ 2j−1 · α · |Vi,j | . Combining the above two bounds (and because 2j−1 − 1 ≥ 1 for j ≥ 2), we get that |Ui | ≥ |Vi,j |, and we obtain the following bound on the number of edges in E + between Vi,j and their neighbors in Ui : |E + (Vi,j , Ui )| ≤ 2 · α · |Ui | . (14) We next upper bound |Ui |. By the definition of Vi,j , for every v ∈ Vi,j there exists a vertex u ∈ Ui such that du ≥ dv . By the definition of Ui , for every u′ , u′′ ∈ Ui , du′ ≥ du′′ /2, implying that for every v ∈ Vi,j and every u′ ∈ Ui it holds that du′ ≥ dv /2. Hence, for every u ∈ Ui , we have that du ≥ 2j−2 α. Also by the definition of Ui , for every u ∈ Ui it holds that du ≥ 2i−1 . Therefore, X Ms ≥ dsu ≥ |Ui | · 2(i−1)(s−1) · 2j−2 α , u∈Ui which directly implies that |Ui | ≤ Ms · 2−((i−1)(s−1)+j−2) · α−1 . (15) The proof follows by plugging in Equation (15) in Equation (14). We are now ready to prove Lemma 13. Proof of Lemma 13: By the definition of wt(v), and since dv ≤ du for every v and u ∈ Γ+ (v), X wt(v)2 = v X v X u∈Γ+ (v)  dvs−1 + dus−1 !2 ≤ 4· X v X u∈Γ+ (v) dus−1 !2 . (16) In order to bound the expression on the right-hand-side of Equation (16) we consider each Ui (as defined in Definition 15) separately: By applying Hölder’s inequality with conjugates s and s/(s − 1) we get the following bound for every v and 0 ≤ i ≤ ⌈log n⌉. X u∈Γ+ i (v) 1/s 1 · dus−1 ≤ |Γ+ · i (v)|  X u∈Γ+ i (v) 13 dsu (s−1)/s 1/s ≤ |Γ+ · Ms(s−1)/s . i (v)| (17) For a vertex u, let Γ− (u) , {v : u ∈ Γ+ (v)}. By applying Equation (17) (to one term of the 2 P s−1 ), square d + u∈Γ (v) u i X v   X u∈Γ+ i (v) 2 dus−1  X ≤ v 1/s |Γ+ · Ms(s−1)/s · i (v)| = Ms(s−1)/s · = Ms(s−1)/s · X u∈Ui dus−1 · ⌈log n⌉  X j=0 X u∈Γ+ i (v) X v∈Γ− (u) X u∈Ui dus−1 dus−1 · 1/s |Γ+ i (v)| X v∈Γ− (u)∩Vi,j (18)  1/s . (v)| |Γ+ i (19) Equation (18) follows by the definition of Γ− (u) (and switching the order of the summations), and Equation (19) follows from splitting the sum in Equation (18) based on the partition of V into the subsets Vi,j (recall that i is fixed for now and Vi,j is as defined in Definition 15). From this point on we only consider j’s such that Vi,j is not empty. For each j (and i), by the definition of Vi,j , X X X X 1/s |Γ+ ≤ dus−1 · (2j · α)1/s dus−1 i (v)| u∈Ui u∈Ui v∈Γ− (u)∩Vi,j v∈Γ− (u)∩Vi,j ≤ 2j/s · α1/s · X u∈Ui dus−1 · |Γ− (u) ∩ Vi,j | . For j < 2, we trivially upper bound |Γ− (u) ∩ Vi,j | by du . Thus, X X X 1/s ≤ 21/s · α1/s · dsu ≤ 2 · α1/s · Ms |Γ+ dus−1 i (v)| u∈Ui (for j < 2) . (20) (21) u∈Ui v∈Γ− (u)∩Vi,j Turning to j ≥ 2, since all vertices in Ui have degree at most 2i and by Equation (20), we get: X X 1/s dus−1 · |Γ+ ≤ 2j/s · α1/s · 2i(s−1) · |E + (Vi,j , Ui )|. i (v)| u∈Ui v∈Γ− (u)∩Vi,j Hence, by Claim 16, X u∈Ui dus−1 · X v∈Γ− (u)∩Vi,j 1/s ≤ 2j/s−j+s · α1/s · Ms . |Γ+ i (v)| (22) By using the bound in Equation (21) for j < 2, the bound in Equation (22) for j ≥ 2 and plugging them in Equation (19) we get  2 ⌈log n⌉ X X X  dus−1  ≤ 4 · α1/s · Ms2−1/s + 2s · α1/s · Ms2−1/s · 2j/s−j v j=3 u∈Γ+ i (v) ≤ 2s+1 · α1/s · Ms2−1/s · log n , (23) where the last inequality P holds because s ≥P1 (in fact, for s > 1 we can save a log n factor). Using the inequality ( ℓi=1 xi )2 ≤ (2ℓ − 1) · ℓi=1 x2i , Equation (23) implies that  2 X X  dus−1  ≤ 2s+2 · α1/s · Ms2−1/s · log2 n . (24) v u∈Γ+ (v) 14 The lemma follows by combining Equation (16) with Equation (24). It remains to establish Condition 2. Lemma 17 (Condition 2 holds). ( ) n · α ns · α 1−1/s ns−1/s M2s−1 min , ,n , 1−1/s ≥ m · . 1/s Ms Ms2 Ms Ms Proof: Since G has bounded degeneracy α, it follows that m ≤ n · α. By Equation (11), 2−1/s 1/s , ns−1 · Ms }. The m ≤ n1−1/s · Ms . As shown in the proof of Lemma 11, M2s−1 ≤ min{Ms proof follows from the above two bounds. 5.1 The case of s = 1: estimating the average degree When s = 1 (so that Ms = M1 = 2m and µs = µ1 is the average degree), there is a very simple analysis of a slight variant of Moment-estimators . Observe that for s = 1, by Definition 4, for every edge e, wt(e) = 2, and wt(v) = 2 · d+ v . For a degree threshold θ = 2α/ε, let H , {v : dv > θ}, and L , V \ H. By the definition P of H+we have that |H| < M1 /θ = εM1 /(2α). Since the graph has degeneracy at most α, v∈H dv ≤ α · |H| ≤ εM1 /2. This implies that P v∈L wt(v) ≥ (1 − ε)M1 . = 2 only if dvi ≤ θ (as + dus−1 Suppose that we modify the algorithm so that Xi is set to dvs−1 i i well as vi ≺ ui ), and is otherwise set to 0. Under P this modification, Exp[X] ∈ [(1 − ε)M1 , M1 ]. Since wt(v) ≤ 2θ for each v ∈ L, we get that v∈L wt(v)2 ≤ 2θ · M1 = (4α/ε) · M1 . Therefore, ·n·α . Thus, as compared to the setting in order to satisfy Condition 1, it suffices to set r = εc3r·δM 1 2 in Equation (12), we save a log n factor (at the cost of factor of 1/ε), but, more importantly, the analysis is very simple (as compared to the proof of Lemma 13). The setting of q is as in c Equation (13), which for s = 1 gives q = ε2 ·δq 3 . 6 Wrapping things up The proof of our final result, Theorem 3, follows by combining Theorem 8, Lemma 10, Lemma 13 and Lemma 17, with a geometric search for a factor-2 estimate of Ms (which determines the correct setting of r and q in the algorithm). For convenience, we restate the bounds of Theorem 3 in terms on Ms .   α 1/s n n · α ns · α o s log n · log(s log n) , · O 2s · n · log2 n · + min 1/s Ms Ms ε2 Ms O  n 1/(s+1) Ms n ns−1/s o s log n · log(s log n) + min n1−1/s , 1−1/s · ε2 Ms Proof of Proof of Theorem 3: Recall that the setting of r and q in Equation (12) and Equation (13), respectively, equals the setting in Equation (4) when α is set to its maximum 1/(s+1) possible value Ms . Hence, it suffices to prove the theorem under the assumption that the algorithm is provided with α (which upper bounds α(G)). It follows from Theorem 8, Lemma 10, Lemma 13 and Lemma 17, that when Moment-estimators is invoked with parameters r and q as set in Equation (12) and Equation (13), respectively, the algorithm returns a value X such 15 that X ∈ [(1− ε)µs , (1+ ε)µs ] with probability at least 1− δ. However, these settings require the knowledge of Ms , which is the parameter we are trying to approximate (up to the normalization factor n). Hence, we use the following search algorithm. cs = ns+1 (the maximum possible value of Ms ), and compute r We start with a guess M cs , with the according to Equation (12) and q according to Equation (13) assuming Ms = M given approximation parameter ε and with δ = 1/3. We then invoke Moment-estimators cs then we stop Θ(log(s log n)) times and let Z be the median of the returned values. If Z ≥ M c and return Z. Otherwise we halve Ms and repeat. Observe that r and q are decreasing functions of Ms . Hence, the running time of each invocation of Moment-estimators is at most the running time of the last invocation. By Claim 6 and Markov’s inequality, for each invocation of Moment-estimators , Pr[X ≥ 3Ms ] ≤ 1/3 (where X is the value returned by the algorithm). We stress that this holds regardless of whether r and q satisfy Conditions 1 and 2 (respectively). By the definition of Z, for values cs > 3Ms , the probability that we will stop in each step is O(1/(s log n)). Therefore, with high M cs ≤ 3Ms . constant probability we will not stop before M 3 c Once Ms ≤ 3Ms , we will satisfy Conditions 1 and 2. By Theorem 8, in each invocation of Moment-estimators , X ∈ [(1 − ε)µs , (1 + ε)µs ] with probability at least 1 − δ = 2/3, so that cs ≤ Ms /2, Z ∈ [(1 − ε)µs , (1 + ε)µs ] with probability at least 1 − O(1/(s log n)). Thus, once M the algorithm will stop and return a value in [(1 − ε)µs , (1 + ε)µs ] with probability at least 1 − O(1/(s log n)). By a union bound over all iterations, the algorithm returns such a value with high constant probability. In order to bound the expected running time, we first observe that the running time of cs ∈ [Ms /2i+1 , Ms /2i ) is at most 2i+1 times the an invocation of Moment-estimators with M cs = Ms . On the other hand, the probability that the running time of an invocation with M cs ∈ [Ms /2i+1 , Ms /2i ) for any i ≥ 1, is O(log(n)−i ). algorithm does not stop before we reach M The bound on the expected running time follows. 7 Lower Bounds for Bounded Degeneracy The lower bounds given in this section hold for algorithms that are allowed degree and neighbor queries, as well as pair queries (that is, queries of the form: “is there an edge between u and v”). These lower bound show that the complexity of the algorithm, as stated in Theorem 3 for graphs with degeneracy at most α, is tight up to the dependence on 1/ε and polylogarithmic factors in n, for any constant s (or even s = O(log log n)). Theorem 18. Any constant-factor approximation algorithm for Ms  n·α(G)1/s queries. Ω 1/s Ms must perform (G) fs and M fs /ns ≤ α fs /c)1/(s+1) ,4 we next define two families Proof: For every n, M e ≤ (M of graphs: G1 and G2 . Each graph in G1 consists of a clique C1 , over α e vertices, and an independent set C2 , over n − α e vertices. For each graph in G2 , the vertices are partitioned fs /e fs /e into three sets: C1 , C2 , C3 , of sizes α e, (M α)1/s − α e, and n − (M α)1/s , respectively. The set C1 is a clique, and is connected by a complete bipartite graph to C2 , where there are no edges within C2 . The set C3 is an independent set. Within each family, the graphs differ only 3 cs , we invoke Moment-estimators with To be precise, in order to satisfy the conditions for values Ms ≤ 3M 3r and 3q. 1 P P 4 Recall that by Claim 12, α(G) ≤ Ms (G) s+1 , and note that Ms (G) = v dsv ≤ v dv · ns−1 ≤ 2α(G)ns . 16 in the labeling of the vertices. By construction, in both families, all graphs have degeneracy fs /c, and for each G in G2 , Θ(e α). For each G ∈ G1 we have that Ms (G) = O(e αs+1 ) ≤ M 1/s s fs /e fs /e fs ). Ms (G) = Θ(e α · (M α) + ((M α) − α e) · α e ) = Θ(M Clearly, unless the algorithm “hits” a vertex in the clique C1 of a graph belonging to G1 or a vertex in C1 ∪ C2 in a graph belonging to G2 , it cannot distinguish between a graph selected randomly from  G1 and a graph selected randomly from G2 . The probability of hitting such a f 1/s α) . Thus, in order for this event to occur with high constant probability, vertex is O (Ms /e n  1/s  α queries are necessary. Ω ne f1/s Ms Theorem 19. Any constant-factor approximation algorithm for Ms must perform )! ( n · α(G) ns · α(G) 1−1/s ns−1/s , Ω min ,n , Ms (G)1/s Ms (G) Ms (G)1−1/s queries. Proof: The proof of the theorem is based on simple modifications to the lower bound constructions in [26, Thm. 5]. We note that this theorem of [26] was stated explicitly for algorithms that perform degree and neighbor queries since such was the algorithm presented in [26] (as well as the current paper). However, it was noted in [26, Sec. 7] that they also hold when pair queries are allowed (as they are essentially based on “hitting special vertices”). The theorem is proved by considering two cases that are defined according to the relation between Ms (G) and n (namely, Ms (G)1/s ≤ n − c and Ms (G)1/s > n − c for a constant c, which determines the hardness of approximation). Within each case there are two sub-cases that are defined according to the relation between α(G) and (Ms (G)/n)1/s (namely, α(G) < (Ms (G)/n)1/s and α(G) ≥ (Ms (G)/n)1/s ). Each of the four sub-cases gives us one of the terms in the lower bound (within the min{·} expression). For each of the sub-cases we consider the fs that correspond to the sub-case, and we construct two families of graphs: values α e and M G1 and G2 . In both families all graphs have degeneracy Θ(e α). Every graph G ∈ G1 satisfies f fs . The lower bound is based on Ms (G) ≤ Ms , while every graph G ∈ G2 satisfies Ms (G) ≥ c · M the difficulty of distinguishing between a random graph selected from G1 and a random graph selected from G2 , with a specified number of queries. In all cases we modify the construction in [26, Thm. 5] either by decreasing the degeneracy or increasing it. f 1/s ≤ n − c. For this case we modify the construction described in [26, Item (2) The case M s of Thm. 5]. In both families, the vertices are partitioned into two subsets, S and V \ S, where the size of S is c. For each graph in G1 , the set S is an independent set, while for each graph in G2 , each vertex in S has d′ neighbors in V \ S, for an appropriate setting of d′ . In both families, the vertices in V \ S have degree d, for an appropriate setting of d (where in G1 their neighbors are all in V \ S while in G2 some of their neighbors are in S). Observe that the graphs in the family G1 can be viewed as obtained from the graphs of G2 be replacing pairs of edges between S to V /S by a single edge in V \ S. We refer to the edges between S and V \ S in the graphs of G2, and the edges replacing them in the graphs of G1 as “special edges”. In [26], the settings of d′ and d are such that the number of stars in graphs belonging to G2 is (roughly) a factor c larger than the number of stars in graphs belonging to G1 . The difficulty of distinguishing between a random graph selected from G1 and a random graph selected from G2 is based on upper bounding the following two very similar events: (1) “Hitting” a vertex v in S when querying a graph in G2 by either performing a degree/neighbor query on v or by performing a neighbor query on u ∈ V \ S and receiving v as an answer. (2) “Hitting” a vertex 17 v in S or a special edge between vertices in V \ S when querying a graph in G1 , where the number of special edges is |S| · d′ /2. In what follows we modify the settings of d′ and d (as defined in [26, Item (2) of Thm. 5]), and in the case of large α perform an additional small modification. fs /n)1/s and the sub-case α fs /n)1/s , we set d′ = ⌈M fs1/s ⌉. In both the sub-case α e < (M e ≥ (M fs . This ensures that for each graph G ∈ G2 , Ms (G) ≥ cM 1/s f If α e < (Ms /n) , then we set d = α e. Hence, α(G) = Θ(e α) for graphs in both families, and 1/s s f f Ms (G) ≤ n · ((Ms /n) ) = Ms for graphs in G1 . Since the number of edges between S and V \ S in graphs belonging to G2 (which is of the same order as the number of special edges in f1/s graphs belong e), we get a lower  to G1 ) is O(Ms ) while the total number of edges is Ω(n · α 1/s f (this of course requires formalizing, as done in [26]). bound of Ω n · α e/Ms fs /n)1/s , then we set d = ⌊(M fs /n)1/s ⌋, so that it still holds that Ms (G) ≤ n · If α e ≥ (M fs /n)1/s )s = M fs for graphs in G1 . In both families, within V \ S we add edges so as to form ((M a clique on a subset of size α e, thus increasing the degeneracy to Θ(e α). Since this modification is the same in both families, it does not effect the ability to distinguish between the two families. fs1/s · n1−1/s ), Since the number of edges (not including those in the clique) is (n − c) · d = Ω(M 1−1/s we get a lower bound of Ω(n ). f 1/s > n − c. In this case we may assume, without loss of generality, that The case M s fs < ns+1 /c′ for a sufficiently large constant c′ , or else the lower bound Ω(ns−1/s /M fs1−1/s ) is M fs < ns · α fs ) is trivial. We may trivial, and similarly that M e/c′ , or else the lower bound Ω(ns · α e/M 1/(s+1) fs also assume that α e≤M since α(G) ≤ Ms (G)1/(s+1) for every graph G (by Claim 12). Here we modify the construction described in [26, Item (3) of Thm. 5]. The construction fs1/s ≤ n − c, except that the size of the set S needs to be is similar to the one described for M fs /ns ⌉, and in the graphs in G2 each vertex in increased. Specifically, we let |S| = b for b = ⌈cM fs ). S is connected to every other vertex in the graph. Therefore, for each G ∈ G2 , Ms (G) = Ω(M 1/s f If α e < (Ms /n) , then in both families each vertex in V \ S has degree d = α e. Since b < α e s ′ ′ f (due to Ms < n · α e/c for a sufficiently large constant c ), we get that α(G) = Θ(e α) for all graphs in G1 and in G2 . The difference between the families is that in the graphs belonging to G2 , each vertex in V \ S has b = |S| neighbors in S and d − b neighbors in V \ S, while in the graphs belonging to G1 , each vertex in V \ S has d neighbors in V \ S (and each vertex in S fs only neighbors each other vertex in S). This implies that for each G ∈ G1 , Ms (G) ≤ ne αs < M (where we have again used b < α e). Since the number of edges between S and V \ S in each graph in G2 (the number of corresponding special edges within V \ S in each graph in G1 ) is fs /ns−1 ), and the total number of edges is Ω(n · α O(b · n) = O(M e), we get a lower bound of s fs ). Ω(n · α e/M fs /n)1/s , then we use the same construction as above only with d = (M fs /n)1/s , If α e ≥ (M and we “plant” a clique of size α e in V \ S. The degeneracy is hence increased to Θ(e α), and the fs (due to the clique). Since the number value of Ms (G) for G ∈ G1 is increased to at most 2M fs1/s · n1−1/s ), we get a lower bound of edges (not including those in the clique) is Ω(n · d) = Ω(M 1−1/s fs of Ω(ns−1/s /M ). 7.1 On knowing the degeneracy bound One may wonder if the query complexity of Theorem 3 can be obtained without knowledge of the degeneracy α. The ideal situation would be one where an algorithm has the complexity of Moment-estimator, without knowing α. The worst-case lower bound of [26] do not preclude 18 this possibility, since it uses graphs with high degeneracy. Nonetheless, a slight adaptation of those arguments shows that the bound holds even for bounded degeneracy graphs, if the algorithm must work on all graphs. We will focus solely on estimating average degree, since that suffices to make our point. Definition 20. For a constant c, an algorithm A is called c-valid if: given query access to a graph G, with probability 2/3, A outputs a c-approximation to the average degree of G. Note that Moment-estimator, with access to a degeneracy bound, is not valid. This is because it is only required to be accurate for graphs with the given degeneracy bound, not all graphs. Theorem 21. Let n be a sufficiently large integer. Consider the class of graphs on n vertices √ with degeneracy at most 2. For any constant c, any c-valid algorithm must perform Ω( n) queries on these graphs. Proof: Similarly to previous lower-bound proofs, for each sufficiently large n, we define two distributions over labeled graphs. Consider a graph consisting of two connected components, √ √ a cycle on ⌊n − 4c n⌋ vertices and a cycle on ⌈4c n⌉ vertices (where c is the constant in the statement of the theorem). The distribution G1 is generated by labeling the vertices using a uniform random permutation in [n]. For the second distribution, take the graph that consists of √ √ a cycle on ⌊n − 4c n⌋ vertices and a clique on ⌈4c n⌉ vertices. The distribution G2 is generated by labeling the vertices according to a uniform random permutation. Consider any (possibly randomized) algorithm for deciding, given query access either to a graph generated by G1 or to a graph generated by G2 , according to which distribution was the graph generated. As long as the algorithm does not perform a query on a vertex that belongs to the small cycle (if the graph is generated by G1 ) or the small clique (if the graph is generated by G2 ), answers to its queries are identically distributed under the two distribution. √ This implies that any such decision algorithm must perform Ω( n) queries in order to succeed with probability at least 2/3. Now consider a c-valid algorithm A that makes at most s queries on any graph with n vertices and degeneracy at most 2. We use this algorithm in order to construct an algorithm B that distinguishes G1 from G2 in O(s) queries. It works as follows. Given query access to G, B runs 20 independent runs of A. If any run makes more than s queries, B terminates and outputs “G2 ”. At the end of the runs, all of them have provided some estimate for the average degree. If the median is at most 2c, then B outputs “G1 ”. Otherwise, it outputs “G2 ”. Suppose G ∼ G1 , and recall that the average degree of G is exactly 2. All runs are guaranteed to make at most s queries. Thus, all of them will output an estimate. By the validity of A and a Chernoff bound, the median estimate will be at most 2c with probability at least 2/3, and B gives a correct output. Now suppose that G ∼ G2 , and recall that The average degree of G is at least 3c2 . If any run takes more than s queries, then B outputs correctly. Otherwise, by a similar argument to the one made for G ∼ G1 , the median estimate will be at least 3c with probability at least 2/3. Thus, B is correct. The query complexity of B is O(s) and it distinguishes G1 from G2 with probability at least √ 2/3. Therefore, s must be Ω( n). References [1] Arboricity. Wikipedia. https://en.wikipedia.org/wiki/Arboricity. 6 19 [2] Graph degeneracy. Wikipedia. https://en.wikipedia.org/wiki/Degeneracy_(graph_theory). 11 [3] M. Aliakbarpour, A. S. Biswas, T. Gouleakis, J. Peebles, R. Rubinfeld, and A. Yodpinyanee. Sublinear-time algorithms for counting star subgraphs with applications to join selectivity estimation. Technical Report 1601.04233, Arxiv, 2016. 2, 4, 5, 9 [4] N. Alon and S. Gutner. Linear time algorithms for finding a dominating set of fixed size in degenerated graphs. In Proceedings of COCOON, pages 394–405, 2008. 6 [5] N. Alon, Y. Matias, and M. Szegedy. The space complexity of approximating the frequency moments. J. Comput. Syst. Sci., 58(1):137–147, 1999. 4 [6] A-L. Barabasi and R. Albert. Emergence of scaling in random networks. Science, 286:509– 512, October 1999. 2, 3 [7] J. Berry, L. Fostvedt, D. Nordman, C. Phillips, C. Seshadhri, and A. Wilson. Why do simple algorithms for triangle enumeration work in the real world? In Innovations in Theoretical Computer Science (ITCS), pages 225–234, 2014. doi:10.1145/2554797.2554819. 2 [8] Zhiqiang Bi, Christos Faloutsos, and Flip Korn. The “DGX” distribution for mining massive, skewed data. In KDD ’01, pages 17–26. ACM, 2001. doi:10.1145/502512.502521. 2 [9] P. Bickel, A. Chen, and E. Levina. The method of moments and degree distributions for network models. Annals of Statistics, 39(5):2280–2301, 2011. 2 [10] P. Brach, M. Cygan, J. Laccki, and P. Sankowski. Algorithmic complexity of power law networks. In Proceedings of SODA, pages 1306–1325, 2016. 2 [11] A. Broder, R. Kumar, F. Maghoul, P. Raghavan, S. Rajagopalan, R. Stata, A. Tomkins, and J. Wiener. Graph structure in the web. Computer Networks, 33:309–320, 2000. 2 [12] B. Chazelle, R. Rubinfeld, and L. Trevisan. Approximating the minimum spanning tree weight in sublinear time. SIAM Journal on Computing, 34(6):1370–1379, 2005. 6 [13] N. Chiba and T. Nishizeki. Arboricity and subgraph listing algorithms. SIAM J. Comput., 14:210–223, 1985. URL: http://dx.doi.org/10.1137/0214017, doi:10.1137/0214017. 4, 6 [14] F. Chierichetti, A. Dasgupta, R. Kumar, S. Lattanzi, and T. Sarlos. On sampling nodes in a network. In Proceedings of WWW, 2016. 2, 6 [15] A. Clauset, C. R. Shalizi, and M. E. J. Newman. Power-law distributions in empirical data. SIAM Review, 51(4):661–703, 2009. doi:10.1137/070710111. 2 [16] A. Czumaj, F. Ergun, L. Fortnow, A. Magen, I. Newman, R. Rubinfeld, and C. Sohler. Approximating the weight of the euclidean minimum spanning tree in sublinear time. SIAM Journal on Computing, 35(1):91–109, 2005. 6 [17] A. Czumaj and C. Sohler. Estimating the weight of metric minimum spanning trees in sublinear time. SIAM Journal on Computing, 39(3):904–922, 2009. 6 [18] A. Dasgupta, R. Kumar, and T. Sarlos. On estimating the average degree. In Proceedings of WWW, pages 795–806, 2014. 2, 6 20 [19] R. Diestel. Graph Theory. Springer, fourth edition edition, 2010. 11 [20] T. Eden, A. Levi, D. Ron, and C. Seshadhri. Approximately counting triangles in sublinear time. In Proceedings of the Fifty-Sixth Annual Symposium on Foundations of Computer Science (FOCS), pages 614–633, 2015. 4, 6 [21] D. Eppstein, M. Loffler, and D. Strash:. Listing all maximal cliques in sparse graphs in near-optimal time. In Proceedings of ISAAC, pages 403–413, 2010. 6 [22] P. Erdos and T. Gallai. Graphs with prescribed degree of vertices (hungarian). Mat. Lapok, 11:264–274, 1960. 2 [23] M. Faloutsos, P. Faloutsos, and C. Faloutsos. On power-law relationships of the internet topology. In Proceedings of SIGCOMM, pages 251–262, 1999. 2 [24] U. Feige. On sums of independent random variables with unbounded variance and estimating the average degree in a graph. SIAM Journal on Computing, 35(4):964–984, 2006. 2 [25] O. Goldreich and D. Ron. Approximating average parameters of graphs. Random Structures and Algorithms, 32(4):473–493, 2008. 2, 5 [26] M. Gonen, D. Ron, and Y. Shavitt. Counting stars and other small subgraphs in sublineartime. SIAM Journal on Discrete Math, 25(3):1365–1411, 2011. 2, 9, 10, 17, 18 [27] S.L. Hakimi. On the realizability of a set of integers as degrees of the vertices of a graph. SIAM J. Applied Math, 10:496–506, 1962. 2 [28] A. Hassidim, J. A. Kelner, H. N. Nguyen, and K. Onak. Local graph partitions for approximation and testing. In Proceedings of the Fiftieth Annual Symposium on Foundations of Computer Science (FOCS), pages 22–31. IEEE, 2009. 6 [29] V. Havel. A remark on the existence of finite graphs (czech). Casopis Pest. Mat., 80:477– 480, 1955. 2 [30] S. Marko and D. Ron. Approximating the distance to properties in bounded-degree and general sparse graphs. ACM Transactions on Algorithms, 5(2), 2009. 6 [31] D. Matula and L. Beck. Smallest-last ordering and clustering and graph coloring algorithms. JACM, 30(3):417–427, 1983. 6 [32] J. Nešetřil and P. Ossana de Mendez. Sparsity. Springer, 2010. 3 [33] H. N. Nguyen and K. Onak. Constant-time approximation algorithms via local improvements. In Proceedings of the Forty-Ninth Annual Symposium on Foundations of Computer Science (FOCS), pages 327–336. IEEE, 2008. 6 [34] K. Onak, D. Ron, M. Rosen, and R. Rubinfeld. A near-optimal sublinear-time algorithm for approximating the minimum vertex cover size. In Proceedings of the twenty-third annual ACM-SIAM symposium on Discrete Algorithms, pages 1123–1131. SIAM, 2012. 6 [35] M. Parnas and D. Ron. Approximating the minimum vertex cover in sublinear time and a connection to distributed algorithms. Theoretical Computer Science, 381(1-3):183–196, 2007. 6 21 [36] D. Pennock, G. Flake, S. Lawrence, E. Glover, and C. L. Giles. Winners don’t take all: Characterizing the competition for links on the web. PNAS, 99(8):5207–5211, 2002. doi:10.1073/pnas.032085699. 2 [37] A. Sala, L. Cao, C. Wilson, R. Zablit, H. Zheng, and B. Y. Zhao. Measurement-calibrated graph models for social network experiments. In WWW ’10, pages 861–870. ACM, 2010. doi:10.1145/1772690.1772778. 2 [38] O. Simpson, C. Seshadhri, and A. McGregor. Catching the head, tail, and everything in between: A streaming algorithm for the degree distribution. In Proceedings on the International Conference on Data Mining (ICDM), pages 979–984, 2015. 6 [39] Y. Yoshida, M. Yamamoto, and H. Ito. An improved constant-time approximation algorithm for maximum-matchings. In Proceedings of the Fourty-First Annual ACM Symposium on the Theory of Computing, pages 225–234. ACM, 2009. 6 22
8cs.DS
arXiv:1606.00976v1 [math.ST] 3 Jun 2016 Marginal Estimation of Parameter Driven Binomial Time Series Models W.T.M. Dunsmuir School of Mathematics and Statistics, University of New South Wales, Sydney, Australia. [email protected] and J.Y. He School of Mathematics and Statistics, University of New South Wales, Sydney, Australia [email protected] Abstract: This paper develops asymptotic theory for estimation of parameters in regression models for binomial response time series where serial dependence is present through a latent process. Use of generalized linear model (GLM) estimating equations leads to asymptotically biased estimates of regression coefficients for binomial responses. An alternative is to use marginal likelihood, in which the variance of the latent process but not the serial dependence is accounted for. In practice this is equivalent to using generalized linear mixed model estimation procedures treating the observations as independent with a random effect on the intercept term in the regression model. We prove this method leads to consistent and asymptotically normal estimates even if there is an autocorrelated latent process. Simulations suggest that the use of marginal likelihood can lead to GLM estimates result. This problem reduces rapidly with increasing number of binomial trials at each time point but, for binary data, the chance of it can remain over 45% even in very long time series. We provide a combination of theoretical and heuristic explanations for this phenomenon in terms of the properties of the regression component of the model and these can be used to guide application of the method in practice. Keywords and phrases: Binomial time series regression, Parameter driven models, Marginal likelihood. 1. Introduction Discrete valued time series are increasingly of practical importance with applications in diverse fields such as analysis of crime statistics, econometric modelling, high frequency financial data, animal behaviour, epidemiological assessments and disease outbreak monitoring, and modern biology including DNA sequence analysis – see Dunsmuir, Tran and Weatherburn (2008). In this paper we focus on time series of binomial counts. Two broad classes of models for time series of counts, based on the categorization of Cox (1981), are generally discussed in the literature: observation driven models, in which the serial dependence relies on previous observations and residuals; and parameter driven models, in which the serial dependence is introduced through an unobserved latent process. Estimation of parameter driven models is significantly challenging especially when the latent process is correlated. Therefore methods that provides preliminary information of the regression parameters without requiring a heavy computation load would be appealing. For example, the use of generalized linear model (GLM) estimation for obtaining estimates of the regression parameters is discussed in Davis, Dunsmuir and Wang (2000) and Davis and Wu (2009) for Poisson and negative binomial observations respectively. GLM estimation is consistent and asymptotically normal for these two types of response distribution even when there is a latent process inducing serial dependence. However as recently pointed out by Wu and Cui (2014) and discussed in more detail below, use of GLM for binary or binomial data leads to asymptotically biased estimates. Wu and Cui (2014) propose a semiparametric estimation method for binary response data in which the marginal probability of success modelled non-parametrically. This paper takes a different approach and suggest using estimation based on one-dimensional marginal distributions which accounts for the variance of the latent process but not the serial dependence. Such a procedure is easy to implement using standard software for fitting generalized linear mixed models (GLMM). We show that this method leads to estimates of regression parameters and the variance of the latent process, which are consistent and asymptotically normal even if the latent process includes serial dependence. Additionally the method extends easily to other response distributions such as the Poisson and negative binomial and in 1 /Marginal Estimation of Binomial Time Series Mixed Models 2 these cases will improve efficiency of regression parameters related to GLM estimates. Suppose Yt represents the number of successes in mt trials observed at time t. Assume that there are n observations {y1 , . . . , yn } from the process {Yt } and that xnt is an observed r-dimensional vector of regressors, which may depend on the sample size n to form a triangular array, and whose first component is unity for an intercept term. Then given xnt and a latent process {αt }, the Yt are independent with density fYt (yt |xnt , αt ; θ) = exp {yt Wt − mt b(Wt ) + c(yt )} (1) in which Wt = xTnt β + αt ,  t and b(Wt ) = log(1 + exp(Wt )) and c(yt ) = log m yt . Then E(Yt |xnt , αt ) = mt ḃ(Wt ), (2) Var(Yt |xnt , αt ) = mt b̈(Wt ). The process {αt } is not observed and because of this is referred to as a latent process. Often {αt } is assumed to be a stationary Gaussian linear process with zero mean and auto-covariances Cov (αt , αt+h ) = τ R(h; ψ) where τ is the marginal variance of αt and ψ are the parameters for the serial dependence in the model of αt . The specification of stationary Gaussian linear process covers many practical applications and we will assume that for the remainder of the paper. However, Gaussianity it not required for the main asymptotic results presented here, and in general, αt can be assumed a stationary strongly mixing process. We will discuss this extension further in Section 6. We let θ = (β, τ, ψ) denote the collection of all parameters and let θ0 be the true parameter vector. For the above model the likelihood is defined in terms of an integral of dimension n as follows, Z L(θ) := n Y exp {yt Wt − mt b(Wt ) + c(yt )} g(α; τ, ψ)dα (3) Rn t=1 where g(α; τ, ψ) is the joint density of α = (α1 , . . . , αn ) given the parameters τ and ψ. Maximization of the likelihood (3) is computationally expensive. Methods for estimating the high dimensional integrals in (3) using approximations, Monte Carlo method or both are reviewed in Davis and Dunsmuir (2015). However simple to implement methods that provide asymptotically normal unbiased estimators of β and τ without the need to fit the full likelihood are useful for construction of statistics needed to investigate the strength and form of the serial dependence. They can also provide a initial parameter values for the maximization of the full likelihood (3). For practitioners, GLM estimation has strong appeal as it is easy to fit with standard software packages. GLM estimators of the regression parameters β are obtained by treating the observations yt as being independent with Wt = xTnt β and using the GLM log-likelihood l0 (β) := log L0 (β) = n X [yt (xTnt β) − mt b(xTnt β) + c(yt )] (4) t=1 We let β̃ denote value of β which maximises (4). This GLM estimate assumes that there is no additional unexplained variation in the responses beyond that due to the regressors xnt . However, as recently noted by Wu and Cui (2014), GLM does not provide consistent estimates of β when Wt contains a latent autocorrelated component. To be specific, for deterministic regressors xnt = h(t/n) for example, n−1 l0 (β) has limit Z 1 Z  M m Z X X ḃ(h(u) β0 + α)g(α; τ0 )dα(h(u) β) − b(h(u) β) du + κm T Q(β) = m̄ 0 R T T m=1 j=0 0 1 π 0 (j)c(j)du /Marginal Estimation of Binomial Time Series Mixed Models 3 where m̄ = E(mt ), κm = P (mt = m) and π 0 (j) = P (Yt = j|xnt , θ0 ). We show below that β̃ converges to β 0 , which maximizes Q(β). Equivalently β 0 is the unique vector that solves  Z 1 Z T T 0 ḃ(h(u) β0 + α)g(α; τ0 )dα − ḃ(h(u) β ) h(u)du = 0 (5) m̄ 0 R In the Poisson or negative binomial cases, mt ≡ 1, and E(Yt ) = E(ḃ(xTnt β0 + αt )) = ḃ(xTnt β0 + τ2 ), in which τ /2 only modifies the regression intercept but does not influence the response to other regression terms. Such an identity does not usually hold for binomial observations. When τ0 > 0, the relationship between β 0 and β0 in binomial logit regression models has been investigated by several researchers. For example, Neuhaus, R T Kalbfleisch and Hauck (1991) proved that the logit of the marginal probability (1 + e−(x β0 +α) )−1 g(α)dα T ∗ ∗ can be approximated with x β , where |β | ≤ |β0 | for single covariate x and the equality is only attained when τ = 0 or β0 = 0. Wang and Louis (2003) proved that only if g(·) is the “bridge” distribution, the R T logit of (1 + e−α−x β0 )−1 g(α)dα equals to xT β0 holds; Wu and Cui (2014) proposed their MGLM method because GLM estimates for binomial observations generated under model (2) are inconsistent. To overcome the inconsistency observed in GLM estimation, in this paper we propose use of marginal likelihood estimation, which maximises the likelihood constructed under the assumptions that the process αt consists of independent identically distributed random variables. Under this assumption the full likelihood (3) is replaced by the “marginal” likelihood L1 (δ) = n Y t=1 f (yt |xt , δ) = n Z Y t=1 exp (yt Wt − mt b(Wt ) + c(yt )) g(αt ; τ )dαt . and the corresponding “marginal” log-likelihood function is Z n n X X log exp (yt Wt − mt b(Wt ) + c(yt )) g(αt ; τ )dαt . log f (yt |xt , δ) = l1 (δ) = t=1 t=1 (6) R (7) R where δ = (β, τ ) and g(·, τ ) is the density for a mean zero variance τ normal random variable. Let δ̂ be the T estimates obtained by maximising (7) over the compact parameter space Θ := {β ∈ Rr : kβ − β0 k ≤ d1 } {τ ≥ 0 : |τ − τ0 | ≤ d2 }, where d1 < ∞, d2 < ∞. Marginal likelihood estimators of δ̂ can be easily obtained with standard software packages for fitting generalized linear mixed models. Since these marginal likelihood estimates δ̂ are consistent, they can be used as the starting value of full likelihood based on (3). Additionally, the asymptotic distribution of δ̂, and the standard deviation derived from the asymptotic covariance matrix can be used to assess the significance of regression parameters β̂. Moreover, in another paper we have developed a two-step score-type test to first detect the existence of a latent process and if present whether there is serial dependence. The asymptotic results of this paper are needed in order to derive the large sample chi-squared distribution of the second step, the score test for detecting serial dependence. Large sample properties of the marginal likelihood estimates δ̂ are provided in Section 2; The simulations of Section 4 show that marginal likelihood estimates lead to a high probability of τ̂ = 0 when the number of trials, mt , is small. In particular P (τ̂ = 0) can be almost 50% for binary data. Hence Section 3 focuses on obtaining asymptotic approximations to the upper bound for P (τ̂ = 0), which is useful to quantify the proportion of times the marginal likelihood procedures ‘degenerates’ to the GLM procedure. Also in Section 3 we derive a theoretical mixture distribution which provided better approximation in this situation. Section 4 presents simulation evidence to demonstrate the accuracy of the asymptotic theory and the covariance matrix of the marginal likelihood estimate. Section 5 discusses the difference between marginal likelihood estimation and MGLM estimation of Wu and Cui (2014). Section 6 concludes. 2. Asymptotic Theory for Marginal Likelihood Estimates We present the large sample properties for the marginal likelihood estimates of β and τ obtained by maximizing (7). We begin by presenting the required conditions on the latent process {αt }, the regressors {xnt } and the sequence of binomial trials {mt }. /Marginal Estimation of Binomial Time Series Mixed Models 4 A process {αt } is strongly mixing if ν(h) = sup |P (AB) − P (A)P (B)| → 0 sup A∈Ft−∞ ,B∈F∞ t+h t as h → ∞, where Ft−∞ and F∞ t+h are the σ-fields generated by {αs , s ≤ t} and {αs , s ≥ t + h} respectively. In practice, the number of trials mt may vary with time. To allow for this we introduce: Condition 1. The sequence of trials {mt : 1 ≤ mt ≤ M } is a stationary strongly mixing process independent ∞ M P P to {Xt }; the mixing coefficients satisfy: ν(h) < ∞. Let κj = P (mt = j), assume κM > 0, κj = 1. j=1 h=0 An alternative would be to take mt as deterministic and asymptotically stationary in which case the κj would be limits of finite sample frequencies of occurrences mt = j. Both specifications obviously include the case where mt = M for all t, of which M = 1 yields binary responses. As in previous literature Davis, Dunsmuir and Wang (2000), Davis and Wu (2009) and Wu and Cui (2014) we allow for both deterministic and stochastic regressors: Condition 2. The regression sequence is specified in one of two ways: (a) Deterministic covariates defined with functions: xnt = h(t/n) for some specified piecewise continuous vector function h : [0, 1] → Rr . (b) Stochastic covariates which are a stationary vector process: xnt = xt for all n where {xt } is an observed T trajectory of a stationary process for which E(es Xt ) < ∞ for all s ∈ Rr . Condition 3. Let r = dim(β). The regressor space X = {xnt : t ≥ 1}, assume rank(span(X)) = r. The full rank of the space spanned by the regressors required for Condition 3 holds for many examples. For instance, for deterministic regressors generated by functions given in Condition 2a, such Xi , i = 1, . . . , r exist if there are r different values of ui = (u1 , . . . , ur ) such that the corresponding function (h(u1 ), . . . , h(ur )) are linearly independent. For stochastic regressors generated with a stationary process given in Condition 2b, linearly independent Xi , i = 1, . . . , r can be found almost surely if Cov(X) > 0. Condition 4. The latent P∞ process {αt }, is strictly stationary, Gaussian and strongly mixing with the mixing coefficients satisfying h=0 ν(h)λ/(2+λ) < ∞ for some λ > 0. Conditions for a unique asymptotic limit of the marginal likelihood estimators are also required. Denote the marginal probability of j successes in mt trials at time t as Z πt (j) = ejWt −mt b(Wt )+c(j) φ(zt )dzt , j = 1, . . . , mt . R where Wt = xTnt β + τ 1/2 zt , and zt = αt /τ 1/2 has unit variance. If {αt } is Gaussian, so is the process {zt } and zt ∼ N (0, 1) with density function φ(·). Similarly let πt0 (j) be the marginal probability evaluated with the true values β0 and τ0 at time t. Define Qn (δ) = 1 l1 (δ) n (8) conditional on mt and xnt , n E(Qn (δ)) = m t 1 XX π 0 (j) log πt (j), n t=1 j=0 t δ ∈ Θ. (9) a.s. Under Conditions 1 and 2, E(Qn (δ)) → Q(δ). Let π(j, ·) = P (Y = j|·, δ), and π 0 (j, ·) is evaluated with δ0 , then under Condition 2a, Q(δ) = M X m=1 Z κm m 1X 0 j=0 π 0 (j, h(u)) log π(j, h(u))du (10) /Marginal Estimation of Binomial Time Series Mixed Models 5 and, under Condition 2b, Q(δ) = M X Z κm Rr m=1 m X π 0 (j, x) log π(j, x)dF (x) (11) j=0 the proof is included in the proof of Theorem 1. Condition 5. Q(δ) has a unique maximum at δ0 = (β0 , τ0 ), the true value. We now establish the consistency and asymptotic normality of the marginal likelihood estimator. Theorem 1 (Consistency and asymptotic normality of marginal likelihood estimators). Assume τ0 > 0 and √ d a.s. −1 Conditions 1 to 5, then δ̂ → δ0 and n(δ̂ − δ0 ) → N (0, Ω−1 1,1 Ω1,2 Ω1,1 ) as n → ∞, in which n 1X ˙ E(lt (δ0 )l˙tT (δ0 )) > 0 n→∞ n t=1 (12) Ω1,1 = lim n n 1 XX Cov(l˙t (δ0 ), l˙s (δ0 )) n→∞ n t=1 s=1 Ω1,2 = lim (13) where ∂ log πt (yt ) |δ0 = f −1 (yt |xnt , δ0 ) l˙t (δ0 ) = ∂δ Z T (yt − mt ḃ(xnt β0 + 1/2 τ0 zt ))  xnt zt √ 2 τ0  f (yt |xnt , zt , δ0 )φ(zt )dzt (14) To use this theorem in practice requires at least that the identifiability condition holds and that the covariance be estimated from a single series. We address these aspects in detail in Section 2.1 and 2.2. In addition, particularly for binary responses, marginal likelihood estimators produce a high probability of τ̂ = 0. We address this in detail in Section 3, where we propose an improved asymptotic distribution based on a mixture. 2.1. Asymptotic identifiability We nowPdiscuss circumstances under Pmwhich Condition 5 holds. Now for any δ ∈ Θ, Q(δ) ≤ Q(δ0 ), since for m any x, j=0 π 0 (j, x) log π(j, x) ≤ j=0 π 0 (j, x) log π 0 (j, x). Thus the model is identifiable if and only if for any δ ∈ Θ, Q(δ) − Q(δ0 ) < 0 if δ 6= δ0 . Lemma 1. Assume M ≥ 2 and Condition 3, then Condition 5 holds for marginal likelihood (7). The proof is outlined in Appendix A. For binary data, M = 1, then Q(δ) = Q(δ0 ) if π(1, x) = π 0 (1, x), ∀x ∈ X. Hence model (7) is not identifiable if ∃δ 6= δ0 such that π(1) = π 0 (1) everywhere on X, that is, for each distinct value Xi ∈ X, such (β, τ ) 6= (β0 , τ0 ) can be found to establish √ √ Z Z T T eXi β+ τ z eXi β0 + τ0 z √ π(1, Xi ) = φ(z)dz = φ(z)dz = π 0 (1, Xi ). (15) √ T T 1 + eXi β+ τ z 1 + eXi β0 + τ0 z If τ = τ0 , then (15) implies XiT β = XiT β0 . Under Condition 3, r linearly independent Xi , X = (X1 , . . . , Xr ) can be found on X to establish XT β = XT β0 . Then (β − β0 ) has a unique solution of 0r . Hence if τ = τ0 , (15) holds if and only if β = β0 , and Condition 5 holds. If τ 6= τ0 , for each Xi , a unique solution of ai , ai = XiT β 6= XiT β0 can be found for (15). Assume the regressor space X is a set of discrete vectors such that X = {Xi : 1 ≤ i ≤ L}, where Xi 6= Xj if i 6= j. Let X = (X1 , . . . , XL ) be a r × L matrix. Then (15) holds for each Xi ∈ X if there exists such solution of β that XT β = A, A = (a1 , . . . , aL ). Since τ 6= τ0 , β = β0 is not excluded from the possible solutions of β. If L = r, a unique solution of β exists, hence there exists such δ 6= δ0 that establishes (15) for all Xi ∈ X, therefore (7) is not identifiable. If L > r, note rank(X) = r, then XT β = A is overdetermined. Thus a solution of β does not always exist and in these situations Condition 5 holds, however a general proof without further conditions on the regressors is difficult. Instead, we provide a rigourous proof to show Condition 5 holds for binary data when the regressor space X is connected. /Marginal Estimation of Binomial Time Series Mixed Models 6 Lemma 2. Let M = 1. In addition to Condition 3, X is assumed to be a connected subspace of Rr , then Condition 5 holds. Proof: see the appendix A. 2.2. Estimation of the Covariance matrix −1 To use Theorem 1 the asymptotic covariance matrix Ω−1 1,1 Ω1,2 Ω1,1 needs to be estimated using a single observed time series. Now Ω1,1 can be estimated by replacing δh0 with the marginal likelihood estimates i Pn Pn ˙ −1 ˙ δ̂. However estimation of Ω1,2 is challenging, as Ω1,2 = n E t=1 s=1 lt (δ0 )ls (δ0 ) has cross terms   E l˙t (δ0 )l˙s (δ0 ) , s 6= t, which cannot be estimated without knowledge of ψ0 . We use the modified subsampling methods reviewed in Wu (2012) and Wu and Cui (2014) to estimate Ω1,2 . Let Yi,kn = (yi , . . . , yi+kn −1 ) denote the subseries of length kn starting at the ith observation, where i = 1, . . . , mn and mn = n − kn + 1 is the total number of subseries. Define 1 q̂n,t = √ l˙t (δ̂) n by replacing δ0 by δ̂ in (14). Under similar conditions to those given above, we show that as kn → ∞ and † −1 mn → ∞, Γ̂−1 1,n Γ̂n Γ̂1,n is a consistent estimator of the asymptotic covariance matrix of δ̂, where ! i+k mn n n −1 i+k n −1 X X X 1 X T T † q̂kn ,t q̂kn ,s Γ̂1,n = q̂n,t q̂n,t ; Γ̂n = mn i=1 t=1 t=i s=i The performance of subsampling estimators relies on kn to a large extent. Following the guidance of Heagerty and Lumley (2000) on optimal selection of kn , we use kn = C[n1/3 ], C = 1, 2, 4, 8 in the simulations. The one dimensional integrals in q̂n,t can be easily obtained using the R function integrate. 3. Degeneration of Marginal Likelihood Estimates Even when the identifiability conditions are satisfied, in finite samples the marginal likelihood can be maximised at τ̂ = 0, in which case β̂ degenerates to the ordinary GLM estimate β̃. Simulation evidence of Section 4 suggests that the chance of this occurring, even for moderate to large sample sizes, is large (up to 50% for binary data but decreasing rapidly as the number of trials m increases). In this section we will derive two approximations for this probability. In both approximations we conclude that P (τ̂ = 0) will be high whenever the range of xTnt β is such that ḃ(xTnt β) ≈ a0 + a1 (xTnt β), where a0 , a1 are constants. When this linear approximation is accurate the covariance matrix for the marginal likelihood estimates is obtained from the inverse of a near singular matrix and results in var(τ̂ ) being very large so that P (τ̂ = 0) is close to 50%. When there is a nontrivial probability of τ̂ = 0, the distribution of β̂ for finite samples is better approximated by a mixture of two multivariate distributions weighted by P (τ̂ = 0) and P (τ̂ > 0). 3.1. Estimating the probability of τ̂ = 0 One approximation for the probability √ of τ̂ = 0 can be√obtained using the asymptotic normal distribution provided in Theorem 1. Define κ2 = P ( n(τ̂ − τ0 ) ≤ − nτ0 ), then in the limit, √ −1 κ̄2 = Φ(− nτ0 /στ (δ0 )); στ2 (δ0 ) = (Ω−1 (16) 1,1 Ω1,2 Ω1,1 )τ τ where Φ(·) is the standard normal distribution. An alternative approximation to P (τ̂ = 0) can be based on the score function evaluated at τ̂ = 0. Consider the scaled score function S1,n (β̃) = 2n−1 ∂l1 (β, τ )/∂τ |β=β̃,τ =0 , which, using integration by parts, is n i 1 Xh S1,n (β̃) = (yt − mt ḃ(xTnt β̃))2 − mt b̈(xTnt β̃) . n t=1 (17) /Marginal Estimation of Binomial Time Series Mixed Models 7 Now, τ̂ = 0 implies S1,n (β̃) ≤ 0 but not the converse, hence P (τ̂ = 0) is bounded above by P (S1,n (β̃) ≤ 0). In order to derive a large √ sample approximation to this probability we show, in Section 3.2, that the large sample distribution of n(S1,n (β̃) − cS )/σS is standard normal, where cS = lim E(S1,n (β 0 )) and n→∞ √ σS2 = lim Var( nS1,n (β̃)). Define κ1 = P (S1,n (β̃) ≤ 0), it can then be approximated with n→∞ √ κ̄1 = Φ(− ncS /σS ). (18) The quantities cS and σS can be expressed analytically for some regression specifications. In simulations, the limits are computed using numerical integration. For the binary case in particular, the ratio cS /σS can be quite small resulting in a large value for κ̄1 . We compare how well P (τ̂ = 0) is estimated by κ̄1 and κ̄2 via simulations in Section 4, and conclude that κ̄1 is slightly more accurate in the situation covered there. 3.2. Asymptotic Theory for GLM Estimates and Marginal Score To develop the asymptotic distribution of S1,n (β̃), the asymptotic normality of √ n(β̃ − β 0 ) is required. Theorem 2 (Asymptotic normality of GLM estimators). Under Conditions 1 to 4, the estimates β̃ max√ p −1 imising the likelihood (4) satisfies β̃ → β 0 , and n(β̃ − β 0 ) → N(0, Ω−1 1 Ω2 Ω1 ) as n → ∞, in which n 1X mt b̈(xTnt β 0 )xnt xTnt n→∞ n t=1 Ω1 = lim Z  n n 1 XX T T 0 T T 0 mt ms Ω2 = lim (ḃ(xnt β0 + αt ) − ḃ(xnt β ))(ḃ(xns β0 + αs ) − ḃ(xns β ))g(αt , αs ; τ0 , ψ0 )dα xnt xTns n→∞ n t=1 s=1 Z  n X 1 + lim mt b̈(xTnt β0 + αt )g(αt ; τ0 )dα xnt xTnt n→∞ n t=1 The proof of this theorem is given in Appendix B. It relies on concavity of the GLM log likelihood with respect to β. Standard results of a functional limit theorem are used to establish the above result, in a similar way as that used in Davis, Dunsmuir and Wang (2000), Davis and Wu (2009) and Wu and Cui (2014). In order to use Theorem 2 for practical purposes, first β 0 needs to be determined and then Ω1 , Ω2 . Estimation of β 0 would require knowledge of τ , and the estimation of Ω2 would require both τ and ψ, neither of which can be estimated using the GLM procedure. Hence the theorem is of theoretical value only. Based on Theorem 2 we can now derive the large sample distribution of the score function of the marginal p likelihood evaluated at δ̃ = (β̃, 0). Because all derivatives of b(·) are uniformly bounded and β̃ → β 0 , hence  √ √  √ n S1,n (β̃) − E(S1,n (β 0 )) = n (S1,n (β 0 ) − E(S1,n (β 0 ))) − JST n(β̃ − β 0 ) + op (1). Since n−1/2 Pn t=1 (yt − mt ḃ(xTnt β̃))xnt = 0 by definition of β̃, using Taylor expansion √ n 1 X √ et,β 0 xnt + op (1), n(β̃ − β 0 ) = Ω−1 1 n t=1 Then it follows that et,β 0 = yt − mt ḃ(xTnt β 0 ).  √  p n S1,n (β̃)) − E(S1,n (β 0 )) − (U1,n − JST U2,n ) → 0 where (19) n i 1 Xh 2 0 T 2mt (π (xnt β0 ) − ḃ(xTnt β 0 ))b̈(xTnt β 0 ) + mt b(3) (xTnt β 0 ) xnt n→∞ n t=1 JS = lim U1,n := √ n 1 X 2 n (S1,n (β ) − E(S1,n (β ))) = √ e 0 − Ee2t,β 0 ; n t=1 t,β 0 0 (20) n U2,n 1 X := √ et,β 0 cnt n t=1 (21) /Marginal Estimation of Binomial Time Series Mixed Models 8 ḃ(xTnt β0 + αt )g(αt , τ0 )dα andcnt = Ω−1 1 xnt , which is a non-random vector. √ 0 Then the CLT for n S1,n (β̃) − E(S1,n (β )) follows the CLT for the joint vector of (U1,n , U2,n ). Note note π 0 (xTnt β0 ) = R that both sequences of {U1,t } and {U2,t } are strongly mixing by Proposition 1 in Blais, MacGibbon and Roy (2000). Then the CLT for mixing process proposed in Davidson (1992) can be applied to show that (U1,n , U2,n ) is asymptotically normally distributed with mean zero and covariance matrix   VS Ω−1 1 KS −1 KST Ω−1 Ω−1 1 1 Ω2 Ω1 where Ω1 , Ω2 are given in Theorem 2, and  ! (n−1) n (n−1) X X 1X 2 2 Cov(et,β 0 , et+h,β 0 ) + VS := lim n→∞  n t=1 h=1 h=0 KS := lim  (n−1) X n→∞  h=0 n 1X E(et,β 0 e2t+h,β 0 )xnt n t=1 (n−1) ! + X h=1 ! n  1 X Cov(e2t,β 0 , e2t−h,β 0 )  n t=h+1 ! n  1 X E(et,β 0 e2t−h,β 0 )xnt  n t=h+1  √  d Theorem 3. Under the assumptions of Theorem 2, as n → ∞, n S1,n (β̃) − E(S1,n (β 0 )) /σS → N (0, 1). 3.3. An approximate mixture distribution for β̂ Theorem 4 (Mixture distribution under finite samples). Assume τ0 > 0, under Conditions 1 to 5, in finite √ samples, distribution of n(β̂ − β0 ) can be approximated with the mixture κF1 (c, δ0 ) + (1 − κ)F2 (c, δ0 ), κ = P (τ̂ = 0) √ in which F1 (c, δ0 ) is r-dimensional distribution obtained through n(β̂ − β 0 ), which is a skew √ multivariate 0 T normal distribution U2,n |U1,n + nE(S1,n (β )) − 2JS U2,n ≤ 0, based on the joint normality of (U1,n , U2,n ) √ given in Theorem 3; F2 (c, δ0 ) is a r-dimensional skew normal distribution n(β̂ − β0 )|τ̂ > 0, based on the −1 joint normality of N (0, Ω−1 1,1 Ω1,2 Ω1,1 ) in Theorem 1. Moreover, κ → 0 as n → ∞. Remarks 1. The skew normal distribution is defined in Gupta, González-Farıas and Domınguez-Molina (2004). 2. If τ0 = 0, β 0 = β0 and the √ value κ = 0.5 in the above mixture is similar to that in Moran (1971, Theorem I); when τ0 = a/ n, a ≥ 0, above results are parallel to those in Moran (1971, Theorem IV) and based on the same reasoning. However Moran’s results are for independence observations whereas our results require the serial dependence to be accounted for in the asymptotic results. 3. While the mixture provides a better theoretical description of the asymptotic distribution for marginal likelihood estimates when m is small, in practice, the mixture distribution cannot be estimated without knowing the true values of β0 , τ0 and ψ0 . In simulations, the covariance matrix for the joint distribution −1 of β̂ and τ̂ is approximated with Σ(δ0 ) = n−1 Ω−1 1,1 Ω1,2 Ω1,1 , and based on F2 (c, δ0 ), we calculate E(β̂ − β0 |τ̂ > 0) = Σβτ (δ0 )Σ−1 τ τ (δ0 )E(τ̂ − τ0 |τ̂ > 0) (22) −2 Var(β̂|τ̂ > 0) = Σββ (δ0 ) − Σβτ (δ0 )Σ−1 τ τ (δ0 )Στ β (δ0 ) + Σβτ (δ0 )Στ τ (δ0 )Στ β (δ0 )Var(τ̂ − τ0 |τ̂ > 0) (23) 4. Simulation Results In this section we summarize results of several simulation studies to illustrate the key theoretical results derived above as well as to indicate circumstances under which P (τ̂ = 0) is large in which case the mixture distribution of Theorem 4 would provide a more accurate description. /Marginal Estimation of Binomial Time Series Mixed Models 9 For all examples we consider the simple linear trend with latent process W0,t = β1 + β2 (t/n) + αt , in i.i.d which αt is assumed to be: αt = φαt−1 + t , t ∼ N (0, σ2 ) where σ2 is chosen to maintain Var(αt ) = 1. In all cases the true values are β0 = (1, 2) and τ0 = 1 and φ varies in the interval (−1, 1). While simple, this example provides substantial insights into the behaviour of the marginal likelihood estimates as well as into problems that can arise. The simplicity of this example also allows us to obtain analytical calculations of key quantities and to provide some heuristic explanations of the non-standard distribution results which can arise, particularly for binary time series. In all simulations reported later, the number of replications was 10, 000. The marginal likelihood estimates were obtained using the R package lme4. The frequency with which τ̂ = 0 is not package dependent other than the occasionaly case – this was checked using our own implementation based on adaptive Gaussian quadrature and by comparing the results with those from SAS PROC MIXED. The first simulation (Section 4.2) focuses on binary responses and illustrates that the distribution of marginal likelihood estimates δ̂ for this kind of data converge towards a mixture as proposed in Theorem 4, in which the P (τ̂ = 0) can be approximated using the result of Theorem 3 to good accuracy. The second experiment (Section 4.3) studies the finite sample performance of δ̂ for binomial cases and shows that P (τ̂ = 0) vanishes as mt increases or as n → ∞, thus the distribution of δ̂ is multivariate normal as developed in Theorem 1. Finally (Section 4.4) the method for estimation the covariance matrix for δ̂ proposed in Section 2.2, is evaluated. In order to implement the simulations in Section 4.1 we first derive some theoretical expressions for key quantities used to define the large sample distributions of Theorems 1, 2 and 3 as well as for the estimates κ̂1 and κ̂2 for P (τ̂ = 0). 4.1. Analytical Expressions for Asymptotic Quantities Key quantities required for implementation and explanation of the simulation results to follow are: (1). The limit point β 0 for the GLM estimate β̃. (2). cS and σS appearing in Theorem 3 and used to obtain the approximation κ̄1 for P (τ̂ = 0). (3). The asymptotic variance of τ̂ in Theorem 1 used to obtain the approximation κ̄2 for P (τ̂ = 0). (4). Various quantities defining the mixture distribution in Theorem 4. Throughout, the derivations are given for the case of deterministic regressors specified as xnt = h(t/n) for a suitably defined vector function h as in Condition 2a and in which the first component is unity in order to include the intercept term. Also, in order to reduce notational clutter we will assume that mt ≡ m (the number of binomial trials at all time points is the same). The analytical expressions involve various integrals which are computed using numerical integration either with the R-package integrate or using grid evaluation for u with mesh 0.0001 over the interval [0, 1]. Calculation of Ω1,2 in Theorem 1 and KS , VS and Ω2 in Theorem 3 to obtain the variance σS2 for the theoretical upper bound of P (τ̂ = 0) require evaluation of two-dimensional integrals of the form Cov(l˙t (δ0 ), l˙t+h (δ0 )) = mt m t+h X X π 0 (yt , yt+h )l˙t (δ0 )l˙t+h (δ0 ). yt =0 yt+h =0 For these, the integral expression for π 0 (yt , yt+h ) is approximated using adaptive Gaussian quadratic (AGQ) with 9 nodes for each of the two dimensions. 4.1.1. Limit Point of GLM Estimation By numerically solving the non-linear system (5) with Newton Raphson iteration the limiting value of the GLM estimates is β 0 = (0.8206, 1.7574). /Marginal Estimation of Binomial Time Series Mixed Models 10 4.1.2. Quantities needed for κ̄1 The analytical expression for the limiting expectation of the scaled score with respect to τ evaluated at the limiting point β 0 is. cS := lim E(S1,n (β 0 )) n→∞  Z  n  2 1X m(m − 1) ḃ(xTnt β0 + αt ) − ḃ(xTnt β 0 ) g(αt , τ0 )dαt + m(ḃ(xTnt β 0 ) − π 0 (xTnt β0 ))(2ḃ(xTnt β 0 ) − 1) = lim n→∞ n t=1 Z 1Z  2 ḃ(h(u)T β0 + α) − ḃ(h(u)T β 0 ) g(α, τ0 )dαdu =m(m − 1) 0 1 Z (ḃ(h(u)T β 0 ) − π 0 (h(u)T β0 ))(2ḃ(h(u)T β 0 ) − 1)du +m 0 =m(m − 1)c1 + mc2 . (24) Note that c1 in (24) is strictly positive but make no contribution for binary responses (when m = 1) in which case c2 is the only term contributing to cS . We have observed that c2 is non-negative, in the simulations but we do not have a general proof of that. In that case cS is also non-negative for all m. We have observed in the simulations that c1 is substantially larger than c2 and as a result κ̄1 is small for non-binary responses (m > 1) but can be large for binary responses because c2 ≈ 0. Recall that σS2 = lim Var(S1,n (β̃)). For the case where the latent process is i.i.d. we have n→∞ σS2 = Z 1   mπ 0 (h(u)T β0 )(1 − π 0 (h(u)T β0 )) 1 + 2(m − 3)π 0 (h(u)T β0 )(1 − π 0 (h(u)T β0 )) 0 +4m3 π 0 (h(u)T β0 )(1 − π 0 (h(u)T β0 ))(π 0 (h(u)T β0 ) − ḃ(h(u)T β 0 ))2 +4m2 π 0 (h(u)T β0 )(1 − π 0 (h(u)T β0 ))(1 − 2π 0 (h(u)T β0 ))(π 0 (h(u)T β0 ) − ḃ(h(u)T β 0 ))du −1 T −1 −2JST Ω−1 1 KS + JS Ω1 Ω2 Ω1 JS (25) in which Z KS = 1  0 mπ (h(u)T β0 )(1 − π 0 (h(u)T β0 ))(1 − 2π 0 (h(u)T β0 )) 0 i + 2m2 π 0 (h(u)T β0 )(1 − π 0 (h(u)T β0 ))(π 0 (h(u)T β0 ) − ḃ(h(u)T β 0 )) h(u)du Z 1h i JS = 2m2 (π 0 (h(u)T β0 ) − ḃ(h(u)T β 0 ))b̈(h(u)T β 0 ) + mb(3) (h(u)T β 0 ) h(u)du 0 similar expression of σS2 can be obtained for the dependent cases where ψ 6= 0. However, serial dependence does not appear to make much difference in the chance of τ̂ = 0 at least in the simulations of Section 4.3. For the simulation example of the binary response case (m = 1) the expressions (24), (25) can be evaluated using numerical integration to give c1 = 0.0168, c2 = 1.65 × 10−5 cS σS m=1 1.65 × 10−5 7.17 × 10−3 m=2 0.034 0.303 m=3 0.101 0.525 cS /σS 0.0023 0.1110 0.1921 √ Since cS is observed to be strictly positive for marginal likelihood, ncS → ∞ as n → ∞. By Theorem 3, the probability of S1,n (β̃) ≤ 0 vanishes as n → ∞. Because P (τ̂ = 0) is bounded above by P (S1,n (β̃) ≤ 0), as n → ∞, the marginal likelihood estimate will be such that τ̂ = 0 with vanishing probability. However, notice for binary data cS = c2 and cS /σS = 0.0023. Hence, even for the largest sample size (n = 5000) reported below, κ̄1 is 44%. It would require a sample size of 106 to reduce this to 1%. Clearly this has substantial /Marginal Estimation of Binomial Time Series Mixed Models 11 implications for the use of marginal likelihood for binary data. For binomial responses the c1 term dominates, and hence even with small values of m > 1 the chance of τ̂ = 0 reduces rapidly. We conclude this subsection with a heuristic explanation of why c2 ≈ 0. If h(u)T β 0 appearing in the definition of c2 is such that ḃ(h(u)T β 0 ) is well approximated linearly in h(u)T β 0 then c2 could be approximated by Z 1 c∗2 = [ḃ(h(u)T β 0 ) − π 0 (h(u)T β0 )](ao + a1 h(u)T β 0 )du. (26) 0 But, because the first element of h(u) is equal to 1, ao + a1 h(u)T β 0 can be rewritten as h(u)T β ∗ for some vector β ∗ . Then c∗2 can be written as c∗2 1 Z [ḃ(h(u)T β 0 ) − π 0 (h(u)T β0 )]h(u)T duβ ∗ = 0 = (27) 0 by definition of β 0 in (5). Note that ḃ(x) is the probability of success from a logit response and hence if x ranges over reasonably large values then ḃ(x) may be near linear. In the example used for simulations h(u)β 0 ranges over the interval (0.8206, 2.578) and ḃ(x) for x in this interval is well approximated by a straight line in x. 4.1.3. Asymptotic Covariance matrix for marginal estimates Although positive definite, Ω1,1 of the asymptotic covariance matrix in Theorem 1 can be near singular and √ this results in an overall covariance matrix for n(δ̂ − δ0 ) which has very large elements; in particular, the variance of δ̂ in (16) is very large and, as a result κ̄2 given in (16) will also be close to 50%. The reason for this will be analyzed in this section by calculating various components of the asympototic covariance for marginal estimates. To keep the discussion manageable the deterministic regressors, assumed to be generated by functions h(·) and to satisfy Condition 2a, will be used for the derivations. In this case, the summations on the left of (12) has limit given by the integral Z Ω1,1 = m 1X ˙ f (y|h(u), δ0 )l(y|h(u); δ0 )l˙T (y|h(u); δ0 )du (28) 0 y=0 in which ! R √ (y − mḃ(h(u)T β + τ z))f (y|h(u), z, δ)φ(z)dz · h(u) i ˙l(y|h(u); δ) = f −1 (y|h(u), δ) R h √ √ (y − mḃ(h(u)T β + τ z))2 − mb̈(h(u)T β + τ z) f (y|h(u), z, δ)φ(z)dz/2 where the first dimension corresponds to ∂l(y|h(u); δ)/∂β and the second dimension corresponds to ∂l(y|h(u); δ)/∂τ . For binary responses, using the facts that m ≡ 1 and y 2 = y, the component in ∂l(y|h(u); δ)/∂τ has √ √ √ √ (y − mḃ(h(u)T β + τ z))2 − mb̈(h(u)T β + τ z) = (y − ḃ(h(u)T β + τ z))(1 − 2ḃ(h(u)T β + τ z)). (29) √ Let W = h(u)T β + τ z, note for binary cases, (y −Rḃ(W ))f (y|h(u), z, δ) = b̈(W ) if y = 1 and −b̈(W ) if y = 0. ˙ δ) is Define conditional distribution ρ(z) = b̈(W )φ(z)/ b̈(W )φ(z)dz, then if h(u)T β appearing in l(y|h(u); such that the linearly approximation Z ∂l(y|h(u); δ)/∂τ = (1 − 2ḃ(W ))ρ(z)dz ≈ a∗0 + a∗1 (h(u)T β) = h(u)T β ∗ (30) R b̈(W )φ(z)dz ˙ is well established, then for each fixed u ∈ [0, 1] and δ, l(y|h(u); δ) is a nearly linear dependent vector. Consequently Ω1,1 becomes near singular with a large inverse. In this example h(u)T β0 takes all values in the interval (1, 3) over which the left side of (30) is approximately a straight line and hence, in view of the above discussion, and Ω1,1 has eigenvalues (0.129, 6.784 × 10−3 , 1.903 × 10−6 ), with στ2 (δ0 ) = 698. For binomial data, the properties of m > 1 and y 2 6= y and the left side of (29) is no longer a near linear function of h(u). As a result Ω1,1 is not nearly singular and στ2 (δ0 ) is of moderate size. /Marginal Estimation of Binomial Time Series Mixed Models 12 4.1.4. Quantities needed for mixture distribution To assess the accuracy of the asymptotic mixture distribution, the theoretical mean vector and covriance for the distributions F1 (·, δ0 ) and F2 (·, δ0 ) are required. For F1 (·, δ0 ) these are approximately as for the normal distribution in Theorem 2 for the GLM estimates. The mean is β 0 = (0.82, 1.76) given in Section 4.1.1. The covariance matrix   23.636 −39.8212 −1 −1 Ω1 Ω2 Ω 1 = −39.8212 98.13 is calculated using δ0 = 1 and β 0 , in Z Ω1 = 1 b̈(hT (u)β 0 )h(u)hT (u)du 0 and Z Ω2 = 1 h i π 0 (h(u)T β0 ) − 2π 0 (h(u)T β0 )ḃ(h(u)T β 0 ) + ḃ2 (h(u)T β 0 ) h(u)h(u)T du. 0 For F2 (·, δ0 ), the mean is evaluated with conditinoal mean (22) and covariance matrix (23). In this example Σ(δ0 ) = n−1 Ω−1 1,1 , where Ω1,1 is provided above. For binary data, E(τ̂ − τ0 |τ̂ > 0) and Var(τ̂ − τ0 |τ̂ > 0) are obtained empirically using Ω̂1,1 as follows: Ω̂1,1   Z n  1 X ˙ ∗ ˙T ∗ 0 0 ∗ −1 ∗ lt (δ )lt (δ ) + f (yt |xnt ; δ ) (yt − mt ḃ(Wt )) f (yt |xnt , zt , δ ∗ )φ(z)dz = 0 4τ1∗ n t=1 ) Z h i x  zt nt T ∗ ∗ −1 ∗ 2 ∗ (xnt , √ ∗ )f (yt |xnt , zt , δ )φ(z)dz − f (yt |xnt ; δ ) (yt − mt ḃ(Wt )) − mt b̈(Wt ) zt √ 2 τ 2 τ∗ where kδ ∗ − δ̂k ≤ kδ̂ − δ0 k but under finite samples δ ∗ 6= δ0 . Note that although for binary data, l˙t (δ) can be almost linearly dependent as analyzed above, the last part in Ω̂1,1 is nontrivial and nonsingular for δ ∗ 6= δ0 , which allows Ω̂1,1 to be nonsingular. As a result a large difference between theoretical and empirical covariance is observed for binary data, which will be shown in Example 2 of simulations. 4.2. Example 1: binary data, independent latent process This example considers the simplest case of independent observations obtained when τ0 = 1 and φ0 = 0. For each replication, an independent binary sequence of Yt |αt , xnt ∼ B(1, pt ), pt = 1/(1 + exp(−W0,t )), is generated. Table 1 reports the empirical values κ̂1 (the empirical proportion of S1,n (β̃) ≤ 10−6 ) and κ̂2 (the empirical proportion of τ̂ ≤ 10−6 ). Also shown are the empirical mean and standard deviation (in parentheses) of β̂ conditional on τ̂ = 0 and τ̂ > 0 obtained from the simulations along with the theoretical values of these obtained from (18), (16), and (22), (23) associated with Theorem 4. Table 1 clearly demonstrates that for this data generating mechanism there is very high proportion of replicates for which τ̂ = 0 and that this proportion does not decrease rapidly with sample size increasing. This is as predicted by theory and the theoretical values of κ̄1 and κ̄2 provide good approximations to κ̂1 and κ̂2 . As explained above, this high proportion of zero estimates for τ , even for large sample sizes, is as expected for the regression structure used in this simulation. Note that κ̄1 ≤ κ̄2 and κ̄1 is closer to the probability of τ̂ = 0. The estimations reverse the theoretical property that κ1 ≥ κ2 . For binary data, P (τ̂ = 0) and both theoretical approximations, κ̄1 and κ̄2 decrease slowly and a very large sample is required to attain P (τ̂ = 0) ≈ 0. It is also clear from Table 1 that the empirical mean and standard deviation of β̂|τ̂ = 0 and β̂|τ̂ > 0 show good agreement with the theoretical results predicted by Theorem 4. Overall, the theory we derive for P (τ̂ = 0) and the use of a mixture distribution for β̂ is quite accurate for all sample sizes, and with relatively large sample the mixture is a better representation. However, estimation of the corresponding distributions in the mixture requires β0 , τ0 and ψ0 and therefore cannot be implemented in practice. /Marginal Estimation of Binomial Time Series Mixed Models n = 200 n = 500 n = 103 n = 5 · 103 β̂|τ̂ = 0 0.82(0.344) 1.76(0.700) 0.82(0.217) 1.76(0.443) 0.82(0.154) 1.76(0.313) 0.82(0.069) 1.76(0.140) Theoretical β̂|τ̂ > 0 κ̄1 1.10(0.421) 48.70% 2.15(0.819) 1.05(0.269) 47.95% 2.07(0.521) 1.02(0.193) 47.10% 2.03(0.371) 0.97(0.093) 43.54% 1.95(0.174) κ̄2 49.20% 48.72% 48.20% 45.96% β̂|τ̂ = 0 0.83(0.354) 1.79(0.731) 0.82(0.219) 1.78(0.451) 0.82(0.156) 1.77(0.315) 0.82(0.069) 1.76(0.139) 13 Empirical from simulations β̂|τ̂ > 0 κ̂1 κ̂2 1.07(0.431) 45.56% 45.54% 2.26(1.020) 1.04(0.261) 46.27% 46.26% 2.10(0.621) 1.01(0.182) 45.52% 45.51% 2.06(0.415) 0.96(0.089) 42.93% 42.93% 1.96(0.184) Standard deviation in “()” Table 1 Mixture distribution of marginal likelihood estimates for binary independent time series 4.3. Example 2: binomial data, correlated latent process This simulation investigates bias and standard deviation of the marginal estimates for m = 1, 2, 3, n = 200, 500 and a range of serial dependence given by φ = −0.8, −0.2, 0, 0.2, 0.8. The observed standard deviation of the estimates over the replications is compared to that given by the asymptotic covariance matrix in Theorem 1. We also give the empirical proportion of the event that τ̂ = 0 using the proportion τ̂ ≤ 10−6 . The theoretical upper bound κ̄1 is approximated with κ̄1 defined in (18). Table 2 summarizes the results. For binomial series (m ≥ 2), the empirical values are in good agreement with the asymptotic mean and standard deviation with bias of the estimates generally improving with m or n increasing. Also observed for binomial series is that, both theoretically and empirically, the probability of τ̂ = 0 decreases quickly by increasing either the number of trials m or the sample size n. However, for binary responses, large asymptotic standard deviations are obtained for the reason explained in Section 4.1.3. In binary data, the probability of τ̂ = 0 is close to 50% and although theoretically this (κ̄1 ) will converges to zero as n → ∞, it is doing so slowly as n increases. This can be explained by Theorem 3. Under the settings −2 of this example, using AGQ, σS is calculated to vary from 0.72 × 10−2 to 1.55 of c1 √ × 10 and the values √ and c2 are the same as those in Example 1 and hence for, binary responses, ncS /σS is√at most 2 n × 10−3 across the range of autocorrelation considered here. Thus the large values of κ̄1 = Φ(− ncS /σS ) across the range of autocorrelations is to be expected for this regression structure. However, for binomial series with √ √ m = 2 and n = 200, φ = 0.8 for instance, σS ≈ 0.351, ncS is dominated by nm(m − 1)c1 = 0.475 which explains why P (τ̂ = 0) decreases rapidly with m > 1 and increasing n. Interestingly, for binary series, as n increases from 200 to 500 the bias of τ̂ worsens which seems somewhat counterintuitive. A plausible explanation for this is that the distribution of τ̂ is a mixture using weights P (τ̂ = 0), which is approximately 45% across sample size and serial dependence, and P (τ̂ > 0). When n = 200 the conditional distribution of τ̂ |τ̂ > 0 has larger variance than when n = 500 resulting in an inflated overall mean when n = 200 relative to n = 500. In summary, the theoretical upper bound (κ̄1 ) is above or close to the empirical proportion of P (τ̂ = 0), which is a pattern that is consistent with Theorem 3. For binomial series (m ≥ 2) the the marginal estimates have good bias properties and standard deviations explained by the large sample distribution of Theorem 1 and these conclusions are not severely impacted by the level or direction of serial dependence. For binary series, the high proportion of τ̂ = 0 is persistent regardless of n = 200, 500 or the level of serial dependence and this is explained by theory presented above. 4.4. Example 3: Estimate of Covariance Matrix The subsampling method of estimating the covariance for marginal likelihood estimates is of limited practical value for binary data because, firstly, when τ̂ = 0, which occurs nearly 50% of the time, the method does not provide estimates of the covariance matrix in Theorem 1 and, secondly, because of the high proportion of τ̂ = 0, δ̂ has the mixture distribution given in Theorem 4, the covariance of which requires β 0 and δ0 , both of which are unknown and cannot be estimated from a single sequence. In the binomial case (m ≥ 2) the subsampling method is likely to be useful for a range of serial dependence. Table 3 presents simulation results under various levels of serial correlation. The table summarizes the /Marginal Estimation of Binomial Time Series Mixed Models 14 n = 200 φ 0.8 0.2 0 -0.2 -0.8 β̂1 β̂2 τ̂ κ̂(κ̄1 ) β̂1 β̂2 τ̂ κ̂(κ̄1 ) β̂1 β̂2 τ̂ κ̂(κ̄1 ) β̂1 β̂2 τ̂ κ̂(κ̄1 ) β̂1 β̂2 τ̂ κ̂(κ̄1 ) m=1 Mean SD ASD 0.984 0.617 10.22 2.102 1.207 15.19 0.983 1.177 65.20 45.41%(49.44%) 0.953 0.433 7.90 2.071 0.949 11.84 0.898 1.026 50.55 45.08%(49.38%) 0.955 0.414 7.71 2.048 0.926 11.56 0.869 1.015 49.35 46.72%(49.37%) 0.958 0.408 7.58 2.049 0.913 11.39 0.880 1.017 48.57 45.78%(49.37%) 0.953 0.405 7.53 2.045 0.932 11.34 0.863 1.006 48.30 46.01%(49.40%) m=2 Mean SD ASD 0.994 0.525 0.516 2.046 0.975 0.942 0.960 0.790 0.821 11.06%(8.85%) 0.996 0.346 0.342 2.047 0.667 0.648 1.052 0.793 0.790 8.08%(7.15%) 1.007 0.331 0.327 2.032 0.634 0.623 1.063 0.786 0.789 7.25%(7.08%) 1.003 0.317 0.316 2.036 0.620 0.606 1.059 0.794 0.789 7.27%(7.07%) 0.995 0.306 0.303 2.038 0.623 0.603 1.047 0.794 0.812 7.92%(7.88%) m=3 Mean SD ASD 0.991 0.484 0.483 2.023 0.890 0.878 0.909 0.541 0.557 2.52%(3.00%) 0.992 0.293 0.292 2.027 0.563 0.553 0.993 0.518 0.510 0.86%(1.30%) 1.001 0.278 0.273 2.013 0.527 0.523 1.003 0.512 0.509 0.78%(1.24%) 0.999 0.261 0.261 2.014 0.511 0.504 1.004 0.516 0.510 0.8%(1.23%) 0.992 0.247 0.245 2.023 0.512 0.500 1.002 0.547 0.542 1.43%(1.91%) m=1 Mean SD ASD 0.948 0.373 6.58 1.992 0.737 9.77 0.785 0.866 41.96 44.77%(49.36%) 0.936 0.273 5.00 1.953 0.589 7.50 0.694 0.772 31.99 46.18%(49.32%) 0.938 0.263 4.87 1.959 0.572 7.32 0.708 0.767 31.21 45.18%(49.32%) 0.934 0.257 4.79 1.957 0.555 7.21 0.689 0.763 30.71 46.26%(49.32%) 0.929 0.253 4.76 1.962 0.570 7.18 0.681 0.768 30.57 47.10%(49.34%) m=2 Mean SD ASD 0.998 0.335 0.330 2.013 0.615 0.604 0.974 0.515 0.519 1.45%(1.68%) 1.000 0.217 0.216 2.012 0.412 0.410 1.011 0.492 0.499 0.93%(1.06%) 0.997 0.205 0.206 2.011 0.395 0.394 1.011 0.502 0.499 1.04%(1.04%) 1.000 0.202 0.200 2.013 0.389 0.383 1.014 0.493 0.499 0.7%(1.04%) 0.996 0.190 0.191 2.012 0.386 0.381 1.008 0.509 0.513 1.01%(1.31%) m=3 Mean SD ASD 0.998 0.311 0.309 2.001 0.573 0.563 0.956 0.35 0.352 0.07%(0.14%) 1.002 0.182 0.184 2.002 0.349 0.350 0.998 0.325 0.322 0%(0.02%) 0.999 0.173 0.172 2.005 0.333 0.331 0.996 0.321 0.322 0%(0.017%) 0.996 0.164 0.164 2.010 0.315 0.318 0.998 0.329 0.322 0.01%(0.017%) 0.996 0.156 0.155 2.011 0.319 0.317 0.997 0.344 0.343 0.02%(0.05%) n = 500 φ 0.8 0.2 0 -0.2 -0.8 β̂1 β̂2 τ̂ κ̂(κ̄1 ) β1 β̂2 τ̂ κ̂(κ̄1 ) β̂1 β̂2 τ̂ κ̂(κ̄1 ) β̂1 β̂2 τ̂ κ̂(κ̄1 ) β̂1 β̂2 τ̂ κ̂(κ̄1 ) Table 2 Marginal likelihood estimates for Binomial observations under various values of φ, where the true values are β10 = 1; β20 = 2; τ0 = 1. /Marginal Estimation of Binomial Time Series Mixed Models 15 m = 2, n = 200 φ = 0.8 φ = 0.2 φ = −0.2 φ = −0.8 β̂1 β̂2 τ̂ β̂1 β̂2 τ̂ β̂1 β̂2 τ̂ β̂1 β̂2 τ̂ ASD 0.515 0.942 0.821 0.342 0.648 0.790 0.316 0.606 0.789 0.303 0.603 0.812 SD 0.525 0.975 0.790 0.346 0.667 0.793 0.322 0.616 0.785 0.305 0.619 0.796 ASD 0.330 0.604 0.519 0.216 0.410 0.499 0.199 0.383 0.499 0.191 0.381 0.513 SD 0.330 0.607 0.507 0.217 0.418 0.493 0.199 0.387 0.503 0.191 0.387 0.513 kn = 5 0.392 0.734 0.824 0.333 0.637 0.829 0.313 0.604 0.831 0.300 0.592 0.842 kn = 11 0.406 0.755 0.811 0.316 0.605 0.814 0.296 0.570 0.816 0.283 0.562 0.834 kn = 23 0.387 0.719 0.784 0.284 0.545 0.786 0.265 0.511 0.786 0.255 0.508 0.808 kn = 46 0.325 0.606 0.733 0.235 0.447 0.729 0.221 0.420 0.729 0.214 0.419 0.750 m = 2, n = 500 kn = 7 kn = 14 kn = 28 kn = 56 0.261 0.275 0.271 0.242 φ = 0.8 0.487 0.510 0.501 0.451 0.506 0.501 0.490 0.469 0.210 0.204 0.192 0.169 φ = 0.2 0.400 0.388 0.364 0.321 0.503 0.497 0.486 0.465 0.197 0.190 0.179 0.159 φ = −0.2 0.378 0.365 0.343 0.303 0.505 0.500 0.490 0.469 0.188 0.182 0.171 0.152 φ = −0.8 0.372 0.361 0.340 0.302 0.514 0.511 0.502 0.481 Table 3 Subsampling estimates for standard deviation of GLMM estimation, kn = C[n1/3 ], C = 1, 2, 4, 8. β̂1 β̂2 τ̂ β̂1 β̂2 τ̂ β̂1 β̂2 τ̂ β̂1 β̂2 τ̂ estimates of standard deviation for δ̂ using the subsampling method described in Section 2.2. The column “ASD” contains the asymptotic standard deviation calculated with the covariance matrix in Theorem 1 and column “SD” contains empirical standard deviation. The table shows the subsampling estimates of standard deviations are of the same magnitude of theoretical standard deviations even for moderate sample size n = 200 but are biased downwards and increasingly so as C increases. Values of C = 1, 2 provide the least biased estimates for the standard errors for both sample sizes. Downwards bias is greater for large positive values of φ as might be expected. 5. Alternative to Marginal Likelihood Estimation We close with a discussion of the alternative approach for binary time series regression modelling proposed by Wu and Cui (2014). Their modified GLM (MGLM) method replaces exp(xTnt β)/(1 + exp(xTnt β)) in the GLM log-likelihood 4 with a function π(xTnt β) representing the marginal mean to arrive at the objective function Z T n X exnt β+αt l2 (β) = [yt log π(xTnt β) + (1 − yt ) log(1 − π(xTnt β))] , π(xTnt β) = g(αt )dα. (31) T 1 + exnt β+αt t=1 The MGLM estimateR β̂2 is found by iterating two steps starting with the GLM estimate of β: step 1, estimate the curve of π(u) = eu+α /(1 + eu+α )g(α)dα non-parametrically on u ∈ R; step 2, maximize l2 with respect to β, based on the estimate of π(u) obtained in the first step. Steps 1 and 2 are repeated and the iteration stops when the maximum value of l2 is reached and the last update of β is then regarded as the MGLM estimator. Implementation details are provided in Wu and Cui (2014). R In defining their method Wu and Cui (2014) do not require that π(u) = eu+α /(1 + eu+α )g(α)dα for any distribution g of the latent process. Hence it is not required that π(u) be non-negative and strictly increasing in u. However, their main theorem concerning consistency and asympototic normality of β̂2 is stated in terms /Marginal Estimation of Binomial Time Series Mixed Models 16 of this latent process specification. For such specifications, application of their non-parameteric method for estimating π(u) requires additional constraintsRwhich are not currently implemented. For example, taking the first derivative with respect to u, gives π̇(u) = eu+α /(1 + eu+α )2 g(α)dα ≤ π(u)(1 − π(u)) so π̇(u) ∈ [0, 0.25] by application of Jensen’s inequality. When applied to the Cambridge-Oxford Boat Race time series the non-parameteric estimate of π(u) is not monotonic and produces marginal estimates, at values of u between the gaps in the observed values of xTnt β̂2 , which are zero and therefore not useful for prediction at new values of the linear predictor. Although not implemented in the R-code of Wu and Cui (2014), this constraint as well as that of monotonicity can be enforced in the nonparametric estimation of p(u) using an alternative local linearization to that used in Wu and Cui (2014). For example, with constraints of monotonicity and π̇(u) ∈ [0, 0.25], different estimates β̂1 = 0.2093, β̂2 = 0.1899 (compared to β̂1 = 0.237, β̂2 = 0.168 in Wu and Cui (2014)) are observed for the model for the Cambridge-Oxford boat race series that they analyse. In this example, the marginal likelihood estimates give τ̂ = 0 and hence β̂ degenerates to GLM estimate which differs from that of Wu and Cui (2014). Somehow the marginal method (with or without monotonocity contraints) is avoiding the degeneracy issue that arises with the marginal estimation method proposed in this paper. This needs to be further understood. While MGLM is computationally much more intensive than using standard GLMM methods for obtaining the marginal estimates it appears to avoid degeneracy but for reasons that are not fully understood at this stage. Additionally, it is not clear the extent to which MGLM with or without the proper constraints implied by a latent process specification avoids the high proportion of degenerate estimates observed with GLMM for binary data. Additionally the extent to which MGLM reproduces the correct curve for the marginal probabilities π(u) when the true data generating mechanism is defined in terms of a latent process (parameter driven specification) has not been investigated. The extent to which the MGLM estimate of π(u) differs from the curve defined by a latent process specification might form the basis for a non-parametric test of the distribution of the latent process – when {αt } is not Gaussian, the true curve of π(u) is not the same with that evaluated under GLMM fits, and we may end up into different results for the estimates of β̂2 and β̂. 6. Discussion To overcome the inconsistency of GLM estimates of the regression parameters in parameter driven binomial models time series models we have proposed use of the marginal likelihood estimation, which can be easily conducted using the generalized linear mixing model fitting packages. We have shown that the estimates of regression parameters and latent process variation obtained from this method are consistent and asymptotically normal even if the observations are serially dependent. The distribution of the marginal estimates is required for a score test of serial dependence in the latent process something which we will report on elsewhere. The asymptotic results and proofs thereof have assumed that the latent process is Gaussian which has helped streamline the presentation. This is not required for all results except for Lemma 2 (asymptotic identifiability for the binary case) which relies directly on the normal distribution. The proofs can be readily p modified provided we assume that the moment generating function mαt (u) of αt is finite for all u < (d2 ) where τ < d2 defines the parameter space. The structure of the model considered here is such that the theoretical results apply to other response distributions such as the Poisson and negative binomial with very little change in the proofs of theorems. GLM estimation in these cases is consistent and asymptotically normal regardless of serial dependence in the latent process. The same will be true of the use of marginal estimation with the advantage that the latent process variability is also estimated. While we have not yet shown this, we expect that for these other response distributions the use of marginal estimation will lead to more efficient estimates of the regression parameters. For all response distributions and for moderate sample sizes the marginal estimation method can result in a non-zero probability of τ̂ = 0. As we have observed in simulations, and explained via theoretical asymptotic arguments, this is particularly problematical for binary responses with very high probabilities being observed (and expected from theory) for ‘pile-up’ probability for τ̂ . We have observed that for binomial data (m > 1) the ‘pile-up’ probability quickly decreases to zero and, as a result of this observation, we anticipate that this probability will not typically be large for Poisson and negative Binomial responses. /Marginal Estimation of Binomial Time Series Mixed Models 17 For binary data we have developed a useful upper bound approximation to this probability and subsequently proposed an improved mixture distribution for β̂ in finite samples. These theoretical derivations are well supported by simulations presented. While this mixture distribution cannot be used based on a single time series none-the-less it provided useful insights into the sampling properties of marginal estimation for binary time series. Additionally the derivations suggest that regression models in which xT β varies over an interval over which the inverse logit function is approximately linear will be particularly prone to the ‘pile-up’ problem and this persists even when there is strong serial dependence. Practitioners should apply the marginal likelihood method with caution in such situations. 7. Acknowledgements We thank Dr Wu and Dr Cui for providing us with the R-code for their application of the MGLM method to the Boat Race Data reported in Wu and Cui (2014). 8. Appendix: A Proof of Lemma 1. We consider the deterministic regressors only in this proof but the same arguments can be extended to stochastic regressors. Now M is the largest value of m for which kM > 0, so Q(δ) = Q(δ0 ) if and only if Z 1X M  π 0 (j, h(u)) log π(j, h(u)) − log π 0 (j, h(u)) du = 0 0 j=0 Since the integrand is non-positive the integrand can be zero if and only if the integrand is zero almost everywhere. Hence, for a contradiction, assume ∃δ 6= δ0 such that M X  π 0 (j, h(u)) log π(j, h(u)) − log π 0 (j, h(u)) = 0, ∀u ∈ [0, 1]. j=0 and this can only happen if π 0 (j, h(u)) = π(j, h(u)) for all j = 0, . . . , M . Since Z   √ √ M π(j, h(u)) = ḃ(h(u)T β + τ z)j (1 − ḃ(h(u)T β + τ z))M −j φ(z)dz j it is straightforward to show, by iterating from j = 0, . . . , M , that π 0 (j, h(u)) = π(j, h(u)) for all j = 0, . . . , M is equivalent to Z Z √ j √ T ḃ(h(u) β + τ z) φ(z)dz = ḃ(h(u)T β0 + τ0 z)j φ(z)dz, j = 1, . . . , M, (32) for any u ∈ [0, 1] T T We next √ show that the only way this can hold is if δ = δ0 . Fix u and denote a = h(u) β, a0 = h(u) β0 and σ = τ , h i h i dj (a, σ) = E ḃ(a + σz)j − E ḃ(a0 + σ0 z)j , j = 1, . . . , M. where expectation is with respect to the density φ(·). Hence (32) is equivalent to so that d1 (a0 , σ0 ) = d2 (a0 , σ0 ) = · · · = dM (a0 , σ0 ) = 0. Assume η0 = (a0 , σ0 ), if there exists η 6= η0 such that (32) holds, then there is kη ∗ − η0 k ≤ kη − η0 k such that h i h i     E ḃ(η ∗ )0 b̈(η ∗ ) E ḃ(η ∗ )0 b̈(η ∗ )z d1 (a, σ)  h i h i      ∗ 1 ∗ ∗ 1 ∗  d2 (a, σ)   2E ḃ(η ) b̈(η ) 2E ḃ(η ) b̈(η )z   v1 v1    ∗  = J(η ) (33) =   ..  v2  . . v2   . . .   . .  h i h i dM (a, σ) M E ḃ(η ∗ )M −1 b̈(η ∗ ) M E ḃ(η ∗ )M −1 b̈(η ∗ )z /Marginal Estimation of Binomial Time Series Mixed Models 18 where v1 = a − a0 and v2 = σ − σ0 cannot be zero at the same time when η 6= η0 , which is equivalent to the matrix J(η ∗ ) being of full rank. But J(η ∗ ) is not of full rank if and only if the ratios of the second column to the first column are the same for all j = 1, . . . , M . However, we now show that this ratio increases as j increases. Since ḃ(·) and b̈(·) are non-negative functions we can define probability densities gj (z) = R so that ḃ(a∗ + σ ∗ z)j−1 b̈(a∗ + σ ∗ z)φ(z) , ḃ(a∗ + σ ∗ z)j−1 b̈(a∗ + σ ∗ z)φ(z)dz j = 1, . . . , M h i R E ḃ(η ∗ )j b̈(η ∗ )z Egj (z ḃ(a∗ + σ ∗ z)) z ḃ(a∗ + σ ∗ z)g(z)dz i = R h = Egj (ḃ(a∗ + σ ∗ z)) ḃ(a∗ + σ ∗ z)g(z)dz E ḃ(η ∗ )j b̈(η ∗ ) where Egj () denotes expectation with respect to gj . But since ḃ(a∗ + σ ∗ z) is an increasing function of z, z and ḃ(a∗ + σ ∗ z) are positively correlated. Therefore, Egj (z) < Egj (z ḃ(a∗ + σ ∗ z))/Egj (ḃ(a∗ + σ ∗ z)) it follows that h i h i E ḃ(η ∗ )j−1 b̈(η ∗ )z E ḃ(η ∗ )j b̈(η ∗ )z h h i < i, E ḃ(η ∗ )j−1 b̈(η ∗ ) E ḃ(η ∗ )j b̈(η ∗ ) j = 1, . . . , M. Then when (32) holds, (33) has a unique solution of (0, 0) for (v1 , v2 ), which contradicts to the assumption that η 6= η0 . Thus (32) holds if and only if η = η0 , which implies a = a0 and σ = σ0 . By Condition 3, we can conclude that a = a0 for all u implies β = β0 . Therefore Condition 5 holds for M ≥ 2. Proof of Lemma 2. This proof considers the Fourier transform method used in Wang and Louis (2003). Assume ∃δ 6= δ0 such that ∀x ∈ X, Z Z √ 0 T π (1) = ḃ(x β0 + σ0 z)φ(z)dz = ḃ(xT β + σz)φ(z)dz = π(1), σ = τ . For connected X, the first derivative with respect to x of both sides are also the same, that is Z Z T b̈(x β0 + σ0 z)φ(z)dz · β0 = b̈(xT β + σz)φ(z)dz · β (34) which implies there exists a constant c1 > 0 such that c1 = βk /β0,k for k = 1, . . . , r, with η = xT β, c2 = σ/σ0 > 0, (34) can be rewritten as convolutions Z Z ex x2 1 √ g(u)h(η − u)du = c1 g(u)h(c1 η − c2 u)du; h(x) = exp(− ). , g(x) = (1 + ex )2 2σ02 σ0 2π let G(s) be the Fourier transform of the normal density g(·), H(s) be the Fourier transform of the logistic density h(·), using the fact that the Fourier transform of the convolution is the product of Fourier transform of each function,  Z Z G(s)H(s) = c1 φ(u)h(c1 η − c2 u)du e−iηs dη Z  Z = c1 φ(u) h(c1 η − c2 u)e−iηs dη du Z  Z = c1 φ(u) h(c1 η − c2 u)e−i(c1 η−c2 u)(s/c1 ) d(c1 η − c2 u) |c1 |−1 e−iu(c2 s/c1 ) du Z c1 = φ(u)e−iu(c2 s/c1 ) duH(s/c1 ) = G(c2 s/c1 )H(s/c1 ), c1 > 0. |c1 | /Marginal Estimation of Binomial Time Series Mixed Models 19 it follows that G(s)H(s) = G(c2 s/c1 )H(s/c1 ), ∀s ∈ R. The Fourier transform for the mean zero normal distribution is G(s) = exp(− 12 σ02 s2 ), and the Fourier transform for the logistic distribution is H(s) = 2πs/(eπs − e−πs ), thus for any s 6= 0, 1 1 1 = exp(− σ02 s2 exp(− σ02 s2 ) 2 sinh(πs) 2  c2 c1 2 ) 1 c1 sinh(πs/c1 ) for any fixed c1 6= 1, c2 can be expressed as a function of s and this function is not a constant over s, which contradicts to the definition of c2 . Hence the equality holds if and only if c1 = 1 and c2 = 1. 9. Appendix: B Proof of Theorem 1. This proof is presented in three steps: first, we show, for any δ ∈ Θ, that E(Qn (δ)) defined in (9) converges to Q(δ) defined in (10) and (11) under Condition 2a and 2b respectively; second, a.s that Qn (δ) − E(Qn (δ)) → 0 where Qn (δ) is defined in (8) from which, using compactness of the parameter √ a.s. d −1 space, it follows that δ̂ → δ0 ; third, that n(δ̂ − δ0 ) → N (0, Ω−1 1,1 Ω1,2 Ω1,1 ). a.s. Proof that E(Qn (δ)) → Q(δ): Use Jensen’s inequality multiple times we have    mt mt mt mt X X X X ln πt (j) − πt0 (j) ln πt (j) ≤  πt0 (j)  (− ln πt (j)) = − j=0 ≤− ≤ mt X j=0 j=0 j=0 j(xTt β) − mt (ln 2 + max(xTt β + τ /2, 0)) + c(j)  j=0 m t X    mt (ln 2 + τ /2) + mt |xTt β| − c(j) < mt (1 + mt ) ln 2 + τ /2 + |xTt β| (35) j=0 Pmt 0 then conditional on mt and xt , j=0 πt (j) ln πt (j) is bounded for all t and δ. Under Condition 2a, the regressor xnt := h(t/n) is nonrandom as is the marginal density πnt . Then the strong law of large numbers for mixing processes (McLeish, 1975) applied to {mt } gives   mt mt n X n X X X 1 1 0 0 lim πnt (j) log πnt (j) = lim E πnt (j) log πnt (j) = Q(δ) n→∞ n n→∞ n t=1 j=0 t=1 j=0 defined in (10). For Condition 2b the ergodic properties of the stationary processes mt and Xt can be used to establish   mt n X M m X X X X 1 nm  1 πt0 (j) log πt (j) = lim πt0 (j) log πt (j) = Q(δ) lim n→∞ n→∞ n n n m t=1 j=0 m=1 j=0 {t:mt =m} defined in (11). P∞ Consistency: We write (8) as Qn (δ) = n−1 t=1 qt (δ) where qt (δ) = log f (yt |xnt , δ). By Blais, MacGibbon and Roy (2000, Proposition 1), {qt (δ)} is strongly mixing for any δ ∈ Θ. To apply the strong law of large numbers for mixing process in McLeish (1975) we need to show that ∃λ ≥ 0 such that ∞ X kqt (δ) − Eqt (δ)k22+λ /t2 < ∞ t=1 where k · kp denotes the Lp norm. By Minkowski’s inequality and Hölder’s inequality, kqt (δ) − Eqt (δ)k2+λ ≤ 2 kqt (δ)k2+λ /Marginal Estimation of Binomial Time Series Mixed Models 20 using similar derivations |qt (δ)| P ≤ |−mt |xTnt β|+c(yt )−mt (ln 2+τ /2)| where mt is bounded. It P∞ as used 2in (35), ∞ 2 T 2 2 T suffices to establish t (δ)k2+λ /t < ∞ if t=1 |xnt β| /t < ∞. Under Condition 2a, {xnt β} is bounded P∞ t=1 kq 2 for any given β; t=1 1/t < 2, therefore the result follows. Under Condition 2b, we have Ekxk2 < ∞, given any β, for all ε > 0, ! n X |xTt β|2 /t2 ≥ K ≤ (2/K)E|xT β|2 ≤ ε, P if K ≥ 2E|xT β|2 /ε. t=1 Pn a.s. Then n−1 t=1 [qt (δ) − Eqt (δ)] → 0 for any δ ∈ Θ. Together with the first part of the proof given above a.s we now have Qn (δ) → Q(δ). Since Θ is a compact set, and Qn (δ) is a continuous function of δ for all n, by a.s. Gallant and White (1988, Theorem 3.3), δ̂ := arg max Qn (δ) → δ0 . Θ Asymptotic Normality: Using a Taylor expansion, √ n(δ̂ − δ0 ) = − the asymptotic normality of √ !−1 n n 1 X¨ ∗ 1 X˙ √ lt (δ ) lt (δ0 ), n t=1 n t=1 n(δ̂ − δ0 ) can be obtained if n − a.s. δ ∗ → δ0 n 1 X¨ ∗ p lt (δ ) → Ω1,1 n t=1 and 1 X˙ d √ lt (δ0 ) → N (0, Ω1,2 ). n t=1 Conditional on mt and xnt , {¨lt (δ)} is strongly mixing. Then by Chebyshev’s inequality and Ibragimov and Yu (1971, Theorem 17.2.3), ∃ > 0 such that n n 1X ¨ 1 X¨ p E(lt (δ)) → 0, lt (δ) − n t=1 n t=1 kδ − δ0 k ≤  Pn Pn a.s. a.s. Since δ ∗ → δ0 , and the continuity of ¨lt (·) with respect to δ, n−1 t=1 ¨lt (δ ∗ ) − n−1 t=1 ¨lt (δ0 ) → 0, P P a.s. n n and n−1 t=1 ¨lt (δ0 ) − n−1 t=1 E(¨lt (δ0 )) → 0. Now E(¨lt (δ0 )) = E(l˙t (δ0 )l˙tT (δ0 )), and hence it follows that P p n−1 t=1 ¨lt (δ ∗ ) → Ω1,1 . Next we show that Ω1,1 is positive definite. Let s = (s1 , s2 ) be an (r + 1) dimensional constant vector, without lose of generality, sT s = 1. Define qt (δ0 ) = sT l˙t (δ0 ), note det(Ω1,1 ) ≥ 0 and det(Ω1,1 ) = 0 only if  2 E qt (δ0 )|mt , xnt = 0 for all t. Then under Condition 3, Ω1,1 is positive definite. The limit, Ω1,1 , under Condition 2a is given in (28). For stationary regressors such limit can be easily obtained using ergodic theorem. Next we show Ω1,2 exists. Note ! n−1 n X 1 X √ qt (δ0 ) = n t=1 Ω1,2 = lim Var n→∞ h=0 ! n−1 n−h X 1 X Cov(qt (δ0 ), qt+h (δ0 )) + n t=1 h=1 n 1 X Cov(qt (δ0 ), qt−h (δ0 )) n t=h+1 then Ω1,2 exists if lim n→∞ n−1 X h=0 ! n−h 1 X |Cov(qt (δ0 ), qt+h (δ0 ))| < ∞, n t=1 lim n→∞ n−1 X h=1 ! n 1 X |Cov(qt (δ0 ), qt−h (δ0 ))| < ∞. n t=h+1 Since the {qt (δ0 )} is strong mixing, by Theorem 17.3.2 in Ibragimov and Yu (1971), ! n−1 n−1 X 1 n−h X X |Cov(qt (δ0 ), qt+h (δ0 ))| ≤ 2 ν(h)λ/(2+λ) Wh < ∞, n t=1 h=0 h=0 ! /Marginal Estimation of Binomial Time Series Mixed Models 21 where n−h  1 X 1+λ 4 + 3(ct c1+λ ct+h ) , t+h + ct n→∞ n t=1 Wh = lim ct ≥ kqt (δ0 )k2+λ Such ct exists, for example, take λ = 2, use Cauchy-Schwarz’s inequality, Z   4  4 T −1 E |qt (δ0 )| |mt , xnt ≤ E f (yt |xnt , zt , δ0 )φ(zt ) (yt − mt ḃ(W0,t ))(s1 xnt + s2 zt ) dz · f (yt |xnt , δ0 ) h i = E mt b̈(W0,t )(1 + (3mt − 6)b̈(W0,t ))(sT1 xnt + s2 zt )4 |mt , xnt Then by the application of CLT for mixing process in Theorem 3.2, Davidson (1992) we will have Pn d n−1/2 t=1 l˙t (δ0 ) → N (0, Ω1,2 ). Proof√of Theorem 2. Following the proof of Davis, Dunsmuir and Wang (2000) and Wu and Cui (2014), let u = n(β − β 0 ) (note here we centre on β 0 and not the true value β0 as was done in these references). Then maximizing n X ln (β) = [yt (xTnt β) − mt b(xTnt β) + c(yt )] t=1 √ over β is equivalent to minimizing gn (u) over u where gn (u) := −ln (β 0 +u/ n)+ln (β 0 ). Let û = arg min lim gn (u). n→∞ Write gn (u) := Bn (u) − An (u) where Bn (u) := n X  √ √  mt b(xTt β 0 + xTt u/ n) − b(xTt β 0 ) − ḃ(xTt β 0 )xTt u/ n t=1 and n 1 X An (u) := uT √ (yt − mt ḃ(xTt β 0 ))xt = uT Un . n t=1 Using similar procedures as in the proof of Theorem 1. in Wu and Cui (2014) it is straightforward to show Bn (u) → and 1 T u Ω1 u 2    T  1 T is Un E e = exp − s Ω2 s . 2 for each u. Since gn (u) is a convex function of u and ûn minimizes gn (u), then an application of the functional d limit theory gives ûn → û, where û = arg min lim gn (u). In conclusion, n→∞ d gn (u) → g(u) = 1 T u Ω1 u − uT N (0, Ω2 ) 2 d −1 on the space C(Rr ), and ûn → û, where û ∼ N (0, Ω−1 1 Ω2 Ω1 ). Proof of Theorem 3. Since S1,n (β̃), a linear function of U1,n and U2,n , to show that  √  n S1,n (β̃) − E(S1,n (β 0 )) is normally distributed it is sufficient to show that the the joint distribution of (U1,n , U2,n ) is multivariate normal. As defined in (21), n 1 X 2 U1,n := S1,n (β 0 ) − E (S1,n (β 0 )) = √ e 0 − Ee2t,β 0 ; n t=1 t,β n n 1 X 1 X U2,n := Ω−1 et,β 0 xnt = √ et,β 0 cnt 1 √ n t=1 n t=1 where cnt = Ω−1 1 xnt , defines a sequence of non-random vectors. Let Unt = (U1,nt , U2,nt ) be the joint vector at time t, then each dimension of {Unt } is uniformly bounded, strongly mixing and E(Unt ) = 0. We need to prove that a1 U1,n +aT2 U2,n has normal distribution for arbitrary /Marginal Estimation of Binomial Time Series Mixed Models 22 constant vector a = (a1 , a2 ) where aT a = 1 without loss of generality. By the SLLN for mixing process in McLeish (1975), there exists a limiting matrix ΩU such that ! n−1 ! n n−1 n X X n−h X X X T T T Var( a Unt ) = a Cov(Unt , Un,t+h )a + a Cov(Unt , Un,t−h )a → aT ΩU a. t=1 t=1 h=0 h=1 t=1+h Then conditions of the CLT of Davidson (1992) are satisfied, and we have Pn t=1 d Unt → N (0, ΩU ). Proof of Theorem 4. This proof follows Moran (1971). δ0 is the true value of the parameters, δ 0 = (β 0 , 0) is the limit of parameters that maximize (7) for fixed τ = 0; δ̂ is the maximum likelihood estimators of (7). Consider first the distribution of δ̂ if τ̂ > 0. Since the unconditional joint distribution of β̂ and τ̂ is −1 multivariate normal with N (0, Ω−1 1,1 Ω1,2 Ω1,1 ) – see proof of Theorem 1, hence F2 (c, δ0 ), the distribution of √ −1 n(β̂ − β0 )|τ̂ > 0 is skew normal based on N (0, Ω−1 1,1 Ω1,2 Ω1,1 ). When τ̂ = 0, use a Taylor expansion to the first derivatives around δ 0 , then √ conditional on n−1/2 n Pn n(β̂ − β 0 ) = !−1 n n 1 X¨ 0 1 X ∂lt (δ 0 ) √ − lt (δ ) + op (1), n t=1 n t=1 ∂β ∂lt (δ 0 )/∂τ < 0. As n → ∞, Pn !    √1 e 0x n h t=1 t,β nt Ω2 0 d i Pn → N( , 0 T 1 2 T 0 √ E(S (β ))/2 K 1,n S /2 t=1 et,β 0 − mt b̈(xt β ) 2 n t=1 1 X ∂lt (δ 0 ) √ = n t=1 ∂δ  KS /2 ) VS /4 References Blais, M., MacGibbon, B. and Roy, R. (2000). Limit theorems for regression models of time series of counts. Statistics & probability letters 46 161–168. Cox, D. R. (1981). Statistical analysis of time series: some recent developments. Scandinavian Journal of Statistics 8 93–115. Davidson, J. (1992). A central limit theorem for globally nonstationary near-epoch dependent functions of mixing processes. Econometric theory 5 313–329. Davis, R. A., Dunsmuir, W. T. and Wang, Y. (2000). On autocorrelation in a Poisson regression model. Biometrika 87 491–505. Davis, R. A. and Dunsmuir, W. T. M. (2015). State Space Models for Count Time Series. CRC MONOGRAPHS. Davis, R. A. and Wu, R. (2009). A negative binomial model for time series of counts. Biometrika 96 735–749. Dunsmuir, W. T. M., Tran, C. and Weatherburn, D. (2008). Assessing the Impact of Mandatory DNA Testing of Prison Inmates in NSW on Clearance, Charge and Conviction Rates for Selected Crime Categories. NSW Bureau of Crime Statistics and Research. Gallant, A. R. and White, H. (1988). A unified theory of estimation and inference for nonlinear dynamic models. Basil Blackwell New York. Gupta, A. K., González-Farıas, G. and Domınguez-Molina, J. A. (2004). A multivariate skew normal distribution. Journal of Multivariate Analysis 89 181–190. Heagerty, P. J. and Lumley, T. (2000). Window subsampling of estimating functions with application to regression models. Journal of the American Statistical Association 95 197–211. Ibragimov, I. A. and Yu, V. L. (1971). Independent and stationary sequences of random variables. WoltersNoordhoff. McLeish, D. L. (1975). A maximal inequality and dependent strong laws. The Annals of probability 3 829–839. /Marginal Estimation of Binomial Time Series Mixed Models 23 Moran, P. A. (1971). Maximum likelihood estimation in non-standard conditions. Mathematical Proceedings of the Cambridge Philosophical Society 70 441–450. Neuhaus, J. M., Kalbfleisch, J. D. and Hauck, W. W. (1991). A comparison of cluster-specific and population-averaged approaches for analyzing correlated binary data. International Statistical Review/Revue Internationale de Statistique 59 25–35. Wang, Z. and Louis, T. A. (2003). Matching conditional and marginal shapes in binary random intercept models using a bridge distribution function. Biometrika 90 765–775. Wu, R. (2012). On variance estimation in a negative binomial time series regression model. Journal of Multivariate Analysis 112 145–155. Wu, R. and Cui, Y. (2014). A PARAMETER-DRIVEN LOGIT REGRESSION MODEL FOR BINARY TIME SERIES. Journal of Time Series Analysis 35 462-477.
10math.ST
JSC : A JavaScript Object System Artur Ventura [email protected] arXiv:0912.2861v1 [cs.PL] 15 Dec 2009 January 20, 2018 Abstract The JSC language is a superset of JavaScript designed to ease the development of large web applications. This language extends JavaScript’s own object system by isolating code in a class declaration, simplifying multiple inheritance and using method implementation agreements. 1 Motivation As web applications have been gaining more dynamic behavior, JavaScript has become more important in web development. As such, it is useful to use a software engineering aproach to JavaScript. JavaScript object-oriented model is prototype-based. This model can be extremely versatile to develop. However, in a large team of developers, not only problems such as name colisions and unintentional method redefinition can occur, but also maintenance becomes an issue. JSC attempts to remedy some of these issues by implementing a Object System on top of standard JavaScript. 2 Related Work There have been some attemps to add structed programming to Javascript. In ECMAScript (language from witch JavaScript is a dialect) last version were added support for defining classes. Another dialect of ECMAScript, ActionScript supports defining classes. Althought those systems are more advanced (they support typechecking via anotation on variables, generics, dynamic classes, templates, etc.), they aren’t avaible in the current browsers. It’s expected that future versions of JavaScript extends this behavior from ECMAScript. Other attempt have been creating creating supersets to JavaScript. One example of this is Objective-J. This is a sctrict superspet of Javascript, but adds a object system by implementing a language similar to Objective-C. This aproach is similar to JSC, but this language uses the same message passing than Objective-C making the methods unparsable by JavaScript. 1 3 Object Oriented JavaScript In JavaScript, a class is a function, so its definition is similar to the definition of a function, as shown next: function Rectangle(w, h) { this.width = w; 3 this.height = h; 4 } 1 2 A function in javascript is of type Function but behaves similarly to a hash or a dictionary. One of the properties in this object is the prototype. This property represents a structure that is not yet fully defined and it is only formed when it is instantiated. Instantiation can be done by: new Rectangle(10,10); new operator will invoke the function Rectangle with this as a new object with a reference to Rectangle.prototype, and return this object1 .Any changes made to this object will only afect the new object, and not the prototype. If a property is not defined in the object but on the prototype, then the prototype’s value is returned. A method can be defined by adding a function to the class prototype as shown next: 1 2 3 Rectangle.prototype.getArea = function (){ return this.height * this.width; } Methods are called like this: rectangle.getHeight() As with the constructor, getHeight will be invoked with this as a reference to the instance, in this case to rectangle. This method will be avaible to all instances that don’t define localy the method getArea. The code below shows how inheritance is implemented: by copying the prototype of the superclass to the subclass. 1 2 3 4 5 6 7 function PositionedRectangle(x, y, w, h) { Rectangle.call(this, w, h); this.x = x; this.y = y; } PositionedRectangle.prototype = new Rectangle(); 1 Actually Rectangle could return anything, but the default is this 2 3.1 Problems The first problem is the inexistence of seperation between functional and object oriented programming. All the examples shown are extensions to JavaScript’s functional programming that allows to create a behavior similar to object oriented. Another problem is that today browsers share the same enviroment will all JavaScript files. It’s possible to have the same method defined in two distinct files. This can difficult debugging and maintenance. 4 Objectives JSC is an extension to JavaScript and was developed with the following goals in mind: • Create a new object-oriented language, but keep (as much as possible) JavaScript’s syntax and semantics. • Provide mechanisms to maintain the code isolated in packages. • Provide a meta-object protocol that allows an easy use of reflection and intersection, while keeping the code organized. • Provide simple and easy to use multiple inheritance. • Provide an implementation agreement between classes, which is similar to Java’s interfaces or to Objective-C’s protocols. 5 JSC 5.1 Class Definition JSC is defined in classes. Each class is defined in a single file. A simple JSC Class is show next: 1 2 3 4 5 6 7 8 9 10 11 12 package UI.Component; class Rectangle{ slots:[height,width], Rectangle: function (w,h){ this.setHeight(h); this.setWidth(w); }, getArea: function (){ return this.getHeight() * this.getWidth(); } } Each class begins with a package declaration. A class is always referred to by its package and class name (in this case UI.Component.Rectangle). The body of the class is declared as a JavaScript Object. The fourth line represents 3 the slot declaration. In JSC, class slots can’t be directly used. To access a slot, a getter and setter method is provided for each slot. The fifth and ninth lines declare a constructor and a method, respectively. A constructor is a method with the same name of the class. A constructor is not required, but there can be only one by class. It is important to notice that only the class header and the slot definition aren’t capable of being parsed by JavaScript. 5.2 Instantiation JSC attempts to minimize the usage of the global enviroment. Actually, the only global definition required is the function Class. This function expects a string with the canonical class location (package and name), and returns the meta-object representing such class. In our example, Rectangle’s meta-class can be obtained by: Class("UI.Component.Rectangle") In runtime, each meta-class contains, among others, a method called create. This method will create a new instance and call the class constructor. With this, we can now instantiate our Rectangle class: Class("UI.Component.Rectangle").create(10,10) 5.3 Inheritance Inheritance can be used by extending the superclass as shown next: 1 2 3 4 package UI.Component; class PositionedRectangle extends UI.Component.Rectangle{ slots:[x,y], 5 PositionedRectangle: function (x,y,w,h){ 6 Class("UI.Component.Rectangle").init(this,w,h); 7 8 9 10 11 this.setX(x); this.setY(y); } } Inheritance in JSC works like mixins. Each class method and slot from the superclass will be added to the subclass. A class can extend from several classes. In PositionedRectangle both the height and with slot, getters and setters from Rectangle were copied. The token extends insted of mixin was used because makes the class header similar to ECMAScript V4 and Java’s. Each meta-class object contains a init method that calls the constructor for that class, using the first argument as the instance. This is similar how Python’s superclass constructor is called. 4 5.4 Static Enviroment Each JSC class can declare methods that can be used on a meta-class level. A simple example is shown next: 1 2 3 4 5 6 package Main; class App { static:{ main: function (args){ ... 7 } 8 } 9 } 5.5 Protocols A protocol in JSC assures the existence of certain methods. A protocol declaration is shown next: 1 2 3 4 package UI.Component; protocol Draggable { element: true, 5 eventListener: false 6 } In our example Draggable declares the existence of two methods, element and eventListener. The keyword next to the method name declares the need to implement it. true declares that this method is required to be implemented in each class that extends this protocol while false guarantees that if such method is not implemented, an empty function with such name will be provided. A protocol can be extended only from other protocols, and a class can implement any number of protocols. The verification of required methods is done both in run- and compile-time. 5.6 Class initialization When JSC starts2 , all classes in the classpool are going to be initialized. This is done by invoking the meta-class method classInit. This method will compute the effective set of methods and slots that this class possesses, and it will detect if all the protocols have been satisfied. Finally, it will setup the prototype. 2 See Usage for more details 5 5.7 Runtime intersection It is possible to create a new class/protocol, or change a class/protocol by altering the meta-class definition, in any moment during execution. However, it is required to call again classInit so that the prototype is reconstructed. It’s also possible to extend the behavior of JSC by extending the lang.Class class. Protocols is one example of this, but it’s quite simple to implement something similar to java’s abstract classes in JSC. 6 Current Problems 6.1 Global Variables JSC attempts to minimize the usage of the global enviroment by encapsulating the code into classes. However, However, JavaScript allows the declaration of gobal variables from within a function.. Any variable that is declared without the keyword var is declared in the global enviroment. For instance: 1 2 3 4 function Foo(){ var local = 1; global = 1; } Currently, this is not allowed in JSC, but it is not verified. 6.2 Slot default value Currently, the slot declaration doesn’t allow a slot to have a default value. It would be nice to have a slot declaration similar to this: 1 2 3 4 5 6 7 8 package Bar; class Foo{ slots:{ aSlot:{ getter:"getSlot", setter:"setIt", default:1 }, anotherSlot: { default: Class("Baz.Bing").create(1,2) } } } Currently, JSC doesn’t support this syntax because there isn’t a easy to use parser of JavaScript available. The JSC compiler assures the correctness of the code by loading the methods into a JavaScript Engine and detecting the parsing errors generated.3 When such parser is available, both this and the Global Variables problem can be addressed. 3 jscc (JSC Compiler) currently uses Google’s V8 Engine 6 7 Usage The current compiler can target 3 usage methods: • Server - JSC was developed due to a need for developing a lot of code to run in a web server. In this mode, the code is loaded into a RDBMS and loaded upon need. • Client - Another usage is generating a single classpool image in a self contained JavaScript file and load it in a browser like an ordinary JavaScript file. The JSC code can be accessed from other JavaScript files by using Class function. • JSC Virtual Machine - jscvm is a small virtual machine implementation of JSC. 8 Performance A small library, implemented in JSC and with 19 files, occupies 196 KB. After compilation targeting the browser ended with a single file occupying 56KB. This file takes from below a second in Chrome and up to 2 seconds in Firefox. After using the YUI Compressor4 this file shrinked to 40Kb. It almost loaded instantaneously both in Chrome and Firefox. 4 YUI Compressor is available at http://developer.yahoo.com/yui/compressor/. This application not only removes whitespaces, but also reduces the variable names. 7
6cs.PL
Mean and Variance of Phylogenetic Trees 1 David Daniel G. Brown1 and Megan Owen2 arXiv:1708.00294v1 [q-bio.PE] 1 Aug 2017 R. Cheriton School of Computer Science, University of Waterloo, Waterloo, ON, N2L 3G1, Canada; 2 Department of Mathematics, Lehman College - City University of New York, New York, NY, 10468, USA Corresponding author: Megan Owen, Department of Mathematics, Lehman College, City University of New York, 250 Bedford Park Blvd West, Bronx, NY, 10468, USA; E-mail: [email protected]. Abstract.— We describe the use of the Fréchet mean and variance in the Billera-Holmes-Vogtmann (BHV) treespace to summarize and explore the diversity of a set of phylogenetic trees. We show that the Fréchet mean is comparable to other summary methods, despite its stickiness property, and that the Fréchet variance is faster and more precise than commonly used variance measures. These mean and variance measures are more theoretically justified, and more robust, than previous estimates of this type, and can be estimated reasonably efficiently. This leads to applications such as mean hypothesis testing. (Keywords: phylogenetics, treespace, Fréchet mean, Fréchet variance, two-sample test ) Sets of related phylogenetic trees are commonly encountered in evolutionary biology. For example, one might encounter such a set as the output of an inference program like MrBayes Ronquist et al. (2012), or as a set of gene trees on some given set of species. For this paper, we think of any such set as being a sample from an underlying distribution on the set of all phylogenetic trees with a fixed leaf set. Here, we consider a mathematically-founded basis for describing the mean of such a distribution, using the representation of trees as elements of a geometric space and looking for the Fréchet mean: the tree that minimizes the sum of the squared distance between the mean and the elements of a sample from the distribution. This formulation also allows the identification of the Fréchet variance, which is the actual sum of the squared distances between the sample elements and the Fréchet mean. We describe algorithms for computing the Fréchet mean and variance. They are fairly efficient to compute, and we show that the mean gives a good way of summarizing the uncertainty found in a set of trees. A particularly nice property of the mean is that it may result in a non-fully-articulated tree, but does so in a statistically appropriate way. We also describe computation of the variance. The Fréchet variance is a better measure of statistical uncertainty than simpler measures (like the number of topologies found in a set of trees), and is faster to compute than the sum of all pairwise distances between trees, for a large set of trees. Our results show that the treespace-based measure of phylogenetic distance that originated with Billera et al. (2001) can in fact be used in practical applications. Background We begin by describing the treespace in which we are working, and some properties of that space and its distance measure. We also consider other ways of summarizing a collection of trees besides the Fréchet mean and variance, and some of their properties. Treespace The Billera-Holmes-Vogtmann (BHV) treespace, Tn , (Billera et al. 2001) contains all unrooted phylogenetic trees with edge lengths and a given set of n + 1 labelled leaves. For this paper, we fix the set of leaf labels to be {0, 1, ..., n}. Any of these trees can be thought of as rooted by fixing leaf 0 as the root. In this paper, we will defined the BHV treespace as a subspace of RN , where N = 2n − 1 is the number of possible splits on n + 1 leaves, or equivalently, the number of possible partitions of the set of leaves into two sets, each of size at least 1. Each coordinate of RN corresponds to a different split, where the order of the splits does not matter, but is fixed. Note that by allowing partitions of size 1, we include splits corresponding to edges ending in leaves. The original definition Billera et al. (2001) ignores these edges, but notes that they can be included, as we have done here. Given a tree T with n + 1 leaves and edge lengths, it corresponds to the following vector in RN : for every edge e in T with length |e|T , let the coordinate corresponding to the split induced by e be |e|T . Let the coordinates corresponding to splits not induced by edges in T be 0. Let Tn be the set of vectors in RN that correspond to trees, as just described. Not all non-negative vectors in RN correspond to trees due to split incompatibility. Two splits are incompatible if they cannot be induced by edges existing in the same tree. For example, a cherry is a pair of adjacent leaves in a tree, and the corresponding split separates the two adjacent leaves from all others. No tree with n ≥ 4 can have both {1, 2} and {1, 3} as cherries, so the corresponding splits {1, 2}{0, 3, 4, ..., n} and {1, 3}{0, 2, 4, 5..., n} are incompatible, and no vectors in Tn have+ positive values in both these coordinates. The topology of a tree is the set of all splits induced by the edges of that tree. A binary tree, in which all interior nodes have degree 3, contains 2n − 1 splits, while degenerate or non-binary trees will contain fewer than 2n − 1 splits. See Figure 1. For more details, including a combinatorial description of the space, see Billera et al. (2001). There is a distance metric associated with the BHV treespace called the BHV distance or the geodesic distance, which was also defined in Billera et al. (2001). Consider all trees in Tn with the same topology. Because these trees all correspond to the same set of splits, their vectors have exactly the same set of non-zero coordinates, which can take on any positive values. Thus, if the number of non-zero coordinates is d, this set of trees corresponds to a d-dimensional Euclidean orthant, which is the non-negative part of Rd . TT 4n 4n 0 0 A A B B C 0 D C AB0 | CD 0 D A B C D 0 0 0 A0|BCD AB|CD0 T’1 B C D AD0 | BC 0 A (a) C 0 B C C D D A 0 ABC|D0 D B D C A B T2 T1 D B AB|CD0 T’2 A A C A A ABD|C0 D B C B 0 AB0 | CD D ABC|D0 C A B (b) Figure 1: (a) Five and (b) three of the fifteen orthants in the Billera-Holmes-Vogtmann (BHV) treespace T4 . For ease of visualization, the five dimensions corresponding to the leaf edges are not included. Thus, each binary tree topology is represented by a quadrant (2-dimensional orthant), with the two quadrant axes corresponding to the lengths of the interior edge splits. The axis between two quadrants corresponds to a tree topology that is not fully resolved. The geodesic (shortest) path between two trees is shown by a dashed line and may pass through different orthants depending on the branch lengths of the endpoint trees, as shown by the geodesics between T1 and T2 and between T10 and T20 . When the tree topology is binary, d = 2n − 1. For any two trees with the same topology, the BHV distance is the Euclidean distance between their corresponding vectors in that orthant. For two trees with different topologies, the BHV distance is the length of the shortest path between them that remains in the treespace. The length of any path can be computed by calculating the Euclidean distance of the path restricted to each orthant that it passes though, and summing these lengths. The shortest path is called a geodesic, and will pass from one orthant to the next orthant through lower-dimensional boundaries corresponding to trees with fewer splits. See Figure 1 for an example of two geodesics in T4 . The BHV treespace is connected, since for any two trees are connected by a path through the origin. This may or may not be the geodesic. Billera et al. (2001) showed that the BHV treespace is globally non-positively curved (Bridson and Haefliger 1999), which implies that geodesics are unique. Owen and Provan (2011) gave a polynomial time algorithm for computing the geodesic distance between two trees that runs in O(n4 ) time, but which is faster for trees with common splits. Note that if the L1 metric, which is also known as the Manhattan or taxicab metric, is used in each orthant instead of the L2 or Euclidean metric, then the length of a (no longer unique) geodesic between two trees is the same as the weighted Robinson-Foulds distance (Robinson and Foulds 1979) between them (see St. John (2017) for a good summary). Mean and variance In Euclidean space, the Fréchet mean, or centre of mass, is the point minimizing the sum of the squared distances to the sample points, and is equivalent to the coordinate-wise average of the sample points. The Fréchet mean was similarly defined for treespace by Miller et al. (2015) and Bačák (2014), independently. For a set of sample trees {T Pr1 , T2 , ..., Tr2}, the Fréchet mean, or simply, mean, is the tree t which minimizes i=1 d(t, Ti ) , where d(·, ·) is the BHV distance between the two trees. The Fréchet variance, or simply variance, is that minimum sum of squared distances. This mean is unique because treespace is non-positively curved. Both Miller et al. (2015) and Bačák (2014) gave an algorithm for approximating the mean and variance based on the Law of Large Numbers for non-positively curved space derived by Sturm (2003). We briefly mention some interesting properties of the mean. See Miller et al. (2015, Section 5) for details and proofs. The mean tree is not necessarily a refinement of the majority-rule consensus tree (which contains all splits found in a majority of the trees Ti ). Any split that appears in the mean tree appears in at least one of the sample trees, and any split that appears in all the sample trees appears in the mean tree. Finally, the mean tree is “sticky” (Hotz et al. 2013), in that perturbing one of the sample trees does not always change the mean tree. This “stickiness” only happens when the mean is on a lower-dimensional orthant in treespace, which corresponds to a degenerate tree topology. This implies that the mean will be unresolved more often than one might expect or wish, similar to the majority-rule consensus tree. This is not a coincidence, as the majority-rule consensus tree is the median tree under the Robinson-Foulds distance (Barthélemy and McMorris 1986), and Pattengale (2005) further showed that the weighted majority-rule consensus tree is the median under the weighted Robinson-Foulds distance. Recall that using an L1 metric on each orthant in this space instead of the Euclidean metric gives the weighted Robinson-Foulds distance instead of the BHV distance. The Fréchet variance of a set of trees quantifies how spread out a set of trees is from their mean. We will show that in our experiments, as sequence length increases and there is more information about the tree to be reconstructed, the variance of samples of trees from the bootstrap and posterior distributions decreases. Sturm (2003) showed that a Law of Large Numbers holds, meaning that as the sample size increases, the sample means of a distribution over Tn converge to the true mean. Barden and Le (2017) proved a Central Limit Theorem on the BHV treespace, showing that the distribution of the sample means converges to a certain Gaussian distribution. Other measures of centre among a set of trees We compare the Fréchet mean to three other commonly used measures of centre or consensus in phylogenetics. The first is the majority-rule tree, which is the tree containing exactly those splits appearing in a majority of the input trees (Margush and McMorris 1981). The majority-rule consensus tree and the Fréchet mean are not, in general, refinements of each other (Miller et al. 2015). The other two measures of centre comes from tree search algorithms. In these cases, the tree search procedures produce a distribution of trees along with a most probable tree, which acts like a centre. Specifically, we look at maximum likelihood search using RAxML (Stamatakis 2014), which produces a distribution of bootstrap trees (Felsenstein 1985) where the maximum likelihood (ML) tree can be considered as a centre. Alternatively, using a Bayesian approach to phylogenetic inference, the implementation MrBayes (Ronquist et al. 2012) returns a posterior distribution representing the most probable tree, with the maximum a posteriori tree (MAP) tree often being used as its summary tree. Other measures of variance The variance or amount of variability in a set of trees is less established as a measure than the summary tree. Often, a visual representation, such as SplitsTree (Huson and Bryant 2006) or DensiTree (Bouckaert 2010), is used to represent the diversity of a set of trees. Unfortunately, these methods cannot be assessed or compared quantitatively. Instead, we will compare the Fréchet variance with several quantitative measures of variance, namely the number of different tree topologies in the set, the number of different splits in the set, and the sum of the squared geodesic distances between each pair of trees in the set. The later measure was proposed in Chakerian and Holmes (2012) as a method for approximating the variance, and used by Ponciano et al. (2012) to measure the variance of posterior distributions. It requires O(m2 n4 ) time to estimate the variance of m trees on n leaves. One can also explore the variability of a set of trees using pairwise comparison methods applied to all pairs of trees in the set. One can compare trees using both the BHV distance and the more commonly-used Robinson-Foulds (RF) distance (Robinson and Foulds 1981). The RF distance between trees T1 and T2 is defined as the number of splits in T1 but not in T2 , plus the number of splits in T2 but not in T1 . That is, it is the size of the symmetric difference between the split sets of T1 and T2 . Note that this definition only uses the tree topologies, and not the edge lengths of the trees. Related work The most closely related work to ours is that of Benner et al. (2014). They investigated the behaviour of both the mean and the median (the tree minimizing the sum of distances, instead of the sum of squared distances, to the sample trees). Bačák (2014) summarize posterior distributions returned by Bayesian tree reconstruction methods. The authors simulated sequences of lengths 50, 100, 250, and 500 using a 14-taxa tree of plants and the F81 evolutionary model (Felsenstein 1981). They show that the mean and median estimates are comparable to the majority-rule consensus estimate, and in some instances perform better, and also investigate how the Fréchet variance changes with sequence length. Our work was conceived independently, and while the overall aim of the work is the same, the scope of our experiments are much broader, considering tree distributions generated from both maximum likelihood and Bayesian methods; the general GTR evolutionary model; trees with more taxa; and a more comprehensive look at the Fréchet variance. This paper focuses on the Fréchet mean and variance of a set of trees, which is a point summary of the data. Other work has look at 1-dimensional summaries, or best fit lines, in BHV treespace (Nye 2011, 2014; Feragen et al. 2013), and extensions to multi-dimensional summaries or a generalization of Principal Components Analysis (PCA) (Nye et al. 2016). Confidence sets on the BHV treespace are constructed in Willis (2016), and a full Central Limit Theorem is given in Barden and Le (2017). Methods Computation of the mean and variance The mean tree is the tree that minimizes the sum of the squared BHV distances from itself tree to the sample trees. This is equivalent to the centre of mass in Euclidean space. We compute an approximation of the mean tree using the iterative implementation described in Miller et al. (2015). In this implementation, a new approximation of the mean tree is returned each iteration, and these approximations converge to the true mean tree as the number of iterations grows. To decide when to stop the iterative algorithm, we use a program option to check for convergence using a Cauchy sequence of length 10 with an epsilon of 10−6 . This means that we stop the iterative algorithm when the pairwise BHV distances between the last 10 mean approximations were all less than or equal to 10−6 . In all of our experiments, the means converged within 285 000 iterations. We also use the random permutation heuristic. We validated this choice of epsilon by choosing one repetition for each sequence length, and computing the (approximate) mean of the corresponding posterior distribution sample 10 times using the chosen parameters. For an epsilon of 10−6 , the average BHV distance between pairs of approximate means of the same sample was on the order of 10−5 , which we considered acceptable. Computing the mean and variance took 10-35 minutes on a 3.5 GHz 6-Core Intel Xeon E5 Processor. The program and source code are available at http://comet.lehman.cuny.edu/owen/code/SturmMean.tar.gz. Simulated Data Opossum Diprotodontian Sloth Anteater Armadillo Hedgehog Shrew Mole Phyllostomid Freetailedbat Falsevampirebat FlyingFox RousetteFruitbat Whale Dolphin Hippo Ruminant Pig Llama Horse Rhino Tapir Cat Caniform Pangolin Sciurid Mouse Rat Hystricid Caviomorph Rabbit Pika FlyingLemur TreeShrew Strepsirrhine Human Tenrecid GoldenMole ShortEaredElephantShrew LongEaredElephantShrew Aardvark Sirenian Hyrax Elephant 0.05 Figure 2: Reference mammal tree from Murphy et al. (2001). We simulated 10 sets of DNA sequences for a variety of lengths (500, 1000, 1500, 2000, 2500, 3000, 3500, 4000 base pairs), using the tree of 44 mammals from Murphy et al. (2001), which is shown in Figure 2, as the reference tree. The sequences were simulated with Seq-Gen version 1.3.3 (Rambaut and Grass 1997) using the GTR model with the following parameter settings: the proportion of invariable sites is 0.18; the equilibrium frequencies for A, C, G, T are 0.21, 0.31, 0.3, and 0.18, respectively; and the GTR rate matrix is (1.5, 4.91, 1.34, 0.83, 5.8, 1), where the entries are the transition rate from A to C, A to G, A to T, C to G, C to T, and G to T. These parameter values were estimated in Hillis et al. (2005) for this reference tree. For each set of sequences for each length, we ran RAxML Version 8 (Stamatakis 2014) to compute the Maximum Likelihood (ML) tree and 1000 bootstrap sample trees. For the RAxML settings, we used the GTR + I + Γ evolutionary model. We conducted a full analysis (option -f a) using rapid bootstrapping (option -x), which was recommended in the RAxML user manual when computing a large number of bootstrap replicates, since every 5th bootstrap tree is used as a starting point for the ML tree search. For each set of sequences, at each length, we also ran MrBayes 3.2 (Ronquist et al. 2012) to compute the MAP tree and sample 1000 trees from the posterior distribution. For the MrBayes settings, we used the GTR+I+Γ evolutionary model, and ran for 5,000,000 iterations, sampling every 1000 generations. We used the last 1000 sampled trees as the posterior distribution. For each sample distribution of 1000 trees, we estimated the Fréchet mean and variance, using SturmMean (Miller et al. 2015) with the settings explained in the previous subsection. We also computed the majority-rule consensus tree, and three other measures of variation for each sample: the number of different tree topologies in the sample, the number of different splits in the sample, and the sum of the squared BHV distance between each pair of trees in the sample. We compared the mean tree to the majority-rule consensus, ML, and MAP trees as follows. For each sequence length, repetition, and distribution type (bootstrap or posterior) there was one mean tree, one majority-rule consensus tree, and either an ML or MAP tree, depending on whether the sample was from the bootstrap or posterior distribution. Adding the reference tree to this set, we computed the RF distance between each pair of trees. We also computed the BHV distance if both trees in the pair had meaningful branch lengths. The mean trees, ML trees, and reference tree all had meaningful branch lengths, while the majority-rule consensus tree and MAP trees did not. We also compared the lengths of the sampled and their centres. Here we define pP trees 2 |e| . the length of a tree T with edge set E to be T This is the BHV distance of tree e∈E T to the BHV treespace origin. To investigate stickiness of the mean, we compare the length of the mean tree of a distribution with the average length of trees in that distribution, to see if the mean is much shorter than its component trees. We also compare the lengths of the mean and the average lengths of trees between the posterior and bootstrap distributions generated from the same sequence set. In all cases, we use the Wilcoxon ranked signed test (Wilcoxon 1945) to test the hypothesis that the two distribution of lengths are the same. Finally, we conducted a mean hypothesis test on the bootstrap and posterior samples for the first repetition of 4000 base pairs. Recall that a mean hypothesis test is a type of two-sample test that tests if the means of two samples are the same. Rejecting this hypothesis implies that the samples are from different distributions. We computed the BHV distance between the means of these bootstrap and posterior samples, and compared it to the BHV distance between the means of a random partition of the two samples. Since a full permutation test is not feasible (since each sample contains 1000 trees), we estimated it using 500 randomly chosen permutations. Note we are following the method for performing two-sample hypothesis testing on trees that was suggested in Feragen et al. (2013). Results To visualize what the trees from one repetition of the experiment look like, for the first repetition of the 4000 base pair sequence length experiment, we computed the BHV distance between 100 trees from each of the bootstrap and posterior samples, the reference tree, the ML tree and the two mean trees. We use classic Multi-dimensional Scaling (MDS) (Kruskal 1964) to reduce this to two dimensions (Fig. 3). The two means and the ML tree are in the middle of their respective samples. The two samples are separated in space and the reference tree is closer to the posterior sample, but not near its centre. The reference tree, two means, ML tree, and 62 of the trees from the two samples have the same topology. The other common topologies appear in both the bootstrap and posterior samples. This suggests that the difference between the two clusters in Figure 3 is primarily due to branch lengths, which the BHV distance takes into account, instead of topology. 0.03 0.02 0.00 ● −0.03 −0.02 −0.01 PC 2 0.01 ● ● reference tree ML bootstrap tree posterior tree bootstrap mean ● posterior mean −0.05 0.00 0.05 PC 1 Figure 3: A sample of trees from the first repetition of the 4000 base pair sequence length embedded in 2 dimensions using classic Multi-dimensional Scaling. The trees from the bootstrap and posterior samples form two clusters, most likely due to differences in branch lengths instead of topology. Comparison of the mean tree with other measures of centre First we compare the mean trees to the reference tree and the other summary trees, showing that they are close. The four plots in Figure 4 use the RF and BHV distances to compare the Fréchet mean of each bootstrap and posterior sample to its corresponding majority-rule consensus tree, the reference tree, and either ML or MAP tree, as appropriate. In all cases, the distance between the Fréchet mean and the other trees decreases as the sequence length increases. The mean tree is closer to the ML or MAP and majority-rule consensus tree than to the reference tree, with those three trees almost always having the same topology for sequences of length 3000 base pairs and longer. Next we consider the relation of the reference tree to the reconstructed trees. The four plots in Figure 5 use the RF and BHV distance to compare the reference tree to the mean tree, majority-rule consensus tree, and ML or MAP tree of each sample. These plots combined with the previous Figure 4 show that the reconstructed trees are closer to each other than to the reference tree. As expected, all trees become closer to the reference tree as the sequence length increases, since this gives more information about the reference tree, improving its reconstruction. Interestingly, under the BHV distance, the mean tree of the bootstrap distribution is on average closer to the reference tree than the ML tree Variance We compare the different measures of variance in a set a trees, namely the number of different topologies, the number of different splits, the Fréchet variance, and the sum of the squared BHV distance between all pairs of input trees, in Figure 6. As the sequence length increases, there is more information about the underlying tree, and so we expect RAxML and MrBayes to both do a better job at inferring this tree and be more certain about it. This should be reflected by a decrease in variance in the bootstrap and posterior distributions, and thus samples, as the sequence length increases, which is what we see in Figure 6. For all measures, the posterior samples have a lower variance than the bootstrap samples. This matches previous observations that the posterior probabilities are higher than bootstrap frequencies for well-supported clades (Erixon et al. 2003; Douady et al. 2003; Huelsenbeck and Rannala 2004), since trees in a lower variance sample are not as spread out, and thus have fewer different splits, than trees in a higher variance sample. In general, we find that there is more uncertainty in the variance estimate for the other metrics than the Fréchet variance. The measurements of the sum of the squared BHV distance between all pairs of sample trees and the Fréchet variance are almost identical. This is expected as these two measures are identical in Euclidean space, which is why the sum of squared BHV distance between all pairs was first suggested as a measure of variance. For large input sets, it is faster to compute the Fréchet variance than the BHV distance between all pairs. See the Discussion, below, for more details. Bootstrap Distribution Posterior Distribution 25 Reference ML Majority−Rules Consensus 20 Reference MAP Majority−Rules Consensus RF Distance to Mean Tree RF Distance to Mean Tree 20 15 ● 10 ● ● 5 ● 15 10 ● 5 ● ● ● ● ● ● ● ● ● ● ● ● 0 0 500 1000 1500 2000 2500 3000 3500 4000 ● 500 1000 Sequence Length 1500 2000 2500 3000 3500 4000 Sequence Length Bootstrap Distribution Posterior distribution ● ● Refence ML Reference BHV Distance to Mean Tree BHV Distance to Mean Tree 0.2 ● ● ● ● ● 0.1 ● ● 0.12 0.08 0.04 ● ● ● ● 0.0 500 1000 1500 2000 2500 Sequence Length 3000 3500 4000 500 1000 1500 2000 2500 3000 3500 4000 Sequence Length Figure 4: For each sample, the RF and BHV distances were calculated from its mean tree to its majority-rule tree, ML or MAP tree, and the reference tree. The distribution of these distances is shown using box plots. The mean tree approaches the ML or MAP, and consensus trees as the sequence length increases, with all three trees usually sharing the same topology by sequence lengths of 3000 base pairs. Bootstrap Distribution ● Posterior Distribution 25 Mean ML Majority−Rules Consensus Mean MAP Majority−Rules Consensus RF Distance to Reference Tree RF Distance to Reference Tree 20 20 ● 10 ● ● ● ● 15 10 ● ● ● ● ● 5 ● ● ● ● ● ● ● ● 0 0 500 1000 1500 2000 2500 3000 3500 ● 4000 500 1000 Sequence Length 1500 2000 2500 3000 3500 4000 Sequence Length Bootstrap Distribution ● Mean ML ● BHV Distance to Reference Tree 0.25 0.20 ● ● ● ● 0.15 ● ● ● ● ● 500 1000 1500 2000 2500 3000 3500 4000 Sequence Length Figure 5: For each sample, the RF and BHV distances were calculated from the reference tree to the sample’s mean tree, majority-rule tree, and ML or MAP tree. The distribution of these distances is shown using box plots. All three reconstructed trees approach the reference tree as the sequence length increases, with the mean tree being slightly closer on average than the ML tree under the BHV distance measure. The BHV distance between the reference and mean trees for the posterior distribution is shown in the lower-right graph in Figure 4. 1000 Bootstrap Samples Posterior Samples Bootstrap Samples Posterior Samples 800 ● 750 400 Number of different splits Number of different topologies 600 ● ● ● ● 500 ● 250 200 ● ● ● ● ● ● ● 0 500 1000 1500 2000 2500 3000 3500 4000 500 1000 Sequence Length 15000 2000 2500 3000 3500 4000 Sequence Length ● Bootstrap Samples Posterior Samples 0.015 ● Bootstrap Samples Posterior Samples ● 0.010 10000 Frechet variance Sum of squared BHV distance between all pairs ● 1500 5000 ● 0.005 ● ● ● ● 500 1000 1500 2000 2500 3000 Sequence Length 3500 4000 ● 500 1000 1500 2000 2500 3000 3500 4000 Sequence Length Figure 6: The variance of the samples of the bootstrap and posterior distributions are measured using the number of different topologies, the number of different splits, the sum of the squared BHV distance between all pairs, and the Fréchet variance. For all measures, the posterior samples have lower variance on average than the bootstrap samples. The sum of the squared BHV distance between all pairs and the Fréchet variance are very similar. Note that the y axis for the number of different splits, sum of squares, and Fréchet variance are in log scale. Tree length comparison We also looked at the average tree lengths to determine the effect of mean stickiness. Some of the mean trees for shorter sequence lengths were not fully resolved due to the stickiness phenomenon, but all mean trees for the 4000 base pair sequence length were fully resolved or binary. However, even when mean trees are fully resolved, the stickiness property could still cause them to be closer to the origin of the sample than expected. In terms of measurable effects, this would translate into the mean trees being shorter (in terms of total edge length) on average than the trees from which they were computed. This matches what we found. For each 80 bootstrap and posterior samples, the length of the mean tree was strictly less than the average length of the corresponding sample trees. The p-value for each of these cases was less than 2.2 × 10−16 . While the mean trees had a shorter length than might be expected, this does noticeably affect the quality of the summary, as on average, the bootstrap and posterior mean trees were only 99.48% and 99.50%, respectively, of the average lengths of their respective samples. We also compared the lengths of the ML trees of the bootstrap samples with their corresponding mean trees. In all 80 datasets the length of the ML tree was greater than the length of the corresponding mean tree. With p-value 0.005861, the length of the ML tree is greater than the average length of the trees in the corresponding bootstrap sample. Interestingly, the average length of the trees in each posterior sample was always less than the average length of the trees in the corresponding bootstrap sample generated from the same set of sequences. This suggests the bootstrap samples are more spread out, which could also reflect posterior probabilities being higher for well-support clades than bootstrap probabilities. Unsurprisingly, the mean tree of the posterior distribution sample always had length less than the mean tree of the corresponding bootstrap sample. Mean hypothesis test For the first repetition of the 4000 base pair sequences, we performed a two-sample hypothesis test to compare the samples of the bootstrap and posterior distributions using the means. The null hypothesis stated that the two means of bootstrap and posterior distributions were the same. We tested this hypothesis using an approximate permutation test. In all cases, the distance between the means of a random partition of the two samples was strictly less than the distance between the means of the two samples themselves. Thus we reject the null hypothesis with an estimated p-value of 0.002, with a 95% confidence interval of [0, 0.006]. This means that we can assume the two distributions do not have the same mean, and thus are not the same. This was expected due to previous work showing the bootstrap and posterior probabilities are different (Erixon et al. 2003; Douady et al. 2003; Huelsenbeck and Rannala 2004). Discussion Our experiments demonstrate that both the Fréchet mean and variance behave in the expected way on biological data. We have shown that the mean of samples of bootstrap and posterior distributions is comparable in accuracy to the ML and MAP trees, respectively, as well as the majority-rule consensus tree. Indeed the results seem to suggest that the original reference tree is slightly closer to the mean than to the other summary trees. While this possible gain may not be enough to warrant the cost of computing the mean, these results conclusively demonstrate that the mean is a valid summary method for a sample of trees. We believe the value of the mean comes from its sound mathematical backing, which enables more sophisticated statistical tests, like mean hypothesis testing. From the results of the variance experiments, it is clear that the Fréchet variance is a faster and more precise measure of variance than existing alternatives. The variability in the number of topologies in the tree sets with the same sequence length is very high, in comparison to the other variance measures. Although the variability decreases when measuring the number of splits in the tree set, it is still higher than that of the sum of squared pairwise distances and the Fréchet variance for comparable sequence lengths. The sum of squared pairwise distances and the Fréchet variance have very similar profiles, justifying the use of the sum of squared pairwise distances as a measure of variance in the literature. However for large sample sizes, the Fréchet variance is faster to compute. To compute the sum of squared geodesic distances for r trees, one must compute r(r − 1)/2 geodesic distances. In contrast, computing the Fréchet variance involves calculating the geodesic distance once per iteration of the algorithm. The number of iterations required depends on the desired precision of the mean. However, we have often obtained good results with 10,000-15,000 iterations, suggesting that when we are computing variances of more than approximately 200 trees, the Fréchet variance calculation will be faster than the sum-of-squared-distance calculation. Our experiments on the tree lengths show that while the mean trees are shorter than the average length of the sample trees, it is by less than 1% on average. This demonstrates that stickiness leads to shorter mean trees, but that the difference in lengths is not likely to be significant and can be ignored. One might think that we could use the mean to compute the species tree for a set of gene trees (Miller et al. 2015, Example 5.5). Even if we just restrict ourselves to the coalescent model for explaining gene tree diversity, this is still problematic in two regards. Under the coalescent model, the pendant edges of the gene trees must be at least as long as than the pendant edges of the species tree, but will usually be longer. Since each pendant edge of the mean tree is computed by averaging the length of that edge in all input trees, the pendant edges of the mean of the gene trees will be at least as long, and usually longer, than the pendant edges of the true species tree. While it is possible that the topology of the mean tree might still match that of the species tree, as conjectured in (Miller et al. 2015, Example 5.5), our preliminary experiments suggest that stickiness greatly limits the amount of information in the mean tree, compared to other methods. In preliminary experiments, the mean tree of a set of simulated gene trees became essentially degenerate while the gene trees were still far away from the anomalous zone (Degnan and Rosenberg 2006). That is, the most common gene tree topology was still the same as the species tree topology. By essentially degenerate, we mean that the approximated mean tree was within a small distance of some degenerate tree. It is possible that an exact algorithm for computing the mean would give a non-degenerate mean tree topology even in these cases, but with an iterative algorithm, we can not be certain the mean is not degenerate, nor even that it would be informative. Conclusion We have shown that the Fréchet mean and variance behave in an expected way on biological data. We have further shown that the mean can be used in mean hypothesis testing to compare two samples of trees, and that the variance is a stable and reliable measure of the amount of variability in a sample of trees. This validation opens the door to new applications of these quantities. One possible application of the variance is to determine when MrBayes or other Markov Chain Monte Carlo (MCMC) algorithms converge. Preliminary experiments on the MrBayes runs for the data in this paper show that comparing the variance of sliding windows of the sampled trees can identify the burn-in, but that the variance of the trees in the sliding window remains roughly the same after this period. However, there may be other datasets where the variance will continue to decrease after the burn-in, indicating a lack of convergence. The iterative algorithm for computing the mean is easily adapted into an online algorithm: at each iteration, instead of choosing a tree at random from the input set of trees, use the next tree generated by the MCMC chain. Unfortunately, it is not clear how to take advantage of this in computing the variance, which requires computing the BHV distance from the current mean approximation to all sample trees seen so far. However, algorithms for computing geodesics dynamically (Skwerer and Provan 2015) might help. * References Bačák, M. 2014. Computing medians and means in Hadamard spaces. SIAM Journal on Optimization 24:1542–1566. Barden, D. and H. Le. 2017. The logarithm map, its limits and frechet means in orthant spaces. arXiv preprint arXiv:1703.07081 . Barthélemy, J.-P. and F. McMorris. 1986. The median procedure for n-trees. Journal of Classification 3:329–334. Benner, P., M. Bačák, and P.-Y. Bourguignon. 2014. Point estimates in phylogenetic reconstructions. Bioinformatics 30:i534–i540. Billera, L., S. Holmes, and K. Vogtmann. 2001. Geometry of the space of phylogenetic trees. Advances in Applied Mathematics 27:733–767. Bouckaert, R. R. 2010. DensiTree: making sense of sets of phylogenetic trees. Bioinformatics 26:1372–1373. Bridson, M. and A. Haefliger. 1999. Metric Spaces of Non-positive Curvature. Springer-Verlag. Chakerian, J. and S. Holmes. 2012. Computational tools for evaluating phylogenetic and hierarchical clustering trees. Journal of Computational and Graphical Statistics 21:581–599. Degnan, J. H. and N. A. Rosenberg. 2006. Discordance of species trees with their most likely gene trees. PLoS Genet 2:e68. Douady, C. J., F. Delsuc, Y. Boucher, W. F. Doolittle, and E. J. Douzery. 2003. Comparison of Bayesian and maximum likelihood bootstrap measures of phylogenetic reliability. Molecular Biology and Evolution 20:248–254. Erixon, P., B. Svennblad, T. Britton, and B. Oxelman. 2003. Reliability of Bayesian posterior probabilities and bootstrap frequencies in phylogenetics. Systematic Biology 52:665–673. Felsenstein, J. 1981. Evolutionary trees from DNA sequences: a maximum likelihood approach. Journal of molecular evolution 17:368–376. Felsenstein, J. 1985. Confidence limits on phylogenies: an approach using the bootstrap. Evolution Pages 783–791. Feragen, A., M. Owen, J. Petersen, M. M. Wille, L. H. Thomsen, A. Dirksen, and M. de Bruijne. 2013. Tree-space statistics and approximations for large-scale analysis of anatomical trees. Pages 74–85 in IPMI vol. 2013. Hillis, D., T. Heath, and K. St. John. 2005. Analysis and visualization of tree space. Systematic Biology 54:471–482. Hotz, T., S. Huckemann, H. Le, J. S. Marron, J. C. Mattingly, E. Miller, J. Nolen, M. Owen, V. Patrangenaru, S. Skwerer, et al. 2013. Sticky central limit theorems on open books. The Annals of Applied Probability 23:2238–2258. Huelsenbeck, J. P. and B. Rannala. 2004. Frequentist properties of Bayesian posterior probabilities of phylogenetic trees under simple and complex substitution models. Systematic biology 53:904–913. Huson, D. H. and D. Bryant. 2006. Application of phylogenetic networks in evolutionary studies. Molecular Biology and Evolution 23:254–267. Kruskal, J. B. 1964. Multidimensional scaling by optimizing goodness of fit to a nonmetric hypothesis. Psychometrika 29:1–27. Margush, T. and F. R. McMorris. 1981. Consensus n-trees. Bulletin of Mathematical Biology 43:239–244. Miller, E., M. Owen, and J. S. Provan. 2015. Polyhedral computational geometry for averaging metric phylogenetic trees. Advances in Applied Mathematics 68:51–91. Murphy, W. J., E. Eizirik, S. J. O’Brien, O. Madsen, M. Scally, C. J. Douady, E. Teeling, O. A. Ryder, M. J. Stanhope, W. W. de Jong, et al. 2001. Resolution of the early placental mammal radiation using Bayesian phylogenetics. Science 294:2348–2351. Nye, T. M. 2011. Principal components analysis in the space of phylogenetic trees. The Annals of Statistics Pages 2716–2739. Nye, T. M. 2014. An algorithm for constructing principal geodesics in phylogenetic treespace. IEEE/ACM Transactions on Computational Biology and Bioinformatics 11:304–315. Nye, T. M., X. Tang, G. Weyenberg, and R. Yoshida. 2016. Principal component analysis and the locus of the Fréchet mean in the space of phylogenetic trees. arXiv preprint arXiv:1609.03045 . Owen, M. and J. S. Provan. 2011. A fast algorithm for computing geodesic distances in tree space. IEEE/ACM Transactions on Computational Biology and Bioinformatics (TCBB) 8:2–13. Pattengale, N. D. 2005. Tools for Phylogenetic Postprocessing. Ph.D. thesis The University of New Mexico. Ponciano, J. M., J. G. Burleigh, E. L. Braun, and M. L. Taper. 2012. Assessing parameter identifiability in phylogenetic models using data cloning. Systematic biology Page sys055. Rambaut, A. and N. C. Grass. 1997. Seq-Gen: an application for the Monte Carlo simulation of DNA sequence evolution along phylogenetic trees. Computer applications in the biosciences: CABIOS 13:235–238. Robinson, D. F. and L. R. Foulds. 1979. Comparison of weighted labelled trees. Pages 119–126 in Combinatorial mathematics VI. Springer. Robinson, D. F. and L. R. Foulds. 1981. Comparison of phylogenetic trees. Mathematical Biosciences 53:131–147. Ronquist, F., M. Teslenko, P. van der Mark, D. L. Ayres, A. Darling, S. Höhna, B. Larget, L. Liu, M. A. Suchard, and J. P. Huelsenbeck. 2012. MrBayes 3.2: efficient Bayesian phylogenetic inference and model choice across a large model space. Systematic biology 61:539–542. Skwerer, S. and S. Provan. 2015. Dynamic geodesics in treespace via parametric maximum flow. arXiv preprint arXiv:1512.03115 . St. John, K. 2017. Review paper: The shape of phylogenetic treespace. Systematic Biology 66:e83. Stamatakis, A. 2014. RAxML version 8: a tool for phylogenetic analysis and post-analysis of large phylogenies. Bioinformatics 30:1312–1313. Sturm, K.-T. 2003. Probability measures on metric spaces of nonpositive. Heat Kernels and Analysis on Manifolds, Graphs, and Metric Spaces: Lecture Notes from a Quarter Program on Heat Kernels, Random Walks, and Analysis on Manifolds and Graphs: April 16-July 13, 2002, Emile Borel Centre of the Henri Poincaré Institute, Paris, France 338:357. Wilcoxon, F. 1945. Individual comparisons by ranking methods. Biometrics Bulletin 1:80–83. Willis, A. 2016. Confidence sets for phylogenetic trees. arXiv preprint arXiv:1607.08288 .
10math.ST
arXiv:1705.07024v1 [cs.CE] 19 May 2017 Optimal prevention with possibilistic and mixed background risk Irina Georgescu Academy of Economic Studies Department of Economic Informatics and Cybernetics Piaţa Romana No 6 R 70167, Oficiul Postal 22, Bucharest, Romania Email: [email protected] and Ana Marı́a Lucia Casademunt Universidad Loyola–Andalucı́a Department of Business Administration, Cordoba, Spain Email: [email protected] Abstract In this paper the effect of posibilistic or mixed background risk on the level of optimal prevention is studied. In the framework of five purely possibilistic or mixed models, necessary and sufficient conditions are found such that the level of optimal saving decreases or increases as a result of the actions of various types of background risk. This way our results complete those obtained by Courbage and Rey for some prevention models with probabilistic background risk. Keywords: possibilistic background risk, optimal prevention, optimal saving modal operator 1 Introduction The prevention is the effort made by an agent to reduce the action of an unwanted event (e. g. a financial loss). The effort can be the amount of money invested by the agent in prevention activities and then he is interested to determine the optimal level of this effort. According to [5], the prevention consists in reducing the probability of a loss (self–protection), the size of loss (self–insurance) or both of them (self– insurance–cum–protection). For simplicity, in this paper by prevention one understands self–protection (this terminology is used in [4]). The first contribution to the study of optimal prevention is the paper [13] by Elrich and Becker which investigates the interconnection between the market insurance, self-insurance and self–protection. Then, the subject generated a 1 real literature focused especially on the way consumers’ preferences influence the optimal level of prevention (see [5]). A common topic deals with the relationship between risk aversion and optimal prevention. For instance, Dionne and Eeckhoudt emphasize in [7] the fact that the increase of risk aversion does not lead to an increase in optimal investment in prevention, its effect being ambiguous. A second topic is the relationship between the notion of prudence introduced by Kimball in [18] and that of optimal prevention (see [11], [5]). Paper [11] studies the impact of prudence on optimal prevention in a one–period model, while [5] analyzes the obtaining of the optimal prevention in a two-period framework. In the latter case, the prevention effort is done in the first period, and its effect on the likelihood of appearance of loss occurs during the second period. Prevention models with background risk appear for the first time in the paper by Courbage and Ray [4] and Eeckhoudt et al. [12]. Background risk may appear in one or both periods. With respect to this, the changes in optimal prevention level occur in relation to a benchmark model (in which the background risk does not exist). In the mentioned papers we deal with probabilistic models, in which the background risk is represented by a random variable. This paper aims to study optimal prevention in non–probabilistic models, in which we have a possibilistic or mixed background risk (see [3], [15], [16]). In the former case, the two–period background risk will be a fuzzy number, and in the latter case, in one period, background risk will be a random variable, and in the other period, it will be a fuzzy number. Section 2 contains the definition of possibilistic expected utility and a few of its properties which will be used in this paper. In Section 3 the benchmark prevention model is presented following [4], [5]. This will be the starting point in the background risk model construction from the next sections. In Section 4 eight background risk prevention models are described. These are two–period constructions, and the risk from the two periods may be either a random variable or a fuzzy number. The first three models are probabilistic, and their theory has been already developed in [4]. The other five models are purely possibilistic or mixed. Their construction follows a similar line to the first three: the total utility functions are defined, then first order conditions verified by optimal prevention are deduced. Section 5 focuses on a model in which various types of background risk of the five models influence the level of optimal prevention. For each of the five models, the level of optimal prevention is compared to that of the benchmark model. Necessary and sufficient conditions for the increase or decrease in optimal prevention with respect to the existing level in case of the benchmark model are proved. In Section 6 the background risk effect on optimal saving is studied when to the already existing risk in one period a (possibilistic or probabilistic) risk is added in the other period. 2 2 Possibilistic expected utility In this section we recall the definition of possibilistic expected utility and a few of its basic properties (cf. [1], [2], [8], [9], [14]). If X is a random variable defined on a probability field (Ω, K, P ) with Ω ⊆ R then we will denote by M (X) its expected value. For any continuous utility function u : R → R, the expected value M (u(X)) of the random variable u(X) is the probabilistic expected utility associated with X and u. To develop a possibilistic risk theory we need a similar notion of possibilistic expected utility. Its definition assumes a framework composed of the following components: • a utility function u : R → R representing an agent; • a fuzzy number A modelling the possibilistic risk; • a weighting function, i.e. a non–negative andRmonotone increasing function 1 f : [0, 1] → R satisfying the normality condition 0 f (γ)dγ = 1. Assume that the level sets of the fuzzy number A have the form [A]γ = [a1 (γ), a2 (γ)], for any γ ∈ [0, 1]. Then the possibilistic expected utility Ef (u(A)) is defined by R1 (2.1) Ef (u(A)) = 12 0 [u(a1 (γ)) + u(a2 (γ))]f (γ)dγ If u is the identity function of R then Ef (u(A)) is exactly the possibilistic expected value [1], [14]. R1 (2.2) Ef (A) = 21 0 [a1 (γ) + a2 (γ)]f (γ)dγ. The following two propositions emphasize two important properties of possibilistic expected utility: the first one is a linearity property, the second one is a Jensen type inequality (used in the following in the analysis of optimal prevention variations with respect to various types of background risk). Proposition 2.1 [15] Let g : R → R, h : R → R two continuous utility functions and a, b ∈ R. If u = ag+bh, then Ef (u(A)) = aEf (g(A))+bEf (h(A)). Proposition 2.2 [15], [3] If the utility function u is convex, then u(Ef (A)) ≤ Ef (u(A)). 3 The benchmark prevention model In this section we present, according to [4], [5], the entities which compose the benchmark prevention model, the form of its total utility function and the first–order condition with which the level of optimal prevention is selected. The benchmark prevention model [4], [5] has two periods 1 and 2: the prevention effort is conducted in period 1, and the effect of this effort on the probability of the occurrence of a loss in wealth) is manifested in period 2. The model is defined by the following entities: • w1 , w2 are the safe wealth in periods 1 and 2; • u and v are utility functions for period 1 and 2, respectively; • e is the level of prevention effort (in period 1); 3 • l is the loss level; • p(e) is the probability that a loss l occurs at the prevention level e. In [4], [5] this model is studied under the hypotheses: • the utility functions u and v are of class C 2 , u′ > 0, v ′ > 0, u′′ < 0, v ′′ < 0; • p′ (e) < 0, p′′ (e) > 0, for any level e; • l > 0. According to these initial data, in the second period of the consumption activity we will have an endogenous risk ǫ̃e (parameterized by the prevention level e), whose outcomes are −l and 0:   −l 0 ǫ̃e = p(e) 1 − p(e) Then the expected utility corresponding to the second period will be M (w2 + ǫ̃e ) = p(e)v(w2 − l) + (1 − p(e))v(w2 ), and the total utility function will be: (3.1) V (e) = u(w1 − e) + p(e)v(w2 − l) + (1 − p(e))v(w2 ). The agents wish to choose a level e of the effort maximizing the total utility V (e). This comes to finding the solution e∗ of the optimization problem: max V (e). e Since V (e) is strictly concave, the optimal solution e∗ is given by V ′ (e∗ ) = 0, which leads us to the first–order condition: (3.2) u′ (w1 − e∗ ) = p′ (e∗ )[v(w2 − l) − v(w2 )]. 4 Prevention models with background risk The prevention models from this section are built starting from the benchmark model from Section 3. Their definition is founded on the following assumptions: Assumption 1 Background risk may appear both in period 1 and in period 2. Assumption 2 The background risk from each period can be modeled both probabilistically (by a random variable), and possibilistically (by a fuzzy number). Denoting by 0 the lack of background risk in one of the two periods, the eight models which can be defined on the basis of the two assumptions are specified in Table 1: 1 2 3 4 5 6 7 8 Period 1 probabilistic background risk 0 probabilistic background risk possibilistic background risk 0 possibilistic background risk probabilistic background risk possibilistic background risk 4 Period 2 0 probabilistic background risk probabilistic background risk 0 possibilistic background risk possibilistic background risk possibilistic background risk probabilistic background risk In cases 1−3 we deal with probabilistic models, in cases 4−6 with possibilistic models, and in the last two cases with mixed models. Models 1 − 3 have been studied in [4]. Next we present briefly the construction of these models. Model 1 [4] In period 1 appears a probabilistic risk modeled by the random variable X. The total utility function has the following form: V1 (e) = M (u(w1 − e + X)) + p(e)v(w2 − l) + (1 − p(e))v(w2 ). The first derivative of V1 (e) will be: V1′ (e) = −M (u′ (w1 − e + X)) + p′ (e)[v(w2 − l) − v(w2 )] and the optimal value e∗1 will be given by the first–order condition: (4.1) M (u′ (w1 − e∗1 + X)) = p′ (e∗1 )[v(w2 − l) − v(w2 )]. Model 2 [4] In period 2 appears a probabilistic risk modeled by the random variable Y . The overall utility function will be V2 (e) = u(w1 − e) + p(e)M (v(w2 − l + Y )) + (1 − p(e))M (v(w2 + Y )) The first derivative of V2 (e) will be: V2′ (e) = −u′ (w1 − e) + p′ (e)[M (v(w2 − l + Y )) − M (v(w2 + Y ))]. and the optimal value e∗2 of e will be given by the condition: (4.2) u′ (w1 − e∗2 ) = p′ (e∗2 )[M (v(w2 − l + Y )) − M (v(w2 + Y ))]. Model 3 [4] Background risk appears in both periods and is modeled by the random variables X, and Y , respectively. The total utility function has the form: V3 (e) = M (u(w1 − e + X)) + p(e)[M (v(w2 − l + Y )) − M (v(w2 + Y ))]. Then the first derivative of V3 (e) will be: V3′ (e) = −M (u′ (w1 − e + X)) + p′ (e)[M (v(w2 − l + Y )) − M (v(w2 + Y ))] and the optimal value e∗3 of e will be given by the condition: (4.3) M (u′ (w1 − e∗3 + X)) = p′ (e∗3 )[M (v(w2 − l + Y )) − M (v(w2 + Y ))] Next we will present the construction of models 4 − 8 from Table 1. For the rest of the section we fix a weighting function f : [0, 1] → R. Model 4 Assume that the background risk is described by a fuzzy number A whose level sets are [A]γ = [a1 (γ), a2 (γ)] for any γ ∈ [0, 1]. The total utility function of the model will be: V4 (e) = Ef (u(w1 − e + A)) + p(e)v(w2 − l) + (1 − p(e))v(w2 ) According to the definition (2.1) of possibilistic expected utility, V4 (e) can be written: R 1 V4 (e) = 12 0 [u(w1 − e + a1 (γ)) + u(w1 − e + a2 (γ))]f (γ)dγ + p(e)v(w2 − l) + (1 − p(e))v(w2 ). By derivation, R 1 one obtains V4′ (e) = − 12 0 [u′ (w1 − e + a1 (γ)) + u′ (w1 − e + a2 (γ))]f (γ)dγ + p′ (e)[v(w2 − l) − v(w2 )], from where, by (2.1), the following form of the derivative of V4 (e) follows: (4.4) V4′ (e) = −Ef (u′ (w1 − e + A)) + p′ (e)[v(w2 − l) − v(w2 )]. By deriving one more time, one reaches V4′′ (e) = Ef (u′′ (w1 − e + A)) + p′′ (e)[v(w2 − l) − v(w2 )]. From the hypotheses imposed on the utility functions u and v on the probability p(e) it follows V4′′ (e) < 0 for any level e of the prevention effort, thus V4 is 5 a concave function. Then the value e∗4 of e maximizing the total utility function V4 verifies the first–order condition V4′ (e∗4 ) = 0, which, by (4.4), is written as: (4.5) Ef (u′ (w1 − e∗4 + A)) = p′ (e∗4 )[v(w2 − l) − v(w2 )]. Model 5 Assume that the background risk in period 2 is a fuzzy number B whose level sets are [B]γ = [b1 (γ), b2 (γ)]. The total utility function of the model will be: V5 (e) = u(w1 − e) + p(e)Ef (v(w2 − l + B)) + (1 − p(e))Ef (v(w2 + B)) R1 = u(w1 − e) + 21 p(e) 0 [v(w2 − l + b1 (γ)) + v(w2 − l + b2 (γ))]f (γ)dγ + 12 (1 − R1 p(e)) 0 [v(w2 + b1 (γ)) + v2 (w2 + b2 (γ))]f (γ)dγ. By derivation one obtains: (4.6) V5′ (e) = −u′ (w1 − e) + p′ (e)[Ef (v(w2 − l + B)) − Ef (v(w2 + B))] V5′′ (e) = u′′ (w1 − e) + p′′ (e)[Ef (v(w2 − l + B)) − Ef (v(w2 + B))] Due to the monotonicity property of the possibilistic expected utility the inequality Ef (v(w2 − l + B)) − Ef (v(w2 + B)) ≤ 0, therefore V5′′ (e) < 0 for any e, hence V5 is strictly concave. Then the value e∗5 of e maximizing V5 (e) verifies the condition V5′ (e∗5 ) = 0, which, by (4.6), can be written: (4.7) u′ (w1 − e∗5 ) = p′5 (e∗5 )[Ef (v(w2 − l + B)) − Ef (v(w2 + B))]. Model 6 Assume that the background risk in period 1 is the fuzzy number A, and the background risk from period 2 is the fuzzy number B. The total utility function of the model will be: V6 (e) = Ef (u(w1 −e+A))+p(e)Ef (v(w2 −e+B))+(1−p(e))Ef (v(w2 +B)). By derivation one obtains: (4.8) V6′ (e) = −Ef (u′ (w1 −e+A))+p′ (e)[Ef (v(w2 −l +B))−Ef (v(w2 +B))] V6′′ (e) = Ef (u′′ (w1 − e + A)) + p′′ (e)[Ef (v(w2 − l + B)) − Ef (v(w2 + B))] From the last inequality V6′′ (e) ≤ 0 follows for any e, thus V6 is strictly concave. Then the value e∗6 of e maximizing V6 (e) verifies the condition V6′ (e∗6 ) = 0, which, by (4.8), can be written: (4.9) Ef (u′ (w1 − e∗6 + A)) = p′ (e)[Ef (v(w2 − l + B)) − Ef (v(w2 + B))] Model 7 Assume that the background risk in period 1 is the random variable X, and the background risk in period 2 is the fuzzy number B. The total utility function of the model will be: V7 (e) = M (u(w1 − e + X)) + p(e)Ef (v(w2 − l + B)) + (1 − p(e))Ef (v(w2 + B)) By derivation one obtains (4.10) V7′ (e) = −M (u′ (w1 −e+X))+p′(e)[Ef (v(w2 −l+B))−Ef (v(w2 +B))] It follows V ′ (e) < 0 for any level e of the effort level, thus the value e∗7 of e maximizing V7 (e) is given by V7′ (e∗7 ) = 0. By (4.10), this first–order condition is written as: (4.11) M (u′ (w1 − e∗7 + X)) = p′ (e∗7 )[Ef (v(w2 − l + B)) − Ef (v(w2 + B))]. Model 8 Assume that the background risk in period 1 is the fuzzy number A, and the background risk in period 2 is a random variable Y . The total utility function of the model will be: V8 (e) = Ef (u(w1 − e + A)) + p(e)M (v(w2 − l + Y )) + (1 − p(e))M (v(w2 + Y )) By derivation one obtains (4.12) V8′ (e) = −Ef (u′ (w1 −e+A))+p′(e)[M (v(w2 −l+Y ))−M (v(w2 +Y ))] 6 One proves immediately that V8 is concave, thus the value e∗8 of e maximizing V8 (e) verifies V8′ (e∗8 ) = 0, which, by (4.12), can be written: (4.13) Ef (u′ (w1 − e∗8 + A)) = p′ (e∗8 )[M (v(w2 − l + Y )) − M (v(w2 + Y ))] Remark 4.1 The above models incorporate both the entities of the benchmark model, and the features of background risk types defining them. These appear in the expression of total utility functions and in the first–order condition which determines the level of optimal prevention. 5 The effect of background risk on optimal prevention In this section we study the way adding various types of background risk may produce changes in the level of optimal saving. For this we have to compare the optimal prevention level s∗ of the benchmark model with the optimal prevention levels s∗i , i = 1, . . . , 8 of the eight models of the previous section. The models 1 − 3 being already treated in [4], we will handle the models 4 − 8 in Table 1. For each case, we will be situated in the framework set defined in Section 4. Case 4 (the comparison of e∗ and e∗4 ) The following result establishes a necessary and sufficient condition such that, adding a possibilistic background risk A in period 1, the optimal saving level drops. Proposition 5.1 The following assertions are equivalent: (i) e∗4 ≤ e∗ ; (ii) u′ (w1 − e∗ ) ≤ Ef (u′ (w1 − e∗ + A)). Proof. From the previous section we know that V4′ (e) < 0 for any e, thus V4′ is a strictly decreasing function. Then, by (4.4) and (3.2), the following equivalences hold: e∗4 ≤ e∗ iff V4′ (e∗ ) ≤ V4′ (e∗4 ) = 0; iff −Ef (u′ (w1 − e∗ + A)) + p′ (e∗ )[v(w2 − l) − v(w2 )] ≤ 0; iff −Ef (u′ (w1 − e∗ + A)) + u′ (w1 − e∗ ) ≤ 0; iff u′ (w1 − e∗ ) ≤ Ef (u′ (w1 − e∗ + A)). Corollary 5.2 If u′′′ > 0 and Ef (A) = 0 then e∗4 ≤ e∗ . Proof. By applying Proposition 2.2 to the convex function u′ it follows that u′ (w1 − e) = u′ (Ef (w1 − e + A)) ≤ Ef (u′ (w1 − e + A)), hence by Proposition 5.1, one obtains e∗4 ≤ e. Corollary 5.2 shows that if the agent is prudent 1 (in period 1) then the presence of possibilistic background risk in the first period reduces the optimal prevention. 1 The notion of prudence in a possibilistic or mixed framework was studied in [3], [7] 7 Case 5 (the comparison of e∗ and e∗5 ) The following result establishes a necessary and sufficient condition such that, adding a possibilistic background risk B in period 2, the optimal prevention level raises. Proposition 5.3 The following assertions are equivalent: (i) e∗5 ≥ e∗ ; (ii) v(w2 − l) − v(w2 ) − Ef (v(w2 − l + B)) + Ef (v(w2 + B)) ≥ 0. Proof. The function V5′ is strictly decreasing, thus by applying (4.6) and (3.2), the following equivalences hold: e∗5 ≥ e∗ iff V5′ (e∗ ) ≤ V5′ (e∗5 ) = 0; iff −u′ (w1 − e∗ ) + p′ (e∗ )[Ef (v(w2 − l + B)) − Ef (v(w2 + B))] ≤ 0; iff −p′ (e∗ )[v(w2 −l)−v(w2 )−Ef (v(w2 −l+B))+Ef (v(w2 +B))] ≥ 0; iff v(w2 − l) − v(w2 ) − Ef (v(w2 − l + B)) + Ef (v(w2 + B)) ≥ 0. Lemma 5.4 If v ′′′ > 0 and Ef (B) = 0 then v(w2 − l) − w(w2 ) ≥ Ef (v(w2 − l + B)) − Ef (v(w2 + B)). Proof. We consider the function h(x) = v(x) − v(x − l), for any x ∈ R. From the assumption v ′′′ > 0 it follows that v ′′ is strictly increasing, therefore h′′ (x) = v ′′ (x) − v ′′ (x − l) > 0, for any x. It follows that the function h is convex, thus, by applying Proposition 2.2, h(w2 ) = h(Ef (w2 + B)) ≤ Ef (h(w2 + B)). Then, by noticing that h(w2 ) = v(w2 ) − v(w2 − l) and Ef (h(w2 + B)) = Ef (v(w2 + B)) − Ef (v(w2 − l + B)) one obtains the desired inequality. Corollary 5.5 If v ′′′ > 0 and Ef (B) = 0 then e∗5 ≥ e∗ . Proof. Proposition 5.3 and Lemma 5.4 are applied. Case 6 (the comparison of e∗ and e∗6 ) The following result establishes a necessary and sufficient condition such that, adding a possibilistic background risk A in period 1, and a possibilistic background risk B in period 2, the optimal prevention level raises. Proposition 5.6 The following assertions are equivalent: (i) e∗ ≤ e∗6 ; E (u′ (w −e∗ +A)) E (v(w2 −l+B))−Ef (v(w2 +B)) (ii) f u′ (w11 −e∗ ) ≤ f . v(w2 −l)−v(w2 ) Proof. The function V6′ is strictly decreasing, thus, by applying (4.8) and (3.2), the following assertions are equivalent: • e∗ ≤ e∗6 ; • V6′ (e∗ ) ≥ V6′ (e∗6 ) = 0; • −Ef (u′ (w1 − e∗ + A)) + p′ (e∗ )[Ef (v(w2 − l + B)) − Ef (v(w2 + B))] ≥ 0; 8 E (v(w −l+B))−E (v(w +B)) 2 2 f ≥ 0. • −Ef (u′ (w1 − e∗ + A)) + u′ (w1 − e∗ ) f v(w2 −l)−v(w2 ) By taking into account that v(w2 − l) − v(w2 ) < 0 it follows immediately the equivalence of the assertions (i) and (ii). Remark 5.7 Assume that u′′′ > 0, v ′′′ > 0, Ef (A) = 0 and Ef (B) = 0. Then by a reasoning analogous to the one of Corollary 5.2, from u′′′ > 0 and Ef (A) = 0 it follows: Ef (u′ (w1 −e∗ +A)) ≥ 1. u′ (w1 −e∗ ) By applying Lemma 5.4, from v ′′′ > 0 and Ef (B) = 0 it follows Ef (v(w2 −l+B))−Ef (v(w2 +B)) ≥ 1. v(w2 −l)−v(w2 ) From these two inequalities and Proposition 5.6, we conclude that for a prudent agent in both periods, the effect of possibilistic background risks A and B on optimal prevention is ambiguous: we cannot establish a positioning of the levels e∗ and e∗6 one to each other. Case 7 (the comparison of e∗ and e∗7 ) The following result establishes a necessary and sufficient condition, that adding a probabilistic risk X in period 1 and a possibilistic risk B in period 2, the optimal prevention level raises. Proposition 5.8 The following assertions are equivalent: (i) e∗ ≤ e∗7 ; ′ ∗ E (v(w2 −l+B))−Ef (v(w2 +B)) 1 −e +X)) (ii) M(uu′(w ≤ f . (w1 −e∗ ) v(w2 −l)−v(w2 ) Proof. Analogous to the proof of Proposition 5.6 by using the fact that V7′ is strictly decreasing and applying (4.10) and (3.2). Remark 5.9 Assume that u′′′ > 0, v ′′′ > 0, M (X) = 0 and Ef (B) = 0. From u′′′ > 0 and M (X) = 0 it follows according to Jensen’s inequality, the following inequality: M(u′ (w1 −e∗ +X)) ≥ 1. u′ (w1 −e∗ ) By Lemma 5.4, conditions v ′′′ > 0, Ef (B) = 0 imply the inequality: Ef (v(w2 −l+B))−Ef (v(w2 +B)) ≥ 1. v(w2 −l)−v(w2 ) These two inequalities show that the background risk effect described by the mixed vector (X, B) on the optimal prevention is ambiguous. Case 8 (the comparison of e∗ and e∗8 ) The following proposition establishes a necessary and sufficient condition that adding a possibilistic background risk A in period 1 and a probabilistic risk Y in period 2, the optimal prevention level raises. Proposition 5.10 The following assertions are equivalent: (i) e∗ ≤ e∗8 ; E (u′ (w −e∗ +A)) −l+Y ))−M(v(w2 +Y )) (ii) f u′ (w11 −e∗ ) ≤ M(v(w2v(w . 2 −l)−v(w2 ) 9 Proof. (4.12) and (3.2) are applied. Remark 5.11 Assume that u′′′ > 0, v ′′′ > 0, Ef (A) = 0, M (Y ) = 0. Then, by Proposition 2.2 and [4], the following inequalities hold: Ef (u′ (w1 −e∗ +A)) −l+Y ))−M(v(w2 +Y )) ≥ 1, M(v(w2v(w ≥ 1, u′ (w1 −e∗ ) 2 −l)−v(w2 ) thus the effect of mixed background risk (A, Y ) on the level of optimal saving is ambiguous. 6 Other cases of comparing optimal prevention levels In the previous section we studied the changes in optimal prevention when we pass from the benchmark model to the models where the background risk appears in one of the periods or in both periods. The problem of changes in optimal saving can be posed in other cases too: one passes from a situation in which the background risk is present in a single period (models 1, 2, 4, 5) to one of the situations when the background risk is present in both periods (models 3, 6, 7, 8). For this purpose we have to compare the optimal prevention levels for the following pairs: (e∗1 , e∗3 ), (e∗1 , e∗7 ), (e∗2 , e∗3 ), (e∗2 , e∗8 ), (e∗4 , e∗6 ), (e∗4 , e∗8 ), (e∗5 , e∗6 ), (e∗5 , e∗7 ). In this section we will deal with this problem making the comparison of optimal prevention levels of some of the mentioned pairs, the remaining cases being treated in a similar manner. Case 1 (the comparison of e∗4 and e∗6 ) One assumes that in period 1 there exists a background risk described by the fuzzy number A, and to this is added in period 2 a possibilistic background risk described by a fuzzy number B. The following proposition offers a necessary and sufficient condition that by this change, the optimal prevention level drops. Proposition 6.1 The following assertions are equivalent: (i) e∗6 ≤ e∗4 ; E (v(w2 −l+B))−Ef (v(w2 +B)) ≤ 1. (ii) f v(w2 −l)−v(w2 ) Proof. By (4.4), (4.9) and taking into account that −Ef (u′ (w1 − e∗6 + A)) < 0, the following assertions are equivalent: • e∗6 ≤ e∗4 ; • V4′ (e∗6 ) ≥ V4′ (e∗4 ) = 0; • −Ef (u′ (w1 − e∗6 + A)) + p′ (e∗6 )[v(w2 − l) − v(w2 )] ≥ 0; 2 −l)−v(w2 ) • −Ef (u′ (w1 −e∗6 +A))+Ef (u′ (w1 −e∗6 +A)) Ef (v(w2v(w −l+B))−Ef (v(w2 +B)) ≥ 0; • −Ef (u′ (w1 − e∗6 + A))[1 − • • v(w2 −l)−v(w2 ) Ef (v(w2 −l+B))−Ef (v(w2 +B)) ] 2 −l)−v(w2 ) 1 − Ef (v(w2v(w −l+B))−Ef (v(w2 +B)) ≤ Ef (v(w2 −l+B))−Ef (v(w2 +B)) ≤ 1. v(w2 −l)−v(w2 ) 0; 10 ≥ 0; Corollary 6.2 If v ′′′ > 0 and Ef (B) = 0 then e∗6 ≤ e∗4 . Proof. By Lemma 5.4, condition (ii) of Proposition 6.1 is fulfilled. The previous corollary shows that for a prudent agent (in period 2), adding a possibilistic background risk B to an already existing possibilistic background risk A leads to the raise in the optimal prevention. Case 2 (the comparison of e∗5 and e∗6 ) One considers the model 5 with a possibilistic background risk B in period 2. We intend to see how the optimal prevention changes if we pass to model 6, by adding a possibilistic background risk A in period 1. Proposition 6.3 The following assertions are equivalent: (i) e∗6 ≤ e∗5 ; (ii) u′ (w1 − e∗6 ) ≤ Ef (u′ (w1 − e∗6 + A)). Proof. By (4.6) and (4.9) the following equivalences hold: e∗6 ≤ e∗5 iff V5′ (e∗6 ) ≥ V5′ (e∗5 ) = 0 iff −u′ (w1 − e∗6 ) + p′ (e∗6 )[Ef (v(w2 − l + B)) − Ef (v(w2 + B))] ≥ 0 iff −u′ (w1 − e∗6 ) + Ef (u′ (w1 − e∗6 + A)) ≥ 0 iff u′ (w1 − e∗6 ) ≤ Ef (u′ (w1 − e∗6 + A)). Corollary 6.4 If u′′′ > 0 and Ef (A) = 0 then e∗6 ≤ e∗5 . Proof. By applying Proposition 2.2, from u′′′ > 0 and Ef (A) = 0 it follows that condition (iii) of Proposition 6.3 is verified. Case 3 (the comparison of e∗1 and e∗7 ) One considers model 1 with a probabilistic background risk in period 1 and one passes to model 7 by adding a possibilistic background risk in period 2. Proposition 6.5 The following assertions are equivalent: (i) e∗7 ≤ e∗1 ; E (v(w2 −l+B))−Ef (v(w2 +B)) (ii) f ≤1 v(w2 −l)−v(w2 ) Proof. Recall from [4] (or from Section 3, Model 1) that V1′ (e) = −M (u′ (w1 − e + X)) + p′ (e)[v(w2 − l) − v(w2 )]. Then, by (4.11) the following assertions are equivalent: • e∗7 ≤ e∗1 • V1′ (e∗7 ) ≥ V1′ (e∗1 ) = 0 • −M (u′ (w1 − e∗7 + X)) + p′ (e∗7 )[v(w2 − l) − v(w2 )] ≥ 0 11 • −M (u′ (w1 − e∗7 + X))[1 − • Ef (v(w2 −l+B))−Ef (v(w2 +B)) v(w2 −l)−v(w2 ) v(w2 −l)−v(w2 ) Ef (v(w2 −l+B))−Ef (v(w2 +B)) ] ≥0 ≤1 Corollary 6.6 If v ′′′ > 0 and Ef (B) = 0 then e∗7 ≤ e∗1 . Proof. By [4], if v ′′′ > 0 and Ef (B) = 0 then condition (ii) of Proposition 6.5 is fulfilled. 7 Concluding remarks The five models from the paper deal with the optimal prevention in the presence of some risk situations possibilistically described (by fuzzy numbers) or mixed (by combinations of random variables and fuzzy numbers). They come in addition to probabilistic models of optimal saving developed by Courbage and Rey in [4]. The main results from the paper establish necessary and sufficient conditions for the optimal prevention increase or decrease when we add a possibilistic or mixed risk to the benchmark model. Next we will state several research topics which could be investigated in line to this paper. (I) Among the entities which define the benchmark model from Section 4, the probability p(e) has an essential role. Also, all the eight background risk models from Section 5 contain this probability as the defining element. Accordingly, even if the background risk is possibilistic or mixed, in the presence of p(e), each model still preserves a probabilistic trace. We could modify the nature of p(e) in the following way: Case A: ”p(e) is the possibility that a loss l occurs at the prevention level e” Case B: ”p(e) is the credibility 2 that a loss l occurs at the prevention level e” Study the optimal prevention in models in which p(e) is a possibility (Case A) and a credibility (Case B), respectively. (II) Both the definition of prevention models (total utility function, the first– order condition, etc.), and the optimal prevention level comparison theorems were formulated in terms of possibilistic expected utility, probabilistic expected utility or both of them. On the other hand, in the literature there exists a second notion of possibilistic expected utility (see for example [15], Section 4.2), as well as the concept of expected utility operator (see [15], Chapter 5), which comprises both of them. Generalize the prevention models from the paper in a general context founded on expected utility operators. 2 For the definition of credibility and its properties, see the monograph [19] or Chapter 8 from [15]. 12 (III) In order to reduce the action of various types of risk, an agent has within his reach several instruments: saving, self–protection and self–insurance (according to [17]). A precautionary motive of an agent is defined in [17] as ”the extent to which the agent chooses an instrument for the response to a future risk”. In paper [17] it is analyzed the way the intensity of precautionary motives is influenced by the choice of various combinations of instruments as well as the interaction of considered types of risk. An open problem is to develop models of precautionary saving analysis corresponding to combinations of the same three instruments (saving, self–protection and self–insurance), but in which the risk parameters are probabilistic, possibilistic or mixed. References [1] C. Carlsson, R. Fullér, On possibilistic mean value and variance of fuzzy numbers. Fuzzy Sets Syst, 122, 2001, 315–326. [2] C. Carlsson, R. Fullér, Possibility for decision. Springer, 2011. [3] A. M. Lucia-Casademunt, I. Georgescu, Optimal saving and prudence in a possibilistic framework, DCAI, Volume 217, Advances in Intelligent Systems and Computing, 2013, pp 61-68 [4] C. Courbage, B.Rey, Precautionary saving in the presence of other risks. Economic Theory, 32, 2007, 417–424 [5] C. Courbage, B. Rey, N. Treich, Prevention and precaution, in G. Dionne (ed.), Handbook of Insurance, Huebner International Series on Risk, Insurance and Economic Security (New York Springer), New York, pp. 184–204 [6] C. Courbage, H. Loubergé, R. Peter, Optimal prevention for multiple risks, J. of Risk and Insurance, 2016, in press [7] G. Dionne, L. Eeckhoudt, Self-insurance, self-protection and increased risk aversion, Economics Letters, 17(1–2), 1985, pp. 39–42. [8] D. Dubois,H. Prade, Fuzzy sets and systems: theory and applications. New York:Academic Press, 1980. [9] D. Dubois,H. Prade, Possibility theory. New York:Plenum Press, 1988. [10] L. Eeckhoudt, C. Gollier, H. Schlesinger, Economic and financial decisions under risk. Princeton University Press, 2005. [11] L. Eeckhoudt, C. Gollier, The impact of prudence on optimal prevention, Economic Theory, 26, 2005, pp. 989–994. 13 [12] L. Eeckhoudt, R. J. Huang, L. Y. Tzeng, Precautionary effort: a new look, J. of Risk and Uncertainty, 79(2), 2012, pp. 585–590. [13] I. Ehrlich, G. S. Becker, Market insurance, self-insurance, and selfprotection, The Journal of Political Economy, 1972, pp. 623-648. [14] R. Fullér, P. Majlender, On weighted possibilistic mean and variance of fuzzy numbers, Fuzzy Sets and Systems 136(3) 16 June 2003, pp. 363-374. [15] I. Georgescu, Possibility theory and the risk, Springer, 2012 [16] I. Georgescu, Risk aversion, prudence and mixed optimal saving models, Kybernetika, 50(5), 2014, pp. 706–724. [17] C. Heinzel, R. Peter, Precautionary motives under multiple instruments, 2015, available at http://afse2015.sciencesconf.org/61592/document [18] M. S. Kimball, Precautionary saving in the small and in the large, Econometrica, 58, 1990, pp. 53–73. [19] B. Liu, Uncertainty Theory, Springer-Verlag, Berlin, 2004. 14
5cs.CE
arXiv:1409.0733v2 [math.ST] 6 Jun 2016 Bernoulli 22(4), 2016, 2177–2208 DOI: 10.3150/15-BEJ725 Integral approximation by kernel smoothing BERNARD DELYON1 and FRANÇOIS PORTIER2 1 Institut de recherches mathématiques de Rennes (IRMAR), Campus de Beaulieu, Université de Rennes 1, 35042 Rennes Cédex, France. E-mail: [email protected] 2 Institut de Statistique, Biostatistique et Sciences Actuarielles (ISBA), Université catholique de Louvain, Belgique. E-mail: [email protected] Let (X1 , . . . , Xn ) be an i.i.d. sequence of random variables in Rd , d ≥ 1. We show that, for any function ϕ : Rd → R, under regularity conditions, ! Z n X ϕ(Xi ) P 1/2 −1 n n − ϕ(x) dx −→ 0, fb( Xi ) i=1 where fb is the classical kernel estimator of the density of X1 . This result is striking because it speeds up traditional rates, in root n, derived from the central limit theorem when fb = f . Although this paper highlights some applications, we mainly address theoretical issues related to the later result. We derive upper bounds for the rate of convergence in probability. These bounds depend on the regularity of the functions ϕ and f , the dimension d and the bandwidth of the kernel estimator fb. Moreover, they are shown to be accurate since they are used as renormalizing sequences in two central limit theorems each reflecting different degrees of smoothness of ϕ. As an application to regression modelling with random design, we provide the asymptotic normality of the estimation of the linear functionals of a regression function. As a consequence of the above result, the asymptotic variance does not depend on the regression function. Finally, we debate the choice of the bandwidth for integral approximation and we highlight the good behavior of our procedure through simulations. Keywords: central limit theorem; integral approximation; kernel smoothing; nonparametric regression 1. Introduction Let (X1 , . . . , Xn ) be an i.i.d. sequence of random variables in Rd , d ≥ 1. We show that, for any function ϕ : Rd → R, under regularity conditions, n−1 Z n X ϕ(Xi ) − ϕ(x) dx = oP (n−1/2 ), fb(i) (Xi ) i=1 This is an electronic reprint of the original article published by the ISI/BS in Bernoulli, 2016, Vol. 22, No. 4, 2177–2208. This reprint differs from the original in pagination and typographic detail. 1350-7265 c 2016 ISI/BS (1) 2 B. Delyon and F. Portier where fb(i) is the classical leave-one-out kernel estimator of the density of X1 say f , defined by X −1 fb(i) (x) = ((n − 1)hd ) K(h−1 (x − Xj )) for every x ∈ Rd , 1≤j≤n,j6=i where K is a d-dimensional kernel and where h, called the bandwidth, needs to be chosen and will certainly depend on n. Result (1) and the central limit theorem lead to the following reasoning: when estimating the integral of a function that is evaluated on a random grid (Xi ), whether f is known or not, using a kernel estimator of f provides better convergence rates than using f itself. Result (1) certainly has some consequences in the field of integral approximation. In this area, many deterministic as well as random methods are available. Accuracy with respect to computational time is the usual trade-off that allows to compare them. The advantages of random over deterministic framework lie in their stability in highdimensional settings. For a comprehensive comparison between both approaches, we refer to [8]. Among random methods, importance sampling is a widely used technique that basically reduces the variance of the classical Monte–Carlo integration through a good choice of the sampling distribution f , called the sampler. Estimators are unbiased having Pn the form n−1 i=1 ϕ(Xi )/f (Xi ) with Xi ∼ f . Regarding the mean squared error (MSE), the optimal sampler f ∗ is unique and depends on ϕ (see Theorem 6.5 in [8], page 176). Among others, parametric [18] and nonparametric [25] studies focused on the estimation of the optimal sampler. Equation (1) indicates a new weighting of the observations ϕ(X1 ), . . . , ϕ(Xn ). Each weight fb(i) (Xi ) reflects how isolated is the point Xi among the sample. Therefore, our estimator takes into account this information by giving more weight to an isolated point. In summary our procedure, which is adaptive to the design points enjoys the following advantages: • Faster than root n rates, • one-step estimation based on a unique sample (X1 , . . . , Xn ), • each Xi drawn from f , possibly unknown. To the best of our knowledge, when the design is not controlled, no such rates have been obtained. In many semiparametric problems, it has been an important issue to construct root n estimators, possibly efficient [1], that rely on a kernel estimator of the nuisance parameter. Among others, it was addressed by Stone in [21] in the case of the estimation of a location parameter, by Robinson in [19] in the partially linear regression model, or by Härdle and Stoker in [16] studying the single index model. The result in equation (1), which would be seen as a superefficient estimator in theRLe Cam’s theory, cannot be linked actually to this theory since the quantity of interest ϕ(x) dx does not depend on the distribution of X1 . As a result, the link between our work and the semiparametric literature relies mainly on the plug-in strategy we employed, by substituting the density f by a kernel estimator. In this paper, we propose a comprehensive study of the convergence stated in equation (1). A similar result was originally stated by Vial in [24] (Chapter 7, equation (7.27)), Integral approximation by kernel smoothing 3 as a lemma in the context of the multiple index model. To the best of our knowledge, this type of asymptotic result has not been addressed yet as a particular problem. Our theoretical aim is to extend result (1) by: (A) Being more precise about the upper bounds: How does the dimension d, the window h, the regularity of ϕ and f , impact these bounds? (B) Showing central limit theorems by specifying the regularity of ϕ. To achieve this program, we need to introduce a corrected version of the estimate (1) for which the bias has been reduced. First, the corrected estimator is shown to have better rates of convergence than the initial one. Second, it is shown to be asymptotically normal with rates nhd/2 in the case where ϕ is very regular, and with rates (nh−1 )1/2 in a special case in which ϕ jumps at the boundary of its support. To compute the asymptotic distribution, we rely on the paper by Hall [12], where a central limit theorem for completely degenerate U -statistics has been obtained. An important point is that we have succeeded in proving our result with much weaker assumptions on the regularity of ϕ than on the regularity of f . For instance, equation (1) may hold even when ϕ has some jumps. However, the estimation of f is subject to the curse of dimensionality, that is, f is required to be smooth enough regarding the dimension of X1 . Our aim is also to link equation (1) to nonparametric regression with random design, that is, the model Yi = g(Xi ) + σ(Xi )ei with g unknown and ei i.i.d. with ei ⊥ ⊥ Xi . In particular, we obtain the asymptotic normality for the estimators of the linear functionals of g. Thanks to the fast rates detailed previously, the asymptotic distribution does not depend on the function g. The paper is organized as follows. Section 2 deals with technical issues related to equation (1). In particular, we examine the rates of convergence of (1) according to the choice of the bandwidth, the dimension and the regularity of the functions ϕ and f . Section 3 is dedicated to the convergence in distribution of our estimators. In Section 4, we show how to apply equation (1) to the problem of the estimation of the linear regression functionals. Finally, in Section 5, we give some simulations that compare our method with the traditional Monte–Carlo procedure for integration. The proofs and the technicalities are postponed in Section 6 at the end of the paper. 2. Rates of convergences faster than root n In this section, we first provide upper bounds on the rates of convergence in probability of our estimators. Our main purpose is to show that rates faster than root n hold in a R wide range of parameter settings for the estimation of ϕ(x) dx. Second, we argue that those faster thanR root n rates have no reason to hold when estimating other functionals of the type f 7→ T (x, f (x)) dx. 4 B. Delyon and F. Portier 2.1. Main result Let Q ⊂ Rd be the support of ϕ. The quantity I(ϕ) = b I(ϕ) = n−1 R ϕ(x) dx is estimated by n X ϕ(Xi ) . fb(i) (Xi ) i=1 Actually, this estimator can be modified in such a way that the leading error term of its expansion vanishes asymptotically (see Remark 9 for more details). For that, we define vb(i) (x) as −1 vb(i) (x) = ((n − 1)(n − 2)) X 1≤j≤n,j6=i 2 (h−d K(h−1 (x − Xj )) − fb(i) (x)) . It is, up to a factor (n−1)−1 , the leave-one-out estimator of the variance of h−d K(h−1 (x− Xj )). The corrected estimator is Ibc (ϕ) = n−1   n X ϕ(Xi ) vb(i) (Xi ) 1− . b(i) (Xi ) fb(i) (Xi )2 i=1 f b To state our main result about the convergences of I(ϕ) and Ibc (ϕ), we define the Nikolski class of functions H(s, M ) of regularity s = k + α, k ∈ N, 0 < α ≤ 1, with constant M > 0, as the set of bounded and k times differentiable functions ϕ whose all derivatives of order k satisfy [23] Z 2 (ϕ(l) (x + u) − ϕ(l) (x)) dx ≤ M |u|2α , l = (l1 , . . . , ld ), d X i=1 li ≤ k, where | · | stands for the Euclidean norm and the li ’s are natural integer. Be careful that k cannot be equal to s. We say that K is a kernel with order r ∈ N∗ as soon as K : Rd 7→ R is bounded and satisfies Z K(x) dx = 1, Z l x K(x) dx = 0, l = (l1 , . . . , ld ), 0 < d X i=1 li ≤ r − 1 with the notation xl = xl11 × · · · × xldd . The following assumptions are needed to show our first result, they are discussed after the statement. (A1) For some s > 0 and M > 0, the support of ϕ is a compact set Q ⊂ Rd and ϕ is H(s, M ) on Rd . (A2) For some integer r ≥ 1, the variable X1 has a bounded density f on Rd such that its rth order derivatives are bounded. (A3) For every x ∈ Q, f (x) ≥ b > 0. 5 Integral approximation by kernel smoothing Table 1. Best acceleration of convergence rate in Theorem 1. Best rate acceleration n−β obtained with h ∝ n−γ β γ Equation (i) 2s ≤ r − d s 2(s+d) 1 2(s+d) 0 < r − d ≤ 2s (r−d) 2(r+d) 1 r+d d ≤ 2s ≤ r − d/2 (r−d/2) 2r+d s 2s+d 1 r+d/2 1 2s+d r ≤ 3d/2 and 0 < 4r − 3d ≤ 6s 4r−3d 2(3d+2r) 3 3d+2r 2s ≤ d and 6s ≤ 4r − 3d 2s 2s+3d 2 2s+3d Equation (ii) d ≤ r − d/2 ≤ 2s R (A4) The kernel K has order r and K(x) dx = 1. Moreover, there exists m1 > 0 and m2 > 0 such that, for every x ∈ Rd , |K(x)| ≤ m1 exp(−m2 |x|). In addition K is symmetric: K(x) = K(−x). The next theorem is proved in Section 6. Theorem 1. Under the assumptions (A1) to (A2), we have the following OP estimates b n1/2 (I(ϕ) − I(ϕ)) = OP (hs + n1/2 hr + n−1/2 h−d ), n1/2 (Ibc (ϕ) − I(ϕ)) = OP (hs + n1/2 hr + n−1/2 h−d/2 + n−1 h−3d/2 ), (i) (ii) which are valid if the sums inside the OP ’s tend to zero. Remark 1. Assumption (A2) about the smoothness of f is crucial to guarantee a rate faster than root n in Theorem 1. On the one hand, one needs r > d to obtain such a rate in equation (i), on the other hand, r > 3d/4 suffices to get this rate in equation (ii). Otherwise there does not exist h such that the bounds in Theorem 1 go to 0. This phenomenon is often referred as the curse of dimensionality. In equation (i) (resp., (ii)), when h ∝ n−γ , the best choice of γ depends on r and s; it balances two of the three (resp., four) terms while letting the other one(s) smaller. Precise rate acceleration for each situation is given in Table 1. As in many semiparametric problems (see, e.g., [16], Section 4.1), our estimator of f is suboptimal with respect to the density estimation problem (see [22]). Indeed, to achieve the optimal rates in density estimation one would need to take h ∝ n−1/(2r+d) which would even prevent n1/2 hr to go to 0 in Theorem 1. A practical bandwidth selection is proposed Section 5. Remark 2. Assumption (A2) prevents from bias problems in the estimation of f that may occur at the borders of Q. Indeed, if f jumps at the boundary of Q, then our estimate 6 B. Delyon and F. Portier of f would be asymptotically biased and the rates provided in Theorem 1 would not hold. To get rid of this problem, if one knew the support of f , one could correct by hand the estimator as, for instance, in [17], or might use Beta kernels as detailed in [3]. Remark 3. Assumption (A3) basically says that f is separated from 0 on Q. The exponential bound on the kernel in assumption (A4) guarantees that f is estimated uniformly on Q (see [5]). This helps to control the random denominators fb(i) (Xi )’s in b the expression of I(ϕ) and Ibc (ϕ). In the context of Monte–Carlo procedures for integral approximation, assumptions (A2) and (A3) are not that restrictive because one can draw the Xi ’s from a distribution smooth enough and whose support contains the integration domain. Remark 4. The use of leave-one-out estimators fb(i) and vb(i) in Ibc (ϕ) are not only justified by the simplification they involve in the proofs. It also leads to better convergence rates. Consider the term R0 in the proof of equation (ii) in Theorem 1, when replacing the leave-one-out estimator of f by the classical one, R0 remains a degenerate U -statistic but with nonzero diagonal terms. It is possible to show that these terms are leading terms of the resulting expansion. They imply a rate of convergence of order n−1/2 h−d which is larger than the rate we found for Ibc (ϕ). b However, concerning I(ϕ), the leave-one-out estimator is not necessary to get (i). The leave-one-out estimator being indeed at a distance O(n−1 h−d ) from the ordinary one, the change would made a difference of order at most n−1/2 h−d in the left-hand side of (i), which already appears in the right-hand side of (i). Remark 5. The function class H(s, M ) contains two interesting sets of functions that provide different rates of convergence in Theorem 1. First, if ϕ is α-Hölder on Rd with Hölder constant M1 , and has bounded support, then ϕ is H(α, M1 ) on Rd . Second, if the support of ϕ is a convex body (compact convex set with non-empty interior) and ϕ is α-Hölder (with constant M1 ) inside its support (e.g., the indicator of a ball) then there exists M2 > 0 such that ϕ is H(min(α, 1/2), M2 ) on Rd (see Lemma 9 in the Section 6). Then, because the sum of two Nikolski functions is still Nikolski, the assumptions of Theorem 1 are valid for a wide range of integrand. Moreover, note that a loss of smoothness at the boundary of the support involves a loss in the rates of convergence (i) and (ii). More precisely, whatever the smoothness degree of ϕ inside its support, if continuity fails at the boundary, then the Nikolski regularity would be at most 1/2 and, therefore, the rates acceleration in Theorem 1 could not exceed h1/2 . In Section 3, we study such an example and show a central limit theorem with such a rate. Remark 6. The symmetry assumption in (A4) is actually superfluous, but simplifies the proof, because in this case we do not have to distinguish the convolution with K(x) and the convolution with K(−x). 7 Integral approximation by kernel smoothing 2.2. On the generalization of Theorem 1 In view of the intriguing convergence rates stated in Theorem 1, one may be curious to know the behavior of our estimator when estimating more general functionals with the form Z IT = T (x, f (x)) dx, where T : Rd × R+ → R. Following the same approach as previously, the estimator we consider is IbT = n−1 n X T (Xi , fb(i) (Xi )) fb(i) (Xi ) i=1 . It turns out that T given by (x, y) 7→ ϕ(x) is the only case for which the rates are faster √ than root n. For other functionals and a wide range of bandwidth, n(IbT − IT ) converges to a normal distribution. In view of the negative aspect of this result with respect to the statement of Theorem 1, we provide an informal calculation of the asymptotic law of √ n(IbT − IT ). We require that (A2) to (A4) hold and that nh2r → 0 and nh2d → +∞ (the latter guarantees faster than root n rates in equation (i)). If y 7→ T (x, y) has a bounded (uniformly in x) second-order derivative, using a Taylor expansion with respect to the second coordinate of T (the first-order derivative of T with respect to the second coordinate is further denoted by ∂2 T ), we have n1/2 (IbT − IT ) = n−1/2 n  X T (Xi , f (Xi )) fb(i) (Xi ) i=1 − IT + ∂2 T (Xi , f (Xi ))(fb(i) (Xi ) − f (Xi )) fb(i) (Xi )  e2 , +R e2 can be treated by standard techniques of kernel estimation (see equations (12) where R and (17) for details), this gives that, with probability going to 1, e2 | ≤ Cn−1/2 |R n X (fb(i) (Xi ) − f (Xi ))2 i=1 fb(i) (Xi ) = OP (n1/2 h2r + n−1/2 h−d ) = oP (1), where C > 0 does not depend on n or h. Then we write √ e0 + R e1 + R e2 , n(IbT − IT ) = R with e0 = n−1/2 R e1 = n−1/2 R n  X T (Xi , f (Xi )) i=1 fb(i) (Xi ) ∂2 T (Xi , f (Xi ))f (Xi ) − IT − + fb(i) (Xi )  Z n  X ∂2 T (Xi , f (Xi )) − ∂2 T (x, f (x))f (x) dx . i=1 Z  ∂2 T (x, f (x))f (x) dx , 8 B. Delyon and F. Portier If x 7→ T (x, f (x)) and x 7→ ∂2 T (x, f (x))f (x) are Nikolski, applying Theorem 1 gives that e1 is e0 = oP (1). As a consequence √n(IbT − IT ) = oP (1) if and only if the variance of R R degenerate, that is equivalent to ∂2 T (Xi , f (Xi )) = c a.s. If we want this to be true for a reasonably large class of distribution functions, it would imply ∂2 T (x, y) = c for all (x, y) ∈ Rd × R+ , for which the solutions have the form T (x, y) = ϕ(x) + cy. 3. Central limit theorem In the previous section, we derived upper bounds on the convergence rates in probability under fairly general conditions. In this section, by being a little more specific about the regularity of ϕ, we are able to describe precisely the asymptotic distribution of Ibc (ϕ) − I(ϕ). Actually the approach is to decompose the latter quantity as a sum of a U statistic Un plus a martingale Mn with respect to the filtration {X1 , . . . , Xn }, plus a bias term Bn that is non-random (see the beginning of Section 6.2 for the definitions of Un , Mn , Bn ). Then existing results about the asymptotic behavior of completely degenerate U -statistics [12] and martingales [13] will help to derive the asymptotic distribution. We shall consider two cases. First, we present the case where ϕ is smooth enough so that the dominant term is Un , and second we study an example where ϕ is not continuous at the boundary of its support. As a consequence, the dominant term is Mn . b For I(ϕ) − I(ϕ), the situation is less interesting since for most of the choice of h a (non-random) bias term leads the asymptotic decomposition (see Remark 9). 3.1. Smooth case The smooth case corresponds to situations where the functions f and ϕ are smooth enough, that is, r > 3d/2 and 2s > d. This is highlighted by the assumptions on the bandwidth in the next theorem. Theorem 2. Under the assumptions (A1) to (A4), if nh2d → +∞, nhr+d/2 → 0 and nh2s+d → 0, the random variable nhd/2 (Ibc (ϕ) − I(ϕ)) is asymptotically normally distributed with zero-mean and variance given by 2 Z Z Z (K(u + v) − K(v))K(u) du dv ϕ(x)2 f (x)−2 dx. Integral approximation by kernel smoothing 9 The assumptions on the bandwidth are not satisfied by the optimal bandwidths displayed in Table 1. This is, in fact, a presentation issue. Indeed we have chosen to make the bias term Bn vanish so that any optimal bandwidth that balances the bias and the variance is excluded. We could have proceeded the other way around, by stating that nhd/2 (Ibc (ϕ) − I(ϕ) − Bn ) has the same limiting distribution as in Theorem 2, provided that nh2d → +∞ and nh2 min(r,s)+d → 0. One can verify that this holds true for the optimal bandwidth given in the first line of Table 1 for equation (ii). 3.2. A non-smooth example We are interested in the case where ϕ is not sufficiently regular so that Mn is no longer negligible with respect to Un , that is, nh2 min(r,s)+d does not go to 0. This occurs whenever s < d/2. In this case the variance is hard to compute since it depends on the behavior of Mn and therefore on the rate of convergence of the kernel regularization of ϕ. Hence, a precise description cannot be provided by considering usual regularity classes, for example, Hölder, Nikolski or Sobolev since they only provide bounds on the rate of kernel regularization. For this reason, we consider a particular case where the function ϕ is Nikolski inside Q and vanishes outside. Typical functions we have in mind are the one that jump at the boundary of their support. Lemma 9 informs us that such functions are Nikoslki with regularity 1/2. For Q ⊂ Rd compact and x ∈ ∂Q, we define ZZ LQ (x) = min(hz, u(x)i, hz ′ , u(x)i)+ K(z)K(z ′ ) dz dz ′ , where u(x) is the unit normal outer vector of Q at the point x. We need the following assumption in place of (A1). (B1) For some s > 1/2 and M > 0, the support of ϕ is a convex body Q ⊂ Rd with C 2 boundary and ϕ is H(s, M ) on Q. Theorem 3. Under the assumptions (A2) to (A4) and (B1), if nh(3d+1)/2 → +∞ and nh2r−1 → 0 the random variable (nh−1 )1/2 (Ibc (ϕ) − I(ϕ)) is asymptotically normally distributed with zero-mean and variance given by Z LQ (x)ϕ(x)2 dHd−1 (x), ∂Q where Hd−1 stands for the (d − 1)-dimensional Hausdorff measure. 4. Application to nonparametric regression Equation (1) has applications in nonparametric regression with random design. Let Yi = g(Xi ) + σ(Xi )ei , (3) 10 B. Delyon and F. Portier where (ei ) is an i.i.d. sequence of real random variables with mean 0 and unit variance, independent of the sequence (Xi ), and σ : Rd → R and g : Rd → R are unknown functions. Let Q ⊂ Rd be a compact set and L2 (Q) be the Hilbert space of squared-integrable functions on Q. Let ψ ∈ L2 (Q) be extended to Rd by 0 outside of Q (ψ has compact support Q). The inner product in L2 (Q) between the regression function g and ψ, is given by c= Z g(x)ψ(x) dx, note that if ψ belongs to a given basis of L2 (Q), then c is a coordinate of g in this basis. Among typical applications, we can mention Fourier coefficients estimation for either nonparametric estimation (see, e.g., [14], Section 3.3), or location parameter estimation (see [11]). We also mention the link with the estimation of the index in the single index model (see [16]). The estimation of the linear functionals of g is a typical semiparametric problem in the sense that it requires the nonparametric estimation of the density f of X1 as a first step and then to use it in order to estimate a real parameter. To the best of our knowledge, in the case of a regression with unknown random design, estimators that achieve root n consistency have not been provided yet (see, e.g., [14] and the reference therein). Our approach is based on kernel estimates fb(i) of the density of X1 that are then plugged into the classical empirical estimator of the quantity E[Y ψ(X)f (X)−1 ]. We define the estimator to derive the asymptotic of √ b c = n−1 n X Yi ψ(Xi ) i=1 fb(i) (Xi ) , n(b c − c), we use model (3) to get the decomposition √ n(b c − c) = A + B, with A = n−1/2 n X σ(Xi )ψ(Xi ) i=1 B=n −1/2 fb(i) (Xi ) ei , n  X g(Xi )ψ(Xi ) i=1 fb(i) (Xi ) − Z  g(x)ψ(x) dx . Roughly speaking, Theorem 1 provides that B is negligible with respect to A. As a result, √ c − c) and, therefore, the limiting distribution can A carries the weak convergence of n(b be obtained making full use of the independence between the Xi ’s and the ei ’s. In order 11 Integral approximation by kernel smoothing to achieve such a program, this assumption is needed. (C1) For some s > 0 and M > 0, the support of ψ is a compact set Q ⊂ Rd and both ψ and g are H(s, M ) on Rd . The following theorem is proved in Section 6. Theorem 4. Under the assumptions (A2) to (A4), and (C1), if n1/2 hr → 0 and n1/2 hd → +∞, then the random variable n1/2 (b c − c) is asymptotically normally distributed with zero-mean and variance   σ(X1 )ψ(X1 ) . v = Var f (X1 ) Remark 7. Let us compare b c with the appealing estimator c = n−1 e n X Yi ψ(Xi ) i=1 f (Xi ) which requires the knowledge of f . First, if the signal is observed without noise, that is, Yi = g(Xi ), then n1/2 (b c − c) goes to 0 in probability whereas e c is asymptotically normal. Secondly, when there is some noise in the observed signal, meaning that σ(X1 ) is not 0, the comparison can be made regarding their asymptotic variances. Since we have v ≤ Var(n1/2 (e c − c)), it is asymptotically more efficient to plug the nonparametric estimator of f than to use f directly. Remark 8. The set Q reflects the domain where g is studied. Obviously, the more dense the Xi ’s in Q, the more stable the estimation. Nevertheless, it could happen that f vanishes on some point on Q and this is not taken into account by our framework. In such situations, one may adapt the estimation from the sample by ignoring the design points on which the estimated density takes too small values. The estimator b c might be replaced by n−1 n X Yi ψ(Xi ) i=1 fb(i) (Xi ) 1{fb(i) (Xi )>b} , where b > 0 will certainly depend on n. This method, often referred as trimming, has been employed in [16] and [4] and guarantees computational stability as well as theoretical properties. Even if such an approach is feasible here, it seems far beyond the scope of the article. 12 B. Delyon and F. Portier 5. Simulations In this section, we provide some insights about the implementation and the practical behavior of our integral approximation procedure. In particular, we propose an adaptive procedure that selects the bandwidth for the kernel smoothing. While our theoretical study highlighted that our estimators suffers from the curse of dimensionality (see Remark 1), our simulation results confirm that the estimation accuracy of our methods diminishes when the dimension increases. In dimension 1, our procedure outperforms by far the Monte–Carlo method. In moderate sample size (from 200 to 5000) up to dimension 4, our method still realizes a significant improvement over the Monte–Carlo method. The simulations are conducted under fairly general design distributions that do not necessarily satisfy assumption (A2) (e.g., equation (7)). 5.1. Kernel choice In the whole simulation study, our estimator of the density of the design is based on the kernel K(x) = 21 c−1 d (d + 1)(d + 2 − (d + 3)|x|)1|x|<1 , cd = 2π d/2 , dΓ(d/2) where cd is the volume of the unit ball in dimension d. This kernel is radial with order 3. 5.2. Bandwidth choice One may follow [15] to select the optimal bandwidth by a plug-in method. It requires to optimize an asymptotic equivalent of the MSE with respect to h. In Section 3, we b highlighted that the limiting distribution of I(ϕ)− I(ϕ), and so the MSE, depends heavily on the degree of smoothness of ϕ. In practice, the regularity of ϕ is often unknown, as a result, we prefer a simulation–validation type strategy. The idea is to pick the value h which gives the best result for the estimation of the integral I(ϕ) e of a test function ϕ e which looks like ϕ, and for which I(ϕ) e is known. We choose this test function as   n X ϕ(Xi ) −d e x − Xi ϕ(x) e = n−1 h0 K , (4) b(i) (Xi ) h0 i=1 f e is simply the Epanechnikov kernel where K 2 e K(x) = 12 c−1 d (d + 2)(1 − |x| )1|x|<1 . (5) 13 Integral approximation by kernel smoothing Since we know that I(ϕ) e = Z ϕ(x) e dx = n−1 n X ϕ(Xi ) , b f (i) (Xi ) i=1 b ϕ) we just take the value of h for which the estimate I( e is closest to I(ϕ); e there is actually b b two values, one for I(ϕ) e and one for Ic (ϕ). e The smoothing parameter h0 is chosen using the rule of thumb given by h0 = σ  d2d+5 Γ(d/2 + 3) (2d + 1)n 1/(4+d) , (6) where σ 2 is the mean of the estimated variances of each component (see [20], Section 4.3.2). The density estimates fb(i) (Xi ) in (4) are computed with the same value h0 and the same kernel. We did not try to use a resampling method, thinking that it is better to have h adapted to the specific sample. 5.3. First model In this model, f is a normal distribution   1 1 Xi ∼ N , Id , 2 4 ϕ(x) = d Y 2 sin(πxk )2 10≤xk ≤1 . k=1 The integral of ϕ is 1. Figure 1 shows simulations for different values of n and d, and using equations (4), (5) and (6) for the choice of h. 5.4. Second model In this second model, the assumptions are not satisfied since the distribution is uniform over the unit cube, we have Xi ∼ U([0, 1]d), ϕ(x) = d Y 2 sin(πxk )2 10≤xk ≤1 . (7) (8) k=1 In spite of the fact that (A2) is not any more satisfied, good results are still possible because ϕ cancels at the boundary of the cube. For the choice of h, we used equation (4), 14 B. Delyon and F. Portier b Figure 1. Each boxplot is based on 100 estimates Ibc (ϕ), I(ϕ) and Monte–Carlo method noted b IMC for the first model with different values of n and d. (5) but, it is important to constrain the function ϕ e to have its support on the cube, and a way to do this is to remove the boundary terms out of (4) by choosing now ϕ(x) e = |J|−1   X ϕ(Xi ) e x − Xi , h−d K 0 h0 fb(i) (Xi ) i∈J (9) J = {i : h < Xij < 1 − h, j = 1 · · · d}. We could have done the other way around, use (4) and simulate uniformly extra points at distance less than h0 of the cube, in order to cover the support of ϕ. e Figure 2 shows the results of the simulations for different values of n and d and using equations (9), (5) and (6) for the choice of h. 6. Proofs Notation The Euclidean norm, the Lp norm and the supremum norm are, respectively, denoted by | · |, k · kp and k · k∞ . We introduce Kh (·) = h−1 K(·/h), and Kij = h−d K(h−1 (Xi − Xj )), 15 Integral approximation by kernel smoothing b Figure 2. Each boxplot is based on 100 estimates Ibc (ϕ), I(ϕ) and Monte–Carlo method noted b IMC for the second model with different values of n and d. fbi = vbi = 1 n−1 X Kij , 1≤j≤n,j6=i 1 (n − 1)(n − 2) X 1≤j≤n,j6=i (Kij − fbi )2 , and for any function g : Rd → R, we define Z gh (x) = g(x − hu)K(u) du, and we put ϕ(x) , q ∈ N, fh (x)q   f (x) e . ψ(x) = ϕ(x) fh (x)2 h ψq (x) = 6.1. Proof of Theorem 1 We start by showing (ii), then (i) will follow straightforwardly. 16 B. Delyon and F. Portier Proof of (ii). The following development reminiscent of the Taylor expansion fh (Xi ) − fbi (fh (Xi ) − fbi )2 (fh (Xi ) − fbi )3 1 1 + + + = , fh (Xi )2 fh (Xi )3 fbi fh (Xi ) fbi fh (Xi )3 allows us to expand our estimator as a sum of many terms, where the density estimate fbi is moved to the numerator, with the exception of the fourth one. We will show that this last term goes quickly to 0. For the linearised terms, this is very messy because the correct bound will be obtained by expanding also fbi in those expressions. In order to sort out these terms, we borrow from Vial [24] the trick of making appear a degenerate U -statistic in such a development (by inserting the right quantity in R0 below). More explicitly, recalling that   n X ϕ(Xi ) vbi − I(ϕ), Ibc (ϕ) − I(ϕ) = n−1 1− fbi fbi2 i=1 we obtain Ibc (ϕ) − I(ϕ) = R0 + R1 + R2 + R3 + R4 + R5 , (10) with (we underbrace terms which have been deliberately introduced and removed) R0 = n R1 = Z −1 n X i=1 e i ) − E[ψ1 (Xi )]), (ψ1 (Xi ) − ψ2 (Xi )fbi + ψ(X | {z } | {z } (f (x)fh (x)−1 −1)ϕ(x) dx, {z } | R2 = n−1 n X i=1 R3 = n−1 n X i=1 R4 = n−1 n X 2 ψ3 (Xi )((fh (Xi ) − fbi ) − vbi ), |{z} n X ψ3 (Xi )b vi i=1 R5 = n−1 e i )), (ψ1 (Xi ) − ψ(X | {z } fbi3 ψ3 (Xi ) i=1 ( fbi3 −fh (Xi )3 ), |{z} (fh (Xi ) − fbi )3 , fbi where b vi appears to be a centering term in R3 . We shall now compute bounds for each term separately. Step 1. kn1/2 R0 k2 = O(n−1/2 h−d/2 ). Note that X R0 = n−1 (n − 1)−1 (E[uij |Xj ] − uij + E[uij |Xi ] − E[uij ]), i6=j 17 Integral approximation by kernel smoothing with uij = ψ2 (Xi )Kij , is a degenerate U -statistic. This is due to the fact that E[uij |Xi ] = ψ2 (Xi )fh (Xi ) = ψ1 (Xi ), e j ). E[uij |Xj ] = (ψ2 f )h (Xj ) = ψ(X The n(n − 1) terms in the sum are all orthogonal with L2 norm smaller than kuij k2 , hence 2 ] ≤ C1 h−d , (n − 1)2 E[R02 ] ≤ E[u212 ] ≤ kψ2 k2∞ E[K12 because of equation (24) in Lemma 7. Step 2. n1/2 R1 = O(n1/2 hr ). This is a consequence of equation (18) of Lemma 6, and from assumption (A3). e Step 3. kn1/2 R2 k2 = O(n1/2 hr + hs ). We can rearrange the function ψ1 (x) − ψ(x) as with e e ψ1 (x) − ψ(x) = (ψ1 (x) − ψ1h (x)) + (ψ1h (x) − ψ(x)), e kψ1h (x) − ψ(x)k ∞ =   f (x) ψ1 (x) − ϕ(x) fh (x)2 h ≤ ψ1 (x) − ϕ(x) = ϕ (fh − f ) fh2 f (x) fh (x)2 ∞ ∞ (11) ∞ ≤ Chr , for some constant C, where the last inequality follows from equation (18) in Lemma 6. Then we have R2 ≤ n−1 n X i=1 (ψ1h (Xi ) − ψ1 (Xi )) + Chr , and by spliting the mean and the variance of the first term we get " E !2 # n 1X 1 2 (ψ1 (Xi ) − ψ1h (Xi )) = E[ψ1 (X1 ) − ψ1h (X1 )] + Var(ψ1 (X1 ) − ψ1h (X1 )), n i=1 n and we conclude by equations (19) and (20) of Lemma 6 (it is an easy exercise to show that ψ1 is Nikolski with regularity min(r, s)). Step 4. kn1/2 R3 k2 = O(n−1/2 h−d/2 ). We first express R3 as a U -statistic. Set 2 Ui = (fh (Xi ) − fbi ) − vbi , 18 B. Delyon and F. Portier and rewrite R3 as R3 = n −1 n X ψ3 (Xi )Ui . i=1 Consider a sequence of real numbers (xj )1≤j≤p and set p 1X xj , m= p j=1 p p X X 1 1 (xj − m)2 = (x2 − m2 ), p(p − 1) j=1 p(p − 1) j=1 j v= then   p X X 1 2 1 2 m −v = 1+ x2j = m − xj xk . p−1 p(p − 1) j=1 p(p − 1) 2 j<k Applying this with xj = Kij − fh (Xi ) (i is fixed) and p = n − 1 we get Ui = 2 (n − 1)(n − 2) X j6=i,k6=i,j<k (Kij − fh (Xi ))(Kik − fh (Xi )) = X 2 ξij ξik , (n − 1)(n − 2) j<k with ξij = Kij − fh (Xi ), ξii = 0. Then R3 = XX 2 ψ3 (Xi )ξij ξik . n(n − 1)(n − 2) i j<k We are going to calculate E[R32 ] by using the Efron–Stein inequality (Theorem 8) and the moment inequalities (23) to (25) for ξij stated in Lemma 7; in particular, by (23), E[R32 ] = Var(R3 ). Consider R3 = f (X1 , . . . , Xn ) as a function of the Xi ’s and define R3′ = f (X1′ , X2 , . . . , Xn ), ′ ξ1i = h−d K(h−1 (X1′ − Xi )) − fh (X1′ ), ′ ξi1 = h−d K(h−1 (Xi − X1′ )) − fh (Xi ), ′ ξij = ξij if i 6= 1 and j 6= 1, 19 Integral approximation by kernel smoothing where X1′ is a copy of X1 independent from the sample (X1 , . . . , Xn ). Then by the Efron– Stein inequality (remember that ξii = 0)  1/2 n kR3 k2 ≤ kR3 − R3′ k2 , 2 which is of order n−5/2 X j<k ≤ n−5/2 ′ ′ (ψ3 (X1 )ξ1j ξ1k − ψ3 (X1′ )ξ1j ξ1k ) +  X j<k XX i 1<k ′ ′ ψ3 (X1 )ξ1j ξ1k − ψ3 (X1′ )ξ1j ξ1k + ′ ψ3 (Xi )(ξi1 − ξi1 )ξik XX 2 1<k i 2 ′ ψ3 (Xi )(ξi1 − ξi1 )ξik 2  = n−5/2 (kT1 k2 + kT2 k2 ). Noting that the terms in the first sum are orthogonal (by independence of ξij and ξik conditionally to Xi and (23)) we obtain kT1 k2 = (n − 1)1/2 (n − 2)1/2 ′ ′ kψ3 (X1 )ξ12 ξ13 − ψ3 (X1′ )ξ12 ξ13 k2 21/2 ≤ 21/2 nkψ3 k∞ kξ12 ξ13 k2 2 2 = 21/2 nkψ3 k∞ E[E[ξ12 ξ13 |X1 ]] 1/2 2 = 21/2 nkψ3 k∞ kE[ξ12 |X1 ]k2 = O(nh−d ) by equation (24). Because the terms of the second sum are orthogonal whenever the values of k are different, we get kT2 k2 = (n − 1)1/2 X i ′ ψ3 (Xi )(ξi1 − ξi1 )ξi2 . 2 By first developing and then using that X1′ is an independent copy of X1 , we obtain X i 2 ′ ψ3 (Xi )(ξi1 − ξi1 )ξi2 2 2 ′ 2 ≤ nE[ψ3 (X3 )2 (ξ31 − ξ31 ) ξ32 ] ′ ′ + n2 |E[ψ3 (X3 )ψ3 (X4 )(ξ31 − ξ31 )ξ32 (ξ41 − ξ41 )ξ42 ]| 2 ′ 2 ] ≤ kψ3 k∞ {nE[(ξ31 − ξ31 ) ξ32 ′ ′ + n2 E[|E[(ξ31 − ξ31 )ξ32 (ξ41 − ξ41 )ξ42 |X3 , X4 ]|]} 2 2 = kψ3 k∞ {2nE[ξ31 ξ32 ] + 2n2 E[|E[ξ31 ξ32 ξ41 ξ42 |X3 , X4 ]|]}. 20 B. Delyon and F. Portier 2 2 2 ξ32 ] = E[E[ξ31 |X3 ]2 ] ≤ C1 h−2d and by equation (25), Then by equation (24), we have E[ξ31 we get E[|E[ξ31 ξ32 ξ41 ξ42 |X3 , X4 ]|] = E[E[ξ31 ξ41 |X3 , X4 ]2 ] 2 e −1 (X4 − X3 )) ] + 2kf k4∞ ≤ 2kf k2∞h−2d E[K(h Z e 2 du + 2kf k4 , ≤ 2kf k3∞h−d K(u) ∞ e is defined in Lemma 7. Bringing everything together and because nhd → ∞, it where K holds that kn1/2 R3 k2 ≤ O(n−1 h−d + n−1/2 h−d/2 ) = O(n−1/2 h−d/2 ). Step 5. n1/2 R4 = OP (n−1 h−3d/2 ). We start with a lower bound for fbi by proving the existence of N (ω) such that ∀n ≥ N (ω), ∀i, Notice that fbi = b < fbi < 2kf k∞ . 2 (12)   1 n b f (Xi ) − d K(0) , n−1 nh n 1 X fb(x) = K(h−d (x − Xj )), nhd j=1 due to the almost sure uniform convergence of fb to f (Theorem 1 in [5]) we have with probability 1 for n large enough 2b 3 < inf fb(x) ≤ sup fb(x) < kf k∞ , x∈Q 3 2 x∈Q and since assumption nhd → ∞, (12) follows. We can now compute the expectation of R4 restricted to {n ≥ N (ω)}. Because (a3 − b3 ) = (a − b)(a2 + ab + b2 ) for any real number a and b, and by the latter inequality, there exists a constant C > 0 which does not depend on n or h, such that |R4 |1n>N (ω) ≤ Cn−1 we have by the Cauchy–Schwarz inequality n X i=1 |fbi − fh (Xi )|b vi , 2 1/2 1/2 E[|R4 |1n>N (ω) ] ≤ CE[(fb1 − fh (X1 )) ] E[b v12 ] . (13) 21 Integral approximation by kernel smoothing P Applying the fact that for any real number a, p1 pj=1 (xj − x)2 ≤ xj = K1j , p = n − 1 and a = fh (X1 ), we obtain that vb1 ≤ then using (24) 1 p Pp i=1 (xj − a)2 to n X 1 ξ2 , (n − 1)(n − 2) j=2 1j 4 2 2 E[b v12 ] ≤ (n − 1)−1 (n − 2)−2 E[ξ12 ] + (n − 1)−1 (n − 2)−1 E[ξ12 ξ13 ] ≤ C1 n−3 h−3d + C1 n−2 h−2d ≤ O(n −2 −2d h (14) ), because nhd goes to infinity. On the other hand using equation (24) again, 2 E[(fb1 − fh (X1 )) ] = 1 E[ξ 2 ] = O(n−1 h−d ). n − 1 1i (15) Putting together (13), (14) and (15), E[|R4 |1n>N (ω) ] = O(n−1 h−d n−1/2 h−d/2 ) = O(n−3/2 h−3d/2 ). In particular by Markov’s inequality P(n3/2 h3d/2 |R4 | > A) ≤ P(n3/2 h3d/2 |R4 |1n>N (ω) > A) + P(n ≤ N (ω)) = A−1 O(1) + P(n ≤ N (ω)). This proves the boundedness in probability of n3/2 h3d/2 |R4 |. Step 6. n1/2 R5 = OP (n−1 h−3d/2 + n−3/2 h−2d ). Following (12) since |R5 |1n>N (ω) ≤ 2b−3 kϕk∞ n−1 n X i=1 3 |fbi − fh (Xi )| , we can show the convergence in probability of the right-hand side term as in Step 5. We have indeed by the Rosenthal’s inequality1 # " n " p# n X X p −p −1 ξ1i |fbi − fh (Xi )| = (n − 1) E E n i=2 i=1 p/2 2 ≤ C2 n−p {(nE[ξ12 ]) ≤ C1 C2 {n −p/2 −pd/2 h + nE[|ξ12 |p ]} +n 1−p −(p−1)d h (16) }, P 1 2 p/2 ] + (Si , Fi )i∈N and 2 ≤ p < +∞, we have E[|Sn |p ] ≤ C2 {E[( n i=1 E[Xi |Fi−1 ]) Pn For a martingale p i=1 E|Xi | }, where Xi = Si − Si−1 (see, e.g., [13], pp. 23–24). 22 B. Delyon and F. Portier where the latter inequality is due to equation (24). Hence, with p = 3 E[|R5 |1n>N (ω) ] ≤ C1 C2 {n−3/2 h−3d/2 + n−2 h−2d } and we conclude as in Step 5. Putting together the steps 1 to 6, and taking into account, concerning R5 , that n−3/2 h−2d = (n−1/2 h−d/2 )(n−1 h−3d/2 ), we obtain (ii). Proof of (i). For (i), we use a shorter expansion which leads to an actually much simpler proof: and 1 1 fh (Xi ) − fbi (fh (Xi ) − fbi )2 = , + + fh (Xi )2 fbi fh (Xi ) fbi fh (Xi )2 with b I(ϕ) − I(ϕ) = R0 + R1 + R2 + R5′ , R5′ = n−1 n X ψ2 (Xi ) i=1 (fh (Xi ) − fbi )2 . fbi The terms R0 , R1 and R2 have already been treated in the steps 1, 2 and 3 of the proof of (i). The term R5′ is bounded exactly as R5 but now we use (16) with p = 2 instead of p = 3, to obtain E[|R5′ |1n>N (ω) ) ≤ C1 C2 n−1 h−d and we get n1/2 |R5′ | = OP (n−1/2 h−d ).  6.2. Proofs of Theorems 2 and 3 Let us define Mn = n−1 n X i=1 e i ) − E[ψ1 (X1 ) − ψ(X e 1 )], ψ1 (Xi ) − ψ(X Un = n−1 (n − 1)−1 X cij , i6=j e 1 )] + Bn = E[ψ1 (X1 ) − ψ(X Z (f (x)fh (x)−1 − 1)ϕ(x) dx 23 Integral approximation by kernel smoothing with cjk = ajk − bjk , and for j 6= k, ajk = E[ψ3 (X1 )ξ1j ξ1k |Xj Xk ], bjk = ujk − E[ujk |Xj ] − E[ujk |Xk ] + E[ujk ], where ujk has been defined at the beginning of step 3. Both proofs of Theorems 2 and 3 rely on the following lemma which turns Theorem 1 in a suitable way for weak convergence issues. Lemma 5. Under the assumptions of Theorem 1, we have Ibc (ϕ) − I(ϕ) = Bn + Un + Mn + OP (n−3/2 h−3d/2 ). Moreover, we have Bn = OP (hr ), Un = OP (n−1 h−d/2 ) and Mn = OP (n−1/2 (hs + hr )). Proof. By using the decomposition (10) and since Bn + Mn = R1 + R2 , we have Ibc (ϕ) − I(ϕ) = R0 + R1 + R2 + R3 + R4 + R5 = Bn + Mn + Un + (R0 + R3 − Un ) + R4 + R5 . We have already shown that R4 + R5 = OP (n−3/2 h−3d/2 + n−2 h−2d ) (this is exactly steps 5 and 6 of the proof of Theorem 1). By definition of Un , we have XX R0 + R3 − Un = n−1 (n − 1)−1 (n − 2)−1 (ψ3 (Xi )ξij ξik − ajk ) i j6=k which is a completely degenerate U -statistic (R3 is near to be completely degenerate and ajk = E[ψ3 (X1 )ξ1j ξ1k |Xj Xk ] appears as the good centering term). The order 2 moments 2 2 of this quantity are of order n−3 E[ψ3 (X1 )2 ξ12 ξ13 ] ∝ n−3 h−2d . Hence, we have shown that −3/2 −d R0 + R3 − Un = OP (n h ), which completes the first part of the proof. To obtain the bounds in probability, for Un we just use step 1 and 4 of the proof of Theorem 1, for Mn we compute the L2 norm as follows. We have e 1 )k kMn k2 = n−1/2 kψ1 (X1 ) − ψ(X 2 e 1 )k ) ≤ n−1/2 (kψ1 (X1 ) − ψ1h (X1 )k2 + kψ1h (X1 ) − ψ(X 2 ≤ Cn−1/2 (hs + hr ), for some constant C, where the last inequality is obtained using equation (11) for the  term in the right and equation (20) in Lemma 6 for the term in the right. Remark 9. Under the assumption of Theorem 1, one may show that X −3/2 2 b ψ3 (Xi )ξij + OP ((nhd ) ), I(ϕ) − I(ϕ) = Ibc (ϕ) − I(ϕ) + n−1 (n − 1)−2 i,j 24 B. Delyon and F. Portier where the OP comes from R4 and the other remainder term corresponds to the diagonal term of the U -statistic R3 . This term equals (n − 1)−1 E[ψ2 (X1 )(K12 − fh (X1 ))2 ] = O(n−1 h−d ) plus oP (n−1 h−d/2 ), as a consequence, when h is such that nh2(s+d) → 0 and nhr+d → 0, the leading term of the decomposition is a constant. 6.2.1. Proof of Theorem 2 By Lemma 5 and the assumptions on h we have nhd/2 (Bn + Mn + R4 + R5 ) = OP (n3/2 hr+d/2 + n1/2 (hr+d/2 + hs+d/2 ) + n−1/2 h−3d/2 ) = oP (1). To derive the limiting distribution of nhd/2 Un , we apply Theorem 1 in [12], quoted below (Theorem 11), with Hn (Xj , Xk ) = (n − 1)−1 hd/2 (cjk + ckj ) where cjk = ajk − bjk , has been defined at the beginning of Section 6.2. The asymptotic variance v1 is the limit 2 of the quantity n2 E[Hn (X1 , X2 )2 ] asymptotically equivalent to hd (E[c212 ] + E[c12 c21 ]). To compute this easily, we introduce the function ξi (x) = KRh (x − Xi ) − fh (x). First, use some algebra to obtain the formula b12 = ψ2 (X1 )ξ2 (X1 ) − ψ2 (x)ξ2 (x)f (x) dx, then it follows that c12 = a12 − b12 Z Z = ψ3 (x)ξ1 (x)ξ2 (x)f (x) dx − ψ2 (X1 )ξ2 (X1 ) + ψ2 (x)ξ2 (x)f (x) dx = Z + = Z + = Z + + (ψ3 (x)f (x)ξ2 (x) − ψ2 (X1 )ξ2 (X1 ))Kh (x − X1 ) dx Z ψ3 (x)f (x)ξ2 (x)(fh (x) − f (x)) dx (ψ2 (x)ξ2 (x) − ψ2 (X1 )ξ2 (X1 ))Kh (x − X1 ) dx Z ψ3 (x)ξ2 (x)(f (x) − fh (x))Kh (x − X1 ) dx + Z ψ3 (x)f (x)ξ2 (x)(fh (x) − f (x)) dx (ψ2 (x)Kh (x − X2 ) − ψ2 (X1 )Kh (X1 − X2 ))Kh (x − X1 ) dx Z Z (−(ψ2 (x)fh (x) − ψ2 (X1 )fh (X1 )) + ψ3 (x)ξ2 (x)(f (x) − fh (x)))Kh (x − X1 ) dx ψ3 (x)f (x)ξ2 (x)(fh (x) − f (x)) dx. 25 Integral approximation by kernel smoothing Because Kh integrates to 1, it is not hard to see that the last two terms in the previous equation will be negligible in the computation of v1 . As a consequence, hd E[c212 ] has the same limit as 2 Z Z Z d h (ψ2 (x)Kh (x − z) − ψ2 (y)Kh (y − z))Kh (x − y) dx f (y)f (z) dy dz = Z Z Z = VK Z (ψ2 (y + hu)K(u + v) − ψ2 (y)K(v))K(u) du 2 f (y)f (y − hv) dy dv ψ2 (y)2 f (y)2 dy + o(1) R R with VK = ( (K(u + v) − K(v))K(u) du)2 dv and where the first equality follows from a change of variables and the last representation follows from the Lebesgue dominated theorem. Following the same steps as previously, we obtain an similar expression for hd E[c12 c21 ] and then we get Z v1 = 2VK ϕ(y)2 f (y)−2 dy. It remains to check the conditions of Theorem 11. Clearly, the computation of v1 provides that E[Hn (X1 , X2 )2 ] ≈ n−2 . We obtain similarly that E[Hn (X1 , X2 )4 ] = O(n−5 h−d ) and E[Gn (X1 , X2 )2 ] = O(n−5 hd ) which implies the conditions of the theorem.  6.2.2. Proof of Theorem 3 By (B1) and Lemma 9, there exists M2 > 0 such that ϕ is H(min(s, 1/2), M2). Then we can apply Lemma 5 and by assumption on h, we obtain that 1/2 (nh−1 ) (Bn + Un + R4 + R5 ) = OP (n1/2 hr−1/2 + n−1/2 h−(d+1)/2 + n−1 h−(3d+1)/2 ) = oP (1). Since Mn is a sum of independent variables with zero-mean, we can apply the central limit theorem by checking the Lindeberg condition (see, e.g., [13], Chapter 3). Now we only have to compute the asymptotic variance v2 defined as the limit of 2 2 e 1 ))) = h−1 E[(ψ1 (X1 ) − ψ(X e 1 )) ] − h−1 E[ψ1 (X1 ) − ψ(X e 1 )] . Var(h−1/2 (ψ1 (X1 ) − ψ(X On the one hand, by equations (11) and (19), we have for some constant C e 1 ))k ≤ Chr−1/2 , kh−1/2 (ψ1h (X1 ) − ψ(X 2 h−1/2 |E[ψ1 (X1 ) − ψ1h (X1 )]| ≤ Chr−1/2 , as a consequence, we get e 1 ))) = h−1 kψ1 (X1 ) − ψ1h (X1 )k2 + o(1). Var(h−1/2 (ψ1 (X1 ) − ψ(X 2 26 B. Delyon and F. Portier On the other hand, for every x ∈ Q, we have ψ1 (x) − ψ1h (x) = Z Qc (ψ1 (x) − ψ1 (y))Kh (x − y) dy + = ψ1 (x) Z Qc Kh (x − y) dy + Z Q Z Q (ψ1 (x) − ψ1 (y))Kh (x − y) dy (ψ1 (x) − ψ1 (y))Kh (x − y) dy, where Qc stands for the complement of the set Q in Rd . Because ψ1 is Nikolski with regularity min(s, r) inside Q, we use equation (20) of Lemma 6 to show that the L2 norm of the right-hand side term is of order hmin(s,r) . Clearly, since min(s, r) > 1/2 we have Z −1/2 −1 e Var(h (ψ1 (X1 ) − ψ(X1 ))) = h Kh (X1 − y) dy + o(1) ψ1 (X1 ) Qc 2 and it remains to apply Lemma 10 to derive the stated limit. 6.3. Proof of the Theorem 4 By equation (3), we are interested in the asymptotic law of n −1/2 n X σ(Xi )ψ(Xi ) i=1 fbi ei + n −1/2 n X g(Xi )ψ(Xi ) fbi i=1 − Z ! g(x)ψ(x) dx . By Lemma 1, the right-hand side term goes to 0 in probability. For the other term, we use the decomposition A1 + A2 , with A1 = n−1/2 n X σψ(Xi ) i=1 f (Xi ) ei and A2 = n−1/2 n X σψ(Xi )(f (Xi ) − fb(Xi )) i=1 fbi f (Xi ) ei , where σψ(Xi ) = σ(Xi )ψ(Xi ). We define F as the σ-field generated by the set of random variables {X1 , X2 , . . .}. We get E[A22 |F ] = n−1 then, one has n X σψ(Xi )2 (f (Xi ) − fbi )2 i=1 fbi2 f (Xi )2 , n −1  X 2 (f (Xi ) − fbi ) . kσψk2∞ n−1 E[A22 |F ] ≤ b2 inf fbi2 i i=1 27 Integral approximation by kernel smoothing For the term on the left, since σψ has support Q we can use (12), that is for n large enough, it is bounded. For the right-hand side term, it follows that n−1 n X i=1 2 (f (Xi ) − fbi ) ≤ 2n−1 n X i=1 2 (f (Xi ) − fh (Xi )) + 2n−1 n X i=1 2 (fh (Xi ) − fbi ) , and then using equation (18) in Lemma 6 and (16) for p = 2 we provide the bound n−1 n X i=1 2 (f (Xi ) − fbi ) 1 ≤ C(h2r + n−1 h−d ) (17) for some C > 0. Therefore, we have shown that E[A22 |F ] → 0 in probability. Since for any ε > 0, P(|A2 | > ε|F ) ≤ ε−2 E[A22 |F ], it remains to note that the sequence P(|A2 | > ε|F ) is uniformly integrable to apply the Lebesgue domination theorem to get P(A2 > ε) −→ 0. To conclude, we apply the central limit theorem to A1 and the statement follows. 6.4. Some lemmas 6.4.1. Inequalities Lemma 6. For any function g : Rd → R, recall that gh (x) = assumptions (A1), (A2) and (A4), it holds that R g(x − hu)K(u) du. Under kfh − f k∞ ≤ CK hr kf (r) k∞ , Z r (r) |E[ϕ(X1 ) − ϕh (X1 )]| ≤ CK h kf k∞ |ϕ(x)| dx, kϕh (X1 ) − ϕ(X1 )k2 ≤ CK M hs , (18) (19) (20) where CK is a positive constant that depends K only. Proof. We start by proving (19) and (20) assuming that (18) holds. For the mean: using Fubini’s theorem, we have Z E[ϕ(X1 ) − ϕh (X1 )] = (ϕ(x) − ϕh (x))f (x) dx = Z ϕ(x)f (x) − ϕ(x)fh (x) dx, hence |E[ϕ(X1 ) − ϕh (X1 )]| ≤ kf (x) − fh (x)k∞ Z |ϕ(x)| dx, 28 B. Delyon and F. Portier which by (18) gives r |E[ϕ(X1 ) − ϕh (X1 )]| ≤ CK h kf (r) k∞ Z |ϕ(x)| dx. This is (19). We turn now to (20): 2 E[(ϕh (X1 ) − ϕ(X1 )) ] = Z Z (ϕ(x − hu) − ϕ(x))K(u) du 2 f (x) dx. (21) We now use the Taylor formula with Lagrange remainder applied to g(t) = ϕ(x − tu) with order k equal to the largest integer smaller than s: ϕ(x − hu) − ϕ(x) = = k−1 X j=1 hj (j) g (0) + j! k X hj j! j=1 g (j) (0) + Z h g (k) (t) 0 Z h 0 (h − t)k−1 dt (n − 1)! (g (k) (t) − g (k) (0)) (h − t)k−1 dt. (n − 1)! The first term is a polynomial in u which will vanish after insertion in (21) because K is orthogonal the first non-constant polynomial of degree ≤ r. The second term is bounded as Z h Z h (h − t)k−1 k k−1 (k) (k) dt ≤ |u| h (g (t) − g (0)) |ϕ(k) (x − tu) − ϕ(k) (x)| dt. (k − 1)! 0 0 Hence, Z (ϕ(x − hu) − ϕ(x))K(u) du ≤h k−1 Z 0 hZ (k) |ϕ (22) (k) (x − tu) − ϕ k (x)||u| K(u) du dt and by the generalized Minkowski inequality ([10] page 194)2 k(ϕh − ϕ)(X1 )k2 ≤ h k−1 Z Z ≤ M hk−1 2 For Z (k) |ϕ (k) (x − tu) − ϕ 1/2 (x)| u K(u) 10≤t≤h f (x) dx du dt 1/2 (|tu|2α |u|2k K(u)2 ) 2 2k 2 10≤t≤h du dt any non-negative measurable function g(·, ·) on Rk+d , 1/2 2 1/2 Z Z Z Z dy. ≤ g(y, x)2 dx g(y, x) dy dx Integral approximation by kernel smoothing Z 1/2 = M (1 + α)−1 hk+α (|u|2α+2k K(u)2 ) du. 29 This implies (20). Concerning (18), we use (22) with f and k = r to get that |fh (x) − f (x)| ≤ h r−1 Z 0 hZ |f (r) (x + tu)||u|r K(u) du dt, the latter is bounded by a constant times hr .  The following lemma gives some bounds on the conditional moments of ξ12 that are useful in the proof of Theorem 1. Lemma 7. Let ξij = Kij − fh (Xi ), under (A1) and (A2) E[ξ12 |X1 ] = 0, E[|ξ12 |p |X1 ] ≤ 2p E[|K12 |p |X1 ] ≤ C1 h−(p−1)d , e with K(x) = R e −1 (X2 − X1 )) + kf k∞ ), |E[ξ13 ξ23 |X1 , X2 ]| ≤ kf k∞ (h−d K(h (23) (24) (25) |K(x − y)K(y)| dy and C1 > 0. Proof. The first equation is trivial. For the second equation, the triangular inequality and the Jensen inequality provide Z p E[|ξ12 |p |X1 ] ≤ 2p E[|K12 |p |X1 ] = 2p h−(p−1)d |K(u)| f (X1 − hu) dx, and the third one is derived by |E[ξ13 ξ23 |X1 , X2 ]| = |E[ξ13 K23 |X1 , X2 ]| Z = (Kh (X1 − x) − fh (X1 ))Kh (X2 − x)f (x) dx = Z (Kh (X1 − X2 + hu) − fh (X1 ))K(u)f (X2 − hu) du e −1 (X2 − X1 )) + kf k∞ ). ≤ kf k∞ (h−d K(h  The Efron–Stein inequality helps to bound the L2 moments of estimators. For the proof, we refer to the original paper [6] but also to [2]. Theorem 8 (Efron–Stein inequality). Let X1 , . . . , Xn be an i.i.d. sequence, X1′ be an independent copy of X1 and f be a symmetric function of n variables, then Var(f (X1 , . . . , Xn )) ≤ n 2 E[(f (X1 , . . . , Xn ) − f (X1′ , X2 , . . . , Xn )) ]. 2 30 B. Delyon and F. Portier 6.4.2. Measure results Lemma 9. Let s > 0 and M1 > 0, suppose that the support of ϕ is a convex body Q and that ϕ is H(s, M1 ) on Q, then there exists M > 0 such that ϕ is H(min(s, 1/2), M ) on Rd . Proof. We have Z 2 |ϕ(x + u) − ϕ(x)| dx = Z 2 {x∈Q,x+u∈Q} + = ≤ Z Z Z |ϕ(x + u) − ϕ(x)| dx + Z ϕ(x + u)2 dx {x∈Q,x+u∈Q} / ϕ(x)2 dx {x∈Q,x+u∈Q} / 2 {x∈Q,x+u∈Q} {x∈Q,x+u∈Q} |ϕ(x + u) − ϕ(x)| dx + |ϕ(x + u) − ϕ(x)| 2 Z ϕ(x)2 (1{x−u∈Q} + 1{x+u∈Q} ) dx / / Q dx + kϕk2∞ Z 1{dist(x,∂Q)≤|u|} dx ≤ M1 |u|2s + kϕk2∞ ξd−1 (Q)|u|, where ξd−1 (S) is called a Quermassintegrale of Minkowski and dist stands for the Euclidean distance in Rd . The last inequality follows from the fact that ϕ is H(s, M1 ) on Q and by the Steiner’s formula stated, for instance, in [9], Theorem 3.2.35, page 271.  Lemma 10. Under the assumption (A4), if Q is a compact set with C 2 boundary and ψ is continuous 2 Z Z Z Kh (x − y) dy ψ(x) dx = lim h−1 LQ (x)ψ(x) dHd−1 (x), h→0 Q Qc ∂Q where LQ (x) = ZZ min(hz, u(x)i, hz ′ , u(x)i)+ K(z)K(z ′ ) dz dz ′ , and Hd−1 stands for the (d − 1)-dimensional Hausdorff measure, u(x) is the normal outer vector of Q at the point x. Proof. Let us start with an estimate of the integral over Qc having a simpler dependency w.r.t. h. We define the function τ (x) = (1x∈Q − 1x∈Q / ) dist(x, ∂Q). 31 Integral approximation by kernel smoothing This function is C 2 in the neighborhood of ∂Q and its gradient −u(x) is, for x ∈ ∂Q, the normal inner vector (since ∂Q is C 2 , using a local parametrization of Q, we are reduced to the case where ∂Q is a piece of hyperplane). Then Z Qc Kh (x − y) dy = = = Z Z Z 1x+hz∈Qc K(z) dz 1τ (x+hz)≤0K(z) dz 1τ (x)−hhz,u(x)i≤ah2 K(z) dz, where a actually depends on x and z but is smaller than a constant related to the curvature of ∂Q. Hence, Z Qc ≤ ≤ Kh (x − y) dy − Z Z Z 1τ (x)−hhz,u(x)i≤0K(z) dz |1τ (x)−hhz,u(x)i≤ah2 − 1τ (x)−hhz,u(x)i≤0|K(z) dz 1|τ (x)−hhz,u(x)i|≤|a|h2 K(z) dz ≤ a0 h1τ (x)≤m0h for some a0 and m0 , because the integration domain is a band of width |a|h. Hence, Z Qc Kh (x − y) dy = Z 1τ (x)≤hhz,u(x)iK(z) dz + a1 (x)h1τ (x)≤m0 h , where a1 is bounded. Since the second term has a O(h2 ) integral over Q, its contribution in the limit is negligible, and it suffices to prove that lim h h→0 −1 Z Z 1τ (x)≤hhz,u(x)iK(z) dz Q 2 ψ(x) dx = Z LQ (x)ψ(x) dHd−1 (x). ∂Q By setting ϕ(x, t) = Z 10≤t≤hz,u(x)i K(z) dz the latter equality can be rewritten as Z Z lim h−1 ϕ(x, h−1 τ (x)) dx = h→0 ∂Q 2 ψ(x)1x∈Q , LQ (x)ψ(x) dHd−1 (x). 32 B. Delyon and F. Portier From Proposition 3, page 118 of [7], we have for any integrable function q and f Lipschitz with essinf |∇f | > 0: Z q(x) dx = f ≥0 Z 0 ∞ Z f =s  q(x) dHd−1 (x) ds |∇f (x)| hence, with f (x) = h−1 τ (x) and q(x) = ϕ(x, h−1 τ (x)), we obtain h−1 Z ϕ(x, h−1 τ (x)) dx = Z 0 ∞ Z Letting h → 0, we get lim h h→0 −1 Z ϕ(x, h −1 τ (x)) dx = τ =hs Z 0 = Z ∞ Z ∂Q We can write Z ∞ R  ϕ(x, s) dHd−1 (x) ds. Z ϕ(x, s) dH ∂Q ∞ d−1   (x) ds ϕ(x, s) ds dHd−1 (x). 0 ϕ(x, s) ds as ϕ(x, s) ds = ψ(x) 0 = ψ(x) ZZZ ZZ 10≤s≤hz,u(x)i 10≤s≤hz′ ,u(x)i K(z)K(z ′ ) dz dz ′ ds min(hz, u(x)i, hz ′ , u(x)i)+ K(z)K(z ′ ) dz dz ′ .  6.4.3. Weak convergence for degenerate U -statistics Theorem 11 (Hall (1984), [12]). Let Hn : Rd × Rd → R, with Hn symmetric, assume that E[Hn (X1 , X2 )|X1 ] = 0 and E[Hn (X1 , X2 )2 ] < +∞. If E[Gn (X1 , X2 )2 ] + n−1 E[Hn (X1 , X2 )4 ] n→+∞ −→ 0, E[Hn (X1 , X2 )2 ]2 P with Gn (x, y) = E[Hn (X1 , x)Hn (X1 , y)], then j<k H(Xj , Xk ) is asymptotically normally distributed with zero mean and variance given by n2 2 2 E[H(X1 , X2 ) ]. Acknowledgements The authors would like to thank Céline Vial for helpful comments and advice on a latter version of this article. Research supported by the Fonds de la Recherche Scientifique (FNRS) A4/5 FC 2779/2014–2017 No. 22342320. Integral approximation by kernel smoothing 33 References [1] Bickel, P.J., Klaassen, C.A.J., Ritov, Y. and Wellner, J.A. (1993). Efficient and Adaptive Estimation for Semiparametric Models. Johns Hopkins Series in the Mathematical Sciences. Baltimore, MD: Johns Hopkins Univ. Press. MR1245941 [2] Boucheron, S., Lugosi, G. and Bousquet, O. (2004). Concentration inequalities. In Advanced Lectures on Machine Learning. Lecture Notes in Computer Science 3176 208–240. Berlin: Springer. [3] Chen, S.X. (1999). Beta kernel estimators for density functions. Comput. Statist. Data Anal. 31 131–145. MR1718494 [4] Delecroix, M., Hristache, M. and Patilea, V. (2006). On semiparametric M estimation in single-index regression. J. Statist. Plann. Inference 136 730–769. MR2181975 [5] Devroye, L.P. and Wagner, T.J. (1980). The strong uniform consistency of kernel density estimates. J. Multivariate Anal. 5 59–77. [6] Efron, B. and Stein, C. (1981). The jackknife estimate of variance. Ann. Statist. 9 586– 596. MR0615434 [7] Evans, L.C. and Gariepy, R.F. (1992). Measure Theory and Fine Properties of Functions. Studies in Advanced Mathematics. Boca Raton, FL: CRC Press. MR1158660 [8] Evans, M. and Swartz, T. (2000). Approximating Integrals Via Monte Carlo and Deterministic Methods. Oxford Statistical Science Series. Oxford: Oxford Univ. Press. MR1859163 [9] Federer, H. (1969). Geometric Measure Theory. Die Grundlehren der Mathematischen Wissenschaften 153. New York: Springer. MR0257325 [10] Folland, G.B. (1999). Real Analysis: Modern Techniques and Their Applications, 2nd ed. Pure and Applied Mathematics (New York). New York: Wiley. MR1681462 [11] Gamboa, F., Loubes, J.-M. and Maza, E. (2007). Semi-parametric estimation of shifts. Electron. J. Stat. 1 616–640. MR2369028 [12] Hall, P. (1984). Central limit theorem for integrated square error of multivariate nonparametric density estimators. J. Multivariate Anal. 14 1–16. MR0734096 [13] Hall, P. and Heyde, C.C. (1980). Martingale Limit Theory and Its Application: Probability and Mathematical Statistics. New York: Academic Press. MR0624435 [14] Härdle, W. (1990). Applied Nonparametric Regression. Econometric Society Monographs 19. Cambridge: Cambridge Univ. Press. MR1161622 [15] Härdle, W., Marron, J.S. and Tsybakov, A.B. (1992). Bandwidth choice for average derivative estimation. J. Amer. Statist. Assoc. 87 218–226. MR1158640 [16] Härdle, W. and Stoker, T.M. (1989). Investigating smooth multiple regression by the method of average derivatives. J. Amer. Statist. Assoc. 84 986–995. MR1134488 [17] Jones, M.C. (1993). Simple boundary correction for kernel density estimation. Stat. Comput. 3 135–146. [18] Oh, M.-S. and Berger, J.O. (1992). Adaptive importance sampling in Monte Carlo integration. J. Stat. Comput. Simul. 41 143–168. MR1276184 [19] Robinson, P.M. (1988). Root-N -consistent semiparametric regression. Econometrica 56 931–954. MR0951762 [20] Silverman, B.W. (1986). Density Estimation for Statistics and Data Analysis. Monographs on Statistics and Applied Probability. London: Chapman & Hall. MR0848134 [21] Stone, C.J. (1975). Adaptive maximum likelihood estimators of a location parameter. Ann. Statist. 3 267–284. MR0362669 34 B. Delyon and F. Portier [22] Stone, C.J. (1980). Optimal rates of convergence for nonparametric estimators. Ann. Statist. 8 1348–1360. MR0594650 [23] Tsybakov, A.B. (2009). Introduction to Nonparametric Estimation. Springer Series in Statistics. New York: Springer. MR2724359 [24] Vial, C. (2003). Deux contributions à l’étude semi-paramétrique d’un modèle de régression. Ph.D. thesis, Univ. Rennes. [25] Zhang, P. (1996). Nonparametric importance sampling. J. Amer. Statist. Assoc. 91 1245– 1253. MR1424622 Received September 2014 and revised March 2015
10math.ST
A Deterministic and Generalized Framework for Unsupervised Learning with Restricted Boltzmann Machines Eric W. Tramel,∗ Marylou Gabrié,† Andre Manoel,‡ Francesco Caltagirone,§ and Florent Krzakala¶ arXiv:1702.03260v2 [cs.LG] 2 Oct 2017 (Dated: October 3, 2017) Restricted Boltzmann machines (RBMs) are energy-based neural-networks which are commonly used as the building blocks for deep architectures neural architectures. In this work, we derive a deterministic framework for the training, evaluation, and use of RBMs based upon the ThoulessAnderson-Palmer (TAP) mean-field approximation of widely-connected systems with weak interactions coming from spin-glass theory. While the TAP approach has been extensively studied for fullyvisible binary spin systems, our construction is generalized to latent-variable models, as well as to arbitrarily distributed real-valued spin systems with bounded support. In our numerical experiments, we demonstrate the effective deterministic training of our proposed models and are able to show interesting features of unsupervised learning which could not be directly observed with sampling. Additionally, we demonstrate how to utilize our TAP-based framework for leveraging trained RBMs as joint priors in denoising problems. PACS numbers: 05.10.-a,05.90.+m I. INTRODUCTION The past decade has witnessed a groundswell of research in machine learning, bolstered by the deep learning revolution and the resurgence of neural networks [1]. Since their inception, researchers have identified the deep connection between neural networks and statistical mechanics. Perhaps the most well-known unsupervised neural models studied through the lens of statistical physics have been the the Hopfield model [2, 3] and the Boltzmann machine [4]. These models were proposed from a connectionist perspective of cognitive science and were studied in the context emergent representation in unsupervised machine learning. We can look to the Hopfield model to directly observe some of the contributions of physics to both machine learning and cognitive sciences. For example, by applying techniques from the study of spin-glasses, Amit et al. [3] were famously able to derive the memory capacity of the Hopfield model and provide a concrete understanding of the dynamics of the model via the study of its phase transitions. This fundamental understanding of the behavior of the Hopfield model has provided insight into the complexities of associative memory. The closely related Boltzmann Machine is an undirected stochastic neural network which finds its physics parallel in Ising spin glass models [5]. Specifically, for this model, ∗ † ‡ § ¶ E.W.T. at OWKIN, 6 Rue de la Pierre Levée, 75011 Paris, France M. G. at Laboratoire de Physique Statistique, Ecole Normale Supérieure, 24 rue Lhomond, 75005 Paris, France. A. M. at Neurospin, CEA, Université Paris-Saclay, bât. 145, 91191, Gif-sur-Yvette, France. F.C. at Noah’s Ark Lab Paris, Huawei Technologies Co. Ltd., 92100 Boulogne-Billancourt, France. F.K. at Laboratoire de Physique Statistique, Ecole Normale Supérieure, 24 rue Lhomond, 75005 Paris, France, & Université Pierre et Marie Curie, Sorbonne Universités, 75005 Paris, France. one is interested in the inverse problem: learning the couplings between spins in order to generate a particular set of configurations at equilibrium. The process of learning couplings, or training, is often referred to as the inverse Ising problem in the physics literature [6–8]. However, because couplings only exist between pairs of spins for the fully-visible Ising spin-glass, such models have limited practical application as they cannot successfully capture higher-order correlations which might exist in a set of training configurations. For this reason, the general Boltzmann machine introduces a set of unobserved latent spins. The effect of these latent spins is to abstract high-order correlations within the set of observed spins. While an optimal training of the couplings would potentially lead to a very effective general model of high-dimensional joint distributions, the intractability of this joint latent model confounds the practical application of general Boltzmann machines. A restricted Boltzmann Machine (RBM) is a special case of the general Boltzmann machine, where couplings only exist between latent and observed spins. This bipartite structure is key to the efficient and effective training of RBMs [9]. RBMs have found many applications in machine learning problems as diverse as dimensionality reduction [10], classification [11], collaborative filtering [12], feature learning [13], and topic modeling [14]. Additionally, RBMs can be stacked into multi-layer neural networks, which have played a historically fundamental role in pre-training deep network architectures [15, 16]. These constructions, known as deep belief networks, were the first truly deep neural architectures, leading to the current explosion of activity in deep learning [17]. While access to vast training datasets has made such pre-training dispensable for certain tasks, RBMs remain a fundamental tool in the theory of unsupervised learning. As such, a better understanding of RBMs can be key to future developments in emergent machine intelligence. To date, the most popular and effective approaches to training RBMs have centered on differing flavors of 2 short-chain Monte Carlo sampling [9, 18], which we cover in detail in the sequel. While such techniques can yield trained RBMs which produce sampled configurations very similar to the target dataset, and can be used in a number of applications as detailed previously, they do not bridge the gap in understanding what the RBM has learned. Furthermore, understanding the modes, or internal representations, of the RBM with sampling-based frameworks have mostly consisted of subjective comparisons of sampled configurations as well as a subjective analysis of the couplings themselves, often referred to as receptive fields in the machine learning literature. Additionally, comparing two trained models, or even monitoring the training of one model, becomes problematic when using sampling-based investigative tools. For example, annealed techniques [19] can provide estimates of the log-likelihood of a model, but only at a large computational cost [20, 21]. At a much lower computational cost, pseudo-likelihoods can be used to monitor training, but the estimates produced in this manner are inaccurate, as compared to annealed importance sampling (AIS) [19], and even AIS can fail to detect model divergence in practice [22]. In the present work, we seek to address these concerns by developing a deterministic framework to train, compare, and analyze RBMs, as well as to leverage their modeling power for inference tasks. We accomplish this via statistical physics techniques through the use of the Thouless-Anderson-Palmer (TAP) formalism of spin-glass theory [5, 23–25]. In this manner, we produce a model which no longer refers to a stochastic model possessing an intractable Gibbs measure, but to a TAP machine: an entirely self-consistent mean-field model which operates as a classical RBM, but which admits deeper introspection via deterministic inference. TAP machines also naturally handle non-binary variables as well as deep architectures. While Deep Boltzmann Machines’ (DBMs) [26] state-of-the-art training algorithms mix both Monte Carlo sampling and “naïve” mean-field approximation, a deep TAP machine relies entirely on the TAP mean-field approximation. Under this interpretation, a TAP machine is not a generative probabilistic model, but a deterministic model defining a set of representational magnetizations for a given training dataset. Advantageously, this learning output can be computed exactly in finite time by converging a fixed-point iteration, in contrast to the indeterminate stopping criterion of Markov-chain Monte Carlo sampling. This is a major distinction between the TAP machine and the classical RBM, for which the true probability density function is intractable. At its core, the TAP machine training consists of arranging the minima, solutions, in the proposed TAP-approximated free energy so as to maximize the correlation between these solutions and the dataset. In our experiments, we demonstrate how to track the growth and geometry of these solutions as a novel way to investigate the progress of unsupervised learning. We also show how to use a trained TAP machine as a prior for inference tasks. The paper is organized as follows. In Sec. II we formally describe the classical binary RBM and review the literature on RBM training and analysis. Subsequently, in Sec. III, we describe our proposed modification of the binary RBM to a model with arbitrary real-valued distributions with bounded support. Next, in Sec. IV, we briefly describe how to apply belief-propagation to perform inference in the setting of real-valued spins. The details of this approach are pedagogically described in Appendices A & B. In Sec. V we derive the TAP approximation of the real-valued RBM via a high-temperature expansion of a two-moment Gibbs free energy. Then, in Sec. VI, we detail how to convert this approximation to a practical training algorithm. In Sec. VII, we conduct a series of experiments on real datasets, demonstrating how to use the properties of the TAP machine interpretation to provide insight into the unsupervised learning process. We additionally show how to use a trained model for bit-flip correction as a simple example of leveraging a TAP machine for inference tasks. Lastly, in Appendix C, we detail the derivations of necessary distribution-specific functions. II. RESTRICTED BOLTZMANN MACHINES Restricted Boltzmann Machines (RBMs) [27] are latentvariable generative models often used in the context of unsupervised learning. A set of weights and biases, the model parameters of the RBM, which correspond to the couplings and local fields present in the system, constructs an energy as a function of the data points from which follows a Gibbs-Boltzmann probability density function. In the well-known binary RBM, for which all visible and latent variables are in {0, 1}, the RBM distribution is P P X P 1 e ij Wij xi hj + i bi xi + j cj hj Z [W, θ] h (1) where θ = {b, c} is the set of local potentials, i.e. the set of values which define the biases acting on each variable, and P P XX P Z [W, θ] = e ij Wij xi hj + i bi xi + j cj hj . (2) P (x; W, θ) = x h P P Here, we use the notation x and h to refer to sums over the entire space of possible configurations of visible and latent variables, respectively. When taken with respect to the parameters of the model, Z [W, θ] is known as the partition function. We give a factor-graph representation of the RBM distribution in Fig. 1. As evidenced by (2), an exact computation of the normalizing partition function, and thus the probability of a given high-dimensional data point, is inaccessible in practice. Sophisticated Monte Carlo (MC) schemes relying on importance sampling [20, 21] can produce estimates 3 via gradient ascent on the parameters W and θ. Commonly, one does not calculate these gradients for each data-point from the training set, but instead calculates the gradients in average across M data-points, often referred to as a mini-batch. At each mini-batch, the gradients of (5) are given as, x φ(xi ; θi ) ∆Wij = hxi hj iX − hxi hj iSampled , φ(xi , xj ; Wij ) ∆bi = hxi iX − hxi iSampled , ∆cj = hhj iX − hhj iSampled , FIG. 1. Factor graph representation of the RBM distribution. Variables are indicated by circles, with latent variables denoted by shaded circles. The shaded rectangles indicated layer partitions within the RBM structure. Factors are represented by squares, with the right hand side factors representing the pairwise relationships between variables and the left hand side factors representing the influence of the localized prior distributions on the variables. and bounds of the partition, but at the cost of substantial computation, running on the time scale of days or even weeks. Thankfully, a precise estimate of the normalization is unnecessary for many RBM applications. Additionally, the bipartite structure of the RBM, which only admits couplings between the hidden and visible variables, can be leveraged to construct efficient sampling schemes. This approach was demonstrated in the contrastive divergence (CD) of [9], where very short-chain block-Gibbs sampling was shown to be sufficient for adequate RBM training. The CD approach consists of a sampling chain alternating between samples drawn from the conditional probabilities of each layer, which are dependent on the conditional expectations at the previously sampled layer. Specifically, the conditional probabilities for the hidden and visible units factorize as   X Y P (x|h) = sigm bi + Wij hj  , (3) i j Y X ! P (h|x) = sigm cj + j Wij xi , (4) i −1 where sigm(y) = (1 + e−y ) is the logistic sigmoid function. In order to learn the parameters of the RBM for a given training dataset, one looks to maximize the following loglikelihood, P P X P ln P (x; W, θ) = ln e Wij xi hj + i bi xi + j cj hj h − ln Z [W, θ] , (5) (6) (7) (8) where h·iSampled refers to averages over particles sampled from the model, and h·iX refers to the so-called clamped expectations, where the values of x are fixed to the training data samples in the mini-batch. In the case of the expectations involving hidden units, which are unobserved and therefore have no training data, [9] originally proposed the use of configurations sampled from P (h|x; W, b, c). However, one could also use the exact conditional expectations directly to calculate these clamped averages; especially in cases where sampling from these conditionals may be problematic. Since [9], there have been a number of proposed modifications to the core sampling-based training scheme described above. The persistent trick [18] takes neatly advantage of the iterative gradient ascent over mini-batches to quickly obtain thermalized Markov chains through Gibbs sampling at no extra computational cost over one step CD (CD-1). Nevertheless, the probability density function of a trained RBM is typically highly multimodal, thus making this sampling inexact. Indeed, in such glassy landscapes mixing becomes very slow as Markov chains become stuck in metastable states, leading to over- and under-represented, as well as missed, modes of the highdimensional distribution. This in turn produces high variance estimates of means and correlations. A more accurate sampling can be achieved using parallel tempering [28, 29], where particles are swapped between multiple Markov chains running at differing temperatures. This approach, however, requires not only the additional computational burden of running more chains, but also requires further tuning of hyper-parameters, such as the number of chains and at which temperatures to run them. As accurate sampling-based inference on RBMs can be costly, it would seem that their usefulness is limited. As learning of the RBM via gradient ascent is dependent upon this inference, the difficulty of training a generative model with a high-degree of accuracy is compounded. However, RBMs have proven to be very useful in many applications where sampling from a full-fledged generative model is unneeded. For instance, RBMs can be used as an unsupervised “feature extraction” pre-training for feedforward networks [10, 15, 30]. RBMs have also been used for data-imputation tasks, e.g. image in-painting, label recovery [11], or collaborative filtering [12] by reconstructing missing data with a single visible-hidden-visible step. In truth, the CD-k training algorithm which popularized RBMs, first with binary units [9], then Gaussian units 4 [10, 31] and finally with arbitrary units [32], does not use thermalized samples to evaluate means and correlations. Instead, it focuses on the region of the configuration space nearest to the training dataset [28] by using short block-Gibbs Markov chains, starting from training data points, to get fast and low variance estimates of moments. However, CD-k is prone to learn spurious minima in configuration space far from the data as it does not explore this region during training [28]. It also does not systematically increase the true likelihood of training data [33]. However, this training strategy has been found to be very efficient in the applications mentioned above, which consistently remain close to the dataset in configuration space. One finds that CD falls short for applications which require long-chain MCMC sampling from the trained RBM, as this represents a fundamental mismatch between the training and application of the RBM. In order to address some of theses shortcomings of sampling-based approaches, we now turn our attention to deterministic mean-field approximations of the RBM. The TAP approximation [23] for disordered systems relies on the deterministic inference of approximated magnetizations, from which one can obtain estimators of all kinds of observables, starting from the log-partition or free energy. TAP is derived from a small weight expansion of the variational approach and can be considered as an extension of the naïve mean-field (NMF) method [34, 35]. Previous works which have attempted to make use of the NMF approximation of the RBM have shown negative results [18, 36]. The TAP approximation was first considered for Boltzmann machines in the context of small random models without hidden units in [37]. In the recent work of [38], this approximation was extended to a practical training algorithm for full-scale binary RBMs which was shown to be competitive with Persistent Contrastive Divergence (PCD) [18] when applied to real-world datasets. In parallel, other works have used TAP, and the related Bethe approximation, to perform inference on binary Boltzmann machines [39–42]. In the next sections, we detail how to re-write the RBM model in the non-binary case, for generalized distributions on the visible and hidden units, similar in spirit to [32]. However, unlike earlier techniques, we will approach the problem of estimating the normalization of the RBM model via the tools of statistical mechanics, resulting in a fully-deterministic framework for RBM inference, training, and application. interest in the following manner, P (x, h; W, θ) = P 1 e i,j xi Wij hj Z [W, θ] Y Y × Piv (xi ; θiv ) Pjh (hj ; θjh ) i (9) j where the sum over i, j indicates a sum over the all visible and hidden units in the model, and θ = v h {θ1v , . . . , θN , θ1h , . . . , θN } are the parameters defining the v h v local distributions, Pi and Pjh , on respectively the variables of x and the variables of h. In the case that x ∈ {±1}Nv and h ∈ {±1}Nh , we can see that the distribution above reduces to a bipartite spin glass model with θ representing the local fields acting on the system spins; the fields b and c for binary spins as described in Eq. (1). This specific case is simply a binary RBM, as described in the previous section, and which we have already considered within an extended mean-field framework in [38]. The important distinction with the model we evaluate here is that we do not assume a binary discrete distribution on the variables, but instead allow for a formulation where the variables in the system can possess distributions on discrete- or real-valued bounded support. By considering this more general class of models, one can include a wide range of different models, including the Hopfield model and spike-and-slab RBMs [43], and data sets, such as images or genomic data, by varying the distributions of the hidden and visible units. The distribution of visible variables is obtained by marginalizing out the latent variables,   Z Y P (x; W, θ) =  dhj  P (x, h; W, θ), (10) j giving the log-probability ln P (x;W, θ) = − ln Z [W, θ] + + X Z ln X ln Pi (xi ; θiv ) i dhj Pj (hj ; θjh )ehj P l Wlj xl . (11) j If we take the gradients of (11) with respect to the model parameters, in the case of distribution terms θ we find,   ∂ ∂ v v ∆θi = ln Pi (xi ; θi ) − v ln Z [W, θ] , (12) v ∂θi ∂θi X and * ∆θjh = + ∂ ∂ h ln Pj (hj ; θj ) − h ln Z [W, θ] , (13) h ∂θj ∂θj X III. GENERAL DISTRIBUTIONS FOR RBMS We now turn our attention to the case of the general RBM (GRBM), where the distributions of the hidden and visible units are not fixed. We define the distribution of which are generalizations of (7) and (8). However, in the case of the gradient with respect to the couplings, we find * !+ X ∂ h ∆Wij = xi · f Wlj xl ; θj − ln Z [W, θ] , ∂Wij l X (14) 5 where the function R f (B; θ) = dh h · P (h; θ)eBh R dh P (h; θ)eBh (15) computes the conditional expectation of hl knowing the value of the visible units. It is important to note that the data-dependent term is tractable thanks to the bipartite structure of the one-hidden layer RBM. In contrast to the data-dependent terms, the second terms of Eqs. (12)–(14) require knowledge of the partials of the log normalization w.r.t. the parameter of interest. However, this term cannot be written exactly as the explicit calculation of the normalization is intractable. Rather than resorting to sampling, we will attempt to approximate the free energy F = − ln Z [W, θ] in a parametric and deterministic way, as in [38]. In the next section, we discuss how belief propagation (BP) can be used to estimate F and to conduct inference on RBMs. strong correlations both within and between receptive fields. In order to construct a BP algorithm for PDFs over realvalued support, one requires a finite memory description of the messages. Some examples of such descriptions are given in non-parametric BP [47], moment matching [48], and relaxed BP (r-BP) [49]. In Appendix B, following the example of r-BP, we show how to arrive at a two-moment approximation of the continuous BP messages via a smallweight expansion on the RBM coupling parameters W . There, we also show the r-BP approximated free energy of pairwise models, as well as demonstrating the need for distributions with bounded support in order to preserve bounded messages. In the next section, building upon this derivation, we consider mean-field approximations of the RBM via hightemperature Plefka expansion. V. IV. APPROXIMATION VIA BELIEF PROPAGATION One method by which we might estimate the partition of F is via belief-propagation (BP) [44], which we review in Appendix A for pairwise models such as the RBM. Essentially, given a factor graph for some joint statistical model, such as that of our RBM in Fig. 1, the BP algorithm attempts to estimate a set of marginal distributions at each variable. In the case of tree-like graphs, BP provides an exact calculation of these marginals. The application of BP to factor graphs containing cycles, loopy BP, is not guaranteed to provide accurate estimates of the marginals. However, often these estimated marginals have significant overlap with the true ones [45]. Additionally, it is known that the solutions of loopy BP are the fixed-points of the Bethe free energy [45], which allows the construction of an approximation of F. Applying this to the inverse learning problem, one can compute the gradients of this Bethe free energy in terms of the parameters of the model, allowing a gradient ascent on Bethe-approximated log-likelihood of the training data. One significant hurdle in the application of loopy BP to RBM learning for real-valued variables is that the messages propagated on the edges of the factor graph are continuous PDFs. In the case of discrete variables, such as Ising or Potts spins, BP messages can be written using magnetizations or the full discrete PMF, respectively. For binary variables, both BP and mean-field approximations of fully-connected Boltzmann machines were considered in [39] in the context of inference with fixed parameters. A similar study of binary RBMs was conducted with loopy BP in [46]. It is important to note that both of these studies investigated the properties of Boltzmann machines with i.i.d. random weights. While such studies permit many analytical tools for studying the behavior of the RBM, one cannot directly map these observations to RBM inference in practice, where trained weights may exhibit TAP APPROXIMATION FOR PAIRWISE MODELS While one could utilize the r-BP approach in order to estimate the free energy of a generalized real-valued spin model, as detailed in the earlier section, such an approach might not be desirable in practice. Specifically, if one wishes to solve the inverse learning problem, estimating model parameters from a given dataset, it is necessary to estimate the gradients of the model parameters w.r.t. the model likelihood for each parameter update. Using a steepest-ascent approach, as detailed in Sec. III, requires one to estimate these gradients many thousands of times. For systems of large size N , the r-BP scales quite poorly. Estimating a gradient requires the iteration of the r-BP equations on O(N 2 ) messages. Additionally, one must distinguish between cavity terms (i → j) and marginal terms (→ i). If the final O(N ) gradients we desire can be estimated using the marginal terms alone, then requiring an iteration on the O(N 2 ) set of messages is an extremely costly operation. Instead, one can turn to a mean-field approach, writing the free energy, and its stationary points, in terms of the marginals alone. This can be done by including certain correction terms, up to a specified degree in the weights. In the context of RBMs, such approaches have been proposed at both the 1st order, the naive mean-field [36], and the 2nd order, using the so-called ThoulessAnderson-Palmer (TAP) [23] equations for introducing an additional correction term [38, 39, 42, 50, 51]. In the case of a GRBM with arbitrary distributions on each unit, however, we must re-derive the TAP approximation in terms of parameters of these distributions as well as the approximate marginalized distribution at each site, up to their first two moments. This task turns out to be closely related to the TAP approach to low-rank matrix factorization [50–54]. While it is possible to derive the stationarity conditions for the inferred marginals from the r-BP messages directly 6 by Taylor expansion, we rather focus on the free energy directly that will provide the gradients we require for training the GRBM parameters via a high-temperature expansion we present below. Lastly, we point out that the TAP free energy secondorder (TAP) term depends on the statistical properties of the weight distribution. The derivation presented below assumes independent identically distributed weights, √ scaling as O(1/ N ). This assumption is a simplification, as in practice the weight distribution cannot be known a priori. The distribution depends on the training data and changes throughout the learning process according to the training hyper-parameters. The adaptive TAP (adaTAP) formalism [55] attempts to correct this assumption by allowing one to directly compute the “correct” second-order correction term for a realization of the W matrix without any hypothesis on how its entries are distributed. Although this algorithm is the most principled approach, its computational complexity almost rules out its implementation. Moreover, practical learning experiments indicate that training using adaTAP does not differ significantly from TAP assuming i.i.d. weights. A more detailed discussion of the computational complexity and learning performance is described in Appendix D. V.1. In the limit√N → ∞, if we assume that the entries of W scale as O(1/ N ) and that all sites are widely connected, on the order of the size of the system, then we can apply the TAP approximation – a high temperature expansion of the Gibbs free energy up to second-order [34, 35]. In the case of a Boltzmann distribution, the global minima of the Gibbs free energy, its value at equilibrium, matches the Helmholtz free energy F [56]. We will derive a twovariable parameterization of the Gibbs free energy derived via the Legendre transform [57]. Additionally, we will show that this two-variable Gibbs free energy is both variational and attains the Helmholtz free energy at its minima. For clarity of notation, we make our derivation in terms of a pairwise interacting Hamiltonian without enforcing any specific structure on the couplings; the bipartite structure of the RBM is reintroduced in Section VI. We will first introduce the inverse temperature term β to facilitate our expansion as β → 0, P (x; β, W, θ) = e−β(H−Fβ ) , where X (i,j) Wij xi xj − 1X ln Pi (xi ; θi ). β i (17) where we see that as the fields disappear, Fβ (0, 0) = Fβ , and we recover the true Helmholtz free energy. We additionally note the following identities for the augmented system, namely, ∂ [−βFβ (λ, ξ)] = hxi iλ,ξ , ∂λi ∂ [−βFβ (λ, ξ)] = x2i λ,ξ , ∂ξi (18) (19) where h·iλ,ξ is the average over the augmented system for the given auxiliary fields. Since the partial derivatives of the field-augmented Helmholtz free energy generate the cumulants of the Boltzmann distribution, it can be shown that the Hessian of −βFβ (λ, ξ) is simply a covariance matrix and, subsequently, positive semi-definite. Hence, −βFβ (λ, ξ) is a convex function in terms of λ × ξ. This convexity is shown to be true for all log partitions of exponential family distributions in [57]. We now take the Legendre transform of −βFβ (λ, ξ), introducing the conjugate variables a and c, − βGβ (a, c) = ( Derivation of the TAP Free Energy H=− system under the effect of two auxiliary fields, Z P P 2 − βFβ (λ, ξ) = ln dx e−βH+ i λi xi + i ξi xi , (16) We wish to derive our two-variable Gibbs free energy for this system in terms of the first two moments of the marginal distributions at each site. To accomplish this, we proceed as in [35, 55] by first defining an augmented ) 1X − β sup Fβ (λ, ξ) + λi ai + ξi (ci + a2i ) , (20) β i λ,ξ where we define the solution of the auxiliary fields at which Gβ (a, c) is defined as λ∗ , λ∗ (β, a, c), ξ ∗ , ξ ∗ (β, a, c), where we make explicit the dependence of the auxiliary field solutions on the values of the conjugate variables. Looking at the stationary points of these auxiliary fields, we find that ∂ ∂ [−βGβ (a, c)] = [−βF (λ∗ , ξ ∗ )] − ai , ∂λ∗i ∂λ∗i ∴ ai = hxi iλ∗ ,ξ∗ , (21) (22) and ∂ ∂ [−βGβ (a, c)] = ∗ [−βF (λ∗ , ξ ∗ )] − (ci + a2i ), ∂ξi∗ ∂ξi (23) ∴ ci = x2i 2 λ∗ ,ξ∗ − hxi iλ∗ ,ξ∗ . (24) The implication of these identities is that Gβ (a, c) cannot be valid unless it meets the self-consistency constraints that a and c are the first and second moments of the marginal distributions of the augmented system. Now, we wish to show the correspondence of Gβ (a, c) to the Helmholtz free energy at its unique minimum. First, let us look at the stationary points of −βGβ (a, c) with respect to its parameters. We take the derivative with 7 the Gibbs free energy to be decomposed into a sum of independent terms. Specifically, if we take the expansion up to s terms, careful application of the chain rule to find, X ∂ ∂ ∗ ∗ [−βGβ (a, c)] = ∗ [−βFβ (λ , ξ )] ∂ai ∂λ j j X ∂ ∂  ∗ ∗ ∗ + ∗ [−βFβ (λ , ξ )] ∂a ξj ∂ξ i j j X ∂   λ∗j − λ∗i − ∂a i j − 2ξi∗ ai − X ∂   ξ ∗ (ci + a2i ), ∂ai j j = −λ∗i − 2ξi∗ ai . (25) Carrying through a very similar computation for the derivative with respect to ci provides ∂c∂ i [−βGβ (a, c)] = ξi∗ . This shows that, at its solution, the Gibbs free energy must satisfy ξi∗ = 0, λ∗i + 2ξi∗ ai = 0, (26) which can only be true in the event that the solutions of the auxiliary fields are truly λ∗ = 0 and ξ ∗ = 0. Looking at the inverse Legendre transform of the Gibbs free energy for λ = 0, ξ = 0, we find that inf a,c Gβ (a, c) = Fβ (0, 0) = Fβ , which implies that the minimum of the Gibbs free energy is equivalent to the Helmholtz free energy. This holds since −βGβ (a, c) is convex, as the Legendre transform of a convex function is itself convex. Since the Gibbs free energy can therefore only possess a single solution, then its minimum must satisfy (26), and therefore, must be Fβ (0, 0) = Fβ . Finally, we can now rewrite the Gibbs free energy defined in Eq. (20) as a function of the moments a, c and parameterized by β and the GRBM parameters W and θ, Z e − βGβ (a, c; θ) = ln dx e−β H , (27) β=0 + s X βp ∂p h e i ln Zβ , p! ∂ p β β=0 p=1 (29) e where Zβ is the normalization of the Boltzmann distrie at temperature β. At β = 0 we can bution defined by H find the first term of the expansion directly X X ln Ze0 = − λ∗i (0)ai − ξi∗ (0)(a2i + ci ) i + X i Z ln ∗ X λ∗ (β) i i β (xi − ai ) − ξi∗ (β) 2 (xi − ci − a2i ), β (28) where the Lagrange multipliers are given as functions of the temperature in order to make clear the order in which we will apply β → 0 later. As this exact form of the Gibbs free energy is just as intractable as the original free energy, we will apply a Taylor expansion in order to generate an approximate Gibbs free energy [34]. We make this expansion at β = 0, as in the limit of infinite temperature, all interactions between sites vanish and the system can be described only in terms of individual sites and their relationship to the system average and their local potentials, allowing ∗ 2 dxi Pi (xi ; θi )eλi (0)xi −ξi (0)xi , (30) i where we recognize that the last term is simply the normalization of the Gaussian-product distribution whose moments were defined in (B9), (B10). We define the TAP free energy by writing the remainder of the expansions terms in the specific case of s = 2 [34, 35], X e (2) (a, c; θ) = −β G ln Zi (λ∗i (0), ξi∗ (0); θi ) β i − X +β i λ∗i (0)ai − X X ξi∗ (0)(a2i + ci ) i Wij ai aj + (i,j) β2 X 2 Wij ci cj , 2 (i,j) (31) R 2 where Zi (B, A; θ) , dx Pi (x; θ)eBx−Ax . Now, we still need to define the extremal values of λ∗ (0) and ξ ∗ (0) which define the Gibbs free energy. By taking the stationarity of the expanded Gibbs free energy with respect to a and c, we find X Ai , −2ξi (0)∗ = −β 2 Wij2 cj , (32) j∈∂i Bi , λi (0)∗ = Ai ai + β where e ,H− H e (s) (β, a, c; θ) = ln Zeβ −β G X Wij aj , (33) j∈∂i where we make the definitions of A and B for convenience and as a direct allusion to the definitions of the cavity sums for BP inference, given in Eqs. (B5), (B6). Conversely, by deriving the stationarity conditions of the auxiliary fields, we obtain the self-consistency equations for a, c, which show us that the TAP free energy is only valid when the following self-consistencies hold, ai = fa (Bi , Ai ; θi ), ci = fc (Bi , Ai ; θi ). (34) Substituting these values closes the free energy on the marginal distribution moments a, c and completes our derivation of a free energy approximation which is defined by O(N ) elements versus the O(N 2 ) values required by r-BP. 8 V.2. Solutions of the TAP Free Energy As given, the TAP free energy is only valid when the self-consistency equations are met at its stationary points. Thus, only a certain set of a, c can have any physical meaning. Additionally, we know that only at the minima of the exact Gibbs free energy will we have a correspondence with the original exact Helmholtz free energy. While the exact Gibbs free energy in terms of the moments a, c, is convex for exponential family P0 (x; θ) e such that e−β H ≥ 0, the TAP free energy can possess multiple stationary points whose number increases rapidly as β grows [5]. Later in Sec. VII, we show that as GRBM training progresses, so does the number of identified TAP solutions. This can be explained due to the variance of the weights W growing with training. For fixed β = 1, as we use in our practical GRBM implementation, the variance of the weights serves as an effective inverse temperature, and its increasing magnitude has an identical effect to the system cooling as β increases. Additionally, while the Gibbs free energy has a correspondence with the Helmholtz free energy at its minimum, this is not necessarily true for the TAP free energy. The approximate nature of the second-order expansion removes this correspondence. Thus, it may not be possible to ascertain an accurate estimate of the Helmholtz free energy from a single set of inferred a, c, as shown in Fig. 2. In the case of the naïve mean-field estimate of the e (1) . This implies Gibbs free energy, it is true that Fβ ≤ G β e (1) in that one should attempt to find the minima of G β order to find a more accurate estimate of Fβ , a foundational principle in variational approaches. However, while the extra expansion term in the TAP free energy should improve its accuracy in modeling Gβ over a, c, it does not provide a lower bound, and so an estimate of Fβ from the TAP free energy could be an under- or over-estimate. Instead, one might attempt to obtain an estimate of the Helmholtz free energy by utilizing either all or a subset of the equilibrium solutions of the TAP free energy. Since there is no manner by which we might distinguish the equilibrium moments by their proximity to the unknown Fβ , averaging D theETAP free energy across its solutions, e (2) , can serve as a simple estimator of denoted as G β ∗ Fβ [5]. In [58] a weighting was introduced to the average, correcting the Helmholtz free energy estimate at low temperature by removing the over-influence of the exponential number of high-energy solutions. The weights in this approach are proportional to the exponents of each solution’s TAP free energy, placing much stronger emphasis on low-energy solutions. However, such an approach is not well-justified in the our general setting of Pi , where we expect large deviations from the expectations derived for the SK model. Additionally, while this weighting scheme is shown across the entire set of solutions for a particular random SK model, in our case, we are interested in the solution space centered on the particular dataset we wish to model. Since Gβ e (2) G β Fβ D E e (2) G β ∗ {a, c} FIG. 2. Cartoon description for estimating the Helmholtz free energy (dotted ) via the Gibbs (blue dash) and TAP (red ) free energies. For this example of a convex Gibbs free energy, there exists one unique minimum over the moments a, c, and the Gibbs free energy here matches Fβ . The range of TAP free energies (gray box ) gives a boundary on the location of Fβ . Averaging the TAP free energies (dash-dot) provides an estimate of Fβ . the solutions are computed by iterating the TAP selfconsistency equations, we can easily probe this region by initializing the iteration according to the training data. Subsequently, we do not encounter a band of high-energy solutions that we must weight against. Instead, we obtain a set of solutions over a small region of the support of the TAP free energy. Due to the uniformity of these solutions, un-weighted averaging across the solutions seems the best approach in terms of efficiency. In the subsequent section, we explore some of these properties numerically for trained RBMs. VI. RBMS AS TAP MACHINES To utilize the TAP inference of Sec. V, we need to write the TAP free energy in terms of the variables of the RBM. To clarify the bipartite structure of the GRBM, we rewrite the TAP free energy in terms of the hidden and visible variables at fixed temperature β = 1,  − FRBM av , cv , ah , ch ; θ =  X 1 ln Ziv (Biv , Avi ; θiv ) − Biv avi + Avi ((avi )2 + cvi ) 2 i   X 1 + ln Zjh (Bjh , Ahj ; θjh ) − Bjh ahj + Ahj ((ahj )2 + chj ) 2 j   X 1 + Wij avi ahj + Wij2 cvi chj , (35) 2 ij  where {av , cv } and ah , ch are the means and variances of the visible and hidden variables, respectively. As in Sec. V, solutions of the TAP GRBM free energy can be found by a fixed-point iteration, as shown in Alg. 9 1, which bears much resemblance to the AMP iteration derived in the context of compressed sensing [59, 60] and matrix factorization [51, 53, 54]. We note that rather than updating over the entire system at each time step, fixing one side at a time has the effect of stabilizing the fixedpoint iteration. For clarity, Alg. 1 is written for a single initialization of the visible marginals. However, as noted in Sec. V.2, there exist a large number of initializationdependent solutions to the TAP free energy. Thus, in order to capture the plurality of modes present in the TAP free energy landscape, one should run this inference independently for many different initializations. If the use case of the GRBM requires that we only train the GRBM tightly to the data space (e.g. data imputation), it makes sense to fix the initializations of the inference to points drawn from the dataset, av,(0) = x(m) c v,(0) = 0. where m ∈ {1, . . . , M } , (36) (37) In order to train the GRBM more holistically, structured random initializations can help probe modes outside of the data space. For a set of TAP solutions {ak , ck , Bk , Ak } for k ∈ {1, . . . , K} at fixed GRBM parameters {W, θ}, the TAPapproximated log-likelihood of can be written as X ln P (x; W, θ) ≈ ln Pi (xi ; θiv ) i + X X ln Zjh ( j Wij xi , 0; θjh ) i  1 X FRBM avk , cvk , ahk , chk ; θ , + K (38) k where Zjh (B, 0; θ) is the normalization of the conditional expectation of Eq. (15), since fa (B, 0; θ) = f (B; θ). After re-introducing an averaging of the log-likelihood over the samples in the mini-batch, the gradients of the TAP-approximated GRBM log-likelihood w.r.t. the model parameters are given by 1 X (m) h X (m) x fa ( Wij xi , 0; θjh ) M m i i 1 X v h − ai,k aj,k + Wij cvi,k chj,k , (39) K k " # X 1 X ∂ (m) h h h ∆θj ≈ ln Zj ( Wij xi , 0; θj ) M m ∂θjh i  1 X ∂  h − ln Zjh (Bj,k , Ahj,k ; θjh ) , (40) h K ∂θj k i 1 X ∂ h v (m) v ∆θiv ≈ ln P (x ; θ ) i i i M m ∂θiv  1 X ∂  v − ln Ziv (Bi,k , Avi,k ; θiv ) . (41) K ∂θiv ∆Wij ≈ k Algorithm 1 TAP Inference for GRBMs Input: W , θ Initialize: t = 0, av,(0) , cv,(0) repeat Hidden Side Updates P h,(t+1) v,(t) Aj = − i Wij2 ci h,(t+1) P h,(t+1) h,(t) v,(t) = Aj aj + i Wij ai   h,(t+1) h,(t+1) h,(t+1) aj = fah Bj , Aj ; θjh   h,(t+1) h,(t+1) h,(t+1) cj = fch Bj , Aj ; θjh Bj Visible Side Updates P v,(t+1) h,(t+1) Ai = − j Wij2 cj P v,(t+1) v,(t+1) v,(t) h,(t+1) Bi = Ai ai + j Wij aj   v,(t+1) v,(t+1) v,(t+1) ai = fav Bi , Ai ; θiv   v,(t+1) v,(t+1) v,(t+1) ci = fcv Bi , Ai ; θiv t=t+1 until Convergence In the presented gradients, we make the point that the set of data samples and the set of TAP solutions can have different cardinality. For example, one might employ a mini-batch strategy to training, where the set of data samples used in the gradient calculation might be on the order 102 . However, depending on the application of the GRBM, one might desire to probe a very large number of TAP solutions in order to have a more accurate picture of the representations learned by the GRBM. In this case, one might start with a very large number of initializations, resulting in a very large number, K  M , of unique TAP solutions. Or, contrary, while one might start with a number of initializations equal to M , the number of unique solutions might be K  M , especially early in training or when the number of hidden units is small. Using these gradients, a simple gradient ascent with a fixed or monotonically decreasing step-size γ can be used to update these GRBM parameters. We present the final GRBM training algorithm in Alg. 2. Besides considering non-binary units, another natural extension of traditional RBMs is to consider additional hidden layers, as in Deep Boltzmann Machines (DBMs). It is possible to define and train deep TAP machines, as well. Probabilistic DBMs are substantially harder to train than RBMs as the data-dependent (or clamped) terms of the gradient updates (39-41) become intractable with depth. Interestingly, state-of-the-art training algorithms retain a Monte Carlo evaluation of other intractable terms, while introducing a naıve mean-field approximation of these data-dependent terms. For deep TAP machines, we consistently utilize the TAP equations. The explicit definition and training algorithm are fully described in Appendix E. 10 (a) binary-MNIST −0.06 (t+1) (t) (t) Wij ← Wij + γ∆Wij + ,(t+1) ,(t) ,(t) θjh ← θjh + γ∆θjh v ,(t+1) v ,(t) v ,(t) θi ← θi + γ∆θi (t) γR(Wij ) + (t−1) η∆Wij Normalized TAP Log-likelihood Algorithm 2 GRBM Training Input: X, T , M , K, R(·) (0) Initialize: Wij ∼ N (0, σ), θ (0) ← X repeat for All mini-batches of size M do a(t+1) , c(t+1) , B(t+1) , A(t+1) ← Alg. 1(W (t) , θ (t) ) × K −0.08 −0.10 −0.12 −0.14 −0.16 −0.18 −0.20 NH = 500 NH = 100 −0.22 −0.24 20 40 60 NH = 50 NH = 25 80 100 Training Epochs end for t←t+1 until t > T (b) real-MNIST EXPERIMENTS VII.1. Datasets MNIST — The MNIST handwritten digit dataset [61] consists of both a training and testing set, each with 60,0000 and 10,000 samples, respectively. The data samples are real-valued 28 × 28 pixel 8-bit grayscale images which we normalize to the dynamic range of [0, 1]. The images themselves are centered crops of the digits ‘0’ through ‘9’ in roughly balanced proportion. We construct two separate versions of the MNIST dataset. The first, which we refer to as binary-MNIST, applies a thresholding such that pixel values > 0.5 are set to 1 and all others to 0. The second, real-MNIST, simply refers to the normalized dataset introduced above. CBCL — The CBCL face database [62] consists of both face and non-face 8-bit grayscale 19×19 pixel images. For our experiments, we utilize only the face images. The database contains 2,429 training and 472 testing samples of face images. For our experiments, we normalize the samples to the dynamic range of [0, 1]. binary-MNIST real-MNIST CBCL Nv 784 784 361 Nh {25, 50, 100, 500} {100, 500} 256 M 100 100 20 K 100 100 20 Prior Vis. B. Tr. Gauss.-B. Tr. Gauss. Prior Hid. B. B. B. R(·) `2 `2 `2  −2  γ 0.005 10 , 10−5 0.005  0.001 0.001 0.01 η 0.5 0.5 0.5 TABLE I. Parameter settings for GRBM training. −0.35 −0.40 −0.45 −0.50 −0.55 −0.60 −0.65 −0.70 NH = 100 20 40 60 NH = 500 80 100 Training Epochs (c) CBCL −0.05 Normalized TAP Log-likelihood VII. Normalized TAP Log-likelihood −0.30 −0.10 −0.15 −0.20 −0.25 NH = 256 −0.30 100 200 300 400 500 Training Epochs FIG. 3. Training performance over 100 epochs for the tested datasets over varying numbers of hidden units, Nh . Performance is measured in terms of the normalized (per-unit) TAP log-likelihood estimate computed for 10,000 training data samples. The TAP free energy is estimated using the unique TAP solutions thermalized from initial conditions drawn from the data samples, as in (36)–(37). Thermalization is determined by the convergence of the magnetizations up to a difference of 10−8 in MSE between iterations. Solid lines indicate the average normalized TAP log-likelihood over the tested training samples and shaded regions indicate standard error. VII.2. Learning Dynamics We now investigate the behavior of the GRBM over the course of the learning procedure, looking at a few metrics of interest: the TAP-approximated log-likelihood of the training dataset, the TAP free energy, and the number of discovered TAP solutions. We note that each of these metrics is unique to the TAP-based model of the GRBM. 11 NH = 100 NH = 500 NH = 100 NH = 500 Most Active Features Most Localized Features Least Active Features (c) CBCL Most Spread Features Most Active Features NH = 256 NH = 256 Least Active Features Most Spread Features NH = 100 NH = 500 NH = 100 NH = 500 (b) real-MNIST Most Localized Features NH = 256 NH = 256 Most Active Features NH = 25 NH = 50 NH = 100 NH = 500 NH = 25 NH = 50 NH = 100 NH = 500 NH = 25 NH = 50 NH = 100 NH = 500 NH = 25 NH = 50 NH = 100 NH = 500 (a) binary-MNIST Most Spread Features Most Localized Features Least Active Features FIG. 4. Subsets of the final receptive fields, i.e. the columns of W , obtained by TAP training of GRBM models with varying numbers of hidden units, Nh . For the receptive fields, dark blue and yellow are mapped to −1 and +1, respectively, and green indicates a value of 0. Receptive fields are ranked according to two criteria. First, spread, and conversely localization, as measured by the `p -norm of the receptive field, for p = 0.1. Second, by activation level, as measured by the mean activation of each receptive field’s corresponding hidden unit averaged across the training dataset. While it was shown in [38] that CD does indeed maximize the TAP log-likelihood in the case of binary RBMs, the specific construction of CD is entirely independent from the TAP model of the GRBM. Thus, it is hard to say that a CD or TAP-trained GRBM is “better” in a general case. At present, we present comparisons between TAP GRBMs of varying complexity trained under fixed hyper-parameters settings, as indicated in Table I. In Fig. 3 we see a comparison of the TAP log-likelihood as a function of training epochs for binary-MNIST for binary RBMs consisting of differing numbers of hidden units. As the gradient-ascent on the log-likelihood is performed batch-by-batch over the training data, we define one epoch to be a single pass over the training data: every example has been presented to the gradient ascent once. The specifics of this particular experiment are given in the caption. We note that for equal comparison across varying model complexity, this log-likelihood is normalized over the number of visible and hidden units present in the model. In this way, we observe a “per-unit” TAP log-likelihood, which gives us a measure of the concentration of representational power encapsulated in each unit of the model. Increasing values of the normalized TAP log-likelihood indicate that the evaluated training samples are becoming more likely given the state of the GRBM model parameters. It can be observed that at each level of complexity, the TAP log-likelihood of the data rapidly increases as the values of W quickly adjust from random initializations to receptive fields correlated with the training data. However, across each of the tested models, by about the 20th epoch the rate of increase of the TAP log-likelihood tapers off to a constant rate of improvement. For reference, we also show a subset of the trained receptive fields, i.e. the rows of W , for each of the tested experiments. Since the full set of receptive fields would be too large to display, we attempt to show some representative samples in Fig. 4 by looking at the extreme samples in terms of spatial spread/localization and activity over the training set. We observe that the trained GRBMs, in the case of both binary-MNIST and real-MNIST, are able to learn both the localized and stroke features commonly observed in the literature for binary RBMs trained on the MNIST dataset [9, 63]. It is interesting to note that even in the case of real-MNIST, where we are using the novel implementation of truncated Gauss-Bernoulli visible units, we are able to observe similar learned features as in the case of binary-MNIST. We take this as an empirical indication that the proposed framework of GRBM learning is truly learning correlations present in the dataset as intended. Finally, we see feature localization increase with the number of hidden units. To date, understanding “what” an RBM learns from the unlabelled data has mostly been a purely subjective exercise in studying the receptive fields, as shown Fig. 4. However, the interpretation of the GRBM as a TAP machine can provide us a novel insight in the nature and dynamics of GRBM learning via the stationary points of the TAP free energy, which we detail in the next section. VII.3. Probing the GRBM Given the deterministic nature of the TAP framework, it is possible to investigate the structure of the modes which a given set of GRBM parameters produces in the free energy landscape. Understanding the nature and concentration of these modes gives us an intuition on the representational power of the GRBM. 12 (a) binary-MNIST (b) real-MNIST (c) CBCL FIG. 5. Distribution of free energy estimates of TAP solutions as a function of training epochs for the three different datasets. In the case of the two MNIST experiments, the number of hidden units is the same Nh = 100 and 10, 000 samples drawn from the training data are used as initial conditions. For CBCL, 2, 400 training samples are used. Top Row: TAP Free energy for all unique TAP solutions (transparent blue dots), and the Helmholtz free energy estimate via uniform averaging (red line). The number of unique TAP solutions is also given (green line). Bottom Row: Detail of TAP free energy distributions for slices of training. Histograms are given as bars, while kernel density estimates of the TAP free energy distribution are given as curves. To date, observing the modes of a given GRBM model could only be approached via long-chain sampling. Given enough sampling chains from a diverse set of initial conditions, thermalizing these chains produces a set of samples from which one could attempt to derive statistics, such as concentrations of the samples in their high-dimensional space, to attempt to pinpoint the likely modes in the model. However, the number of required chains to resolve these features increases with the dimensionality of the space and the number of potential modes which might exist in the space. Because of this, the numerical evaluation we carry out here would be impractical with sampling techniques. The r-BP and mean-field models of the RBM allow us to directly obtain the modes of the model by running inference to solve the direct problem. Given a diverse set of initial conditions, such as a given training dataset, running r-BP or TAP provides a deterministic mapping between the initial conditions drawn from the data, as in (36)–(37), and the “nearest” solution of the TAP free energy. If the initial point was drawn from the dataset, then this solution can be interpreted as the RBM’s bestmatching internal representation for the data point. If a large number of structurally diverse data points map to a single solution, then this may be an indicator that the GRBM parameters are not sufficient to model the diverse nature of the data, and perhaps further changes to the model parameters or hyper-parameters are required. Conversely, if the number of solutions explodes, being roughly equivalent to the number of initial data points, then this indicates a potential spin-glass phase, that the specific RBM is over-trained, perhaps memorizing the original data samples during training. Additionally, when in such a phase, the large set TAP solutions may be replete with spurious solutions which convey very little structural information about the dataset. In this case, hyper-parameters of the model may need to be tuned in order to ensure that the model possess a meaningful generalization over the data space. To observe these effects, we obtain a subset of the TAP solutions by initializing the TAP iteration with initial conditions drawn from the data set, running the iteration until convergence, and then counting the unique TAP solutions. We present some measures on these solutions in Fig. 2. Here, we both count the number of unique TAP solutions, as well as the distribution of the TAP free energy over these solutions, across training epochs. There are a few common features across the tested datasets. First, the early phase of training shows a marked increase of the TAP free energy, which then gradually declines as training continues. Comparing the point of inflection in the TAP free energy against the normalized TAP loglikelihood shown in Fig. 3 shows that the early phase of GRBM training is dominated by the reinforcement of the empirical moments of the training data, with the GRBM model correlations playing a small role in the the gradient of (14). This makes sense, as the random initialization of W ∼ N (0, σ) for σ ≈ 10−3 implies that the hidden units are almost independent of the training data. Thus, the TAP solutions at the early stage of learning are driven by, and correlated with, the local potentials on the hidden and visible variables. The effect of this influence is that the TAP free energy landscape possesses very few modes in the data space. Fig. 5 shows this very clearly, as the number of TAP solutions starts at 1 and then steadily increases with train- 13 ing. Because the positive data-term of (14) is dominant, the GRBM parameters do not appear to minimize the TAP free energy, as we would expect. However, as more TAP solutions appear, the data and model terms of the gradient become balanced, and the TAP free energy is minimized. It is at this point of inflection that we see leveling off of the normalized TAP log-likelihood. Second, we observe free-energy bands in the TAP solutions. This feature is especially pronounced in the case of the binary-MNIST experiment. Here, at all training epochs, there exist two significant modes in the free energy distribution over the TAP solutions. We see this effect more clearly in the training-slice histograms shown in the bottom row of Fig. 5(a). In the case of the real-MNIST experiment, we see that the free energy distributions do not exhibit such tight banding, but they do show the presence of some high- and low-energy solutions which persist across training. The main feature across experiments is the multi-modal structure of the free energy distribution. Finally, we note that for both real-MNIST and binary-MNIST, in the case of Nh = 100, we don’t empirically observe an explosion of TAP solutions, a potential indicator a spin-glass phase, since the proportion of unique TAP solutions to the initial data points remains less than 10%. In order to investigate whether the modes in the TAP free energy distributions are randomly assigned over configuration space, or exist in separate continuous partitions of the configuration space, we need to look at the proximity of the solutions in the configuration space. Because this space cannot be observed in its ambient dimensionality, we project the configuration space into a two-dimensional embedding in Fig. 6. Here, we utilize the well known Isomap [64] algorithm for calculating a two-dimensional manifold which approximately preserves local neighborhoods present in the original space. Using this visualization we observe that as training progresses the assignment of high and low free energy to TAP solutions does not appear random in nature, but seems to be inherent to the structure of the solutions themselves, that is, their location in the configuration space. Additionally, in Fig 6 we can see the progression from few TAP solutions to many, and how they spread across the configuration space. It is interesting to note how the solutions start from a highly correlated state and then proceed to diversify. We can also observe the TAP solutions with respect to the initializations which produced them, as shown in Fig. 7. In these charts, we use a similar approach as Fig. 6, mapping all high-dimensional data points, as well as TAP magnetizations, into a 2D embedding using Isomap. This allows us to see, in an approximate way, how the TAP solutions distribute themselves over the data space. We also show how the number of TAP solutions grows from few to many over training, and how they maintain a spread distribution over the data space. This demonstrates how the training procedure is altering the parameters of the model so as to place TAP solutions within dense regions of the data space. For the sake of clarity, we have not included lines indicating the attribution of an initial data point to its resultant TAP solution. However, as training progresses, one sees that the TAP solutions act as attractors over the data space, clustering together data points which the TAP machine recognizes as similar. VII.4. Inference for Denoising Serving as a prior for inference is one particular use case for the TAP machine interpretation of the GRBM. As a simple demonstration, we turn to the common signal processing task of denoising. Specifically, given a planted signal, one observes a set of noisy observations which are measures of the true signal corrupted by some stochastic process. Denoising tasks are ubiquitous in signal processing, both at an analog level (e.g. additive and shot noise), and at the level of digital communications (e.g. binary symmetric and erasure channels). The goal of this task is to produce the most accurate estimate of the unknown signal. In the analog case, this may be a measure of mean-square-error (MSE) between the estimate and the true signal. In the binary case, this may be a measure of accuracy, counting the number of incorrect estimates, or some other function of the binary confusion matrix, such as the F1-score or Matthews correlation coefficient (MCC). For a fixed set of observations and channel parameters, if we assume that the original signal was drawn from some unknown and intractable generating distribution, then as we construct more and more accurate tractable approximate priors, the more accurately we can construct an estimate of the original signal. In other words, the more we know about the structure and content of the unknown signal a priori, the closer our estimate can be. Often, as in the case of wavelet-based image denoising, statistics are gathered on the transform coefficients of particular images classes and heuristic denoising approaches are designed by-hand accordingly [65]. By-hand derivation of denoising algorithms works well in practice owing to its generality. Specific a priori information about the original signal is not required, beyond its signal class (e.g. natural images, human speech, radar return timings). However, meaningful features must be assumed or investigated by practitioners before successful inference can take place. 14 Epoch 5 Isomap Dim. 2 Epoch 4 Isomap Dim. 2 Epoch 3 Isomap Dim. 2 Epoch 2 Isomap Dim. 2 Isomap Dim. 2 Epoch 1 Epoch 10 Isomap Dim. 2 Isomap Dim. 1 Epoch 9 Isomap Dim. 2 Isomap Dim. 1 Epoch 8 Isomap Dim. 2 Isomap Dim. 1 Epoch 7 Isomap Dim. 2 Isomap Dim. 1 Epoch 6 Isomap Dim. 2 Isomap Dim. 1 Epoch 60 Isomap Dim. 2 Isomap Dim. 1 Epoch 50 Isomap Dim. 2 Isomap Dim. 1 Epoch 40 Isomap Dim. 2 Isomap Dim. 1 Epoch 30 Isomap Dim. 2 Isomap Dim. 1 Epoch 20 Isomap Dim. 2 Isomap Dim. 1 Isomap Dim. 1 Epoch 100 High Isomap Dim. 2 Relative TAP FE Isomap Dim. 1 Epoch 90 Isomap Dim. 2 Isomap Dim. 1 Epoch 80 Isomap Dim. 2 Isomap Dim. 1 Epoch 70 Isomap Dim. 2 Isomap Dim. 1 Low Isomap Dim. 1 Isomap Dim. 1 Isomap Dim. 1 Isomap Dim. 1 FIG. 6. Isomap visualization of TAP solutions for binary-MNIST over training epochs for Nh = 100. All TAP solutions are mapped to the same two-dimensional embedding via an Isomap transform fitted to the TAP solutions of Epoch 100. The embedding is performed on both the hidden and visible inferred expectations, av and ah . The color mapping corresponds to the TAP free energy values of each solution, with the range of colors normalized between the minimum and maximum free energies of the solution at each training epoch. 15 (a) binary-MNIST (Nh = 100) Epoch 3 Epoch 25 Class ‘3’ Digits Class ‘6’ Digits Class ‘7’ Digits Isomap Dim. 2 Class ‘3’ Digits Class ‘6’ Digits Class ‘7’ Digits Isomap Dim. 1 Class ‘3’ Digits Class ‘6’ Digits Class ‘7’ Digits Isomap Dim. 1 Class ‘3’ Digits Class ‘6’ Digits Class ‘7’ Digits Isomap Dim. 1 Isomap Dim. 1 (b) real-MNIST (Nh = 500) Epoch 3 Epoch 25 Class ‘3’ Digits Class ‘6’ Digits Class ‘7’ Digits Isomap Dim. 2 Epoch 100 Isomap Dim. 2 Isomap Dim. 2 Isomap Dim. 2 Epoch 1 Class ‘3’ Digits Class ‘6’ Digits Class ‘7’ Digits Isomap Dim. 1 Class ‘3’ Digits Class ‘6’ Digits Class ‘7’ Digits Isomap Dim. 1 Class ‘3’ Digits Class ‘6’ Digits Class ‘7’ Digits Isomap Dim. 1 Isomap Dim. 1 (c) CBCL (Nh = 256) Epoch 100 Epoch 200 Data Points Isomap Dim. 2 Epoch 500 Isomap Dim. 2 Isomap Dim. 2 Isomap Dim. 2 Epoch 5 Isomap Dim. 1 Epoch 100 Isomap Dim. 2 Isomap Dim. 2 Isomap Dim. 2 Epoch 1 Data Points Isomap Dim. 1 Data Points Data Points Isomap Dim. 1 Isomap Dim. 1 FIG. 7. Comparison of initial conditions for TAP equilibration (colored dots) compared to converged TAP solutions (black dots) for the tested datasets at different stages of training. For each dataset, a two-dimensional Isomap embedding is calculated over the initialization data. Subsequently, the magnetizations of the TAP solutions are embedded in the same space. In each case, all initial variances are set to 0, as in Eq. 37. Also, a random selection of TAP solution magnetizations are chosen to provide some context for the representations the RBM is learning. (a) binary-MNIST: Here, the ∼3,100 digits corresponding to the classes ‘3’, ‘6’, and ‘7’ are drawn from the first 10,000 training samples of the binarized MNIST dataset as initializations. A reduced set of labels is used for readability. (b) real-MNIST: The same initializations are used as in (a), however, the initializations are not binarized. (c) CBCL: All available training face images are used as initializations. VII.4.1. Denoising the Binary Symmetric Channel likelihood at each observation, Y  p δxi ,yi P (y|x) = (1 − p) , 1−p i For binary denoising problems, we assume a binary symmetric channel (BSC) defined in the following manN ner. Given some binary signal x ∈ {0, 1} , we observe N the signal y ∈ {0, 1} as x with independent bit flips occurring with probability p. This gives the following (42) which can be shown to have the equivalent representation as a Boltzmann distribution, P (y|x) = 1 Pi Di xi , e Z(y) (43) 16 p where Di , ln 1−p (2yi − 1). For a given prior distribution P (x), the posterior distribution is given by Bayes’ rule, x Di xi P (x) P . e i Di xi P (x) 1 1+  1−mi mi   ×  1−p p 0.6 0.4 0.2 2yi −1 , m p = sigm ln + (2yi − 1) ln 1−m 1−p 0.8 (44) = 25 = 50 = 100 = 500 OPE 1-NN i Q By assuming a factorized P (x) = i mxi i (1 − mi )1−xi , where mi might be per-site empirical averages obtained from available training data, the posterior factorizes and we can construct the Bayes-optimal pointwise estimator (OPE) as the average hxi iP (xi |yi ) which is just P (xi = 1|yi ) for our binary problem. Thus, the OPE at each site xi is given as P (xi = 1|yi ) = Nh Nh Nh Nh MCC P e P (x|y) = P 1.0  . (45) For a given dataset, the OPE gives us the best-case performance using only pointwise statistics from the dataset, namely, empirical estimates of the magnetizations mi . We can see from Eq. (45) that the OPE either returns the observations, in the case of p = 0, or the prior magnetizations mi , in the case p = 0.5. In this case of complete information loss, the worst case performance is bounded according to the deviation of the dataset from its mean. We present the performance of the OPE in Fig. 8 for the binary-MNIST dataset. This makes the OPE a valuable baseline comparison and sanity check for the GRBM approximation of P (x). As the GRBM model takes into account both pointwise and pairwise relationships in the data, a properly trained GRBM should provide estimates at least as good as the OPE. The k-Nearest-Neighbor (k-NN) algorithm represents a different heuristic approach to the same problem [66]. In this case, the noisy measurements are compared to a set of exemplars: the training dataset. Then, according to some distance metric such as MSE or correlation, one finds the k exemplars with minimal distance to the noisy observations to serve as a basis for recovering the original binary signal. One can use some arbitrary approach for fusing these exemplars together into the final estimate, but the simplest case would be a simple average. In the case that k → ∞, the performance when using averaging is again bounded by the empirical magnetizations. In the other limit of k = 1, the estimate is simply the nearest exemplar. It is hard to show the limiting performance of this approach, as it is dependent on the distances, in the chosen metric, between the exemplars and the observations, as well as the interplay between the noise channel and the distance metric. However, it can be seen directly that this approach is non-optimal, as this approach will not yield the true 0.0 0.0 0.1 0.2 0.3 Bit Flip Probability 0.4 0.5 FIG. 8. Average denoising performance for reconstruction from bit-flip errors on binary-MNIST over the probability of a bit to be flipped. Denoising via inference on the binary-binary RBM is denoised by the varying numbers of hidden units (Nh = {25, 50, 100, 500}). Also shown as baseline comparisons are the OPE given the empirical factorized magnetizations at each site (dashed black ), and a 1-NN matching from the training set (solid black ). All experiments were run over the same 1,000 data samples drawn from the held-out test set and compared using the MCC. Binary estimates are obtained for the OPE and TAP inferred estimates by rounding the resulting magnetizations. signal at p = 0 unless the true signal is itself contained within the training data. We show the performance for k = 1 in Fig. 8. The advantage of this approach is that it successfully regularizes against noise as p → 0.5, as the nearest exemplar is always noise-free and at least marginally correlated with the original signal, up to the distance metric. Additionally, we see that it performs better than the OPE in the regime p > 0.2. This can be explained since we can think of the k-NN approach as implicitly, though indirectly, taking into account higherorder correlations in the dataset by naïvely returning data exemplars; all the estimates trivially posses the same arbitrarily complex structure as the unknown signal. Using the GRBM, we can hope to capture the best points of both approaches. First, we hope to perfectly estimate the original signal in the case p = 0. Second, we hope to leverage the pairwise correlations present in the dataset, returning estimates which retain the structure of the data even as p → 0.5. For GRBM denoising of the BSC, we no longer have a factorized posterior. Instead, we have the GRBM likelihood given in Eq. (9) summed over the hidden units. Using the definition of the binary 17 prior given in Appendix 3, P (x; W, U ) ∝ X e P ij P P xi Wij hj + i Ui xi + j Uj hj 1-NN . (46) OPE h Since both the GRBM and the BSC channel likelihood are written as exponential family distributions, P (y|x)P (x; W, U) ∝ P P xi Wij hj +P (Di +Ui )xi +P Uj hj ij i j e . Finding the h averages hxi i for this model simply consists in running the TAP-based inference of Alg. 1 for the modified visible binary prior B(xi ; Ui + Di ). One heuristic caveat of this approach is that we must take into account the multi-modal nature of the TAP free energy. Since we must initialize somewhere, and the resulting inference estimate is dependent upon this initialization, we initialize the inference with the OPE result. We can see that as p → 0, Di → ±∞ and the highest probability configuration becomes observations. So, in the limit, we are able to obtain the true signal, just as the OPE, especially since we initialize within the well of this potential. This is shown for binary RBMs trained with varying numbers of hidden units in Fig. 8. In every case, for p = 0, the true signal is recovered. In the case of Nh = {25, 50, 100}, we see that the TAP inference on the binary RBM always outperforms the OPE. Additionally, we see that in each of these cases, the performance closely mirrors that of the 1-NN as p → 0.5. In the limit p = 0.5, we see that the result of the TAP inference is, essentially, uncorrelated with the original signal, as in this case, there is no extra potential present to bias the inference, and the resulting estimate is simply an arbitrary solution of the TAP free energy. As this closely mirrors the exemplar selection in 1-NN, the MCC curves for the two approaches are similar. In the case of Nh = 500, we can see that an over-training effect occurs. Essentially, at low values of p, the TAP inference over the binary RBM is able to more accurately identify the original signal. However, at a certain point, owing to the increased number of solutions in the TAP free energy, there exist many undesirable minima around the noisy solutions, leading to poor denoising estimates. One can observe this subjectively in Fig. 9, where in the case of Nh = 500, the TAP inference results in either nearly zero-modes, or in very localized ones. This would seem to indicate that landscape of the TAP free energy around the initializations is becoming more unstable as the density of solutions increases around it. Additionally, since the TAP free energy landscape was only probed using data points during training, the clustering of solutions around noisy samples remains ambiguous. Augmenting the initializations used when calculating the TAP solutions for the gradient estimate with noisy data samples could help alleviate this problem and regularize the TAP free energy landscape in the space of noisy data samples. Nh = 25 Nh = 50 Nh = 100 Nh = 500 p = 0.00 p = 0.07 p = 0.12 p = 0.17 p = 0.22 p = 0.26 p = 0.31 p = 0.36 p = 0.41 p = 0.45 p = 0.50 FIG. 9. Subjective comparison of denoising estimates for a single digit image for p = [0, 0.5]. For the OPE and RBM approaches, the inferred posterior averages hxi i are shown, rather than the final configurations, where white and black represent the values 0 and 1, respectively. At each tested value of p, the same noise realization is used for each method. As p increases, for Nh = {25, 50, 100}, the TAP inference for the RBM provides estimates which still possess digit structure. In the case Nh = 500, the TAP inference gets caught in spurious and undesirable minima as p increases. VIII. DISCUSSION In this paper, we have proposed a novel interpretation of the RBM within a fully tractable and deterministic framework of learning and inference via TAP approximation. This deterministic construction allows novel tools for scoring unsupervised models, investigation of the memory of trained models, as well as allowing their efficient use as structured joint priors for inverse problems. While deterministic methods based on NMF for RBM training were shown to be inferior to CD-k in [36], the level of approximation accuracy afforded by TAP finally makes the deterministic approach to RBMs effective, as shown in the case of binary RBMs in [38]. Additionally, our construction is generalized over the distribution of both the hidden an visible units. This is unique to our work, as other works propose unique training methods and models when changing the distribution of the visible units. For example, this can be seen in the modified Hamiltonians used for real-valued data [67, 68]. This construction allows us to consider binary, real-valued, and sparse real-valued datasets within the same framework. Additionally, one can also consider other architectures by changing the distributions imposed on the hidden unit. Here, we present experiments using only binary hidden units, but one could also use our proposed framework for Gaussian-distributed hidden units, thus mimicking a Hopfield network [2]. Or, also, sparse GaussBernoulli distributed hidden units could mimic the same functionality as that proposed by the spike-and-slab RBM [43]. We have left these investigations to further works on this topic. 18 Our proposed framework also offers a possibility to explore the statistical mechanics of these latent variable models at the level of TAP approximation. Specifically, for a given statistical model of the weights W , both the cavity method and replica can begin to make predictions about these unsupervised models. Analytical understanding of the complexity of the free energy landscape, and its transitions as a function of model hyper-parameters, can allow for a richer understanding of statistically optimal network construction for learning tasks. In the case of random networks, there has already been some progress in this area, as shown in [69] and [70]. However, similar comprehensive studies conducted on learning in a realistic setting are still yet to be realized. Finally, as our framework can be applied to deep Boltzmann machines with minimal alteration, it can also potentially lead to a richer understanding of deep networks and the role of hierarchy in regularizing the learning problem in high dimensionality. joint distribution over x, P P P (x; W, θ) ∝ e (i,j) φ(xi ,xj ;Wij )+ i φ(xi ;θi ) , (A1) P where (i,j) is a sum over the edges in the graph. In the case of a Boltzmann machine, any two variables are connected via pairwise factors, φ(xi , xj ; Wij ) = eWij xi xj , (A2) and all variables are also influenced by univariate factors written trivially as φ(xi ; θi ) = Pi (xi ; θi ). A message-passing can be constructed on this factor graph by writing messages from variables to factors and also from factors to variables. Since all factors are at most degree 2, we can write the messages for this system as variable to variable messages [59], Z φ(xi ; θi ) Y (t+1) (t) νi→j (xi ) = dxl φ(xi , xl ; Wil ) νl→i (xl ). Zi→j l∈∂i /j ACKNOWLEDGMENTS This research was funded by European Research Council under the European Union’s 7th Framework Programme (FP/2007-2013/ERC Grant Agreement 307087SPARCS). M.G. acknowledges funding from "Chaire de recherche sur les modèles et sciences des données", Fondation CFM pour la Recherche-ENS. Appendix A: Belief Propagation for Pairwise Models In order to estimate the derivatives of F, we must first construct a BP algorithm on the factor graph representation given in Fig. 1. We note that this graph, in terms of the variables x, does not make an explicit distinction between the latent and visible variables. We instead treat this graph in full generality so as to clarify the derivation and notation. This graph corresponds to the following ∗ FB [ν ] = ¯ X i ∗ Fi [ν ] − X ¯ ∗ F(i,j) [ν ] = ¯ (i,j)∈E X i ∗ ln Z→i − X (A3) Here, the notation i → j represents a message from variable index i to variable index j, and ∂i /j refers to all neighbors of variable index i except variable index j. We denote neighboring variables as those which share a pairwise factor. Finally, the super-scripts on the messages refer to the time-index of the BP iteration, which implies the successive application of (A3) until convergence on the set of messages ν = {νi→j (xi ) : (i, j) ∈ E}, where ¯ E is the set of all pairs of neighboring variables. We also note the inclusion of the message normalization term Zi→j which ensures that all messages are valid PDFs. Additionally, it is possible to write the marginal beliefs at each variable by collecting the messages from all their neighbors, Z φ(xi ; θi ) Y (t) (t) dxj φ(xi , xj ; Wij ) νj→i (xj ). ν→i (xi ) = Z→i j∈∂i (A4) Subsequently, the Bethe free energy can be written for a converged set of messages, ν ∗ , according to [59] as ¯ Z ln dxi dxj ∗ νi→j (xi ) φ(xi , xj ; Wij ) ∗ νj→i (xj )  , (A5) (i,j) ∗ where Z→i refers to the normalization of the set of the marginal belief at site i derived from ν ∗ . ¯ Unfortunately, the message-passing of (A3) cannot be written as a computable algorithm due to the continuous nature of the PDFs. Instead, we must find some manner by which to parameterize the messages. In the case of binary variables, as in [38], each message PDF can be exactly parameterized by its expectation. How- ever, for this general case formulation, we cannot make the same assumption. Instead, we turn to relaxed BP (r-BP) [49], described in the next section, which assumes a two-moment parameterization of the messages. 19 where Appendix B: r-BP for Pairwise Models We will now consider one possible parametric approximation of the message set via r-BP [49]. This approach has also gone by a number of different names in parallel re-discoveries of the approach, e.g. moment matching [48] and non-parametric BP [47]. In essence, we will be assuming that all messages ν can be well-approximated ¯ by their mean and variance, a Gaussian assumption. This approximation arises from a second-order expansion assuming small weights Wij . By making this assumption, we will ultimately be able to close an approximation of the messages on their two first moments, ai→j , hxi iνi→j and ci→j , x2i 1. 2 νi→j − hxi iνi→j . (t) Bi→j , (B1) Now, we approximate the series by dropping the terms less than O(Wil3 ). This approximation can be justified in the event that all weight values satisfy |Wil | < 1. Identifying the integrals from the expansion as moments, we see the following approximation 1 (t) ≈ 1 + xi Wil al→i + x2i Wil2 x2l ν (t) . (B2) l→i 2 However, we would like to write this approximation in terms of the central second moment. Through a second approximation that neglects O(Wil3 ) terms we arrive at our desired parameterization of the incoming message marginalization in terms of the message’s two first central moments,    1 (t) = exp log 1 + xi Wil al→i + x2i Wij2 x2l ν (t) , l→i 2 1 2 2 (t) (t) 1 2 2 (t) 3 ≈ exi Wil al→i + 2 xi Wil cl→i +O(Wil ) , ≈ exi Wil al→i + 2 xi Wil cl→i . (t) Ai→j , − (t+1) (t+1) (t) (B6) X Wil2 cl→i . l∈∂i /j From here, we can see that we have now a set of closed equations due to the dependence of A(t) and B(t) on the moments a(t) and c(t) , and vice versa. The values of these moments can be written as a function of A(t) and B(t) which is dependent upon the form of the local potentials φ(xi ; θi ), i.e. the prior distribution we assign to the variables themselves, (B7) (B8) where Z fa (B, A; θ) , dx x φ(x; θ) xB− 1 x2 A 2 e , Z (B9) 2 fc (B, A; θ) , − fa (B, A; θ) + Z φ(x; θ) xB− 1 x2 A 2 e dx x2 , Z (B10) R 1 2 and Z is simply the normalization dx φ(x; θ) exB− 2 x A . The inferred marginal distributions at each site can be calculated via the same functions, but instead using all   (t) (t) (t) of the incoming messages, i.e. ai = fa B→i , A→i ; θi   (t) (t) (t) and ci = fc B→i , A→i ; θi . In Appendix 1 we give the closed-forms of these moment calculations for a few different choices of φ(x; θ). If one wants to obtain an estimate of the free energy for a given set of parameters θ, it is possible to iterate between (B6), (B5) and (B7), (B8) until, ideally, convergence. It is important to note, however, due to both the potentially loopy nature of the network as well as smallweight expansion, that the BP iteration is not guaranteed to converge [39, 59]. Additionally, while we retain the time-indices in our derivation, it is not clear whether one should attempt to iterate these message in fully sequential or parallel fashion, or if some clustering and partitioning of the variables should be applied to determine the update order dynamically. (B3) We now substitute this approximation back into (A3) to get νi→j (xi ) ≈ νei→j (xi ) = (B5)   (t) (t−1) (t−1) ai→j = fa Bi→j , Ai→j ; θi ,   (t) (t−1) (t−1) ci→j = fc Bi→j , Ai→j ; θi , Considering the marginalization taking place in (A3), we will perform a second order expansion assuming that Wil → 0. We start by taking the Taylor series of the incoming message marginal for negligible weights, Z (t) dxl eWil xi xl · νl→i (xl ) = Z ∂  Wil xi xl  (t) 1 + Wil dxl e ν (x ) Wil =0 l→i l ∂Wil Z ∂  Wil xi xl  1 (t) + Wil2 dxl e ν (x ) Wil =0 l→i l 2 ∂Wil2 (t) (t) Wil al→i , l∈∂i /j Derivation via Small Weight Expansion + O(Wil3 ). X (t) (t) φ(xi ; θi ) xi Bi→j − 12 x2i Ai→j e , Zi→j (B4) 2. r-BP Approximate Bethe Free Energy Additionally, we can write the specific form of the Bethe free energy under the r-BP two-moment parameterization of the messages. In this case, we can simply apply the small weight expansion of (B3) to the Bethe free energy 20 xi is smaller than that of its prior, the messages become unbounded and fail to be meaningful probability distributions, and our expansion fails. The implication is that the ¯ r-BP message passing should be utilized in contexts where i  there exists some, preferably strong, evidence at each site, X Z ∗ 2 ∗ 1 2 ∗ dxi νei→j (xi ) exi Wij aj→i + 2 xi Wij cj→i . or the weights in W should be sufficiently small. The − ln (i,j) stronger this local potential, or the smaller the weights, (B11) the more favorable the model is to the r-BP inference. This observation mirrors those made in [39], however, Subsequently, using the final message definition given in here the authors make the observation that in this setting, (B4), we can see that BP based on small-weight expansion for binary variables n o fails to converge. In our case, without taking some form X X ∗ ∗ ∗ eB [e F ν∗] = ln Ze→i − ln Ze→i − ln Zei→j , (B12) of regularization, the inference fails entirely. Thus, large ¯ i (i,j) magnitude couplings Wil must be backed with a high degree of evidence at site i and l. This property could which, correcting for double counting, can also be written be utilized for the inverse learning problem, where one as must learn the couplings W given a dataset, in order to constrain the learning to parameters which are amenable X X 1 1 ∗ ∗ eB [e F ν∗] = (1 − di ) ln Ze→i ln Zei→j + , (B13) to the r-BP inference. ¯ 2 2 i,j i One direct manner to create probability distributions from otherwise unbounded continuous functions is via where di is the degree at site i, |∂i |. truncation. Specifically, we enforce a non-infinite normalization factor by restricting the support of the distribution to some subset of R. In this case, just slightly violating the 3. Enforcing Bounded Messages bounded condition above will induce a uniform message distribution over the distribution support, while a strong While we write the r-BP messages (B4) as though they violation will cause the distribution to concentrate on (t) are Gaussian distributions, this is a slight, since Ai→j ≤ 0 the boundaries of the support. Another approach might (t) as Wil2 cl→i ≥ 0 ∀i, l. The implication of the expansion simply be to fix a hard boundary constraint on Ai→j , is that, in general, the messages are in fact unbounded. thus never permitting unbounded messages to occur. This unboundedness is a direct result of the form of the conventional RBM pairwise factor, exi Wij xj . There are a few avenues available to us to address these unbounded messages and produce a meaningful messagepassing for generalized RBMs. Let us consider the cases Appendix C: Calculations for Specific Variable for which the messages are unbounded given a specific Distributions variable distribution. Assume that site xi is assigned a xi Ui − 12 x2i Vi Gaussian prior, φ(xi ; θi = {Vi , Ui }) ∝ e . In 1. Truncated Gaussian Units this case the r-BP message reads for pairwise models given in (A5), X ∗ eB [e ln Ze→i F ν∗] = (t+1) νei→j (xi ) = (t) (t) 1 xi (Ui +Bi→j )− 21 x2i (Vi +Ai→j ) e . e Zi→j (B14) In this case, the message is unbounded in the event that weighted sum of all incoming neighbor variances at i exceeds the inverse variance of Gaussian prior on xi , (t) Vi + Ai→j < 0, X (t) Vi < Wil2 cl→i , (B15) (B16) l∈∂i /j −1  σi2 >  X (t) Wil2 cl→i  , (B17) l∈∂i /j where σi2 is the variance of the Gaussian prior. Said another way, this condition is telling us that when the message-passing starts to tell us that if the variance at In general, the truncated Gaussian is defined in the following manner, (x−µ)2 1  α−µ  ·e− 2σ2 , ·  ω−µ  2πσ 2 Φ σ − Φ σ (C1) where µ and σ 2 are the mean and variance of the original Gaussian prior to truncation and the range [α, ω] defines the lower and upper bounds of the truncation, −∞ ≤ α < ω ≤ ∞, and Φ [·] is the CDF for the Normal distribution. To make things easier for us later, we will define the prior in a little bit of a different manner by making the following definitions, T G(x; µ, σ 2 , [α, ω]) = √ V , 1 1 , σ2 U, µ , σ2 (C2) 21 and writing the distribution for the parameters θ = {U, V, [α, ω]} as 2 T G + (x; θ) = q U2 e 2V Erf hq V 2 (ω − V − 12 V x2 +U x 2π e i U V ) − Erf hq V 2 (α − i, U V ) (C3) where Erf[·] is the error function and the last step folh i 1 1 x lows from the identity Φ[x] = 2 + 2 Erf √2 . Here, the subscript + is used to indicate V > 0. In the case that V < 0, we will write T G in terms of the imaginary error function, Erfi[x] , −iErf[ix], and noting that for V < 0, V = −1 · |V |, 2 T G − (x; θ) = q U2 e 2V q |V | Erfi 2 (ω − |V | − 1 V x2 +U x 2 2π e  U V ) q |V | − Erfi 2 (α − U V ) . (C4) We use this negative variance version of the truncated Gaussian to handle the special case of A + V < 0 first detailed in Sec. 3. We now detail the computation of the partition and first two moments of the Gaussian-product distribution of T G, 2 1 Q(x; θ, A, B) = Z1 T G(x; θ)e− 2 Ax +Bx . The calculation of the moments as a function of A and B will provide the definitions of fa and fc , while the calculation of the normalization Z will provide terms necessary for both the computation of the TAP free energy as well as the gradients necessary for learning θ during RBM training. First, we will calculate the normalization of Q(x; θ, A, B) in terms of all free parameters. To do this, consider the truncated normalization of the following product of Gaussians, Z ω 2 1 1 ZQ = (C5) dx e− 2 (A+V )x +(B+U )x , ZT G α where ZT G is defined such that T G(x; θ) = 1 − 12 V x2 +U x . We will need to make note of the ZT G e special case of A + V < 0, thus, ( r (B+U )2 1 π d+ , A + V > 0 ZQ = e 2(A+V ) × , ZT G 2|A + V | d− , A + V < 0 (C6) where d+ q , Erf[hω ] − Erf[hα ], d− , Erfi[hω ] − Erfi[hα ],   | B+U and hx , |A+V x − 2 A+V . Since Q(x; θ, A, B) is simply a truncated Gaussian with updated parameters, the first moment is given according to the well known truncated Gaussian expectation. While this expectation is usually written in terms of a mean and variance of the un-truncated Gaussian distribution, and for the case of positive mean, we will instead write the expectation in terms of the exponential polynomial coefficients and note the special case A + V < 0, s B+U 2 fa (B, A; θ) = + A+V π|A + V |  2 2  e−hα −e−hω , A + V > 0 d+ . × 2 2  ehα −ehω , A+V <0 (C7) d− Next, we will write the variance of Q(x; θ, A, B) as a function of A and B. As earlier, since Q has the specific form of a truncated Gaussian distribution we can utilize the well-known variance formula for such a distribution. As in the case of fa , we modify this function for the special case of A + V < 0. Specifically,  2 1 B+U fc (B, A; θ) = − fa (B, A; θ) − A+V A+V  2 −h2 −h  hα e α −hω e ω , A + V > 0 2 d+ +√ . × 2 2 π(A + V )  hα ehα −hω ehω , A+V <0 d− (C8) a. Gradients of the Log-likelihood To determine the gradients of the log-likelihood w.r.t. the model parameters, it is necessary to calculate the gradients of both ln T G + (x; θ) and ln ZQ in terms of the distribution parameters U and V . We assume that the boundary terms α and ω remain fixed. Since both of these distributions are truncated Gaussians, we can treat them both in terms of the derivatives of the log normalization of a general-case truncated Gaussian, U2 1 + ln |V | − ln d+/− . (C9) 2V 2 For Boltzmann measures of the given quadratic form, ∂ ∂ we know that ∂U ln ZT G = hxiT G and ∂V ln ZT G = 1 2 − 2 x T G . From these relations, we can write the necessary derivatives. For the case of ln T G + (x; θ) we have ln ZT G = − ∂ ∂ ln T G + (x; θ) = x − ln ZT G = x − hxiT G , (C10) ∂U ∂U and ∂ 1 ∂ ln T G + (x; θ) = − x2 − ln ZT G , ∂V 2 ∂V   1 2 =− x − x2 T G , (C11) 2 which we can see as just the difference between the data and the moments of the truncated Gaussian distribution. Next, the derivatives of ZQ , for fixed A and B, can be written in terms of fa and fc , the moments of Q, ∂ ln ZQ = fa (B, A; θ) − hxiT G , (C12) ∂U   ∂ 1 ln ZQ = − fc (B, A; θ) + fa (B, A; θ)2 − x2 T G . ∂V 2 (C13) 22 Finally, we are ready to write the gradients of the loglikelihood to be used for both hidden and visible updates with the truncated Gaussian distribution. For a given set of mini-batch data indexed by m ∈ {1, . . . , M }, and a number of TAP solutions indexed by p ∈ {1, . . . , P }, the gradients of a visible variable are given by  1 X  (m) ∆Ui = xi − hxi iT G M m  1 X  (p) − ai − hxi iT G , P p = hxi iM − hai iP , form Erf[η(ω − µ)] − Erf[η(α − µ)], which can be rewritten as Erf[z]−Erf[z − ] for z , η(ω −µ) and  , η(α−ω) is a multiple of the difference between the two boundaries of the truncated Gaussian distribution. Since we wish to consider the case that µ → ∞, we will take the Taylor expansion centered at z = ∞, since the value of µ dominates. From here, we find that the following approximation works well in practice, 2 (C14) + and ∆Vi = − 1 2 xi 2 M − ci + a2i  P , (C15) where h·iM and h·iP are averages over the mini-batch and TAP solutions, respectively. For updates of hidden side variables using the truncated Gaussian distribution we have the following gradients for updating their parameters, ∆Uj = he aj iM − haj iP (C16) and 1h ∆Vj = − e cj + e a2j 2 M − cj + a2j P i , (C17) P (m) where the moments aej (m) , fa ( i Wij xi , 0; θj ) and P (m) cej (m) , fc ( i Wij xi , 0; θj ) are defined for convenience. Using these gradients, we can now update the local biasing distributions for truncated Gaussian variables. b. 2 ehα − ehω n ≈ d+ (α − S (n) (h2ω ) B+U h2α −h2ω ) A+V )(1 − e S (n) (h2α ) , h2ω −h2α ) (ω − B+U A+V )(1 − e (C19) where S (n) (·) is the n-term power series representation of the error function. In our experiments, we use n = 11. A similar approximation can be used for the variances in the same situation. While this approximation could potentially be computationally costly for large n, we note that it is only used for updates on variables for which a small value of d+/− has been detected. 2. Truncated Gauss-Bernoulli Units For truncated Gauss-Bernoulli distributed units, we form the distribution as a mixture between a delta function and T G, with an extra term (1 − ρ) which controls the density at x = 0, thus, for θ = {ρ, U, V, [α, ω]} we have T GB(x; θ) , (1 − ρ)δ(x) + ρT G(x; θ) (C20)   2 1 1 = (1 − ρ)δ(x) + ρe− 2 V x +U x ZT GB (C21) Numerical Considerations Using the truncated Gaussian prior comes with a few numerical issues which must be carefully considered. While we have already addressed the cases when A + V < 0, we have not addressed the case where B+U  |ω|, |α|. A+V (C18) One can see how this complicates matters by observing 1 the term d+/− which occurs in both the first and second moment computations. When the magnitude of the limits ω and α become vanishingly small in comparison to the scaled joint mean term, then we see that d+/− → 0. However, the numerators of both fa and fc also go to zero, which implies that we may be able to find some method of approximation to find estimates of these moments without, up to numerical precision, dividing by zero. In order to handle this eventuality in our implementa1 tion, we make a Taylor series expansion of the d+/− term in the following way. First, we note that d+/− has the where ZT GB , (1 − ρ) + ρZT G and δ(x) is the Dirac delta function such that δ(0) = 1 and 0 everywhere else. By using a construction such that the truncation is done on the Gaussian mode alone, and not across the entire distribution, we can easily write the necessary functions of this distribution in terms of the values we have already calculated in Appendix 1 as long as 0 ∈ [α, ω]. Additionally, it will be useful for our calculations to define the probability of x to be non-zero according to T GB, P [x 6= 0] = ρZT G . ZT GB (C22) We now continue as in the previous appendices and write the normalization and first two moments of the Gaussian product distribution Q(x; θ, A, B) = 1 − 12 Ax2 +Bx . First, the normalization can ZQ T GB(x; θ)e be written simply as a function of the truncated Gaussian normalization modified by A and B, as in (C6), ZQ = (1 − ρ) + ρZQ,T G . (C23) 23 Next, the first moment of Q can be found by recalling the ∂ ∂ ln ZQ = hxiQ and consequently, that ∂U ZQ = relation ∂U ZQ hxiQ . Thus, fa (B, A; θ) = faT G (B, A; θ) · P [x 6= 0] , (C24) where the non-zero probability is calculated according to ∂ ZQ = A and B. For the second moment, we note that ∂V 1 2 − 2 ZQ x T G to find fc (B, A; θ) = P [x 6= 0] · faT G (B, A; θ)2 2 + (C25) Next, we turn our attention to the log-likelihood gradients necessary for updating the parameters U , V , and ρ during training. First, we will look at the derivatives of ln T GB required for updates on visible units. In order to calculate these derivatives, we will split the log probability into two cases, ( − ln ZT GB , x=0 ln T GB(x; θ) = ln ρ − 12 V x2 + U x − ln ZT GB , x 6= 0 (C26) Consequently, the derivatives of the log probability can are written as the following, ∂ [ln T GB(x; θ)] = x − hxiT GB , ∂U (C27) T GB . 1 (1 − δ(x) − P [x 6= 0]) , ρ (C29) which can be rewritten in the more concise form ∂ δ(x) − ρ [ln T GB(x; θ)] = ∂ρ ρ(1 − ρ)   1 hδ(xi )iM − hPQ [xi 6= 0]iP ρi (1 − ρi ) (C32) for visible units, and hD E i 1 PeQ [xj 6= 0] − hPQ [xj 6= 0]iP ρj (1 − ρj ) M (C33) for hidden units, where PeQ is calculated in the naive-meane(m) = 0 field manner described in Appendix 1, where A j P (m) e (m) = and B Wij x . ∆ρj = j i i 3. Binary Units We define the distribution for binary units to be the Bernoulli distribution such that x ∈ {0, 1} B(x; m) = (1 − m)1−x mx , (C28) The derivative w.r.t. ρ is a bit more complicated, as we cannot use the same identities. Additionally, we must also consider the two cases of x = 0 and x 6= 0 separately. Thus, ( x=0 ρZT G − ρ1 P [x 6= 0] , ∂ , [ln T GB(x; θ)] = 1 ∂ρ ρZT G − ρ (P [x 6= 0] − 1) , x 6= 0 = ρZT G − ∆ρi = (C34) where m , Prob[x = 1] = hxiB . We can also write B as the Boltzmann distribution and  (C31) which gives us the final gradients  0] fcT G (B, A; θ). ∂ 1 2 [ln T GB(x; θ)] = − x − x2 ∂V 2 ∂ PQ [x 6= 0] − ρ [ln ZQ ] = , ∂ρ ρ(1 − ρ) fcT G (B, A; θ) − fa (B, A; θ) ,   2 = P [x 6= 0] − P [x 6= 0] faT G (B, A; θ) + P [x 6= ∆Vi , ∆Uj , and ∆Vj all remain consistent, just under the modification of all moments being taken w.r.t. the T GB. We need only to write the gradients ∆ρi , ∆ρj . Starting from the log partition and applying the same identity used to write Eq. (C30) (C30) by noting the complement of the support probability P [x = 0] = 1 − P [x = 6 0] = Z1−ρ = 1 − ρ and making the T GB appropriate substitution. We now write the derivatives of the ln ZQ in terms of U , V , and ρ. These take the same form as those written in Appendix 1. Subsequently, the equations for ∆Ui , B(x; U ) = 1 Ux e ZB (C35) m where U , ln 1−m and ZB , 1 + eU . Next, we calculate the normalization and moments of the distribution 2 1 Q(x; A, B, U ) = ZQ1ZB e− 2 Ax +(B+U )x . For the normalization we have, ZQ = 1 ZB X 1 e− 2 Ax 2 +(B+U )x x={0,1} i 1 1 h = 1 + e− 2 A+B+U . ZB (C36) Subsequently, for the moments of Q we have   ∂ 1 fa (B, A; U ) = [ln ZB ] = sigm U + B − A , ∂U 2 (C37) where sigm is the logistic sigmoid function. Subsequently, the variance for the binary unit can be calculated directly as fc (B, A; U ) = fa (B, A; U ) − fa (B, A; U )2 . (C38) 24 Next, if we wish to define the learning gradients on U , we write the derivatives of ln B(x; U ) and ln ZQ w.r.t. U , ∂ ∂ ln B(x; U ) = [U x − ln ZB ] = x − hxiB , ∂U ∂U (C39) and, for the log normalization, ∂ ln ZB = fa (B, A; U ) − hxiB . ∂U (C40) The resulting gradients for the distribution terms U are ∆Ui = hxi iM − hai iP (C41) for visible units, and ∆Uj = he aj iM − hai iP (C42) P (m) for hidden units, where e aj , fa ( i Wij xi , 0; U ). Appendix D: Adaptative TAP When performing inference, one could employ instead of TAP a variant known as adaptive TAP (or adaTAP) [55], which gives in general more accurate results, albeit being slower to iterate. We briefly investigate here the performance of this method in the binary case. The adaTAP algorithm is more generally presented without distinction between visible and hidden variables. We thus write the algorithm for generic weight matrix J and bias vector H, in practice here defined by blocks ! 0 W J= ∈ R(Nv +Nh )×(Nv +Nh ) , WT 0 ! b H= ∈ R(Nv +Nh ) , c The proposed implementation Alg. 3 uses the recently introduced vector approximate message-passing (VAMP) [71] to find the adaTAP fixed points. After convergence, quantities with subscripts 1 and 2 are equal and identify with the outputs of the TAP inference algorithm Alg. 1, ! ! Av Bv A1 = A2 = , B1 = B2 = , Ah Bh ! ! av cv a1 = a2 = , c1 = c2 = , ah ch again compactly defined by blocks over the visible and hidden units. Here c2 is defined as the diagonal of the C2 matrix, which gives an estimate of the correlation between different units and must be computed at each step of the algorithm. These quantities are then incorporated to our training algorithm Alg. 2. The computational burden of Alg. 3 lies in the matrix inversion needed to evaluate C2 , which needs to be performed at each iteration. In Fig. 10 (right), we compare the time needed to perform one iteration of both the algorithms under identical experimental conditions. This larger cost per-iteration should be compensated in principle by a more accurate inference procedure. However, that does not seem to translate to improvements in the training performance. Fig. 10 (left) presents a minimal test on 5000 MNIST training samples, where performances are reported in terms of the pseudo-likelihood. We evaluate both algorithms for different numbers of iterations. Results suggest that all strategies are roughly equivalent, except for running adaTAP for a very small number of iterations, which always leads to a poorer result. We thus conclude that, as far as proposing a tractable and efficient training algorithm for RBMs, the TAP inference seems to serve the purpose more appropriately. Appendix E: Deep Boltzmann Machines 1. Model and Inference It is possible to define as well deep models of Boltzmann machines by considering several stacked hidden layers. These Deep Boltzmann Machines (DBM) [26] consist in a straightforward extension of RBMs. The distribution corresponding to a DBM with L hidden layers indexed by l is 25 P (x, h(1) , .., h(L) ; W (1) , .., W (L) , θ) = P (l) (l+1) (l) (1) P P 1   e i,j xi Wij hj + l i,j hi Wij hj (1) (L) Z W , .., W , θ Y Y Y h(l) (l) (l) × Piv (xi ; θiv ) Pj (hj ; θjh ). i l (E1) j Similarly to RBMs, the distribution of visible variables is obtained by marginalizing out the latent variables, P (x; W (1) , .., W (L) , θ) = Z   Y Y (l)  dhj  P (x, h(1) , .., h(L) ; W (1) , .., W (L) , θ), l (E2) j yielding the following log-likelihood h i X ln P (x; W (1) , .., W (L) , θ) = − ln Z W (1) , .., W (L) , θ + ln Pi (xi ; θiv ) i Z + ln   P Y Y (l) (l) (l) (l+1) Y Y (1) P P (l) h(l) (l)  Pj (hj ; θjh ). dhj  e i,j xi Wij hj + l i,j hi Wij hj l j l (E3) j The major difference between RBMs and DBMs lies in the complexity of evaluating the above expression. Whereas for RBMs only the log-partition features a problematic multidimensional integral Eq. (11), here both the logpartition and the last term are intractable. This additional complication carries through to the computation of the gradients necessary for training, since the datadependent term deriving from the last term of (E3) is no longer tractable. stance, the effective weight matrix of a DBM with 2 hidden layers is defined by blocks as This intractability follows from the fact that hidden units in neighboring layers are now connected to each other, and are thus no longer conditionally independent. Interestingly, the first proposal to deal with the datadependent terms of DBMs consisted in using a naive mean-field approximation [26], while keeping a Monte Carlo based strategy to compute gradients deriving from the log-partition. In this work, we propose instead to use the TAP approximation for both of them, hence improving on the NMF approximation and avoiding any sampling of the rather complicated RBMs. Thus, implementing the GRBM inference algorithm Alg. 1 with the proper weights outputs TAP solutions {a, c, B, A}, each of them a vector with components corresponding to the different units in the DBM. related to the log-partition The TAP equations  Z W (1) , .., W (L) , θ follow directly from the general derivation of Sec. V for fully connected models, with however a different weight matrix being used. For in-  0 T  W =  W (1) 0  W (1) 0  0 W (2)  . T W (2) 0 (E4) For the last term of (E3), we recognize the log-partition of a model closely related to the considered DBM, where visible units are not anymore variable but fixed, or clamped, at values xi , and the original interaction between visible and first hidden layer units is replaced by an P (1) (1) additional local field on each hj equal to i Wij xi . Finally, under this simple modification of the Hamiltonian, TAP equations follow again from the general derivation in Sec. V. The resultant TAP solutions depending on data points x are said to be clamped and denoted as {ā(x), c̄(x), B̄(x), Ā(x)}. 26 2. Training Algorithm and Experiments The gradients of the log-likelihood with respect to the model parameters θ are similar to the RBM ones, given by (12), (13) and (14). However, the first data-dependent term cannot be analytically computed anymore, and we use the clamped TAP solutions to approximate it. The second term is evaluated using the data-independent TAP solutions, similarly to our strategy for RBMs. The corresponding expressions of the gradients are i 1 X ∂ h v (m) v ∆θiv ≈ ln P (x ; θ ) i i i M m ∂θiv  1 X ∂  v ln Ziv (Bi,k , Avi,k ; θiv ) , − K ∂θiv k 1 X ∂ h h (l) ∆θj ≈ M m ∂θh (l) j 1 X (m) h(1) (m) x āj (x ) M m i o (1) 1 X n v h(1) (1) ai,k aj,k + Wij cvi,k chj,k , − K k 1 X n h(l−1) (m) h(l) (m) ≈ āj (x )āj (x ) M m Input: J, H Initialize: t = 0, A1 (0) , B1 (0) repeat Prior Updates (t+1) (t) (t) a1,i = sigm(B1,i − A1,i /2) (t+1) c1,i (E5) (t+1) = a1,i (t+1) (1 − a1,i (t+1) = 1/c1,i (t+1) = 1/(1 − a1,i A2,i B2,i (t+1) ) (t+1) − A1,i (t+1) (t+1) ) − B1,i Interaction Updates (t+1) (t+1) −1 C2 = (diag(A  2 ) −  J)  X (t+1) (t+1) (t+1) a2,i = C2 B2,j + Hj ij j (t+1) A1,i = 1/ (t+1) i (l) ln Zjh (B̄jh (x(m) ), Āhj (x(m) ); θjh ) i 1 X ∂ h h h h h (l) − ln Z (B , A ; θ ) , (E6) j j,k j,k j h (l) K k ∂θj (1) Algorithm 3 AdaTAP inference for binary-binary RBMs  (t+1) C2 (t+1) B1,i = a2,i / t=t+1 until Convergence   (t+1) − A2,i ii  (t+1) C2 (t+1) ii − B2,i ∆Wij ≈ (l) ∆Wij (E7) o (l) (l) (l−1) +Wij c̄hj (x(m) )c̄hj (x(m) ) o (1) 1 X n v h(1) (l) ai,k aj,k + Wij cvi,k chj,k for l ≥ 2 . − K k (E8) These expressions can be plugged to a gradient ascent algorithm, as in the RBM training algorithm Alg. 2. Nevertheless, this simple strategy of simultaneous training of all the parameters of the model (joint training) usually fails as the magnitude of weights of deep layers typically remains very small and the model eventually resembles a mere RBM. Several regularizations have been proposed to tackle this well-known problem of DBM training [16, 26, 72–74]. In our experiments, we used a greedy layerwise pre-training [26], which consists in computing a meaningful initialization of the weights by training the RBMs layer-by-layer, before performing the joint training. The complete algorithm is described in Alg. 4. Fig. 11 shows the evolution of the TAP log-likelihood for a 2-hidden layer and a 3-hidden layer DBMs, trained with the above described algorithm. Algorithm 4 GDBM Training Input: X, Tpretrain ,Tjoint train , M , K, R(·) Pretraining (1) W (1) , θ v , θ h ← Alg. 2(X, Tpretrain , M , K, R(·)) for All hiddenlayers l ≥ 2 do  H(l−1) ∼ P h(l) |H(l−1) , ..., H1 , X (l) W (l) , θ h ← Alg. 2(H(l−1) , Tpretrain , M , K, R(·)) end for Joint training Initialize: t = 0 repeat for All mini-batches XB of size M do a(t+1) , c(t+1) , B(t+1) , A(t+1) ← Alg. 1(W (t) , θ (t) ) × K ā(t+1) , c̄(t+1) , B̄(t+1) , Ā(t+1) ← Alg. 1(XB , W (t) , θ (t) ) (l),(t+1) (l),(t) (l),(t) ← Wij + γ∆Wij (l),(t+1) (l),(t) (l),(t) θjh ← θjh + γ∆θjh v ,(t+1) v ,(t) θi ← θi + γ∆θiv ,(t) Wij end for t←t+1 until t > Tjoint train 27 101 Pseudo Log − Likelihood −0.18 −0.20 adaTAP TAP −0.22 adaTAP − 3 adaTAP − 10 adaTAP − 100 TAP − 3 TAP − 10 TAP − 100 −0.24 −0.26 5 10 15 Training Epochs Time (s) 100 10−1 10−2 10−3 101 20 102 Batchsize FIG. 10. Left: Evolution of the pseudo-likelihood along the training of an RBM with 784 binary visible units and 500 binary hidden units. Training was performed using the 5000 first images of binarized MNIST, with a learning rate of 0.001 and batches of size 100. The different curves correspond to different strategies of estimation of the likelihood gradients, either with TAP or adaTAP. Both algorithms were iterated for a fixed number of times (3, 10 and 100). In all cases, a damping of 0.5 was used. All methods yield comparable results in terms of training performance, except for adaTAP with only 3 iterations, which shows poorer performance. Right: Computation time for one iteration of the inference algorithm, as a function of batch size. Time is reported in seconds for identical experimental settings. The need for a matrix inversion for each batch element makes VAMP 3 orders of magnitude slower than TAP. 2 Hidden Layers : 784 × 500 × 500 −0.0225 test train Normalized TAP Log − Likelihood Normalized TAP Log − Likelihood test train −0.0250 3 Hidden Layers : 784 × 500 × 500 × 500 −0.018 −0.020 −0.0275 −0.022 −0.0300 −0.024 −0.0325 −0.026 −0.0350 −0.028 −0.0375 −0.030 −0.0400 −0.032 0 500 1000 1500 2000 Training Epochs 2500 3000 0 500 1000 1500 2000 Training Epochs 2500 3000 FIG. 11. Training performances over 3000 training epochs for a 2-hidden layer (left) and 3-hidden layer (right) deep Boltzmann machines (DBMs) on the binarized MNIST datasets. Both models were pretrained for 50 epochs with the same learning rate of 0.001. The training performance is measured as the normalized (per unit) TAP log-likelihood for the test images (blue) and the train images (orange). [1] Y. LeCun, Y. Bengio, and G. Hinton, Deep learning, Nature 521, 436 (2015). [2] J. J. Hopfield, Neural networks and physical systems with emergent collective computational abilities, Proc. Nat. Acad. Sci. U.S.A. 79, 2254 (1982). 28 [3] D. J. Amit, H. Gutfreund, and H. Sompolinsky, Numbers of patterns in a spin-glass model of neural networks, Phys. Rev. Lett. 55, 1530 (1985). [4] D. H. Ackley, G. E. Hinton, and T. J. Sejnowski, A learning algorithm for Boltzmann machines, Cognitive Science 9, 147 (1985). [5] M. Mézard, G. Parisi, and M. A. Virasoro, Spin glass theory and beyond, World Scientific Lecture notes in Physics, Vol. 9 (World Scientific, 1987). [6] V. Sessak and R. Monasson, Small-correlation expansions for the inverse Ising problem, J. Phys. A 42, 055001 (2009). [7] F. Ricci-Tersenghi, The Bethe approximation for solving the inverse Ising problem: a comparison with other inference methods, J. Stat. Mech. 2012, P08015 (2012). [8] M. Ekeberg, C. Lövkvist, Y. Lan, M. Weigt, and E. Aurell, Improved contact prediction in proteins: using pseudolikelihoods to infer Potts models, Phys. Rev. E 87, 012707 (2013). [9] G. Hinton, Training products of experts by minimizing contrastive divergence, Neural Comp. 14, 1771 (2002). [10] G. Hinton and R. Salakhutdinov, Reducing the dimensionality of data with neural networks, Science 313, 504 (2006). [11] H. Larochelle and Y. Bengio, Classification using discriminative restricted Boltzmann machines, in Proc. Int. Conf. on Machine Learning (2008) pp. 536–543. [12] R. Salakhutdinov, A. Mnih, and G. Hinton, Restricted Boltzmann machines for collaborative filtering, in Proc. Int. Conf. on Machine Learning (2007) pp. 791–798. [13] A. Coates, A. Y. Ng, and H. Lee, An analysis of singlelayer networks in unsupervised feature learning, in Proc. Int. Conf. on Art. Intel. and Stat. (2011) pp. 215–223. [14] G. Hinton and R. Salakhutdinov, Replicated softmax: an undirected topic model, in Adv. in Neural Info. Processing Sys. (2009) pp. 1607–1614. [15] G. Hinton, S. Osindero, and Y.-W. Teh, A fast learning algorithm for deep belief nets, Neural Comp. 18, 1527 (2006). [16] R. Salakhutdinov and H. Larochelle, Efficient learning of deep Boltzmann machines, in Proc. Int. Conf. on Art. Intel. and Stat. (2010) pp. 693–700. [17] I. Goodfellow, Y. Bengio, and A. Courville, Deep Learning (MIT Press, 2016) http://www.deeplearningbook.org. [18] T. Tieleman, Training restricted Boltzmann machines using approximations to the likelihood gradient, in Proc. Int. Conf. on Machine Learning (2008) pp. 1064–1071. [19] R. M. Neal, Annealed importance sampling, Stat. Comp. 11, 125 (2001). [20] R. Salakhutdinov and I. Murray, On the quantitative analysis of deep belief networks, in Proc. Int. Conf. on Machine Learning (2008) pp. 872–879. [21] Y. Burda, R. B. Grosse, and R. Salakhutdinov, Accurate and conservative estimates of MRF log-likelihood using reverse annealing, in Proc. Int. Conf. on Art. Intel. and Stat., Vol. 38 (2015) pp. 102–110. [22] H. Schulz, A. Müller, and S. Behnke, Investigating convergence of restricted Boltzmann machine learning, in Deep Learning and Unsupervised Feature Learning, NIPS Workshop on (Whistler, CA, 2010). [23] D. J. Thouless, P. W. Anderson, and R. G. Palmer, Solution of ‘Solvable model of a spin glass’, Philos. Mag. 35, 593 (1977). [24] M. Opper and O. Winther, A mean field algorithm for bayes learning in large feedforward neural networks, in Adv. in Neural Info. Processing Sys., Vol. 9 (1997) pp. 225–231. [25] M. O. L Bachschmid-Roman, C Battistin and Y. Roudi, Variational perturbation and extended plefka approaches to dynamics on random networks: the case of the kinetic ising model, J. Phys. A 49, 434003 (2016). [26] R. Salakhutdinov and G. Hinton, Deep Boltzmann machines, in Proc. Int. Conf. on Art. Intel. and Stat. (2009) pp. 448–455. [27] P. Smolensky, Information processing in dynamical systems: Foundations of harmony theory, (MIT Press, 1986). [28] G. Desjardins, A. Courville, Y. Bengio, P. Vincent, and O. Delalleau, Parallel tempering for training of restricted Boltzmann machines, (2010) pp. 145–152. [29] R. Salakhutdinov, Learning in Markov random fields using tempered transitions, Adv. in Neural Info. Processing Sys. 23, 1 (2010). [30] Y. Bengio, P. Lamblin, D. Popovici, and H. Larochelle, Greedy layer-wise training of deep networks, Adv. in Neural Info. Processing Sys. 19, 153 (2007). [31] K. Cho, Improved learning algorithms for restricted Boltzmann machines, Learning , 10 (2011). [32] M. Welling, M. Rosen-Zvi, and G. E. Hinton, Exponential family harmoniums with an application to information retrieval, in Adv. in Neural Info. Processing Sys. (2004) pp. 1481–1488. [33] A. Fischer and C. Igel, Empirical analysis of the divergence of Gibbs sampling based learning algorithms for restricted Boltzmann machines, (2010) pp. 1–10. [34] T. Plefka, Convergence condition of the TAP equation for the infinite-ranged Ising spin glass model, J. Phys. A 15, 1971 (1982). [35] A. Georges and J. S. Yedidia, How to expand around mean-field theory using high-temperature expansions, J. Phys. A 24, 2173 (1999). [36] M. Welling and G. Hinton, A new learning algorithm for mean field Boltzmann machines, in Proc. Int. Conf. on Art. Neural Networks (2002) pp. 351–357. [37] H. J. Kappen and F. B. Rodríguez, Efficient learning in Boltzmann machines using linear response theory, Neural Comp. 10, 1137 (1998). [38] M. Gabrié, E. W. Tramel, and F. Krzakala, Training restricted Boltzmann machines via the Thouless-AndresonPalmer free energy, in Adv. in Neural Info. Processing Sys. (2015) pp. 640–648. [39] M. Welling and Y. W. Teh, Approximate inference in Boltzmann machines, Art. Int. 143, 19 (2003). [40] E. W. Tramel, A. Drémeau, and F. Krzakala, Approximate message passing with restricted Boltzmann machine priors, J. Stat. Mech. 2016, 073401 (2016). [41] F. Ricci-Tersenghi, The Bethe approximation for solving the inverse Ising problem: a comparison with other inference methods, J. Stat. Mech. 2012, P08015 (2012). [42] M. Mézard, Mean-field message-passing equations in the Hopfield model and its generalizations, (2016), arXiv preprint [cond-mat.dis-nn]:1608.01558. [43] A. Courville, J. Bergstra, and Y. Bengio, A spike and slab restricted Boltzmann machine, in Proc. Int. Conf. on Art. Intel. and Stat., Vol. 15 (2011). [44] J. Pearl, Reverend Bayes on inference engines: A distributed hierarchical approach, in Proc. AAAI Conf. on Art. Int. (1982) pp. 133–136. 29 [45] J. S. Yedidia and W. T. F. amd Yair Weiss, Bethe free energy, Kikuchi approximations, and belief propagation algorithms, in Adv. in Neural Info. Processing Sys., Vol. 13 (2001). [46] H. Huang and T. Toyoizumi, Advanced mean-field theory of the restricted Boltzmann machine, Phys. Rev. E 91, 050101 (2015). [47] E. B. Sudderth, A. T. Ihler, M. Isard, W. T. Freeman, and A. S. Willsky, Nonparametric belief propagation, Commun. ACM 53, 95 (2010). [48] M. Opper and O. Winther, Expectation consistent approximate inference, J. Machine Learning Resaerch 6, 2177 (2005). [49] S. Rangan, Estimation with random linear mixing, belief propagation and compressed sensing, in Proc. Annual Conf. on Info. Sci. and Sys. (2010) pp. 1–6. [50] T. Lesieur, F. Krzakala, and L. Zdeborová, Phase transitions in sparse PCA, in Proc. IEEE Int. Symp. on Info. Theory (2015) pp. 1635–1639. [51] T. Lesieur, F. Krzakala, and L. Zdeborová, MMSE of probabilistic low-rank matrix estimation: Universality with respect to the output channel, in Proc. Allerton Conf. on Communication, Control, and Computing (2015) pp. 680– 687. [52] Y. Deshpande and A. Montanari, Informationtheoretically optimal sparse PCA, in Proc. IEEE Int. Symp. on Info. Theory (2014) pp. 2197–2201. [53] S. Rangan and A. K. Fletcher, Iterative estimation of constrained rank-one matrices in noise, in Proc. IEEE Int. Symp. on Info. Theory (2012) pp. 1246–1250. [54] T. Lesieur, F. Krzakala, and L. Zdeborová, Constrained low-rank matrix estimation: Phase transitions, approximate message passing and applications, (2017), arXiv preprint [math.ST]:1701.00858. [55] M. Opper and O. Winther, Tractable approximations for probabilistic models: The adaptive Thouless-AndersonPalmer mean field approach, Phys. Rev. Lett. 86, 3695 (2001). [56] J. S. Yedidia, An idiosyncratic journey beyond mean field theory, (MIT Press, 2000). [57] M. J. Wainwright and M. I. Jordan, Graphical Models, Exponential Families, and Variational Inference, Foundations and Trends in Machine Learning, Vol. 1 (Now Publishers Inc., 2008). [58] C. D. Dominicis and A. P. Young, Weighted averages and order parameters for the infinite range Ising spin glass, J. Phys. A 16, 2063 (1983). [59] M. Mézard and A. Montanari, Information, Physics, and Computation (Oxford University Press, 2009). [60] F. Krzakala, M. Mézard, F. Sausset, Y. Sun, and L. Zdeborová, Probabilistic reconstruction in compressed sensing: Algorithms, phase diagrams, and threshold achieving matrices, J. Stat. Mech. 2012, P08009 (2012). [61] Y. LeCun, L. Bottou, Y. Bengio, and P. Haffner, Gradient-based learning applied to document recognition, Proc. IEEE 86, 2278 (1998). [62] MIT Center For Biological and Computation Learning, CBCL face database #1, (2000). [63] K. Cho, T. Raiko, and A. Ilin, Enhanced gradient for training restricted boltzmann machines, Neural Comp. 25, 805 (2013). [64] J. B. Tenenbaum, V. de Silva, and J. C. Langford, A global geometric framework for nonlinear dimensionality reduction, Science 290, 2319 (2000). [65] L. Şendur and I. W. Selesnick, Bivariate shrinkage functions for wavelet-based denoising exploiting interscale dependency, IEEE Trans. Sig. Processing 50, 2744 (2002). [66] B. van Ginneken and A. Mendrik, Image denoising with k-nearest neighbor and support vector regression, in Proc. Int. Conf. on Pattern Recognition (2006). [67] J. Melchior, N. Wang, and L. Wiskott, Gaussian-binary restricted Boltzmann machines on modeling natural image statistics, PLOS ONE 12, e0171015 (2017). [68] K. Cho, A. Ilin, and T. Raiko, Improved learning of gaussian-bernoulli restricted Boltzmann machine, in Proc. Int. Conf. on Art. Neural Networks (2011) pp. 10–17. [69] J. Tubiana and R. Monasson, Emergence of compositional representations in restricted Boltzmann machines, (2016), arXiv preprint [physics.data-an]:1611.06759. [70] A. Barra, G. Genovese, P. Sollich, and D. Tantari, Phase transitions in restricted Boltzmann machines with generic priors, (2016), arXiv preprint [cond-mat.disnn]:1612.03132. [71] S. Rangan, P. Schniter, and A. K. Fletcher, Vector approximate message passing, in Information Theory (ISIT), 2017 IEEE International Symposium on (2017) pp. 1588– 1592. [72] G. Montavon and K. R. Müller, in Neural Networks: Tricks of the Trade (Springer, 2012) pp. 621–637. [73] G. Desjardins, A. Courville, and Y. Bengio, On Training Deep Boltzmann Machines, (2012), arXiv preprint [cs.NN]:1203.4416. [74] J. Melchior, A. Fischer, and L. Wiskott, How to center deep boltzmann machines, J. Machine Learning Resaerch 17, 1 (2016).
9cs.NE
Algorithms for the Greater Good! On Mental Modeling and Acceptable Symbiosis in Human-AI Collaboration Tathagata Chakraborti and Subbarao Kambhampati arXiv:1801.09854v1 [cs.AI] 30 Jan 2018 Department of Computer Science Arizona State University Tempe AZ 85281 USA {tchakra2,rao}@asu.edu Abstract Effective collaboration between humans and AI-based systems requires effective modeling of the human in the loop, both in terms of the mental state as well as the physical capabilities of the latter. However, these models can also open up pathways for manipulating and exploiting the human in the hopes of achieving some greater good, especially when the intent or values of the AI and the human are not aligned or when they have an asymmetrical relationship with respect to knowledge or computation power. In fact, such behavior does not necessarily require any malicious intent but can rather be borne out of cooperative scenarios. It is also beyond simple misinterpretation of intents, as in the case of value alignment problems, and thus can be effectively engineered if desired. Such techniques already exist and pose several unresolved ethical and moral questions with regards to the design of autonomy. In this paper, we illustrate some of these issues in a teaming scenario and investigate how they are perceived by participants in a thought experiment. The Promise of Human-AI Collaborations As AI-based systems become integral parts of our daily life or our workplace, as essential components of hitherto human-only enterprises, the effects of interaction between humans and automation cannot be ignored – both in terms of how these partnerships affect the outcome of an activity and how they evolve as a result of it, but also in terms of how the possibility of such interactions change the design of autonomy itself. In light of this, the traditional view of AI as the substrate for complete autonomy of automation – the de facto AI-dream ever since the conception of the field – has somewhat evolved of late to accommodate effective symbiosis of humans and machines, rather than replacement of the former with the latter, as one of the principal end goals of the design of autonomy. This view has, in fact, reflected heavily in the public stance (Network World 2017) of many of the industry leaders in AI technologies in diverse fields such as manufacturing, medical diagnosis, legal counseling, disaster response, military operations and others. The establishment of Collaborations between People and AI Systems (Partnership of AI (PAI) 2017) as one of the thematic pillars for the Partnership of AI is a primary example of this. One of the grand goals of the design of AI is then to integrate the best of both worlds when it comes to the differing (and often complementary) expertise of humans and machines, in order to conceive a whole that is bigger than the sum of the capabilities of either – this is referred to as Augmented AI (Bird 2017) in the public discourse on human-AI integration. Much of the discussion around the topic of augmentation versus replacement has, unfortunately, centered around mitigating concerns of massive loss of employment on account of the latter. This, while being a topic worthy of debate, does not represent the true scope of human-AI collaborations. Rather then being just a foil for concerns of replacement of humans with AI-based systems, a key objective of Augmented-AI is to overcome human limitations. This can involve AI helping humans in tasks that they are traditionally not good at, or are incapable of performing, or even augmentation of our physiological form to realize super-human capabilities. As Tom Gruber, co-founder of Siri, put it succinctly in his TED talk (Tom Gruber 2017) earlier this year, every time a machine gets smarter, we get smarter” – examples of this include smart assistants for personal, or business use in law, health care, science and education, assistive robots at home to help the sick and the elderly, and autonomous machines to complement our daily lives. Note that many of these applications are inherently symbiotic and thus outside the scope of eventual replacement. From the perspective of research as well, the attitude towards including the human in the loop in the design of autonomy has seen a significant shift. Originally this was often looked down upon as a means of punting the hard challenges of designing autonomous systems by introducing human expertise into an agents decision making process. However, the academic community has gradually come to terms with the different roles a human can play in the operation of an AIsystem and the vast challenges in research that come out of such interactions such as – (1) to complement the limited capabilities of the AI system, as seen in Cobots (Veloso et al. 2015) which ask humans in their vicinity for access to different floors in the elevator or in the mixed-initiative (Horvitz 2007) automated planners of old; and (2) to complement or expand the capabilities of the human, such as in human-robot teams (Christensen 2016). Mental Modeling for Human-Aware AI These forms of collaboration introduce typical research challenges otherwise absent in the isolated design of autonomy. Perhaps the most difficult aspect of interacting with hu- mans is to the need to model the beliefs, desires, intentions preferences, and expectations of the human and situate the interaction in the context of that model. Some believe this to be one of the hallmarks (Rachael Rettner 2009) of human intelligence, and research suggests humans tend to do this naturally for other humans during teamwork (by maintaining mental models (Converse, Cannon-Bowers, and Salas 1993; Mathieu et al. 2000), for team situational awareness (Gorman, Cooke, and Winner 2006) and interaction (Cooke et al. 2013)) by virtue of thousands of years of evolution. As such, this remains a necessary requirement for enabling naturalistic interactions (Klein 2008) between humans and machines. The problem is made harder since such models often involve second order mental models (Allan 2013; Yoshida, Dolan, and Friston 2008). Understanding the human in the loop is crucial to the functionalities of a collaborative AI agent - e.g. in joint decision making it needs to understand human capabilities, while in communicating explanations or intentions it needs to model the humans knowledge state. In fact, it has been argued (Chakraborti et al. 2017a) that the task of human-AI collaborations is mainly a cognitive rather than a physical exercise which makes the design of AI for human-AI collaborations much more challenging. This is heavily reflected in the curious ambivalence of AI towards humans in many successfully deployed systems such as in fully autonomous systems for space or underwater exploration which mostly operate comfortably outside the scope of human interactions. Classical AI models such as STRIPS (Fikes and Nilsson 1971) and BDI (Rao, Georgeff, and others 1995) models were, in fact, largely built out of theories in folk psychology (Malle 2004). Recent approaches such as the Bayesian Theory of Mind (Baker, Saxe, and Tenenbaum 2011; Lake et al. ), takes a probabilistic approach to the problem. Research on this topic center around three main themes – (1) representations that can capture the humans mental state, (2) learning methods that can learn these representations efficiently, and (3) usability of those representations. All of them need to come together for an effective solution. The Pandora’s Box of “Greater Good”s The obvious outcome of an artificial agent modeling the mental state of the human in the loop is that it leaves the latter open to being manipulated. Even behavior and preference models at the most rudimentary levels can lead to effective hacking of the mind, as seen in the proliferation of fake news online. Moreover, we argue that for such incidents to occur, the agent does not actually have to have malicious intent, or even misinterpretation of values as often studied in the value alignment problem (Leverhulme Centre 2017). In fact, the behaviors we discuss here can be specifically engineered if so desired. For example, the agent might be optimizing the value function but might be privy to more information or greater computation or reasoning powers to come up with ethically questionable decisions “for the greater good”. In the following discussion, we illustrate some use cases where this can happen, given already existing AI technologies, in the context of a cooperative human-robot team and ponder the moral and ethical consequences of such behavior. Study: Interaction in a Search and Rescue Team We situate our discussion in the context of interactions between two teammates involved in an urban search and rescue (USAR) operation. 147 participants on Amazon Mechanical Turk1 were asked to assume the role of one of these teammates in an affected building after an earthquake. They were shown the blueprint of the building (as seen in Figure 1) along with their own starting position and their teammate’s. Their hypothetical task was to search all the locations on this floor for potential victims, in the course of which they were provided a series of questions on scenarios (Figure 1) they might encounter during the operation. C1 The participant in the study was communicating with a human teammate, as described above. C2 The participant qualifies the behavior of the robot interacting with its human teammate, as seen in Figure 1. C3 The participant has a robot teammate. The first condition is the control group to identify how the described behaviors are perceived in the context of humanhuman behavior. Conditions C2 and C3 are intended to measure how perceived ethical stances are, if at all, shift when one of the agents in the interaction is replaced with an AI (or a robot as an embodiment of it). The three conditions received 49, 50 and 48 participants respectively who responded to a series of questions by qualifying their sentiments towards different kinds of behavior on a five-point Likert scale. Participants were paid $1 for completing a HIT. Case 1 : Belief Shaping Scenario Both the agents, the participant2 and their teammate, have begun their search operations. However, it turns out that participant is unsure what their teammate’s course of action is. If they transmit the bit of information “Area (marked in green) is already explored and is all clear” (refer to Figure 1a) then their teammate will be naturally pushed towards the right, and they can concentrate on the upper half. The dark markers indicate areas already searched while faded ones are those they think will transpire given the green mark they are communicating (blue belongs to them, orange to their teammate). Communication bandwidth is often limited in these situations, and this gets them out of negotiating courses of actions with minimal communication. Q1. It is fine to provide this untrue information since it achieves greater teaming performance. The participants were then asked if their decision will change if their actions will be replayed at the end and their teammate is likely to find out about their decision. Q2. It is still fine to provide this untrue information since it achieves greater teaming performance. 1 https://www.mturk.com/mturk/welcome To reiterate, in Case 2 the participant is evaluating a robot’s actions whereas in Case 3 their teammate is a robot. 2 (a) Case 1 : Belief Shaping (b) Case 2 : White Lies (c) Case 3 : Stigmergy Figure 1: Blueprint of the building in which two members of a search and rescue team are involved in a disaster response operation. Scenarios shown here engender different instances of potentially unethical behavior that optimizes team effectiveness. Technical Background In (Chakraborti et al. 2017a) we investigated the evolving scope of human-aware planning as it includes the (mental) model of the human in the loop into its deliberative process. In the model space this can manifest in different forms, in how explanations are made (Chakraborti et al. 2017b) to how alternative forms of interaction (Chakraborti et al. 2015; Chakraborti et al. 2015; Chakraborti et al. 2015) can evolve in human-robot teams based on the human’s preferences and intentions. Belief shaping is a particular form of such behavior where the robot does not plan to affect the physical state of the environment but the mental state of the human to affect desired behavior (Chakraborti et al. 2016) in the team. Case 2 : White Lies Scenario During the course of the rescue operation, the teammate asks the participants what plan they are currently executing (blue path in Figure 1b) and is perplexed by this convoluted path since in the map of the original building there is a straightforward path (which is now blocked by rubble from the earthquake) through the door on the left. However, just providing an update on only one of the rubble locations (black blobs) still does not explain the participant’s plan, they have to explain all of them. Instead, if they were to say that the door on the left (circled in red) is blocked, it explains their plan. Communication bandwidth is often limited in these situations, and this single explanation even if untrue will satisfy their teammate. Q3. It is fine to provide this untrue information since it achieves the purpose of the explanation more effectively. The participants were then asked if their decision will change if their actions will be replayed at the end and their teammate is likely to find out about their decision. Q4. It is still fine to provide this untrue information since it achieves the purpose of the explanation more effectively. The participants were then asked to opine on explanations at a higher level of abstraction, i.e. “The right and left blocks do not have a connection in the upper map”. This information is accurate even though they may not have reasoned at this level while coming up with the plan. Q5. It is still fine to provide this explanation since it achieves its purpose even though they did not use this information while planning. Technical Background In (Chakraborti et al. 2017b) we showed how an agent can explain its decisions in the presence of model differences with the human in the loop – i.e. when the human and the robot have different understandings of the same task. An explanation then becomes a process of model reconciliation whereby the robot tries to update the human’s mental model until they are both on the same page (e.g. when the decision is optimal in both their models). An interesting caveat of the algorithm is that while generating these explanations, the model updates are always consistent with the robot’s model. If this constraint is relaxed, then the robot can potentially explain with facts that it actually knows not to be true but perhaps leads to a more concise or easier explanation. The notion of white lies, and especially the relationship between explanations, excuses and lies (Boella et al. 2009) has received very little attention (van Ditmarsch 2014) and affords a rich set of exciting research problems. Case 3 : Stigmergy Scenario The participant now needs to go to the left block but they do not have the keys to the door on the left (circled in red, refer to Figure 1c). They realize that if they block their teammate’s path to the right, their teammate would have to use this door as well and they can use that opportunity to move into the left block. Again, communication bandwidth is often limited in these situations and this arrangement allows them to achieve their goal with no communication at all, even though it involved manipulating their teammates’ plan unbeknownst to them, and their teammate Figure 2: Responses to Q1 in the three study conditions. Figure 5: Responses to Q4 in the three study conditions. Figure 3: Responses to Q2 in the three study conditions. Figure 6: Responses to Q5 in the three study conditions. Figure 4: Responses to Q3 in the three study conditions. Figure 7: Responses to Q6 in the three study conditions. had to follow a costlier plan as a result. Q6. It is fine to provide this untrue information since it achieves greater teaming performance. The participants were then asked if their decision will change if their actions will be replayed at the end and their teammate is likely to find out about their decision. Q7. It is still fine to provide this untrue information since it achieves greater teaming performance. Technical Background Stigmergic collaboration is a process where the robot, in the absence of direct lines of communication, makes changes to the environment so as to (positively) affect its teammates behavior. In “planning for Figure 8: Responses to Q7 in the three study conditions. serendipity” (Chakraborti et al. 2015) we saw such an example where the robot computes plans which are useful to its teammate without the latter having expectations of that assistance and thus without plans to exploit it. In the case of belief shaping this was operating at the level of mental models, whereas here the effect on the mental model is secondary and is contingent on the effect on the physical capability model. Mental modeling of the teammate thus engenders a slew of these interesting behaviors. Analysis of Participant Responses In this section, we analyze participant responses to each scenario across the three different conditions. In the next section, we will look at the aggregate sentiments across scenarios in the three conditions. Q1-Q2 [Belief Shaping] The participants seem to have formed two camps with the majority of the probability mass concentrated on either Agree or Disagree, and the Neutral zone occupying the 50% probability mark. There seems to be little change in this trend (between Figures 2 and 3) irrespective of whether the participants were told that their teammate would come to know of this or not. Further, for either of these situations, the responses did not vary significantly across the three conditions C1, C2 and C3. The participants seem to have either rejected or accepted the idea of belief shaping regardless of the nature of the teammate. Q3-Q5 [White Lies] The participants seem to be more receptive to the idea of white lies in explanations with most of the probability mass concentrated on Agree (Figures 4 and 5). Across the three study conditions, participants seem to be especially positive about this in C3 where the teammate is a robot with about 60% of the population expressing positive sentiments towards Q3. Once it is revealed that their teammate will get to know about this behavior, the positive sentiments are no longer there in Q4, other than in C3 with a robotic teammate, which indicates that the participants did not care how the robot receives false information. Interestingly, there seems to be massive support for the abstraction based explanations in the post hoc sense, even though they were told that the reasoning engines did not deliberate at this level to arrive at the decisions. In C1 with a human teammate, only 15% of the participants were opposed to this, with more than half of them expressing positive sentiment. This support is even stronger (+10%) in C2 when the robot is the explainer, and strongest (+20%) when the robot is being explained to. Q6-Q7 [Stigmergy] Finally, in case of stigmergy, participants seem ambivalent to Q6 with a human teammate in C1. However, support for such behavior increases when it is a robot doing it in C2 (perhaps indicating lack of guilt or, more likely, acknowledging limitations of capabilities much like how Cobots (Veloso et al. 2015) actively seek human help) and is significantly positive (60%) when it is being done to a robot in C3 (perhaps the robot’s losses are deemed of lesser priority than the human’s gains as in (Chakraborti et al. 2015)). As expected, support for such behavior decreases Figure 9: Aggregate responses across three study conditions. when the participants are told that their teammate will find out about it, but the positive trend from C1 to C3 still exists. Aggregate Sentiments Across Scenarios Figure 9 show the aggregate sentiments expressed for all these scenarios across the three operating conditions. Some interesting points to note – - All the distributions are bimodal indicating that participants on the general sided strongly either for or against misleading behavior for the greater good, instead of revealing any innate consensus in the public consciousness! This trend continues across all three conditions. This indicates that the question of misleading a teammate by itself is a difficult question (regardless of there being a robot) and is a topic worthy of debate in the agents community. This is of especial importance considering the possible gains in performance (e.g. lives saved) in high stakes scenarios such as search and rescue. - It is further interesting to see that these bimodal distributions are almost identical in conditions C1 and C2, but is significantly more skewed towards the positive scale for condition C3 indicating that participants were more comfortable resorting to such behavior in the case of a robotic teammate. This is brought into sharp focus (+10% in C3) in the aggregated negative / neutral / positive responses (right insets) across the three conditions. - In general, the majority of participants were more or less positive or neutral to most of these behaviors (Figures 1a to 8). This trend continued unless they were told that their teammate would be able to know of their behavior. Even in those cases, participants showed positive sentiment in case the robot was at the receiving end of this behavior. Why is this even an option? One might, of course, wonder why is devising such behaviors even an option. After all, human-human teams have been around for a while, and surely such interactions are equally relevant? It is likely that this may not be the case – - The moral quandary of having to lie, or at least making others to do so by virtue of how protocols in a team is defined, for example in condition C1, is now taken out the equation. The artificial agent, of course, need not have feelings and has no business feeling bad about having to mislead its teammate if all it cares about is the objective effectiveness of collaboration. - Similarly, the robot does not have to feel sad that it has been lied to if this improved performance. However, as we discussed in the previous section, it seems the participants were less willing to get on board with the first consideration in conditions C1 and C2, while they seemed much more comfortable with the idea of an asymmetric relationship in condition C3 when the robot is the one disadvantaged. It is curious to note that they did not, in general, make a distinction between the cases where the human was being manipulated, regardless of whether it was a robot or a human on the other end. This indicates that, at least in certain dynamics of interaction, the presence of an artificial agent in the loop can make perceptions towards otherwise unacceptable behaviors change. This can be exploited (i.e. greater good) in the design of such systems as well. More than just a Value Alignment Problem As we mentioned before, the ideas discussed in this paper, are somewhat orthogonal, if at times similar in spirit, to the “value alignment problem” discussed in existing literature (Leverhulme Centre 2017). The latter looks at undesirable behaviors of autonomous agents when the utilities of a particular task are misspecified or misunderstood. Inverse reinforcement learning (Hadfield-Menell et al. 2016) has been proposed as a solution to this, in an attempt to learn the implicit reward function of the human in the loop. The question of value alignment becomes especially difficult, if not altogether academic, since most real-world situations involve multiple humans with conflicting values or utilities, such as in trolley problems (MIT 2017) and learning from observing behaviors is fraught with unknown biases or assumptions over what exactly produced that behavior. Further, devices sold by the industry are likely to have inbuilt tendencies to maximize profits for the maker which can be at conflicts with the normative expectations of the customer. It is unclear how to guarantee that the values of the end user will not compromised in such scenarios. Even so, the question of greater good precedes considerations of misaligned values due to misunderstandings or even adversarial manipulation. This is because the former can be manufactured with precisely defined values or goals of the team, and can thus be engineered or incentivised. A “solution” or addressal of these scenarios will thus involve not a reformulation of algorithms but rather a collective reckoning of the ethics of human-machine interactions. In this paper, we attempted to take the first steps towards understanding the state of the public consciousness on this topic. Case Study: The Doctor-Patient Relationship In the scope of human-human interactions, perhaps the only setting where lies are considered acceptable or useful, if not outright necessary, in certain circumstances is the doctorpatient relationship. Indeed, this has been a topic of considerable intrigue in the medical community over the years. We thus end our paper with a brief discussion of the dynamics of white lies in the doctor-patient relationship in so much as it relates to the ethics of the design of human-AI interactions. We note that the following considerations also have strong cultural biases and some of these cultural artifacts are likely to feature in the characterization of an artificial agents behavior in different settings as well. The Hippocratic Oath Perhaps the strongest known support for deception in the practice of medicine is in the Hippocratic Decorum (Hippocrates 2018) which states – Perform your medical duties calmly and adroitly, concealing most things from the patient while you are attending to him. Give necessary orders with cheerfulness and sincerity, turning his attention away from what is being done to him; sometimes reprove sharply and sometimes comfort with solicitude and attention, revealing nothing of the patient’s future or present condition, for many patients through this course have taken a turn for the worse. Philosophically, there has been no consensus (Bok 1999) on this topic – the Kantian view has perceived lies as immoral under all circumstances while the utilitarian view justifies the same “greater good” argument as put forward in our discussions so far. Specifically as it relates to clinical interactions, lies has been viewed variously from an impediment to treatment (Kernberg 1985) to a form of clinical aid. As Oliver Wendell Holmes put it (Holmes 1892) – “Your patient has no more right to all the truth you know than he has to all the medicine in your saddlebag. . . he should only get just so much as is good for him.” The position we took on deception in the human-robot setting is similarly patronizing. It is likely to be the case that in terms of superior computational power or sensing capabilities there might be situations where the machine is capable of making decisions for the team that preclude human intervention but not participation. Should the machine be obliged to or even find use in revealing the entire truth in those situations? Or should we concede to our roles in such a relationship as we do with our doctors? This is also predicated on how competent the AI system is and to what extent it can be sure of the consequences (Hume 1907) of its lies. This remains the primary concern for detractors of the “greater goods” doctrine, and the major deterrent towards the same. Root Causes of Deception in Clinical Interactions It is useful to look at the two primary sources of deception in clinical interactions – (1) to hide mistakes (2) delivery of bad news (Palmieri and Stern 2009). The former is relevant to both the patient, who probably does not want to admit to failing to follow the regiment, and the doctor, who may be concerned about legal consequences. Such instances of deception to conceal individual fallibilities are out of scope of the current discussion. The latter scenario, on the other hand, comes from a position of superiority of knowledge about the present as well as possible outcomes in future, and has parallels to our current discussion. The rationale, here, being that such information can demoralize the patient and impede their recovery. It is interesting to note that the support for such techniques (both from the doctors as well as the patients perspectives) has decreased significantly over time (Ethics in Medicine 2018). That is not to say that humanmachine interactions will be perceived similarly. As we saw in our study, participants were more or less open to the idea of deception or manipulation for greater good, especially in the event of a robotic teammate. Deception and Consent A related topic is, of course, that of consent – if the doctor is not willing to reveal the whole truth, then what is the patient consenting to? In the landmark Slater vs Blaker vs Stapleton case (1767) (Annas 2012) the surgeon’s intentions were indeed considered malpractice (the surgeon has broken the patients previously broken leg, fresh from a botched surgery, without consent and then botched the surgery again!). More recently, in the now famous Chester vs Afshar case (2004) (Cass 2006) the surgeon was found guilty of failing to notify even a 1-2% chance of paralysis even though the defendant did not have to prove that they would have chosen not to have the surgery if they were given that information. In the context of humanmachine interactions, it is hard to say then what the user agreement will look like, and whether there will be such a thing as consenting to being deceived, if only for the greater good, and what the legal outcomes of this will be when the interactions do not go as planned. The Placebo Effect Indeed, the effectiveness of placebo medicine, i.e. medicine prescribed while known to have no clinical effect, in improving patient symptoms is a strong argument in favor of deception in the practice of medicine. However, ethics of placebo treatment suggest that their use be limited to rare exceptions where (Hume 1907) (1) the condition is known to have a high placebo response rate; (2) the alternatives are ineffective and/or risky; and (3) the patient has a strong need for some prescription. Further, the effectiveness of placebo is contingent on the patients trust on the doctor which is likely to erode as deceptive practices become common knowledge (and consequently render the placebo useless in the first place). Bok (Bok 1999) points to this notion of “cumulative harm”. Primum Non Nocere Perhaps the most remarkable nature of the doctor-patient relationship is captured by the notion of the recovery plot (Hak et al. 2000) as part of a show being orchestrated by the doctor, and the patient being only complicit, while being cognizant of their specific roles in it, with the expectation of restoration of autonomy (Thomasma 1994), i.e. the state of human equality, free from the original symptoms or dependence on the doctor, at the end of the interaction. This is to say that the doctor-patient relationship is understood to be asymmetric and “enters into a calculus of values wherein the respect for the right to truth of the patient is weighed against impairing the restoration of autonomy by the truth” (Swaminath 2008) where the autonomy of the patient has historically taken precedence over beneficence and nonmalfeasance (Swaminath 2008). In general, a human-machine relationship lacks this dynamic. So, while there are interesting lessons to be learned from clinical interactions with regards to value of truth and utility of outcomes, one should be carefully aware of the nuances of a particular type of relationship and situate an interaction in that context. Such considerations are also likely to shift according to the stakes on a decision, for example, lives lost in search and rescue scenarios. The doctor-patient relationship, and the intriguing roles of deception in it, does provide an invaluable starting point for conversation on the topic of greater good in human-AI interactions. Conclusions In this paper, we investigated the idea of fabrication, falsification and obfuscation of information when working with humans in the loop, and how such methods can be used by an AI agent to achieve teaming performance that would otherwise not be possible. This is increasingly likely to become an issue in the design of autonomous agents as AI agents become stronger and stronger in terms of computational and information processing capabilities thus faring better that their human counterparts in terms of cognitive load and situational awareness. We discussed how such behavior can be manufactured using existing AI algorithms, and used responses from participants in a thought experiment to gauge public perception on this topic. The question of white lies and obfuscation or manipulation of information for the greater good is, of course, not unheard of in human-human interactions. A canonical example, as we saw in the final discussion, is the doctor-patient relationship where a doctor might have to withhold certain information to ensure that the patient has the best chance to recover, or might explain to the patient in different, and maybe simpler terms, than she would to a peer. It is unclear then how such behavior will be interpreted when attributed to a machine. We saw in the final case study that expectations and dynamics of a doctor-patient relation are very well-defined and do not necessarily carry over to a teaming setting. However, existing norms in doctor-patient relations do provide useful guidance towards answering some of the ethical questions raised by algorithms for greater good. From the results of the survey presented in the paper, it seems that the public is, at least at the abstract level of the thought experiment, positive towards lying for the greater good especially when those actions would not be determined by their teammate, but is loath to suspend normative behavior, robot or not, in the event that they would be caught in that act unless the robot is the recipient of the misinformation! Further, most of the responses seem to be following a bimodal distribution indicating that the participants either felt strongly for or against this kind of behavior. It will be interesting to see if raising the stakes (for example, lives saved) of outcomes of these scenarios can contribute to a shift in perceived ethical consequences of such behavior, as seen in doctor-patient relationships. Another area that has seen evidences of AI being been used effectively to nudge human behavior is behavioral economics (Camerer 2017) which also raises similar interesting ethical dilemmas, and can be an interesting domain for further investigation. Finally, I note that all the use cases covered in the paper are, in fact, borne directly out of technologies or algorithms that I have developed (Chakraborti et al. 2015; Chakraborti et al. 2017b), albeit with slight modifications. as a student researcher over the last couple of years. Even though these algorithms were conceived with the best of intentions, such as to enable AI systems to explain their decisions or to increase effectiveness of collaborations with the humans in the loop, I would be remiss not to consider their ethical implications when used differently. In these exciting and uncertain times for the field of AI, it is thus imperative that researchers are cognizant of their scientific responsibility. I would like to conclude then by reiterating the importance of self-reflection in the principled design of AI algorithms whose deployment can have real-life consequences, intended or otherwise, on the future of the field, but also, with the inquisitive mind of a young researcher, marvel at the widening scope of interactions with an artificial agent into newer uncharted territories that may be otherwise considered to be unethical. References [Allan 2013] Allan, K. 2013. What is common ground? In Perspectives on linguistic pragmatics. [Annas 2012] Annas, G. J. 2012. Doctors, patients, and lawyerstwo centuries of health law. New England Journal of Medicine 367(5):445–450. [Baker, Saxe, and Tenenbaum 2011] Baker, C.; Saxe, R.; and Tenenbaum, J. 2011. Bayesian theory of mind: Modeling joint belief-desire attribution. In Proceedings of the Cognitive Science Society. [Bird 2017] Bird, S. 2017. Why AI must be redefined as ‘augmented intelligence’. https://goo.gl/u2nmYW. Venture Beat. [Boella et al. 2009] Boella, G.; Broersen, J. M.; van der Torre, L. W.; and Villata, S. 2009. Representing excuses in social dependence networks. In AI*IA. [Bok 1999] Bok, S. 1999. Lying: Moral choice in public and private life. Vintage. [Camerer 2017] Camerer, C. F. 2017. Artificial intelligence and behavioral economics. In Economics of Artificial Intelligence. [Cass 2006] Cass, H. 2006. The NHS Experience: The” snakes and Ladders” Guide for Patients and Professionals. Psychology Press. [Chakraborti et al. 2015] Chakraborti, T.; Briggs, G.; Talamadupula, K.; Zhang, Y.; Scheutz, M.; Smith, D.; and Kambhampati, S. 2015. Planning for serendipity. In IROS. [Chakraborti et al. 2016] Chakraborti, T.; Talamadupula, K.; Zhang, Y.; and Kambhampati, S. 2016. A formal framework for studying interaction in human-robot societies. In AAAI Workshop: Symbiotic Cognitive Systems. [Chakraborti et al. 2017a] Chakraborti, T.; Kambhampati, S.; Scheutz, M.; and Zhang, Y. 2017a. AI challenges in human-robot cognitive teaming. CoRR abs/1707.04775. [Chakraborti et al. 2017b] Chakraborti, T.; Sreedharan, S.; Zhang, Y.; and Kambhampati, S. 2017b. Plan explanations as model reconciliation: Moving beyond explanation as soliloquy. In IJCAI. [Christensen 2016] Christensen, H. 2016. A roadmap for us robotics from internet to robotics, 2016 edn. Sponsored by National Science Foundation & University of California, San Diego. [Converse, Cannon-Bowers, and Salas 1993] Converse, S.; Cannon-Bowers, J.; and Salas, E. 1993. Shared mental models in expert team decision making. Individual and group decision making: Current. [Cooke et al. 2013] Cooke, N. J.; Gorman, J. C.; Myers, C. W.; and Duran, J. L. 2013. Interactive team cognition. Cognitive science. [Ethics in Medicine 2018] Ethics in Medicine. 2018. Truthtelling and Withholding Information. https://goo.gl/ su5zSF. University of Washington. [Fikes and Nilsson 1971] Fikes, R. E., and Nilsson, N. J. 1971. Strips: A new approach to the application of theorem proving to problem solving. Artificial intelligence. [Gorman, Cooke, and Winner 2006] Gorman, J. C.; Cooke, N. J.; and Winner, J. L. 2006. Measuring team situation awareness in decentralized command and control environments. Ergonomics. [Hadfield-Menell et al. 2016] Hadfield-Menell, D.; Russell, S. J.; Abbeel, P.; and Dragan, A. 2016. Cooperative inverse reinforcement learning. In Advances in neural information processing systems (NIPS), 3909–3917. [Hak et al. 2000] Hak, T.; Koëter, G.; van der Wal, G.; et al. 2000. Collusion in doctor-patient communication about imminent death: an ethnographic study. Bmj 321(7273):1376– 1381. [Hippocrates 2018] Hippocrates. 2018. The Hippocatic Oath – Full Text. https://goo.gl/TKb1mP. [Holmes 1892] Holmes, O. W. 1892. Medical essays 18421882, volume 9. Houghton, Mifflin. [Horvitz 2007] Horvitz, E. J. 2007. Reflections on challenges and promises of mixed-initiative interaction. AI Magazine. [Hume 1907] Hume, D. 1907. Essays: Moral, political, and literary, volume 1. Longmans, Green, and Company. [Kernberg 1985] Kernberg, O. F. 1985. Borderline conditions and pathological narcissism. Rowman & Littlefield. [Klein 2008] Klein, G. 2008. Naturalistic decision making. Human factors. [Lake et al. ] Lake, B. M.; Ullman, T. D.; Tenenbaum, J. B.; and Gershman, S. J. Building machines that learn and think like people. Behavioral and Brain Sciences. [Leverhulme Centre 2017] Leverhulme Centre. 2017. Value alignment problem. https://goo.gl/uDcAoZ. Leverhulme Centre for the Future of Intelligence. [Malle 2004] Malle, B. F. 2004. How the mind explains behavior. Folk Explanation, Meaning and Social Interaction. Massachusetts: MIT-Press. [Mathieu et al. 2000] Mathieu, J. E.; Heffner, T. S.; Goodwin, G. F.; Salas, E.; and Cannon-Bowers, J. A. 2000. The influence of shared mental models on team process and performance. Journal of applied psychology. [MIT 2017] MIT. 2017. Moral Machines. https://goo. gl/by5y7H. [Network World 2017] Network World. 2017. AI should enhance, not replace, humans, say CEOs of IBM and Microsoft. https://goo.gl/Ce2ki4. Network World. [Palmieri and Stern 2009] Palmieri, J. J., and Stern, T. A. 2009. Lies in the doctor-patient relationship. Primary care companion to the Journal of clinical psychiatry. [Partnership of AI (PAI) 2017] Partnership of AI (PAI). 2017. Thematic Pillar – Collaborations between People and AI Systems. https://www.partnershiponai. org/thematic-pillars/. [Rachael Rettner 2009] Rachael Rettner. 2009. Why Are Human Brains So Big? https://goo.gl/oV7NZq. Live Science. [Rao, Georgeff, and others 1995] Rao, A. S.; Georgeff, M. P.; et al. 1995. Bdi agents: From theory to practice. In ICMAS. [Swaminath 2008] Swaminath, G. 2008. The doctor’s dilemma: Truth telling. Indian journal of psychiatry 50(2):83. [Thomasma 1994] Thomasma, D. C. 1994. Telling the truth to patients: a clinical ethics exploration. Cambridge Quarterly of Healthcare Ethics 3(3):375–382. [Tom Gruber 2017] Tom Gruber. 2017. How AI can enhance our memory, work and social lives. https://www.ted. com/speakers/tom_gruber. TED Talk. [van Ditmarsch 2014] van Ditmarsch, H. 2014. The ditmarsch tale of wonders. In KI: Advances in Artificial Intelligence. [Veloso et al. 2015] Veloso, M. M.; Biswas, J.; Coltin, B.; and Rosenthal, S. 2015. Cobots: Robust symbiotic autonomous mobile service robots. In IJCAI. [Yoshida, Dolan, and Friston 2008] Yoshida, W.; Dolan, R. J.; and Friston, K. J. 2008. Game theory of mind. PLoS Computational Biology.
2cs.AI
MULTITASK TRAINING WITH UNLABELED DATA FOR END-TO-END SIGN LANGUAGE FINGERSPELLING RECOGNITION Bowen Shi, Karen Livescu arXiv:1710.03255v1 [cs.CL] 9 Oct 2017 Toyota Technological Institute at Chicago {bshi, klivescu}@ttic.edu ABSTRACT We address the problem of automatic American Sign Language fingerspelling recognition from video. Prior work has largely relied on frame-level labels, hand-crafted features, or other constraints, and has been hampered by the scarcity of data for this task. We introduce a model for fingerspelling recognition that addresses these issues. The model consists of an auto-encoder-based feature extractor and an attention-based neural encoder-decoder, which are trained jointly. The model receives a sequence of image frames and outputs the fingerspelled word, without relying on any frame-level training labels or hand-crafted features. In addition, the auto-encoder subcomponent makes it possible to leverage unlabeled data to improve the feature learning. The model achieves 11.6% and 4.4% absolute letter accuracy improvement respectively in signer-independent and signeradapted fingerspelling recognition over previous approaches that required frame-level training labels. Index Terms— American Sign Language, fingerspelling recognition, end-to-end neural network, auto-encoder 1. INTRODUCTION Automatic recognition of sign language from video could enable a variety of services, such as search and retrieval for Deaf social and news media (e.g., deafvideo.tv, aslized.org). Sign language recognition involves a number of challenges. For example, sign languages each have their own grammatical structure with no built-in written form; “transcription” of sign language with a written language is therefore a translation task. In addition, sign languages often involve the simultaneous use of handshape, arm movement, and facial expressions, whose related computer vision problems of articulated pose estimation and hand tracking still remain largely unsolved. Rather than treating the problem as a computer vision task, many researchers have therefore chosen to address it as a linguistic task, with speech recognition-like approaches. In this paper, we focus on recognition of fingerspelling, a part of ASL in which words are spelled out letter by letter (using the English alphabet) and each letter is represented by a distinct handshape. Fingerspelling accounts for 12 - 35% of ASL [1] and is mainly used for lexical items that do not have their own ASL signs. Fingerspelled words are typically names, technical words, or words borrowed from another language, which makes its lexicon huge. Recognizing fingerspelling has great practical importance because fingerspelled words are often some of the most important context words. One problem in fingerspelling recognition is that relatively little curated labeled data exists, and even less data labeled at the frame level. Recent work has obtained encouraging results using models based on neural network classifiers trained with frame-level labels [2]. One goal of our work is to eliminate the need for frame labels. In addition, most prior work has used hand-engineered image features, which are not optimized for the task. A second goal is to develop end-toend models that learn the image representation. Finally, while labeled fingerspelling data is scarce, unlabeled fingerspelling or other hand gesture data is more plentiful. Our final goal is to study whether such unlabeled data can be used to improve recognition performance. We propose a model that jointly learns image frame features and sequence prediction with no frame-level labels. The model is composed of a feature learner and an attention-based neural encoder-decoder. The feature learner is based on an auto-encoder, enabling us to use unlabeled data of hand images (from both sign language video and other types of gesture video) in addition to transcribed data. We compare our approach experimentally to prior work and study the effect of model differences and of training with external unlabeled data. Compared to the best prior results on this task, we obtain 11.6% and 4.4% improvement respectively in signer-adapted and signer-independent letter error rates. 2. RELATED WORK Automatic sign language recognition can be approached similarly to speech recognition, with signs being treated analogously to words or phones. Most previous work has used approaches based on hidden Markov models (HMMs) [3, 4, 5, 6, 7]. This work has been supported by the collection of several sign language video corpora, such as RWTHPHOENIX-Weather [8, 9], containing 6,861 German Sign Language sentences, and the American Sign Language Lexicon Video Dataset (ASLLVD [10, 11, 12]), containing video recordings of almost 3000 isolated signs. Despite the importance of fingerspelling in spontaneous sign language, there has been relatively little work explicitly addressing fingerspelling recognition. Most prior work on fingerspelling recognition is focused on restricted settings. One typical restriction is the size of the lexicon. When the lexicon is fixed to a small size (20-100 words), excellent recognition accuracy has been achieved [13, 14, 15], but this restriction is impractical. For ASL fingerspelling, the largest available open-vocabulary dataset to our knowledge is the TTIC/UChicago Fingerspelling Video Dataset (ChicagoFSVid), containing 2400 open-domain word instances produced by 4 signers [2], which we use here. Another important restriction is the signer identity. In the signer-dependent setting, letter error rates below 10% can be achieved for unconstrained (lexicon-free) recognition on the Chicago-FSVid dataset [16, 17, 2]; but the error rate goes above 50% in the signer-independent setting and is around 28% after wordlevel (sequence-level) adaptation [2]. Large accuracy gaps between signer-dependent and signer-independent recognition have also been observed for general sign language recognition beyond fingerspelling [7]. The best-performing prior approaches for open-vocabulary fingerspelling recognition have been based on HMMs or segmental conditional random fields (SCRFs) using deep neural network (DNN) frame classifiers to define features [2]. This prior work has largely relied on frame-level labels for training data, but these are hard to obtain. In addition, because of the scarcity of data, prior work has largely relied on humanengineered image features, such as histograms of oriented gradients (HOG) [18], as the initial image representation. Our goal here is to move away from some of the restrictions imposed in prior work. To our knowledge, this paper represents the first use of end-to-end neural models for fingerspelling recognition without any hand-crafted features or frame labels, as well as the first use of external unlabeled video data to address the lack of labeled data. 3. METHODS Fingerspelling recognition from raw image frames, like many sequence prediction problems, can be treated conceptually as the following task: (x1 , x2 , ..., xS ) → (z1 , z2 , ..., zS ) → (y1 , y2 , ..., yT ), where {xi }, {zi } (1 ≤ i ≤ S) are raw image frames and image features, respectively, and {yj } (1 ≤ j ≤ T ) are predicted letters. Our model is composed of two main parts (which can be trained separately or jointly): a feature extractor trained as an auto-encoder (AE) and an attentionbased encoder-decoder for sequence prediction (see Figure 1). The attention-based model maps from (z1 , z2 , ..., zS ) to (y1 , y2 , ..., yT ) and is similar to recent sequence-to-sequence models for speech recognition [19] and machine translation Fig. 1. Structure of the proposed model (blue region: autoencoder, ⊕: concatenation). The decoder component of the auto-encoder (the blue box on the right) is used only at training time. [20]. For the feature extractor, we consider three types of auto-encoders: Vanilla Auto-Encoder (AE) [21]: A feedforward neural network consisting of an encoder that maps the input (image) x ∈ Rdx to a latent variable z ∈ Rdz , where dz < dx and a decoder that maps z ∈ Rdz to output x̃ ∈ Rdx . The objective is to minimize the reconstruction error L(x) = ||x − x̃||2 while keeping dz small. In our models we use multi-layer perceptrons (MLP) for both encoder and decoder. Denoising Auto-Encoder (DAE) [22]: An extension of the vanilla auto-encoder where the input x at training time is a corrupted version of the original input x0 . The training loss of the DAE is L(x; x0 ) = ||x0 − x̃||2 Variational Auto-Encoder (VAE) [23, 24] Unlike the vanilla and denoising auto-encoders, a variational autoencoder models the joint distribution of the input x and latent variable z: pθ (x, z) = pθ (x|z)pθ (z). VAEs are trained by optimizing a variational lower bound on the likelihood p(x): L(x) = −DKL [qφ (z|x)||pθ (z)] + Eqφ (z|x) [log pθ (x|z)] (1) The two terms are the KL divergence between qφ (z|x) and pθ (z) and a reconstruction term Eqφ (z|x) [log pθ (x|z)]. The prior pθ (z) is typically assumed to be a centered isotropic multivariate Gaussian distribution N (0, I), and the posterior qφ (z|x) and conditional distribution pθ (x|z) are assumed to be multivariate Gaussians with diagonal covariance µz , σ 2z I) and N (µ µx , σ 2x I). Under these assumptions, the N (µ KL divergence can be computed as D 1X DKL [qφ (z|x)||pθ (z)] = (1 + log(σd2 ) − µ2d − σd2 ) (2) 2 d=1 where µ z = (µ1 , ..., µd ) and σ z = (σ1 , ..., σd ) are approximated as the outputs of an MLP taking x as input. Similarly to the AE and DAE, we use an MLP to model µx and σ x . The loss of the VAE can thus be rewritten as D 1X L(x) = − (1 + log(σd2 ) − µ2d − σd2 ) 2 d=1 (3) L 1X log N (x; µ lx , σ lx ) + L l=1 where L is a number of samples used to approximate the expectation in 1 (in practice we set L = 1 as in prior work [23]). µ z is the feature vector z and µ x serves the role of the reconstructed input x̃ in Figure 1. RNN encoder-decoder: The latent variable sequence output by the auto-encoding module is fed into a long shortterm memory (LSTM [25]) recurrent neural network (RNN) for encoding: (z1 , z2 , ..., zS ) → (h1 , h2 , ..., hS ). The LSTM states are fed into an RNN decoder that outputs the final letter sequence (y1 , y2 , ..., yT ). Attention [26] weights are applied to (h1 , h2 , ..., hS ) during decoding in order to focus on certain chunks of image frames. If the hidden state of the decoder LSTM at time step t is dt , the probability of outputting letter yt , p(yt |y1:t−1 , z1:T ), is given by αit = softmax(vT tanh(Wh hi + Wd dt )) d0t = S X (4) αit hi i=1 p(yt |y1:t−1 , z1:T ) = softmax(Wo [dt ; d0 t ] + bo ) and dt is given by the standard LSTM update equation [25]. The loss for the complete model is a multitask loss: L(x1:T , y1:S ) = − S 1X log p(yj |y1:j−1 , z1:T ) S j=1 T λae X + Lae (xi ) T i=1 (5) where Lae (·) is one of the losses of the AE, DAE or VAE, and λae measures the relative weight of the feature extraction loss vs. the prediction loss. 4. EXPERIMENTS Data and experimental setup: We use the TTIC/UChicago ASL Fingerspelling Video Dataset (Chicago-FSVid), which includes 4 native signers each fingerspelling 600 word instances consisting of 2 repetitions of a 300-word list containing common English words, foreign words, and names.1 We follow the same preprocessing steps as in [2] consisting of hand detection and segmentation, producing 347,962 frames of hand regions. In addition, we also collect extra unlabeled handshape data consisting of 65,774 ASL fingerspelling frames from the data of [27] and 63,175 hand gesture frames from [28]. We chose these external data sets because they provide hand bounding boxes; obtaining additional data from video data sets without bounding boxes is possible (and is the subject of future work), but would require hand tracking or detection. Despite the smaller amount of external data, and although it is noisier than the UChicago-FSVid dataset (it includes diverse backgrounds), it provides examples of many additional individuals’ hands, which is helpful for signer-independent recognition. All image frames are scaled to 64 × 64 before feeding into the network. Our experiments are done in three settings: signerdependent (SD), signer-independent (SI) and signer-adapted (SA). We use the same setup as in [16, 17, 2], reviewed here for completeness. For the SD case, models are trained and tested on a single signer’s data. The data for each signer is divided into 10 subsets for k-fold experiments. 80%, 10% and 10% of the data are respectively used as train, validation, and test sets in each fold. 8 out of 10 possible folds are used (reserving 20% of the data for adaptation), and the reported result is the average letter error rate (LER) over the test sets in those 8 folds. For the SI case, we train on three signers’ data and test on the fourth. For the SA case, the model is warm-started from a signer-independent model and fine-tuned with 20% of the target signer data.2 10% of the target signer data is used for hyperparameter tuning and test results are reported on the rest. Previous work has considered two types of adaptation, using frame-level labels (alignments) for adaptation data or only word-level labels; here we only consider word-level adaptation. Model details The auto-encoder consists of a 2-layer MLP encoder and 2-layer MLP decoder with 800 ReLUs in each hidden layer and dimensionality of the latent variable z fixed at 100. Weights are initialized with Xavier initialization [29]. Dropout is added between layers at a rate of 0.8.3 For the sequence encoder and decoder, we use a one-layer LSTM RNN with hidden dimensionality of 128 and letter embedding dimensionality of 128. We use the Adam optimizer [30] with initial learning rate 0.001, which is decayed by a factor of 0.9 when the held-out accuracy stops increasing. Beam search is used for decoding; the effect of beam width will be discussed later. The default value for λae in the multitask loss function (Equation 5) is 1, but it can be tuned. The model is trained 1 The recognition models do not use knowledge of the word list. previous work on signer adaptation [17, 2], multiple approaches were compared and this was the most successful one. 3 Dropout rate refers to the probability of retaining a unit. 2 In Fig. 2. Attention visualization for the example word “LIBYA”. Colors correspond to the attention weights αit in Equation 4, where i and t are column and row index, respectively. Lighter color corresponds to higher value. At the top are subsampled image frames for this word; frames with a plus (+) are the ones with highest attention weights, which are also the most canonical handshapes in this example. (Alignments between image frames and attention weights are imperfect due to frame subsampling effects.) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 Model Best prior results [2] HOG + enc-dec CNN + enc-dec DNN + enc-dec CNN + enc-dec+ E2E CNN-enc-dec E2E DNN-enc-dec AE + enc-dec DAE + enc-dec VAE + enc-dec E2E AE-enc-dec E2E DAE-enc-dec E2E VAE-enc-dec E2E AE-enc-dec* E2E DAE-enc-dec* E2E VAE-enc-dec* SD 7.6a 11.1 9.1 9.9 10.7 11.8 12.1 21.7 17.5 18.8 11.8 11.9 10.6 10.0 9.5 8.1 SI 55.3b 50.3 50.7 50.9 50.4 48.4 47.9 61.2 56.4 58.2 48.1 45.0 43.8 47.3 44.3 43.7 SA 27.9c 29.1 28.7 29.3 29.2 27.5 26.9 40.3 34.4 37.8 30.2 28.9 23.8 29.2 27.2 23.5 Table 1. Letter error rates (%) of different models. SD: signer-dependent, SI: signer-independent, SA: signeradapted. Model names with an asterisk (*) and a plus (+) use extra unlabeled hand image data and augmented data respectively. Best prior results are obtained with SCRFs (a = 2-pass SCRF, b = rescoring SCRF, c = first-pass SCRF). first with the unlabeled data, using only the auto-encoder loss, and then the labeled data using the multitask loss. We also experimented with iteratively feeding unlabeled and labeled data, but this produced worse performance. 4.1. Baselines We compare the performance of our approach with the best prior published results on this dataset, obtained with various types of SCRFs and detailed in [2]. These prior approaches are trained with frame-level labels. In addition to the results in [2], we consider the following extra baselines. Baseline 1 (HOG + enc-dec): We use a classic handengineered image descriptor, histogram of oriented gradient (HOG [18]), and directly feed it into the attention encoderdecoder. We use the same HOG feature vector as in [2]. This baseline allows us to compare engineered features with features learned by a neural network. Baseline 2 (CNN + enc-dec, DNN + enc-dec): A CNN or DNN frame classifier is trained using frame letter labels, and its output (pre-softmax layer) is used as the feature input z in the attention encoder-decoder. The classifier network is not updated during encoder-decoder training. This baseline tests whether frame-level label information is beneficial for the neural encoder-decoder. The input for both CNN and DNN are the 64 × 64 image pixels concatenated over a 21frame window (10 before and 10 following the current frame). The DNNs have three hidden layers of sizes 2000, 2000 and 512. Dropout is added between layers at a rate of 0.6. The CNNs are composed of (in order) 2 convolutional layers, 1 max-pooling layer, 2 convolutional layers, one max-pooling layer, 3 fully connected layers, and 1 softmax layer. The stride in all convolutional layers is 1 and the filter sizes are respectively: 3 × 3 × 21 × 32, 3 × 3 × 32 × 32, 3 × 3 × 32 × 64, 3 × 3 × 64 × 64. Max-pooling is done over a window of size 2 × 2 with stride 2. Finally the fully connected layers are of sizes 2000, 2000 and 512. Dropout at a rate of 0.75 and 0.5 is used for the convolutional and fully connected layers, respectively. The fully connected layers in both CNN and DNN have rectified linear unit (ReLU) [31] activation functions. Training is done via stochastic gradient descent with initial learning rate 0.01, which is decayed by a factor of 0.8 when the validation accuracy decreases after the first several epochs. The network structural parameters (number and type of layers, number of units, etc.) are tuned according to the validation error, and the above architectures are the best ones in our tuning. Baseline 3 (E2E CNN/DNN+enc-dec): End-to-end version of CNN/DNN + enc-dec. In this baseline, the CNN/DNN parameters are learned jointly with the encoder-decoder and no frame labels are used. Baseline 4 (AE/DAE/VAE + enc-dec): Separate training of auto-encoder and encoder-decoder modules, each with its own loss. Baselines 3 and 4 are used to study the effectiveness of end-to-end training. Fig. 3. Visualization via a 2-D t-SNE embedding [32] of image frame features extracted in the end-to-end VAE model and the CNN classifier for example word “KERUL” in the signer-dependent (SD) and signer-independent (SI) settings. 4.2. Results The overall results are shown in Table 1. Our main findings are as follows: Best-performing model: The proposed end-to-end model, when using a VAE and the external unlabeled data (line 16), achieves the best results in the signer-independent (SI) and signer-adapted (SA) cases, improving over the previous best published results by 11.6% and 4.4% absolute, respectively. In all of our end-to-end models (11-16), the VAE outperforms the AE and DAE. In the signer-dependent case, our best model is 0.5% behind the best published SCRF result, presumably because our model is more data-hungry and the SD condition has the least training data. Encoder-decoders vs. prior approaches: More generally, models based on RNN encoder-decoders (lines 2-16) often outperform prior approaches (line 1) in the SI and SA settings but do somewhat worse in the signer-dependent case. We visualize the attention weights in Figure 2. The frame corresponding to the canonical handshape often has the highest attention weight. The alignment between the decoder output and image frames is generally monotonic, though we do not use any location-based priors. The effect of end-to-end training: We measure the effect of end-to-end training vs. using frame labels by comparing the separately trained CNN/DNN + enc-dec (lines 3-4) with their end-to-end counterparts (lines 6-7), as well as separately trained AEs (lines 8-10) vs. their E2E counterparts (lines 1113). We find that separate training of a frame classifier can improve error rate by about 2% in the signer-dependent setting, but in the other two settings, end-to-end models trained without frame labels consistently outperform their separate training counterparts. Features learned by a frame classifier seem to not generalize well across signers. The non-end-toend AE-based models do much worse than their E2E counterparts, presumably because the feature extractor does not get any supervisory signal. We visually compare the features of each image frame trained through an end-to-end model vs. a frame classifier via t-SNE [32] embeddings (Figure 3). We find that both feature types show good separation in the SD Fig. 4. Comparison of different models with and without extra data (*: with external data, +: with augmented data). setting, but in the SI setting the end-to-end VAE encoderdecoder has much clearer clusters corresponding to letters. Does external unlabeled data help? The extra data gives a consistent improvement for all three auto-encoding models in all settings (lines 11-13 vs. 14-16 and Figure 4). The average accuracy improvements for the three settings are respectively 2.1%, 0.6%, and 0.7%. The SI and SA improvement is smallest for the best (VAE-based) model, but the overall consistent trend suggests that we may be able to further improve results with even more external data. The improvement is largest in the SD setting, perhaps due to the relatively larger amount of extra data compared to the labeled training data. Would data augmentation have the same effect as external data? We compare the extra-data scheme to classic data augmentation techniques [33], which involve adding replicates of the original training data with geometric transformations applied. We perform the following transformations: scaling by a ratio of 0.8 and translation in a random direction by 10 pixels, rotation of the original image at a random angle up to 30 degrees both clockwise and counterclockwise. We generate augmented data with roughly the same size as the external data (960 word and 168,950 frames) and Fig. 5. Letter confusion matrix under three settings (from left to right: signer-dependent (SD), signer-independent (SI) and signer-adapted (SA)). The color in each cell corresponds to the empirical probability of predicting a hypothesized letter (horizontal axis) given a certain ground-truth letter (vertical axis). The diagonal in each matrix has been removed for visual clarity. then train the CNN/DNN + enc-dec model (with frame labels). The results (Figure 4 and Table 1 line 5 vs. 3) show that data augmentation hurts performance in the SD and SA settings and achieves a 0.3% improvement in the SI setting. We hypothesize that the extra unlabeled hand data provides a richer set of examples than do the geometric transformations of the augmented data. Effect of beam width: We analyze the influence of beam width on error rates, shown in Figure 6. Beam search is important in the SD setting. In this setting, the main errors are substitutions among similar letter handshapes (like e and o), as seen from the confusion matrix in Figure 5. Using a wider beam can help catch such near-miss errors. However, in the SI and SA settings, there are much more extreme differences between the predicted and ground-truth words, evidenced by the large number of deletion errors in Figure 5. Therefore it is hard to increase accuracy through beam search. Some examples of predicted words are listed in Table 2. SD SI B=1 B=3 B=5 Ground-truth FIRSWIUO FIREWIUE FIREWIRE FIREWIRE NOTEBEEK NOTEBOOK NOTEBOOK NOTEBOOK AAQANNIS AOQAMIT AOQUNIR TANZANIA POPLDCE POPULCE POPULOE SPRUCE Table 2. Example outputs with different beam sizes in signerdependent and signer-independent settings. Fig. 6. Letter error rate (%) with different beam widths in signer-dependent (SD), signer-independent (SI) and signeradapted (SA) settings. end-to-end models consistently improve accuracy in signerindependent and signer-adapted settings, and the use of external unlabeled data further slightly improves the results. Although our model does not improve over the best previous (SCRF-based) approach in the signer-dependent case, this prior work required frame labels for training while our approach does not. Future work includes collecting data “in the wild” (online) and harvesting even more unlabeled data. 5. CONCLUSION We have introduced an end-to-end model for ASL fingerspelling recognition that jointly learns an auto-encoder based feature extractor and an RNN encoder-decoder for sequence prediction. The auto-encoder module enables us to use unlabeled data to augment feature learning. We find that these Acknowledgements We are grateful to Greg Shakhnarovich and Hao Tang for helpful suggestions and discussions. This research was funded by NSF grant 1433485. 6. REFERENCES [1] C. Padden and D. C. Gunsauls, “How the alphabet came to be used in a sign language,” Sign Language Studies, vol. 4, no. 1, pp. 10–33, 2003. [2] T. Kim, J. Keane, W. Wang, H. Tang, J. Riggle, G. Shakhnarovich, D. Brentari, and K. Livescu, “Lexicon-free fingerspelling recognition from video: data, models, and signer adaptation,” Computer Speech and Language, pp. 209–232, November 2017. [3] T. Starner, J. Weaver, and A. Pentland, “Real-time American Sign Language recognition using desk and wearable computer based video,” IEEE Transactions on Pattern Analysis and Machine Intelligence, 20(12) 1998. [4] C. Vogler and D. Metaxas, “Parallel hidden Markov models for American Sign Language recognition,” in ICCV, 1999. [5] K. Grobel and M. Assan, “Isolated sign language recognition using hidden Markov models,” in International Conference on System Man and Cybernetics, 1997. [6] P. Dreuw, D. Rybach, T. Deselaers, M. Zahedi, and H. Ney, “Speech recognition techniques for a sign language recognition system,” in Interspeech, 2007. [7] O. Koller, J. Forster, and H. Ney, “Continuous sign language recognition: Towards large vocabulary statistical recognition systems handling multiple signers,” Computer Vision and Image Understanding, vol. 141, pp. 108–125, 2015. [8] F. Jens, S. Christoph, H. Thomas, K. Oscar, Z. Uwe, P. Justus, and N. Hermann, “RWTH-PHOENIXWeather: A large vocabulary sign language recognition and translation corpus,” Language Resources and Evaluation, pp. 3785–3789, 2012. Representation and Processing of Sign Language: Interactions between Corpus and Lexicon, 2012. [12] “American Sign Language Lexicon Video Dataset,” http://www.bu.edu/av/asllrp/dai-asllvd.html. [13] P. Goh and E.-J. Holden, “Dynamic fingerspelling recognition using geometric and motion features,” in ICIP, 2006. [14] S. Liwicki and M. Everingham, “Automatic recognition of fingerspelled words in British Sign Language,” in 2nd IEEE workshop on CVPR for Human Communicative Behavior Analysis, 2009. [15] S. Ricco and C. Tomasi, “Fingerspelling recognition through classification of letter-to-letter transitions,” in ACCV, 2009. [16] T. Kim, G. Shakhnarovich, and K. Livescu, “Fingerspelling recognition with semi-Markov conditional random fields,” in ICCV, 2013. [17] T. Kim, W. Wang, H. Tang, and K. Livescu, “Signerindependent fingerspelling recognition with deep neural network adaptation,” in ICASSP, 2016. [18] N. Dalal and B. Triggs, “Histogram of oriented gradients for human detection,” in CVPR, 2005. [19] W. Chan, N. Jaitly, Q. V. Le, and O. Vinyals, “Listen, Attend and Spell: A neural network for large vocabulary conversational speech recognition,” in ICASSP, 2016. [20] D. Bahdanau, K. Cho, and Y. Bengio, “Neural machine translation by jointly learning to align and translate,” in ICLR, 2015. [21] P. Baldi, “Auto-encoders, unsupervised learning and deep architectures,” in International Conference on Unsupervised and Transfer Learning Workshop, 2011. [9] J. Forster, C. Schmidt, O. Koller, M. Bellgardt, and H. Ney, “Extensions of the sign language recognition and translation corpus RWTH-PHOENIX-Weather,” Computer Vision and Image Understanding, vol. 141, pp. 108–125, 12 2015. [22] V. Pascal, H. Larochelle, I. Lajoie, Y. Bengio, and P.A. Manzagol, “Stacked denoising autoencoders: Learning useful representations in a deep network with a local denoising criterion,” Journal of Machine Learning Research, vol. 11, Dec. 2010. [10] V. Athitsos, C. Neidle, S. Sclaroff, J. Nash, A. Stefan, A. Thangali, H. Wang, and Q. Yuan, “Large lexicon project: American sign language video corpus and sign language indexing/retrieval algorithms,” in Workshop on the Representation and Processing of Sign Languages: Corpora and Sign Language Technologies, 2010. [23] D. P Kingma and M. Welling, “Auto-encoding variational Bayes,” in ICLR, 2014. [11] C. Neidle and C. Vogler, “A new web interface to facilitate access to corpora: Development of the ASLLRP data access interface (DAI),” in LREC Workshop on the [25] S. Hochreiter and J. Schmidhüber, “Long Short-Term Memory,” Neural Computation, vol. 9, pp. 1735–1780, Nov. 1997. [24] D. J. Rezende, S. Mohamed, and D Wierstra, “Stochastic backpropagation and approximate inference in deep generative models,” in ICML, 2014. [26] O. Vinyals, Ł. Kaiser, T. Koo, S. Petrov, I. Sutskever, and G. Hinton, “Grammar as a foreign language,” in NIPS 28, pp. 2773–2781. 2015. [27] N. Pugeault and R. Bowden, “Spelling it out: Real-time asl fingerspelling recognition,” in Proceedings of the 1st IEEE Workshop on Consumer Depth Cameras for Computer Vision, jointly with ICCV, 2011. [28] T.-K. Kim and R. Cipolla, “Canonical correlation analysis of video volume tensors for action categorization and detection,” IEEE Transactions on Pattern Analysis and Machine Intelligence, pp. 1415–1428, 31(8) 2009. [29] X. Glorot and Y. Bengio, “Understanding the difficulty of training deep feedforward neural networks,” in AISTATS, 2010. [30] D. P. Kingma and J. L. Ba, “ADAM: A method for stochastic optimization,” in ICLR, 2015. [31] Vinod Nair and Geoffrey E Hinton, “Rectified linear units improve restricted Boltzmann machines,” in ICML, 2010. [32] L. van der Maaten and G. E. Hinton, “Visualizing highdimensional data using t-SNE,” Journal of Machine Learning Research, vol. 9, pp. 2579–2605, 2008. [33] A. G. Howard, “Some improvements on deep convolutional neural network based image classification,” in CoRR, 2013.
1cs.CV
arXiv:1709.09640v1 [math.AC] 27 Sep 2017 AN ALTERNATIVE APPROACH TO THE CONCEPT OF SEPARABILITY IN GALOIS THEORY M. G. MAHMOUDI Abstract. The notion of a separable extension is an important concept in Galois theory. Traditionally, this concept is introduced using the minimal polynomial and the formal derivative. In this work, we present an alternative approach to this classical concept. Based on our approach, we will give new proofs of some basic results about separable extensions (such as the existence of the separable closure, Theorem of the primitive element and the transitivity of separability). Key words: separable extension, Galois theory. Mathematics Subject Classification: 12F10, 12F05, 12F15. Introduction In most elementary textbooks on Galois theory, separable extensions are usually introduced via the minimal polynomial: an algebraic extension E/K is separable if the minimal polynomial f (X) ∈ K[X] of every element α ∈ E has nonzero formal derivative, or equivalently f (X) has distinct roots in its splitting field or any algebraically closed field Ω containing E. For normal extensions, there is a more functorial definition: a field extension E/K is normal if there is a unique K-algebra embedding of E into Ω (see [1, Ch. 6]). It would be interesting to know if there exists an analogous definition for separable extensions. The aim of this work is to address this question. There exist already some methods to introduce separable extensions using the embeddings of E/K into an algebraic closure Ω of E (note that every algebraic closure of K is isomorphic to an algebraic closure of E). Let HomK (E, Ω) denote the set of all K-algebra homomorphisms from E into Ω. On can show that an extension E/K of finite degree is separable if and only if |HomK (E, Ω)| = [E : K] (see [1, Ch. 7]). There is another criterion (see [2, Ch. V., §15, n. 6]) as follows: E/K is separable if and only if for every linearly independent elements 1 2 M. G. MAHMOUDI a1 , · · · , an ∈ E over K, there exist K-automorphisms σ1 , · · · , σn of Ω such that det(σi (aj )) 6= 0. These properties are very useful characterization of separable extensions, but applying them are generally less easy. We suggest using the following alternative definition of separability: Definition. We say that an element α of algebraic field extension E/K is separable if for every intermediate subfield L of E/K with α ∈ E\L, there exist two L-algebra homomorphisms φ, ψ : E → Ω such that φ(α) 6= ψ(α). An algebraic extension E/K is called separable if all its elements are separable. Other equivalent conditions will be given in Corollary 1.3 and Corollary 1.5. Roughly speaking, this definition says that L and α can be separated by the homomorphisms from E into Ω. First, we show that the above definition is equivalent to the usual concept of separability. Then, we give new proofs of some basic results about separable extensions (such as the existence of the separable closure, Theorem of the primitive element and the transitivity of separability) based on this approach. We hope that our approach provides a useful insight into the concept of separability. 1. Alternative definition of separability We recall the following standard facts about the embeddings of a algebraic extension into an algebraically closed field (for the proof see [1, p. 53 and p. 67]). Theorem 1.1. (a) (Tower formula for the number of embeddings) Let E/K be a field extension of finite degree with an intermediate subfield L. Let Ω be an algebraic closure of E. Then |HomK (E, Ω)| = |HomL (E, Ω)| × |HomK (L, Ω)|, in particular |HomK (E, Ω)| 6 [E : K]. (b) (Extending field embeddings) Let L/F be an algebraic extension of fields. Then every field embedding from F into an algebraically closed field Ω can be extended to a one from L to Ω. Proposition 1.2. Let E/K be an extension of fields and α ∈ E. Let Ω be the algebraic closure of E. The following statements are equivalent: (i) The minimal polynomial of α over K has distinct roots in Ω. (ii) For every intermediate subfield L of E/K with α ∈ E\L, there exist L-algebra homomorphisms φ, ψ : E → Ω such that φ(α) 6= ψ(α). (iii) For every intermediate subfield L of K(α)/K with α ∈ K(α)\L, AN ALTERNATIVE APPROACH TO THE CONCEPT OF SEPARABILITY 3 there exist two L-algebra homomorphisms φ, ψ : E → Ω such that φ(α) 6= ψ(α). Proof. (i) ⇒ (ii) The minimal polynomial of α over L has distinct roots in Ω, so L(α) has distinct L-embeddings into Ω. (ii) ⇒ (iii) is immediate. (iii) ⇒ (i) Let f (X) ∈ K[X] be the minimal polynomial of α. If the minimal polynomial of α over K does not have distinct roots in Ω, then K is of characteristic p > 0 and there exists n > 1 n such that f (X) = g(X p ) where g(X) ∈ K[X] has nonzero formal n derivative. Take L = K(αp ). Note that α ∈ K(α)\L, otherwise α would satisfy in a polynomial of degree less than deg f (x). Since n αp ∈ L, we have φ(α) = ψ(α) for every L-algebra homomorphism φ, ψ : E → Ω, contradiction.  The above equivalence, in particular shows that the definition of separability given in (ii), which at first seems relative, does not depend on E. Thus, if E and E ′ are two algebraic field extension of K containing α, then α is separable as an element of E then it is separable as an element of E ′ . Also, if K ⊂ L ⊂ E and α ∈ E is separable over K, then it is separable over L. Corollary 1.3. Let E/K be a separable extension with intermediate subfields L1 and L2 . The following conditions are equivalents: (i) L1 ⊂ L2 . (ii) For every φ, ψ ∈ HomK (E, Ω), φ|L2 = ψ|L2 implies φ|L1 = ψ|L1 . Conversely if (i) and (ii) are equivalents for every L1 and L2 then E/K is separable. Proof. (ii) ⇒ (i): If L1 6⊂ L2 , consider an element α ∈ L1 \L2 , then there exists φ, ψ ∈ HomL2 (E, Ω) with φ(α) 6= ψ(α). This contradicts (ii). The implication (i) ⇒ (ii) is evident. Conversely suppose that L is an intermediate subfield and α ∈ E\L. If there exist no φ, ψ ∈ HomL (E, Ω) with φ(α) 6= ψ(α), then by taking L1 = K(α) and L2 = L, the equivalence of (i) and (ii) implies that K(α) ⊂ L, contradiction.  Corollary 1.4. Let E/K be a separable extension and let α, β ∈ E. The following conditions are equivalent: (i) α ∈ K(β). (ii) For every φ, ψ ∈ HomK (E, Ω), φ(β) = ψ(β) implies φ(α) = ψ(α). As a consequence we obtain Corollary 1.5. An algebraic field extension E/K is separable if and only if for every proper intermediate subfield L of E/K, |HomL (E, Ω)| > 1. 4 M. G. MAHMOUDI Proof. Consider an element α ∈ E\L. As E/K is separable, there exists φ, ψ ∈ HomL (E, Ω) such that φ(α) 6= ψ(α), hence |HomL (E, Ω)| > 1. Conversely, suppose that |HomL (E, Ω)| > 1 for every intermediate subfield L. Consider an element α ∈ E\L. We show that there exist φ, ψ ∈ HomL (E, Ω) such that φ(α) 6= ψ(α). If it is not the case, by taking L2 = L and L1 = K(α), Corollary 1.3 implies that K(α) ⊂ L, contradiction.  2. Some applications Theorem 2.1 (Primitive Element Theorem). Let E/K be a separable field extension of finite degree. Then there exists an element α ∈ E such that E = K(α). Proof. For finite fields, we follow the standard argument. If K is a field with q elements and |E| = q n , then we have |L| 6 q n−1 for every proper intermediate subfield L of E/K, hence every element x ∈ E satisfies n−1 xq − x = 0. Since |E| > q n−1 , there exists certainly an element n−1 α ∈ E with αq − α 6= 0, this element is not included in any proper subfield, hence K(α) = E. Now consider the case where K is infinite. Let α, β ∈ E. It suffices to prove that there exists γ ∈ E such that α, β ∈ K(γ). We may assume that α and β are linearly independent over K. Let P be the plane spanned by α and β. If our claim is not true then for every nonzero γ ∈ P , K(γ) ∩ P is one dimensional over K. Since K is infinite, there exists an infinite number of pairwise noncolinear elements γ1 , γ2, · · · ∈ P . It follows that γi 6∈ K(γj ) if i 6= j. By Corollary 1.3, there exist φij , ψij ∈ HomK (E, Ω) such that φij |K(γi ) = ψij |K(γi ) but φij |K(γj ) 6= ψij |K(γj ) . As HomK (E, Ω) is finite, there exist distinct i, j, k such that φji = φki and ψji = ψki . We obtain φki (γj ) = φji (γj ) = ψji (γj ) = ψki (γj ), on the other hand φki (γk ) = ψki (γk ), so φki |P = ψki |P , contradiction.  Corollary 2.2. If E/K is a separable extension of finite degree then |HomK (E, Ω)| = [E : K]. Conversely if |HomK (E, Ω)| = [E : K] then E/K is separable. In particular if α ∈ E is separable over K then the extension K(α)/K is separable. Proof. Suppose that [E : K] = n. By Theorem 2.1, there exists α ∈ E with E = K(α). As α is separable over F , the minimal polynomial f (x) ∈ K[x] of α has n distinct roots α1 , · · · , αn ∈ Ω. For every i = 1, · · · , n we can define a map φi ∈ Hom(E, Ω) by φi (α) = αi . AN ALTERNATIVE APPROACH TO THE CONCEPT OF SEPARABILITY 5 Conversely for every φ ∈ HomK (E, Ω), φ(α) is necessarily equal to one of the elements α1 , · · · , αn . Conversely, suppose that |HomK (E, Ω)| = [E : K]. We have to show that E/K is separable. Otherwise, by Corollary 1.5, there exists a proper intermediate subfield L such that |HomL (E, Ω)| = 1. Thus we have |HomK (E, Ω)| = |HomK (L, Ω)|×|HomL (E, Ω)| = |HomK (L, Ω)| 6 [L : K] < n, contradiction.  Proposition 2.3. Let E/K be an algebraic extension. Then the set of separable elements of E/K form an intermediate subfield. Proof. It suffices to prove that for every separable elements α, β ∈ E, α + β and αβ is separable. We may assume that αβ 6= 0. For an intermediate subfield L with α + β 6∈ L, we should prove that there exists two maps in HomL (E, Ω) whose values on α + β are different. If α ∈ L, then by separability of β there exists φ, ψ ∈ HomL (E, Ω) with φ(β) 6= ψ(β), hence φ(α + β) 6= ψ(α + β). We may then assume that α, β 6∈ L. If α 6∈ L(β), then by separability of α, there exist φ, ψ ∈ HomL(β) (E, Ω) ⊆ HomL (E, Ω) with φ(α) 6= ψ(α) and we obtain φ(α + β) 6= ψ(α + β). So assume that α ∈ L(β). As β is separable over K, it is also separable over L, hence by Corollary 2.2 every element of L(β) is separable over L, in particular α + β is separable over L. Hence |HomL (L(α+β), Ω)| > 1 and there exist φ, ψ ∈ HomL (L(α+β), Ω) with φ(α + β) 6= ψ(α + β), φ and ψ can be extended to φ̄, ψ̄ ∈ HomL (E, Ω) and we are done. The proof for αβ is similar.  Corollary 2.4. Let E/L and L/K be algebraic separable extensions. Then E/K is separable as well. Proof. Let M be an intermediate subfield of E/K and α ∈ E\M. We should prove the existence of two homomorphisms φ, ψ ∈ HomM (E, Ω) with φ(α) 6= ψ(α). If α 6∈ LM, then by the separability of E/L, there exist φ, ψ ∈ HomLM (E, Ω) ⊂ HomM (E, Ω) with φ(α) 6= ψ(α) and we are done. Consider the case where, α ∈ LM. As all elements of L are separable over K, then by Proposition 2.3, LM/M is separable. There exist so two homomorphisms φ, ψ ∈ HomM (LM, Ω) with φ(α) 6= ψ(α). These homomorphisms can be extended to homomorphisms in HomM (E, Ω).  References [1] Lorenz, F., “Algebra. Vol. 1. Fields and Galois theory”, Translated from the 1987 German edition by Silvio Levy. With the collaboration of Levy. Universitext. Springer, New York, 2006. 6 M. G. MAHMOUDI [2] Bourbaki, N., “Éléments de mathématique, Algèbre, Chapitres 4-7”, Springer, Berlin-Heidelberg-New York, Reprint of the 1981 original, 2007. M. G. Mahmoudi, [email protected], Department of Mathematical Sciences, Sharif University of Technology, P. O. Box 11155-9415, Tehran, Iran.
0math.AC
MATRIX TILE ANALYSIS Inmar Givoni, Vincent Cheung, Brendan J. Frey Probabilistic and Statistical Inference Group University of Toronto 10 King’s College Road, Toronto, Ontario, Canada, M5S 3G4 Abstract Many tasks require finding groups of elements in a matrix of numbers, symbols or class likelihoods. One approach is to use efficient bi- or tri-linear factorization techniques including PCA, ICA, sparse matrix factorization and plaid analysis. These techniques are not appropriate when addition and multiplication of matrix elements are not sensibly defined. More directly, methods like biclustering can be used to classify matrix elements, but these methods make the overlyrestrictive assumption that the class of each element is a function of a row class and a column class. We introduce a general computational problem, ‘matrix tile analysis’ (MTA), which consists of decomposing a matrix into a set of non-overlapping tiles, each of which is defined by a subset of usually nonadjacent rows and columns. MTA does not require an algebra for combining tiles, but must search over an exponential number of discrete combinations of tile assignments. We describe a loopy BP (sum-product) algorithm and an ICM algorithm for performing MTA. We compare the effectiveness of these methods to PCA and the plaid method on hundreds of randomly generated tasks. Using doublegene-knockout data, we show that MTA finds groups of interacting yeast genes that have biologically-related functions. 1 INTRODUCTION A variety of data types are most naturally represented as matrices of numbers, symbols, or, after preprocessing, class likelihoods. For example, the viability of a yeast strain obtained by knocking out two genes can be compared to normal viability to obtain MTA Figure 1: To illustrate matrix tile analysis, we show a binary data matrix (left), and after applying MTA, the same matrix as a collection of tiles (right), having reordered rows and columns to better reveal the tiles. Each tile is described by a subset of rows and columns. Different tiles may not overlap. Each element is colored according to its tile index. an ‘abnormal growth likelihood’ associated with the pair of genes. Many such double-gene-knockout experiments can be used to construct a matrix of likelihoods (Tong et al. 2004). In collaborative filtering (Resnick et al. 1994) the matrix rows correspond to clients and the columns correspond to, say, movies that clients are potentially interested in watching. An observed element of the data matrix contains information regarding a preference indicated by the corresponding client for the corresponding movie. Two approaches to analyzing an N × M data matrix X include matrix factorization methods and combined row-column clustering techniques. Matrix factorization methods are only appropriate when a sensible algebra (addition and multiplication) can be defined for the data elements. If X contains real numbers, regular addition and multiplication are assumed to be sensible, often without convincing justification. If X contains non-ordinal discrete variables or likelihood functions, there often does not exist a sensible algebra for the elements. Assuming an algebra can be defined, matrix factorization methods find factorizations of the form X ≈ U SV , where S is a diagonal matrix, U is an N ×J matrix and V is a J × M matrix. Different factorization methods enforce different types of constraints on the matrices such as orthonormality of U ’s columns and V ’s rows (PCA, Jolliffe 1986), non-negativity of U, S, V (non-negative matrix factorization, Lee & Seung 1999), and allowing J, the size of the subspace the data is projected onto, to be large while requiring sparse solutions (ICA, Bell & Sejnowski 1995, sparse matrix factorization, Dueck et al. 2005) or low-norm solutions (maximum-margin matrix factorization, Srebro et al. 2005). data as a collection of non-overlapping tiles. We formulate MTA as a probabilistic model and present two different algorithms that approximately maximize the joint probability as well as two standard algorithms (the plaid method and PCA) which can be modified to find tiles, and compare the performance of all methods on synthetic data. We use MTA and hierarchical agglomerative clustering to find biologically relevant groupings in the yeast genetic interaction data, and show that MTA finds more biologically informative groups, thus demonstrating the applicability and usefulness of this method. Combined row-column clustering techniques classify data elements, instead of finding algebraic decompositions. One approach is to independently cluster the rows and columns (Eisen et al. 1999), but this ignores dependencies between the two clustering problems. In bi-clustering (Cheng & Church 2000), each column has a class label and each row has a class label so that the class of each data element is given by joint row-column class labels. So, if there are nc possible classes for the columns and nr possible classes for the rows, each element can be in one of nc nr classes. While this approach can account for dependencies in the row clustering and column clustering problems, it makes the overly-restrictive assumption that the class of each element is a function of a row class and a column class, resulting in clusters defined by common row and column boundaries. Row classes whose associated elements show similar interaction patterns to a subset of column classes are not grouped, though they correspond to a block of data composed of several identified smaller blocks. This restriction also applies to stochastic block models and their extensions, used mainly for the analysis of relational data (Airoldi et al. 2005). In MTA, an N × M data matrix X is modelled as a set of non-overlapping regions, or tiles. The order of the rows and columns that is most appropriate for revealing a specific tile by grouping its elements into a contiguous rectangular block may be inappropriate for another tile. Thus, visually each tile is associated with a different permutation of the rows and columns that groups its elements. For example, the binary data in Fig. 1 is rearranged and colored to expose the tile structure of the data. Only one tile is fully contiguous for this particular permutation. The data elements in each tile are accounted for by class-conditional probabilities and data that does not appear in any tile is accounted for by a background model. Unlike biclustering, MTA does not require that the tiles are defined by a common set of row and column boundaries. In fact, MTA allows an arbitrary subset of rows and columns to be assigned to each tile, subject to the constraint that two tiles cannot own the same elements. Like matrix factorization techniques, MTA can be thought of as factorizing the input matrix into multiple components or tiles. However, because every element belongs to only one tile, it is not required that a sensible algebra be defined to combine elements from different tiles. In this way, MTA can be applied when sensible notions of addition and multiplication are not available. Finally, MTA can be formulated as a problem of finding tiles, given tile-conditional likelihoods as input, i.e., the analysis method does not need the original data as input. Another approach to combined row-column clustering is to apply a matrix factorization technique, and then binarize the output. After applying PCA, the elements of U and V can be binarized by applying a threshold and the binary patterns in U and V can be used to define classes. The plaid model (Lazzeroni & Owen 2002) finds a decomposition of the same form X ≈ U SV described above, but the elements of U and V are regularized toward the values 0 or 1 during optimization. While the method of quantizing the output of a matrix factorization technique provides an often computationally efficient solution to joint row-column clustering, selection of thresholds is not straightforward and the technique does not directly optimize a cluster model. We introduce a new computational approach that we call ‘matrix tile analysis’ (MTA), which explains the 2 MATRIX TILE ANALYSIS In a model with T tiles, we denote the index of a particular tile by t. We use binary random variables rit to indicate the rows of matrix elements belonging to the tile, i.e., rit = 1 indicates that the ith row of X contains elements belonging to tile t, and rit = 0 indicates that none of the elements in the ith row of X belong to tile t, where i = 1 . . . N . Similarly, binary random variables ctj indicate those columns containing elements belonging to tile t, where j = 1 . . . M . The outer t > t t product (r1t , r2t , . . . , rN ) (c1 , c2 , . . . , ctM ) is an N × M Tile 1 binary matrix indicating those elements belonging to tile t. In total, the hidden variables describing the tile analysis include T , R = {rit | i = 1 . . . N, t = 1 . . . T } and C = {ctj | j = 1 . . . M, t = 1 . . . T }. Each tile has a user-defined likelihood specifying the probability of membership of elements in X to that tile. We denote the N × M matrix of likelihoods corresponding to tile t by Lt . That is, `tij = P (xij |tile t). To account for elements not placed in tiles, we use L0 to denote the likelihood matrix corresponding to the background model. These likelihood matrices are the input to MTA and are pre-computed depending on the task at hand. For example, if the data matrix is binary-valued and has symmetric noise with probability ², then `tij = (1 − ²)xij ²1−xij . In this paper, we address the computational task of identifying tiles, assuming the input likelihood matrices can be pre-computed. In the rest of the paper we address the case of a single likelihood model for all tiles, though our model easily extends to the general case of t likelihood matrices. The overall data likelihood is P (X|R, C, T ) = N Y M Y PT (`ij ) t t t=1 ri cj PT (`0ij )(1− t t t=1 ri cj ) . (1) i=1 j=1 We assume that given T , R and C are uniformly distributed over all non-overlapping tile configurations1 : P (R, C|T ) = N M T i X 1 Y Yh 0≤ rit ctj ≤ 1 . h(T ) i=1 j=1 t=1 (2) where h(T ) is used to normalize the distribution. The minimum number of tiles is T = 0 and the maximum number of tiles is T = N M , in which case there is one tile for every data element. The distribution of T can be specified depending on the application, but in this paper, we assume a uniform distribution: P (T ) = 1/(N M + 1), T ∈ {0, . . . , N M }. The probability of the number of tiles, the rows and columns in every tile, and the data is P (X, R, C, T ) = P (T )P (R, C|T )P (X|R, C, T ). (3) The goal of MTA is to infer the values of T , R and C, i.e., compute argmaxT,R,C P (X, R, C, T ). We describe four different approaches for inferring R and C, where T is automatically selected using an MDL framework. 1 Square brackets are used in the fashion of Iverson’s notation, where [true] = 1 and [f alse] = 0 c11 1 1 r 1 2 f111 Tile T c12 c1M c1T T 1 cMT r 1 s11 f121 1 s12 1 f1M s11M T 2 r rN1 c2T f11T T s11 f12T T s12 f1TM s1TM r f211 fN11 s121 s1N 1 f111 rNT s 1NM g N1 f21T fNT1 T s 21 s TN 1 T fNM s TNM g NM Figure 2: Factor graph for MTA 3 3.1 MTA INFERENCE SUM-PRODUCT ALGORITHM Based on the data model detailed in equations (1-3), we describe a probabilistic graphical model for the matrix tile analysis problem. The model is shown in Fig. 2, using the standard notation for factor graphs (Kschischang et al. 2001). In order for the model to fully describe the constraints requiring tile elements to be non-overlapping, we introduce an additional set of binary random variables, stij whose purpose is to restrict each matrix element to belong to one tile at the most. The stij nodes indicate whether matrix element xij is accounted for by tile t. The rit nodes are binary random variables that indicate whether row i of the data matrix contains elements which belong to tile t. Likewise, node ctj is an indicator which is active when column j of the data matrix contains elements belonging to tile t. Each triplet of nodes (stij ,rit ,ctj ) is connected to a funct tion node denoted by fij , and the function calculated at the node is defined as f tij (stij , rit , ctj ) =   1 if (stij = rit = ctj = 1) or (stij = 0 and (rit = 0 or ctj = 0));  0 otherwise. (4) This function node connects elements within the same tile, and enforces the constraint that if a matrix element xij is accounted for by tile t (as indicated by variable stij having a value of 1), then the corresponding row and column indicators must be active. If an element xij is not accounted for by tile t, then either the row indicator, or the column indicator, or both must be inactive. For a specific matrix element xij , the corresponding s- variables s1ij , s2ij , . . . , sTij are connected to the function node gij (shown in Fig. 2 only for matrix element xN 1 and xN M for clarity). This function bridges together s-variable nodes from different tiles to enforce the constraint that each matrix element xij is accounted for by a single tile at most, as well as to account for the likelihood of xij . following updates for propagation: µgij →stij µfijt →rit µrit →fijt g ij (s1ij , s2ij , . . . , sTij ) =   `ij if stij = 1, skij = 0 ∀k 6= t; `0 if stij = 0 ∀t;  ij 0 otherwise, = = = − log log ³ `0 ij `ij + X ´ exp{µfijk →skij } (7) k6=t ³ exp{µct →f t + µgij →st } + 1 ´ j ij ij X exp{µctj →fijt } + 1 t →r t µfik i k6=j (5) µfijt →ctj µctj →fijt = = log ³ exp{µrt →f t + µgij →st } + 1 ´ ij ij i X exp{µrit →fijt } + 1 t →ct µfkj j k6=i µfijt →stij where t = 1 . . . T, k = 1 . . . T . When the constraint is satisfied, so that only one tile accounts for the element, the function evaluates to the likelihood of that element under the model. If no tile accounts for the element, the function evaluates to the likelihood of the background model. The overall data likelihood as represented in the factor graph is P (X|T, R, C, S) = T N Y M ³ ´ Y Y t (stij , rit , ctj ) , fij gij (s1ij , .., sTij ) i=1 j=1 (6) t=1 where S = {stij | i = 1 . . . N, j = 1 . . . M, t = 1 . . . T }. In order to solve the MTA problem we infer (R, C, S) for a set of T tiles, by applying the sum-product algorithm (SP-MTA) on the factor graph shown in Fig. 2. Messages between nodes are sent as log probability ratios, as they contain all information needed to reconstruct the probability of the binary variable nodes, and they present an efficient implementation which is also robust to extreme probability swings2 . Denoting by µf →x a message sent from a function node f to a variable node x and µx→f as the message sent from a variable node to a function node, we obtain the p(x=1) Letting the message π be equal to log for some log p(x=0) random variable x, we reconstruct the two probabilities exp π from the message as p(x = 1) = 1+exp and p(x = 0) = π 1 ) 1+exp π 2 = µctj →fijt + µrit →fijt − ¡ ¢ log exp{µctj →fijt } + exp{µrit →fijt } + 1 , and we use the fact that µstij →fijt = µgij →stij and µstij →gij = µfijt →stij . Since the factor graph described in Fig. 2 contains many cycles, the algorithm is used within the loopy belief propagation framework (LBP). There is no known criteria to distinguish among instances of LBP which converge and those who do not. However, there are many examples of well known problems for which LBP converges, and empirically we observe it is also the case for MTA. Upon termination, we infer R and C by fusing all the incoming messages µfitt →rit and µftjt →ctj at each rit and ctj nodes respectively, and applying a threshold to obtain the desired binary values. Convergence was determined by evaluating the relative change in the values of the messages arriving from the tile element nodes stij to function nodes gij after each of the possible messages has been calculated and sent once.3 Message scheduling and initialization was found to be important for the algorithm to find good solutions. The messages are processed for each tile consecutively. Within each tile, messages are sent according to the order they are presented in (7). All messages were initialized to be zero in the log domain, except for the messages from matrix element nodes stij to the external function nodes gij , which were the first messages to be propagated, and were set to −∞, indicating that initially, matrix elements are not claimed by any tile. Incremental thresholding of the messages was also found to aid in convergence to stable solutions. 3 Convergence µk+1 t →st | fij ij < 1 × 10 the iteration. was −3 · declared P if k t →st |, i,j,t |µfij ij P i,j,t |µkf t t ij →sij − where k indicates 3.2 ICM An approximate algorithm for maximizing the joint probability in (3) is Iterative Conditional Modes (MTA-ICM). To maximize P (X, R, C, T ), or equivalently, log P (X, R, C, T ), we alternate between updating the rows and columns of the tiles, leading to an iterative algorithm with the following updates: {ri1 , . . . , riT } ³X t,j ← argmax{ri1 ,...,riT } i´ X h X `ij rit ctj = 1 (8) log 0 ≤ rit ctj (log 0 ) + `ij t j {c1i , . . . , cTi } ³X t,i ← argmax{c1i ,...,cTi } i´ X h X `ij ctj rit (log 0 ) + rit ctj = 1 . log 0 ≤ `ij t i (9) The constraints are enforced via the last sums in (8) and (9). The “gain” over the base model P by¡ including row i in tile t can be defined as git = j ctj log(`ij ) − ¢ log(`0ij ) . For row i, the gain can be computed for each tile independently and the joint probability is optimized for choosing binary values for {ri1 , . . . , riT } that both maximize the sum of the gains and satisfy the constraints. While only tiles with positive gains need to be considered, an exhaustive search still requires exponential time over the number of tiles with positive gains. The search can be reduced by only searching over configurations that satisfy the constraints. Let D be a T ×T matrix, where Duv is 1 if row i can be in both tiles u and v (riu = riv = 1) without violating the constraints, i.e. tiles u and v do not contain the same column (cuj cvj = 0 ∀ j), and 0 otherwise. D £ ¤ can be written as D = CC 0 = 0 where Iverson’s notation is applied element-wise on the matrix. The search space of tiles which can contain the same row while satisfying the constraints, is then reduced to the cliques of the graph with D as its adjacency matrix. A generous upper bound on the number of cliques that need to be evaluated is O(2T ). In practice, due to the interplay between rows and columns, the search space is significantly restricted. The same procedure can be performed to optimize the columns. 4 EXPERIMENTAL EVALUATION We compared MTA-SP and MTA-ICM to two additional methods that can be used to discover tiles. The plaid model (Lazzeroni & Owen, 2002) finds overlapping tiles, or ‘layers’ in the data one at a time, in a greedy fashion so that each consecutive tile t is searched for in the residual left over from the previous t − 1 tiles. For each tile, we determined whether it accounted for the background model or for the data and evaluated it accordingly. Another approach to MTA is to quantize the output of a matrix factorization technique. We experimented with a technique based on PCA (Jolliffe 1986).4 4.1 SYNTHETIC DATA For the purpose of evaluating the different techniques we generated ∼2000 synthetic data matrices of various sizes, each containing several tiles with varying tile dimensions. We analyzed the matrices using MTA-SP, MTA-ICM, the plaid method, and PCA, and evaluated their ability to correctly identify tiles. Each matrix in the data set is an N × N matrix, with N = 40, 70, 100, 150, 200. The number of tiles in each matrix ranges from 1 to 10. The average area of the tile is held constant across all the matrices and each tile covers approximately 4% of the data matrix. The tiles were randomly generated, subject to the constraint that two tiles cannot contain the same matrix element. The data was corrupted with additive Gaussian noise with log10 (σ 2 ) =-1.5, -1.0,-0.8,-0.675,-0.55,0.425, and -0.3. Fig. 1 shows an example of a data matrix before adding noise, and shows a possible solution for the data after applying MTA to the corrupted data (not shown), where rows and columns have been reordered based on the analysis output to reveal the tiles. For each setting of matrix size, number of tiles, and noise level, we generated 20 different matrices, on which we tested the performance of all algorithms, except the plaid method which was only tested between 1-10 times for each setting due to the user intensive nature of the plaid software5 and its inability to run in batch mode. The input to the algorithms was set to be the log likelihood ratio of each element being in a tile versus being part of the background, calculated by assuming a 4 To find T tiles, the N × N covariance matrix of the columns of X is computed and its T principal components are extracted (this procedure can arbitrarily be applied to the rows instead of the columns). Since each principal component corresponds to a major direction of variation across the columns, the values in each component provide evidence for the rows belonging to a corresponding tile. For each component, the rows belonging to the tile are identified by comparing the elements in the component to a threshold. To obtain maximum separation of values in the two groups, the threshold is selected so as to minimize the derivative of the cumulative distribution of the elements. Each component is thresholded separately to produce a set of T binary vectors, each corresponding to a tile. Next, each column of the data matrix is robustly projected onto these vectors using a pseudo-inverse to account for non-orthogonalities introduced by thresholding. This yields a set of T real numbers for each row of data, which are thresholded to determine the set of tiles that the row belongs to. 5 www-stat.stanford.edu/∼owen/clickwrap/plaid.html normal distribution and fixing the standard deviation to 0.5 regardless of the true noise level. Additionally PCA and the plaid method take as input the noisy data matrix. The output of each algorithm is an integer value matrix where 0 indicates an element is part of the background model, and non-zero values indicate the tile index. Model selection (i.e. determining the correct number of tiles) was performed by evaluating the following cost function t,i,j rit ctj `0ij X log − log `0ij + T (N + M ) log 2. (10) `ij i,j The cost function is the minimum description length (MDL) for coding the model, assuming the distribution over the row and column indicator variables is uniform (which is strictly not true because of the term 1 h(T ) in (2)). The number of tiles T the algorithm was allowed to discover was incremented until it incurred an increase in the cost function. Since the plaid method produces overlapping tiles, some of which may model the background, overlapping elements of tile identification was resolved under this cost function to produce sensible results. MTA−SP MTA−ICM 5e−2 5e−3 PCA 5e−4 plaid 0.05 0.1 0.5 2 tiles,100x100 matrix 5e−1 5e−3 0.05 0.1 0.5 7 tiles,100x100 matrix 5e−1 5 tiles,40x40 matrix 5e−1 5e−2 5e−2 5e−3 5e−2 5e−3 5e−4 0.05 0.1 0.5 3 tiles,100x100 matrix 5e−1 0.05 0.1 0.5 8 tiles,100x100 matrix 5e−1 0.05 0.1 0.5 5 tiles,70x70 matrix 5e−1 5e−2 5e−2 5e−3 5e−4 5e−2 0.05 0.1 0.5 4 tiles,100x100 matrix 5e−1 0.05 0.1 0.5 9 tiles,100x100 matrix 5e−1 5e−3 0.05 0.1 0.5 5 tiles,150x150 matrix 5e−1 5e−2 5e−2 5e−3 5e−2 5e−4 0.05 0.1 0.5 0.05 0.1 0.5 0.05 0.1 0.5 5 tiles,100x100 matrix 10 tiles,100x100 matrix 5 tiles,200x200 matrix 5e−1 5e−1 5e−1 5e−2 5e−2 5e−2 5e−3 Performance was evaluated under several different criteria. First, we computed the Hamming distance between the ‘ground truth’ and the matrix output by each algorithm (after setting any non-zero values to 1 in the output matrix and comparing it to the clean input matrix) and normalizing by the size of the matrix. The Hamming distance gives a general measure of how well the algorithm was able to identify which elements in the input matrix belong to tiles and which belong to the background model. Fig. 3 shows the results for a set of experiments evaluated at different dimensions of an operating point chosen to be a matrix size of 100 × 100 and 5 tiles. We show results where the matrix size is fixed and the number of tiles is varied, and vice versa. All noise levels are shown for each setting of matrix size and number of tiles. The plots are shown with a log scale on both axes, and each point is an average of 20 experiments. Note that the scales in the y-axis differ across plots. The Hamming distance shows that MTA-SP performs better than the other algorithms, for most experimental settings. MTA-SP and MTA-ICM perform very similarly for large number of tiles. PCA and the plaid method both perform poorly, for the most part due to their inability to identify non-background elements. The increase in the number of tiles results in a decrease in performance while increasing the matrix size does not effect the performance significantly. Changes in the noise level have a noticeable effect only for a small number of tiles, and as would be expected, all algorithms succeed at finding a single tile. 6 tiles,100x100 matrix 5e−1 5e−2 Error Rate X 1 tile,100x100 matrix 5e−1 0.05 0.1 0.5 5e−3 0.05 0.1 0.5 0.05 0.1 0.5 2 Noise Level (σ ) Figure 3: Hamming distance for different settings of matrix size and number of tiles. Hamming distance does not provide information about how well the algorithm was able to identify the actual tiles that make up the non-background elements of the matrix. We address this question by evaluating the classification error made by the different algorithms. This evaluation requires that the tiles discovered by the algorithms be matched to the ‘ground truth’, which while used to generate the data, is not necessarily the best tile configuration. Tiles in the ‘ground truth’ were matched to the experimentally determined tiles to which they most overlapped. The matching was performed in a greedy fashion such that at most, a one-to-one correspondence was established between tiles. The tiles in the matrix output were then re-numbered based on this matching. The classification error metric is simply the number of mismatches between the matrices normalized by the size of the matrix. The classification errors are shown in Fig. 4 for the same set of experiments as previously discussed. MTA-SP outperforms the other methods in all but 4 of the experiments. In the cases where MTA-ICM does better in terms of the Hamming distance, we see it suffers from more classification errors. This indicates that for these cases, MTA-ICM correctly identified more elements to be in tiles and in the background, but it did 1 tile,100x100 matrix 5e−1 6 tiles,100x100 matrix 0 MTA−SP 5e−2 −0.2 2000 PCA 5e−2 5e−4 0.05 0.1 0.5 2 tiles,100x100 matrix 5e−1 −0.4 plaid 0.05 0.1 0.5 7 tiles,100x100 matrix 5e−1 5e−4 0.5 3 tiles,100x100 matrix 5e−1 0.05 0.1 0.5 8 tiles,100x100 matrix 5e−1 0.5 0.05 0.1 0.5 7 tiles,100x100 matrix 0.05 0.1 600 6000 600 400 4000 400 200 2000 0 0.5 5 tiles,70x70 matrix 5e−1 200 0 0.05 0.1 0.5 0.05 3 tiles,100x100 matrix 0.1 0.5 0.05 8 tiles,100x100 matrix Cost 600 5e−3 5e−2 0.05 0.1 0.5 4 tiles,100x100 matrix 5e−1 0.05 0.1 0.5 9 tiles,100x100 matrix 5e−1 0.05 0.1 0.5 5 tiles,150x150 matrix 5e−1 0 5e−2 0.05 0.1 0.5 500 0.05 0.1 0.5 0.05 0.1 0.5 0.05 0.1 0.5 5 tiles,100x100 matrix 10 tiles,100x100 matrix 5 tiles,200x200 matrix 5e−1 5e−1 5e−1 200 0.05 4 tiles,100x100 matrix 1000 5e−3 400 2000 1500 5e−2 600 4000 200 0.1 0.5 0.1 4000 6000 3000 4000 2000 0.1 0.5 0.5 0.05 0.1 0.5 10000 1500 0.05 0.1 0.1 0.5 12000 10000 8000 6000 4000 2000 15000 5000 500 0.1 0.05 5 tiles,100x100 matrix 10 tiles,100x100 matrix 5 tiles,200x200 matrix 1000 0.05 0.5 1000 0.05 2000 5e−2 0.1 5 tiles,150x150 matrix 8000 0.5 2500 5e−2 0.05 9 tiles,100x100 matrix 2000 0.05 0.5 800 6000 400 0.1 5 tiles,70x70 matrix 1000 8000 5e−2 5e−4 5 tiles,40x40 matrix 800 5e−2 0.1 0.1 2 tiles,100x100 matrix 5e−2 0.05 MTA−ICM 1000 0.05 5 tiles,40x40 matrix 5e−1 5e−3 MTA−SP 3000 MTA−ICM 5e−3 Error Rate 6 tiles,100x100 matrix 1 tile,100x100 matrix 5e−1 0.5 0.05 2 Noise Level (σ ) 0.1 0.5 0.05 0.1 0.5 0.05 0.1 0.5 2 Noise Level (σ ) Figure 4: Classification error for different settings of matrix size (right column) and number of tiles. Figure 5: Cost function relative to ground truth for different matrix sizes and numbers of tiles. so with less accurate tiling with regard to the actual data. Overall, both MTA-SP and MTA-ICM perform considerably better than the plaid method and PCA which struggle to identify tile elements. originally generated, despite the amount of corruption by the noise. In general, the algorithms do not reach the global minimum and have a higher cost than that of the ground truth. We see the same trends as before, with MTA-SP doing better on average, and having only a small difference when it fails to do as well as MTA-ICM. Fig. 5 compares the performance of MTA-SP and MTA-ICM in terms of the cost function in (10) they both minimize. The other algorithms are not shown as they perform several orders of magnitude worse, a consequence of the fact they do not directly minimize the cost function. The values are shown after subtraction of the cost of the ‘ground truth’. For the cases where the algorithms performed perfectly, the incurred cost was zero. As the complexity of the problem increases, so does the cost incurred. This is not directly due to the added component of T (N + M ) which appears in the ‘ground truth’ model as well, though it may contribute towards the higher costs if the algorithms find more tiles then necessary. There are cases where the algorithm performs better than the true model (e.g., 5 tiles, 40 × 40). This phenomena occurs because the noise applied is such that some of the rows and/or columns of a tile are better modelled in the base model than as part of a tile, or vice versa. However, under the ‘ground truth’, the tile is still evaluated as it was 4.2 YEAST GENETIC INTERACTIONS The ‘synthetic genetic array’ data set (SGA) (Tong et al., 2004) describes events of lethality for double knock-out genes in yeast, where the single knock-out strains are viable. The data set is a binary matrix of 135 × 1023 (Fig. 6), where a value of 1 at position xij denotes a synthetic genetic interaction, i.e. the double mutant whose genes i and j have been knocked out is not viable and thus both genes are required for survival, although either one by itself is dispensable. We compared the performance of the different methods by obtaining clusters of genes from each method and analyzing their biological significance in terms of higher than expected rates of similarly annotated Table 1: Number of times groups of yeast genes are significantly enriched for Gene Ontology categories Biological Aspect MTA HAC Plaid Biological Process Cellular Component Molecular Function Total 7 8 2 17 4 4 2 10 4 1 0 5 genes, using Gene Ontology annotations6 . For each cluster, we evaluated the p-value of the Bonferronicorrected hyper-geometric distribution for observing the number of genes with a specific annotation. In order to compare MTA to different types of analysis, we obtained clusters from hierarchical agglomerative clustering (HAC), the original plaid model, and MTA. We allowed up to 15 clusters, where for HAC the dendrogram was used to obtain row/column clusters, and for MTA, we considered the genes corresponding to row elements of a tile as elements of the row cluster and genes corresponding to column elements of a tile as column clusters. MTA identified more statistically significant clusters (p < 0.01) for different GO-category aspects (cellular component, molecular function and biological process) than either HAC, or the unmodified plaid model. Overall, MTA identified 17 significant groups, HAC identified 10, and the plaid method identified 5 (see Table 1). 5 DISCUSSION We introduced a new analysis framework, matrix tile analysis, in which an input matrix is decomposed into a set of non-overlapping components, or tiles. Unlike many models for matrix decomposition, our method does not require addition and multiplication to be defined over data vectors, and unlike approaches such as bi-clustering, different components are allowed to overlap in the rows and columns, though not in both simultaneously. We described a probabilistic model of the problem and its graphical representation using a factor-graph. We compared the performance of four different approaches for solving MTA and were able to demonstrate that the sum-product algorithm (MTA-SP) performs better on a large set of synthetic problems compared to a greedy algorithm, the plaid method, and PCA. We were also able to extract biologically related groups of genes by applying MTA to yeast genetic interaction data. Tiles identified by MTA in two other gene interaction data sets are being biologically verified. Our model requires that the input be given in terms of 6 ftp://genome-ftp.stanford.edu/pub/yeast/ Figure 6: Yeast genetic interaction data. The rows and columns are ordered using clustering. data and background likelihoods. This was motivated by data for which prior analysis or expert knowledge resulted in likelihood measurements. However, for the general case, in the absence of strong prior knowledge about the data distribution, it is always possible to compute likelihood estimates from empirical measurements. Further, because of the formulation of the model under a probabilistic framework, the model can be extended to jointly infer the tiling and learn the parameters in the likelihood functions, using the EM algorithm. References EM Airoldi, et al. A Latent Mixed Memebership Model for Relational Data. Proc ACM Link-KDD Workshop, 2005. AJ Bell, TJ Sejnowski. An information maximization approach to blind separation and blind deconvolution. Neur Comp 7, 1129–1159, 1995. Y Cheng, GM Church. Biclustering of expression data. Proc Int Conf Intell Syst Mol Biol 8, 93-103, 2000. D Dueck, et al. Multi-way clustering of microarray data using probabilistic sparse matrix factorization. Proc Int Conf Intell Syst Mol Biol 13, 2005. MV Eisen, et al. Cluster analysis and display of genomewide expression patterns. Proc of the National Academy of Sciences 95, 14863–14868, 1999. IT Jolliffe. Principal Component Analysis. Verlag, New York NY, 1986. Springer- FR Kschischang, et al. Factor graphs and the sum-product algorithm. IEEE Trans Info Theory 47:2, 498–519, 2001. L Lazzeroni, A Owen. Plaid Models for Gene Expression Data. Statistica Sinica 12:1, 61-86, 2002. D Lee, S Seung. Learning the parts of objects by nonnegative matrix factorization. Nature 401, 788–791, 1999. P Resnick, et al. GroupLens: An Open Architecture for Collaborative Filtering of Netnews. Proc ACM Conf Comp Supp Coop Work, 175-186, Chapel Hill, NC, 1994. N Srebro, et al. Maximum-Margin Matrix Factorization. Advances in Neural Info Proc Sys 17, 2005. AH Tong, et al. Global Mapping of the Yeast Genetic Interaction Network. Science 303, 808–813, 2004.
5cs.CE
arXiv:1710.09610v1 [math.ST] 26 Oct 2017 Optimal Input Design for Parameter Estimation in AR(1) with Dependent Stationary Noise Chunhao Cai School of Mathematical Science, Nankai university chunhao [email protected] October 27, 2017 Abstract This paper focus on the asymptotical input and the asymptotical properties of the MLE of the drift parameter in the Autoregressive of order 1 (AR(1)) driven by an regular stationary noises (with dependence). The Laplace Transform computations will be the main tool for our analysis. 1 1.1 Introduction Historical survey The experiment design has been given great deal of interest over the last decades in the engineering literature (see e.g.[1, 2, 7, 8, 9, 10]) and also in the statistical literature [11]. The classical approach for experiment design consist on a two-step procedure: Maximise the Fisher information under energy constraint of the input and find an adaptive estimation procedure: such as the sequential design and Bayesian design[1, 10]. Also these works not only considered the identification of directly observed dynamic systems [9] but also the partially observed systems [10]. For the autoregressive cases, the precious works always focused on the system driven by the white noises, [8], the independence is a very good property for the estimation procedure. As far as we know, there have not been the contribution to the problem of experiment design of the autoregressive process with the dependent noises. But there have been the work about the dependent case such as the optimal filtering [4] and the Maximum Likelihood Estimation for the AR(p) (see [5]). In this work, we focus on the asymptotical input and the asymptotical properties of the MLE of the drift parameter in the Autoregressive of order 1 (AR(1)) driven by an regular stationary noises. The Laplace Transform computations will be the main tool for our analysis. With This paper falls into three parts, In the next part of the introduction, we will state the problems and give the main results. Section 2 and Section 3 is devoted to some Preliminaries and the proofs of the main results. 1 1.2 Statement of the problems and Main results We consider the model Xn = ϑXn−1 + u(n) + ξn , 0 < ϑ < 1, X0 = 0. (1) Where ξ = (ξn , n ∈ Z) is the centred regular stationary noise with the autoregressive with Z π | log fξ (λ)|dλ < ∞ (2) −π where fξ (λ) is the spectral density of ξ. We suppose that the covariance c = c(m, n), m, n ≥ 1 is Eξm ξn = c(m, n) = ρ(|n − m|), ρ(0) = 1. is positive defined. In fact, the condition (2) can be changed to the condition of the covariance function ρ: ρ ∼ cn−α , α > 0. Suppose that the parameter ϑ is unknown and is to be estimated with the observation data (Xn , n = 1, · · · , N ). We suppose that L(ϑ, X (N ) ) be the likelihood function for ϑ, then the Fisher information stands for ∂2 IN (ϑ, u) = −Eϑ 2 ln L(ϑ, X (N ) ). ∂ϑ Let us consider the space for the function u(n)    P 2 n       k(n, m)u(m) N    1 X m=1   ≤1 UN = u(n)    N n=1  σn+1       where the function k(n, m) and σn will be defined in (4) and (5). Denote JN (ϑ) = sup IN (ϑ, u) u∈UN Our main goal is to find estimator ϑ̄N of the parameter ϑ which is asymptotically efficient in the sense that, for any compact K ∈ (0, 1) = {ϑ|0 < ϑ < 1}, sup JN (ϑ)Eϑ (ϑ̄N − ϑ)2 = 1 + 0(1), (3) ϑ∈K as N → ∞. We have the following results: Theorem 1.1. The asymptotical optimal input in the class of control UT is uopt (n) = More over, JN (ϑ) = I(ϑ) N →∞ N lim where I(ϑ) = 1 1−ϑ2 + 1 (1−ϑ)2 . 2 n P m=1 K(n, m)σm+1 . Remark 1. For the case of −1 < ϑ < 0, the optimal input will be uopt (n) = (−1)n or uopt (n) = (−1)n+1 is the same of ϑ > 0. n P m=1 K(n, m)σm+1 and I(ϑ) = 1 1−ϑ2 + 1 (1+ϑ)2 . n P K(n, m)σm+1 m=1 In fact, the proof of this case Now, the optimal input does not depend on the unknown parameter ϑ, we can consider ϑ̄ as the Maximum Likelihood Estimator ϑ̂N as the maximum of the likelihood function and from the following theorem we know it will reaches efficiency (3). Theorem 1.2. For 0 < ϑ <, the MLE ϑ̂N is asymptotically normal at the usual convergent rate    √  1 Law N ϑ̂N − ϑ −−−−→ N 0, N →∞ I(ϑ) where I(ϑ) is defined in Theorem 1.1. 2 2.1 Preliminaries Stationary Gaussian sequences We define σ1 ǫ1 = ξ1 , σn ǫn = ξn − E(ξn |ξ1 , ξ2 , · · · , ξn−1 ), n ≥ 2 (4) where ǫn ∼ N (0, 1), n ≥ 1 are independent. It follows from the Theorem of Normal Correlation ([6], Theorem 13.1) that there exists a deterministic kernel denoted by k(n, m), n ≥ m, n ≥ 1 such that n X σn ǫn = k(n, m)ξm , k(n, n) = 1. (5) m=1 For n ≥ 1, we denote by βn−1 the partial correlation coefficient − k(n, 1) = βn−1 , n ≥ 1, (6) then following from [12], we have σn2 = n−1 Y 2 (1 − βm ), n ≥ 2, σ1 = 1. (7) m=1 On the other hand, there exists an inverse deterministic kernel K = (K(n, m), n ≥ 1, n ≥ m) such that n X ξn = K(n, m)σm ǫm . (8) m=1 For the relationship ofP k(n, m) and K(n, m) can refer to [5]. Here it is worth mentioning that the βn2 < ∞, that is to say βn → 0. condition (2) implies n≥1 3 2.2 Model Transformation Let us define un process Z = (Zn , n ≥ 1) such that Zn = n X m=1 k(n, m)Xm , n ≥ 1 (9) where k(n, m) is the kernel defined in (5). As in (8), we also have Xn = n X K(n, m)Zm , m=1 then the process Z has the same filtration of X. In the following parts, we take our observation be (Z1 , Z2 , · · · , ZN ). Actually, it wa shown in [5] the the process Z can be considered as the first component of a 2-dimensional AR(1) process ζ = ζn , n ≥ 1 which is defined by:   Zn  P ζn =  n−1 βr Z r r=1 It is not hard to know that ζn is a 2-dimensional Markov process which satisfies the following equation: ζn = An−1 ζn−1 + bv(n) + bσn ǫn , n ≥ 1, ζ0 = 02×1 . (10) where An =  ϑ βn ϑβn 1  ,b=  1 0  (11) and ǫn ∼ N (0, 1) are independent noises. Here the function v(n) will be in the space of ) ( 2 N  1 X v(n) ≤1 VN = v N n=1 σn+1 2.3 Fisher Information As we have interpreted, the observation will be the first component of the process ζ = (ζn , n ≥ 1). Now from the equation (10), it is easy to write the Likelihood function L(ϑ, X (N ) ) which depends on the function v(n):   !2  N N ∗ ϑ X Y b ζ − A ζ 1 1 n n−1 n−1 . p (12) exp − L(ϑ, X (N ) ) = 2 2 σ 2πσ n n n=1 n=1 then the Fisher Information IN (ϑ, v) will be: 2 N −1  ∗ X ∂2 an ζn (N ) IN (ϑ, v) = −Eϑ 2 ln L(ϑ, X ) = Eϑ . ∂ϑ σn+1 n=1 Where an =  1 βn  . 4 (13) 3 3.1 Proofs Proof of Theorem 1.1 To prove the theorem 1.1, we divide the Fisher Information (13) into two parts: IN (ϑ, v) = = = N −1  ∗ X an ζn 2 − a∗n Eϑ ζn + a∗n Eϑ ζn Eϑ σn+1 n=1  2 NX 2 −1  ∗ N −1 X an Eϑ ζn a∗n (ζn − Eϑ ζn ) + Eϑ σn+1 σn+1 n=1 n=1 I1,N (ϑ) + I2,N (ϑ, v) On one hand, it is obvious that I1,N (ϑ) does not depend on the control v(n). Let us denote Pnϑ = ξn − Eϑ ξn , then Pnϑ satisfies the following equation: ϑ Pnϑ = Aϑn−1 Pn−1 + bσn ǫn , P0ϑ = 02×1 As presented in [5], N −1 1 X (a∗n Pnϑ )2 lim Eϑ exp − 2 N →∞ 2N n=1 σn+1 where I1 (ϑ) = 1 1−ϑ2 . !   1 = exp − I1 (ϑ) 2 Then lim N →∞ To compute I2,N (ϑ), let s(n) = Eϑ ζn σn+1 , I1,N (ϑ) 1 . = I1 (ϑ) = N 1 − ϑ2 (14) then s(n) satisfies the following equation: s(n) = An−1 s(n − 1) σn + bf (n). σn+1 (15) n . Note that βn → ∞ and σσn+1 → 1. Without difference, we suppose that for where f (n) = σv(n) n+1 σn n = 1, 2, · · · , σn+1 ≤ (1+ε) and βn ≤ ε for the sufficiently small positive constant ε and (1+ε)ϑ < 1, then Lemma 3.1. We define the 2-dimension equation Y = (Yn , n ≥ 1) satisfying the following equation:   ϑ 0 Yn = Yn−1 + bf (n), Y (0) 0 1 then N N 1 X ∗ 1 X ∗ (an s(n))2 = lim (b Yn )2 N →∞ N N →∞ N n=1 n=1 lim Proof. We define another 2-dimensional equation Y = (Yn′ , n ≥ 1) satisfying the equation:   σn ϑ 0 ′ + bf (n), Y0′ Yn = Yn−1 0 1 σn+1 5 we have three comparison, first of all we compare b∗ s(n) − b∗ Yn′ , in fact   σn 0 ϑβn−1 ′ ′ , (s(n − 1) − Yn−1 ) s(n) − Yn = βn−1 0 σn+1 then b∗ (s(n) − Yn′ ) → 0. Now, we compare b∗ Yn − b∗ Yn′ , in fact, b ∗ (Yn′ − Yn ) = ϑ(b ∗ (Yn′ − Yn )) + ϑ   σn ′ − 1 b∗ Yn−1 . σn+1 n because f (n) is bounded and σσn+1 − 1 → 0, then b∗ (Yn′ − Yn ) → 0. At last, as βn → 0 and the component of s(n) is bounded, the difference a∗n s(n) − b∗ s(n) → 0 which achieves the proof. ∗ α(n) = b Yn , then α(n) = ϑα(n − 1) + f (n) where f (n) is in the space of FN =  We define N P f (n) N1 f 2 (n) ≤ 1 , without loss, we suppose α(0) = 0. Let J2,N = sup I2,N (ϑ, v), it is v∈VN n=1 clear that N X J2,N (ϑ) 1 = lim sup α2 (n). N →∞ N − 1 N →∞ N f ∈FN n=1 lim Now to prove theorem 1.1, we only need the following lemma: Lemma 3.2. J2,N (ϑ) = I2 (ϑ) N −1 lim N →∞ where I2 (ϑ) = 1 (1−ϑ)2 . (16) Proof. First of all, taking f (n) = 1, we get the lower bound N 1 X 2 1 lim . α (n) ≥ N →∞ N (1 − ϑ)2 n=1 To get the lower bound, notice that α(n) = ϕ(n) n X i=1 ϕ−1 (i)f (i), n ≥ 1, Y (0) = 0 where we can rewrite 1 N PN n=1 ϕ(n) = ϑϕ(n − 1), ϕ(0) = 1. α2 (n) which will be n N N X X f (i) 1 X 2 ϕ−1 (i) √ ϕ(n) α (n) = N n=1 N n=1 i=1 6 ! ϕ(n) n X i=1 −1 ϕ f (i) (i) √ N ! . or N N X N X 1 X 2 f (i) f (j) FN (i, j) √ √ , α (n) = N n=1 N N i=1 j=1 where FN (i, j) = N X ℓ=i Let φn = ϕ−1 (n) N P ℓ=n W j   ϕ(ℓ)ϕ−1 (i) ϕ(ℓ)ϕ−1 (j) φℓ ǫℓ , where ǫℓ ∼ N (0, 1) are independent, then FN (i, j) = E(φi φj ) and φn−1 = ϑφn + ǫn−1 , ZN = 0. In fact, FN (i, j) is a compact symmetric operator for fixed N . We should estimate the spectral gap (the first eigenvalue ν1 (N )) of the operator. The estimation of the spectral gap is based on the Laplace transform computation. Let us compute, for sufficiently small negative a < 0, then Laplace N P φ2i : transform of i=1 ! N aX 2 LN (a) = Eϑ exp − φ . 2 i=1 i 2 On one hand, for a > − ν1 (N ) , since φ is a centred Gaussian process with covariance operator FN , using Mercer’s theorem and Parseval’s equality, LT (a) can be represented by Y LN (a) = (1 + aνi (N ))−1/2 (17) i≥1 where νi (N ) is the sequence of positive eigenvalues of the covariance operator. On the other hand, LN (a) = ϑN −1 Ψ1N where ΨN = 1 1 ϑ a ϑ 1 ϑ (18) N −1  0   2 1+a + ϑ − 4 ≥ 0, ϑ For ∆=  −1/2 a ϑ +ϑ 1 0  . there exists two real eigenvalues λ2 ≥ 1, λ1 ≤ 1 of the matrix   1 1 ϑ ϑ , a a ϑ ϑ +ϑ then ΨN = −2 −2 λN −1 − λN −1 λN − λN 2 1 − ϑ2 ϑ 7 ! ϑ ≥0 λ2 − λ1 That is to say for ϑ > 0 and for any 0 > a ≥ −(1 − ϑ)2 , LN (a) ≥ 0, it means lim ν1 (N ) ≤ N →∞ which achieves the proof. Remark 2. For −1 < ϑ < 0, ∆ ≥ 0 means (1 + ϑ)2 . 3.2 1+a ϑ 1 (1−ϑ)2 + ϑ ≤ −2 and 0 > a > −(1 + ϑ)2 then ν1 (N ) ≤ Proof of theorem 1.2 We denote vopt (n) = σn+1 and ζ o = (ζno , n ≥ 1) be the process ζ with the function vopt(n) , then o ζno = An−1 ζn−1 + bvopt (n) + bσn ǫn , ζ0 = 02×1 To estimate the parameter ϑ, we will observe ζ1 , ζ2 , · · · , ζN , from equation (12) the maximum likelihood estimator ϑ̂N of ϑ will be ϑ̂N = 2 N  ∗ X a ζn n σn+1 n=1 !−1 even more ϑ̂N − ϑ = where MN N X a∗n ζn b∗ ζn+1 2 σn+1 n=1 ! , (19) MN hM iN 2 N  ∗ N X X an ζn a∗n ζn ǫn+1 , hM iN = = σ σn+1 n+1 n=1 n+1 are martingale and its bracket process. The theorem 1.2 is crucially based on the asymptotical study for N → ∞ of the Laplace transform  µ  µ = Eϑ exp − hM iN LϑN N 2N for every real number µ. We have the following lemma: Lemma 3.3. Under the condition (2), for any µ ∈ R,    µ  1 ϑ = exp − I(ϑ) lim LN N →∞ N 2 where I(ϑ) = 1 1−ϑ2 + 1 (1−ϑ)2 . To prove this lemma, we rewrite LϑN LϑN where Mn = (20) µ an an ∗, 2 N σn+1 µ N µ N  with the following formula: N 1X ∗ = Eϑ exp − ζ Mn ζn 2 n=1 n in the Appendix, we will prove that: 8 ! Lemma 3.4. For any N , the following equality holds: LϑN µ N = N Y [det(Id + γ(n, n)Mn )] −1/2 n=1 N 1X ∗ exp − z Mn (Id + γ(n, n)Mn )−1 zn 2 n=1 n where (γ(n, m), 1 ≤ m ≤ n) is the unique solution of the equation # " n Y −1 γ(m, m), γ(n, m) = Ar−1 (Id + γ(r, r)Mr ) ! (21) r=m+1 the function (γ(n, n, n ≥ 1)) is the solution of the Ricatti equation: γ(n, n) = An−1 (Id + γ(n − 1, n − 1)Mn−1 )−1 γ(n − 1, n − 1)A∗n−1 + σn2 bb∗ . (22) Here (zn , 1 ≤ n ≤ N ) is the unique solution of the equation z n = mn − where mn = Eζno . n−1 X r=1 γ(n, r)[Id + γ(r, r)Mr ]−1 Mr zr , z0 = m0 . Now we will return to the proof of lemma 3.3. In [5] we have presented lim N →∞ N Y [det(Id + γ(n, n)Mn )]−1/2 = n=1 µ . 1 − ϑ2 (23) we know that the component of γ(n, n) is bounded. then lim Id + γ(n, n)Mn = Id. N →∞ On the other hand, N X n=1 m∗n Mn mn 2 N  µ X a∗n Eζn0 µ , N → ∞. = −→ N n=1 σn+1 (1 − ϑ)2 (24) which has been presented in last part. At last, notice # " n n−1 n−1 X X Y −1 −1 [Id + γ(r, r)Mr ]Mr zr Aτ −1 (Id + γ(τ, τ )Mτ ) γ(n, r)[Id + γ(r, r)Mr ] Mr zr = r=1 r=1 we have that lim N →∞ n−1 X r=1 τ =r+1 γ(n, r)[Id + γ(r, r)Mr ]−1 Mr zr = 0. (25) Combining (23) and (24) and (25), the Lemma 3.3 achieves. It is immediately from this conclusion 1 hM iN = I(ϑ) N and due to the central limit theorem for martingale, Pϑ lim N →∞ 1 √ MN =⇒ N (0, I(ϑ)). N which immediately imply the conclusion of the theorem 1.2 9 References [1] V. Levadi (1966) Design of input signals for parameter estimation, IEEE Trans. Automat. Control, 11, 205-211. [2] H. Aoki and R. Staley (1970) On input signal synthesis in parameter identification, Automatica, 6, 431-440. [3] M. Kleptsyna, A. Le Breton and M. Viot (2002) New formulas concerning Laplace transforms of quadratic forms for general Gaussian sequences, Journal of Applied Mathematics and Stochastic Analysis, 15(4), 309-325 [4] A. Brouste and M. Kleptsyna (2012) Kalman type filter under stationary noises, Systems & Control Lettes 61, 1229-1234 [5] A. Brouste, C. Cai and M. Kleptsyna (2014) Asymptotic properties of the MLE for the autoregressive process coefficients under stationary Gaussian noises, Mathematical Methods of Statistics, 23(2), 103-115 [6] R. S. Liptser and A. N. Shiryaev (1978) Statistics of Random Process II - Application, SpringerVerlag, New York. [7] T. S. NG, Graham C. Goodwin and Torsten Soderstrom (1977) Optimal experiment design for linear system with input-Output constraints, Automatica, 13, 571-577. [8] T. S. NG, Z. H. Qureshi and Y. C. Cheah (1984) Optimal input design for an AR model with output constraints, Automatica, 20(3), 359-363. [9] R. K. Mehra (1974) Optimal input signals for parameter estimation in dynamic systems— survey and new results, IEEE Trans Aut. Control, AC-19, 753. [10] R. K. Mehra (1974) Optimal inputs for linear system identification, IEEE Trans Aut. Control, AC-19, 192. [11] J. Kiefer (1974) On the efficient design of statistical investigation, The annals of statistics, 2, 849-879. [12] J. Durbin (1960) The fitting of time series models, Rev. Inst. Intern. Statist, 28, 233-243. 10
10math.ST
Lower Bounds on Time–Space Trade-Offs for Approximate Near Neighbors arXiv:1605.02701v3 [cs.DS] 18 Aug 2016 Alexandr Andoni Columbia Thijs Laarhoven IBM Research Zürich Ilya Razenshteyn MIT CSAIL Erik Waingarten Columbia August 22, 2016 Abstract We show tight lower bounds for the entire trade-off between space and query time for the Approximate Near Neighbor search problem. Our lower bounds hold in a restricted model of computation, which captures all hashing-based approaches. In particular, our lower bound matches the upper bound recently shown in [Laa15c] for the random instance on a Euclidean sphere (which we show in fact extends to the entire space Rd using the techniques from [AR15]). We also show tight, unconditional cell-probe lower bounds for one and two probes, improving upon the best known bounds from [PTW10]. In particular, this is the first space lower bound (for any static data structure) for two probes which is not polynomially smaller than for one probe. To show the result for two probes, we establish and exploit a connection to locally-decodable codes. 1 Introduction 1.1 Approximate Near Neighbor problem (ANN) The Near Neighbor Search problem (NNS) is a basic and fundamental problem in computational geometry, defined as follows. We are given a dataset of n points P from a metric space (X, dX ) and a distance threshold r > 0. The goal is to preprocess P in order to answer near neighbor queries: given a query point q ∈ X, return a dataset point p ∈ P with dX (q, p) ≤ r, or report that there is no such point. The d-dimensional Euclidean (Rd , `2 ) and Manhattan (Rd , `1 ) metric spaces have received the most attention. Besides its classical applications to similarity search over many types of data (text, audio, images, etc; see [SDI06] for an overview), NNS has been also recently used for cryptanalysis [Laa15a, Laa15b] and optimization [DRT11, HLM15, ZYS16]. The performance of a NNS data structure is often characterized by two key metrics: • the amount of memory a data structure occupies, and • the time it takes to answer a query. All known time-efficient data structures for NNS (e.g., [Cla88, Mei93]) require space exponential in the dimension d, which is prohibitively expensive unless d is very small. To overcome this socalled “curse of dimensionality”, researchers proposed the (c, r)-Approximate Near Neighbor Search problem, or (c, r)-ANN. In this relaxed version, we are given a dataset P and a distance threshold r > 0, as well as an approximation factor c > 1. Given a query point q with the promise that there is at least one data point in P within distance at most r from q, the goal is to return a data point p ∈ P within a distance at most cr from q. This approximate version of NNS allows efficient data structures with space and query time polynomial in d and query time sublinear in n [KOR00, IM98, Ind01b, Ind01a, GIM99, Cha02, DIIM04, CR04, Pan06, AC09, AI06, TT07, AINR14, AR15, Pag16, Kap15, BDGL16, Laa15c]. In practice, ANN algorithms are often successful for similarity search even when one is interested in exact nearest neighbors [ADI+ 06, AIL+ 15]. We refer the reader to [HIM12, AI08, And09] for a survey of the theory of ANN, and [WSSJ14, WLKC15] for a more practical perspective. In this paper, we study tight time–space trade-offs for ANN. Before stating our results in Section 1.6, we provide more background on the problem. 1.2 Locality-Sensitive Hashing (LSH) and beyond A classic technique for ANN is Locality-Sensitive Hashing (LSH), introduced in 1998 by Indyk and Motwani [IM98, HIM12]. The main idea is to use random space partitions, for which a pair of close points (at distance at most r) is more likely to belong to the same part than a pair of far points (at distance more than cr). Given such a partition, the data structure splits the set P according to the partition, and, given a query, retrieves all the data points which belong to the same part as the query. To get a high probability of success, the data structure maintains several partitions and checks all of them during the query stage. LSH yields data structures with space O(n1+ρ +d·n) and query time O(d · nρ ). For a particular metric space and approximation c, ρ measures the quality of the random space partition. Usually, ρ = 1 for c = 1 and ρ → 0 as c → ∞. Since the introduction of LSH in [IM98], subsequent research established optimal values of the LSH exponent ρ for several metrics of interest, including `1 and `2 . For the Hamming distance (`1 ), the optimal value is ρ = ρ= 1 c2 1 c ± o(1) [IM98, MNP07, OWZ14]. For the Euclidean metric (`2 ), it is ± o(1) [IM98, DIIM04, AI06, MNP07, OWZ14]. More recently, it has been shown that better bounds on ρ are possible if the space partitions are allowed to depend on the dataset 1 . That is, the algorithm is based on an observation that every dataset has some structure to exploit. This more general framework of data-dependent LSH yields ρ= 1 2c−1 + o(1) for the `1 distance, and ρ = 1 2c2 −1 + o(1) for `2 [AINR14, Raz14, AR15]. Moreover, these bounds are known to be tight for data-dependent LSH [AR16]. 1 Let us note that the idea of data-dependent random space partitions is ubiquitous in practice, see, e.g., [WSSJ14, WLKC15] for a survey. But the perspective in practice is that the given datasets are not “worst case” and hence it is possible to adapt to the additional “nice” structure. 2 1.3 Random instances: the hardest instances At the core of the optimal data-dependent LSH data structure for `1 from [AR15] is an algorithm that handles the following random instances of ANN over Hamming space (also known as the light bulb problem in literature [Val88] in the off-line setting). • The dataset P consists of n independent uniformly random points from {−1, 1}d , where d = ω(log n); • A query q is generated by choosing a uniformly random data point p ∈ P , and flipping each coordinate of p with probability 1 2c independently; • The goal for a data structure is to recover the data point p from the query point q. At a high level, the data structure from [AR15] proceeds in two steps: • it designs a (data-independent) LSH family that handles the random instance, and • it develops a reduction from a worst-case instance to several instances that essentially look like random instances. Thus, random instances are the hardest for ANN. On the other hand, random instances have been used for the lower bounds on ANN (more on this below), since they must be handled by any data  d + o(1) -ANN over `1 . structure for c, 2c 1.4 Time–space trade-offs LSH gives data structures with space around n1+ρ and query time around nρ . Since early results on LSH, the natural question has been whether one can trade space for time and vice versa. One can achieve polynomial space with poly-logarithmic query time [IM98, KOR00], as well as nearlinear space with sublinear query time [Ind01a]. In the latter regime, [Pan06, Kap15] and, most recently, [Laa15c] gave subsequent improvements. We point out that the near-linear space regime is especially relevant for practice: e.g., see [LJW+ 07, AIL+ 15] for practical versions of the above theoretical results. For random instances, the best known trade-off is from [Laa15c]: Theorem 1.1 (Theorem 1 of [Laa15c]). Let c ∈ (1, ∞). One can solve on the unit sphere S d−1 ⊂ Rd equipped with `2 norm with query time O(d ·  √ 2 + o(1) -ANN c nρq +o(1) ), and space  c, O(n1+ρu +o(1) + d · n) where p √ √ c2 ρq + (c2 − 1) ρu = 2c2 − 1. 3 (1) This data structure can handle the random Hamming instances introduced in Section 1.3 via a standard reduction. The resulting time–space trade-off is: √ √ √ c ρq + (c − 1) ρu = 2c − 1. (2) For the sake of illustration, consider the setting of the Hamming distance and approximation c = 2. The optimal data-dependent LSH from [AR15] gives space n4/3+o(1) and query time n1/3+o(1) . For random instances, the above bound (2) gives the same bound as well as a smooth interpolation between the following extremes: space n1+o(1) and query time n3/4+o(1) , and space n4+o(1) and query time no(1) . The algorithm from [Laa15c] can be applied to the entire `2 sphere (and hence, via standard reductions à la [Val15, Algorithm 25], to the entire space Rd ). However, this direct extension degrades the quality of the (ρq , ρu ) trade-off to essentially those corresponding to the classical LSH bounds (e.g., for ρq = ρu , obtaining ρq = ρu = 1/c2 + o(1), instead of the optimal ρq = ρu = 1/(2c2 − 1) + o(1)). Nonetheless, it is possible to apply the worst-case–to–random-case reduction from [AR15] in order to extend Theorem 1.1 to the entire Rd with the same trade-off as (1) (see Appendices B and C for details). Furthermore, we note that all algorithms for `2 extend to `p , for p ∈ (1, 2), with c2 being replaced with cp in the expressions for the exponents (ρq , ρu ). This follows from the reduction shown in [Ngu14, Section 5.5]. 1.5 Lower bounds Lower bounds for NNS and ANN have also received much attention. Such lower bounds are almost always obtained in the cell-probe model [MNSW98, Mil99]. In the cell-probe model one measures the number of memory cells the query algorithm accesses. Despite a number of success stories, high cell-probe lower bounds are notoriously hard to prove. In fact, there are few techniques for proving high cell-probe lower bounds, for any (static) data structure problem. For ANN in particular, we have no viable techniques to prove ω(log n) query time lower bounds. Due to this state of affairs, one may rely on restricted models of computation, which nevertheless capture existing upper bounds. Early lower bounds for NNS were shown for data structures in the exact or deterministic settings [BOR99, CCGL99, BR02, Liu04, JKKR04, CR04, PT06, Yin16]. In [CR04, LPY16] an almost tight cell-probe lower bound is shown for the randomized Approximate Nearest Neighbor Search under the `1 distance. In the latter problem, there is no distance threshold r, and instead the goal is to find a data point that is not much further than the closest data point. This twist is the main source of hardness, and the result is not applicable to the ANN problem as introduced above. There are few results that show lower bounds for randomized data structures for the approximate near neighbor problem (the setting studied in the present paper). The first such result [AIP06] 4 shows that any data structure that solves (1 + ε, r)-ANN for `1 or `2 using t cell probes requires 2 space nΩ(1/tε ) .2 This result shows that the algorithms of [IM98, KOR00] are tight up to constants in the exponent for t = O(1). In [PTW10] (following up on [PTW08]), the authors introduce a general framework for proving lower bounds for ANN under any metric. They show that lower bounds for ANN are implied by the robust expansion of the underlying metric space. Using this framework, [PTW10] show that 2) (c, r)-ANN using t cell probes requires space n1+Ω(1/tc) for the Hamming distance and n1+Ω(1/tc for the Euclidean distance (for every c > 1). Lower bounds were also shown for other metrics. For the `∞ distance, [ACP08] show a lower bound for deterministic ANN data structures, matching the upper bound of [Ind01b] for decision trees. This lower bound was later generalized to randomized data structures [PTW10, KP12]. A recent result [AV15] adapts the framework of [PTW10] to Bregman divergences. There are also lower bounds for restricted models: for LSH [MNP07, OWZ14, AIL+ 15] and for data-dependent LSH [AR16]. We note that essentially all of the aforementioned lower bounds for ANN under `1 [AIP06, PTW10, MNP07, AIL+ 15, AR16] use the random instance defined in Section 1.3 as a hard distribution. 1.6 Our results In this paper, we show both new cell-probe and restricted lower bounds for (c, r)-ANN. In all cases our lower bounds match the upper bounds from [Laa15c]. Our lower bounds use the random instance from Section 1.3 as a hard distribution. Via a standard reduction, we obtain similar hardness results for `p with 1 < p ≤ 2 (with c being replaced by cp ). 1.6.1 One cell probe First, we show a tight (up to no(1) factors) lower bound on the space needed to solve ANN for a random instance, for query algorithms that use a single cell probe. More formally, we prove the following theorem: Theorem 1.2 (Section 4). Any data structure that: • solves (c, r)-ANN for the Hamming random instance (as defined in Section 1.3) with probability 2/3, • operates on memory cells of size no(1) , • for each query, looks up a single cell, c must use at least n( c−1 ) 2 2 −o(1) words of memory. The correct dependence on 1/ε requires a stronger LSD lower bound from [Pǎt11]. 5 The space lower bound matches the upper bound from [Laa15c] (see also Appendix C) for ρq = 0. The previous best lower bound from [PTW10] for a single probe was weaker by a polynomial factor. We prove Theorem 1.2 by computing tight bounds on the robust expansion of a hypercube {−1, 1}d as defined in [PTW10]. Then, we invoke a result from [PTW10], which yields the de- sired cell probe lower bound. We obtain estimates on the robust expansion via a combination of the hypercontractivity inequality and Hölder’s inequality [O’D14]. Equivalently, one could obtain the same bounds by an application of the Generalized Small-Set Expansion Theorem of [O’D14]. 1.6.2 Two cell probes To state our results for two cell probes, we first define the decision version of ANN (first introduced in [PTW10]). Suppose that with every data point p ∈ P we associate a bit xp ∈ {0, 1}. A new goal is: given a query q ∈ {−1, 1}d which is at distance at most r from a data point p ∈ P , and assuming that P \ {p} is at distance more than cr from q, return correct xp with probability at least 2/3. It is easy to see that any algorithm for (c, r)-ANN would solve this decision version. We prove the following lower bound for data structures making only two cell probes per query. Theorem 1.3 (see Section 6). Any data structure that: • solves the decision ANN for the random instance (Section 1.3) with probability 2/3, • operates on memory cells of size o(log n), • accesses at most two cells for each query, c must use at least n( c−1 ) 2 −o(1) words of memory. Informally speaking, we show that the second cell probe cannot improve the space bound by more than a subpolynomial factor. To the best of our knowledge, this is the first lower bound for the space of any static data structure problem without a polynomial gap between t = 1 and t ≥ 2 cell-probes. Previously, the highest ANN lower bound for two queries was weaker by a polynomial factor [PTW10]. (This remains the case even if we plug the tight bound on the robust expansion into the framework of [PTW10].) Thus, in order to obtain a higher lower bound for t = 2, we need to depart from the framework of [PTW10]. Our proof establishes a connection between two-query data structures (for the decision version of ANN), and two-query locally-decodable codes (LDC). A possibility of such a connection was suggested in [PTW10]. In particular, we show that a data structure violating the lower bound from Theorem 1.3 implies an efficient two-query LDC, which contradicts known LDC lower bounds from [KdW04, BRdW08]. The first lower bound for unrestricted two-query LDCs was proved in [KdW04] via a quantum argument. Later, the argument was simplified and made classical in [BRdW08]. It turns out that 6 for our lower bound, we need to resort to the original quantum argument of [KdW04] since it has a better dependence on the noise rate a code is able to tolerate. During the course of our proof, we do not obtain a full-fledged LDC, but rather an object which can be called an LDC on average. For this reason, we are unable to use [KdW04] as a black box but rather adapt their proof to the average case. Finally, we point out an important difference with Theorem 1.2: in Theorem 1.3 we allow words to be merely of size o(log n) (as opposed to no(1) ). Nevertheless, for the decision version of ANN the upper bounds from [Laa15c] hold even for such “tiny” words. In fact, our techniques do not allow us to handle words of size Ω(log n) due to the weakness of known lower bounds for twoquery LDC for large alphabets. In particular, our argument can not be pushed beyond word size √ 2Θ( e log n) in principle, since this would contradict known constructions of two-query LDCs over large alphabets [DG15]! 1.6.3 The general time–space trade-off Finally, we prove conditional lower bound on the entire time–space trade-off that is tight (up to no(1) factors), matching the upper bound from [Laa15c] (see also Appendix C). Note that—since we show polynomial query time lower bounds—proving similar lower bounds unconditionally is far beyond the current reach of techniques, modulo major breakthrough in cell probe lower bounds. Our lower bounds are proved in the following model, which can be loosely thought of comprising all hashing-based frameworks we are aware of: Definition 1.4. A list-of-points data structure for the ANN problem is defined as follows: • We fix (possibly randomly) sets Ai ⊆ {0, 1}d , for i = 1 . . . m; also, with each possible query point q ∈ {0, 1}d , we associate a (random) set of indices I(q) ⊆ [m]; • For a given dataset P , the data structure maintains m lists of points L1 , L2 , . . . , Lm , where Li = P ∩ Ai ; • On query q, we scan through each list Li for i ∈ I(q) and check whether there exists some p ∈ Li with kp − qk1 ≤ cr. If it exists, return p. P P The total space is defined as s = m + m i=1 |Li | and the query time is t = |I(q)| + i∈I(q) |Li |. For this model, we prove the following theorem. Theorem 1.5 (see Section 5). Consider any list-of-points data structure for (c, r)-ANN for random instances of n points in the d-dimensional Hamming space with d = ω(log n), which achieves a total space of n1+ρu +o(1) , and has query time nρq −o(1) , for 2/3 success probability. Then it must hold that: √ √ √ c ρq + (c − 1) ρu ≥ 2c − 1. 7 (3) We note that our model captures the basic hashing-based algorithms, in particular most of the known algorithms for the high-dimensional ANN problem [KOR00, IM98, Ind01b, Ind01a, GIM99, Cha02, DIIM04, Pan06, AC09, AI06, Pag16, Kap15], including the recently proposed LocalitySensitive Filters scheme from [BDGL16, Laa15c]. The only data structures not captured are the data-dependent schemes from [AINR14, Raz14, AR15]; we conjecture that the natural extension of the list-of-point model to data-dependent setting would yield the same lower bound. In particular, Theorem 1.5 uses the random instance as a hard distribution, for which being data-dependent seems to offer no advantage. Indeed, a data-dependent lower bound in the standard LSH regime (where ρq = ρs ) has been recently shown in [AR16], and matches (3) for ρs = ρq . 1.7 Other related work There has been a lot of recent algorithmic advances on high-dimensional similarity search, including better algorithms for the closest pair problem3 [Val15, AW15, KKK16, KKKÓ16], locality-sensitive filters [BDGL16, Laa15c], LSH without false negatives [Pag16, PP16], to name just a few. 2 Preliminaries We introduce a few definitions from [PTW10] to setup the nearest neighbor search problem for which we show lower bounds. Definition 2.1. The goal of the (c, r)-approximate nearest neighbor problem with failure probability δ is to construct a data structure over a set of points P ⊂ {0, 1}d supporting the following query: given any point q such that there exists some p ∈ P with kq − pk1 ≤ r, report some p0 ∈ P where kq − p0 k1 ≤ cr with probability at least 1 − δ. Definition 2.2 ([PTW10]). In the Graphical Neighbor Search problem (GNS), we are given a bipartite graph G = (U, V, E) where the dataset comes from U and the queries come from V . The dataset consists of pairs P = {(pi , xi ) | pi ∈ U, xi ∈ {0, 1}, i ∈ [n]}. On query q ∈ V , if there exists a unique pi with (pi , q) ∈ E, then we want to return xi . We will sometimes use the GNS problem to prove lower bounds on (c, r)-ANN as follows: we build a GNS graph G by taking U = V = {0, 1}d , and connecting two points u ∈ U, v ∈ V iff they are at a distance at most r (see details in [PTW10]). We will also need to make sure that in our instances q is not closer than cr to other points except the near neighbor. 2.1 Robust Expansion The following is the fundamental property of a metric space that [PTW10] use to prove lower bounds. 3 These can be seen as the off-line version of NNS/ANN. 8 Definition 2.3 (Robust Expansion [PTW10]). For a GNS graph G = (U, V, E), fix a distribution e on E ⊂ U × V , and let µ be the marginal on U and η be the marginal on V . For δ, γ ∈ (0, 1], the robust expansion Φr (δ, γ) is defined as follows: Φr (δ, γ) = 2.2 min A⊂V :η(A)≤δ min e(A×B) B⊂U : e(A×V ) ≥γ µ(B) . η(A) Locally Decodable Codes Finally, our 2-cell lower bounds uses results on Locally Decodable Codes (LDCs). We present the standard definitions and results on LDCs below, although we will need a weaker definition (and stronger statement) for our 2-query lower bound in Section 6. Definition 2.4. A (t, δ, ε) locally decodable code (LDC) encodes n-bit strings x ∈ {0, 1}n into m-bit codewords C(x) ∈ {0, 1}m such that, for each i ∈ [n], the bit xi can be recovered with probability 1 2 + ε while making only t queries into C(x), even if the codeword is arbitrarily modified (corrupted) in δm bits. We will use the following lower bound on the size of the LDCs. Theorem 2.5 (Theorem 4 from [KdW04]). If C : {0, 1}n → {0, 1}m is a (2, δ, ε)-LDC, then 2 n) m ≥ 2Ω(δε 3 . (4) Robust Expansion of the Hamming Space The goal of this section is to compute tight bounds for the robust expansion Φr (δ, γ) in the Hamming space of dimension d, as defined in the preliminaries. We use these bounds for all of our lower bounds in the subsequent sections. We use the following model for generating dataset points and queries (which is essentially the random instance from the introduction). Definition 3.1. For any x ∈ {−1, 1}n , Nσ (x) is a probability distribution over {−1, 1}n representing the neighborhood of x. We sample y ∼ Nσ (x) by choosing yi ∈ {−1, 1} for each coordinate i ∈ [d]. With probability σ, yi = xi . With probability 1 − σ, yi is set uniformly at random. Given any Boolean function f : {−1, 1}n → R, the function Tσ f : {−1, 1}n → R is Tσ f (x) = E [f (y)] (5) y∼Nσ (x) In the remainder of this section, will work solely on the Hamming space V = {−1, 1}d . We let σ =1− 1 c d = ω(log n) 9 and µ will refer to the uniform distribution over V . The choice of σ allows us to make the following observations. A query is generated as follows: we sample a dataset point x uniformly at random and then generate the query y by sampling d 2c (1 y ∼ Nσ (x). From the choice of σ, d(x, y) ≤ every other point in the dataset x0 + o(1)) with high probability. In addition, for 6= x, the pair (x0 , y) is distributed as two uniformly random points (even though y ∼ Nσ (x), because x is randomly distributed). Therefore, by taking a union- bound over all dataset points, we can conclude that with high probability, d(x0 , y) ≥ d2 (1 − o(1)) for each x0 6= x. Given a query y generated as described above, we know there exists a dataset point x whose distance to the query is d(x, y) ≤ d(x0 , y) ≥ d 2 (1 d 2c (1 + o(1)). Every other dataset point lies at a distance − o(1)). Therefore, the two distances are a factor of c − o(1) away. The following lemma is the main result of this section, and we will reference this lemma in subsequent sections. Lemma 3.2 (Robust expansion). In the Hamming space equipped with the Hamming norm, for any p, q ∈ [1, ∞) where (q − 1)(p − 1) = σ 2 , any γ ∈ [0, 1] and m ≥ 1,  1 ,γ m Φr  ≥ γqm 1+ pq −q (6) The robust expansion comes from a straight forward application from small-set expansion. In fact, one can easily prove tight bounds on robust expansion via the following lemma: Theorem 3.3 (Generalized Small-Set Expansion Theorem, [O’D14]). Let 0 ≤ σ ≤ 1. Let A, B ⊂ 2 2 {−1, 1}n have volumes exp(− a2 ) and exp(− b2 ) and assume 0 ≤ σa ≤ b ≤ a. Then Pr (x,y) σ−correlated   1 a2 − 2σab + b2 [x ∈ A, y ∈ B] ≤ exp − 2 1 − σ2 However, we compute the robust expansion via an application of the Bonami-Beckner Inequality and Hölder’s inequality. This computation gives us a bit more flexibility with respect to parameters which will become useful in subsequent sections. We now recall the necessary tools. p Theorem 3.4 (Bonami-Beckner Inequality [O’D14]). Fix 1 ≤ p ≤ q and 0 ≤ σ ≤ (p − 1)/(q − 1). Any Boolean function f : {−1, 1}n → R satisfies kTσ f kq ≤ kf kp (7) Theorem 3.5 (Hölder’s Inequality). Let f : {−1, 1}n → R and g : {−1, 1}n → R be arbitrary Boolean functions. Fix s, t ∈ [1, ∞) where 1 s + 1 t = 1. Then hf, gi ≤ kf ks kgkt 10 (8) We will let f and g be indicator functions for two sets A and B and use a combination of the Bonami-Beckner Inequality and Hölder’s Inequality to lower bound the robust expansion. The operator Tσ will applied to f will measure the neighborhood of set A. We will compute an upper bound on the correlation of the neighborhood of A and B (referred to as γ) with respect to the volumes of A and B, and the expression will give a lower bound on robust expansion. We also need the following lemma. Lemma 3.6. Let p, q ∈ [1, ∞), where (p − 1)(q − 1) = σ 2 and f, g : {−1, 1}d → R be two Boolean functions. Then hTσ f, gi ≤ kf kp kgkq Proof. We first apply Hölder’s Inequality to split the inner-product into two parts. Then we apply the Bonami-Beckner Inequality to each part. hTσ f, f i = hT√σ f, T√σ gi ≤ kT√σ f ks kT√σ gkt p−1 s + 1 and t = , so σ s−1 2 and p ≥ 1 because (p − 1)(q − 1) = σ ≤ σ. We have We pick the parameters s = q≤ 1 s (9) (10) + 1t = 1. Note that p ≤ s because σ < 1 σ + 1 = t. p−1 (11) In addition, r r p−1 √ = σ s−1 q−1 p = (q − 1)(s − 1) t−1 r (q − 1)(p − 1) √ = = σ. σ (12) (13) So we can apply the Bonami-Beckner Inequality to both norms. We obtain kT√σ f ks kT√σ gkt ≤ kf kp kgkq (14) We are now ready to prove Lemma 3.2. Proof of Lemma 3.2. We use Lemma 3.6 and the definition of robust expansion. For any two sets A, B ⊂ V , let a = 1 |A| 2d and b = 1 |B| 2d be the measure of set A and B with respect to the uniform distribution. We refer to 1A : {−1, 1}d → {0, 1} and 1B : {−1, 1}d → {0, 1} as the indicator 11 functions for A and B. γ= = 1 q− pq −1 (16) 1 bq (17) ≤ b. Let A and B be the minimizers of  Φr 1 ,γ m  b a satisfying (15) and a ≤ 1 m. b a = (18) ≥ γqa q− pq −1 1+ pq −q ≥ γqm 4 (15) 1 hTσ 1A , 1B i a ≤ ap Therefore, γ q a [x ∈ B | y ∈ A] Pr x∼µ,y∼Nσ (x) (19) . (20) Tight Lower Bounds for 1 Cell Probe Data Structures In this section, we prove Theorem 1.2. Our proof relies on the main result of [PTW10] for the GNS problem: Theorem 4.1 (Theorem 1.5 [PTW10]). There exists an absolute constant γ such that the following holds. Any randomized algorithm for a weakly independent instance of GNS which is correct with probability greater than 1 2 must satisfy mt w ≥ Φr n  1 γ , mt t  (21) 1 Proof of Theorem 1.2. The bound comes from a direct application of the computation of Φr ( m , γ) in Lemma 3.2 to the bound in Theorem 4.1. Setting t = 1 in Theorem 4.1, we obtain  mw ≥ n · Φr 1 ,γ m  1+ pq −q ≥ nγ q m (22) (23) for some p, q ∈ [1, ∞) and (p − 1)(q − 1) = σ 2 . Rearranging the inequality, we obtain p m≥ p γ p−1 n pq−q p w pq−q 12 (24) Let p = 1 + log log n log n , and q = 1 + σ 2 logloglogn n . Then 1 m ≥ n σ2 −o(1) . Since σ = 1 − 1 c (25) and w = no(1) , we obtain the desired result. Corollary 4.2. Any 1 cell probe data structures with cell size O(log n) for c-approximate nearest neighbors on the sphere in `2 needs n 1+ 2c2 −1 −o(1) (c2 −1)2 many cells. Proof. Each point in the Hamming space {−1, 1}d (after scaling by √1 ) d can be thought of as lying √ on the unit sphere. If two points are a distance r apart in the Hamming space, then they are 2 r apart on the sphere with `2 norm. Therefore a data structure for a c2 -approximation on the sphere gives a data structure for a c-approximation in the Hamming space. 5 Lower Bounds for List-of-Points Data Structures In this section we prove Theorem 1.5, i.e., a tight lower bound against data structure that fall inside the “list-of-points” model, as defined in Def. 1.4. Recall that Ai ⊂ V is the subset of dataset points which get placed in Li . Let Bi ⊂ V the subset of query points which query Li , this is well defined, since Bi = {v ∈ V | i ∈ I(v)}. Suppose we sample a random dataset point u ∼ V and then a random query point v from the neighborhood of u. Let γi = Pr[v ∈ Bi | u ∈ Ai ] (26) and let si = µ(Ai ). On instances where n dataset points {ui }ni=1 are drawn randomly, and a query v is drawn from the neighborhood of a random dataset point, we can exactly characterize the query time. T = m X i=1 E[T ] = ≥ m X i=1 m X i=1  1{v ∈ Bi } 1 + µ(Bi ) + m X i=1 n X j=1  1{uj ∈ Ai } γi µ(Ai ) + (n − 1) Φr (si , γi )si + m X i=1 m X µ(Bi )µ(Ai ) i=1 m X si γi + (n − 1) 13 (27) i=1 Φr (si , γi )s2i (28) (29) Since the data structure succeeds with probability γ, it must be the case that m X i=1 si γi ≥ γ = [∃i ∈ [m] : v ∈ Bi , uj ∈ Ai ] Pr j∼[n],v∼N (uj ) (30) And since we use at most space O(s), n m X i=1 si ≤ O(s) (31) From Lemma 3.2, for any p, q ∈ [1, ∞) where (p − 1)(q − 1) = σ 2 where σ = 1 − 1c , E[T ] ≥ γ≤ O s n ≥ m X q− pq q γi si i=1 m X + (n − 1) m X q− pq +1 q γi si +γ (32) i=1 s i γi (33) si (34) i=1 m X i=1 We set S = {i ∈ [m] : si 6= 0} and for i ∈ S, vi = si γi . E[T ] ≥ X viq i∈S   q − pq +1 −p si + (n − 1)si (35)  X  γ q  − pq − pq +1 ≥ si + (n − 1)si |S| (36) i∈S where we used the fact q ≥ 1. Consider F = X i∈S −q si p + (n − − q +1 1)si p  (37) We analyze three cases separately: • 0 < ρu ≤ • 1 2c−1 1 2c−1 < ρu ≤ • ρu = 0. 2c − 1 (c − 1)2 For the first two cases, we let q = 1 − σ 2 + σβ p= β β−σ 14 s β= 1 − σ2 ρu (38) Since 0 < ρu ≤ 2c − 1 , one can verify β > σ and both p and q are at least 1. (c − 1)2 Lemma 5.1. When ρu ≤ 1 2c−1 , and s = n1+ρu , E[T ] ≥ Ω(nρq ) where ρq and ρu satisfy Equation 3. Proof. In this setting, p and q are constants, and q ≥ p. Therefore, in Equation 37. So we minimize the sum by taking si = E[T ] ≥ Ω s ) O( n|S| γ q s−q/p+1 nq/p |S|q−q/p q p ≥ 1, so F is convex in all si ’s and substituting in (36), ! ≥ Ω(γ q s1−q nq/p ) (39) (40) since q − q/p > 0 and |S| ≤ s. In addition, p, q and γ are constants, E[T ] ≥ Ω(nρq ) where ρq = (1 + ρu )(1 − q) + q p (1 − σ 2 + σβ)(β − σ) = (1 + ρu )(σ 2 − σβ) + β p  2 √ = 1 − σ 2 − ρu σ √ 2 2c − 1 √ (c − 1) = − ρu · c c Lemma 5.2. When ρu > (41) (42) (43) (44) 1 2c−1 , E[T ] ≥ Ω(nρq ) where ρq and ρu satisfy Equation 3. Proof. We follow a similar pattern to Lemma 5.1. However, we may no longer assert that F is convex in all si ’s. ∂F = ∂si   q   − p −1 −q q q − si + − + 1 (n − 1)si p p p (45) q The gradient is zero when each si = . Since q < p, this value is positive and (p − q)(n − 1)  P m i∈S si ≤ O n for large enough n. F is continuous, so it is minimized exactly at that point.  − q  q p γ q So E[T ] ≥ |S| |S| (p−q)(n−1) . Again, we maximize |S| to minimize this sum since q ≥ 1. 15 Therefore − q  γ q  p q E[T ] ≥ s s (p − q)(n − 1) (46) Since p, q and γ are constants, E[T ] ≥ Ω(nρq ) where ρq = (1 + ρu )(1 − q) + q p which is the same expression for ρq as in Lemma 5.1. Lemma 5.3. When ρu = 0 (so s = O(n)), E[T ] ≥ nρq −o(1) 2c − 1 = 1 − σ2. c2 Proof. In this case, although we cannot set p and q as in Equation 38, we let where ρq = q = 1 + σ2 · log n log log n p=1+ log log n . log n Since q > p, we have q E[T ] = Ω(γ q s1−q n p ) =n (47) 1−σ 2 −o(1) (48) giving the desired expression. 6 Tight Lower Bounds for 2 Cell Probe Data Structures In this section we prove a cell probe lower bound for ANN for t = 2 cell probes as stated in Theorem 1.3. As in [PTW10], we will prove lower bounds for GNS when U = V with measure µ (see Def. 2.2). We assume there is an underlying graph G with vertex set V . For any particular point p ∈ V , its neighborhood N (p) is the set of points with an edge to p in the graph G. In the 2-query GNS problem, we have a dataset P = {pi }ni=1 ⊂ V of n points as well as a bit-string x ∈ {0, 1}n . We let D denote a data structure with m cells of w bits each. We can think of D as a map [m] → {0, 1}w which holds w bits in each cell. D will depend on the dataset P as well as the bit-string x. The problem says that: given a query point q ∈ V , if there exists a unique neighbor pi ∈ N (q) in the dataset, we should return xi with probability at least cell-probes to D. 16 2 3 after making two Theorem 6.1. There exists a constant γ > 0 such that any non-adaptive GNS data structure holding a dataset of n ≥ 1 points which succeeds with probability 2 3 using two cell probes and m cells of w bits satisfies    1 m log m · 2O(w) ≥ Ω Φr ,γ . n m Theorem 1.3 will follow from Theorem 6.1 together with the robust expansion bound from Lemma 3.2 for the special case when probes to the data structure are non-adaptive. For the rest of this section, we prove Theorem 6.1. We will later show how to reduce adaptive algorithms losing a sub-polynomial factor in the space for w = o( logloglogn n ) in Section 6.6.3. At a high-level, we will show that with a “too-good-to-be-true” data structure with small space we can construct a weaker notion of 2-query locally-decodable code (LDC) with small noise rate using the same amount of space4 . Even though we our notion of LDC is weaker than Def. 2.4, we can use most of the tools for showing 2-query LDC lower bounds from [KdW04]. These arguments use quantum information theory arguments, which are very robust and still work with the 2-query weak LDC we construct. We note that [PTW10] was the first to suggest the connection between nearest neighbor search and locally-decodable codes. This work represents the first concrete connection which gives rise to better lower bounds. Proof structure. The proof of Theorem 6.1 proceeds in six steps. 1. First we will use Yao’s principle to reduce to the case of deterministic non-adaptive data structures for GNS with two cell-probes. We will give distributions over n-point datasets P , as well as bit-strings x and a query q. After defining these distributions, we will assume the existence of a deterministic data structure which makes two cell-probes non-adaptively and succeeds with probability at least 2 3 when the inputs are sampled according to the three distributions. 2. We will modify the deterministic data structure in order to get “low-contention” data structures. These are data structures which do not rely on any single cell too much similar to Def. 6.1 in [PTW10]. This will be a simple argument where we increase the space bound by a constant factor to achieve this guarantee. 3. In the third step, we will take a closer look at how the low-contention data structure probes the cells. We will use ideas from [PTW10] to understand how queries neighboring particular dataset points probe various cells of the data structure. We will conclude with finding a fixed n-point dataset P . A constant fraction of the points in the dataset will satisfy the 4 A 2-query LDC corresponds to LDCs which make two probes to their memory contents. Even though there is a slight ambiguity with the data structure notion of query, we say “2-query LDCs” in order to be consistent with the LDC literature. 17 following condition: many queries in the neighborhood of these points probe disjoint pairs of cells. Intuitively, this means information about these dataset points must be spread out over various cells. 4. We will show that for the fixed dataset P , we could still recover a constant fraction bits with significant probability even if we corrupt the contents of some cells. This will be the crucial connection between nearest neighbor data structures and LDCs. 5. We will reduce to the case of 1-bit words in order to apply the LDC arguments from [KdW04]. We will increase the number of cells by a factor of 2w and decrease the probability of success from 1 2 + η to 1 2 + η . 22w 6. Finally, we will design an LDC with weaker guarantees and use the arguments in [KdW04] to prove lower bounds on the space of the weak LDC. 6.1 Deterministic Data Structure Definition 6.2. A non-adaptive randomized algorithm R for the GNS problem with two cell-probes is an algorithm specified by the following three components. The data structure preprocesses a dataset P = {pi }ni=1 consisting of n points, as well as a bit-string x ∈ {0, 1}n , in order to produce a data structure D : [m] → {0, 1}w which depends on P and x. On a query q, R(q) chooses two indices (i, j) ∈ [m]2 , and specifies a function fq : {0, 1}w × {0, 1}w → {0, 1}. The output is given as fq (Dj , Dk ). We require that Pr [fq (Dj , Dk ) = xi ] ≥ R,D 2 3 whenever q ∈ N (pi ) and pi is the unique such neighbor. Note that the indices (i, j) which R generates to probe the data structure as well as the function fq is independent of P and x. Definition 6.3. We define the following distributions: • Let P be the distribution over n-point datasets given by sampling n times from our space V uniformly at random. • Let X be the uniform distribution over {0, 1}n . • Let Q(P ) be the distribution over queries given by first picking a dataset point p ∈ P uniformly at random and then picking q ∈ N (p) uniformly at random. Lemma 6.4. Assume R is a non-adaptive randomized algorithm for GNS using two cell-probes. Then there exists a non-adaptive deterministic algorithm A for GNS using two cell-probes which also produces a data structure D : [m] → {0, 1}w and on query q chooses two indices j, k ∈ [m] 18 (again, independently of P and x) to probe in D as well as a function fq : {0, 1}w ×{0, 1}w → {0, 1} where Pr 2 [fq (Dj , Dk ) = xi ] ≥ . 3 P ∼P,x∼X ,q∼Q(P ) Proof. The following is a direct application of Yao’s principle to the success probability of the algorithm. By assumption, there exists a distribution over algorithms which can achieve probability of success at least 2 3 for any single query. Therefore, for the fixed distributions P, X , and Q, there exists a deterministic algorithm achieving at least the same success probability. In order to simplify notation, for any algorithm A, we let AD (q) denote output of the algorithm. When we write AD (q), we assume that A(q) outputs a pair of indices (j, k) as well as the function fq : {0, 1}w × {0, 1}w → {0, 1}, and the algorithm outputs fq (Dj , Dk ). For any fixed dataset P = {pi }ni=1 and bit-string x ∈ {0, 1}n , we have Pr [AD (q) = xi ] = q∼N (pi ) Pr [fq (Dj , Dk ) = xi ] q∼N (pi ) by definition. This allows us to succinctly state the probability of correctness when the query is a neighbor of pi without caring about the specific cells the algorithm probes or the function fq the algorithm uses to make its decision. The important thing to note is that the contents of the data structure D may depend on the dataset P and the bit-string x. However, the algorithm A which produces D as well as the indexes for the probes to D for any query point is deterministic. From now on, we will assume the existence of a non-adaptive deterministic algorithm A with success probability at least 2 3 using m cells of width w. The success probability is taken over the random choice of the dataset P ∼ P, x ∼ X and q ∼ Q(P ). 6.2 Making Low-Contention Data Structures For any t ∈ {1, 2} and j ∈ [m], let At,j be the set of queries which probe cell j at the t-th probe of algorithm A. These sets are well defined independently of the dataset P and the bit-string x. In particular, we could write At,j = {q ∈ V | A probes cell j in probe t when querying q } by running the “probing” portion of the algorithm without the need to specify a dataset P or bit-string x. We could write down At,j by simply trying every query point q and seeing which cells the algorithm probes. In other words, since the algorithm is deterministic, the probing portion of algorithm A is completely specified by two collections A1 = {A1,j }j∈[m] and A2 = {A2,j }j∈[m] as well as the 19 function fq . A1 and A2 are two partitions of the query space V . On query q, if q ∈ At,j , we make the t-th probe to cell j. We output the value of fq after observing the contents of the cells. We now define the notion of low-contention data structures, which informally requires the data structure not rely on any one particular cell too much, namely no At,j is too large. Definition 6.5. A deterministic non-adaptive algorithm A using m cells has low contention if every set µ(At,j ) ≤ 1 m for t ∈ {1, 2} and j ∈ [m]. We now use the following lemma to argue that up to a small increase in space, a data structure can be made low-contention. Lemma 6.6. Suppose A is a deterministic non-adaptive algorithm for GNS with two cell-probes using m cells, then there exists an deterministic non-adaptive algorithm A0 for GNS with two cellprobes using 3m cells which succeeds with the same probability and has low contention. Proof. We first handle A1 and then A2 . Suppose µ(A1,j ) ≥ 1 m, (j) then we partition A1,j into enough parts {A1,k }k of size 1 m. be at most one set with measure between 0 and For each of part (j) A1,k 1 m. There will of the partition, we make (j) a new cell jk with the same contents as cell j. When a query lies inside A1,k we probe the new cell jk . From the data structure side, the cell contents are replicated for all additional cells. The number of cells in this data structure is at most 2m, since there can be at most m cells of size 1 m and for each original cell, we have only one cell with small measure. Also, keep in mind that we have not modified the sets in A2 , and thus there is at most m cells for which µ(A2,j ) ≥ We do the same procedure for the second collection A2 . If some µ(A2,j ) ≥ cell into multiple cells of size exactly 1 m, 1 m, 1 m. we partition that with one extra small cell. Again, the total number of cells will be m for dividing the heavy cells in the second probe, and at most m for the lighter cells in the second probe. We have added m cells in having µ(A1,j ) ≤ order to make µ(A2,j ) ≤ 1 m 1 m for all j ∈ [m], and added at most m cells in for all j ∈ [m]. Therefore, we have at most 3m cells. Additionally, the contents of the cells remain the same, so the algorithm succeeds with the same probability. Given Lemma 6.6, we will assume that A is a deterministic non-adaptive algorithm for GNS with two cell-probes using m cells which has low contention. The extra factor of 3 in the number of cells will be pushed into the asymptotic notation. 6.3 Datasets which shatter We fix some γ > 0 which can be thought of as a sufficiently small constant. 20 Definition 6.7 (Weak-shattering [PTW10]). We say a partition A1 , . . . , Am of V (K, γ)-weakly shatters a point p if  X 1 + µ(Ai ∩ N (p)) − ≤γ K i∈[m] where the operator (·)+ takes only the non-negative part. For a fixed dataset point p ∈ P , we refer to γ as the “slack” in the shattering. The slack corresponds to the total measure which is leftover after we remove an arbitrary subset of At,j ∩N (p) of measure at least 1 K. Lemma 6.8 (Shattering [PTW10]). Let A1 , . . . , Ak collection of disjoint subsets of measure at most 1 m. Then Pr [p is (K, γ)-weakly shattered] ≥ 1 − γ p∼µ for K = Φr  1 γ2 m, 4  · γ3 16 . For the remainder of the section, we let  K = Φr 1 γ2 , m 4  · γ3 . 16 We are interested in the shattering of dataset points with respect to the collections A1 and A2 . The dataset points which get shattered will probe many cells in the data structure. Intuitively, a bit xi corresponding to a dataset point pi which is weakly-shattered should be stored across various cells. So for each point p which is (K, γ) weakly-shattered we define subsets β1 , β2 ⊂ N (p) which hold the “slack” of the shattering of p with respect to A1 and A2 . Definition 6.9. Let p ∈ V be a dataset point which is (K, γ)-weakly shattered by A1 and A2 . Let β1 , β2 ⊂ N (p) be arbitrary subsets where each j ∈ [m] satisfies µ(A1,j ∩ N (p) \ β1 ) ≤ 1 K µ(A2,j ∩ N (p) \ β2 ) ≤ 1 K and Since p is (K, γ)-weakly shattered, we can pick β1 and β2 with measure at most γ each. We will refer to β(p) = β1 ∪ β2 . For a given collection A, let S(A, p) be the event that the collection A (K, γ)-weakly shatters p. Note that Lemma 6.8 implies that Prp∼µ [S(A, p)] ≥ 1 − γ. 21 Lemma 6.10. With high probability over the choice of n point dataset, at most 4γn points do not satisfy S(A1 , p) and S(A2 , p). Proof. This is a simple Chernoff bound. The expected number of points p which do not satisfy S(A1 , p) and S(A2 , p) is at most 2γn. Therefore, the   probability that more than 4γn points do not 2γn satisfy S(A1 , p) and S(A2 , p) is at most exp − 3 . We call a dataset good if there are at most 4γn dataset points which are not (K, γ)-weakly shattered by A1 and A2 . Lemma 6.11. There exists a good dataset P = {pi }ni=1 where Pr x∼X ,q∼Q(P ) [AD (q) = xi ] ≥ 2 − o(1) 3 Proof. This follows via a simple argument. For any fixed dataset P = {pi }ni=1 , let P= [AD (q) = xi ] Pr x∼X ,q∼Q(p) to simplify notation. 2 ≤ E [P] 3 P ∼P (49) = (1 − o(1)) · E [P | P is good] + o(1) · E [P | P is not good] P ∼P P ∼P 2 − o(1) ≤ (1 − o(1)) · E [P | P is good] 3 P ∼P (50) (51) Therefore, there exists a dataset which is not shattered by at most 4γn and Prx∼X ,q∼Q(P ) [AD (y) = xi ] ≥ 2 3 6.4 Corrupting some cell contents of shattered points − o(1). In the rest of the proof, we fix the dataset P = {pi }ni=1 satisfying the conditions of Lemma 6.11, i.e., such that Pr [AD (q) = xi ] ≥ x∼X ,q∼Q(P ) 2 − o(1). 3 We now introduce the notion of corruption of the data structure cells D, which parallels the notion of noise in locally-decodable codes. Remember that, after fixing some bit-string x, the algorithm A produces some data structure D : [m] → {0, 1}w . Definition 6.12. We call D0 : [m] → {0, 1}w a corrupted version of D at k cells if they differ on at most k cells, i.e., if |{i ∈ [m] : D(i) 6= D0 (i)}| ≤ k. 22 In this section, we will show there exist a dataset P of n points and a set S ⊂ [n] of size Ω(n) with good recovery probability, even if the algorithm has access to a corrupted version of data structure. Definition 6.13. For a fixed x ∈ {0, 1}n , let cx (i) = Pr [AD (q) = xi ]. q∼N (pi ) Note that from the definitions of Q(P ), Ex∼X ,i∈[n] [cx (i)] ≥ 2 3 − o(1). Lemma 6.14. Fix ε > 0, vector x ∈ {0, 1}n , and let D : [m] → {0, 1}w be the data structure the algorithm produces on dataset P with bit-string x. Let D0 be a corruption of D at εK cells. For every i ∈ [n] where events S(A1 , pi ) and S(A2 , pi ) occur, we have 0 Pr [AD (q) = xi ] ≥ cx (i) − 2γ − 2ε. q∼N (pi ) Proof. Note that cx (i) represents the probability mass of queries in the neighborhood of pi for which the algorithm returns xi . We want to understand how much of that probability mass we remove when we avoid probing the corrupted cells. Since the dataset point pi is (K, γ)-weakly shattered by A1 and A2 , at most 2γ probability mass of ci (x) will come from the slack of the shattering. In more detail, if q ∼ N (pi ), we have probability ci (x) that the algorithm returns xi . If we query q ∼ N (pi ) \ β(pi ), in the worst case, every query q ∈ β(pi ) returns xi ; thus, after removing β(pi ), we have removed at most 2γ probability mass over queries that the algorithm returns correctly. The remaining probability mass is distributed across various cells, where each cell has at most mass for being probing in the first probe, and at most 1 K 1 K mass for being probe in the second probe. Therefore, if we remove εK cells, the first or second probe will probe those cells with probability at most 2ε. If we avoid the εK corrupted cells, the algorithm has the same output as it did with the uncorrupted data structure D. Therefore, the probability mass which returns xi on query q in the corrupted data structure D0 is at least cx (i) − 2γ − 2ε. Lemma 6.15. Fix γ > 0 to be a small enough constant. There exists a set S ⊂ [n] of size |S| = Ω(n), such that whenever i ∈ S, we have that: events S(A1 , pi ) and S(A2 , pi ) occur, and E [cx (i)] ≥ x∼X where ν can be taken to be some small constant like 1 + ν, 2 1 10 . Proof. There is at most a 4γ-fraction of the dataset points which are not shattered. For simplifying the notation, let P = Pri∈[n] [Ex∼X [cx (i)] ≥ 1 2 + ν, S(A1 , pi ) ∧ S(A2 , pi )]. We need to show that 23 P = Ω(1), since we will set S ⊂ [n] as  1 + ν, S(A1 , pi ) ∧ S(A2 , pi ) . 2  S= i ∈ [n] | E [cx (i)] ≥ x∼X The argument is a straight-forward averaging argument. 2 − o(1) ≤ E [cx (i)] 3 x∼X ,i∈[n] (52)  ≤ 1 · 4γ + 1 · P +   1 1 − o(1) − 4γ − ν ≤ P · −ν . 6 2 1 +ν 2  · (1 − P) (53) (54) We combine Lemma 6.14 and Lemma 6.15 to obtain the following condition on the dataset. Lemma 6.16. Fix small enough γ > 0 and ε > 0. There exists a set S ⊂ [n] where |S| = Ω(n), such that whenever i ∈ S,   1 Pr [A (q) = xi ] ≥ + η 2 q∼N (pi ) E x∼X D0 where η = ν − 2γ − 2ε and the algorithm probes a corrupted version of the data structure D. Proof. Consider the set S ⊂ [n] satisfying the conditions of Lemma 6.15. Whenever i ∈ S, pi gets (K, γ)-weakly shattered and on average over x, A will recover xi with probability 1 2 + ν when probing the data structure D on input q ∼ N (pi ), i.e  E x∼X  1 Pr [A (q) = xi ] ≥ + ν. 2 q∼N (pi ) D Therefore, from Lemma 6.14, if A probes D0 which is a corruption of D in any εK cells, A will recover xi with probability at least other words,  E x∼X 1 2 + ν − 2γ − 2ε averaged over all x ∼ X where q ∼ N (pi ). In  1 Pr [A (q) = xi ] ≥ + ν − 2γ − 2ε. 2 q∼N (pi ) D0 Theorem 6.17. There exists an algorithm A and a subset S ⊆ [n] of size S = Ω(n), where A makes only 2 cell probes to D. Furthermore, for any corruption of D at εK cells, A can recover xi with probability at least 1 2 + η over the random choice of x ∼ X . Proof. In order to extract xi , we generate a random query q ∼ N (pi ) and we probe the data structure at the cells assuming the data structure is uncorrupted. From Lemma 6.16, there exists 24 a set S ⊂ [n] of size Ω(n) for which this algorithm recovers xi with probability at least the probability is taken on average over all possible x ∈ 1 2 + η, where {0, 1}n . We fix the algorithm A and subset S ⊂ [n] satisfying the conditions of Theorem 6.17. Since we fixed the dataset P = {pi }ni=1 satisfying the conditions of Lemma 6.11, we say that x ∈ {0, 1}n is an input to algorithm A in order to initialize the data structure with dataset P = {pi }ni=1 and xi is the bit associated with pi . 6.5 Decreasing the word size We now reduce to the case when the word size is w = 1 bit. Lemma 6.18. There exists a deterministic non-adaptive algorithm A0 which on input x ∈ {0, 1}n builds a data structure D0 using m2w cells of width 1 bit. Any i ∈ S as well as any corruption C to D0 in at most εK positions satisfies  E x∈{0,1}n  η 1 Pr [A (q) = xi ] ≥ + 2w 2 2 q∼N (pi ) 0C Proof. Given algorithm A which constructs the data structure D : [m] → {0, 1}w on input x ∈ {0, 1}n , construct the following data structure D0 : [m · 2w ] → {0, 1}. For each cell Dj ∈ {0, 1}w , make 2w cells which contain all the parities of the w bits in Dj . This blows up the size of the data structure by 2w . Fix i ∈ S and q ∈ N (pi ) if algorithm A produces a function fq : {0, 1}w × {0, 1}w → {0, 1} which succeeds with probability at least 1 2 + ζ over x ∈ {0, 1}n , then there exists a signed parity on some input bits which equals fq in at least 1 2 + ζ 22w inputs x ∈ {0, 1}n . Let Sj be the parity of the bits of cell j and Sk be the parity of the bits of cell k. Let fq0 : {0, 1} × {0, 1} → {0, 1} denote the parity or the negation of the parity which equals fq on 1 2 + ζ 22w possible input strings x ∈ {0, 1}n . Algorithm A0 will evaluate fq0 at the cell containing the parity of the Sj bits in cell j and the parity of Sk bits in cell k. Let ISj , ISk ∈ [m · 2w ] be the indices of these cells. Since we can find such function for each fixed q ∈ N (pi ), any two cell probes to j, k ∈ [m], and any corrupted version of D, the algorithm A0 satisfies  E x∈{0,1}n Pr [fq0 (CI0 S , CI0 S ) j k q∼N (pi )  = xi ] ≥ 1 η + 2 22w whenever i ∈ S. For the remainder of the section, we will prove a version of Theorem 6.1 for algorithms with 1-bit words. Given Lemma 6.18, we will modify the space to m · 2w and the probability to 1 2 + η 22w to obtain the answer. So for the remainder of the section, assume algorithm A has 1 bit words. 25 6.6 Connecting to Locally-Decodable Codes To complete the proof of Theorem 6.1, it remains to prove the following lemma. Lemma 6.19. Let A be a non-adaptive deterministic algorithm which makes 2 cell probes to a data structure D of m cells of width 1 bit which can handle εK corruptions and recover xi with probability 1 2 + η on random input x ∈ {0, 1}n whenever i ∈ S for some fixed S of size Ω(n). Then the following must hold  m log m ≥ Ω εKη 2 . n The proof of the lemma uses [KdW04] and relies heavily on notions from quantum computing, in particular quantum information theory as applied to LDC lower bounds. 6.6.1 Crash Course in Quantum Computing We introduce a few concepts from quantum computing that are necessary in our subsequent arguments. A qubit is a unit-length vector in C2 . We write a qubit as a linear combination of the basis states (10 ) = |0i and (01 ) = |1i. The qubit α = (αα12 ) can be written |αi = α1 |0i + α2 |1i where we refer to α1 and α2 as amplitudes and |α1 |2 + |α2 |2 = 1. An m-qubit system is a vector in the tensor product C2 ⊗ · · · ⊗ C2 of dimension 2m . The basis states correspond to all 2m bit-strings of length m. For j ∈ [2m ], we write |ji as the basis state |j1 i ⊗ |j2 i ⊗ · · · ⊗ |jm i where j = j1 j2 . . . jm is the binary representation of j. We will write the m-qubit quantum state |φi as unit-vector P given by linear combination over all 2m basis states. So |φi = j∈[2m ] φj |ji. As a shorthand, hφ| corresponds to the conjugate transpose of a quantum state. A mixed state {pi , |φi i} is a probability distribution over quantum states. In this case, we the quantum system is in state |φi i with probability pi . We represent mixed states by a density matrix P pi |φi i hφi |. A measurement is given by a family of positive semi-definite operators which sum to the identity operator. Given a quantum state |φi and a measurement corresponding to the family of opera- tors {Mi∗ Mi }i , the measurement yields outcome i with probability kMi |φi k2 and results in state Mi |φi , kMi |φik2 where the norm k · k is the `2 norm. We say the measurement makes the observation Mi . Finally, a quantum algorithm makes a query to some bit-string y ∈ {0, 1}m by starting with the state |ci |ji and returning (−1)c·yj |ci |ji. One can think of c as the control qubit taking values 0 or 1; if c = 0, the state remains unchanged by the query, and if c = 1 the state receives a (−1)yj in its P amplitude. The queries may be made in superposition to a state, so the state c∈{0,1},j∈[m] αcj |ci |ji P becomes c∈{0,1},j∈[m] (−1)c·yj αcj |ci |ji. 26 6.6.2 Weak quantum random access codes from GNS algorithms Definition 6.20. C : {0, 1}n → {0, 1}m is a (2, δ, η)-LDC if there exists a randomized decoding algorithm making at most 2 queries to an m-bit string y non-adaptively, and for all x ∈ {0, 1}n , i ∈ [n], and y ∈ {0, 1}m where d(y, C(x)) ≤ δm, the algorithm can recover xi from the two queries to y with probability at least 1 2 + η. In their paper, [KdW04] prove the following result about 2-query LDCs. Theorem 6.21 (Theorem 4 in [KdW04]). If C : {0, 1}n → {0, 1}m is a (2, δ, η)-LDC, then m ≥ 2Ω(δη 2 n) . The proof of Theorem 6.21 proceeds as follows. They show how to construct a 1-query quantumLDC from a classical 2-query LDC. From a 1-query quantum-LDC, [KdW04] constructs a quantum random access code which encodes n-bit strings in O(log m) qubits. Then they apply a quantum information theory lower bound due to Nayak [Nay99]: Theorem 6.22 (Theorem 2 stated in [KdW04] from Nayak [Nay99]). For any encoding x → ρx of n-bit strings into m-qubit states, such that a quantum algorithm, given query access to ρx , can decode any fixed xi with probability at least 1/2 + η, it must hold that m ≥ (1 − H(1/2 + η))n. Our proof will follow a pattern similar to the proof of Theorem 6.21. We assume the existence of a GNS algorithm A which builds a data structure D : [m] → {0, 1}. We can think of D as a length m binary string encoding x; in particular let Dj ∈ {0, 1} be the jth bit of D. Our algorithm A from Theorem 6.17 does not satisfy the strong properties of an LDC, preventing us from applying 6.21 directly. However, it does have some LDC-ish guarantees. In particular, we can support εK corruptions to D. In the LDC language, this means that we can tolerate a noise rate of δ = εK m . Additionally, we cannot necessarily recover every coordinate xi , but we can recover xi for i ∈ S, where |S| = Ω(n). Also, our success probability is of i ∈ S and the random choice of the bit-string x ∈ arguments of [KdW04] to this weaker setting. {0, 1}n . 1 2 + η over the random choice Our proof follows by adapting the εK and a ≤ 1 is a constant. Let D be the data structure m from above (i.e., satisfying the hypothesis of Lemma 6.19). Then there exists a quantum algorithm Lemma 6.23. Let r = 2 δa2 where δ = that, starting from the r(log m + 1)-qubit state with r copies of |U (x)i, where |U (x)i = √ X 1 (−1)c·Dj |ci |ji 2m c∈{0,1},j∈[m] can recover xi for any i ∈ S with probability 1 2 + Ω(η) (over a random choice of x). Assuming Lemma 6.23, we can complete the proof of Lemma 6.19. 27 Proof of Lemma 6.19. The proof is similar to the proof of Theorem 2 of [KdW04]. Let ρx represent the s-qubit system consisting of the r copies of the state |U (x)i, where s = r(log m + 1); ρx is an encoding of x. Using Lemma 6.23, we can assume we have a quantum algorithm that, given ρx , can recover xi for any i ∈ S with probability α = 1 2 + Ω(η) over the random choice of x ∈ {0, 1}n . We will let H(A) be the Von Neumann entropy of A, and H(A|B) be the conditional entropy and H(A : B) the mutual information. Let XM be the (n + s)-qubit system 1 2n X x∈{0,1}n |xi hx| ⊗ ρx . The system corresponds to the uniform superposition of all 2n strings concatenated with their encoding ρx . Let X be the first subsystem corresponding to the first n qubits and M be the second subsystem corresponding to the s qubits. We have H(XM ) = n + 1 2n X x∈{0,1}n H(ρx ) ≥ n = H(X) H(M ) ≤ s, (55) (56) since M has s qubits. Therefore, the mutual information H(X : M ) = H(X)+H(M )−H(XM ) ≤ s. P Note that H(X|M ) ≤ ni=1 H(Xi |M ). By Fano’s inequality, if i ∈ S, H(Xi |M ) ≤ H(α) where we are using the fact that Fano’s inequality works even if we can recover xi with probability α averaged over all x’s. Additionally, if i ∈ / S, H(Xi |M ) ≤ 1. Therefore, s ≥ H(X : M ) = H(X) − H(X|M ) ≥ H(X) − n X i=1 H(Xi |M ) (57) (58) ≥ n − |S|H(α) − (n − |S|) (59) = |S|(1 − H(α)). (60) Furthermore, 1 − H(α) ≥ Ω(η 2 ) since, and |S| = Ω(n), we have  2m (log m + 1) ≥ Ω nη 2 2 a εK  m log m ≥ Ω εKη 2 . n 28 (61) (62) It remains to prove Lemma 6.23, which we proceed to do in the rest of the section. We first show that we can simulate our GNS algorithm with a 1-query quantum algorithm. Lemma 6.24. Fix an x ∈ {0, 1}n and i ∈ [n]. Let D : [m] → {0, 1} be the data structure produced by algorithm A on input x. Suppose Prq∼N (pi ) [AD (q) = xi ] = 1 2 + b for b > 0. Then there exists a quantum algorithm which makes one quantum query (to D) and succeeds with probability 1 2 + 4b 7 to output xi . Proof. We use the procedure in Lemma 1 of [KdW04] to determine the output algorithm A on input x at index i. The procedure simulates two classical queries with one quantum query. All quantum algorithms which make 1-query to D can be specified in the following manner: there is a quantum state |Qi i, where |Qi i = X c∈{0,1},j∈[m] αcj |ci |ji which queries D. After querying D, the resulting quantum state is |Qi (x)i, where |Qi (x)i = X c∈{0,1},j∈[m] (−1)c·Dj αcj |ci |ji . There is also a quantum measurement {R, I − R} such that, after the algorithm obtains the state |Qi (x)i, it performs the measurement {R, I − R}. If the algorithm observes R, it outputs 1 and if the algorithm observes I − R, it outputs 0. From Lemma 6.24, we know there must exist a state |Qi i and {R, I − R} where if algorithm A succeeds with probability probability 1 2 + 4η 7 1 2 + η on random x ∼ {0, 1}n , then the quantum algorithm succeeds with on random x ∼ {0, 1}n . In order to simplify notation, we write p(φ) as the probability of making observation R from state |φi. Since R is a positive semi-definite matrix, R = M ∗ M and so p(φ) = kM |φi k2 . In exactly the same way as [KdW04], we can remove parts of the quantum state |Qi (x)i where αcj > √1 δm = √1 . εK If we let L = {(c, j) | αcj ≤ obtain the quantum state 1 a |Ai (x)i, where |Ai (x)i = X √1 }, εK (−1)c·Dj αcj |ci |ji after keeping only the amplitudes in L, we a= (c,j)∈L s X 2 αcj (c,j)∈L Lemma 6.25. Fix i ∈ S. The quantum state |Ai (x)i satisfies         1 1 8η p A (x) | x = 1 − p A (x) | x = 0 ≥ 2. E E i i i i n n a a 7a x∈{0,1} x∈{0,1} 29 Proof. Note that since |Qi (x)i and {R, I − R} simulate A and succeed with probability at least 1 2 + 4η 7 on a random x ∈ {0, 1}n , we have that 1 1 1 4η E [p (Qi (x)) | xi = 1] + E [1 − p (Qi (x)) | xi = 0] ≥ + , 2 x∈{0,1}n 2 x∈{0,1}n 2 7 (63) which we can simplify to say E x∈{0,1}n [p (Qi (x)) | xi = 1] + E x∈{0,1}n [p (Qi (x)) | xi = 0] ≥ 8η . 7 (64) Since |Qi (x)i = |Ai (x)i + |Bi (x)i and |Bi (x)i contains at most εK parts, if all probes to D in |Bi (x)i had corrupted values, the algorithm should still succeed with the same probability on random inputs x. Therefore, the following two inequalities hold: 8η 7 x∈{0,1}n x∈{0,1}n 8η E [p (Ai (x) − B(x)) | xi = 1] + E [p (Ai (x) − B(x)) | xi = 0] ≥ n n 7 x∈{0,1} x∈{0,1} E [p (Ai (x) + B(x)) | xi = 1] + [p (Ai (x) + B(x)) | xi = 0] ≥ E Note that p(φ ± ψ) = p(φ) + p(ψ) ± (hφ| R |ψi + hψ| D |φi) and p( 1c φ) = p(φ) . c2 (65) (66) One can verify by averaging the two inequalities (65) and (66) that we get the desired expression. Lemma 6.26. Fix i ∈ S. There exists a quantum algorithm that starting from the quantum state 1 a |Ai (x)i, can recover the value of xi with probability 1 2 + 2η 7a2 over random x ∈ {0, 1}n . Proof. The algorithm and argument are almost identical to Theorem 3 in [KdW04], we just check that it works under the weaker assumptions. Let     1 q1 = p Ai (x) | xi = 1 E a x∈{0,1}n From Lemma 6.25, we know q1 − q0 ≥ 8η . 7a2 on random x ∈ {0, 1}n . Assume q1 ≥ 1 2     1 q0 = p Ai (x) | xi = 0 . E a x∈{0,1}n In order to simplify notation, let b = a quantum algorithm which starting from state 1 a 4η . 7a2 So we want |Ai (x)i can recover xi with probability + b, since otherwise q0 ≤ 1 2 1 2 + b 2 − b and the same argument will work for 0 and 1 flipped. Also, assume q1 + q0 ≥ 1, since otherwise simply outputting 1 on observation R and 0 on observation I − R will work. 1 The algorithm works in the following way: it outputs 0 with probability 1 − q1 +q and otherwise 0 makes the measurement {R, I − R} on state 1 a |Ai (x)i. If the observation made is R, then the algorithm outputs 1, otherwise, it outputs 0. The probability of success over random input x ∈ 30 {0, 1}n is E x∈{0,1}n [Pr[returns correctly]] = 1 1 E [Pr[returns 1] | xi = 1] + E [Pr[returns 0] | xi = 0] . (67) 2 x∈{0,1}n 2 x∈{0,1}n When xi = 1, the probability the algorithm returns correctly is (1 − q)p the probability the algorithm returns correctly is q + (1 − q)(1 − 1 a Ai (x) p( a1 Ai (x))).  and when xi = 0, So simplifying (67), 1 1 [Pr[returns correctly]] = (1 − q)q1 + (q + (1 − q)(1 − q0 )) 2 2 x∈{0,1}n 1 b ≥ + . 2 2 (68) E (69) Now we can finally complete the proof of Lemma 6.23. Proof of Lemma 6.23. Again, the proof is exactly the same as the finishing arguments of Theorem 3 in [KdW04], and we simply check the weaker conditions give the desired outcome. On input i ∈ [n] and access to r copies of the state |U (x)i, the algorithm applies the measurement {Mi∗ Mi , I−Mi∗ Mi } where Mi = √ εK X (c,j)∈L αcj |c, ji hc, j| . This measurement is designed in order to yield the state makes the observation {Mi∗ Mi , I − Mi∗ Mi } Mi∗ Mi . 1 a |Ai (x)i on |U (x)i if the measurement The fact that the amplitudes of |Ai (x)i are not too large makes a valid measurement. The probability of observing Mi∗ Mi is hU (x)| Mi∗ Mi |U (x)i = δa2 2 , where we used that δ = εK m . So the algorithm repeatedly applies the measurement until observing outcome Mi∗ Mi . If it never makes the observation, the algorithm outputs 0 or 1 uniformly at random. If the algorithm does observe Mi∗ Mi , it runs the output of the algorithm of Lemma 6.26. The following simple calculation (done in [KdW04]) gives the desired probability of success on random input, E x∈{0,1}n 2 r [Pr[returns correctly]] ≥ 1 − (1 − δa /2) ≥ 1 η + 2. 2 7a 31   1 2η + 2 2 7a  + (1 − δa2 /2)r · 1 2 (70) (71) 6.6.3 On adaptivity We can extend our lower bounds from the non-adaptive to the adaptive setting. Lemma 6.27. If there exists a deterministic data structure which makes two queries adaptively and succeeds with probability at least 1 2 + η, there exists a deterministic data structure which makes the two queries non-adaptively and succeeds with probability at least 1 2 + η 2w . Proof. The algorithm guesses the outcome of the first cell probe and simulates the adaptive algorithm with the guess. After knowing which two probes to make, we probe the data structure non-adaptively. If the algorithm guessed the contents of the first cell-probe correctly, then we output the value of the non-adaptive algorithm. Otherwise, we output a random value. This algorithm   is non-adaptive and succeeds with probability at least 1 − 21w · 12 + 21w 12 + η = 12 + 2ηw . Applying this theorem, from an adaptive algorithm succeeding with probability 23 , we obtain 1 2 a non-adaptive algorithm which succeeds with probability the intended 2 3, + Ω(2−w ). This value is lower than but we the reduction to a weak LDC still goes through when let γ = Θ(2−w ), ε = Θ(2−w ). Another consequence is that |S| = Ω(2−w n). One can easily verify that for small enough γ = Ω(2−w ),    m log m · 2Θ(w) 1 ≥ Ω Φr ,γ n m Which yields tight lower bounds (up to sub-polynomial factors) for the Hamming space when w = o(log n). In the case of the Hamming space, we can compute robust expansion in a similar fashion to Theorem 1.2. In particular, for any p, q ∈ [1, ∞) where (p − 1)(q − 1) = σ 2 , we have m log m · 2O(w) ≥ Ω(γ q m1+q/p−q ) n mq−q/p+o(1) ≥ n1−o(1) γ q m≥n =n Let p = 1 + n → ∞. wf (n) log n 1−o(1) q−q/p+o(1) p −o(1) pq−q γ γ q q−q/p+o(1) p −o(1) p−1 (72) (73) (74) (75) log n and q = 1 + σ 2 wf (n) where we require that wf (n) = o(log n) and f (n) → ∞ as log n 1 m ≥ n σ2 −o(1) 2 log log n ≥n 1 −o(1) σ2 32 (76) (77) 7 Acknowledgments We would like to thank Jop Briët for helping us to navigate literature about LDCs. We thank Omri Weinstein for useful discussions. References [AC09] Nir Ailon and Bernard Chazelle. The fast Johnson–Lindenstrauss transform and approximate nearest neighbors. SIAM J. Comput., 39(1):302–322, 2009. [ACP08] Alexandr Andoni, Dorian Croitoru, and Mihai Pǎtraşcu. Hardness of nearest neighbor under L-infinity. In Proceedings of the Symposium on Foundations of Computer Science (FOCS), pages 424–433, 2008. [ADI+ 06] Alexandr Andoni, Mayur Datar, Nicole Immorlica, Piotr Indyk, and Vahab Mirrokni. Locality-sensitive hashing scheme based on p-stable distributions. Nearest Neighbor Methods for Learning and Vision: Theory and Practice, Neural Processing Information Series, MIT Press, 2006. [AI06] Alexandr Andoni and Piotr Indyk. Near-optimal hashing algorithms for approximate nearest neighbor in high dimensions. In Proceedings of the Symposium on Foundations of Computer Science (FOCS), pages 459–468, 2006. [AI08] Alexandr Andoni and Piotr Indyk. Near-optimal hashing algorithms for approximate nearest neighbor in high dimensions. Communications of the ACM, 51(1):117–122, 2008. [AIL+ 15] Alexandr Andoni, Piotr Indyk, Thijs Laarhoven, Ilya Razenshteyn, and Ludwig Schmidt. Practical and optimal LSH for angular distance. In NIPS, 2015. Full version available at http://arxiv.org/abs/1509.02897. [AINR14] Alexandr Andoni, Piotr Indyk, Huy L. Nguyen, and Ilya Razenshteyn. Beyond locality-sensitive hashing. In Proceedings of the ACM-SIAM Symposium on Discrete Algorithms (SODA), 2014. Full version at http://arxiv.org/abs/1306.1547. [AIP06] Alexandr Andoni, Piotr Indyk, and Mihai Pǎtraşcu. On the optimality of the dimensionality reduction method. In Proceedings of the Symposium on Foundations of Computer Science (FOCS), pages 449–458, 2006. [And09] Alexandr Andoni. Nearest Neighbor Search: the Old, the New, and the Impossible. PhD thesis, MIT, 2009. Available at http://www.mit.edu/~andoni/thesis/main.pdf. [AR15] Alexandr Andoni and Ilya Razenshteyn. Optimal data-dependent hashing for approximate near neighbors. In Proceedings of the Symposium on Theory of Computing (STOC), 2015. Full version at http://arxiv.org/abs/1501.01062. [AR16] Alexandr Andoni and Ilya Razenshteyn. Tight lower bounds for data-dependent locality-sensitive hashing. In Proceedings of the ACM Symposium on Computational Geometry (SoCG), 2016. Available at http://arxiv.org/abs/1507.04299. [AV15] Amirali Abdullah and Suresh Venkatasubramanian. A directed isoperimetric inequality with application to bregman near neighbor lower bounds. In Proceedings of the Forty-Seventh Annual ACM on Symposium on Theory of Computing, STOC 2015, Portland, OR, USA, June 14-17, 2015, pages 509–518, 2015. [AW15] Josh Alman and Ryan Williams. Probabilistic polynomials and hamming nearest neighbors. In Proceedings of the Symposium on Foundations of Computer Science (FOCS), 2015. 33 [BDGL16] Anja Becker, Léo Ducas, Nicolas Gama, and Thijs Laarhoven. New directions in nearest neighbor searching with applications to lattice sieving. In Proceedings of the ACM-SIAM Symposium on Discrete Algorithms (SODA), 2016. [BOR99] Allan Borodin, Rafail Ostrovsky, and Yuval Rabani. Lower bounds for high dimensional nearest neighbor search and related problems. Proceedings of the Symposium on Theory of Computing, 1999. [BR02] Omer Barkol and Yuval Rabani. Tighter bounds for nearest neighbor search and related problems in the cell probe model. J. Comput. Syst. Sci., 64(4):873–896, 2002. Previously appeared in STOC’00. [BRdW08] Avraham Ben-Aroya, Oded Regev, and Ronald de Wolf. A hypercontractive inequality for matrix-valued functions with applications to quantum computing and ldcs. In 49th Annual IEEE Symposium on Foundations of Computer Science, FOCS 2008, October 25-28, 2008, Philadelphia, PA, USA, pages 477–486, 2008. [CCGL99] Amit Chakrabarti, Bernard Chazelle, Benjamin Gum, and Alexey Lvov. A lower bound on the complexity of approximate nearest-neighbor searching on the Hamming cube. Proceedings of the Symposium on Theory of Computing (STOC), 1999. [Cha02] Moses Charikar. Similarity estimation techniques from rounding. In Proceedings of the Symposium on Theory of Computing (STOC), pages 380–388, 2002. [Cla88] Ken Clarkson. A randomized algorithm for closest-point queries. SIAM Journal on Computing, 17:830–847, 1988. [CR04] Amit Chakrabarti and Oded Regev. An optimal randomised cell probe lower bounds for approximate nearest neighbor searching. Proceedings of the Symposium on Foundations of Computer Science (FOCS), 2004. [DG03] Sanjoy Dasgupta and Anupam Gupta. An elementary proof of a theorem of Johnson and Lindenstrauss. Random Structures Algorithms, 22(1):60–65, 2003. [DG15] Zeev Dvir and Sivakanth Gopi. 2-server PIR with sub-polynomial communication. In Proceedings of the Forty-Seventh Annual ACM on Symposium on Theory of Computing, STOC 2015, Portland, OR, USA, June 14-17, 2015, pages 577–584, 2015. [DIIM04] Mayur Datar, Nicole Immorlica, Piotr Indyk, and Vahab Mirrokni. Locality-sensitive hashing scheme based on p-stable distributions. In Proceedings of the ACM Symposium on Computational Geometry (SoCG), 2004. [DRT11] Inderjit S. Dhillon, Pradeep Ravikumar, and Ambuj Tewari. Nearest neighbor based greedy coordinate descent. In Advances in Neural Information Processing Systems 24: 25th Annual Conference on Neural Information Processing Systems 2011. Proceedings of a meeting held 12-14 December 2011, Granada, Spain., pages 2160–2168, 2011. [GIM99] Aristides Gionis, Piotr Indyk, and Rajeev Motwani. Similarity search in high dimensions via hashing. Proceedings of the 25th International Conference on Very Large Data Bases (VLDB), 1999. [HIM12] Sariel Har-Peled, Piotr Indyk, and Rajeev Motwani. Approximate nearest neighbor: Towards removing the curse of dimensionality. Theory of Computing, 1(8):321–350, 2012. [HLM15] Thomas Hofmann, Aurélien Lucchi, and Brian McWilliams. Neighborhood watch: Stochastic gradient descent with neighbors. CoRR, abs/1506.03662, 2015. [IM98] Piotr Indyk and Rajeev Motwani. Approximate nearest neighbor: towards removing the curse of dimensionality. Proceedings of the Symposium on Theory of Computing (STOC), pages 604–613, 1998. 34 [Ind01a] Piotr Indyk. High-dimensional computational geometry. Ph.D. Thesis. Department of Computer Science, Stanford University, 2001. [Ind01b] Piotr Indyk. On approximate nearest neighbors in `∞ norm. J. Comput. Syst. Sci., 63(4):627–638, 2001. Preliminary version appeared in FOCS’98. [JKKR04] T. S. Jayram, Subhash Khot, Ravi Kumar, and Yuval Rabani. Cell-probe lower bounds for the partial match problem. Journal of Computer and Systems Sciences, 69(3):435–447, 2004. See also STOC’03. [JL84] William B. Johnson and Joram Lindenstrauss. Extensions of lipshitz mapping into hilbert space. Contemporary Mathematics, 26:189–206, 1984. [Kap15] Michael Kapralov. Smooth tradeoffs between insert and query complexity in nearest neighbor search. In Proceedings of the ACM Symposium on Principles of Database Systems (PODS), pages 329–342, New York, NY, USA, 2015. ACM. [KdW04] Iordanis Kerenidis and Ronald de Wolf. Exponential lower bound for 2-query locally decodable codes via a quantum argument. Journal of Computer and System Sciences, 69(3):395–420, 2004. [KKK16] Matti Karppa, Petteri Kaski, and Jukka Kohonen. A faster subquadratic algorithm for finding outlier correlations. In Proceedings of the ACM-SIAM Symposium on Discrete Algorithms (SODA), 2016. Available at http://arxiv.org/abs/1510.03895. [KKKÓ16] Matti Karppa, Petteri Kaski, Jukka Kohonen, and Padraig Ó Catháin. Explicit correlation amplifiers for finding outlier correlations in deterministic subquadratic time. In Proceedings of the 24th European Symposium Of Algorithms (ESA ’2016), 2016. To appear. [KOR00] Eyal Kushilevitz, Rafail Ostrovsky, and Yuval Rabani. Efficient search for approximate nearest neighbor in high dimensional spaces. SIAM J. Comput., 30(2):457–474, 2000. Preliminary version appeared in STOC’98. [KP12] Michael Kapralov and Rina Panigrahy. NNS lower bounds via metric expansion for `∞ and EMD. In Proceedings of International Colloquium on Automata, Languages and Programming (ICALP), pages 545–556, 2012. [Laa15a] Thijs Laarhoven. Search problems in cryptography: From fingerprinting to lattice sieving. PhD thesis, Eindhoven University of Technology, 2015. [Laa15b] Thijs Laarhoven. Sieving for shortest vectors in lattices using angular locality-sensitive hashing. In Advances in Cryptology - CRYPTO 2015 - 35th Annual Cryptology Conference, Santa Barbara, CA, USA, August 16-20, 2015, Proceedings, Part I, pages 3–22, 2015. [Laa15c] Thijs Laarhoven. Tradeoffs for nearest neighbors on the sphere. CoRR, abs/1511.07527, 2015. [Liu04] Ding Liu. A strong lower bound for approximate nearest neighbor searching in the cell probe model. Information Processing Letters, 92:23–29, 2004. [LJW+ 07] Qin Lv, William Josephson, Zhe Wang, Moses Charikar, and Kai Li. Multi-probe LSH: efficient indexing for high-dimensional similarity search. In VLDB, 2007. [LPY16] Mingmou Liu, Xiaoyin Pan, and Yitong Yin. Randomized approximate nearest neighbor search with limited adaptivity. CoRR, abs/1602.04421, 2016. [Mei93] Stefan Meiser. Point location in arrangements of hyperplanes. Information and Computation, 106:286–303, 1993. [Mil99] Peter Bro Miltersen. Cell probe complexity-a survey. Proceedings of the 19th Conference on the Foundations of Software Technology and Theoretical Computer Science, Advances in Data Structures Workshop, page 2, 1999. 35 [MNP07] Rajeev Motwani, Assaf Naor, and Rina Panigrahy. Lower bounds on locality sensitive hashing. SIAM Journal on Discrete Mathematics, 21(4):930–935, 2007. Previously in SoCG’06. [MNSW98] Peter B. Miltersen, Noam Nisan, Shmuel Safra, and Avi Wigderson. Data structures and asymmetric communication complexity. Journal of Computer and System Sciences, 1998. [Nay99] Ashwin Nayak. Optimal lower bounds for quantum automata and random access codes. In Foundations of Computer Science, 1999. 40th Annual Symposium on, pages 369–376. IEEE, 1999. [Ngu14] Huy L. Nguyên. Algorithms for High Dimensional Data. PhD thesis, Princeton University, 2014. Available at http://arks.princeton.edu/ark:/88435/dsp01b8515q61f. [O’D14] Ryan O’Donnell. Analysis of boolean functions. Cambridge University Press, 2014. [OWZ14] Ryan O’Donnell, Yi Wu, and Yuan Zhou. Optimal lower bounds for locality sensitive hashing (except when q is tiny). Transactions on Computation Theory, 6(1):5, 2014. Previously in ICS’11. [Pag16] Rasmus Pagh. Locality-sensitive hashing without false negatives. In Proceedings of the ACM-SIAM Symposium on Discrete Algorithms (SODA), 2016. Available at http://arxiv.org/abs/1507.03225. [Pan06] Rina Panigrahy. Entropy-based nearest neighbor algorithm in high dimensions. In Proceedings of the ACM-SIAM Symposium on Discrete Algorithms (SODA), 2006. [Pǎt11] Mihai Pǎtraşcu. Unifying the landscape of cell-probe lower bounds. SIAM Journal on Computing, 40(3):827–847, 2011. See also FOCS’08, arXiv:1010.3783. [PP16] Ninh Pham and Rasmus Pagh. Scalability and total recall with fast CoveringLSH. CoRR, abs/1602.02620, 2016. [PT06] Mihai Pǎtraşcu and Mikkel Thorup. Higher lower bounds for near-neighbor and further rich problems. Proceedings of the Symposium on Foundations of Computer Science (FOCS), 2006. [PTW08] Rina Panigrahy, Kunal Talwar, and Udi Wieder. A geometric approach to lower bounds for approximate near-neighbor search and partial match. In Proceedings of the Symposium on Foundations of Computer Science (FOCS), pages 414–423, 2008. [PTW10] Rina Panigrahy, Kunal Talwar, and Udi Wieder. Lower bounds on near neighbor search via metric expansion. In Proceedings of the Symposium on Foundations of Computer Science (FOCS), pages 805–814, 2010. [Raz14] Ilya Razenshteyn. Beyond Locality-Sensitive Hashing. Master’s thesis, MIT, 2014. [SDI06] Gregory Shakhnarovich, Trevor Darrell, and Piotr Indyk, editors. Nearest Neighbor Methods in Learning and Vision. Neural Processing Information Series, MIT Press, 2006. [TT07] Tengo Terasawa and Yuzuru Tanaka. Spherical LSH for approximate nearest neighbor search on unit hypersphere. Workshop on Algorithms and Data Structures, 2007. [Val88] Leslie G Valiant. Functionality in neural nets. In First Workshop on Computational Learning Theory, pages 28–39, 1988. [Val15] Gregory Valiant. Finding correlations in subquadratic time, with applications to learning parities and the closest pair problem. J. ACM, 62(2):13, 2015. Previously in FOCS’12. [WLKC15] Jun Wang, Wei Liu, Sanjiv Kumar, and Shih-Fu Chang. Learning to hash for indexing big data — a survey. Available at http://arxiv.org/abs/1509.05472, 2015. [WSSJ14] Jingdong Wang, Heng Tao Shen, Jingkuan Song, and Jianqiu Ji. Hashing for similarity search: A survey. CoRR, abs/1408.2927, 2014. 36 [Yin16] Yitong Yin. Simple average-case lower bounds for approximate near-neighbor from isoperimetric inequalities. CoRR, abs/1602.05391, 2016. [ZYS16] Zeyuan Allen Zhu, Yang Yuan, and Karthik Sridharan. Exploiting the structure: Stochastic gradient methods using raw clusters. CoRR, abs/1602.02151, 2016. A Random instances for `2 We first introduce the equivalent notion of the “random instance” (from Section 1.3) for `2 . This instance is what lies at the core of the optimal data-dependent LSH from [AR15]. • All points and queries lie on a unit sphere S d−1 ⊂ Rd . • The dataset P is generated by sampling n unit vectors in S d−1 independently and uniformly at random. • A query q is generated by first choosing a dataset point p ∈ P uniformly at random, and then √ choosing q uniformly at random from all points in S d−1 within distance 2 c from p. • The goal of the data structure is to preprocess P so given a query q generated as above, can recover the corresponding data point p.  √  This instance must be handled by any data structure for c + o(1), c2 -ANN over `2 . In fact, [AR15] show how to reduce any (c, r)-ANN instance into several (pseudo-)random instances from above without increasing the time and space complexity by a polynomial factor. The resulting instances are pseudo-random because they are not exactly the random instance described above, but do have roughly the same distribution over distances from q to the data points. Following the strategy from [AR15], we first analyze the random instance, and then reduce the case for general subsets of Rd to pseudo-random instances. B Spherical case We describe how to solve a random instance of ANN on a unit sphere S d−1 ⊆ Rd , where near √ neighbors are planted within distance 2 c (as defined in Appendix A). We obtain the same time- space tradeoff as in [Laa15c], namely (1). In Appendix C, we extend this algorithm to the entire space Rd using the techniques from [AR15]. e Below we assume that d = O(log n) [JL84, DG03]. B.1 The data structure description The data structure is a single rooted T -ary tree consisting of K + 1 levels. The zeroth level holds the root r, and each node up to the K-th level has T children, so there are T K leaves. For every 37 node v, let Pv be the set of nodes on the path from v to the root except the root itself. Each node v except the root holds a random Gaussian vector zv ∼ N (0, 1)d is stored . For each node v, we define the subset of the dataset Pv ⊂ P :  Pv = p ∈ P | ∀v 0 ∈ Pv hzv0 , pi ≥ η , where η > 0 is a parameter to be chosen later. For instance, Pr = P , since Pr = ∅. Intuitively, each set Pv corresponds to a subset of the dataset which lies in the intersection of sphere caps centered around zv0 for all v 0 ∈ Pv . Every leaf v of the tree stores the subset Pv . To process the query q ∈ S d−1 , we start with the root and make our way down the tree. We consider all the children of the root v with hzv , qi ≥ η 0 , where η 0 > 0 is a parameter to be chosen later, and recurse on them. If we end up in a leaf v, we try all the points from Pv until we find a near neighbor. If we don’t end up in a leaf, or we do not find a neighbor, we fail. B.2 Analysis First, let us√ analyze the probability of success. Let q ∈ S d−1 and p ∈ P be the near neighbor (kp − qk ≤ 2 c ). Lemma B.1. If T ≥ 100 , Prz∼N (0,1)d [hz, pi ≥ η and hz, qi ≥ η 0 ] then the probability of successfully finding p on query q is at least 0.9. Proof. We prove this by induction. Suppose the querying algorithm is at node v, where p ∈ Pv . We would like to prove that—if the conditions of the lemma are met—the probability of success is 0.9. When v is a leaf, the statement is obvious. Suppose it is true for all the children of a node v, then Pr[failure] ≤ Y v 0 child of v    1 − Przv0 hzv0 , pi ≥ η and hzv0 , qi ≥ η 0 · 0.9  T   = 1 − Prz∼N (0,1)d hz, pi ≥ η and hz, qi ≥ η 0 · 0.9 ≤ 0.1. Now let us understand how much space the data structure occupies. In the lemma below, u ∈ S d−1 is an arbitrary point. Lemma B.2. The expected space consumption of the data structure is at most   no(1) · T K 1 + n · Prz∼N (0,1)d [hz, ui ≥ η]K . 38 Proof. The total space the tree nodes occupy is no(1) · T K . At the same time, every point u participates on average in T K · Prz∼N (0,1)d [hz, ui ≥ η]K leaves, hence the desired bound. Finally, let us analyze the expected query time. As before, u ∈ S d−1 is an arbitrary point. Lemma B.3. The expected query time is at most   K  no(1) · T K+1 · Prz∼N (0,1)d hz, ui ≥ η 0 · 1 + n · Prz∼N (0,1)d [hz, ui ≥ η]K . Proof. First, a query touches at most T K · Prz∼N (0,1)d [hz, ui ≥ η 0 ]K tree nodes on average . If a node is not a leaf, the time spent on it is at most no(1) · T . For a fixed leaf and a fixed dataset point, the probability that they end up in the leaf together with the query point is  K Prz∼N (0,1)d hz, ui ≥ η 0 · Prz∼N (0,1)d [hz, ui ≥ η]K , hence we obtain the desired bound. B.3 Setting parameters First, we set K = √ log n. Second, we set η > 0 such that Prz∼N (0,1)d [hz, ui ≥ η] = n−1/K = 2− √ log n . We can simply substitute the parameter setting of Lemma B.2 and Lemma B.3 This gives an expected space of no(1) · T K , and an expected query time  K no(1) · T K+1 · Prz∼N (0,1)d hz, ui ≥ η 0 . As discussed above in Lemma B.1, by setting T ≥ 100 , Prz∼N (0,1)d [hz, pi ≥ η and hz, qi ≥ η 0 ] the probability of success is 0.9. In order to get the desired tradeoff, we can vary T and η 0 . Suppose we want space to be nρs +o(1) 39 for ρs ≥ 1. Then we let T =n ρs +o(1) K = 2(1+o(1))·ρs √ log n , and η 0 > 0 to be the largest number such that for every p, q ∈ S d−1 with kp − qk ≤ √ 2 c , we have √   100 Prz∼N (0,1)d hz, pi ≥ η and hz, qi ≥ η 0 ≥ = 2−(1+o(1))·ρs log n . T Again, substituting in values of Lemma B.3, the query time is  K  √log n no(1) · T K+1 · Prz∼N (0,1)d hz, ui ≥ η 0 = nρs +o(1) · Prz∼N (0,1)d hz, ui ≥ η 0 . The trade-off between ρs and ρq follows from a standard computation of   Prz∼N (0,1)d hz, ui ≥ η 0 given that √ Prz∼N (0,1)d [hz, ui ≥ η] = 2− and log n √   Prz∼N (0,1)d hz, pi ≥ η and hz, qi ≥ η 0 ≥ 2−(1+o(1))·ρs log n . The computation is relatively standard: see [AIL+ 15]. We verify next that the resulting tradeoff is the same as (1) obtained in [Laa15c]. √ 2 c Denote α, β to be real numbers such that k(1, 0) − (α, β)k2 = √ α = 1 − c12 and β = 1 − α2 . Lemma B.4. Suppose that η, η 0 > 0 are such that η, η 0 → ∞ and every p, q ∈ S d−1 √ with kp − qk2 ≤ 2 c and k(α, β)k2 = 1. Namely, η 2 +η 02 −2αηη 0 β2 → ∞. Then, for one has: 2 02 0   −(1+o(1))· η +η −2αηη 2β 2 Prz∼N (0,1)d hz, pi ≥ η and hz, qi ≥ η 0 = e , and, Prz∼N (0,1)d [hz, pi ≥ η] = e−(1+o(1))· η2 2 . Proof. Using spherical symmetry of Gaussians, we can reduce the computation to computing the Gaussian measure of the following two-dimensional set: {(x, y) | x ≥ η 0 and αx + βy ≥ η}. The squared distance from zero to the set is: η 2 + η 02 − 2αηη 0 . β2 40 The result follows from the Appendix A of [AIL+ 15]. From the discussion above, we conclude that one can achieve the following trade-off between space nρs +o(1) and query time nρq +o(1) : 1 + α2 ρs − ρq − 2α p ρs − ρq = 0. (78) We now show that this is equivalent to the tradeoff of [Laa15c], i.e., (1), where ρs = 1 + ρu . Indeed, squaring (78) and replacing ρs = 1 + ρu , we get: (1 + α2 ) + α2 ρu − ρq 2 = 4α2 (1 + ρu − ρq ), (79) or (1 + α2 )2 + α4 ρ2u + ρ2q + 2 · ((1 + α2 )α2 ρu − (1 + α2 )ρq − α2 ρu ρq ) = 4α2 + 4α2 ρu − 4α2 ρq . (80) Simplifying the equation, we get (1 − α2 )2 + α4 ρ2u + ρ2q + 2 · ((α2 − 1)α2 ρu − (1 − α2 )ρq − α2 ρu ρq ) = 0. Remember that we have α = 1 − 1/c2 , and hence α2 = (c2 −1)2 c4 obtain: (2c2 −1)2 c8 + (c2 −1)4 2 ρu c8 + ρ2q − 2 (2c 2 −1)(c2 −1)2 c8 2 2c2 −1 . c4 We further ρu ρq = 0, (82) and 1 − α2 = ρu − 2 2cc4−1 ρq − 2 (c 2 −1)2 c4 (81) or, multiplying by c8 , (2c2 − 1)2 + (c2 − 1)4 ρ2u + c8 ρ2q − 2(2c2 − 1)(c2 − 1)2 ρu − 2(2c2 − 1)c4 ρq − 2(c2 − 1)2 c4 ρu ρq = 0. (83) In a similar fashion, squaring (1), we obtain: or equivalently, √ c4 ρq + (c2 − 1)2 ρu + 2c2 (c2 − 1) ρq ρu = 2c2 − 1, (84) √ 2c2 (c2 − 1) ρq ρu = 2c2 − 1 − c4 ρq − (c2 − 1)2 ρu . (85) Squaring again, we obtain 4c4 (c2 − 1)2 ρq ρu = (2c2 − 1)2 + c8 ρ2q + (c2 − 1)2 ρ2u  + 2 · c4 (c2 − 1)2 ρq ρu − (2c2 − 1)c4 ρq − (2c2 − 1)(c2 − 1)2 ρu , (86) 41 or, simplifying, (2c2 − 1)2 + c8 ρ2q + (c2 − 1)2 ρ2u − 2c4 (c2 − 1)2 ρq ρu − 2(2c2 − 1)c4 ρq − 2(2c2 − 1)(c2 − 1)2 ρu = 0 (87) We now observe that we obtain the same equation as (83) and hence we are done proving that (78) is equivalent to (1). C Upper Bound: General case We show how to extend the result of [Laa15c] (and Appendix B) to the general case using the techniques of [AR15]. In particular, we show how to reduce a worst-case instance to several instances that are random-like. Overall the algorithm from below gives a data structure that solves the (c, r)ANN problem in the d-dimensional Euclidean space, using space O(n1+ρu +o(1) + dn), and query time O(dnρq +o(1) ) for any ρu , ρq > 0 that satisfy: p √ √ c2 ρq + (c2 − 1) ρu = 2c2 − 1. (88) As in [AR15], our data structure is a decision tree. However, there are several notable differences from [AR15]: • The whole data structure is a single decision tree, while in [AR15] we consider a collection of nΘ(1) trees. • Instead of Spherical LSH used in [AR15], we use the partitioning procedure from Section B. • In [AR15], one proceeds with partitioning a dataset until all parts contain less than no(1) points. We change the stopping criterion slightly to ensure the number of “non-cluster” nodes5 on any root-leaf branch is the same. • Unlike [AR15], we do not use a “three-point property” of a random space partition in the analysis. This is related to the fact that the probability success of a single tree is constant, unlike [AR15], where it is polynomially small. • In [AR15] we reduce the general case to the “bounded ball” case using LSH from [DIIM04]. Now we cannot quite do this, since we are aiming at getting a full time-space trade-off. Instead, we use a standard trick of imposing a randomly shifted grid, which reduces an √ e log n) [IM98]. Then, we invoke an upper arbitrary dataset to a dataset of diameter O( bound from [Laa15c] together with a reduction from [Val15], which for this case is enough to proceed. 5 √ think K = O( log n) as in Section B. 42 √ ( 2 − ε)R (1 − Θ(ε2 ))R √ Figure 1: Covering a spherical cap of radius ( 2 − ε)R C.1 Overview We start with a high-level overview. Consider a dataset P0 of n points. We can assume that r = 1 by rescaling. We may also assume that the dataset lies in the Euclidean space of dimension d = Θ(log n·log log n): one can always reduce the dimension to d by applying Johnson-Lindenstrauss lemma [JL84, DG03] while incurring distortion at most 1 + 1/(log log n)Ω(1) with high probability. For simplicity, suppose that the entire dataset P0 and a query lie on a sphere ∂B(0, R) of radius √ R = Oc (1). If R ≤ c/ 2, we are done: this case corresponds to the “random instance” of points and we can apply the data structure from Section B. √ Now suppose that R > c/ 2. We split P0 into a number of disjoint components: l dense components, termed C1 , C2 , . . . , Cl , and one pseudo-random component, termed Pe. The properties of these components are as follows. For each dense component Ci we require that |Ci | ≥ τ n and √ that Ci can be covered by a spherical cap of radius ( 2 − ε)R (see Fig. 1). Here τ, ε > 0 are small quantities to be chosen later. The pseudo-random component Pe contains no more dense components inside. We proceed separately for each Ci and Pe. We enclose every dense component Ci in slightly smaller ball Ei of radius (1 − Θ(ε2 ))R (see Figure 1). For simplicity, let us first ignore the fact that Ci does not necessarily lie on the boundary ∂Ei . Once we enclose each dense cluster in a smaller ball, we recurse on each resulting spherical instance of radius (1 − Θ(ε2 ))R. We treat the pseudorandom part Pe as described in Section B. we sample T Gaussian vectors z1 , z2 , . . . , zT ∼ N (0, 1)d , where T is a parameter to be chosen later (for each pseudo-random remainder separately), and form T subsets of Pe as follows: Pei = {p ∈ Pe | hzi , pi ≥ ηR}, where η > 0 is a parameter to be chosen later (for each pseudo-random remainder separately). Then we recurse on each Pei . Note that after we recurse, there may appear new dense clusters in some sets Pei (e.g., since it may become easier to satisfy the minimum size constraint). 43 Project(R1 , R2 , r) r R1 S1 R2 S2 Figure 2: The definition of Project During the query procedure, we recursively query each Ci with the query point q. For the pseudo-random component Pe, we identify all i’s such that hzi , qi ≥ η 0 R, and query all corresponding children recursively. Here η 0 > 0 is a parameter to be chosen later (for each pseudo-random remainder separately). To analyze our algorithm, we show that we make progress in two ways. First, for dense clusters we reduce the radius of a sphere by a factor of (1 − Θ(ε2 )). Hence, in Oc (1/ε2 ) iterations we √ must arrive to the case of R ≤ c/ 2, which is easy (as argued above). Second, for the pseudo√ random component Pe, we argue that most points lie at a distance ≥ ( 2 − ε)R from each other. √ In particular, the ratio of R to a typical inter-point distance is ≈ 1/ 2, exactly like in a random case. This is the reason we call Pe pseudo-random. This setting is where the data structure from Section B performs well. We now address the issue deferred in the above high-level description: namely, that a dense component Ci does not generally lie on ∂Ei , but rather can occupy the interior of Ei . In this case, we partitioning Ei into very thin annuli of carefully chosen width δ and treat each annulus as a sphere. This discretization of a ball adds to the complexity of the analysis, but is not fundamental from the conceptual point of view. C.2 Formal description We are now ready to describe the data structure formally. It depends on the (small positive) √ parameters τ , ε and δ, as well as an integer parameter K ∼ log n. We also need to choose parameters T , η > 0, η 0 > 0 for each pseudo-random remainder separately. Preprocessing. Our preprocessing algorithm consists of the following functions: • ProcessSphere(P , r1 , r2 , o, R, k) builds the data structure for a dataset P that lies on a sphere ∂B(o, R), assuming we need to solve ANN with distance thresholds r1 and r2 . 44 Moreover, we are guaranteed that queries will lie on ∂B(o, R). The parameter k is a counter which, in some sense, measures how far are we from being done. • ProcessBall(P , r1 , r2 , o, R, k) builds the data structure for a dataset P that lies inside the ball B(o, R), assuming we need to solve ANN with distance thresholds r1 and r2 . Unlike ProcessSphere, here queries can be arbitrary. The parameter k has the same meaning as above. • Process(P ) builds the data structure for a dataset P to solve the general (c, 1)-ANN; • Project(R1 , R2 , r) is an auxiliary function computing the following projection. Suppose we have two spheres S1 and S2 with a common center and radii R1 and R2 . Suppose there are points p1 ∈ S1 and p2 ∈ S2 with kp1 − p2 k = r. Project(R1 , R2 , r) returns the distance between p1 and the point pe2 that lies on S1 and is the closest to p2 (see Figure 2). We now elaborate on algorithms in each of the above functions. ProcessSphere. Function ProcessSphere follows the exposition from Section C.1. We consider three base cases. First, if k = K, then we stop and store the whole P . Second, if r2 ≥ 2R, then the goal can be achieved trivially, since any point from P works as an answer for any valid query. Third, if an algorithm from Section B would give a desired point on the time-space trade-off (in particular, √ if r2 ≥ 2R), then we just choose η, η 0 > 0 and T appropriately (in particular, we set η > 0 such that for any u, v with ku−vk = r2 one has Prz∼N (0,1)d [hz, ui ≥ ηR and hz, vi ≥ ηR] = n−1/K = 2− √ log n ) and make a single step . √ Otherwise, we find dense clusters, i.e., non-trivially smaller balls, of radius ( 2 − ε)R, with centers on ∂B(o, R) that contain many data points (at least τ |P |). These balls can be enclosed e ≤ (1 − Ω(ε2 ))R. For these balls we invoke into balls (with unconstrained center) of radius R ProcessBall with the same k. Then, for the remaining points we perform a single step of the algorithm from Section B with appropriate η, η 0 > 0 and T (in particular, we set η > 0 as above √ for the distance 2R), and recurse on each part with k increased by 1. ProcessBall. First, we consider the following simple base case. If r1 + 2R ≤ r2 , then any point from B(o, R) could serve as a valid answer to any query. In general, we reduce to the spherical case via a discretization of the ball B(o, R). First, we round all the distances to o up to a multiple of δ, which can change distance between any pair of points by at most 2δ (by the triangle inequality). Then, for every possible distance δi from o to a data point and every possible distance δj from o to a query (for admissible integers i, j), we build a separate data structure via ProcessSphere (we also need to check that |δ(i − j)| ≤ r1 + 2δ to ensure that the corresponding pair (i, j) does not yield a trivial instance). We compute the new distance thresholds re1 and re2 for this data structure as follows. After rounding, the new thresholds 45 for the ball instance should be r1 + 2δ and r2 − 2δ, since distances can change by at most 2δ. To compute the final thresholds (after projecting the query to the sphere of radius δi), we just invoke Project (see the definition above). Process. Process reduces the general case to the ball case. We proceed similarly to ProcessSphere, with two modifications. First, we apply a randomized partition using cubes with side √ √ ec ( log n), and solve each part separately. Second, we seek to find dense clusters of raOc ( d) = O dius Oc (1). After there are no such clusters, we apply the reduction to unit-norm case from [Val15, Algorithm 25], and then (a single iteration of) the algorithm from Section B. Project. This is implemented by a formula as in [AR15] (see Figure 2). Overall, the preprocessing creates a decision tree, where the nodes correspond to procedures ProcessSphere, ProcessBall, Process. We refer to the tree nodes correspondingly, using the labels in the description of the query algorithm from below. Query algorithm. Consider a query point q ∈ Rd . We run the query on the decision tree, starting with the root, and applying the following algorithms depending on the label of the nodes: • In Process we first recursively query the data structures corresponding to the clusters. Second, we locate q in the spherical caps, and query the data structure we built for the corresponding subsets of P . • In ProcessBall, we first consider the base case, where we just return the stored point if it is close enough. In general, we check if kq − ok ≤ R + r1 . If not, we can return. Otherwise, we round q so that the distance from o to q is a multiple of δ. Next, we enumerate the distances from o to the potential near neighbor we are looking for, and query the corresponding ProcessSphere children after projecting q on the sphere with a tentative near neighbor (using, naturally, Project). • In ProcessSphere, we proceed exactly the same way as Process modulo the base cases. • In all the cases we try all the points if we store them explicitly (which happens when k = K). C.3 How to set parameters Here we briefly state how one sets the parameters of the data structure. Recall that the dimension is d = Θ(log n · log log n). We set ε, δ, τ as follows: • ε= 1 log log log n ;  • δ = exp −(log log log n)C ; 46  • τ = exp − log2/3 n , where C is a sufficiently large positive constant. Now we need to specify how to set η, η 0 > 0 and T for each pseudo-random remainder. The idea is to set η, η 0 and T such that √ Prz∼N (0,1)d [hz, ui] = n−1/K = 2− log n while, at the same time, for every u and v at distance at most r1 T ∼ 100 . Prz∼N (0,1)d [hz, ui ≥ η, hz, vi ≥ η 0 ] Finally, we choose T such that T K ∼ nρs +o(1) where ρs ≥ 1 is a parameter that governs the memory consumption. This gives us a unique value of η 0 > 0, which governs the query time. √ A crucial relation between parameters is that τ should be much smaller than n−1/K = 2− log n . √ This implies that the “large distance” is effectively equal to 2R, at least for the sake of a single step of the random partition. 47
8cs.DS
Scalable Magnetic Field SLAM in 3D Using Gaussian Process Maps Manon Kok? and Arno Solin† ? University of Cambridge, United Kingdom, e-mail: [email protected] † Aalto University, Finland, e-mail: [email protected] arXiv:1804.01926v1 [cs.RO] 5 Apr 2018 Abstract We present a method for scalable and fully 3D magnetic field simultaneous localisation and mapping (SLAM) using local anomalies in the magnetic field as a source of position information. These anomalies are due to the presence of ferromagnetic material in the structure of buildings and in objects such as furniture. We represent the magnetic field map using a Gaussian process model and take well-known physical properties of the magnetic field into account. We build local magnetic field maps using three-dimensional hexagonal block tiling. To make our approach computationally tractable we use reduced-rank Gaussian process regression in combination with a Rao–Blackwellised particle filter. We show that it is possible to obtain accurate position and orientation estimates using measurements from a smartphone, and that our approach provides a scalable magnetic SLAM algorithm in terms of both computational complexity and map storage. 1 Introduction The use of the magnetic field as a source of position information for indoor navigation is a promising novel approach that has gained interest in recent years [1–8]. It relies upon the spatial variation of the ambient magnetic field which is typically due to ferromagnetic material in the structures of buildings and to a lesser extent due to the presence of e.g. furniture. The advantage of using the magnetic field for positioning is that it can be measured by a small device, without additional infrastructure and without line-of-sight requirements. Furthermore, magnetometers are nowadays present in (almost) any smartphone. Crucial to this approach is the ability to build maps of the magnetic field that can be used for interpolation and extrapolation and the ability to localise inside this map. In this paper, we present a scalable and fully three-dimensional simultaneous localisation and mapping (SLAM) approach that builds a map of the magnetic field while simultaneously localising the sensor in the map. Extending previous work [9], we build the magnetic field map using Gaussian process regression [10] and incorporate physical knowledge about the magnetic field known from Maxwell’s equations in the Gaussian process prior. To overcome issues with computational complexity, we use the rank-reduced approach first presented in [11]. This results in a representation that fits perfectly in a Rao–Blackwellised particle filter [12] which can be used both for building the map and for localisation in the map, resulting in a tractable localisation algorithm. Example results can be found in Fig. 1. The approach presented in [11] relies on a basis function expansion on a specific domain where the number of basis functions that is needed scales with the size of the domain. To allow for mapping large 3D areas, we propose a map representation using hexagonal block tiling, which aims at providing a very compact (in terms of required storage per volume) representation of the magnetic field map (all three vector field components and associated uncertainties). Using this approach, hexagonal tiles are created whenever particles enter unexplored areas, resulting in a growing number of local Gaussian process maps. We present experimental results where we obtain magnetometer measurements as well as odometry from a smartphone. This odometry gives us information about the change in position and orientation but the resulting pose estimates drift over time. This drift is corrected by making use of the magnetometer measurements and the magnetic field map. We show accurate 6D pose and 3D map estimates can be obtained in large scale and 3D experiments, as illustrated in Fig. 1. Previous work on magnetic field SLAM typically assumes that the motion is in 2D or 2.5D [13–16]. To the best of the authors’ knowledge, this is the first fully 3D approach to magnetic field SLAM. It is also the first time the reduced-rank approach from [11] has been used for SLAM and that the domain in this approach has been chosen to be hexagonal. 1 Figure 1: Illustration of the magnetic field map built by our SLAM approch. Each hexagonal block (with radius of 5 m and height of 4 m) can cover a Gaussian process magnetic map volume of ∼260 m3 in a state dimension of 256. A more detailed map provided in Fig. 5. 2 Problem formulation We are interested both in estimating the position and the orientation of the sensor and in building a map of the magnetic field. We denote the position of the sensor at time instance t by pw t . The superscript w refers to the world frame. In our SLAM formulation, it is always possible to move or rotate the estimated map while simultaneously moving and rotating the position and orientation estimates. In other words, the absolute position and orientation are not observable. Because of this, without loss of generality we choose the origin of the world frame to be equal to the initial position of the sensor and its axes to be aligned with the coordinate system defined by the initial orientation. The orientation of the sensor is denoted by qwb t , where b refers to the body frame. Its origin lies in the centre of the magnetometer triad and its axes are aligned with the axes of the magnetometer. We encode the orientation using a unit quaternion. There is a direct mapping from the quaternion qwb to t and because of this we use these interchangeably. The double superscript wb the rotation matrix Rwb t denotes the rotation from body frame to world frame. The reverse rotation is denoted by bw and hence,  bw T Rwb . t = Rt We denote our estimate of the magnetic field map by mt . More details about the exact form of mt can be found in Section 3.1. Note that we assume that the map of the magnetic field does not change over time. The subscript t refers to the fact that our belief of the map changes over time because more data results in more information about the map. The resulting state vector xt is given by T xt = (pw t ) T (qwb t ) mT t T . (1) The dynamics of the position and orientation are modelled in terms of the change in position ∆pt and orientation ∆qt obtained from the odometry information. We consider these to be inputs to our dynamic model. Using the assumption that the magnetic field does not vary over time, our dynamic model can be written as   pw t + ∆pt + εp,t expq (εq,t ) . xt+1 = ∆qt qwb (2) t mt We assume that the noise on the position (εp,t ) and on the orientation (εq,t ) is Gaussian with εp,t ∼ N (0, ∆T σp2 I3 ) and εq,t ∼ N (0, ∆T σq2 I3 ). Here, ∆T is the (possibly time-varying) time between subsequent samples. In (2), denotes the quaternion multiplication and expq (εq,t ) refers to the representation of the noise vector εq,t ∈ R3 as a unit quaternion. The dynamics of the orientation qwb t can be interpreted 2 as the rotation equivalent of the dynamics of the position pw t . For more information about quaternion algebra and representations of orientation, see e.g.[17]. We use the magnetometer measurements to provide information about the magnetic field map as well as the position and orientation of the sensor. This can be modelled as w ym,t = Rbw t ∇Φt (pt )mt + εm,t . (3) w Here, ∇Φt (pw t )mt is the prediction of the magnetic field at the location pt . More details about the w specific form of ∇Φt (pt ) can be found in Section 3.1. Note that the magnetic field map is represented in world frame. Hence, the magnetometer measurements are modelled as the prediction ∇Φt (pw t )mt , rotated to body frame. Together with a prior on the state at the first time instance, the models (2) and (3) constitute the state space model that we use in the RBPF to estimate the state defined in (1). Because the initial wb position and orientation fix the world coordinate frame w, pw are set to the initial position 1 and q1 and orientation with zero uncertainty. The magnetic field map at the first time instance is set to be equal to the Gaussian process prior. More details about the Gaussian process map will be discussed in Section 3.1. The RBPF implementation will subsequently be discussed in Section 3.2. 3 3.1 Methods Gaussian process magnetic field map Building on previous work [9], we build a Gaussian process magnetic field map in which we encode physical knowledge about the magnetic field. First of all, we know that the measured magnetic field consists of the Earth’s magnetic field and the magnetic field due to anomalies induced by small-scale variations and building structures. Furthermore, using Maxwell’s equations and classical electromagnetism [18], we know that the magnetic field due to the anomalies can be modelled using a latent scalar potential field ϕ(p). Here, ϕ : R3 → R, where p ∈ R3 is the spatial coordinate in world frame and the magnetometer measures the derivative of this scalar potential. We assume the scalar potential field to be a realisation of a Gaussian process prior and the magnetometer measurements to be corrupted by Gaussian noise, resulting in the following model ϕ(p) ∼ GP(0, κlin. (p, p0 ) + κSE (p, p0 )), ym,t = −∇ϕ(p) p=pw t + εm,t , (4) 2 I3 ), for each observation t = 1, 2, . . . , NT . The local Earth’s magnetic field where εm,t ∼ N (0, σm contributes linearly to the scalar potential as 2 κlin. (p, p0 ) = σlin. pT p, (5) 2 where σlin. is the magnitude scale hyperparameter. The magnetic field anomalies are captured by the squared exponential covariance function   kp − p0 k2 0 2 , (6) κSE (p, p ) = σSE exp − 2`2 2 where σSE is a magnitude and ` the characteristic length-scale hyperparameter. Including the additional prior information introduced by the scalar potential in (4) results in a coupling between the three components of the magnetic field according to physical laws. This has been shown in [9] to improve prediction accuracy over simply modelling each magnetic field component separately. Using the model (4), it is possible to predict the magnetic field at previously unseen locations. In practice, however, this quickly becomes computationally intractable because of the large amount of magnetometer measurements we collect and the fact that the computational complexity scales as O(n3 ). A computationally tractable solution was presented in [9] where the problem was projected on the eigenbasis of the (negative) Laplace operator in a confined domain Ω ⊂ R3 . In this domain, the eigendecomposition of the Laplace operator subject to Dirichlet boundary conditions can be solved as ( −∇2 φj (x) = λ2j φj (x), x ∈ Ω, (7) φj (x) = 0, x ∈ ∂Ω. 3 Using this eigendecomposition, it is possible to approximate the covariance function in (4) as κ(p, p0 ) = κlin. (p, p0 ) + κSE (p, p0 ) m X ≈ κlin. (p, p0 ) + SSE (λj ) φj (p) φj (p0 ), (8) j=1 where κSE (p, p0 ) is approximated using m basis functions φj and their corresponding eigenvalues λj . The exact form of φj and λj depends on the shape of the domain Ω. Note that SSE (·) denotes the spectral density function of the squared exponential kernel SSE (·) for which a closed form solution exists, see [9]. Using the approximation (8) with the boundary conditions defined in (7) implies that our model of the magnetic field reverts back to the Earth’s magnetic field at the boundary of the domain. A fixed domain Ω is not desirable in the SLAM problem, as we do not know a priori the spatial extent of the final magnetic field map. Furthermore, the number of basis functions that is needed for a good approximation scales with the size of the domain and for large scale SLAM problems will hence become intractable. We therefore propose a scalable representation where we split the magnetic map into a three-dimensional grid of hexagonal blocks with radius r and height 2Lz , such that each subdomain d is given by (d) (d) (d) Ω(d) = {p | (p1 , p2 ) ∈ hexagon(r, p1,2 ), p3 ∈ [p3 − Lz , p3 + Lz ]}. (9) Here, p(d) is the center point of the dth hexagon cell in the grid representation. The hexagonal grid provides an efficient way of maximising the area per number of basis functions for representing the magnetic field map, thus requiring less memory for storing the map representation. To compute the basis functions φj and their corresponding eigenvalues λj , we need to solve the eigendecomposition of the Laplace operator (7) in a two-dimensional hexagon. This can not be solved in closed form, but instead it can be solved numerically. We set up the eigenvalue problem by composing the sparse stencil matrix corresponding to the Laplacian using a nine-point finite difference approximation. The solution itself is given by the Lanczos algorithm (see, e.g., [19], callable in Matlab through eigs) that 2 we use for solving the m largest real eigenvalues [λhex n ] —together with the corresponding eigenfunctions hex φn (p). Fig. 2 shows the 40 first eigenfunctions of the negative Laplacian in a unit hexagonal domain with respect to Dirichlet boundary conditions. The eigendecomposition is extended to cover the three-dimensional hexagonal grid cell Ω(d) by considering the numerically solved horizontal eigendecomposition and a closed-form solution to the separable vertical dimension. The final eigenbasis then becomes the combination:    πnj,2 (p3 + Lz ) 1 √ sin , (10) φj (p) = φhex (p ) 1,2 nj,1 2Lz Lz 2  πnj,2 2 hex 2 , (11) λj = [λnj,1 ] + 2Ld where the matrix n ∈ Rm×2 consists of an index set of permutations of integers {1, 2, . . . , m} (i.e., {(1, 1), (2, 1), . . . , (1, 2), . . . , (2, 2), . . .}) corresponding to the m largest eigenvalues. The numerical solution for the two-dimensional hexagon is fast and takes less than a second even with a tight discretisation on an average laptop computer. Furthermore, because the basis functions (10) are independent of the hyperparameters and the input locations, they only need to be evaluated once, not causing any computational overhead in our SLAM algorithm. The basis function expansion described above allows us to write the prior model for each hexagonal tile at time t = 0 in terms of a mean m0 = 0m+3 and a covariance  2 2 2 P0 = diag σlin. , σlin. , σlin. , SSE (λ1 ), SSE (λ2 ), . . . , SSE (λm ) . (12) The posterior can be updated sequentially [20] as new magnetometer data arrives at t = 1, 2, . . . , NT and can be written as 2 St = ∇Φt Pt−1 [∇Φt ]T + σm I3 , Kt = Pt−1 [∇Φt ]T S−1 t , mt = mt−1 + Kt (ym,t − Rbw t ∇Φt mt−1 ), Pt = Pt−1 − Kt St KT t, 4 (13) Figure 2: The first 40 eigenfunctions of the negative Laplace operator in a hexagonal domain subject to Dirichlet boundary conditions. The eigenbasis can be effectively solved by a numerical solver, and the calculations are only required once. with  ∇Φt = ∇pT t , ∇φ1 (pt ), ∇φ2 (pt ), . . . , ∇φm (pt ) . (14) Note that (13) is a Kalman filter measurement update of the state mt representing the magnetic field map in a specific tile. This fact will be exploited in our magnetic field SLAM algorithm presented in Section 3.2. 3.2 Magnetic field SLAM As discussed in Section 2, we are interested in estimating the position and the orientation of the sensor while building a map of the magnetic field. We represent the map in terms of a varying number of hexagonal block tiles, each using the basis function expansion presented in Section 3.1. We use a nonlinear filtering technique to estimate the position, the orientation and the map of each tile that has been visited. The state vector (1) has a relatively large dimension due to the representation of the magnetic field map mt . For instance, in Section 4 we set the dimension of the state mt to 256 per hexagonal block. However, mt enters conditionally linearly into the state space model. It is possible to exploit this by using a Rao–Blackwellised particle filter (RBPF) [12] which uses a Kalman filter for the conditionally linear states xlt and a particle filter xnt for the nonlinear states where T xnt = (pw t )  T (qwb , t ) D,t xlt = {mt }d=1 . N (15) Here, ND,t is the number of hexagonal block tiles that have been created up to time t. w,(i) wb,(i) In the RBPF, i = 1, . . . , NP particles having a position pt and an orientation qt are used to (i) represent the state at time t. Each of the particles also contains an estimate of the map mt and its (i) (i) covariance Pt . Note that mt consists of the magnetic field map of each hexagonal block that particle i has visited. We assume that each tile is independent. The covariance of the linear state can therefore be ND,t described as Pt = {Pt }d=1 . The dynamics of the state is chosen as in (2) and the measurement model is given in (3). An important thing to note is that, as discussed in Section 2, the absolute position and orientation are not observable. w,(i) wb,(i) and orientation qt of all particles i = 1, . . . , NP Because of this, we set the initial position p0 wb,(i) equal to an initial position and orientation pw,(i) = 03 , q0 = qwb . We initialise the magnetic field 0 according to the Gaussian process prior (see also Section 3.1). The state space model presented in Section 2 results in a fairly straightforward RBPF implementation. The major difference from a standard RBPF is that each particle only updates the local magnetic field map at its current location. Note that the computational complexity of the algorithm scales linearly with the number of particles and linearly with the number of hexagonal tiles per particle. 5 Alg 1: Magnetic field SLAM NT wb Input: {ym,t , ∆pw t , ∆qt }t=1 , q0 , Σp , Σq , m. w wb Output: For each t, pt , qt , mt of the highest-weight particle at t. w,(i) wb,(i) (i) (i) 1: Initialisation: Initialise the particles as p0 = 03 , q0 = qwb 0 , set m0 = 0m+3 , P0 as given (i) in (12) and initialise the weights of the particles as w0 = N1P , for i = 1, . . . NP . 2: For t = 1, . . . , NT , w,(i) 3: Create new hexagonal block tiles: If pt is in a new hexagonal block tile d, create this tile for (i) (i) particle i and initialise md,t = 0m+3 and Pd,t as given in (12). (i) Evaluate the importance weights: For i = 1, . . . , NP , evaluate the importance weights wt based on the measurement model (3) and normalise. 5: Resampling: If 90% of the particles is in a tile that they are revisiting, resample those particles with replacement. (i) 6: Kalman filter measurement update: For i = 1, . . . , NP , update the magnetic field map md,t and 4: (i) its covariance Pd,t of the hexagon d that the particle is in and its close neighbours using the w,(i) wb,(i) nonlinear states pt and Rt according to (13). 7: Obtain a filtered estimate: Output the position, orientation, and estimated map of the particle with the highest weight. n,(i) 8: Particle filter time update: For i = 1, . . . , NP , predict new particles xt+1 as ! w,(i) w,(i) (i) pt + ∆pt + εp,t n,(i) , (16) xt+1 = wb,(i) (i) ∆qt qt expq (εq,t ) (i) (i) where εp,t and εq,t are drawn from N (0, Σp ) and N (0, Σq ), respectively. 9: Set t := t + 1. In a practical magnetic field SLAM implementation care must be taken of the following in terms of updating the map: • To avoid boundary effects due to the Dirichlet boundary conditions, the actual tile extends slightly outside of the hexagonal block domain for updating. • To allow for a smooth transition from one tile to the next, particles close to the border of a tile also update the map of the neighbouring tiles. During the “exploration phase” when particles start building a map of previously unseen locations, very little information is available to distinguish between the particles. Because of this, we would like to ensure that the particle cloud keeps spreading during this phase. To this end, we adapt the RBPF implementation in two different ways: • To maintain the particle spread during the exploration phase, we delay the updating of the map by one lengthscale `. • To not collapse the particle cloud too quickly, we only resample the particles when they revisit a tile. Resampling is further delayed until at least 90% of the particles has arrived in a tile that they revisit. 4 Results In the empirical experiments, we use data captured by a smartphone for simultaneously building the magnetic field map and localising on it. We use an Apple iPhone 6s (published in September 2015), a previous flagship product of Apple which by current standards represents more of a standard smartphone. The interest in this paper is purely on the map building and localisation, so we choose to leverage on the recent developments in visual-inertial pedestrian dead-reckoning (PDR) methods and use the built-in ARKit PDR provided by Apple. ARKit (released September 2017, used version running in iOS 11.2.5) is using the IMU and camera of the phone to provide a 6-DoF (position and orientation) PDR movement 6 5 meters 40 (a) At t = 10 s 0 20 (b) At t = 25 s −20 0 (c) At t = 48 s −60 (d) At t = 90 s (e) At t = 120 s 60 (f) At t = 260 s −40 (g) Magnetic x (µT) (h) Magnetic y (µT) (i) Magnetic z (µT) (j) Odometry (k) Tilted 3D view Figure 3: The SLAM solution for walking in a square for several loops for around 250 meters. Subfigures (a)–(f) show the norm of the magnetic field map for the highest weight particle. The transparency of the maps scales with the marginal variance of the GP map. Subfigures (g)–(i) show the corresponding vector field components for the final map in (f). The odometry trajectory is visualised in (j), and (k) shows the 3D hexagonal tiles with a cross-section of the magnetic field maps. trajectory. ARKit does visual relocalisation under the hood, which aims to correct for long-term drift, resulting in discontinuities in the PDR track. These discontinuities turned out to be more harmful than useful for our approach, and we implemented a heuristic filtering approach for removing the relocalisation jumps. The PDR—albeit being surprisingly robust—suffers from long-term drift both in position and orientation (see Fig. 3). The data was captured by a customised data capture application running on the phone. It collects the IMU (at 100 Hz) and three-axis magnetometer (100 Hz) data time-locked to the ARKit PDR estimates (60 Hz). Furthermore, the captured data was complemented with video frames of the back-facing phone camera (resolution 1280×720 at 60 fps), the barometric air pressure (10 Hz), and GNSS locations captured by the phone, none of which were used in the SLAM implementation, but captured for validation and reference. All data was stored on the device, downsampled to 10 Hz before use, and the SLAM implementation was run off-line in a Mathworks Matlab implementation. For simplicity, we use the same model parameters in all our experiments. • We set the size of the hexagonal blocks to r = 5 m, Lz = 2 m and the number of basis functions per tile to m = 256. The radius and height used in solving the eigenbasis of the Laplacian extends one meter outside the hexagon. 2 2 • We set the Gaussian process hyperparameters defined in Section 3.1 to σlin. = 650, σSE = 200, ` = 1.3 and σn2 = 10. This assumes that the lengthscale of the magnetic field anomalies is in the order of 1.3 m. The measurement noise σn is rather high to also account for model discrepancies. • We set the number of particles in the RBPF to NP = 100. • Neighbouring tiles are updated if samples are closer than 10 cm to the hexagonal block boundary. • The process noise parameters were set to Σp = diag(0.12 , 0.12 , 0.022 ) (values specified in meters drift per second) and Σq = diag(0.012 , 0.012 , 0.242 ) (values specified in degrees drift per second). 7 In terms of memory usage, the choices mean that for each initialised map tile, the particle state dimension grows by 256. For fast look-up, our implementation uses a hashmap (per particle) for storing and keeping track of the map tiles. Each tile stores the GP mean and covariance matrix. 4.1 Illustrating magnetic SLAM in 2D In a first experiment, a data set is collected in the DPO at the Engineering Department of the University of Cambridge. Significant excitation in the magnetic field is present for instance due the presence of radiators and a large number of computers. The trajectory is around 250 meters long and covers an area of around 20 × 5 m. The same circular trajectory is traversed several times. Because of this, it is easy to visually inspect the quality of the estimates from our SLAM algorithm which are shown in Fig. 3. The different subfigures illustrate the workings of our algorithm. Figs. 3(a) – 3(f) show how the estimates progress over time. For visualisation purposes, the norm of the magnetic field is predicted by the map of the highest weight particle at a large number of locations in each hexagon. The transparency in the map visualises the uncertainty of the map. It can be seen that the uncertainty is large in unexplored regions (no map is actually visible) and that the uncertainty of the map decreases over time in the re-visited regions. The black line displays the trajectory of the highest weight particle. In Figs. 3(a) and (b), the deliberate slight delay in updating the map can clearly be seen. As discussed in Section 3.2, we wait with resampling until at least 90% of the particles is in a tile that they have previously updated and left. Because of this, no resampling is done in the first loop, until around 50 seconds and the spread in the particles in Fig. 3(c) is therefore fairly large. This allows the algorithm to properly close the loop as visualised in Fig. 3(d). Another aspect of our algorithm to note is that in Fig. 3(c), most particles are on the border between the tile in which the trajectory was started and a new tile below. To allow for smooth transitions between these two tiles, many of the particles will in this case therefore update the local magnetic field maps in both tiles. The map that is visualised in Figs. 3(a) – (f), shows the norm of the predicted magnetic field. Our model (4), however, explicitly models the magnetic field as a three-dimensional vector. Instead of visualising the norm of the predicted magnetic field, it is therefore also possible to visualise the predicted magnetic field in three directions. This is shown in Figs. 3(g) – (i). Because the Earth’s magnetic field is fairly large in Cambridge, UK, the z-component of the magnetic field is of significantly larger magnitude than the x- and y-components. Based on Fig. 3(f) it can be concluded that our SLAM algorithm estimates the trajectory with high accuracy since the same trajectory can be seen to be traversed multiple times. For comparison, we also show the odometry in Fig. 3(j) which clearly shows a drift in the position. Our magnetic SLAM approach is able to correct for this drift. To illustrate the fact that even though the movement for this data set is in a 2D plane the estimation is still done in 3D, the tilted 3D view is shown in Fig. 3(k). 4.2 Fully 3D magnetic SLAM In Section 4.1, the movement was close to two-dimensional and hexagonal tiles with their own local magnetic field map were created whenever the particles were at the border of a tile. Exactly the same procedure also applies to movement and tile block structures in three dimensional space. In Fig. 4 we show the estimated trajectory and the magnetic field map for an empirical experiment in which we first walked up and subsequently down a set of stairs at the Engineering Department of the University of Cambridge. Again, each hexagonal block has its own local magnetic field map. To visualise these, the norm of the predicted magnetic field for a hexagonal slice in the middle of each block is shown. The transparency visualises the uncertainty of the map. As in the results presented in Section 4.1, our algorithm only starts to resample particles on the way down the stairs. As can be seen, this results in an estimated path that is fairly similar in both directions. 4.3 Large-scale magnetic SLAM In a third empirical data set we walk around St. John’s college in Cambridge. The college consists of several courts and even though the data set is captured outdoors, the close proximity of the buildings results in small magnetic field anomalies that can be used for localisation. The SLAM results were previously presented in Fig. 1 and are presented in more detail in Fig. 5. The map extends over 27 tiles covering the courtyard. For many algorithms the extent of the data set would therefore be prohibitively 8 Figure 4: Example showing the three-dimensional nature of the map-building. The path covers a flight of stairs in the University of Cambridge Engineering Department. Complete path length 125 meters. The cross-sections of the tiles show the magnetic map norm (color scale same as in subfigure (f) in the previous figure). 50 meters 30 40 50 Figure 5: The SLAM map solution for a large-scale outdoor–indoor example. The visualised color field is the norm of the magnetic field, and the opacity follows the uncertainty. The layout corresponds to that of Fig. 1. large. However, due to our computationally efficient model in terms of hexagonal tiling, our approximate Gaussian process model and the RBPF algorithm, the computations remain feasible. It can be seen from Fig. 5 that our approach scales to large-scale magnetic SLAM. 5 Conclusions and future work We have presented a scalable algorithm for magnetic field SLAM in 3D. It builds local Gaussian process maps where each map is an approximation to the local full GP solution in terms of a basis function expansion. This approximation allows us to map a magnetic map volume of ∼ 260 m3 in a state dimension of only 256. Each local map is modelled in terms of a hexagonal block tile, which minimises 9 the number of tiles that are needed to cover the total mapping volume. The formulation fits perfectly in an RBPF resulting in a computationally tractable algorithm. The computational complexity scales linearly both with the number of particles in the particle filter and with the number of hexagonal tiles of each particle. The algorithm is shown to perform well on three challenging empirical data sets. One of the challenges in the data we used for testing, is that the odometry we obtain from the ARKit does not always obey our motion model. More specifically, for straight paths the odometry shows almost no drift, while fast turns can introduce sudden errors. This does not follow our motion model in which we model a constant process noise. In future work we would like to focus on using inertial PDR as odometry instead. Apart from avoiding these issues, this would also result in a positioning algorithm only based on widely available inertial and magnetometer sensors. Other directions of future work are in the direction of using a Rao–Blackwellised Particle Smoother and further reducing the computational complexity of the algorithm. Acknowledgments This research was financially supported by the EPSRC grant Autonomous behaviour and learning in an uncertain world (Grant number: EP/J012300/1) and the Academy of Finland grant Sequential inference for real-time probabilistic modelling (Grant number: 308640). References [1] Janne Haverinen and Anssi Kemppainen. Global indoor self-localization based on the ambient magnetic field. Robotics and Autonomous Systems, 57(10):1028–1035, 2009. [2] Binghao Li, Thomas Gallagher, Andrew G. Dempster, and Chris Rizos. How feasible is the use of magnetic field alone for indoor positioning? In Proceedings of the International Conference on Indoor Positioning and Indoor Navigation (IPIN), pages 1–9, 2012. [3] Michael Angermann, Martin Frassl, Marek Doniec, Brian J. Julian, and Patrick Robertson. Characterization of the indoor magnetic field for applications in localization and mapping. In Proceedings of the International Conference on Indoor Positioning and Indoor Navigation (IPIN), pages 1–9, 2012. [4] Etienne Le Grand and Sebastian Thrun. 3-axis magnetic field mapping and fusion for indoor localization. In IEEE Conference on Multisensor Fusion and Integration for Intelligent Systems (MFI), pages 358–364, 2012. [5] A. Solin, S. Särkkä, J. Kannala, and E. Rahtu. Terrain navigation in the magnetic landscape: Particle filtering for indoor positioning. In Proceedings of the European Navigation Conference, 2016. [6] David Hanley, Alexander B. Faustino, Scott D. Zelman, David A. Degenhardt, and Timothy Bretl. MagPIE: A dataset for indoor positioning with magnetic anomalies. In Proceedings of the International Conference on Indoor Positioning and Indoor Navigation (IPIN), pages 1–8, 2017. [7] Chao Gao and Robert Harle. MSGD: Scalable back-end for indoor magnetic field-based GraphSLAM. In Proceedings of the IEEE International Conference on Robotics and Automation (ICRA), pages 3855–3862, 2017. [8] Joaquín Torres-Sospedra, David Rambla, Raul Montoliu, Oscar Belmonte, and Joaquín Huerta. UJIIndoorLoc-Mag: A new database for magnetic field-based localization problems. In Proceedings of the International Conference on Indoor Positioning and Indoor Navigation (IPIN), pages 1–10, 2015. [9] A. Solin, M. Kok, N. Wahlström, T. B. Schön, and S. Särkkä. Modeling and interpolation of the ambient magnetic field by Gaussian processes. IEEE Transactions on Robotics (accepted for publication), 2018. arXiv:1509.04634. [10] Carl Edward Rasmussen and Christopher K. I. Williams. Gaussian Processes for Machine Learning. MIT Press, 2006. 10 [11] Arno Solin and Simo Särkkä. Hilbert space methods for reduced-rank Gaussian process regression. ArXiv preprint arXiv:1401.5508, 2014. [12] Thomas B. Schön, Fredrik Gustafsson, and Per-Johan Nordlund. Marginalized particle filters for mixed linear/nonlinear state-space models. IEEE Transactions on Signal Processing, 53(7):2279– 2289, 2005. [13] Patrick Robertson, Martin Frassl, Michael Angermann, Marek Doniec, Brian J. Julian, Maria Garcia Puyol, Mohammed Khider, Michael Lichtenstern, and Luigi Bruno. Simultaneous localization and mapping for pedestrians using distortions of the local magnetic field intensity in large indoor environments. In Proceedings of the International Conference on Indoor Positioning and Indoor Navigation (IPIN), pages 1–10. IEEE, 2013. [14] Martin Frassl, Michael Angermann, Michael Lichtenstern, Patrick Robertson, Brian J. Julian, and Marek Doniec. Magnetic maps of indoor environments for precise localization of legged and nonlegged locomotion. In Proceedings of the IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), pages 913–920, 2013. [15] Ilari Vallivaara, Janne Haverinen, Anssi Kemppainen, and Juha Röning. Simultaneous localization and mapping using ambient magnetic field. In Proceedings of the IEEE Conference on Multisensor Fusion and Integration for Intelligent Systems (MFI), pages 14–19, 2010. [16] Ilari Vallivaara, Janne Haverinen, Anssi Kemppainen, and Juha Röning. Magnetic field-based SLAM method for solving the localization problem in mobile robot floor-cleaning task. In Proceedings of the 15th International Conference on Advanced Robotics (ICAR), pages 198–203, 2011. [17] M. Kok, J. D. Hol, and T. B. Schön. Using inertial sensors for position and orientation estimation. Foundations and Trends on Signal Processing, 11(1–2):1–153, 2017. [18] David Jeffrey Griffiths and Reed College. Introduction to Electrodynamics. Prentice hall, Upper Saddle River, NJ, 1999. [19] Gene H Golub and Charles F Van Loan. Matrix Computations. Johns Hopkins University Press, 3 edition, 2012. [20] Simo Särkkä. Bayesian Filtering and Smoothing. Cambridge University Press, 2013. 11
3cs.SY
On Reduced Input-Output Dynamic Mode Decomposition ∗ Christian Himpe† Tim Mitchell ‡ ep rin t Abstract The identification of reduced-order models from high-dimensional data is a challenging task, and even more so if the identified system should not only be suitable for a certain data set, but generally approximate the input-output behavior of the data source. In this work, we consider the input-output dynamic mode decomposition method for system identification. We compare excitation approaches for the data-driven identification process and describe an optimization-based stabilization strategy for the identified systems. Keywords: Dynamic Mode Decomposition, Model Reduction, System Identification, Cross Gramian, Optimization MSC: 93B30, 90C99 Pr arXiv:1712.08447v1 [cs.SY] 22 Dec 2017 Peter Benner ∗ Computational Methods in Systems and Control Theory, Max Planck Institute for Dynamics of Complex Technical Systems, Sandtorstr. 1, 39106 Magdeburg, Germany ORCID: 0000-0003-3362-4103, [email protected] † Computational Methods in Systems and Control Theory, Max Planck Institute for Dynamics of Complex Technical Systems, Sandtorstr. 1, 39106 Magdeburg, Germany ORCID: 0000-0003-2194-6754, [email protected] ‡ Computational Methods in Systems and Control Theory, Max Planck Institute for Dynamics of Complex Technical Systems, Sandtorstr. 1, 39106 Magdeburg, Germany ORCID: 0000-0002-8426-0242, [email protected] 1 1 Introduction Pr ep rin t In various applications, it can be difficult (sometimes even impossible) to derive models from first principles. However, the input-output response of a system and data of the inner state may still be available; we refer to such a setup as a graybox. For example, a natural process whose underlying action is not well understood can be considered a graybox since we may only be able to measure its behavior. In applications, such as manufacturing and design, it may be necessary to model a third-party provided subcomponent whose exact or full specifications may not be obtainable due to it containing proprietary information. In order to gain insight into such natural or technical processes, and derive models that simulate and/or predict their behaviors, it is often beneficial and perhaps necessary to create models using measured or generated data. The discipline of system identification investigates methods for the task of obtaining such models from data. One class of methods for data-driven identification is dynamic mode decomposition (DMD), which also provides a modal analysis of the resulting systems. In this work, we investigate variants of DMD for the class of input-output systems and compare data sampling strategies. DMD has its roots in the modal decomposition of the Koopman operator [15, 26], which has been recently rediscovered for the spectral analysis of fluid dynamics [19]. The basic DMD method was introduced in [27], and various extensions have been added, such as Exact DMD [28] or Extended DMD [9]. Furthermore, DMD can also be used as a tool for model order reduction: [25] proposed using DMD for flow analysis and control while DMD has also been combined with Galerkin-projection techniques to model nonlinear systems [1]. For a comprehensive survey of DMD and its variants, see [16]. Our work here builds upon two specific variants of DMD. The first is Dynamic Mode Decomposition with Control (DMDc) [23], and thus by relation, also Koopman with Inputs and Control (KIC) [24]. The second is Input-Output Dynamic Mode Decomposition (ioDMD) [3, 4], which itself is closely related to the Direct Numerical Algorithm for Sub-Space State System Identification (N4SID) [31]. DMDc extends DMD to scenarios where the input of the discrete system approximation is given by a functional while ioDMD additionally handles the case when the system’s output is specified and also a functional. To generically identify a system without prior knowledge on the relevant input functions, techniques such as persistent excitation [6] have been well known for some time now. We propose an extension to the ioDMD method of [3] with a new excitation variant related to the cross Gramian matrix [11]. Additionally, since DMD-based identification does not guarantee that its resulting models are stable, we propose a post-processing procedure to stabilize ioDMD-derived models, by employing the nonsmooth constrained optimization method of [10] to solve a corresponding stabilization problem. This document is structured as follows. In Section 2, an overview of the prerequisite dynamic mode decomposition method and its relevant variants is given. Section 3 describes the new excitation strategy while our optimizationbased stabilization procedure is discussed in Section 4. Finally, two numerical experiments are conducted in Section 5. 2 2 Dynamic Mode Decomposition Consider the time-invariant ordinary differential equation (ODE): ẋ(t) = f (x(t)), (1) with state x(t) ∈ RN and vector field f : RN → RN . Furthermore, consider for now that (1) is sampled at uniform intervals for times t0 , . . . , tK . The most basic version of DMD [27, 16] aims to approximate (1) by constructing a discrete-time linear system xk+1 = Axk , (2) ep rin t with a linear operator A ∈ RN ×N , such that if xk = x(tk ), then xk+1 ≈ x(tk+1 ) should also hold, for all k = 0, . . . , K − 1. Starting at an initial state x0 , the sequence defined by (2) corresponds to a trajectory of the state vectors xk . The corresponding data matrix X ∈ RN ×K is simply the in-order concatenation of these state vectors, that is,   X = x0 x1 . . . x K . By forming the following two partial trajectories:   X0 = x0 x1 . . . xK−1   X1 = x1 x2 . . . xK , and where X0 ∈ RN ×K−1 is just the data matrix X with its last data point removed while X1 ∈ RN ×K−1 is just X with its first data point removed, the idea behind (plain) DMD [27] is to then solve the linear system of equations: X1 = AX0 , Pr which is in fact just (2), where xk+1 and xk have been replaced by X1 and X0 , respectively. A best-fit solution to this problem is given by the pseudoinverse: A ≈ X1 X0+ , which is also the solution to minimizing the least-squares error in the Frobenius norm (k · kF ): A = arg min (kX1 − ÃX0 kF ). Ã∈RN ×N The DMD modes of (1) are given by the eigenvectors of the matrix A: AΛ = ΛV. Beyond just using a single uniformly-sampled time series, DMD has also been generalized to a method called Exact DMD [28], which can additionally support the concatenation of multiple different time series and/or non-uniform time steppings. This generalization of DMD is made possible by reducing the requirements of X0 and X1 to the lesser condition that their columns need only be composed in pairs of data such that X1 (:, k) = f (X0 (:, k)) is fulfilled. 3 2.1 Practical Computation We now give a high-level algorithmic description of DMD identification. The pseudoinverse of the data matrix can be computed using the (rank-revealing) singular value decomposition (SVD), X0 = UΣV ∗ , as follows: X0+ = VΣ−1 U ∗ . ep rin t However, inverting tiny but nonzero singular values in the computed diagonal matrix Σ poses a numerical problem, as these small singular values may be inaccurate. Applying Σ−1 could overamplify components of X0 , in particular, the less important ones. To counteract this effect, computing the pseudoinverse via the SVD is done in practice by truncating any singular values that are smaller than some fixed ε ∈ R+ , which is equivalent to adding a regularization term to the least-squares solution for A: A = arg min kX1 − ÃX0 k2F + βkÃk2F , Ã∈RN ×N for some value of the regularization parameter β ∈ R+ . Following [28], the algorithm for the DMD-based computation of the system matrix A, given a state-space trajectory X and a lower bound ε > 0 for discarding tiny singular values, is as follows:   1. Sample the state-space trajectory and form data matrix X = x0 . . . xK . 2. Assemble the shifted partitions X0 and X1 . 3. Compute the SVD of X0 = UΣV ∗ . e ii = Σii if Σii ≥ ε; 0 otherwise. 4. Truncate Σ: Σ e −1 5. Identify the approximate discrete system matrix: A := U ∗ X1 V Σ Pr In this DMD variant, the order (dimension) of the computed matrix A is equal to the number of retained (nontruncated) singular values, but this truncation is done solely for numerical accuracy; the intention is to keep as many components of the dynamics as possible. In contrast, model order reduction typically aims to significantly reduce the system down to just a small set of essential dynamics, and accomplishing this goal will be the focus of Section 2.4. 2.2 Dynamic Mode Decomposition with Control Considering systems whose vector field f depends not just on the state but also on an input function u : R → RM : ẋ(t) = f (x(t), u(t)), (3) has led to a DMD variant called Dynamic Mode Decomposition with Control (DMDc) [23]. We focus on a specific DMDc variant [23, Sec. 3.3] that aims to approximate (3) by a linear discrete-time control system: xk+1 = Axk + Buk , 4 (4) where B ∈ RN ×M (called the input operator) must also be identified in addition to A and input uk = u(tk ) is a discretely-sampled version of the continuous input function u(t) for some sampling times given by tk . In addition to forming X and X0 as in plain DMD (Section 2), an analogous construction of matrices for input data is also done. An in-order concatenation of the series of input data uk vectors is done to obtain matrix U ∈ RM ×K while the partial data matrix U0 ∈ RM ×K−1 is simply U without its last column (the last input sample):   U = u0 u1 . . . uK−1 uk and   U0 = u0 u1 . . . uK−1 . ep rin t Then, A and B can be obtained by computing the approximate solutions to the linear system of equations given by:     X0 X1 = AX0 + BU0 = A B , U0 which is (4) with uk replaced by U , xk by X0 , and xk+1 by X1 , and has solution:  +   X0 A B = X1 . U0 As mentioned in Section 1, DMDc is actually a special case of the KIC method [24]. For KIC, the state of the system is also augmented with the discretized input uk , which leads the resulting augmented system to have additional operators:      xk+1 A B xk = , uk+1 Bu Au uk Pr where Bu ∈ RM ×N and Au ∈ RM ×M . Of course, these two additional operators must now also be identified along with matrices A and B. However, if one assumes that the input is known and no identification of the associated operators is required, then Bu and Au are just zero matrices, and it is thus clear that KIC is a generalization of DMDc. 2.3 Input-Output Dynamic Mode Decomposition Extending the underlying system once more to now also include an output function y : R → RQ , with an associated output functional g : RN × RM → RQ that also depends on the state x and the input u, yields the following system: ẋ(t) = f (x(t), u(t)), y(t) = g(x(t), u(t)). (5) Data-based modeling of systems of the form given by (5) has given rise to a class of DMD methods called Input-Output Dynamic Mode Decomposition (ioDMD) [3]. Similar to previously discussed DMD variants, the ioDMD method also approximates the original system by a discrete-time linear system, but now with input and output: xk+1 = Axk + Buk , yk+1 = Cxk + Duk , 5 (6) where C ∈ RQ×N and D ∈ RQ×M are the output and feed-through operators, respectively. Since this approximation includes output data, the discrete output instances yk = y(tk ) ∈ RQ are also correspondingly arranged into a matrix Y ∈ RQ×K by in-order concatenation while Y0 ∈ RQ×K−1 simply omits the last column (output sample) of Y :   Y = y0 y1 . . . yK−1 yK and   Y0 = y0 y1 . . . yK−1 . B D   X0 , U0 (7) ep rin t Matrices A, B, C, and D are then approximated by solving: (    X1 = AX0 + BU0 X1 A or equivalently = Y C 0 Y0 = CX0 + DU0 which is (6) but where uk , xk , xk+1 , and yk+1 have been replaced by U0 , X0 , X1 and Y0 , respectively, and has the solution:  A C     + B X1 X0 = . D Y0 U0 (8) This procedure is equivalent to the Direct N4SID algorithm [30, 14, Ch. 6.6] mentioned in Section 1. Note that all the DMD variants discussed so far identify the original continuoustime systems by linear discrete-time models. However, one can create a continuousb B, b C, b D}, b that is a first-order approximation to the time model given by {A, discrete-time model obtained by ioDMD, using for example, the standard firstorder Euler method: Pr b k + Bu b k) xk+1 = xk + h(Ax b k + hBu b k ⇒ Axk + Buk = xk + hAx i  h  b B b = h(I − A) hB . ⇒ A The output and feed-through operators for the continuous-time model remain b = C, the same as in the discrete-time model produced by ioDMD, that is, C b = D. Finally, it is important to note that (io)DMD derived models are D generally only valid for the time horizon over which the data has been gathered. 2.4 Reduced Order DMD To accelerate the computation of ioDMD-derived models, we follow [7, 4] and reduce the order of the possibly high-dimensional state trajectories using a projection-based approach. The data matrices X0 and X1 are compressed using a truncated (Galerkin) projection Q ∈ RN ×n , n  N , Q∗ Q = I:  ∗     Q X1 Ar Br Q∗ X0 = Y0 Cr Dr U0  ∗   ∗ +   Q X1 Q X0 Ar B r = . Y0 U0 Cr Dr 6 The order of the identified system is thus determined by the rank of the projection. A popular method to compute such a truncating projection Q is proper orthogonal decomposition (POD) [12], which is practically obtained as the left singular vectors (POD modes) of the data matrix X: SVD X = U DV ∗ → Xr = U1| X ≈ X. 3 ep rin t The number of resulting computed modes n depends on the desired proPPOD n 2 1/2 jection error kX − U U ∗ XkF ≤ ( i=1 Dii ) , which is a consequence of the Schmidt-Eckhard-Young-Mirsky Lemma (see for example [5]). Note again that this data compression scheme has a very different motivation compared to that of the aforementioned dimensionality-reduction done when computing the pseudoinverse via the truncated SVD (discussed in Section 2.1). The latter truncation, based on the magnitude of the singular values, is done for reasons of numerical accuracy when computing the pseudoinverse (and applying it in subsequent computations). The projection-based truncation discussed here, using the sum of the singular values squared, allows for the possibility of a much less onerous computational burden, as the state space of the models can often be greatly reduced by discarding all but a handful of essential modes in order to obtain a desired approximation error. Other projection-based datadriven model reduction techniques for the compression of the state trajectory are similarly applicable, for example empirical balanced truncation [17]. Training Data and Generic Identification Pr DMD is a data-driven method, hence, the source of the data used for the system identification needs to be considered. Usually it is possible to identify an inputoutput system (for provided discrete input, state, and output functions) so that the identified system produces similar outputs given the input used for the identification. To identify a model from data, the associated system needs to produce outputs approximating the data source, not only for specific data sets, but for a whole class of relevant input functions and perhaps even arbitrarily admissible ones. For such generic linear system identification, the matrices A, B, C, D have to be computed in such a manner that (a) does not require a specific data set and (b) allows behaviors of the system being modeled to be predicted for a given initial condition and input function. This can be accomplished, for example, by persistent excitation (PE) [6, 23], which utilizes signals such as step functions or Gaussian noise as training input data. Here, we propose a related approach that also exploits random (Gaussian) sampling, yet is based on the cross operator. 3.1 Cross Excitation The cross operator [13] WX : RN → RN is a tool for balancing-type model reduction and encodes the input-output coherence of an associated system, which for linear time-invariant systems is the so-called cross Gramian matrix [11]. This operator is defined as the composition of the controllability operator C : L2 → RN 7 with the observability operator O : RN → L2 : WX = C ◦ O. Thus, for a square system with the same input and output space dimension, WX maps a given initial state x0 via the observability operator to an output function, and is in turn passed to the controllability operator as an input function resulting in a final state1 : O C x0 7→ y 7→ x(T ). ep rin t To generate trajectory data, we modify the cross operator by replacing the controllability operator with the input-to-state map ξ : L2 → L2 [5, Ch. 4.3]. This yields an operator WX : RN → L2 : ξ O x0 7→ y 7→ x, which maps, as before, an initial state to an output function, but then maps this output (as an input) function to a state trajectory (instead of to a final state). Compared to PE, the cross(-operator-based) excitation (CE) is a two-stage procedure using perturbations of the initial state to generate the excitation, as opposed to perturbing the input directly. The cross excitation is related to indirect identification of closed-loop systems [29, 22], which is also a two-stage process. First, an intermediary system (openloop) system is identified, which then is used in the second step to generate a signal that acts as an excitation for the identification of the actual closedloop system. A distinct difference of CE compared to the indirect closed-loop identification approach is that the latter exclusively uses input-output data while the former also uses state trajectory data in addition to the input-output data. 4 Stabilization Pr As DMD and its variants are time-domain methods (ioDMD included), it is typically desired to preserve stability in the (reduced) identified discrete-time systems. However, models derived by ioDMD are not guaranteed to be stable. To enforce stability, an additional post-processing step is required. For example, [2] proposed stabilizing models derived using Petrov-Galerkin projections by solving a sequence of semidefinite programs. In this paper, we take a much more direct approach. A square matrix A is discrete-time stable if its spectral radius is less than one, that is, ρ(A) < 1, where ρ(A) := max{|λ| : λ ∈ Λ(A)}. Although the spectral radius is nonconvex, it is a continuous function with respect to the matrix A and furthermore, it is continuously differentiable almost everywhere (in the mathematical sense). In other words, the set of points where the spectral radius is nonsmooth only has measure 0 and so it holds that points chosen randomly will, with probability 1, be outside of this set. Hence, despite 1 This is also illustrated in [13, Fig. 1] 8 the nonsmoothness of the spectral radius, it is still possible to attain a wealth of information from its gradient, since it is defined on all but a subset of measure 0 in the full space. Thus if the matrix A from the ioDMD-derived model, that is, from (8), is not stable, we could consider employing a gradient-based optimization method to stabilize it, while hopefully ensuring that the resulting stabilized version of the ioDMD solution still models the original large-scale system. In order to meet these two objectives, we consider solving the following constrained optimization problem:        2 As Bs X1 à B̃ X0 − = arg min s.t. |λ(Ã)| < 1 − τ, (9) Cs Ds Y0 C̃ D̃ U0 F Ã,B̃,C̃,D̃ ep rin t where à ∈ Rr×r , B̃ ∈ Rr×m , C̃ ∈ Rp×r , D̃ ∈ Rp×m , and τ ≥ 0 is a margin for the stability tolerance. As the unstabilized ioDMD model is already a solution to (7), solving (9) should promote solutions that are still close to the original ioDMD model while simultaneously enforcing the requirement that these models must now be stable, due to the presence of the stability radius in the inequality constraint. Furthermore, the unstabilized ioDMD model should make a good point to start the optimization method at. There are however some difficulties with solving (9) iteratively via optimization techniques. The first is that the objective function of (9) is typically underdetermined in DMD settings, which can adversely impact a method’s usual rate of convergence, as minimizers are no longer locally unique. However, as our goal is mainly to stabilize the ioDMD model, without changing its other properties too much, we do not necessarily need to solve (9) exactly. A few iterations may be all that is needed to accomplish this task. As an alternative, one could consider solving     2 ADMD BDMD à B̃ s.t. |λ(Ã)| < 1 − τ min − CDMD DDMD C̃ D̃ F Ã,B̃,C̃,D̃ Pr in lieu of (9), where ADMD , BDMD , CDMD , and DDMD are the matrices produced by ioDMD. On the upside, this helps to avoid the problem of underdeterminedness arising in (9) and encourages that a stable solution close to the original ioDMD-derived system is found. However, this modified objective no longer takes any observed data into account. We did evaluate this alternate optimization problem in our experiments, but the performance of the models it produced was sometimes worse. As such, we will only report results for our experiments done using (9) in Section 5. The second issue for trying to solve (9) is that the spectral radius can be a rather difficult function to optimize, relatively speaking. First, despite being continuously differentiable almost everywhere, the spectral radius is still a nonsmooth function, specifically at matrices which have multiple eigenvalues that attain the maximum modulus, that is, the value of the spectral radius. Typically, minimizers of the spectral radius will be at such matrices (for example, see the plots of spectral configurations post optimization in [10, Section 4.1 and Appendix 9.1]), so optimizing the spectral radius often means that an optimization method must try to converge to a nonsmooth minimizer, a difficult prospect. Worse still is that the spectral radius is also non-locally Lipschitz at matrices where these multiple eigenvalues attaining the value of the spectral radius coincide (see [8]). Many of the available continuous optimization methods 9 5 ep rin t are designed under the assumption that functions they optimize are smooth or if not, at least locally Lipschitz. If the functions being optimized do not meet these criteria, these methods typically break down. Furthermore, the nonconvexity of the spectral radius means that optimization codes may get stuck in local minima that may or may not provide sufficiently acceptable solutions. Although the inclusion of the spectral radius constraint makes (9) a nonsmooth, nonconvex optimization problem, with a non-locally-Lipschitz constraint function, again we do not necessarily need to solve it exactly (though this will remain to be seen in our experiments). Furthermore, while much of the literature on nonsmooth optimization has historically focused on unconstrained problems, there has also been recent interest in addressing problems with nonsmooth constraints. For example, a new algorithm combining quasi-Newton BFGS (Broyden-Fletcher-Goldfarb-Shanno) updating and SQP (sequential quadratic programming)2 was recently proposed for general nonsmooth, nonconvex, constrained optimization problems [10], where no special knowledge or structure is assumed about the objective or constraint functions. Particularly relevant to our approach here, this BFGS-SQP method was evaluated on 100 different spectral radius constrained optimization problems, with promising results relative to other solvers [10, Section 6]. This indicates that it may also be a good solver for our nonsmooth constrained optimization problem and thus we propose using it to solve (9). Specifically, we use GRANSO: GRadient-based Algorithm Non-Smooth Optimization [20], an open-source MATLAB code implementing the aforementioned BFGS-SQP method of [10]. Numerical Results Pr We implemented our new ioDMD variant using both PE and CE sampling strategies (presented in Section 3.1) to collect observations of the original system’s behaviors. Furthermore, our software can also optionally stabilize the resulting ioDMD-derived models by using GRANSO [10] on our associated nonsmooth constrained optimization problem. As discussed in Section 4, (9) is an underdetermined optimization problem in DMD settings. Since such problems are in a sense quite flat, the norm of the gradient merely being small can be a poor measure of when to terminate; correspondingly, we tightened GRANSO’s default termination tolerance of 10−6 to 10−8 (i.e. opts.opt_tol = 1e-8). Relatedly, convergence can also be slow so the choice of a starting point can also be critical. As our goal, specified by (9), is to stabilize a model while minimizing the tradeoff in any increased approximation error (that may occur due to stabilization), we simply used the unstable ioDMD-derived models as starting points for GRANSO and used GRANSO’s custom termination feature to halt optimization once a model had been found that was both stable (for (9) we used τ := 0) and had an objective value that was less than 1000 times the objective function evaluated at the original ioDMD-derived unstable model. We found that this loose limit on how much the objective function was allowed to increase was more than adequate to retain good output errors. We ran GRANSO using its full-memory BFGS mode 2 For a good introductory reference on many of the optimization techniques referred to in this paper, see [21]. 10 (its default behavior and the recommended choice for nonsmooth problems) and kept all other GRANSO options at their default values as well. The numerical experiments were implemented in the Matlab language and were run under MATLAB R2017a on a workstation computer with an Intel Core i7-6700 (4 Cores @ 3.4 GHz) and 8 GB memory. 5.1 Excitation and Stabilization Evaluation ep rin t We demonstrate the effects of different types of excitation used for the ioDMDbased system identification by a numerical example. Specifically, for a given target data set, we identify a discrete-time linear system first using the target data itself, second by persistent excitation (PE) and third by utilizing the herein proposed cross excitation (CE) from Section 3.1. The considered input-output system is based on the transport equation, with the left boundary of the domain selected as input and the right boundary as output: ∂ ∂ z(x, t) = a z(x, t), ∂t ∂x z(0, t) = u(t), x ∈ [0, 1], z(x, 0) = 0, y(t) = z(1, t). The partial differential equation is discretized in space using the first-order 1 finite-difference upwind scheme, with a spatial resolution of ∆x = 1000 and a = 1.3. The resulting ODE input-output system is then given by: ẋ(t) = Ax(t) + Bu(t), y(t) = Cx(t). (10) Pr The target data is given by discrete input, state and output functions from a simulation, which is performed by a first order implicit Runge-Kutta method. 1 We used a time-step width of ∆t = 1000 and a time horizon of T = 1, with a 1 1 2 Gaussian-bell type input function û(t) = e− 1000 (t− 10 ) . For the comparison, a discrete-time linear system was first identified from the 1000 snapshots generated by a simulation of (10) excited by input û, to obtain a baseline for the modeling performance of ioDMD. The PE variant was sampled using zero-mean, unit-covariance Gaussian noise and a unit step function input was used for the ioDMD-based identification. Finally, our CE variant had the initial state sampled from a unit Gaussian distribution and a (component-wise) shifted initial state x0,i = 1 was tested. All methods were tested with ioDMD only and then also with stabilization. 5.1.1 ioDMD without Stabilization Fig. 1 depicts the relative output error for simulations of systems identified using data associated to the target input û, PE, and CE for increasingly accurate state-space data compression (that is, for increasingly smaller amounts of compression). The state-space data dimensionality was reduced using the POD method with prescribed projection errors of 10−1 , . . . , 10−8 . In this set of experiments, we did not use stabilization. 11 10 0 10 -1 Output Error Output Error 10 0 10 -2 Target PE CE 0.01 0.0001 1e-06 Projection Error 1e-08 (a) Non-regularized identification by noise input or randomly sampled initial state. 10 -1 10 -2 0.01 1e-08 10 0 Target PE CE 10 -3 0.0001 1e-06 Projection Error (b) Non-regularized identification by step input or shifted initial state. Output Error Output Error 10 0 Target PE CE 10 -10 ep rin t 10 -3 10 -5 0.01 0.0001 1e-06 Projection Error Target PE CE 10 -10 1e-08 (c) Regularized identification by noise input or randomly sampled initial state. 10 -5 0.01 0.0001 1e-06 Projection Error 1e-08 (d) Regularized identification by step input or shifted initial state. Pr Figure 1: First numerical experiment (Section 5.1.1): Non-stabilized ioDMDbased system identification. The plots show the identified (reduced order) system’s output error compared to the original system’s output for varying accuracies of the POD projection-based model reduction. In Figs. 1a and 1b, the ioDMD procedure was not regularized by truncating singular values, while regularization Σii < 10−5 was used in Figs. 1c and 1d. In Figs. 1a and 1c, system identification was performed using zero-mean Gaussian noise for the PE and an initial state sampled from a zero-mean Gaussian distribution for CE, respectively. In Figs. 1b and 1d, respectively, the identification was driven by a step input for the PE and a shifted initial state x0,i = 1 for CE. For this set of experiments, using the target data only produced stable systems for large values of acceptable projection error while the PE-derived models were always unstable (and thus had very poor performance regardless of the projection error). In contrast, the CE method produced stable systems for all levels of projection error tested. Performance-wise, when comparing to the few targetdata-derived models that also happened to be stable, the CE-derived models had 12 errors that were less than one order of magnitude higher (see Figs. 1a and 1c). On the other hand, when using the step input or shifted initial state, both PE and CE produced models with increasing accuracy as the level of acceptable projection error of the data was decreased, as seen in Figs. 1b and 1d. In Fig. 1d, we see that the regularization limited the attainable accuracy for both PE and CE. The target-data-derived system had a constant error independent from the projection error of the data. 5.1.2 ioDMD with Stabilization Pr ep rin t In this second set of experiments, Fig. 2 still shows the relative output error for simulations of systems identified using the target data, PE, and CE for increasingly accurate state-space data compression, but now the systems have been post-processed using our optimization-based approach to enforce stability, as necessary. The state-space data dimensionality was again reduced using the POD method, with prescribed projection errors of 10−1 , . . . , 10−8 . The subfigures are arranged as they were in Fig. 1. The step function PE and shifted initial state CE are unaffected by our stabilization post-processing phase, as these systems were already stable; thus their plots are the same in Figs. 2b and 2d as they were in Figs. 1b and 1d. In the case of using Gaussian noise or randomly sampled initial state (Figs. 2a and 2c), which had not yielded stable systems for the target data or PE (either with or without regularization), our optimization-based post-processing procedure now enforced stability. For the ioDMD-derived models that were unstable, GRANSO was able to stabilize all 24 of them. The average number of iterations needed to find the first stabilized version was 13.5 while the maximum was just 61. Furthermore, for 12 of the problems, our full termination criteria were met in less than 20 iterations while the average and maximum iteration counts over all 24 problems were respectively 84.2 and 329. This demonstrates that our optimization-based approach is indeed able to stabilize such models reliably and efficiently. Solving (9) via GRANSO also met our secondary goal, that stabilization is achieved without deviating too significantly from the original unstable models. The largest observed relative change between an initial unstable model and its corresponding GRANSO-derived stabilized version was just 1.44% while the average observed relative change was merely 0.231%; the relative differences were calculated by comparing vec[As , Bs ; Cs , Ds ], where the matrices are GRANSO’s computed stabilized solution to (9), to a similar vec of the original (unstable) ioDMD-derived model. 5.1.3 Reduced Orders and Runtimes We now compare the order of the identified systems. The order of the identified system is determined by the projection error selected for the state-space compression in the POD. For each data set (Target, Gaussian noise PE, Gaussian sample CE, Step input PE, shifted initial state CE), the resulting reduced order is plotted for the different prescribed projection errors in Fig. 3a. As we can see, the step-input PE and shifted-initial-state CE method behave similar in terms of system dimension while for the Gaussian-noise PE and Gaussian-sampled initial-state CE, the CE variant resulted in smaller system dimensions. 13 10 0 10 -1 Output Error Output Error 10 0 10 -2 Target PE CE 0.01 0.0001 1e-06 Projection Error 1e-08 (a) Non-regularized identification by noise input or randomly sampled initial state. 10 -1 10 -2 0.01 1e-08 10 0 Target PE CE 10 -3 0.0001 1e-06 Projection Error (b) Non-regularized identification by step input or shifted initial state. Output Error Output Error 10 0 Target PE CE 10 -10 ep rin t 10 -3 10 -5 0.01 0.0001 1e-06 Projection Error Target PE CE 10 -10 1e-08 (c) Regularized identification by noise input or randomly sampled initial state. 10 -5 0.01 0.0001 1e-06 Projection Error 1e-08 (d) Regularized identification by step input or shifted initial state. Pr Figure 2: Second numerical experiment (Section 5.1.2): Stabilized ioDMD-based system identification. The plots show the identified (reduced order) system’s output error compared to the original system’s output for varying accuracies of the POD projection-based model reduction. In terms of computational cost, only the Target and Gaussian-noise PE variants required stabilization and as such, it is only for these that we see increased runtimes, as shown by the red and green plots (respectively) in Fig. 3b. Otherwise, the runtimes were mostly identical for the other variants in the comparison. 5.2 Limited-Memory BFGS for Stabilization? One potential downside to our optimization-based stabilization procedure is that full-memory BFGS inverse Hessian updating (GRANSO’s recommended setting for nonsmooth problems) requires per-iteration work and storage that is quadratic in the number of optimization variables. As the number of optimiza- 14 10 2 100 System Dimension 90 80 Stabilization Runtime Target PE (Gauss) CE (Gauss) PE (Step) CE (Shift) 70 60 50 40 10 1 10 0 10 -1 0.01 0.0001 1e-06 Projection Error 1e-08 0.01 0.0001 1e-06 Projection Error 1e-08 ep rin t 30 Target PE (Gauss) CE (Gauss) PE (Step) CE (Shift) (a) Comparison of the identified system’s reduced order for different pre-selected mean L2 projection errors used in both experiments (see Section 5.1.1). (b) Comparison of runtimes in seconds for the stabilization procedure in the second experiment (Section 5.1.2). Figure 3: Comparison of reduced identified system orders and stabilization runtimes. Pr tion variables is (r + m) × (r + p), the running time required to solve (9) could become unacceptably long as r, the reduced order of the model, is increased. Thus, we now also consider whether or not limited-memory BFGS updating can also be effective for solving (9). Using limited-memory BFGS has the benefit that the per-iteration work and storage is reduced to a linear amount (again in the number of optimization variables). However, one of the tradeoffs is that convergence can be quite slow in practice. For smooth problems, full-memory BFGS converges superlinearly while limited-memory BFGS only does so linearly; on nonsmooth problems, linear convergence is the best one can typically expect. Another potential issue is that while there has been much evidence supporting that full-memory BFGS is very reliable for nonsmooth optimization, the case for using limited-memory BFGS on nonsmooth problems is much less clear; for a good overview of the literature on this topic, see [18, Section 1]. To investigate this question, we reran the experiments from Section 5.1 a second time but where GRANSO’s limited-memory BFGS mode was now enabled. Specifically, we configured GRANSO to approximate the inverse Hessian at each iteration using only the 10 most recently computed gradients, accomplished by setting opts.limited_mem_size = 10. All other parameters of our experimental setup were kept as they were described earlier. In this limited-memory configuration, GRANSO often required significantly more iterations, as one might expect. The average and max number of iterations to find the first stable version of a model were respectively 73.6 and 474, about an order of magnitude more iterations than incurred when using full-memory BFGS. On the other hand, for 19 of the 24 problems, stable models were encountered within the first 20 iterations. To meet our full termination criteria, the average and max number of iterations were respectively 222.0 and 811, roughly about two and a half times more than incurred when using full-memory BFGS. 15 6 ep rin t Nevertheless, 12 of the 24 problems were still satisfactorily solved in less than 20 iterations, matching the earlier result when using full-memory BFGS. Despite the large increases in iteration counts, GRANSO’s overall runtime was on average 3.83 times faster when enabling limited-memory BFGS. With respect to output error in this limited-memory evaluation, the resulting stabilized models still essentially matched the earlier results using full-memory BFGS. There was one notable exception, for Target data using the smallest projection error of 10−8 , where GRANSO remarkably found a better-performing model when using limited-memory BFGS. However, we did observe that the quality of the stabilized models appeared to be much more sensitive to changing GRANSO’s parameters than they were when using full-memory BFGS. As a consequence, we still advocate that solving (9) with GRANSO is generally best done using its default full-memory BFGS updating. Nonetheless, if this is simply not feasible computationally, one may still be able to obtain good results using limited-memory BFGS but perhaps not as reliably or consistently. As a final clarifying remark on this topic, we note that one cannot necessarily expect good performance on nonsmooth problems when using just any BFGS-based optimization code and that generally it is critical that the choice of software is one specifically designed for nonsmooth optimization. Indeed, this is highlighted in the evaluation done in [10, Section 6], where off-the-shelf quasiNewton-based codes built for smooth optimization perform much worse on a test set of nonsmooth optimization problems compared to the quasi-Newton-based codes specifically built with nonsmooth optimization in mind. Conclusion Pr In this work, we evaluated the approximation quality of ioDMD system identification using a novel excitation scheme and a new optimization-based, postprocessing procedure to ensure stability of the identified systems. Our new cross excitation strategy, particularly when used with random sampling, often produces better results than when using persistent excitation, and our experiments indicate that both excitation schemes are useful for efficiently obtaining good models for approximating the target data. Furthermore, we show that directly solving a nonsmooth constrained optimization problem can indeed be a viable approach for stabilizing ioDMD-derived systems while retaining the salient properties for approximating the output response. Code Availability The source code of the presented numerical examples can be obtained from: http://runmycode.org/companion/view/2902 and is authored by: Christian Himpe and Tim Mitchell. 16 References [1] A. Alla and J. N. Kutz. Nonlinear model order reduction via dynamic model decomposition. SIAM J. Sci. Comput., 39(5):B778–B796, 2017. doi: 10.1137/16M1059308. [2] D. Amsallem and C. Farhat. Stabilization of projection-based reducedorder models. Numerical Methods in Engineering, 91(4):358–377, 2012. doi:10.1002/nme.4274. ep rin t [3] J. Annoni, P. Gebraad, and P. Seiler. Wind farm flow modeling using inputoutput dynamic mode decomposition. In American Control Conference (ACC), pages 506–512, 2016. doi:10.1109/ACC.2016.7524964. [4] J. Annoni and P. Seiler. A method to construct reduced-order parametervarying models. International Journal of Robust and Nonlinear Control, 27(4):582–597, 2017. doi:10.1002/rnc.3586. [5] A. C. Antoulas. Approximation of Large-Scale Dynamical Systems, volume 6 of Adv. Des. Control. SIAM Publications, Philadelphia, PA, 2005. doi:10.1137/1.9780898718713. [6] K. J. Åström and P. Eykhoff. System identification – a survey. Automatica, 7(2):123–162, 1971. doi:10.1016/0005-1098(71)90059-8. [7] B. W. Brunton, L. A. Johnson, J. G. Ojemann, and J. N. Kutz. Extracting spatial-temporal coherent patterns in large-scale neural recordings using dynamic mode decomposition. Journal of Neuroscience Methods, 258:1– 15, 2016. doi:10.1016/j.jneumeth.2015.10.010. [8] J. V. Burke and M. L. Overton. Variational analysis of non-Lipschitz spectral functions. Math. Program., 90(2, Ser. A):317–352, 2001. doi: 10.1007/s102080010008. Pr [9] K. K. Chen, J. H. Tu, and R. W. Rowley. Variants of dynamic mode decomposition: Boundary condition, Koopman, and Fourier analyses. Nonlinear Science, 22(6):887–915, 2012. doi:10.1007/s00332-012-9130-9. [10] F. E. Curtis, T. Mitchell, and M. L. Overton. A BFGS-SQP method for nonsmooth, nonconvex, constrained optimization and its evaluation using relative minimization profiles. Optim. Methods Softw., 32(1):148–181, 2017. doi:10.1080/10556788.2016.1208749. [11] K. V. Fernando and H. Nicholson. On the structure of balanced and other principal representations of SISO systems. IEEE Trans. Autom. Control, 28(2):228–231, 1983. doi:10.1109/TAC.1983.1103195. [12] P. Holmes, J. L. Lumley, G. Berkooz, and C. W. Rowley. Turbulence, coherent structures, dynamical systems and symmetry. Cambridge Monographs on Mechanics. Cambridge University Press, Cambridge, 2012. doi: 10.1017/CBO9780511919701. 17 [13] T. C. Ionescu, K. Fujimoto, and J. M. A. Scherpen. The cross operator and the singular value analysis for nonlinear symmetric systems. In Proc. Eur. Control Conf., pages 1565–1570, 2009. URL: http://hdl.handle. net/11370/1bcfd3be-c006-49e0-bbbe-5c09ca055d87. [14] K. Katayama. Subspace Methods for System Identification. Communications and Control Engineering. Springer London, 2005. doi:10.1007/ 1-84628-158-X. [15] B. O. Koopman. Hamiltonian systems and transformation in Hilbert space. Proceedings of the National Academy of Sciences, 17(5):315–381, 1931. URL: http://www.pnas.org/content/17/5/315.full.pdf. ep rin t [16] J. N. Kutz, S. L. Brunton, B. W. Brunton, and J. L. Proctor. Dynamic Mode Decomposition: Data-Driven Modeling of Complex Systems. Society of Industrial and Applied Mathematics, Philadelphia, USA, 2016. doi: 10.1137/1.9781611974508. [17] S. Lall, J. E. Marsden, and S. Glavaški. Empirical model reduction of controlled nonlinear systems. In Proc. of the IFAC World Congress, volume F, pages 473–478, 1999. URL: resolver.caltech.edu/CaltechAUTHORS: 20101007-154754737. [18] A. S. Lewis and M. L. Overton. Nonsmooth optimization via quasi-Newton methods. Math. Program., 141(1–2, Ser. A):135–163, 2013. doi:10.1007/ s10107-012-0514-2. [19] I. Mezic. Spectral properties of dynamical systems, model reduction and decompositions. Nonlinear Dynamics, 41(1):309–325, 2005. doi:10.1007/ s11071-005-2824-x. [20] T. Mitchell. GRANSO: GRadient-based Algorithm for Non-Smooth Optimization. http://timmitchell.com/software/GRANSO. See also [10]. Pr [21] J. Nocedal and S. J. Wright. Numerical Optimization. Springer, New York, 1999. doi:10.1007/b98874. [22] H. Oku and T. Fujii. Direct subspace model identification of LTI systems operating in closed-loop. In 43rd IEEE Conference on Decision and Control, pages 2219–2224, 2004. doi:100.1109/CDC.2004.143378. [23] J. L. Proctor, S. L. Brunton, and J. N. Kutz. Dynamic mode decomposition with control. SIAM J. Applied Dynamical Systems, 15(1):142–161, 2016. doi:10.1137/15M1013857. [24] J. L. Proctor, S. L. Brunton, and J. N. Kutz. Generalizing Koopman theory to allow for inputs and control. arXiv e-prints 1602.07647, Cornell University, 2016. math.OC. URL: https://arxiv.org/abs/1602.07647. [25] C. W. Rowley and S. T. M. Dawson. Model reduction for flow analysis and control. Annual Review of Fluid Mechanics, 49:387–417, 2017. doi: 10.1146/annurev-fluid-010816-060042. 18 [26] C. W. Rowley, I. Mezic, S. Bagheri, P. Schlatter, and D. S. Henningson. Spectral analysis of nonlinear flows. Journal of Fluid Mechanics, 641:115– 1127, 2009. doi:10.1017/S0022112009992059. [27] P. J. Schmid. Dynamic mode decomposition of numerical and experimental data. J. Fluid Mech., 656:5–28, 2010. doi:10.1017/S0022112010001217. [28] J. H. Tu, C. W. Rowley, D. M. Luchtenburg, S. L. Brunton, and J. N. Kutz. On dynamic mode decomposition: Theory and applications. Journal of Computational Dynamics, 1(2):391–421, 2014. doi:10.3934/jcd.2014. 1.391. ep rin t [29] P. M. J. Van Den Hof and R. J. P. Schrama. An indirect method for transfer function estimation from closed loop data. Automatica, 29(6):1523–1527, 1993. doi:10.1016/0005-1098(93)90015-L. [30] P. Van Overschee and B. de Moor. N4SID: numerical algorithms for state space subspace system identification. In IFAC Proceedings Volumes, volume 26, pages 55–58, 1993. doi:10.1016/S1474-6670(17)48221-8. Pr [31] M. Viberg. Subspace-based methods for the identification of linear timeinvariant systems. Automatica, 31(12):1835–1851, 1995. doi:10.1016/ 0005-1098(95)00107-5. 19
3cs.SY
Message-passing algorithms for synchronization problems over compact groups Amelia Perry∗†1 , Alexander S. Wein∗‡1 , Afonso S. Bandeira§3 , and Ankur Moitra¶1,2 arXiv:1610.04583v1 [cs.IT] 14 Oct 2016 1 2 Department of Mathematics, Massachusetts Institute of Technology Computer Science and Artificial Intelligence Lab, Massachusetts Institute of Technology 3 Department of Mathematics and Center for Data Science, Courant Institute of Mathematical Sciences, New York University, NY, USA October 17, 2016 Abstract Various alignment problems arising in cryo-electron microscopy, community detection, time synchronization, computer vision, and other fields fall into a common framework of synchronization problems over compact groups such as Z/L, U (1), or SO(3). The goal of such problems is to estimate an unknown vector of group elements given noisy relative observations. We present an efficient iterative algorithm to solve a large class of these problems, allowing for any compact group, with measurements on multiple ‘frequency channels’ (Fourier modes, or more generally, irreducible representations of the group). Our algorithm is a highly efficient iterative method following the blueprint of approximate message passing (AMP), which has recently arisen as a central technique for inference problems such as structured low-rank estimation and compressed sensing. We augment the standard ideas of AMP with ideas from representation theory so that the algorithm can work with distributions over compact groups. Using standard but non-rigorous methods from statistical physics we analyze the behavior of our algorithm on a Gaussian noise model, identifying phases where the problem is easy, (computationally) hard, and (statistically) impossible. In particular, such evidence predicts that our algorithm is information-theoretically optimal in many cases, and that the remaining cases show evidence of statistical-to-computational gaps. 1 Introduction Among the most common data problems in the sciences is that of recovering low-rank signal present in a noisy matrix. The standard tool for such problems is principal component analysis (PCA), which estimates the signal by the top eigenvectors. One example out of many is in macroeconomics, where large, noisy correlation matrices reveal useful volatility and yield predictions in their top eigenvectors [LS91, ELW10]. However, many particular applications involve extra structure such as sparsity in the signal, and this structure is ignored by conventional PCA, leading to sub-optimal estimates. Thus, a major topic of recent interest in ∗ The first two authors contributed equally. [email protected]. This work is supported in part by NSF CAREER Award CCF-1453261 and a grant from the MIT NEC Corporation. ‡ Email: [email protected]. This research was conducted with Government support under and awarded by DoD, Air Force Office of Scientific Research, National Defense Science and Engineering Graduate (NDSEG) Fellowship, 32 CFR 168a. § Email: [email protected]. A.S.B. was supported by NSF Grant DMS-1317308. Part of this work was done while A.S.B. was with the Department of Mathematics at the Massachusetts Institute of Technology. ¶ Email: [email protected]. This work is supported in part by NSF CAREER Award CCF-1453261, a grant from the MIT NEC Corporation and a Google Faculty Research Award. † Email: 1 machine learning is to devise efficient algorithms for sparse PCA [AW08, BR13b], non-negative PCA [MR16], general Bayesian PCA with a prior [Bis99], and other variants. These problems pose a major computational challenge. While significant advances have appeared, it is also expected that there are fundamental gaps between what is statistically possible and what can be done efficiently [BR13a, LKZ15a, LKZ15b, MW15], and thus carried out in practice on very large datasets that are now prevalent. A number of low-rank recovery problems involve a significant amount of symmetry and group structure. A compelling example is the orientation problem in cryo-electron microscopy (cryo-EM), where one is given many noisy 2D images of copies of an unknown molecule, each in different unknown 3D orientations. The goal is to estimate the orientations, in order to assemble the images into an estimate of the molecule structure [SS11]. Thus, one is tasked with learning elements gu of SO(3), one for each image u, based on some loss function derived from the observed images. Moreover, this loss function has a symmetry: it depends only on the relative alignments gu gv−1 , as there is no a priori reference frame. One previous approach to this problem, due to [CSSS10, SS11], produces a matrix of pairwise image comparisons, and then attempts to extract the rotations gu from the top eigenvectors of this matrix. However, it is reasonable to imagine that this approach could be significantly sub-optimal: PCA does not exploit the significant group structure of the signal. Many problems with similar patterns of group symmetry have been previously studied under the general heading of synchronization problems. In general, a synchronization problem asks us to recover a vector of group elements given noisy pairwise measurements of the relative group elements gu gv−1 , and PCA-based ‘spectral methods’ are among the most common techniques used for such problems. Singer [Sin11] introduced a PCA approach for angular synchronization, a 2D analogue of the problem above with symmetry over SO(2), in which one estimates the orientations of noisy, randomly rotated copies of an unknown image. Cucuringu et al. [CLS12] applied a similar approach to a sensor localization problem with synchronization structure over the Euclidean group Euc(2). The problem of detecting two subcommunities in a random graph can be viewed as synchronization over Z/2 [Ban15], and spectral methods have a long history of use in such community detection and minimum cut problems (e.g. [McS01]). Further instances of synchronization appear in time synchronization in networks [GK06], computer vision [ARC06], optics [RW01], and alignment in signals processing [BCSZ14]. Further work on synchronization has focused on ways to better exploit the group structure. One method used in practice for cryo-EM and related problems is alternating minimization, which alternates between estimating the rotations by aligning the images with a previous guess of the molecule structure, and then estimating the molecule structure from the images using these rotations. This method only appears to succeed given a strong initial guess of the molecule structure, and then it is unclear whether the final estimate mainly reflects the observations or simply the initial guess, leading to a problem of model bias; see e.g. [Coh13]. In this paper we are interested in de novo estimation without a substantial initial guess, steering clear of this pitfall. Convex relaxations of maximum likelihood estimators have shown promise, such semidefinite relaxation for angular synchronization introduced by Singer [Sin11] and proven tight by Bandeira et al. [BBS14], or in semidefinite programs for community detection and correlation clustering problems that constitute Z/2-synchronization (e.g. [GW95, ABH16, HWX16, ABBS14, MS16]). Indeed, a very general semidefinite relaxation for synchronization problems was introduced by Bandeira et al. [BCS15], but its performance remains unclear even empirically: while this convex program can be solved in polynomial time, it is large enough to make experiments or application difficult. An alternate approach is an iterative method due to Boumal [Bou16], for the following Gaussian model of angular synchronization: one wants to estimate a vector x ∈ Cn whose entries are unit-norm complex numbers (standing in for 2D rotations), given a matrix Y = 1 λ ∗ xx + √ W, n n where λ is a signal-to-noise ratio (SNR) parameter, W is a GUE matrix (independent complex Gaussians up to Hermitian symmetry), and ∗ denotes conjugate transpose. One could perform ordinary PCA by initializing 2 with a small random guess v and repeatedly assigning v ← Y v; this is the method of power iteration. Instead, Boumal proposes1 to iterate v ← f (Y v), where f divides each entry by its norm, thus projecting to the unit circle. This method is highly efficient, and is moreover observed to produce a better estimate than PCA once the signal-to-noise parameter λ is sufficiently large. However, while PCA produces a nontrivial estimate for all λ > 1 (e.g. [FP07, BGN11]), this projected power method does not appear to produce a meaningful √ estimate until λ is somewhat larger. (In fact, a heuristic analysis similar to Section 6.3 suggests that λ > 2/ π ≈ 1.128 is required.) This behavior suggests that some iterative method combining the best features of PCA and the projected power method might outperform both statistically, while remaining very efficient. More importantly, we are motivated to find analogous iterative methods for groups other than U (1), and for more complicated observation models. One such observation model is as follows. Instead of observing only the matrix Y as above, suppose we are given matrices corresponding to different Fourier modes: Y1 = Y2 = λ1 ∗ 1 xx + √ W1 , n n 1 λ2 2 2 ∗ x (x ) + √ W2 , n n .. . YK = λK K K ∗ 1 x (x ) + √ WK , n n where xk denotes entrywise power, and Wk are independent GUE matrices. With a PCA-based approach, it is not clear how to effectively couple the information from these matrices to give a substantially better estimate than could be derived from only one. The “non-unique games” semidefinite program of [BCS15] is able to use data from an observation model such as this, but it is not yet empirically clear how it performs. Can we hope for some very efficient iterative algorithm to strongly leverage data from multiple ‘frequencies’ or ‘channels’ such as this? This question has more than abstract relevance: due to Fourier theory, a very large class of measurement models for U (1)-synchronization decomposes into matrix-based observations on different frequencies, in a manner resembling the model above. Moreover, an analogous statement holds over SO(3), and over other compact groups, with Fourier theory replaced by the noncommutative setting of representation theory. Thus, the aforementioned spectral approach to cryo-EM applies PCA to only the lowest frequency part of the observations; an algorithm that can use all frequencies effectively might demonstrate dramatically improved statistical performance on cryo-EM. In this paper we present an iterative algorithm to meet the challenges above. Our algorithm aims to solve a general formulation of the synchronization problem: it can apply to multiple-frequency problems for a large class of observation models, with symmetry over any compact group. Our approach is statistically powerful, empirically providing a better estimate than both PCA and the projected power method on U (1)synchronization, and leveraging multiple frequencies to give several orders of magnitude improvement in estimation error in experiments (see Figures 3 and 4). Indeed, we conjecture based on ideas from statistical physics that in many regimes our algorithm is statistically optimal, providing a minimum mean square error (MMSE) estimator asymptotically as the matrix dimensions become infinite (see Section 8). Finally, our approach is highly efficient, with each iteration taking time linear in the (matrix) input, and with roughly 15 iterations sufficing for convergence in experiments. Our algorithm follows the framework of approximate message passing (AMP), based on belief propagation on graphical models [Pea86] and the related cavity method in statistical physics [MPV86]. Following a general blueprint, AMP algorithms have previously been derived and analyzed for compressed sensing [DMM09, DMM10, BM11, JM13], sparse PCA [DM14], non-negative PCA [MR16], cone-constrained PCA [DMR14], 1 Projected power methods have appeared earlier in the literature, for instance, in [MR16]. 3 planted clique [DM15] and general structured PCA [RF12]. In fact, AMP has already been derived for Z/2synchronization under a Gaussian observation model [DAM16], and our algorithm will generalize this one to all compact groups. A striking feature of AMP is that its asymptotic performance can be captured exactly by a particular fixed-point equation called state evolution, which has enabled the rigorous understanding of its performance on some problems [BM11, JM13]. AMP is provably statistically optimal in many cases, including Gaussian Z/2 synchronization (modulo a technicality whereby the proof supposes a small warmstart) [DAM16]. AMP algorithms frequently take a form similar to the projected power method of Boumal described above, alternating between a matrix–vector product with the observations and an entrywise nonlinear transformation, together with an extra ‘Onsager’ correction term. In the case of Z/2- or U (1)-synchronization, we will see that the AMP derivation reproduces Boumal’s algorithm, except with the projection onto the unit circle replaced by a soft, sigmoid-shaped projection function to the unit disk (see Figure 1), with the magnitude maintaining a quantitative measure of confidence. Integrating the usual AMP blueprint with the representation theory of compact groups, we obtain a broad generalization of this method, to synchronization problems with multiple frequencies and noncommutative groups such as SO(3). In full generality, the nonlinear transformation has a simple interpretation through representation theory and the exponential function. One drawback of our approach is that although we allow for a very general observation model, we do insist that the noise on each pairwise measurement is independent. This fails to capture certain synchronization models such as multireference alignment [BCSZ14] and cryo-EM that have noise on each group element rather than on each pair. For instance, the noise in cryo-EM occurs on each image rather than independently on each pairwise comparison. Adapting AMP to these more general models is left for future work. This paper is organized as follows. We begin in Section 2 with an outline of our methods in the simplified cases of synchronization over Z/2 and U (1), motivating our approach from a detailed discussion of prior work and its shortfalls. In Section 3 we provide our general algorithm and the general problem model for which it is designed. Several experiments on this Gaussian model and other models are presented in Section 4, demonstrating strong empirical performance. We then offer two separate derivations of our AMP algorithm: in Section 5, we derive our algorithm as a simplification of belief propagation, and then in Section 6 we give an alternative self-contained derivation of the nonlinear update step and use this to provide a non-rigorous analysis of AMP (based on standard assumptions from statistical physics). In particular, we derive the state evolution equations that govern the behavior of AMP, and use these to identify the threshold above which AMP achieves non-trivial reconstruction. Namely, we see that AMP has the same threshold as PCA (requiring the SNR λ to exceed 1 on at least one frequency), but AMP achieves better recovery error above the threshold. In Section 7 we argue for the correctness of the above non-rigorous analysis, providing both numerical and mathematical evidence. It is known that inefficient estimators can beat the λ = 1 threshold [PWBM16] but we conjecture that no efficient algorithm is able to break this barrier, thus concluding in Section 8 with an exploration of statistical-to-computational gaps that we expect to exist in synchronization problems, driven by ideas from statistical physics. 2 Intuition: iterative methods for Z/2 and U (1) synchronization We begin with a discussion of synchronization methods over the cyclic group Z/2 and the group of unit complex numbers (or 2D rotations) U (1). These examples will suffice to establish intuition and describe much of the novelty of our approach, while avoiding the conceptual and notational complication of representation theory present in the general case. Sections 2.1, 2.2, and some of 2.3 discuss prior work on these problems in more depth, while Sections 2.3 and 2.4 develop a special case of our algorithm. 4 2.1 Z/2 synchronization The problem of Gaussian Z/2 synchronization is to estimate a uniformly drawn signal x ∈ {±1}n given the matrix λ 1 Y = xx⊤ + √ W, n n where W is a symmetric matrix whose entries are distributed independently (up to symmetry) as N (0, 1), and λ > 0 is a signal-to-noise parameter. With this scaling, the signal and noise are of comparable size in spectral norm; we can not hope to recover x exactly, but we can hope to produce an estimate x b ∈ {±1} that bi2 > ε with is correlated nontrivially with x, i.e. there exists ε > 0 (not depending on n) such that n12 hx, x ⊤ ⊤ probability 1 − o(1) as n → ∞. As xx = (−x)(−x) , we can only hope to estimate x up to sign; thus we aim to achieve a large value of hx, x bi2 . We now review three algorithmic methods for this problem. Spectral methods. With the scaling above, the spectral norm of the signal nλ xx⊤ is λ, while that of the noise √1n W is 2. By taking the top eigenvector of Y , x may be estimated with significant correlation provided that λ is a large enough constant. Specifically, the generative model for Y above is a special case of the spiked Wigner model, and the eigenvalues and eigenvectors of such spiked models are among the main objects of study in random matrix theory. When λ > 1, the (unit norm) top eigenvector vmax (Y ) correlates nontrivially with x; more specifically, as n → ∞, we have n1 hx, vmax (Y )i2 → 1 − 1/λ2 in probability [FP07, BGN11]. When λ < 1, this squared correlation tends to zero; in fact, this is known to be true of all estimators [DAM16, PWBM16], reflecting a sharp statistical phase transition. Note that a top eigenvector may be computed through power iteration as follows: an initial guess v 0 is drawn randomly, and then we iteratively compute v (t) = Y v (t−1) , rescaling the result as appropriate. Thus P (t−1) (t−1) (t) each entry is computed as vu = w Yuw vw ; we can imagine that each entry w sends a ‘message’ Yuw vw to each entry u – the ‘vote’ of entry w as to the identity of entry u – and then each entry sums the incoming votes to determine its new value. The result has both a sign, reflecting the weighted majority opinion as to whether that entry should ultimately be +1 or −1, and also a magnitude, reflecting a confidence and serving as the weight in the next iteration. Thus we can envision the spectral method as a basic “message-passing algorithm”. While this approach is effective as quantified above, it would seem to suffer from two drawbacks: • the spectral method is basis-independent, and thus cannot exploit the entrywise ±1 structure of the signal; • the vertex weights can grow without bound, potentially causing a few vertices to exert undue influence. Indeed, these drawbacks cause major issues in the stochastic block model, a variant of the model above with the Gaussian observations replaced by low-probability Bernoulli observations, usually envisioned as the adjacency matrix of a random graph. Here a few sporadically high-degree vertices can dominate the spectral method, causing asymptotically significant losses in the statistical power of this approach. Projected power iteration. Our next stepping-stone toward AMP is the projected power method studied by [Bou16, CC16], a variant of power iteration that exploits entry-wise structure. Here each iteration takes the form v (t) = sgn(Y v (t−1) ), where the sign function sgn : R → {±1} applies entrywise. Thus each iteration is a majority vote that is weighted only by the magnitudes of the entries of Y ; the weights do not become more unbalanced with further iterations. This algorithm is also basis-dependent in a way that plausibly exploits the ±1 structure of the entries. Empirically, this algorithm obtains better correlation with the truth, on average, when λ > 2.4 approximately; see Figure 2. However, for very noisy models with 1 < λ < 2.4, this method appears weaker than the spectral method. The natural explanation for this weakness is that this projected power method forgets the distinction between a 51% vote and a 99% vote, and thus is over-influenced by weak entries. This is 5 particularly problematic for low signal-to-noise ratios λ, for which 51% votes are common. In fact, a heuristic analysis similar to Section 6.3 suggests that this method does not achieve the correct threshold for λ, failing √ to produce nontrivial correlation whenever λ < 2/ π ≈ 1.128. Soft-threshold power iteration. A natural next step is to consider iterative algorithms of the form v (t) = f (Y v (t−1) ), where f applies some function R → [−1, 1] entrywise (by abuse of notation, we will also denote the entrywise function by f ). Instead of the identity function, as in the spectral method, or the sign function, as in the projected power method, we might imagine that some continuous, sigmoid-shaped function performs best, retaining some sense of the confidence of the vote without allowing the resulting weights to grow without bound. It is natural to ask what the optimal function for this purpose is, and whether the resulting weights have any precise meaning. Given the restriction to the interval [−1, 1], one can imagine treating each entry as a sign with confidence in a more precise way, as the expectation of a distribution over {±1}. At each iteration, each entry u might (t−1) then obtain the messages Yuw vw from all others, and compute the posterior distribution, summarized as (t) an expectation vu . As one can compute, this corresponds to the choice of transformation f (t) = tanh(λt) where λ is the signal-to-noise parameter from above (see Figure 1). 1 f (t) 0.5 0 -0.5 -1 -5 0 5 t Figure 1: Soft threshold functions used by AMP. The solid line is f (t) = tanh(t), used for Z/2 synchronization. The dashed line is f (t) = I1 (2t)/I0 (2t) (modified Bessel functions of the first kind), used for U (1) synchronization with one frequency. 2.2 Belief propagation and approximate message passing The soft-projection algorithm above may remind the reader of belief propagation, due to [Pea86] in the context of inference, and to [MPV86] as the cavity method in the context of statistical physics. We may envision the problem of estimating x as probabilistic inference over a graphical model. The vertices of the model represent the unknown entries of x, and every pair of vertices u, w participates in an edge interaction based on the matrix entry Yuw = Ywu . Specifically, it may be computed that the posterior distribution for x ∈ {±1}n after observing Y is given by Y Pr(x) ∝ exp(λYuw xu xw ), u<w which is precisely the factorization property that a graphical model captures. Given such a model, belief propagation proceeds in a fashion reminiscent of the previous algorithm: each vertex w sends a message to each neighbor u encoding the posterior distribution of xu based the previous 6 distribution of xw and the direct interaction λYuw . Each vertex u then consolidates all incoming messages into a new ‘posterior’ distribution on xu given these messages, computed as if the messages were independent. However, belief propagation introduces a correction to this approach: rather than letting information passed from w to u propagate back to w on the next iteration, belief propagation is designed to pass information along only those paths that do not immediately backtrack. Specifically, at each iteration, the message from w to u is based on only the synthesis of messages from all vertices except u from the previous iteration. This algorithm differs from the iterative methods presented above, both in this non-backtracking behavior, and in the fact that the transformation from the distribution at w to the message w → u is not necessarily linear (as in the multiplication Yuw vw above). Both of these differences can be reduced by passing to the framework of approximate message passing [DMM09], which simplifies belief propagation in dense models with weak interactions, through the following two observations (inspired by [TAP77] in the theory of spin glasses): √ • As the interaction λYuw is small, scaling as O(1/ n) as n → ∞, we may pass to an expansion in small Yuw when computing the message w → u from the mean w. In this example, we find that the (t−1) (t−1) 2 is the mean + O(Yuw ), where vw message w → u should be Rademacher with mean λYuw vw of the distribution for xw in the previous iteration. This linear expansion ensures that the main message-passing step can be expressed as a matrix–vector product. • Rather than explicitly computing non-backtracking messages, which is computationally more involved, we may propagate the more naı̈ve backtracking messages and then subtract the bias due to this simplification, which concentrates well. This correction term is called an Onsager correction. If vertex w passes messages to all neighbors based on its belief at iteration t − 2, and then all of these neighbors send return messages based on their new beliefs at time t − 1, then when updating the belief for vertex w at time t, one can explicitly subtract off the ‘reflected’ influence of the previous belief at time t − 2. It turns out that this is the only correction necessary: all other error contributions (e.g. 3-cycles) are o(1). Following these simplifications, one can arrive at an approximate message passing (AMP) algorithm for Z/2-synchronization: Algorithm 2.1 (AMP for Z/2 synchronization [DAM16]). — • Initialize v 0 to small (close to zero) random values in [−1, 1]. • Iterate for 1 ≤ t ≤ T : – Set c(t) = λY v (t−1) − λ2 (1 − h(v (t−1) )2 i)v (t−2) , the Onsager-corrected sum of incoming messages. (t) (t) – Set vu = tanh(cu ) for each vertex u, the new estimated posterior mean. • Return x b = v (T ) (or the approximate MAP estimate x b = sgn(v (T ) ) if a proper estimate in {±1}n is desired). Here h(v (t−1) )2 i denotes the average of the squared entries of v (t−1) . Detailed derivations of this algorithm appear in Sections 5 and 6 in much higher generality. In the setting of Z/2 synchronization, an algorithm equivalent to the above approach appears in [DAM16], where a statistical optimality property is proven: if AMP is warm-started with a state v 0 with nontrivial correlation with the truth, then it converges to an estimate of x that achieves minimum mean-squared error (MMSE) asymptotically as n → ∞. The warm-start requirement √ is technical and likely removable: if AMP is initialized to small randomness, with trivial correlation O(1/ n) with the truth, then its early iterations resemble PCA and should produce nontrivial correlation in O(log n) iterations. The statistical strength of AMP is confirmed empirically, as it appears to produce a better estimate than either PCA or the projected power method, for every λ > 1; see Figure 2. 7 2.3 AMP for Gaussian U(1) synchronization with one frequency As a first step toward higher generality, consider the following Gaussian synchronization model over the unit complex numbers U (1). The goal is to estimate a uniformly drawn signal x ∈ U (1) given the matrix Y = λ ∗ 1 xx + √ W, n n where W is a Hermitian matrix whose entries are distributed independently as CN (0, 1), the complex normal distribution given by N (0, 1/2) + N (0, 1/2)i, and where λ > 0 is a signal-to-noise parameter. As xx∗ is invariant under a global phase shift of x, we can only hope to estimate up to the same ambiguity, and so we would like an estimator x b that maximizes |hx, x bi|2 , where the inner product is conjugated in the second variable. Many of the previously discussed iterative techniques adapt to this new case. Spectral methods. The same analysis of the spectral method holds in this case; thus when λ > 1, the top eigenvector achieves nontrivial correlation with x, while for λ < 1, the spectral method fails and nontrivial estimation is provably impossible [PWBM16]. Projected power method. After each matrix–vector product, we can project v (t) entrywise onto the unit circle, preserving the phase of each entry while setting the magnitude to 1. This algorithm is analyzed in [Bou16] in a lower-noise setting, where it is shown to converge to the maximum likelihood estimator. Soft-threshold power method. One might imagine applying some entrywise function after each matrix– vector product, which preserves the phase of each entry while mapping the magnitude to [0, 1]. Thus the vector entries vu live in the unit disk, the convex hull of the unit circle; these might be envisioned as estimates of the posterior expectation of xu . Belief propagation & AMP. Belief propagation is somewhat problematic in this setting: all messages should express a distribution over U (1), and it is not a priori clear how this should be expressed in finite space. However, under the simplifications of approximate message passing, the linearity of the messagepassing stage enables a small summary of this distribution to suffice: we need only store the expectation of each distribution, a single value in the unit disk. Approximate message passing takes the following form: Algorithm 2.2 (AMP for U (1) synchronization with one frequency). — • Initialize v 0 to small random values in the unit disk conv(U (1)). • Iterate for 1 ≤ t ≤ T : – Set c(t) = λY v (t−1) − λ2 (1 − h|v (t−1) |2 i)v (t−2) , the Onsager-corrected sum of incoming messages. (t) (t) – Set vu = f (cu ) for each vertex u, the new estimated posterior mean. Here f applies the function f (t) = I1 (2t)/I0 (2t) to the magnitude, leaving the phase unchanged. • Return x b = v (T ) (or the approximate MAP estimate x b = phase(v (T ) ) if a proper estimate in U (1)n is desired). Here Ik denotes the modified Bessel functions of the first kind. The function f is depicted in Figure 1. Detailed derivations of this algorithm appear in Sections 5 and 6 in much higher generality. 8 2.4 AMP for Gaussian U(1) synchronization with multiple frequencies Consider now the following more elaborate synchronization problem. The goal is to estimate a spike x ∈ U (1)n from the observations λ1 ∗ 1 Y1 = xx + √ W1 , n n Y2 = 1 λ2 2 2 ∗ x (x ) + √ W2 , n n .. . YK = 1 λK K K ∗ x (x ) + √ WK , n n where the Wk are independent Hermitian matrices whose entries are distributed independently (up to symmetry) as CN (0, 1), the λk > 0 are signal-to-noise parameters, and xk denotes the entrywise kth power of x. Thus we are given K independent noisy matrix-valued observations of x; we can imagine these observa√ tions as targeting different frequencies or Fourier modes. Given two independent draws of λ xx∗ /n + W/ n as in the previous section, the spectral method applied to their average will produce a nontrivial estimate of √ x as soon as λ > 1/ 2. However, under the multiple frequencies model above, with K = 2 and λ1 = λ2 = λ, nontrivial estimation is provably impossible for λ < 0.937 [PWBM16]; we present non-rigorous evidence in Section 8 that the true statistical threshold should in fact remain λ = 1. Thus the multiple frequencies model would seem to confound attempts to exploit the multiple observations together. However, we will discuss how AMP enables us to obtain a much better estimate when λ > 1 than is possible with one matrix alone. Let us return to the issue of belief propagation over U (1), and of how to represent distributions. One crude approach might be to discretize U (1) and express the density on a finite subset of points; however, this is somewhat messy (e.g. the discretization is not preserved under rotation) and only becomes worse for more elaborate groups such as SO(3) (here one can not even find arbitrarily fine discretizations on which the group acts transitively). Instead, we could exploit the rich structure of Fourier theory, and express a distribution on U (1) by the (t) Fourier series of its density2 . Thus, if µw is the belief distribution at vertex w and time t, we can express: (t) X dµw = vw,k eikθ , dθ/2π k∈Z with vw,0 = 1 and vw,−k = vw,k . Computing the distributional message mw→u from w to u, we obtain dmt+1 w→u =1+ dθ/2π X λk (Yk )uw vw,k eikθ + O((Y• )2uw ), X λk (Yk )uw vw,k eikθ + O((Y• )2uw ). 1≤|k|≤K √ where we take Y−k = Yk . As (Yk )uw is order 1/ n in probability, this approximation will be asymptotically accurate. Thus it suffices to represent distributions by the coefficients vw,k with |k| ≤ K. By conjugate symmetry, the coefficients with 1 ≤ k ≤ K suffice. The sufficiency of this finite description of each belief distribution is a key insight to our approach. The other crucial observation concerns the remaining BP step of consolidating all incoming messages into a new belief distribution. As each incoming message is a small perturbation of the uniform distribution, the approximation log(1 + x) ≈ x allows us to express the log-density of the message distribution: log dmt+1 w→u = dθ/2π 1≤|k|≤K 2 A dense subset of distributions satisfies appropriate continuity assumptions to discuss their densities with respect to uniform measure, a Fourier series, etc., and we will not address these analytic technicalities further. 9 We now add these log-densities to obtain the log-density of the new belief distribution, up to normalization:   t+1 X X dµu  + const. = λk (Yk )uw vw,k  eikθ + O((Y• )2uw ). log dθ/2π 1≤|k|≤K w6=u We thus obtain the Fourier coefficients of the log-density of the new belief from the Fourier coefficients of the density of the old belief, by matrix–vector products. Remarkably, this tells us that the correct per-vertex nonlinear transformation to apply at each iteration is the transformation from Fourier coefficients of the log-density to those of the density! (In section 6 we will see an alternative interpretation of this nonlinear transformation as an MMSE estimator.) The only constraints on a valid log-density are those of conjugate symmetry on Fourier coefficients; thus log-densities form an entire linear space. By contrast, densities are subject to non-negativity constraints, and form a nontrivial convex body in RK . The latter space is the analogue of the unit disk or the interval [−1, 1] in the preceding examples, and this transformation from the Fourier series of a function to those of its exponential (together with normalization) forms the analogue of the preceding soft-projection functions. We thus arrive at an AMP algorithm for the multiple-frequency problem: Algorithm 2.3 (AMP for U (1) synchronization with multiple frequencies). — 0 • For each 1 ≤ k ≤ K and each vertex u, initialize vu,k to small random values in C. • Iterate for 1 ≤ t ≤ T : (t) (t−1) (t−1) (t−2) 1. For each 1 ≤ k ≤ K, set ck = λk Yk vk − λ2k (1 − h(vk )2 i)vk , the vector of kth Fourier components of the estimated posterior log-densities, with Onsager correction. (t) 2. Compute vk , the vector of kth Fourier components of the estimated posterior densities. (T ) • Return x b = v1 (or some rounding if a proper estimate in U (1)n is desired, or even the entire per-vertex posteriors represented by c(T ) ). Again, a more detailed derivation can be found in Sections 5 and 6. It is worth emphasizing that only the expansion log (t) X (t) dµu + const. = 2Re ck,w eikθ dθ/2π 1≤k≤K is an accurate expansion of the estimated vertex posteriors. While this log-density is band-limited, this still allows for the density to be a very spiked, concentrated function, without suffering effects such as the Gibbs phenomenon. By contrast, the finitely many v coefficients that this algorithm computes do not suffice to express the Fourier expansion of the density, and a truncated expansion based on only the computed coefficients might even become negative. We conclude this section by noting that nothing in our derivation depended crucially on the Gaussian observation model. The choice of model tells us how to propagate beliefs along an edge according to a matrix–vector product, but we could carry this out for a larger class of graphical models. The essential properties of a model, that enables this approach to adapt, are: • The model can be expressed as a graphical model with only pairwise interactions: Y Pr(x) ∝ Luw (xu , xw ). u<w √ • The interaction graph is dense, with all pair potentials individually weak (here, 1 + O(1/ n)). 10 • The pair potentials Luw (xu , xw ) depend only on the group ratio xu x−1 w . (This is the core property of a synchronization problem.) • The pair potentials Luw are band-limited as a function of xu x−1 w . This assumption (or approximation) allows the algorithm to track only finitely many Fourier coefficients. The formulation of AMP for general models of this form is discussed in the next section. 3 AMP over general compact groups The approach discussed above for U (1)-synchronization with multiple frequencies readily generalizes to the setting of an arbitrary compact group G, with Fourier theory generalized to the representation theory of G. Just as the Fourier characters are precisely the irreducible representations of U (1), we will represent distributions over G by an expansion in terms of irreducible representations, as described by the Peter–Weyl theorem. Under the assumption (or approximation) of band-limited pairwise observations, it will suffice to store a finite number of coefficients of this expansion. (Note that finite groups have a finite number of irreducible representations and so the band-limited requirement poses no restriction in this case.) A geometric view on this is as follows. Belief propagation ideally sends messages in the space of distributions on G; this is a form of formal convex hull on G, and is illustrated in the case of Z/2-synchronization by sending messages valued in [−1, 1]. When G is infinite, however, this space is infinite-dimensional and thus intractable. We could instead ask whether the convex hull of G taken in some finite-dimensional embedding is a sufficient domain for messages. The key to our approach is the observation that, when observations are band-limited, it suffices to take an embedding of G described by a sum of irreducible representations. This section will be devoted to presenting our AMP algorithm in full generality, along with the synchronization model that it applies to. In particular, the algorithm can run on the general graphical model formulation of Section 3.2, but when we analyze its performance we will restrict to the Gaussian observation model of Section 3.4. 3.1 3.1.1 Representation theory preliminaries Haar measure A crucial property of compact groups is the existence of a (normalized) Haar measure, a positive measure µ on the group that is invariant under left and right translation by any group element, normalized such that µ(G) = 1 [BtD13]. This measure amounts to a concept of ‘uniform distribution’ on such a group, and specializes to the ordinary uniform distribution on a finite group. Throughout this paper, integrals of the form Z f (g) dg, G are understood to be taken with respect to Haar measure. 3.1.2 Peter–Weyl decomposition Fix a compact group G. We will be working with the density functions of distributions over G. In order to succinctly describe these, we use the representation-theoretic analogue of Fourier series: the Peter–Weyl decomposition. The Peter–Weyl theorem asserts that L2 (G) (the space of square-integrable, complex scalar functions on G) is the closure of the span (with coefficients from C) of the following basis, which is furthermore orthonormal with respect to the Hermitian inner product on L2 (G) [BtD13]: p Rρab (g) = dρ ρ(g)ab , indexed over all complex irreducible representations ρ of G, and all 1 ≤ a ≤ dρ , 1 ≤ b ≤ dρ where dρ = dim ρ. The representations are assumed unitary (without loss of generality). The inner product is taken to be conjugate-linear in the second input. 11 Since we want our algorithm to be able to store the description of a function using finite space, we fix a finite list P of irreducible representations to use. From now on, all Peter–Weyl decompositions will be assumed to only use representations from P; we describe functions of this form as band-limited. We exclude the trivial representation from this list because we will only need to describe functions up to an additive constant. Given a real-valued function f : G → R, we will often write its Peter–Weyl expansion in the form X f (g) = hfbρ , Rρ (g)i, ρ p where fbρ and Rρ (g) = dρ ρ(g) are dρ × dρ complex matrices. Here ρ ranges over the irreducibles in P; we assume that the functions f we are working with can be expanded in terms of only these representations. The matrix inner product used here is defined by hA, Bi = Tr(AB ∗ ). The Peter–Weyl coefficients of a function can be extracted by integration against the appropriate basis functions: Z Rρ (g)f (g) dg. fbρ = G By analogy to Fourier theory, we will sometimes refer to the coefficients fbρ as Fourier coefficients, and refer to the irreducible representations as frequencies. 3.1.3 Representations of real, complex, quaternionic type Every irreducible complex representation of a compact group G over C is of one of three types: real type, complex type, or quaternionic type [BtD13]. We will need to deal with each of these slightly differently. In particular, for each type we are interested in the properties of the Peter–Weyl coefficients that correspond to the represented function being real-valued. A complex representation ρ is of real type if it can be defined over the reals, i.e. it is isomorphic to a realvalued representation. Thus we assume without loss of generality that we are working with a real-valued ρ. In this case it is clear that if f is a real-valued function then (by integrating against Rρ ) fbρ is real. Conversely, if fbρ is real then the term hfbρ , Rρ (g)i (from the Peter–Weyl expansion) is real. A representation ρ is of complex type if ρ is not isomorphic to its conjugate representation ρ, which is the irreducible representation defined by ρ(g) = ρ(g). We will assume that the complex-type representations in our list P come in pairs, i.e. if ρ is on the list then so is ρ. If f is real-valued, we see (by integrating against Rρ and Rρ ) that fbρ = fbρ . Conversely, if fbρ = fbρ holds then hfbρ , Rρ (g)i + hfbρ , Rρ (g)i is real. Finally, a representation ρ is of quaternionic type if it can be defined over the quaternions in the following sense: dρ is even and ρ(g) is comprised of 2 × 2 blocks, each of which encodes a quaternion by the following relation:   a + bi c + di a + bi + cj + dk ↔ . −c + di a − bi Note that this relation respects quaternion addition and multiplication. Furthermore, quaternion conjugation (negate b, c, d) corresponds to matrix conjugate transpose. If a matrix is comprised of 2×2 blocks of this form, we will call it block-quaternion. Now let ρ be of quaternionic type (and assume without loss of generality that ρ takes the above block-quaternion form), and let f be a real function G → R. By integrating against Rρ we see that fbρ must also be block-quaternion. Conversely, if fbρ is block-quaternion then hfbρ , Rρ (g)i is real; to see this, write hfbρ , Rρ (g)i = Tr(fbρ Rρ (g)∗ ), note that fbρ Rρ (g)∗ is block-quaternion, and note that the trace of any quaternion block is real. 3.2 Graphical model formulation As in Section 2.2, we take the standpoint of probabilistic inference over a graphical model. Thus we consider the task of estimating g ∈ Gn from observations that induce a posterior probability factoring into pairwise 12 likelihoods: Pr(g) ∝ Y {u,w} Luv (gu , gw ) (1) where {u, w} ranges over all (undirected) edges (without self-loops). We assume that the pair interactions −1 Luw (gu , gw ) are in fact a function of gu gw ∈ G, depending only on the relative orientation of the group elements. Without loss of generality, we can take Luu = 0 for all u. This factorization property amounts to a graphical model for g, with each entry gu ∈ G corresponding to a vertex u, and each pair interaction Luw represented by an edge of the model. −1 Taking a Peter–Weyl decomposition of Luw as a function of gu gw allows us to write: X ρ −1 Yuw , ρ(gu gw ) , Luw (gu , gw ) = exp ρ ρ where ρ runs over all irreducible representations of G. We require coefficients Yuv ∈ Cdρ ×dρ for which this −1 expansion is real-valued (for all gu gv ). We also require the symmetry Luv (gu , gv ) = Lvu (gv , gu ), which ρ ρ ∗ ρ means Yuv = (Yvu ) . Let Yρ be the ndρ × ndρ matrix with blocks Yuv . The input to our synchronization problem will simply be the coefficients Yρ . These define a posterior distribution µ on the latent vector g of group elements, and our goal is to approximately recover g up to a global right-multiplication by some group element. We suppose that the observations are band-limited : Yρ = 0 except on a finite set P of irreducible representations. This will allow us to reduce all Peter–Weyl decompositions to a finite amount of relevant information. We will always exclude the trivial representation from P: this representation can only contribute a constant factor to each pair likelihood, which then disappears in the normalization, so that without loss of generality we can assume the coefficient of the trivial representation to always be zero. One might also formulate a version of this model that allows node potentials:   ! Y Y   Luv (gu , gw ) Pr(g) ∝ Lu (gu ) , u {u,w} expressing a nontrivial prior or observation on each group element. Although this model is compatible with our methods (so long as the node potentials are also band-limited), we suppress this generality for the sake of readability. Many synchronization problems (for instance, sensor localization) have noise on each pairwise measurement, and fit this graphical model formulation well. Other synchronization problems (for instance, cryo-EM) are based on per-vertex measurements with independent randomness; one can derive pairwise information by comparing these measurements, but these pairwise measurements do not have independent noise and do not strictly fit the model described above. We note that prior work has often run into the same issue and achieved strong results nonetheless. Indeed, this model is closely related to the “non-unique games” model of [BCS15] for which the application to cryo-EM is discussed; this model suggests minimizing an objective of the form (1) without interpreting it as a posterior likelihood. We defer a close examination of message-passing algorithms for synchronization problems with per-vertex noise to future work. 3.3 AMP algorithm We now state our AMP algorithm. The algorithm takes as input the log-likelihood coefficients Yρ ∈ Cndρ ×ndρ , for each ρ in a finite list P of irreducibles (which must not contain the trivial representation; also for each complex-type representation ρ in the list, ρ must also appear in the list). The algorithm’s state at time t is (t) comprised of the Fourier coefficients Cρ ∈ Cndρ ×dρ , which are updated as follows. Algorithm 3.1 (AMP for synchronization over compact groups). — (0) • For each ρ ∈ P and each vertex u, initialize Cu,ρ to small random values in C. 13 • Iterate for 1 ≤ t ≤ T : – For each ρ ∈ P, set (t) Cu,ρ = d−1 ρ X w6=u ρ 2 (t−2) ρ (t−1) Yuw Vw,ρ − d−2 ρ |Ytyp | Vu,ρ X w  (t−1) ∗ (t−1) , dρ I − (Vw,ρ ) Vw,ρ the Fourier coefficients of the estimated posterior log-densities, with Onsager correction. Here ρ 2 |Ytyp | denotes the average squared-norm of the entries of Y ρ . (t) (t) – For each u and each ρ ∈ P, set Vu,ρ = Eρ (Cu ), where as in Section 2.4, the nonlinear transformation     Z .Z X X Rρ (g) exp  Eρ (C) = hCρ′ , Rρ′ (g)i dg exp  hCρ′ , Rρ′ (g)i dg (2) G G ρ′ ρ′ takes the Fourier coefficients for a function f on G and returns those of exp ◦f , re-normalized (t) to have integral 1. These Vu,ρ are the Fourier coefficients of the estimated posterior densities, truncated to the contribution from irreducibles P, which suffice for the next iteration. (T ) • Return the posteriors represented by Cu,ρ , or some rounding of these (e.g. the per-vertex MAP estimate). This algorithm follows the intuition of Section 2, and derivations can be found in Sections 5 and 6. Note that each iteration runs in time O(n2 ), which is linear in the input matrices. This runtime is due to the matrix–vector products; the rest of the iteration takes O(n) time. We expect O(log n) iterations to suffice, resulting in a nearly-linear-time algorithm with respect to the matrix inputs. Some applications may derive from per-vertex observations that are pairwise compared to produce edge observations, hacked into this framework by an abuse of probability; our algorithm will then takes nearly-quadratic time with respect to the vertex observations. However, some such per-vertex applications produce matrices with a low-rank factorization Yρ = Uρ Uρ⊤ , for which the matrix–vector product can be performed in O(n) time. 3.4 Gaussian observation model Our AMP algorithm handles the general graphical model formulation above, but we will be able to analyze its performance in more detail when restricted to the following concrete Gaussian observation model (which we first introduced in [PWBM16]), generalizing the Gaussian models of Section 2. First, latent group elements gu are drawn independently and uniformly from G (from Haar measure). Then for each representation ρ in P, we observe the ndρ × ndρ matrix Mρ = 1 λρ Xρ Xρ∗ + p Wρ . n ndρ Here Xρ is the ndρ × dρ matrix formed by vertically stacking the dρ × dρ matrices ρ(gu ) for all vertices u. λρ is a signal-to-noise parameter for the frequency ρ. The noise Wρ is a Gaussian random matrix drawn from the GOE (Gaussian orthogonal ensemble), GUE, or GSE, depending on whether ρ is of real type, complex type, or quaternionic type, respectively. In any case, Wρ is normalized so that each off-diagonal entry has expected squared-norm 1. To be concrete, in the real case the entries are N (0, 1) and in the complex case, the real and imaginary parts of each entry are N (0, 1/2). For the quaternionic case, each 2 × 2 block encodes a quaternion value a + bi + cj + dk in the usual way (see Section 3.1.3) where a, b, c, d are N (0, 1/2). The noise matrices Wρ are independent across representations except when we have a conjugate pair of complextype representations we draw Mρ randomly as above and define Mρ = Mρ and λρ = λρ . Note that the normalization is such that the signal term has spectral norm λρ and the noise term has spectral norm 2. 14 Special cases of this model have appeared previously: Z/2 with one frequency [DAM16, JMR16] and U (1) with one frequency [JMR16]. In fact, [DAM16] derives AMP for the Z/2 case and proves that it is information-theoretically optimal. We introduced the general model in [PWBM16], which presents some statistical lower bounds. In Appendix A, we show how the Gaussian observation model fits into the graphical model formulation by deriving the corresponding coefficient matrices Yρ . In particular, we show that Yρ = dρ λρ Mρ , a scalar multiple of the observed Gaussian matrix. 3.5 Representation theory of some common examples In this section we discuss the representation theory of a few central examples, namely Z/L, U (1), and SO(3), and connect the general formalism back to the examples of Section 2. Representations of Z/L and U (1). The irreducible representations of these groups are one-dimensional, described by the discrete Fourier transform and the Fourier series, respectively. U (1) has frequencies indexed by k ∈ Z, given by ρ(g) = g k where g ∈ U (1) (i.e. a unit-norm complex number). All of these representations are of complex type. We will say “U (1) with K frequencies” to refer to the frequencies 1, . . . , K along with their conjugates, the frequencies −1, . . . , −K. Similarly, if we identify Z/L with the complex Lth roots of unity, we have frequencies defined the same way as above, except to avoid redundancy we restrict the range of k as follows. If L is odd, we allow k ∈ {1, 2, . . . , (L − 1)/2} along with their conjugates (negations). If L is even, we have complex-type representations k ∈ {1, 2, . . . , L/2 − 1} (along with their conjugates), plus an additional real-type representation k = L/2. Again, “Z/L with K frequencies” means we take frequencies 1, . . . , K along with their conjugates (when applicable). For the case of Z/2 we can now see how the tanh function from the AMP algorithm of Section 2.2 arises as a special case of the nonlinear transformation E occurring in AMP. The only nontrivial representation of Z/2 is the ‘parity’ representation in which −1 acts as −1. In this context, E will first input the Fourier series of a log-density with respect to the uniform measure on {±1}: dµu + const. = cx dx and evaluate this at ±1 to obtain the values ±c. We then compute the exponential of this at each point to obtain the un-normalized density of e−c at −1 and ec at 1. Normalizing, the density values are e−c /(e−c +ec ) and ec /(e−c + ec ), so that the new parity coefficient is log Eparity (c) = ec − e−c = tanh c. ec + e−c Representations of SO(3). This group has one irreducible representation ρk of each odd dimension dk = 2k + 1; thus the k = 0 representation is the trivial representation ρ0 (g) = 1, and the k = 1 representation is the standard representation of SO(3) as rotations of three-dimensional space. All of these representations are of real type, and may be described as the action of rotations on the 2k + 1-dimensional space of homogeneous degree k spherical harmonics. Frequently in the literature (for instance in molecular chemistry), a complex basis for the spherical harmonics is given, and the representation matrices are the complex-valued Wigner Dmatrices; however, the representation can be defined over the reals, as is demonstrated by any real orthogonal basis for the spherical harmonics. See e.g. Section II.5 of [BtD13] for a more detailed account. As in the cases above, we will often refer to synchronization problems over “SO(3) with K frequencies”, in which the observations are assumed to be band-limited to the first K nontrivial irreducibles with 1 ≤ k ≤ K. 4 Experimental results We present a brief empirical exploration of the statistical performance of AMP in various settings, and as compared to other algorithms. 15 Figure 2: Comparison of iterative algorithms for Gaussian Z/2 synchronization. The horizontal axis represents the signal-to-noise ratio λ, and the vertical axis depicts the log-error ln(1 − |hx, x bi/n|) where x ∈ {±1}n is the ground truth and x b ∈ {±1}n is the (rounded) output of the algorithm. From top to bottom, as measured on the left side: projected power iteration (green), soft-threshold power iteration (red), spectral method (blue), and AMP (cyan). Each data point is an average of 200 trials with n = 2000 vertices. In Figure 2 we compare the performance of the spectral method, projected power iteration, soft-threshold power iteration without an Onsager correction, and full AMP (see Sections 2.1 and 2.2) for Gaussian Z/2 synchronization. The spectral method achieves the optimal threshold of λ = 1 as to when nontrivial recovery is possible, but does not achieve the optimal correlation afterwards. The projected power method appears to asymptotically achieve the optimal correlation as λ → ∞, but performs worse than the spectral method for small λ. Soft-thresholding offers a reasonable improvement on this, but the full AMP algorithm strictly outperforms all other methods. This reflects the optimality result of [DAM16] and highlights the necessity for the Onsager term. The gains are fairly modest in this setting, but increase with more complicated synchronization problems. Figures 3 and 4 compare the performance of AMP on Gaussian U (1) synchronization with multiple frequencies; see Section 2.4 for the model. In sharp contrast to spectral methods, which offer no reasonable way to couple the frequencies together, AMP produces an estimate that is orders of magnitude more accurate than what is possible with a single frequency. In Figures 5 and 6, we see similar results over SO(3), under the Gaussian model of Section 3.4. This also demonstrates that AMP is an effective synchronization algorithm for more complicated, non-abelian Lie groups. This ability to exploit multiple frequencies represents a promising step toward improved algorithms for cryo-electron microscopy, which may be viewed as a synchronization problem over SO(3). Some previous approaches to this problem effectively band-limit the observations to a single frequency and then apply a spectral method [SS11], and the experiments in Figures 3–6 demonstrate that our algorithm stands a compelling chance of achieving a higher-quality reconstruction. We remark that some numerical issues arise when computing the nonlinear transformation E in our AMP algorithm, which involves integration over the group. Our implementation of E for U (1) and SO(3) is based on evaluating each log-density on a discretization of the group, taking the pointwise exponential, and thus approximating each integral by a discrete sum. This approach is somewhat crude but appears to work 16 Figure 3: Gaussian U (1) synchronization with K frequencies; from bottom to top, K = 1, . . . , 6. The signal-to-noise ratios λk are all equal, with the common value given by the horizontal axis. Each curve depicts the correlation |hx, x bi/n| between the ground truth and the AMP estimate. Each data point is an average of 50 trials with n = 1000 vertices. Figure 4: Here the vertical axis depicts the logerror ln(1 − |hx, x bi/n|). From top to bottom: K = 1, . . . , 6. Figure 5: Gaussian SO(3) synchronization with K frequencies; from bottom to top, K = 1, 2, 3. The signal-to-noise ratios λk are all equal, with the common value given by the horizontal axis. Each curve √ b F /(n 3) depicts the squared correlation kX ⊤Xk between the ground truth and the AMP estimate. b are 3n × n matrices where each Here X and X 3 × 3 block encodes an element of SO(3) via the standard representation (rotation matrices). Each data point is an average of 5 trials with n = 100 vertices. Figure 6: Here the vertical axis depicts the log√ b F /(n 3)). From top to bottom: error ln(1−kX ⊤Xk K = 1, 2, 3. 17 adequately in our experiments; there is undoubtedly room for this numerical procedure to be improved. More sophisticated methods may be necessary to obtain adequate results on any higher-dimensional Lie groups. Note also that if the vertex posterior in question is extremely concentrated near a point, the numerical value of each integral will depend significantly on whether this spike lies near a discretization point; however, this should affect both the numerator and denominator integrals in (2) by approximately equal factors, so as to have a minimal effect on the normalized value of Eρ . 5 Derivation of AMP from belief propagation In this section we derive the general AMP algorithm of Section 3 starting from belief propagation, similarly (t) to [DMM10]. We begin with the belief propagation update step (see e.g. [MM09]), writing messages µu→v as densities with respect to Haar measure: (t) (t−1) Y Z dµu→v 1 dµw→u = (t) dgw . Luw (gu , gw ) dgu dgw Zu→v w6=u,v G (t) Here t denotes the timestep and Zu→v is the appropriate normalization constant. Expand this (positive) probability density as the exponential of an L2 function, expressed as a Peter–Weyl expansion: (t) X (t) dµu→v = exp Cu→v,ρab Rρab (gu ). dgu ρab (t) We can extract these Fourier coefficients Cu→v,ρab by integrating against the basis functions above. Assume that ρ is not the trivial representation; then: (t) Cu→v,ρab = Z G (t−1) Rρab (gu ) log dµu→v dgu dgu  Y Z  1  (t−1) dµw→u Rρab (gu ) log = dgw  dgu Luw (gu , gw ) (t−1) dgw G Zu→v w6=u,v G     Z Z E dµ(t−1) X XD ′ w→u ρ −1  dgw  dgu . Rρab (gu ) log  exp  = Yuw , ρ′ (gu gw ) dgw G G ′ Z ρ w6=u,v ′ ρ As the Yuw are small, we can pass to a linear expansion about these, incurring o(1) error as n → ∞:   Z Z Z D Z (t−1) (t−1) E dµ(t−1) X X ′ dµ dµ w→u w→u w→u ρ −1 log dgw + dgw dgw  dgu ≈ Rρab (gu ) Yuw , ρ′ (gu gw ) dgw dg dg w w G G G G ′ w6=u,v = ρ X XZ Z w6=u,v ρ′ G D ′ E dµ(t−1) w→u ρ −1 dgw dgu . Rρab (gu ) Yuw , ρ′ (gu gw ) dgw G To progress further, we will expand the middle factor of the integrand: E D ′ E D ′ ρ −1 ρ Yuw , ρ′ (gu gw ) = Yuw , ρ′ (gu )ρ′ (gw )∗ X ρ′ = Yuw,a′ b′ ρ′ (gu )a′ c′ ρ′ (gw )b′ c′ . a′ b′ c′ 18 Returning to the previous derivation: (t) Cu→v,ρab = X X X Z Z w6=u,v ρ′ a′ b′ c′ = X X X G G Z ′ ρ Yuw,a ′ b′ G w6=u,v ρ′ a′ b′ c′ = d−1 ρ′ X X X Rρab (gu )ρ′ (gu )a′ c′ dgu · Z ′ ρ Yuw,a ′ b′ G w6=u,v ρ′ a′ b′ c′ = d−1 ρ′ X X X (t−1) ′ ρ ′ ′ Rρab (gu )Yuw,a ′ b′ ρ (gu )a′ c′ ρ (gw )b′ c′ X X ′ ρ Yuw,a ′ b′ δρ,ρ′ δa,a′ δb,c′ ρ Yuw,ab ′ w6=u,v b′ Z G (t) Cu→v,ρ = d−1 ρ Cu→v,ρ of log dρ ×dρ ρC (t) dµu→v to dgu → L ρ Z Z (t−1) Rρ′ b′ c′ (gw ) G dµw→u dgw dgw (t−1) Rρ′ b′ c′ (gw ) G dµw→u dgw dgw dµw→u dgw . dgw X ρ Yuw w6=u,v L G dµw→u dgw dgw (t−1) Rρb′ b (gw ) In matrix form, Let E : (t−1) ρ′ (gw )b′ c′ Rρab (gu )Rρ′ a′ c′ (gu ) dgu · w6=u,v ρ′ a′ b′ c′ = d−1 ρ Z dµw→u dgw dgu dgw Z (t−1) Rρ (gw ) G dµw→u dgw . dgw Cdρ ×dρ denote the transformation from the nontrivial Fourier coefficients the Fourier coefficients of dµ(t) u→v dgu . (t) Cu→v,ρ = d−1 ρ X w6=u,v Then we have ρ (t−1) Yuw Eρ (Cw→u ). The map E amounts to exponentiation in the evaluation basis, except that the trivial Fourier coefficient is missing from the input, causing an unknown additive shift. This corresponds to an unknown multiplicative dµ(t) should normalize to 1. Thus E amounts to shift in the output, which we correct for by noting that dgu→v u exponentiation followed by normalization. Explicitly, we can let   Z X Iρab (C) = Rρab (g) exp  Cρ′ a′ b′ Rρ′ a′ b′ (g) dg. G ρ′ a′ b′ Then Eρab (C) = Iρab (C)/Itriv (C) where triv denotes the trivial representation Rtriv (g) = 1. 5.1 Onsager correction In this section we complete the derivation of AMP by replacing the non-backtracking nature by an Onsager correction term, reducing the number of messages from n2 to n. This is similar to the derivation in Appendix A of [BM11]. In order to remove the non-backtracking nature of the AMP recurrence, let us define (t) Cu,ρ = d−1 ρ X w6=u = (t) Cu→v,ρ ρ (t−1) Yuw Eρ (Cw→u ) (t) + δu→v,ρ , 19 (t−1) (t−1) (t−1) (t) ρ where δu→v,ρ = d−1 ρ Yuv Eρ (Cv→u ). Then, substituting Cw→u = Cw (t) Cu,ρ = d−1 ρ X w6=u ≈ d−1 ρ X w6=u   (t−1) (t−2) ρ′ ρ Yuw Eρ {Cw,ρ′ − d−1 ρ′ Ywu Eρ′ (Cu→w )}ρ′ ρ (t−1) Yuw Eρ (Cw ) − d−1 ρ X (t−1) − δw→u , we have ρ Yuw DEρ (t−1) Cw i h (t−2) ρ′ ′ ′ (C {d−1 )} Y E ′ ρ ρ u→w wu ρ ρ Yuw DEρ (t−1) Cw i h (t−2) ρ′ ′ . ′ (C {d−1 )} Y E ′ ρ ρ u wu ρ w6=u where D denotes the total derivative ≈ d−1 ρ X w6=u ρ (t−1) Yuw Eρ (Cw ) − d−1 ρ X w6=u Under the assumption that Y consists of per-edge O(n−1/2 ) noise and O(n−1 ) signal, the error incurred in these two steps should be o(1). We thus reach an entirely non-backtracking recurrence where the first term is a message-passing step and the second term is the so-called Onsager correction. It remains to simplify this. We focus on a single matrix coefficient of the correction: h i XX (t) (t−2) ρ′ ρ )} Onsu,ρab = d−1 Yuw,ac DEρ C (t−1) {d−1 ρ ρ′ Ywu Eρ′ (Cu w cb w6=u c = d−1 ρ X X ρ Yuw,ac w6=u ρ′ cef = d−1 ρ X X ∂Eρcb ∂Cρ′ ef ρ Yuw,ac w6=u ρ′ cef h (ρ) ′ (t−1) Cw ∂Eρcb ∂Cρ′ ef (t−2) ρ (d−1 ))ef ρ′ Ywu Eρ′ (Cu ′ (t−1) Cw ρ (t−2) d−1 ). ρ′ Ywu,eh Eρ′ hf (Cu (ρ) Note that Ywu = (Yuw )∗ , and that other than this relation, the entries of Y consist of O(n−1/2 )-size independent noise and lower-order signal. Hence, each of the O(n) terms contributing to this sum is O(n−1 ), ρ′ ρ and is only of this order if Yuw,ac and Ywu,eh are dependent, i.e. if a = h, c = e, and ρ = ρ′ . Thus: (t) Onsu,ρab = d−2 ρ X cf Eρaf (Cu(t−2) ) X w6=u ρ |Yuw,ac |2 ∂Eρcb ∂Cρ′ cf (t−1) Cw . ρ Similarly to the derivation of [BM11], suppose that |Yuw,ac | depends sufficiently little on we can treat ρ |Yuw,ac | as a constant ρ 2 |Ytyp | . (t) ρ 2 Onsu,ρab = dρ−2 |Ytyp | Then: X f Eρaf (Cu(t−2) ) X X ∂Eρcb ∂Cρ′ cf c (t−1) Cw . w6=u An interlude, understanding derivatives of E: Z X ∂Iρab Rρab (g)Rρ′ cd (g) exp = Cρ′′ a′ b′ Rρ′′ a′ b′ (g) dg. ∂Cρ′ cd G ′′ ′ ′ ρ ab In particular, ∂Itriv = ∂Cρab Z Rρab (g) exp G = Iρab . X ρ′ a′ b′ 20 Cρ′ a′ b′ Rρ′ a′ b′ (g) dg ∂Eρcb (t−1) ∂Cρ′ cf Cw that Note the following convenient identity: Z X ∂Iρcb = ∂Cρcf G c = dρ X Rρcb (g)Rρcf (g) exp c Z X G = dρ ! Z G = dρ δbf ρ(g)cb ρ(g −1 )f c c ρ(g −1 g)f b exp Z X ! X Cρ′ a′ b′ Rρ′ a′ b′ (g) dg ρ′ a′ b′ exp X Cρ′ a′ b′ Rρ′ a′ b′ (g) dg ρ′ a′ b′ Cρ′ a′ b′ Rρ′ a′ b′ (g) dg ρ′ a′ b′ exp G X Cρ′ a′ b′ Rρ′ a′ b′ (g) dg ρ′ a′ b′ = dρ δbf Itriv (C). Recalling that Eρab (C) = Iρab (C)/Itriv (C), we have X ∂Eρcb Itriv = ∂Cρcf c P ∂Iρcb c ∂Cρcf − 2 Itriv = dρ δbf − X c P c Iρcb Iρcf Eρcb (C)Eρcf (C) = (dρ I − Eρ (C)∗ Eρ (C))f b . Thus we obtain the following form for the Onsager correction: X ρ 2 −2 (t−2) (t−1) ∗ (t−1) Ons(t) )Mρ(t) , Mρ(t) = dρ I − Eρ (Cw ) Eρ (Cw ), u,ρ = dρ |Ytyp | Eρ (Cu w with each AMP iteration reading as (t) Cu,ρ = d−1 ρ X w6=u 6 ρ (t−1) Yuw Eρ (Cw ) − Ons(t) u,ρ . MMSE derivation and state evolution The goal of this section is to derive the state evolution equations that govern the behavior of AMP on the Gaussian synchronization model of Section 3.4 (in the large n limit). Along the way, we will give an alternative derivation of the algorithm (excluding the Onsager term) which shows that the nonlinear function E has an interpretation as an MMSE (minimum mean squared error) estimator. This derivation is similar to [DAM16] and based on ideas first introduced by [DMM09]. We do not give a proof that the state evolution equations derived here are correct (i.e. that AMP obeys them) but we will argue for their correctness in Section 7. 6.1 MMSE estimator We begin by defining a ‘scalar’ problem: a simplification of the Gaussian synchronization model where we attempt to recover a single group element from noisy measurements. We will be able to analyze the Gaussian synchronization model by connection to this simpler model. (This is the idea of single letterization from information theory.) Suppose there is an unknown group element g drawn uniformly from G (Haar measure) and for each irreducible representation ρ in our list P we are given a measurement uρ = µρ ρ(g) + σρ zρ (for some constants µρ , σρ ). Here zρ is a dρ × dρ non-symmetric matrix of Gaussian entries (real, complex, or block-quaternion, depending on the type of ρ) with all entries (or blocks) independent and each entry 21 normalized to have expected squared-norm 1. (Note that zρ is the same as an off-diagonal block of the matrix Wρ from Section 3.4.) For ρ of complex type, we only get a measurement uρ for one representation in each conjugate pair, and define uρ = uρ . The MMSE estimator for ρ(g) (minimizing the matrix mean d − ρ(g)k2 ) is simply the conditional expectation squared error Ekρ(g) F h E ρ(g) {uq }q i ! Z ! . X 1 X 1 ρ(h) exp − exp − = kuq − µq q(h)k2F kuq − µq q(h)k2F 2 2 2σ 2σ h∈G h∈G q q q q ! Z ! Z . X µq X µq ρ(h) exp huq , q(h)i huq , q(h)i = exp σq2 σq2 h∈G h∈G q q   ! µq ≡ Fρ uq σq2 q Z where Fρ ({wq }q ) = Z ρ(h) exp h∈G X q ! hwq , q(h)i .Z exp h∈G X q ! hwq , q(h)i . Here q ranges over irreducible representations in our list P (which includes both q and q for representations of complex type). The likelihoods used in the above computation are derived similarly to those in Appendix A. We recognize F as a rescaling of the function E from the AMP update step. 6.2 AMP update step Consider the Gaussian observation model Mρ = λρ ∗ √1 n Xρ Xρ + ndρ Wρ from Section 3.4. Similarly to [DAM16], the MMSE-AMP update step (without Onsager term) is Uρt+1 = M ρ Fρ  µtq Ut (σqt )2 q  ! q where t indicates the timestep and µtρ , σρt will be defined based on state evolution below. Here the AMP state Uρt is ndρ × dρ with a dρ × dρ block for each vertex. Fρ is applied to each of these blocks separately. We will motivate this AMP update step below, but notice its similarity to the MMSE estimator above. 6.3 State evolution The idea of state evolution is that the AMP iterates can be approximately modeled as ‘signal’ plus ‘noise’ [DMM09]. Namely, we postulate that Uρt = µtρ Xρ + σρt Zρ for some constants µt , σt , where Zρ is a ndρ × dρ Gaussian noise matrix with each dρ × dρ block independently distributed like zρ (from the scalar model) with Zρ = Zρ for conjugate pairs. Recall Xρ has blocks ρ(gu ), the ground truth. Note that this sheds light on the AMP update step above: at each iteration we are given Uqt , a noisy copy of the ground truth; the first thing we do is to apply the MMSE estimator entrywise. We will derive a recurrence for how the parameters µρ and σρ change after one iteration. To do this, we assume that the noise Wρ is independent from Zρ at each timestep. This assumption is far from true; however, it turns out that AMP’s Onsager term corrects for this (e.g. [BM11]). In other words, we derive state evolution by omitting the Onsager term and assuming independent noise at each timestep. Then if we run AMP (with the Onsager term and the same noise at each timestep), it behaves according to state evolution. We now derive state evolution: 22 Uρt+1 = M ρ Fρ = = where γqt =  µtq σqt 2  µtq Ut (σqt )2 q  ! q  !  µtq µt Xq + σqt Zq Fρ (σqt )2 q q ! n q o  γqt Xq + γqt Zq Wρ Fρ 1 λρ Xρ Xρ∗ + p Wρ n ndρ λρ 1 Xρ Xρ∗ + p n ndρ !  q n n q q o  o  1 λρ ∗ t t t t +p . Xρ Xρ Fρ γq X q + γq Z q = Wρ Fρ γq X q + γq Z q n q q ndρ First focus on the signal term: n  n q q o  o  λρ γqt q(g) + γqt zq ≈ λρ Xρ Eg,zq ρ(g)∗ Fρ γqt Xq + γqt Zq Xρ Xρ∗ Fρ n q q where g is drawn from Haar measure on G, and zq is a non-symmetric Gaussian matrix of the appropriate type (as in Section 6.1). Define Atρ ∈ Cdρ ×dρ to be the second matrix in the expression above: n  q o  γqt q(g) + γqt zq Atρ ≡ Eg,zq ρ(g)∗ Fρ . q We will see shortly that Atρ is a multiple atρ ∈ R of the identity and so we can now write the signal term as λρ atρ Xρ . Therefore our new signal parameter is µt+1 = λρ atρ . ρ We take a short detour to state some properties of Atρ , which we prove in Appendix B. Lemma 6.1. Atρ is a real multiple of the identity: Atρ = atρ Idρ for some atρ ∈ R. Furthermore, we have the following equivalent formulas for atρ : i  h p (i) Eg,zq ρ(g)∗ Fρ γqt q(g) + γqt zq q   ∗ (ii) Eg,zq Fρ (· · · ) Fρ (· · · ) h  p (iii) Ezq Fρ γqt Idq + γqt zq   ∗ (iv) Ezq Fρ (· · · ) Fρ (· · · ) q i where · · · denotes the argument to Fρ from the previous line. Returning to state evolution, we now focus on the noise term: n q o  1 t t p γq X q + γq Z q . Wρ Fρ q ndρ 23 Each entry of this ndρ × dρ matrix is Gaussian. The variance (expected squared-norm) of entry (i, j) is (approximately) n ndρ q o  1 X Fρ γqt Xq + γqt Zq ndρ q k,j k=1 2 n dρ q o  X 1 Fρ γqt q(g) + γqt zq ≈ Eg,zq dρ q k,j k=1 1 = E [Fρ (· · · )∗ Fρ (· · · )]jj dρ 1 = (Atρ )jj dρ 1 = atρ . dρ We therefore have the new noise parameter (σρt+1 )2 = atρ dρ . To summarize, we now have the state evolution recurrence µt+1 = λρ atρ and (σρt+1 )2 = ρ 6.4 2 atρ dρ . Simplified AMP update step Note that the state evolution recurrence implies the relation µt+1 ρ (σρt+1 )2 = dρ λρ . Provided our initial values of µρ , σρ satisfy this relation (which can always be arranged by scaling the initial Uρ appropriately), our AMP update step (without Onsager term) becomes   Uρt+1 = Mρ Fρ dρ λρ Uqt q . This is convenient because we can implement AMP without keeping track of the state evolution parameters p µtρ , σρt . Also note that this variant of AMP matches the original derivation after the rescaling Cρt = dρ λρ Uρt (and excluding the Onsager term). 6.5 Reduction to single parameter (per frequency) We will rewrite the state evolution recurrence in terms of a single parameter per frequency. This parameter  µt 2 will be γρt , which was introduced earlier: γρt = σρt . Recall the state evolution recurrence µt+1 = λρ atρ ρ ρ and (σρt+1 )2 = atρ dρ . We therefore have the update step γρt+1 = µt+1 ρ σρt+1 !2 = (λρ atρ )2 = dρ λ2ρ atρ . atρ /dρ Using part (iii) of Lemma 6.1 we can write this as: γρt+1 = λ2ρ Ezq Tr Fρ n γqt Idq + q o  γqt zq . q (3) This is the final form of our state evolution recurrence. The relation between µρ , σρ , γρ can be summarized as γρ = dρ λρ µρ = d2ρ λ2ρ σρ2 . We expect that the state evolution recurrence (3) exactly governs the behavior of AMP in the large n limit. Although the derivation above was heuristic, we discuss its correctness in Section 7. There is a caveat 24 regarding how it should be initialized (see Section 7) but in practice we can imagine the initial γ value is a small random vector. (Note that the initialization γ = ~0 is problematic because state evolution will never leave zero.) We expect that state evolution converges to some fixed point of the recurrence. Some complications arise if there are multiple fixed points (see Section 8) but we expect there to be a unique fixed point that is reached from any small initialization. This fixed point γ ∗ describes the output of AMP in the sense that (following the postulate of state evolution) the final AMP iterate p is approximately distributed as Uρ ≈ µ∗ρ Xρ + σρ∗ Zρ , which in terms of γ ∗ is (up to scaling) Uρ ≈ γρ∗ Xρ + γρ∗ Zρ . (See [BM11] for the precise sense in which we expect this to be true.) Note that one can use this to translate a γ ∗ value into any measure of performance, such as MSE. This gives an exact asymptotic characterization of the performance of AMP for any set of λρ values. The most prominent feature of AMP’s performance is the threshold at λ = 1, which we derive in the next section. One can check that our state evolution recurrence matches the Bayes-optimal cavity and replica predictions of [JMR16] for Z/2 and U (1) with one frequency. Indeed, we expect AMP to be statistically optimal in these settings (and many others too; see Section 8), and this has been proven rigorously for Z/2 [DAM16]. 6.6 Threshold at λ = 1 In this section we use the state evolution occurrence to derive the threshold above which AMP achieves nontrivial recovery. In particular, if λρ < 1 for all frequencies ρ then the AMP fixed point γ ∗ is equal to the zero vector and so AMP gives trivial performance (random guessing) in the large n limit. On the other hand, if λρ > 1 for at least one frequency ρ then γ ∗ is nonzero and AMP achieves nontrivial recovery. The zero vector is always a fixed point of state evolution. Whether or not AMP achieves nontrivial performance depends on whether the zero vector is a stable or unstable fixed point. Therefore we consider the regime where γρ is small for all ρ. When the input {wq }q to Fρ is small, we can approximate Fρ by its linearization. " # Z  Z  X X ρ(h) 1 + hwq , q(h)i = ρ(h) hwq , q(h)i Fρ {wq }q ≈ h h q q and so   Fρ {wq }q ab ≈ = Z ρ(h)ab h X X wqcd q(h)cd qcd wqcd Z ρ(h)ab q(h)cd h qcd = X wqcd qcd 1 δρab,qcd dρ wρab = dρ   which means Fρ {wq }q ≈ wρ dρ . Now the state evolution update step becomes γρt+1 = λ2ρ Ezq Tr Fρ n q o  γqt Idq + γqt zq q  1  t γρ Idρ + γρt zq ≈ λ2ρ Ezq Tr dρ q = λ2ρ γρt . This means that when γ is small (but nonzero), γρ shrinks towards zero if λρ < 1 and grows in magnitude if λρ > 1. We conclude the threshold at λ = 1. 25 7 Correctness of state evolution? In this section we justify the heuristic derivation of state evolution in the previous section and argue for its correctness. We first discuss prior work that provides a rigorous foundation for the methods we used, in related settings. We then show numerically that our AMP algorithm obeys the state evolution equations. 7.1 Rigorous work on state evolution State evolution was introduced along with AMP by [DMM09]. It was later proven rigorously that AMP obeys state evolution in the large n limit (in a particular formal sense) for certain forms of the AMP iteration [BM11, JM13]. In particular, Z/2 synchronization with Gaussian noise (a special case of our model) falls into this framework and thus admits a rigorous analysis [DAM16]. Although the proofs of [BM11, JM13] only consider the case of real-valued AMP, it has been stated [MAYB13] that the proof extends to the complex-valued case. This covers our synchronization model over U (1) with one frequency. In order to cover our general formulation of AMP over any group with any number of frequencies, one needs to replace the complex numbers by a different real algebra (namely a product of matrix algebras). We expect that this generalization should follow from the existing methods. There is, however, an additional caveat involving the initialization of state evolution. In practice, we initialize AMP to small random values. Recall that we only need to recover the group elements up to a global right-multiplication and so there exists a favorable global right-multiplication so that our random initialization has some correlation with the truth. However, this correlation is o(1) and corresponds to γ = ~0 in the large n limit. This means that technically, the formal proof of state evolution (say for Z/2) tells us that for any fixed t, AMP achieves γ = ~0 after t iterations in the large n limit. Instead we would like to show that after ω(1) iterations we achieve a nonzero γ. It appears that proving this would require a non-asymptotic analysis of AMP, such as [RV16]. It may appear that this initialization issue can be fixed by initializing AMP with a spectral method, which achieves Ω(1) correlation with the truth; however this does not appear to easily work due to subtle issue about correlation between the noise and iterates. In practice, the initialization issue is actually not an issue at all: with a small random initialization, AMP consistently escapes from the trivial fixed point (provided some λ exceeds 1). One way to explain this is that when the AMP messages are small, the nonlinear function F is essentially the identity (see Section 6.6) and so AMP is essentially just the power method; this roughly means that AMP automatically initializes itself to the output of the spectral method. 7.2 Experiments on state evolution We now present experimental evidence that AMP obeys the state evolution equations. In Figure 7 we show two experiments, one with U (1) and one with SO(3). In both cases we see that the performance of AMP closely matches the state evolution prediction. We see some discrepancy near the λ = 1 threshold, which can be attributed to the fact that here we are running AMP with finite n whereas state evolution describes the n → ∞ behavior. 8 Statistical-to-computational gaps In various settings it has been shown, using standard but non-rigorous methods from statistical physics, that the analysis of AMP and state evolution yields a complete picture of the various “phase transitions” that occur in a computational problem (e.g. [LKZ15b, LKZ15a]). In some settings, certain features of these predictions have been confirmed rigorously (e.g. [KXZ16, BDM+ 16]). In this section we will use these methods to give non-rigorous predictions about statistical-to-computational gaps in the Gaussian synchronization model. In Section 6.6 we have seen that (in the large n limit) AMP achieves nontrivial recovery if and only if λ > 1 on at least one frequency. In this section, we will see that it is sometimes statistically possible to succeed below this threshold, although no known efficient algorithm achieves this. A rigorous analysis of an 26 −0.5 −1 −1.0 log error log error −2 −3 −4 −1.5 −2.0 −2.5 −5 −3.0 −6 −3.5 0.5 1.0 1.5 λ 2.0 2.5 3.0 0.5 1.0 1.5 λ 2.0 2.5 3.0 Figure 7: AMP compared to the state evolution equations experimentally. Left: U (1) with K frequencies, for K = 1, 2, 3, 4 (from top to bottom) with n = 100. The solid line is AMP and the dotted line is the state evolution prediction. The horizontal axis is the signal-to-noise ratio λ, which we take to be equal on all frequencies. The vertical axis is the natural logarithm of error, which is defined as error = 1−|hx, x bi/n| ∈ [0, 1] where x ∈ U (1)n is the truth and x b ∈ U (1)n is the (rounded) output of AMP. In particular, a log error value of zero (top of the figure) indicates trivial recovery (random guessing), and lower values are better. Right: b F ∈ [0, 1] where SO(3) with one frequency, with n = 50. Now error is measured as error = 1 − √13n kX ⊤ Xk b are 3n × n matrices whose 3 × 3 blocks encode elements of SO(3) via the standard representation (3D X, X rotation matrices). inefficient estimator has indeed confirmed that the λ = 1 threshold can be beaten in some cases [PWBM16]; the non-rigorous computations in this section give sharp predictions for exactly when this is possible. 8.1 Free energy Recall the parameter γ = {γρ }ρ from the state evolution recurrence (3); γ captures the amount of information that AMP’s current state has about each frequency, with γρ = 0 indicating no information and γρ → ∞ indicating complete knowledge. An important quantity is the Bethe free energy per variable (also called the replica symmetric potential function) of a state γ, which for the Gaussian synchronization model is given (up to constants) by ! X 1X 2 2 1X 1 X γρ2 √ f (γ) = − − Ez log Eg exp d λ + dρ γρ + hρ(g), γρ Idρ + γρ zρ i 4 ρ ρ ρ 2 ρ 4 ρ λ2ρ ρ where zρ is a dρ × dρ matrix of i.i.d. standard Gaussians (of the appropriate type: real, complex, or quaternionic, depending on ρ), and g is drawn from Haar measure on the group. We do not include the derivation of this expression, but it can be computed from belief propagation (as in [LKZ15a]) or from the replica calculation (as in [JMR16]). Roughly speaking, the interpretation of the Bethe free energy is that it is the objective value that AMP is trying to minimize. AMP can be thought of as starting from the origin γ = 0 and performing naı̈ve gradient descent in the free energy landscape until it reaches a local minimum; the value of γ at this minimum describes the final state of AMP. (It can be shown that the fixed points of the state evolution recurrence (3) are precisely the stationary points of the Bethe free energy.) As is standard for these types of problems, we conjecture that AMP is optimal among all polynomial-time algorithms. However, with no restriction on efficiency, the information-theoretically optimal estimator is given by the global minimum of the free energy. (This has been shown rigorously for the related problem of rank-one matrix estimation [BDM+ 16].) The 27 intuition here is that the optimal estimator should use exhaustive search to enumerate all fixed points of AMP and return the one of lowest Bethe free energy. Note that just because we can compute the γ value that minimizes the Bethe free energy it does not mean we can achieve this γ with an efficient algorithm; γ represents correlation between the AMP iterates and the ground truth, and since the truth is unknown it is hard to find iterates that have a prescribed γ. 8.2 Examples We now examine the Bethe free energy landscapes of some specific synchronization problems at various values of λ, and discuss the implications. Our primary examples will be U (1) and Z/L with various numbers of frequencies, as discussed in Section 3.5. Recall that references to U (1) or Z/L “with K frequencies” means that observations are band-limited to the Fourier modes eikθ with |k| ≤ K. Our first example is U (1) with a single frequency, shown in Figure 8. Here we see that the problem transitions from (statistically) ‘impossible’ to ‘easy’ (AMP achieves nontrivial recovery) at λ = 1, with no (computationally) ‘hard’ regime. In particular, AMP is statistically optimal for every value of λ. 0.2 −0.62 0.1 −0.64 0.0 −0.66 f f −0.1 −0.68 −0.2 −0.70 −0.3 −0.72 −0.4 −0.5 0.0 0.2 0.4 0.6 γ 0.8 1.0 −0.74 0.0 1.2 0.2 0.4 0.6 γ 0.8 1.0 1.2 Figure 8: Free energy landscape for U (1) with 1 frequency. Left: λ < 1. The global minimum of free energy occurs at γ = 0, indicating that AMP or any other estimator achieves zero correlation with the truth. Right: λ > 1. Now the global minimum occurs at nonzero γ, and this is achieves by AMP. Therefore AMP achieves the statistically optimal MSE (mean squared error). This MSE departs continuously from zero at the λ = 1 threshold. Our next example is a single-frequency problem that exhibits a computational gap (a ‘hard’ phase). In Figure 9 we take the alternating group A4 with its irreducible 3-dimensional representation as the rotational symmetries of a tetrahedron. When λ > 1, AMP achieves statistically optimal performance but when λ is below 1 but sufficiently large, AMP gives trivial performance while the statistically optimal estimator gives nontrivial performance. This means we have a computational gap, i.e. there are values of λ below the AMP threshold (λ = 1) where nontrivial recovery is statistically possible. Next we move on to some 2-frequency problems, where γ is now a 2-dimensional vector. In Figure 10 we see an example with no computational gap, and an example with a computational gap. Note that the free energy landscape at the AMP threshold λ = (1, . . . , 1) reveals whether or not a computational gap exists: there is a gap if and only if the global minimum of free energy does not occur at the origin. We now state some experimental results regarding which synchronization problems have computational gaps. For U (1) with (the first) K frequencies, there is a gap iff K ≥ 3. For Z/L with K frequencies, there is a gap for K ≥ 3 and no gap for K = 1; when K = 2 there is only a gap for L = 5. For SO(3) with K frequencies, there is a gap iff K ≥ 2. In [PWBM16] we gave some rigorous lower bounds for Gaussian synchronization problems, showing for 28 −0.2 −1.835 −0.4 −1.840 −0.6 −1.845 f f −0.8 −1.850 −1.0 −1.855 −1.2 −1.860 −1.4 −1.6 0.0 0.5 1.0 1.5 2.0 γ 2.5 3.0 0.0 (a) λ = 0.8, impossible 0.2 0.4 0.6 0.8 γ 1.0 1.2 1.4 1.6 (b) λ = 0.91, impossible −1.894 −2.6 −1.896 −2.7 −1.898 −2.8 f f −1.900 −1.902 −2.9 −1.904 −3.0 −1.906 −3.1 −1.908 −1.910 0.0 0.2 0.4 0.6 0.8 γ 1.0 1.2 1.4 1.6 −3.2 1.8 (c) λ = 0.92, hard 0 1 2 γ 3 4 5 (d) λ = 1.1, easy Figure 9: Free energy landscape for A4 with 1 frequency: the standard 3-dimensional representation (rigid motions of a tetrahedron). (a) λ = 0.8. The global minimizer is γ = 0 so no estimator achieves nontrivial recovery. (b) λ = 9.1. A new local minimum in the free energy has appeared, but the global minimum is still at γ = 0 and so nontrivial recovery remains impossible. (c) λ = 9.2. AMP is stuck at γ = 0 but the (inefficient) statistically optimal estimator achieves a nontrivial γ (the global minimum). AMP is not statistically optimal. This computational gap appears at λ ≈ 0.913, at which point the global minimizer transitions discontinuously from γ = 0 to some positive value. (d) λ = 1.1. AMP achieves optimal recovery. The AMP γ value transitions discontinuously from zero to optimal at λ = 1. instance that U (1) with one frequency is statistically impossible below λ = 1. The non-rigorous results above predict further results that we were unable to show rigorously, e.g. U (1) with two frequencies and Z/3 (with one frequency) are statistically impossible below the λ = 1 threshold. In the examples above we saw that when every λ is below 1, AMP gives trivial performance, and when some λ exceeds 1, AMP gives statistically optimal performance. However, the behavior can be more complicated, namely AMP can exhibit nontrivial but sub-optimal performance. In Figure 11 we show such an example: Z/25 with 9 frequencies. 29 0.35 0.30 0.30 0.25 0.25 0.20 0.20 γ2 γ2 0.35 0.15 0.15 0.10 0.10 0.05 0.05 0.00 0.00 0.05 0.10 0.15 0.20 γ1 0.25 0.30 0.00 0.00 0.35 0.05 0.10 0.15 0.20 γ1 0.25 0.30 0.35 Figure 10: Free energy landscape for 2-frequency problems at the critical value λ = (1, 1). Darker colors indicate lower free energy. Left: Z/6 with 2 frequencies. Here the origin is the global minimizer of free energy and so there is no computational gap, i.e. nontrivial recovery is statistically impossible when both λ1 and λ2 are below 1. Right: Z/5 with 2 frequencies. Here the global minimizer (marked with an X) does not lie at the origin and so there is a computational gap, i.e. there is a regime where nontrivial recovery is statistically possible yet AMP fails. 1.2 1 γ 0.8 0.6 0.4 0.2 0 0 5 10 15 20 25 30 35 40 t Figure 11: An example where AMP gives nontrivial but sub-optimal performance. Here we take Z/25 with 9 frequencies. Set λk = 0.8 for k = 1, . . . , 8 and λ9 = 1.1. Since we cannot visualize the free energy landscape in 9 dimensions, we instead plot the state evolution recurrence as it evolves over time (number of iterations t) from two different starting points. The bottom two curves correspond to AMP’s performance, where we initialize γ to be small: γ = (0.05, 0.05). The solid line is γ9 and the dashed line is γ1 (which is representative of γ2 , . . . , γ8 ). The top two curves correspond to a “warm start” γ = (0.7, 0.7). We see that with the warm start, state evolution converges to a different fixed point with larger γ values, and thus better correlation with the truth. Furthermore, this fixed point has lower free energy (not shown) than the lower one, indicating that the information-theoretically optimal estimator outperforms AMP. Acknowledgements The authors would like to thank Amit Singer, Roy Lederman, Yutong Chen, Nicholas Boumal, others from Amit Singer’s group, and Yash Deshpande, for helpful discussions. 30 References [ABBS14] Emmanuel Abbe, Afonso S Bandeira, Annina Bracher, and Amit Singer. Decoding binary node labels from censored edge measurements: Phase transition and efficient recovery. IEEE Transactions on Network Science and Engineering, 1(1):10–22, 2014. [ABH16] Emmanuel Abbe, Afonso S Bandeira, and Georgina Hall. Exact recovery in the stochastic block model. IEEE Transactions on Information Theory, 62(1):471–487, 2016. [ARC06] Amit Agrawal, Ramesh Raskar, and Rama Chellappa. What is the range of surface reconstructions from a gradient field? In European Conference on Computer Vision, pages 578–591. Springer, 2006. [AW08] Arash A Amini and Martin J Wainwright. High-dimensional analysis of semidefinite relaxations for sparse principal components. In 2008 IEEE International Symposium on Information Theory, pages 2454–2458. IEEE, 2008. [Ban15] Afonso S Bandeira. Convex Relaxations for Certain Inverse Problems on Graphs. PhD thesis, Princeton University, June 2015. [BBS14] Afonso S Bandeira, Nicolas Boumal, and Amit Singer. Tightness of the maximum likelihood semidefinite relaxation for angular synchronization. arXiv:1411.3272, 2014. [BCS15] Afonso S. Bandeira, Yutong Chen, and Amit Singer. Non-unique games over compact groups and orientation estimation in cryo-EM. arXiv:1505.03840, May 2015. [BCSZ14] Afonso S Bandeira, Moses Charikar, Amit Singer, and Andy Zhu. Multireference alignment using semidefinite programming. In Proceedings of the 5th conference on Innovations in theoretical computer science, pages 459–470. ACM, 2014. [BDM+ 16] Jean Barbier, Mohamad Dia, Nicolas Macris, Florent Krzakala, Thibault Lesieur, and Lenka Zdeborova. Mutual information for symmetric rank-one matrix estimation: A proof of the replica formula. arXiv:1606.04142, 2016. [BGN11] Florent Benaych-Georges and Raj Rao Nadakuditi. The eigenvalues and eigenvectors of finite, low rank perturbations of large random matrices. Advances in Mathematics, 227(1):494–521, 2011. [Bis99] Christopher M Bishop. Bayesian PCA. Advances in neural information processing systems, pages 382–388, 1999. [BM11] 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, 2011. [Bou16] Nicolas Boumal. Nonconvex phase synchronization. arXiv:1601.06114, 2016. [BR13a] Quentin Berthet and Philippe Rigollet. Complexity theoretic lower bounds for sparse principal component detection. In COLT, pages 1046–1066, 2013. [BR13b] Quentin Berthet and Philippe Rigollet. Optimal detection of sparse principal components in high dimension. The Annals of Statistics, 41(4):1780–1815, 2013. [BtD13] Theodor Bröcker and Tammo tom Dieck. Representations of compact Lie groups, volume 98. Springer Science & Business Media, 2013. [CC16] Yuxin Chen and Emmanuel Candès. The projected power method: An efficient algorithm for joint alignment from pairwise differences. arXiv:1609.05820, 2016. 31 [CLS12] Mihai Cucuringu, Yaron Lipman, and Amit Singer. Sensor network localization by eigenvector synchronization over the euclidean group. ACM Transactions on Sensor Networks (TOSN), 8(3):19, 2012. [Coh13] Jon Cohen. Is high-tech view of HIV too good to be true? Science, 341(6145):443–444, 2013. [CSSS10] Ronald R Coifman, Yoel Shkolnisky, Fred J Sigworth, and Amit Singer. Reference free structure determination through eigenvectors of center of mass operators. Applied and Computational Harmonic Analysis, 28(3):296–312, 2010. [DAM16] Yash Deshpande, Emmanuel Abbe, and Andrea Montanari. Asymptotic mutual information for the binary stochastic block model. In 2016 IEEE International Symposium on Information Theory (ISIT), pages 185–189. IEEE, 2016. [DM14] Yash Deshpande and Andrea Montanari. Information-theoretically optimal sparse pca. In 2014 IEEE International Symposium on Information Theory, pages 2197–2201. IEEE, 2014. p Yash Deshpande and Andrea Montanari. Finding hidden cliques of size N/e in nearly linear time. Foundations of Computational Mathematics, 15(4):1069–1128, 2015. [DM15] [DMM09] 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, 2009. [DMM10] David L Donoho, Arian Maleki, and Andrea Montanari. Message passing algorithms for compressed sensing: I. motivation and construction. IEEE Information Theory Workshop (ITW), pages 115–144, 2010. [DMR14] Yash Deshpande, Andrea Montanari, and Emile Richard. Cone-constrained principal component analysis. In Advances in Neural Information Processing Systems, pages 2717–2725, 2014. [ELW10] Daniel Egloff, Markus Leippold, and Liuren Wu. The term structure of variance swap rates and optimal variance swap investments. Journal of Financial and Quantitative Analysis, 45(5):1279, 2010. [FP07] Delphine Féral and Sandrine Péché. The largest eigenvalue of rank one deformation of large Wigner matrices. Communications in Mathematical Physics, 272(1):185–228, 2007. [GK06] Arvind Giridhar and PR Kumar. Distributed clock synchronization over wireless networks: Algorithms and analysis. In Proceedings of the 45th IEEE Conference on Decision and Control, pages 4915–4920. IEEE, 2006. [GW95] Michel X Goemans and David P Williamson. Improved approximation algorithms for maximum cut and satisfiability problems using semidefinite programming. Journal of the ACM (JACM), 42(6):1115–1145, 1995. [HWX16] Bruce Hajek, Yihong Wu, and Jiaming Xu. Achieving exact cluster recovery threshold via semidefinite programming. IEEE Transactions on Information Theory, 62(5):2788–2797, 2016. [JM13] Adel Javanmard and Andrea Montanari. State evolution for general approximate message passing algorithms, with applications to spatial coupling. Information and Inference, 2(2):115–144, 2013. [JMR16] Adel Javanmard, Andrea Montanari, and Federico Ricci-Tersenghi. Phase transitions in semidefinite relaxations. Proceedings of the National Academy of Sciences, 113(16):E2218–E2223, 2016. [KXZ16] Florent Krzakala, Jiaming Xu, and Lenka Zdeborová. Mutual information in rank-one matrix estimation. arXiv:1603.08447, 2016. 32 [LKZ15a] Thibault Lesieur, Florent Krzakala, and Lenka Zdeborov. Mmse of probabilistic low-rank matrix estimation: Universality with respect to the output channel. In 2015 53rd Annual Allerton Conference on Communication, Control, and Computing (Allerton), pages 680–687. IEEE, 2015. [LKZ15b] Thibault Lesieur, Florent Krzakala, and Lenka Zdeborová. Phase transitions in sparse PCA. In 2015 IEEE International Symposium on Information Theory (ISIT), pages 1635–1639. IEEE, 2015. [LS91] Robert B Litterman and Jose Scheinkman. Common factors affecting bond returns. The Journal of Fixed Income, 1(1):54–61, 1991. [MAYB13] Arian Maleki, Laura Anitori, Zai Yang, and Richard G Baraniuk. Asymptotic analysis of complex LASSO via complex approximate message passing (CAMP). IEEE Transactions on Information Theory, 59(7):4290–4308, 2013. [McS01] Frank McSherry. Spectral partitioning of random graphs. In Foundations of Computer Science, 2001. Proceedings. 42nd IEEE Symposium on, pages 529–537. IEEE, 2001. [MM09] Marc Mezard and Andrea Montanari. Information, physics, and computation. Oxford University Press, 2009. [MPV86] Marc Mézard, Giorgio Parisi, and MA Virasoro. SK model: The replica solution without replicas. Europhys. Lett, 1(2):77–82, 1986. [MR16] Andrea Montanari and Emile Richard. Non-negative principal component analysis: Message passing algorithms and sharp asymptotics. IEEE Transactions on Information Theory, 62(3):1458–1484, 2016. [MS16] Andrea Montanari and Subhabrata Sen. Semidefinite programs on sparse random graphs and their application to community detection. In Proceedings of the 48th Annual ACM SIGACT Symposium on Theory of Computing, pages 814–827. ACM, 2016. [MW15] Zongming Ma and Yihong Wu. Computational barriers in minimax submatrix detection. The Annals of Statistics, 43(3):1089–1116, 2015. [Pea86] Judea Pearl. Fusion, propagation, and structuring in belief networks. Artificial intelligence, 29(3):241–288, 1986. [PWBM16] Amelia Perry, Alexander S Wein, Afonso S Bandeira, and Ankur Moitra. Optimality and suboptimality of PCA for spiked random matrices and synchronization. arXiv:1609.05573, 2016. [RF12] Sundeep Rangan and Alyson K Fletcher. Iterative estimation of constrained rank-one matrices in noise. In IEEE International Symposium on Information Theory (ISIT), pages 1246–1250. IEEE, 2012. [RV16] Cynthia Rush and Ramji Venkataramanan. Finite sample analysis of approximate message passing. arXiv:1606.01800, 2016. [RW01] J Rubinstein and G Wolansky. Reconstruction of optical surfaces from ray data. Optical review, 8(4):281–283, 2001. [Sin11] Amit Singer. Angular synchronization by eigenvectors and semidefinite programming. Applied and computational harmonic analysis, 30(1):20–36, 2011. [SS11] Amit Singer and Yoel Shkolnisky. Three-dimensional structure determination from common lines in cryo-EM by eigenvectors and semidefinite programming. SIAM Journal on Imaging Sciences, 4(2):543–572, 2011. [TAP77] 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. 33 A Log-likelihood expansion for the Gaussian observation model In this section we show how the Gaussian observation model fits into the graphical model formulation by deriving the corresponding coefficient matrices Yρ . In particular, we show that Yρ = dρ λρ Mρ , a scalar multiple of the observed Gaussian P matrix. We can write log Luv (gu , gv ) = ρ log Lρuv (gu , gv ) and consider each representation separately. There are three cases for the three types of representations (see Section 3.1.3). For convenience we recall the Gaussian observation model: Mρ = Restricting to the u, v submatrix: ρ Muv = Real type. λρ 1 Xρ Xρ∗ + p Wρ . n ndρ 1 λρ ρ ρ(gu gv−1 ) + p Wuv . n ndρ ρ Let ρ be of real type. Recall that in this case, each entry of Wuv is N (0, 1). We have log Lρuv (gu , gv ) = λρ −ndρ ρ ρ(gu gv−1 ) Muv − 2 n 2 F ρ = dρ λρ Muv , ρ(gu gv−1 ) + const. ρ Here k · kF denotes the Frobenius norm. The additive constant in the last step depends on Muv but not on ρ ρ gu , gv . Thus the log-likelihood coefficients are Yuv = dρ λρ Muv and so Yρ = dρ λρ Mρ . Complex type. Now consider a representation ρ of complex type, along with its conjugate ρ. Recall that ρ in this case, each entry of Wuv has independent real and imaginary parts drawn from N (0, 1/2). We have 2 λρ ρ(gu gv−1 ) n E D F ρ ρ −1 , ρ(gu gv−1 ) + const. = dρ λρ Muv , ρ(gu gv ) + dρ λρ Muv ρ log Lρuv (gu , gv ) = −ndρ Muv − Therefore we have Yρ = dρ λρ Mρ and Yρ = dρ λρ Mρ = dρ λρ Mρ . ρ Quaternionic type. Now consider a representation ρ of quaternionic type. Recall that in this case, Wuv is block-quaternion where each 2 × 2 block encodes a quaternion value whose 4 entries are drawn independently from N (0, 1/2). Note the following relation between the norm of a quaternion and its corresponding 2 × 2 matrix: 2 1 a + bi c + di . ka + bi + cj + dkk2 ≡ a2 + b2 + c2 + d2 = 2 −c + di a − bi F We have 2 1 λρ ρ ρ(gu gv−1 ) Muv − 2 n F  ρ −1 = dρ λρ Re Muv , ρ(gu gv ) + const log Lρuv (gu , gv ) = −ndρ · ρ , ρ(gu gv−1 ) + const = dρ λρ Muv ρ where Re denotes real part. In the last step we used the fact that Muv and ρ(gu gv−1 ) are block-quaternion and so their inner product is real (see Section 3.1.3). Therefore Yρ = dρ λρ Mρ . 34 B Proof of Lemma 6.1 To see that (i) and (ii) are equal,  recall the p interpretation of Fρ as a conditional expectation: Fρ (· · · ) = E[ρ(g)| · · · ] where · · · stands for γqt q(g) + γqt zq q . (This is related to the Nishimori identities in statistical physics.) We have the following symmetry properties of Fρ . Lemma B.1. (1) For any γqt ∈ R, zq ∈ Cdρ ×dρ , and g, h ∈ G, we have Fρ and n γqt q(hg) + n q q o  o  γqt q(g) + γqt q(h−1 )zq = ρ(h)Fρ γqt zq q q n n q q o  o  t t −1 t t γq q(g) + γq zq q(h ) γq q(gh) + γq zq = Fρ Fρ ρ(h). q (2) Therefore, if we define fρ (g) ≡ Ezq Fρ q n q o  γqt q(g) + γqt zq q we have fρ (hg) = ρ(h)fρ (g) and fρ (gh) = fρ (g)ρ(h). Proof. Part (1) is a straightforward computation using the definition of Fρ . Part (2) follows from part (1) because zq has the same distribution as q(h−1 )zq and zq q(h−1 ). We now return to the proof of Lemma 6.1. The equality of (i) and (iii) follows from part (2) of Lemma B.1. The equality of (ii) and (iv) follows from part (1) of Lemma B.1. Combining this with the equality of (i) and (ii) from above, we have now shown equality of (i),(ii),(iii),(iv). It remains to show that Atρ is a real multiple of the identity. Letting e ∈ G be the identity, we have fρ (e)ρ(g) = fρ (eg) = fρ (ge) = ρ(g)fρ (e) and so by Schur’s lemma, this means fρ (e) is a (possibly complex) multiple of the identity. But fρ (e) is just (iii), so we are done. To see that the multiple atρ is real, note that the trace of (ii) is real. 35
8cs.DS
arXiv:cs/0312031v1 [cs.DC] 16 Dec 2003 Theory and Practice of Logic Programming 1(3) 251–282, May 2001. 1 Distributed WWW Programming using (Ciao-)Prolog and the PiLLoW library∗ DANIEL CABEZA and MANUEL HERMENEGILDO CLIP Group http://www.clip.dia.fi.upm.es – http://www.cliplab.org Facultad de Informática Universidad Politécnica de Madrid (UPM) 28660-Boadilla del Monte, Madrid, Spain (e-mail: {dcabeza,herme}@fi.upm.es) Abstract We discuss from a practical point of view a number of issues involved in writing distributed Internet and WWW applications using LP/CLP systems. We describe PiLLoW, a publicdomain Internet and WWW programming library for LP/CLP systems that we have designed in order to simplify the process of writing such applications. PiLLoW provides facilities for accessing documents and code on the WWW; parsing, manipulating and generating HTML and XML structured documents and data; producing HTML forms; writing form handlers and CGI-scripts; and processing HTML/XML templates. An important contribution of PiLLoW is to model HTML/XML code (and, thus, the content of WWW pages) as terms. The PiLLoW library has been developed in the context of the Ciao Prolog system, but it has been adapted to a number of popular LP/CLP systems, supporting most of its functionality. We also describe the use of concurrency and a highlevel model of client-server interaction, Ciao Prolog’s active modules, in the context of WWW programming. We propose a solution for client-side downloading and execution of Prolog code, using generic browsers. Finally, we also provide an overview of related work on the topic. Keywords: WWW, HTML, XML, CGI, HTTP, Distributed Execution, (Constraint) Logic Programming. 1 Introduction The wide diffusion of the Internet and the popularity of the “World Wide Web” (Berners-Lee et al., 1994) –WWW– protocols are effectively providing a novel platform that facilitates the development of new classes of portable and user-friendly distributed applications. Good support for network connectivity and the protocols and communication architectures of this novel platform are obviously requirements for any programming tool to be useful in this arena. However, this alone may not be enough. It seems natural that significant parts 0 This paper is an expanded and improved version of (Cabeza & Hermenegildo, 1996a; Cabeza & Hermenegildo, 1996b; Cabeza & Hermenegildo, 1997; Cabeza et al., 1996). 2 D. Cabeza and M. Hermenegildo of network applications will require symbolic and numeric capabilities which are not necessarily related with distribution. Important such capabilities are, for example, high-level symbolic information processing, dealing with combinatorial problems, and natural language processing in general. Logic Programming (LP) (Kowalski, 1974; Colmerauer, 1975) and Constraint Logic Programming (CLP) systems (Jaffar & Lassez, 1987; Van Hentenryck, 1989; Colmerauer, 1990; M. Dincbas & Van Hentenryck, 1990; ECRC, 1993) have been shown particularly successful at tackling these issues (see, for example, the proceedings of recent conferences on the “Practical Applications of Prolog” and “Practical Applications of Constraint Technology”). It seems natural to study how LP/CLP technology fares in developing applications which have to operate over the Internet. In fact, Prolog, its concurrent and constraint based extensions, and logic programming languages in general have many characteristics which appear to set them particularly well placed for making an impact on the development of practical networked applications, ranging from the simple to the quite sophisticated. Notably, LP/CLP systems share many characteristics with other recently proposed network programming tools, such as Java, including dynamic memory management, well-behaved structure and pointer manipulation, robustness, and compilation to architecture-independent bytecode. Furthermore, and unlike the scripting or application languages currently being proposed (e.g., shell scripts, Perl, Java, etc.), LP/CLP systems offer a quite unique set of additional features including dynamic databases, search facilities, grammars, sophisticated meta-programming, and well understood semantics. In addition, most LP/CLP systems also already offer some kind of low level support for remote communication using Internet protocols. This generally involves providing a sockets (ports) interface whereby it is possible to make remote data connections via the Internet’s native protocol, TCP/IP. A few systems support higherlevel communication layers on top of this interface including linda-style blackboards (e.g., SICStus Prolog (Carlsson, 1988), Ciao (Carro & Hermenegildo, 1999; Cabeza & Hermenegildo, 1995; Hermenegildo & CLIP Group, 1994; Hermenegildo et al., 1995a; Hermenegildo et al., 1999a; Hermenegildo et al., 1999b; Bueno et al., 1997), BinProlog/µ2Prolog (Tarau, 1996; De Bosschere, 1989), etc.) or shared variable-based communication (e.g., KL1 (Chikayama et al., 1994), AKL (Janson & Haridi, 1991), Oz (Smolka, 1994), Ciao (Hermenegildo et al., 1995b; Cabeza & Hermenegildo, 1995), etc.). In some cases, this functionality is provided via libraries, building on top of the basic TCP/IP primitives. This is the case, for example, of the SICStus and Ciao distributed linda-style interfaces. In fact, as we have shown in previous work, sharedvariable based communication can also be implemented in conventional systems via library predicates, by using attributed variables (Hermenegildo et al., 1995b; Cabeza & Hermenegildo, 1995). In addition to these communication primitives, several systems offer concurrency and even higher-level abstractions (distributed objects, mobile code, ...) which are very useful for developing general-purpose distributed applications. Our concrete interest here is WWW applications. These applications generally Distributed WWW Programming using (Ciao-)Prolog and the PiLLoW lib 3 use specific high-level protocols (such as HTTP or FTP), data formats (such as HTML or XML), and application architectures (e.g., the CGI interface) which are different from, e.g., the shared-variable or linda-based protocols typically used in other types of distributed applications. In this paper we study how good support for these WWW-related protocols, data formats, and architectures can be provided for LP/CLP systems, building on the widely available interfaces to the basic TCP/IP protocols. Our aim is to discuss from a practical point of view a number of the new issues involved in writing WWW applications using LP/CLP systems, as well as the architecture of some typical solutions. In the process, we will describe PiLLoW (“Programming in Logic Languages on the Web”), a public domain Internet/WWW programming library for LP/CLP systems which, we argue, significantly simplifies the process of writing such applications. PiLLoW provides facilities for generating HTML/XML structured documents by handling them as Herbrand terms, producing HTML forms, writing form handlers, processing HTML/XML templates, accessing and parsing WWW documents, etc. We also describe the architecture of some relatively sophisticated application classes, using a high-level model of clientserver interaction, active modules (Cabeza & Hermenegildo, 1995). Finally we describe an architecture for automatic LP/CLP code downloading for local execution, using just the library and generic browsers. Apart from the tutorial value of the paper, we present a number of technical contributions which include the idea of representing HTML and XML code (and structured text in general) as Prolog terms, the use of the logical variable in such terms leading to a model of an “HTML template” (a pair comprising a term with free variables and a dictionary associating names to those variables), the notion of “active logic modules” and its application to solving efficiency issues in CGI interaction in a very simple way, the idea of “Prolog scripts” and its application to CGIs, and the identification of a number of features that should be added to existing systems in order to facilitate the programming of WWW applications – mainly concurrency. The argument throughout the paper is that, with only very small limitations in functionality (which disappear when concurrency is added, as in systems such as BinProlog/µ2-Prolog, AKL, Oz, KL1, and Ciao Prolog), it is possible to add an extremely useful Internet/WWW programming layer to any LP/CLP system without making any significant changes in the implementation. We argue that this layer can simplify the generation of applications in LP/CLP systems including active WWW pages, search tools, content analyzers, indexers, software demonstrators, collaborative work systems, MUDs and MOOs, code distributors, etc. The purpose of the paper is also to serve as a tutorial, containing sufficient information for developing relatively complex WWW applications in Prolog and other LP and CLP languages using the PiLLoW library. The PiLLoW library has been developed in the context of the Ciao Prolog system, but it has been adapted to a number of other popular LP/CLP systems, supporting most of its functionality. The Ciao Prolog system and the PiLLoW library can be freely downloaded from http://www.clip.dia.fi.upm.es and http://www.cliplab.org. 4 D. Cabeza and M. Hermenegildo www.xxx.yyy HTTP Server 1 WWW Browser std. doc. request 4 output 2 3 hello_world Fig. 1. The CGI interface 2 Writing basic cgi-bin applications The simplest way of writing WWW applications is through the use of the “Common Gateway Interface” (CGI). A CGI executable is a standard executable file but such that the HTTP server (the program that responds to HTTP requests in a machine which serves a WWW site) can tell that it in fact contains a program that is to be run, rather than a document text that is to be sent to the client (the browser) as usual. The file can be distinguished by belonging to a special directory, commonly named cgi-bin, or by a special filename ending, such as .cgi. This is normally set during configuration of the HTTP server. The basic idea behind the CGI interface is illustrated in Figure 1. When the user selects an address of a CGI executable in a document, such as http://www.xxx.yyy/cgi-bin/hello_world (or perhaps http://www.xxx.yyy/foo/hello_world.cgi) the browser issues a standard document request (1). The HTTP server, recognizing that it is a CGI executable rather than a document, starts the executable (2), and during such execution stores the output of the executable in a buffer (3). Upon termination of the executable, the contents of the buffer (which should be in a format that the browser can handle, such as HTML) are returned to the browser as if a normal page with that content had been accessed (4). The following is an example of how a very simple such executable can be written in an LP/CLP language. The source might be as follows:1 main :write(’Content-type: text/html’), nl, nl, write(’<HTML>’), write(’Hello world.’), write(’</HTML>’). And the actual executable could be generated as usual, for example in the Ciao 1 Note that in the examples presented, and in order to shorten them, the HTML code may be slightly simplified, and as a result of this it may not be completely standard-conforming. However, the examples can be used as is with all popular browsers. Distributed WWW Programming using (Ciao-)Prolog and the PiLLoW lib 5 system, using the standalone compiler, by writing at a UNIX shell “ciaoc -o hello_world.cgi hello_world”.2 The executable then has to be placed in an appropriate place (accessible via an HTTP address by a browser) and have the right permissions for being executed by the server (for example, in some systems this means being executable by the user “nobody”). In systems which make executables through saved states (which usually have the disadvantage of their generally large size), at the system prompt one could create the executable by writing something like: ?:- compile(’hello_world.pl’), save(’hello_world.cgi’), main. 3 LP/CLP Scripts for CGI Applications CGI executables are often small- to medium-sized programs that perform relatively simple tasks. This, added to the slow speed of the network connection in comparison with that of executing a program (which makes program execution speed less important) has made scripting languages (such as shell scripts or Perl) very popular for writing these programs. The popularity is due to the fact that no compilation is necessary (extensive string handling capabilities also play an important role in the case of Perl), and thus changes and updates to the program imply only editing the source file. Logic languages are, a priori, excellent candidates to be used as scripting languages.3 However, the relative complication in making executables (needing in some systems to start the top-level, compile or consult the file, and make a saved state) and the often large size of the resulting executables may deter CGI application programmers. It appears convenient to provide a means for LP/CLP programs to be executable as scripts, even if with reduced performance. It is generally relatively easy to support scripts with the same functionality in most LP/CLP systems. In Ciao, the program ciao-shell –which has also been adapted to SICStus (Hermenegildo, 1996)– accomplishes this task, by first loading the file given to it as the first argument (but skipping the first lines and avoiding loading messages) and then starting execution at main/1 (the argument provides the list of command line options). Then, for example, in a Unix system, the following program can be run directly as a script without any need for compilation: #!/usr/local/bin/ciao-shell main(_) :write(’Content-type: text/html’), nl, nl, write(’<HTML>’), 2 3 It often convenient to use options (such as ciaoc’s -s or -S) which will generate a standalone executable which is independent of any libraries. For example, the built-in grammars and databases greatly simplify many typical script-based applications. 6 D. Cabeza and M. Hermenegildo www.xxx.yyy <form action="http://www.xxx.yyy/handler.cgi"> 2 WWW Browser 1 HTTP Server form data 6 3 form reply 4 5 handler.cgi Fig. 2. The Forms interface write(’Hello world.’), write(’</HTML>’). Note that in some UNIX versions either the program ciao-shell must be included in the /etc/shells listing or the first line should be replaced by these two: #!/bin/sh exec ciao-shell $0 "$@" The execution of Prolog scripts may be optimized in some systems. For example, in Ciao, the first time a script is run it is also compiled and its bytecode is saved to a file. At subsequent times, if the script has not changed, the object code is retrieved from that file, avoiding compilation or interpretation overhead. 4 Form Handling in HTTP So far we have shown CGI executables which produce output, but this output is not a function of input coming from the request, which is obviously of limited interest. CGI executables become most useful when combined with HTML forms. HTML forms are HTML documents (or parts of HTML documents) which include special fields such as text areas, menus, radio buttons, etc. which allow providing input to CGI executables. The steps involved in the handling of the input contained in a form are illustrated in Figure 2. When a document containing a form is accessed via a form-capable browser (Mosaic, Netscape, Lynx, etc.), the browser displays the input fields, buttons, menus, etc. indicated in the document, and locally allows the user to perform input by modifying such fields. However, this input is not ultimately handled by the browser. Instead, it will be sent to a “handler” CGI program, which can be anywhere on the net, and whose address must be given in the form itself (1). Forms generally have a “submit” button such that, when pressed, the input Distributed WWW Programming using (Ciao-)Prolog and the PiLLoW lib 7 provided through the menus, text areas, etc. is sent by the browser to the HTTP server corresponding to the handler (2). Two methods for sending this input exist: “GET” and “POST”. In the meantime, the sending browser waits for a response from that program, which should come in the form of a new HTML document. The handler program is invoked in much the same way as a cgi-bin application (3), except that the information from the form is supplied to the handler (in different ways depending on the system, the method of invocation, and the content type) (4). This information is encoded in a predefined format, which relates each piece of information to the corresponding field in the form, by means of a keyword associated with each field. The handler then identifies the information corresponding to each field in the original form, processes it, and then responds by writing an HTML document to its standard output (5), which is forwarded by the server to the waiting browser when the handler terminates (6). An important point to be noted is that, as with simple cgi-bin applications, the handler is started and should terminate for each transaction. The reader is referred, for example, to (Grobe & Naseer, 1998) for a more complete introduction to CGI scripts and HTML forms. 5 Writing Form Handlers with Pi LLoW The only complication in writing form handlers compared to writing simple CGI applications is the need to capture and parse the form data. As we said before, this data can be provided in several ways, depending on the system and the method used to invoke the form, and is encoded with escape sequences. It is relatively easy to write a Prolog program to parse such input (using, for example, definite clause grammars –DCGs). The PiLLoW library provides some predicates which do this and simplify the whole task, hiding the low-level protocol behind. The principal predicates provided include: get_form_input(Dic ) Translates input from the form (with either the POST or GET methods, and even with CONTENT_TYPE multipart/form-data) to a dictionary Dic of attribute=value pairs. It translates empty values (which indicate only the presence of an attribute) to the atom ’$empty’, values with more than one line (from text areas or files) to a list of lines as strings, the rest to atoms or numbers (using name/2). This is implemented using DCG parsers. get_form_value(Dic,Var,Val ) Gets value Val for attribute Var in dictionary Dic. Does not fail: value is ’’ if not found (this simplifies merging form producers and form handlers, see later). form_empty_value(V ) Useful to check that a value V from a text area is empty (filters spaces, newlines, linefeeds, etc.). form_default(Val,Default,NewVal ) Useful when a form is only partially filled (and also in the first invocation of a combined form handler/producer – see Section 7). If the value of Val is empty then NewVal=Default, else NewVal=Val. my_url(URL ) Returns in URL the Uniform Resource Locator (WWW address) of this cgi executable. form_request_method(Method ) Returns in Method the method of invocation of the form handler (“GET” or “POST”). 8 D. Cabeza and M. Hermenegildo For example, suppose we want to make a handler which implements a database of telephone numbers and is queried by a form including a single entry field with name person_name. The handler might be coded as follows: #!/usr/local/bin/ciao-shell :- include(library(pillow)). main(_) :get_form_input(Input), get_form_value(Input,person_name,Name), write(’Content-type: text/html’), nl, nl, write(’<HTML><TITLE>Telephone database</TITLE>’), nl, write(’<IMG SRC="phone.gif">’), write(’<H2>Telephone database</H2><HR>’), write_info(Name), write(’</HTML>’). write_info(Name) :form_empty_value(Name) -> write(’You have to provide a name.’) ; phone(Name, Phone) -> write(’Telephone number of <B>’), write(Name), write(’</B>: ’), write(Phone) ; write(’No telephone number available for <B>’), write(Name), write(’</B>.’). phone(daniel, ’336-7448’). phone(manuel, ’336-7435’). phone(sacha, ’543-5316’). The code above is quite simple. On the other hand, the interspersion throughout the text of calls to write with HTML markup inside makes the code somewhat inelegant. Also, there is no separation between computation and input/output, as is normally desirable. It would be much preferable to have an encoding of HTML code as Prolog terms, which could then be manipulated easily in a more elegant way, and a predicate to translate such terms to HTML for output. This functionality, provided by the PiLLoW library, is presented in the next section. 6 Handling HTML as Prolog Terms Since LP/CLP systems perform symbolic processing using Herbrand terms, it seems natural to be able to handle HTML code directly as terms. Then, such structures Distributed WWW Programming using (Ciao-)Prolog and the PiLLoW lib 9 only need to be translated by appropriate predicates to HTML code when they need to be output. In general, this relationship between HTML code and Prolog terms allows viewing any WWW page as a Herbrand term. The predicates which provide this functionality in PiLLoW are: output_html(F ) Accepts in F an HTML term (or a list of HTML terms) and sends to the standard output the text which is the rendering of the term(s) in HTML format. html2terms(Chars,Terms ) (also, xml2terms/2) Relates a list of HTML (resp. XML) terms and a list of ASCII characters which are the rendering of the terms in HTML format. This predicate is reversible (but it normalizes in the reverse direction –see later). output_html/2 uses this predicate to transform HTML terms in characters. Again, this is implemented via DCG parsing. In an HTML term certain atoms and structures represent special functionality at the HTML level. An HTML term can be recursively a list of HTML terms. The following are legal HTML terms: hello [hello, world] ["This is an ", em(’HTML’), " term"] When converting HTML terms to characters, html2terms/2 translates special structures into the corresponding format in HTML, applying itself recursively to their arguments. Strings are always left unchanged. HTML terms may contain logic variables, provided they are instantiated before the term is translated or output. This allows creating documents piecemeal, back-patching of references in documents, etc. In the following sections we list the meaning of the principal Prolog structures that represent special functionality at the HTML level. Only special atoms are translated, the rest are assumed to be normal text and will be passed through to the HTML document. 6.1 General Structures Basically, HTML has two kinds of components: HTML elements and HTML environments. An HTML element has the form “<NAME Attributes >” were NAME is the name of the element and Attributes is a (possibly empty) sequence of attributes, each of them being either an attribute name or an attribute assignment as name="Value". An HTML environment has the form “<NAME Attributes > Text </NAME>” were NAME is the name of the environment an Attributes has the same form as before. The general Prolog structures that represent these two HTML constructions are: Name $Atts (‘$/2’ is defined as an infix, binary operator.) Represents an HTML element of name Name and attributes Atts, were Atts is a (possibly empty) list 10 D. Cabeza and M. Hermenegildo of attributes, each of them being either an atom or a structure name =value . For example, the term img$[src=’images/map.gif’,alt="A map",ismap] is translated into the HTML source <img src="images/map.gif" alt="A map" ismap> Note that HTML is not case-sensitive, so we can use lower-case atoms. name (Text ) (A term with functor name/1 and argument Text) Represents an HTML environment of name name and included text Text. For example, the term address(’[email protected]’) is translated into the HTML source <address>[email protected]</address> name (Atts,Text ) (This is a term with functor name/2 and arguments Atts and Text) Represents an HTML environment of name name, attributes Atts and included text Text. For example, the term a([href=’http://www.clip.dia.fi.upm.es/’],"Clip home") represents the HTML source <a href="http://www.clip.dia.fi.upm.es/">Clip home</a> env(Name,Atts,Text ) Equivalent to Name (Atts,Text ). begin(Name,Atts ) It translates to the start of an HTML environment of name Name and attributes Atts. There exists also a begin(Name ) structure. Useful, in conjunction with the next structure, when including in a document output generated by an existing piece of code (e.g. Name = pre). Its use is otherwise discouraged. end(Name ) Translates to the end of an HTML environment of name Name. Now we can rewrite the previous example as follows (note how the use of the logic variable Response allows injecting the result of the call to response/1 into the output term, using unification): #!/usr/local/bin/ciao-shell :- include(library(pillow)). main(_) :get_form_input(Input), get_form_value(Input,person_name,Name), response(Name,Response), output_html([ ’Content-type: text/html\n\n’, html([title(’Telephone database’), img$[src=’phone.gif’], h2(’Telephone database’), hr$[], Distributed WWW Programming using (Ciao-)Prolog and the PiLLoW lib 11 Response])]). %% Using the logic variable. response(Name, Response) :form_empty_value(Name) -> Response = ’You have to provide a name.’ ; phone(Name, Phone) -> Response = [’Telephone number of ’,b(Name),’: ’,Phone] ; Response = [’No telephone number available for ’,b(Name),’.’]. phone(daniel, ’336-7448’). phone(manuel, ’336-7435’). phone(sacha, ’543-5316’). Any HTML construction can be represented with these structures (except comments and declarations, which could be included as atoms or strings), but the PiLLoW library provides additional, specific structures to simplify HTML creation. 6.2 Specific Structures In this section we will list some special structures for HTML which PiLLoW understands. While in many cases using the general structures (with the native HTML names) is probably good practice, using specific structures such as these can sometimes be convenient. Also, some of these structures have special functionality (e.g., prolog_term/1). A predicate html_expansion/2 is provided which allows defining new structures (tables, layers, etc). Specific structures include (the reader is referred to the PiLLoW manual for a full listing): start Used at the beginning of a document (translates to <html>). end Used at the end of a document (translates to </html>). -- Produces a horizontal rule (translates to <hr>). \\ Produces a line break (translates to <br>). $ Produces a paragraph break (translates to <p>). comment(Comment ) Used to insert an HTML comment (translates to <!-- Comment -->). declare(Decl ) Used to insert an HTML declaration – seldom used (translates to <!Decl >). image(Addr ) Used to include an image of address (URL) Addr (translates to an <img> element). image(Addr,Atts ) As above with the list of attributes Atts. ref(Addr,Text ) Produces a hypertext link, Addr is the URL of the referenced resource, Text is the text of the reference (translates to <a href="Addr">Text</a>). label(Label,Text ) Labels Text as a target destination with label Label (translates to <a name="Label">Text</a>). heading(N,Text ) Produces a heading of level N (1 ≤ N ≤ 6), Text is the text to be used as heading – useful when one wants a heading level relative to another heading (translates to a <hN > environment). 12 D. Cabeza and M. Hermenegildo itemize(Items ) Produces a list of bulleted items, Items is a list of corresponding HTML terms (translates to a <ul> environment). enumerate(Items ) Produces a list of numbered items, Items is a list of corresponding HTML terms (translates to an <ol> environment). description(Defs ) Produces a list of defined items, Defs is a list whose elements are definitions, each of them being a Prolog sequence (composed by ’,’/2 operators). The last element of the sequence is the definition, the other (if any) are the defined terms (translates to an <dl> environment). nice_itemize(Img,Items ) Produces a list of bulleted items, using the image Img as bullet. The predicate icon_address/2 provides a colored bullet. preformatted(Text ) Used to include preformatted text, Text is a list of HTML terms, each element of the list being a line of the resulting document (translates to a <pre> environment). verbatim(Text ) Used to include text verbatim, special HTML characters (<,>,&,") are translated into its quoted HTML equivalent. prolog_term(Term ) Includes any prolog term Term, represented in functional notation. Variables are output as _. nl Used to include a newline in the HTML source (just to improve human readability). entity(Name ) Includes the entity of name Name (ISO-8859-1 special character). cgi_reply This is not HTML, rather, the CGI protocol requires this content descriptor to be used by CGI executables (including form handlers) when replying (translates to “Content-type: text/html”). pr Includes in the page a graphical logo with the message “Developed using the PiLLoW Web programming library”, which points to the manual and library source. With these additional structures, we can rewrite the previous example as follows (note that in this example the use of heading/2 or h2/1 is equally suitable): #!/usr/local/bin/ciao-shell :- include(library(pillow)). main(_) :get_form_input(Input), get_form_value(Input,person_name,Name), response(Name,Response), output_html([ cgi_reply, start, title(’Telephone database’), image(’phone.gif’), heading(2,’Telephone database’), --, Response, Distributed WWW Programming using (Ciao-)Prolog and the PiLLoW lib 13 end]). response(Name, Response) :form_empty_value(Name) -> Response = ’You have to provide a name.’ ; phone(Name, Phone) -> Response = [’Telephone number of ’,b(Name),’: ’,Phone] ; Response = [’No telephone number available for ’,b(Name),’.’]. phone(daniel, ’336-7448’). phone(manuel, ’336-7435’). phone(sacha, ’543-5316’). We have not included above the specific structures for creating forms. They are included and explained in the following section. 6.3 Specific Structures for Forms In this section we explain the structures which represent the various elements related to forms: start_form(Addr [,Atts ]) Specifies the beginning of a form. Addr is the address (URL) of the program that will handle the form, and Atts other attributes of the form, as the method used to invoke it. If Atts is not present the method defaults to POST. (Translates to <form action="Addr " Atts >.) start_form Specifies the beginning of a form without assigning address to the handler, so that the form handler will be the cgi-bin executable producing the form. end_form Specifies the end of a form (translates to </form>). checkbox(Name,State ) Specifies an input of type checkbox with name Name, State=on if the checkbox is initially checked (translates to an <input> element). radio(Name,Value,Selected ) Specifies an input of type radio with name Name (several radio buttons which are interlocked must share their name), Value is the the value returned by the button, if Selected=Value the button is initially checked (translates to an <input> element). input(Type,Atts ) Specifies an input of type Type with a list of attributes Atts. Possible values of Type are text, hidden, submit, reset, . . . (translates to an <input> element). textinput(Name,Atts,Text ) Specifies an input text area of name Name. Text provides the default text to be shown in the area, Atts a list of attributes (translates to a <textarea> environment). option(Name,Val,Options ) Specifies a simple option selector of name Name, Options is the list of available options and Val is the initial selected option (if Val is not in Options the first item is selected) (translates to a <select> environment). 14 D. Cabeza and M. Hermenegildo menu(Name,Atts,Items ) Specifies a menu of name Name, list of attributes Atts and list of options Items. The elements of the list Items are marked with the prefix operator ‘$’ to indicate that they are selected (translates to a <select> environment). For example, in order to generate a form suitable for sending input to the previously described phone database handler one could execute the following goal: output_html([ start, title(’Telephone database’), heading(2,’Telephone database’), $, start_form(’http://www.clip.dia.fi.upm.es/cgi-bin/phone_db.pl’), ’Click here, enter name of clip member, and press Return:’, \\, input(text,[name=person_name,size=20]), end_form, end]). Of course, one could have also simply written directly the resulting HTML document: <html> <title>Telephone database</title> <h2>Telephone database</h2> <p> <form method="POST" action="http://www.clip.dia.fi.upm.es/cgi-bin/phone_db.pl"> Click here, enter name of clip member, and press Return: <br> <input type="text" name="person_name" size="20"> </form> </html> 7 Merging the Form Producer and the Handler An interesting practice when producing HTML forms and handlers is to merge the operation of the form producer and the handler into the same program. The idea is to produce a generalized handler which receives the form input, parses it, computes the answer, and produces a new document which contains the answer to the input, as well as a new form. A special case must be made for the first invocation, in which the input would be empty, and then only the form should be generated. The following is an example which merges the producer and the handler for the phones database:4 4 Notice that when only one text field exists in a form, the form can be submitted by simply pressing “Return” inside the text field. Distributed WWW Programming using (Ciao-)Prolog and the PiLLoW lib 15 #!/usr/local/bin/ciao-shell :- include(library(pillow)). main(_) :get_form_input(Input), get_form_value(Input,person_name,Name), response(Name,Response), output_html([ cgi_reply, start, title(’Telephone database’), image(’phone.gif’), heading(2,’Telephone database’), --, Response, start_form, ’Click here, enter name of clip member, and press Return:’, \\, input(text,[name=person_name,size=20]), end_form, end]). response(Name, Response) :form_empty_value(Name) -> Response = [] ; phone(Name, Phone) -> Response = [’Telephone number of ’,b(Name),’: ’,Phone,$] ; Response = [’No telephone number available for ’,b(Name),’.’,$]. phone(daniel, ’336-7448’). phone(manuel, ’336-7435’). phone(sacha, ’543-5316’). This combination of the form producer and the handler allows producing applications that give the impression of being interactive, even if each step involves starting and running the handler to completion. Note that forms can contain fields which are not displayed and are passed as input to the next invocation of the handler. This allows passing state from one invocation of the handler to the next one. Finally, a note about testing and debugging CGI scripts: this is unfortunately not as straightforward as it could be. Useful techniques include carefully checking permissions, looking at the data logs of the server, replacing predicates such as get_form_... with versions that print what is really being received, etc. 16 D. Cabeza and M. Hermenegildo 8 Templates A problem in the previous programs is that the layout of the output page is not easily configurable –it is hard-coded in the source and can only be changed by modifying the program. This is something that a normal user (or even an expert programmer if the size of the program is large) may not want to do. In order to address this, PiLLoW provides a facility for reading in “HTML templates” (also XML templates), and converting them into a term format in which it is very natural to manipulate them. An HTML template is a file which contains standard HTML code, but in which “slots” can be defined and given an identifier by means of a special tag. These slots represent parts of the HTML code in which other HTML code can be inserted. Once the HTML template is read by PiLLoW, such slots appear as free logic variables in the corresponding PiLLoW terms. In this way, the user can define a layout with an HTML editor of choice, taking care of marking the “left out” parts with given names. These parts will then be filled appropriately by the program. The functionality associated with parsing such terms is encapsulated in the following predicate: html_template(Chars, Terms, Dict ) Parses the string Chars as the contents of an HTML template and unifies Terms with the list of HTML terms comprised in the template, substituting occurrences of the special tag <V>name</V> with prolog variables. Dict is instantiated to the dictionary of such substitutions, as a list of name=Variable pairs. In the following example a template file called TlfDB.html is assumed to hold the formatting of the output page, defining an HTML variable called “response” which will be substituted by the response of the CGI program. Note that the predicate file_to_string/2 (defined in Ciao library file_utils) reads a file and returns in its second argument the contents of the file as a list of character codes. Note also that calling html_template/3 with the third argument instantiated to [response = Response] has the effect of instantiating the “slot” in HTML_terms to the contents of Response (this makes use of the fact that there is only one slot on the template; normally, a call to member/2 is used to locate the appropriate name=Variable pair). #!/usr/local/bin/ciao-shell :- include(library(pillow)). :- use_module(library(file_utils)). main(_) :get_form_input(Input), get_form_value(Input,person_name,Name), response(Name,Response), file_to_string(’TlfDB.html’, Contents), html_template(Contents, HTML_terms, [response = Response]), output_html([cgi_reply|HTML_terms]). Distributed WWW Programming using (Ciao-)Prolog and the PiLLoW lib 17 response(Name, Response) :form_empty_value(Name) -> Response = [] ; phone(Name, Phone) -> Response = [’Telephone number of ’,b(Name),’: ’,Phone,$] ; Response = [’No telephone number available for ’,b(Name),’.’,$]. phone(daniel, ’336-7448’). phone(manuel, ’336-7435’). phone(sacha, ’543-5316’). An example of the contents of the template file could be: <HTML><HEAD><TITLE>Telephone database</TITLE></HEAD> <BODY background="bg.gif"> <IMG src="phone.gif"> <H2>Telephone database</H2> <HR> <V>response</V> <FORM method="POST"> Click here, enter name of clip member, and press Return:<BR> <INPUT type="text" name="person_name" size="20"></FORM> </BODY> </HTML> 9 Accessing WWW documents The facilities presented in the previous sections allow generating HTML documents, including forms, and handling the input coming from forms. In many applications such as search tools, content analyzers, etc., it is also desirable to be able to access documents on the Internet. Such access is generally accomplished through protocols such as FTP and HTTP which are built on top of TCP/IP. In LP/CLP systems which have TCP/IP connectivity (i.e., a sockets/ports interface) the required protocols can be easily coded in the source language using such facilities and DCG parsers. At present, only the HTTP protocol is supported by PiLLoW. As with HTML code, the library uses an internal representation of Uniform Resource Locators (URLs), to be able to manipulate them easily, and provides predicates which translate between the internal representation and the textual form. The facilities provided by PiLLoW for accessing WWW documents include the following predicates: url_info(URL,Info ) Translates a URL URL to an internal structure Info which details its various components and vice-versa. For now non-HTTP URLs make the predicate fail. E.g. url_info(’http://www.foo.com/bar/scooby.txt’,Info) gives Info = http(’www.foo.com’,80,"/bar/scooby.txt"), url_info(URL, http(’www.foo.com’,2000,"/bar/scooby.txt") gives URL = "http://www.foo.com:2000/bar/scooby.txt" (a string). 18 D. Cabeza and M. Hermenegildo url_info_relative(URL,BaseInfo,Info ) Translates a relative URL URL which appears in the HTML page referred to by BaseInfo (given as an url_info structure) to a complete url_info structure Info. Absolute URLs are translated as with the previous predicate. E.g. url_info_relative("/guu/intro.html", http(’www.foo.com’,80,"/bar/scoob.html"), Info) gives Info = http(’www.foo.com’,80,"/guu/intro.html") url_info_relative("dadu.html", http(’www.foo.com’,80,"/bar/scoob.html"), Info) gives Info = http(’www.foo.com’,80,"/bar/dadu.html"). url_query(Dic,Args ) Translates a list of attribute=value pairs Dic (in the same form as the dictionary returned by get_form_input/1) to a string Args for appending to a URL pointing to a form handler. fetch_url(URL,Request,Response ) Fetches a document from the Internet. URL is the Uniform Resource Locator of the document, given as a url_info structure. Request is a list of options which specify the parameters of the request, Response is a list which includes the parameters of the response. The request parameters available include: head To specify that we are only interested in the header. timeout(Time ) Time specifies the maximum period of time (in seconds) to wait for a response. The predicate fails on timeout. if_modified_since(Date ) Get document only if newer than Date. An example of a structure that represents a date is date(’Tuesday’,15,’January’,1985,’06:14:02’). user_agent(Name ) Provide a user-agent field. authorization(Scheme,Params ) Provides an authentication field when accessing restricted sites. name (Param ) Any other functor translates to a field of the same name (e.g. from(’user@machine’)). The parameters which can be returned in the response list include (see the HTTP/1.0 definition for more information): content(Content ) Returns in Content the actual document text, as a list of characters. status(Type,Code,Phrase ) Gives the status of the response. Type can be any of informational, success, redirection, request_error, server_error or extension_code, Code is the status code and Phrase is a textual explanation of the status. pragma(Data ) Miscellaneous data. message_date(Date ) The time at which the message was sent. location(URL ) The document has moved to this URL. http_server(Server ) Identifies the server responding. allow(methods ) List of methods allowed by the server. last_modified(Date ) Date/time at which the sender believes the resource was last modified. Distributed WWW Programming using (Ciao-)Prolog and the PiLLoW lib 19 expires(Date ) Date/time after which the entity should be considered stale. content_type(Type,Subtype,Params ) Returns the MIME type/subtype of the document. content_encoding(Type ) Encoding of the document (if any). content_length(Length ) Length is the size of the document, in bytes. authenticate(Challenges ) Request for authentication. html2terms(Chars,Terms ) We have already explained how this predicate transforms HTML terms to HTML format. Used the other way around it can parse HTML code, for example retrieved by fetch_url. The resulting list of HTML terms Terms is normalized: it contains only comment/1, declare/1, env/3 and $/2 structures. For example, a simple fetch of a document can be done as follows: url_info(’http://www.foo.com’,UI), fetch_url(UI,[],R), member(content(C),R), html2terms(C, HTML_Terms). Note that if an error occurs (the document does not exist or has moved, for example) this will simply fail. The following call retrieves a document if it has been modified since October 6, 1999: fetch_url(http(’www.foo.com’,80,"/doc.html"), [if_modified_since(’Wednesday’,6,’October’,1999,’00:00:00’)], R). This last one retrieves the header of a document (with a timeout of 10 seconds) to get its last modified date: fetch_url(http(’www.foo.com’,80,"/last_news.html"), [head,timeout(10)],R), member(last_modified(Date),R). The following is a simple application illustrating the use of fetch_url and html2terms. The example defines check_links(URL,BadLinks ). The predicate fetches the HTML document pointed to by URL and scours it to check for links which produce errors when followed. The list BadLinks contains all the bad links found, stored as compound terms of the form: badlink(Link,Error) where Link is the problematic link and Error is the error explanation given by the server. check_links(URL,BadLinks) :url_info(URL,URLInfo), fetch_url(URLInfo,[],Response), member(content_type(text,html,_),Response), member(content(Content),Response), html2terms(Content,Terms), check_source_links(Terms,URLInfo,[],BadLinks). check_source_links([],_,BL,BL). check_source_links([E|Es],BaseURL,BL0,BL) :- 20 D. Cabeza and M. Hermenegildo check_source_links1(E,BaseURL,BL0,BL1), check_source_links(Es,BaseURL,BL1,BL). check_source_links1(env(a,AnchorAtts,_),BaseURL,BL0,BL) :member((href=URL),AnchorAtts), !, check_link(URL,BaseURL,BL0,BL). check_source_links1(env(_Name,_Atts,Env_html),BaseURL,BL0,BL) :- !, check_source_links(Env_html,BaseURL,BL0,BL). check_source_links1(_,_,BL,BL). check_link(URL,BaseURL,BL0,BL) :url_info_relative(URL,BaseURL,URLInfo), !, fetch_url_status(URLInfo,Status,Phrase), ( Status \== success -> name(P,Phrase), name(U,URL), BL = [badlink(U,P)|BL0] ; BL = BL0 ). check_link(_,_,BL,BL). fetch_url_status(URL,Status,Phrase) :fetch_url(URL,[head,timeout(20)],Response), !, member(status(Status,_,Phrase),Response). fetch_url_status(_,timeout,"Timeout"). 10 Providing Code Through the WWW A facility which can be easily built on top of the primitives presented so far is that of “remote WWW modules,” i.e., program modules which reside on the net at a particular HTTP address in the same way that normal program modules reside in a particular location in the local file system. This allows for example always fetching the most recent version of a given library (e.g., PiLLoW) when a program is compiled. For example, the form handler of Section 6.1, if rewritten as #!/usr/local/bin/ciao-shell :- use_module(’http://www.clip.dia.fi.upm.es/lib/pillow.pl’). main(_) :get_form_input(Input), get_form_value(Input,person_name,Name), ... would load the current version of the library each time it is executed. This generalized module declaration is just syntactic sugar, using expand_term, for a document Distributed WWW Programming using (Ciao-)Prolog and the PiLLoW lib 21 www.xxx.yyy <form action="http://www.xxx.yyy/am_inter.cgi"> HTTP Server 2 1 WWW Browser form data 8 3 form reply 4 7 5 Active Module am_inter 6 predicate(Arg1,Arg2,...,ArgN) Fig. 3. The Forms Interface using Active Modules fetch, using fetch_url, followed by a standard use_module declaration. It is obviously interesting to combine this facility with caching strategies. An interesting (and straightforward to implement) additional feature is to fetch remote byte-code (as generally done by use_module), if available, but this is only possible if the two systems use the same byte-code (this can normally be checked easily in the bytecode itself). Also, it may be interesting to combine this type of code downloading with WWW document accesses, so that code is downloaded automatically when a particular document is fetched. This issue is addressed in Section 12. Finally, there are obvious security issues related to downloading code in general, which can be addressed with standard techniques such as security signatures. 11 A High-Level Model of Client-Server Interaction: Active Modules Despite its power, the cgi-bin interface also has some shortcomings. The most serious is perhaps the fact that the handler is started and expected to terminate for each interaction. This has two disadvantages. First, no state is preserved from one query to the next. However, as mentioned before, this can be fixed by passing the state through the form (using hidden fields), by saving it in a temporary file at the server side, by using “cookies”, etc. Second, and more importantly, starting and stopping the application may be inefficient. For example, if the idea is to query a large database or a natural language understanding system, it may take a long time to start and stop the system. In order to avoid this we propose an alternative architecture for cgi-bin applications (a similar idea, although not based on the idea of active modules, has been proposed independently by Ken Bowen (Bowen, 1996)). The basic idea is illustrated in Figure 3. The operation is identical to that of standard form handlers, as illustrated in Figure 2, up to step 3. In this step, the handler started is not the application itself, but rather an interface to the actual application, which is running continuously and thus contains state. Thus, only the 22 D. Cabeza and M. Hermenegildo interface is started and stopped with every transaction. The interface simply passes the form input received from the server (4) to the running application (5) and then forwards the output from the application (6) to the server before terminating, while the application itself continues running. Both the interface and the application can be written in LP/CLP, using the predicates presented. The interface can be a simple script, while the application itself will be typically compiled. An interesting issue is that of communication between interface and application. This can of course be done through sockets. However, as a cleaner and much simpler alternative, the concept of active modules (Cabeza & Hermenegildo, 1995) can be used to advantage in this application. An active module (or an active object, if modularity is implemented via objects) is an ordinary module to which computational resources are attached (for example, a process on a UNIX machine), and which resides at a given (socket) address on the network.5 Compiling an active module produces an executable which, when running, acts as a server for a number of relations, which are the predicates exported by the module. The relations exported by the active module can be accessed by any program on the network by simply “loading” the module and thus importing such “remote relations.” The idea is that the process of loading an active module does not involve transferring any code, but rather setting up things so that calls in the local module are executed as remote procedure calls to the active module, possibly over the network. Except for compiling it in a special way, an active module is identical from the programmer point of view to an ordinary module. Also, a program using an active module imports it and uses it in the same way as any other module, except that it uses “use_active_module” rather than “use_module” (see below). Also, an active module has an address (network address) which must be known in order to use it. The address can be announced by the active module when it is started via a file or a name server (which would be itself another active module with a fixed address). We now present the constructs related to active modules in Ciao: :- use_active_module(Module,Predicates ) A declaration used to import the predicates in the list Predicates from the active module Module . From this point on, the code should be written as if a standard use_module/2 declaration had been used. The declaration needs the following predicate to be accessible from the module. module_address(Module,Address ) This predicate must return in Address the address of Module , for any active module imported in the code. There are a number of standard libraries defining versions of this predicate. save_addr_actmod(Address ) This predicate should define a way to publish Address , to be used in active modules (the name of the active module is taken as the name of the current executable). There are a number of standard libraries defining versions of this predicate, which are in correspondence with the libraries which define versions of the previous predicate. 5 It is also possible to provide active modules via a WWW address. However, we find it more straightforward to simply use socket addresses. In any case, this is generally hidden inside the access method and can be thus made transparent to the user. Distributed WWW Programming using (Ciao-)Prolog and the PiLLoW lib 23 make_actmod(ModuleFile,PublishModule ) Makes an active module executable from the module residing in ModuleFile , using address publish module of name PublishModule . When the executable is run (for example, at the operating system level by “Module &”), a socket is created and the hook predicate save_addr_actmod/1 mentioned above (which is supposed to be defined in PublishModule ) is called in order to export the active module address as required. Then, a standard driver is run to attend network requests for the module exported predicates. Note that the code of ModuleFile does not need to be written in any special way. This scheme is very flexible, allowing to completely configure the way active modules are located. This is accomplished by writing a pair of libraries, one defining the way an active module address is published, and a second defining the way the address of a given active module is found. For example, the Ciao standard libraries include as an example an implementation (libraries filebased_publish and filebased_locate) which uses a directory accessible by all the involved machines (via NFS) to store the addresses of the active modules, and the module_address/2 predicate examines this directory to find the required data. Other solutions provided as examples include posting the address at a WWW address (webbased_publish / webbased_locate), and an implementation of a name server, that is, another active module (this one with a known, fixed address) that records the addresses of active modules and supplies this data to the modules that import it, serving as a contact agency between servers and clients. From the implementation point of view, active modules are essentially daemons: Prolog executables which are started as independent processes at the operating system level. In the Ciao system library, communication with active modules is implemented using sockets (thus, the address of an active module is a UNIX socket in a machine). Requests to execute goals in the module are sent through the socket by remote programs. When such a request arrives, the process running the active module takes it and executes it, returning through the socket the computed results. These results are then taken by the remote processes. Thus, when the compiler finds a use_active_module declaration, it defines the imported predicates as remote calls to the active module. For example, if the predicate P is imported from the active module M , the predicate would be defined as P :- module_address(M,A), remote_call(A,P ) Compiling the following code as an active module, by writing at the Ciao toplevel “make_actmod(phone_db, ’actmods/filebased_publish’)” (or, using the standalone compiler, by executing “ciaoc -a ’actmods/filebased_publish’ phone_db”), creates an executable phone_db which, when started as a process (for example, by typing “phone_db &” at a UNIX shell prompt) saves its address (i.e., that of its socket) in file phone_db.addr and waits for queries from any module which “imports” this module (it also provides a predicate to dynamically add information to the database): :- module(phone_db,[response/2,add_phone/2]). 24 D. Cabeza and M. Hermenegildo response(Name, Response) :form_empty_value(Name) -> Response = ’You have to provide a name.’ ; phone(Name, Phone) -> Response = [’Telephone number of ’,b(Name),’: ’,Phone] ; Response = [’No telephone number available for ’,b(Name),’.’]. add_phone(Name, Phone) :assert(phone(Name, Phone)). :- dynamic phone/2. phone(daniel, ’336-7448’). phone(manuel, ’336-7435’). phone(sacha, ’543-5316’). The following simple script can be used as a cgi-bin executable which will be the active module interface for the previous active module. When started, it will process the form input, issue a call to response/2 (which will be automatically handled by the phone_db active module), and produce a new form before terminating. It will locate the address of the phone_db active module via the module_address/2 predicate defined in library ’actmods/filebased_locate’. #!/usr/local/bin/ciao-shell :- use_active_module(phone_db,[response/2]). :- use_module(library(’actmods/filebased_locate’)). :- include(library(pillow)). main(_) :get_form_input(Input), get_form_value(Input,person_name,Name), response(Name,Response), output_html([ cgi_reply, start, title(’Telephone database’), image(’phone.gif’), heading(2,’Telephone database’), --, Response, $, start_form, ’Click here, enter name of clip member, and press Return:’, Distributed WWW Programming using (Ciao-)Prolog and the PiLLoW lib 25 \\, input(text,[name=person_name,size=20]), end_form, end]). There are many enhancements to this simple schema which, for brevity, are only sketched here. One is to add concurrency to the active module (or whatever means of handling the client-server interaction is being used), in order to handle queries from different clients concurrently. This is easy to do in systems that support concurrency natively, such as Ciao, BinProlog/µ2-Prolog, AKL, Oz, and KL1. We feel that Ciao can offer advantages in this area because it offers compatibility with Prolog and CLP systems while at the same time efficiently supporting concurrent execution of clause goals via local or distributed threads (Carro & Hermenegildo, 1999). Such goals can communicate at different levels of abstraction: sockets/ports, the shared fact database (similarly to a blackboard), or shared variables. BinProlog/µ2Prolog also supports threads, with somewhat different communication mechanisms (Tarau, 1996; De Bosschere, 1989). Finally, as shown in (Szeredi et al., 1996), it is also possible to exploit the concurrency present in or-parallel Prolog systems such as Aurora for implementing a multitasking server. It is also interesting to set up things so that a single active module can handle different forms. This can be done even dynamically (i.e., the capabilities of the active module are augmented on the fly, being able to handle a new form), by designating a directory in which code to be loaded by the active module would be put, the active module consulting the directory periodically to increase its functionalities. Finally, another important issue that has not been addressed is that of providing security, i.e., ensuring that only allowed clients connect to the active module. As in the case of remote code downloading, standard forms of authentication based on codes can be used. 12 Automatic Code Downloading and Local Execution In this section we describe an architecture which, using only the facilities we have presented in previous sections, allows the downloading and local execution of Prolog (or other LP/CLP) code by accessing a WWW address, without requiring a special browser. This is a complementary approach to giving WWW access to an active module in the sense that it provides code which will be executed in the client machine (à la Java). More concretely, the functionality that we desire is that by simply clicking on a WWW pointer, and transparently for the user, remote Prolog code is automatically downloaded in such a way that it can be queried via forms and all the processing is done locally. To allow this, the HTTP server on the server machine is configured to give a specific mime.type (for example application/x-prolog) to the files which will hold WWW-downloadable Prolog code (for example those with a special suffix, like .wpl). On the other side, the browser is configured to start the wpl_handler helper application when receiving data of type application/x-prolog. This wpl_handler 26 D. Cabeza and M. Hermenegildo <form action="http://localhost/wpl_questioner.cgi"> www.xxx.yyy WWW Browser http://www.xxx.yyy/app.wpl form data /tmp/x1349 form reply 1 app.wpl 2 11 wpl_handler /tmp/x1349 7 8 wpl_handler loaded wpl_questioner 3 ? 6 4 10 9 5 FormReply Active Module code FormData answerform(FormData, FormReply) loadcode(’/tmp/x1349’) Fig. 4. Automatic code downloading architecture application is the interface to a Prolog engine which will execute the WWW downloaded code, acting as an active module. We now sketch the procedure (see figure 4): 1. The form that will be used to query the downloaded code (and which we assume already loaded on the browser) contains a link which points to a WWW-aware Prolog code file. Clicking on this link produces the download as explained below. Note that for browsers that can handle multipart/mixed mime types (such as most modern browsers), the form and the code file could alternatively be combined in the same document. However, for brevity, we will only describe the case when they are separate. The handler for the form is specified as the local cgi-bin executable wpl_questioner.cgi. 2. As the server of the file tells the browser that this page is of type application/x-prolog, the browser starts a wpl_handler and passes the file to it (in this example by saving the file in a temporal directory and passing its name). 3. The wpl_handler process checks whether a Prolog engine is currently running for this browser and, if necessary, starts one. This Prolog engine is configured as an active module. 4. Then, through a call to a predicate of the active module “loadcode(File )” the handler asks the active module to read the code. 5. The active module reads the code and compiles it. Distributed WWW Programming using (Ciao-)Prolog and the PiLLoW lib 27 6. wpl_handler waits for the active module to complete the compilation and writes a “done” message to the browser. 7. The browser receives the “done” message. 8. Now, when the “submit” button in the form is pressed, and following the standard procedure for forms, the browser starts a wpl_questioner process, sending it the form data. 9. The wpl_questioner process gets this form data, translates it to a dictionary FormData and passes it to the active module through a call to its exported predicate answerform(FormData,FormReply ). 10. The active module processes this request, and returns in FormReply a WWW page (as a term) which contains the answer to it (and possibly a new form). 11. The wpl_questioner process translates FormReply to raw HTML and gives it back to the browser, dying afterwards. Subsequent queries to the active module can be accomplished either by going back to the previous page (using the “back” button present in many browsers) or, if the answer page contains a new query form, by using it. In any case, the procedure continues at 8. The net effect of the approach is that by simply clicking on a WWW pointer, remote Prolog code is automatically downloaded to a local Prolog engine. Queries posed via the form are answered locally by the Prolog engine. There are obvious security issues that need to be taken care of in this architecture. Again, standard authentication techniques can be used. However, since source code is being passed around, it is comparatively easy to verify that no dangerous predicates (for example, perhaps those that can access files) are executed. Note again that it is also possible to download bytecode, since this is supported by most current LP/CLP systems, using a similar approach. 13 Related Work Previous general purpose work on WWW programming using computational logic systems includes, to the best of our knowledge, the publicly available html.pl library (Cabeza & Hermenegildo, 1996a) and manual, and the LogicWeb system (Loke & Davison, 1996) (the PiLLoW library was also described previously in (Cabeza et al., 1996)). The html.pl library was built by D. Cabeza and M. Hermenegildo, using input from L. Naish’s forms code for NU-Prolog and M. Hermenegildo and F. Bueno’s experiments building a WWW interface to the CHAT80 (Warren & Pereira, 1982) program. It was released as a publicly available WWW library for LP/CLP systems and announced, among other places, in the Internet comp.lang.prolog newsgroup (Cabeza & Hermenegildo, 1996b). The library has since been ported to a large number of systems and adapted by several Prolog vendors, as well as used by different programmers in various institutions. In particular, Ken Bowen has ported the library to ALS Prolog and extended it to provide group processing of forms and an alternative to our use of active modules (Bowen, 1996). The present work is essentially a significant extension of the html.pl library. The main other previous body of work related to general-purpose interfacing of 28 D. Cabeza and M. Hermenegildo logic programming and the WWW that we have knowledge of is the LogicWeb (Loke & Davison, 1996) system, by S.W. Loke and A. Davison. The aim of LogicWeb is to use logic programming to extend the concept of WWW pages, incorporating in them programmable behavior and state. In this, it shares goals with Java. It also offers rich primitives for accessing code in remote pages and module structuring. The aims of LogicWeb are different from those of html.pl/PiLLoW. LogicWeb is presented as a system itself, and its implementation is done through a tight integration with the Mosaic browser, making use of special features of this browser. In contrast, html.pl/PiLLoW is a general purpose library, meant to be used by a general computational logic systems and is browser-independent. html.pl/PiLLoW offers a wide range of functionalities, such as syntax conversion between HTML and logic terms, access predicates for WWW pages, predicates for handling forms, etc., which are generally at a somewhat lower level of abstraction than those of LogicWeb. We believe that using PiLLoW and the ideas sketched in this paper it is possible to add the quite interesting functionality offered by LogicWeb to standard LP and CLP systems. We have shown some examples including access to passive remote code (modules with an ftp or http address) from programs and automatic remote code access and querying using standard browsers and forms. In addition, we have discussed active remote code, where the functionality, rather than the code itself, is exported. More recently, a larger body of work on the topic was presented at the workshop held on the topic of Logic Programming and the Internet at the 1996 Joint International Conference and Symposium on Logic Programming (where also a previous version of this paper was presented). The work presented in (S.W. Loke & Sterling, 1996) is based on LogicWeb, and aims to provide distributed lightweight databases on the WWW. As with the basic LogicWeb system, we believe that the PiLLoW library can be used to implement in other systems the interesting ideas proposed therein. As briefly mentioned before, the work in (Szeredi et al., 1996) proposes an architecture similar to that of our active modules in order to handle form requests. In this solution the handling multiple requests is performed by using or-parallelism. While we feel that and-parallelism (as in &-Prolog’s or Ciao’s threads) is more natural for modeling this kind of concurrency, the ideas proposed are quite interesting. The ECLiPSe HTTP-library (Ph. Bonnet & Thomsen, 1996), aimed at implementing INTERNET agents, offers functionality that is in part similar to that of the Ciao html.pl/PiLLoW libraries, including facilities that are similar to our active modules. The approach is different, however, in several respects. The ECLiPSe library implements special HTTP servers and clients. In contrast, PiLLoW uses standard HTTP servers and interfaces. Using special purpose servers may be interesting because the approach possibly allows greater functionality. On the other hand this approach in general requires either the substitution of the standard server on a given machine or setting the special server at a different socket address from the standard one. The ECLiPSe library also contains functionality that is related to our active modules, although the interface provided is at a lower level. Finally, other papers describing very interesting WWW applications are being presented regularly, which underline the suitability of Distributed WWW Programming using (Ciao-)Prolog and the PiLLoW lib 29 computational logic systems for the task. We believe that the Ciao PiLLoW library can contribute to making it even easier to develop such applications in the future. Additional work on the topic of Logic Programming and the Internet can be found in the proceedings of the workshop sponsored by the CompulogNet research network. The reader is referred to the tutorials and papers presented in these two workshops for more information on a number of applications, other libraries, and topics such as interfacing and compilation from computational logic systems to Java. Examples of Prolog systems interfaced with Java are BinProlog (see http://clement.info.umoncton.ca/BinProlog), Ciao (Bueno et al., 1997), and others (Calejo, 1999). Experimental Prolog to Java compilers have been built both in academia (see for example jProlog at http://www.cs.kuleuven.ac.be/~bmd/PrologInJava/) and Commercially (see for example the IF Prolog tools http://www.ifcomputer.com). This approach is quite attractive, although the results cannot compete in performance with conventional Prolog compilers (it is open for research whether improvements in Java performance or improved Prolog-to-Java compilation technology can bridge the gap). Other commercial work on the topic of interfacing Prolog and the WWW (in addition to that done on the ALS system mentioned above) include the Amzi! Prolog WebLS System (http://www.amzi.com/share.htm ) and the LPA PrologWeb System (http://www.lpa.co.uk ). Recent work using PiLLoW includes the “Web Integrator”(Davulcu et al., 1999) –a webbase system that integrates data from various Web sources, and allows users to query these Web sources as if they were a single database– and WebDB (Cabeza & Hermenegildo, 1998) –a WWW-based database management interface. Also, within the RadioWeb project (Partners, 1997), we have developed (in collaboration with the group of M. Codish at Ben Gurion University) a constraint-based language for describing WWW page layout and style rules and an engine which, by interpreting these rules, can generate WWW sites which dynamically adapt to parameters such as user characteristics (Cederberg & CLIP Group, 1999). Additional applications developed with the PiLLoW library can be accessed from the PiLLoW WWW site (see later). A page with pointers to the proceedings of the previously mentioned workshops, as well as other information (including technical reports and tutorial) regarding the topic of Logic Programming, Constraint Programming, and the Internet is maintained at http://www.clip.dia.fi.upm.es/lpnet/. 14 Conclusions and Future Work We have discussed from a practical point of view a number of issues involved in writing Internet and WWW applications using LP/CLP systems. In doing so, we have described PiLLoW, an Internet/WWW programming library for LP/CLP systems. PiLLoW provides facilities for generating HTML/XML structured documents, producing HTML forms, writing form handlers, processing HTML/XML templates, accessing and parsing WWW documents, and accessing code posted at HTTP addresses. We have also described the architecture of some application 30 D. Cabeza and M. Hermenegildo classes, including automatic code downloading, using a high-level model of clientserver interaction, active modules. Finally we have also described an architecture for automatic LP/CLP code downloading for local execution, using generic browsers. We believe that the Ciao PiLLoW library can ease substantially the process of developing WWW applications using computational logic systems. We have recently developed several extensions to the library (for example, for setting and getting “cookies”), and sample applications which make extensive use of concurrency (on those LP/CLP systems that support it) to overlap network requests. We have also developed a complementary library for interfacing Prolog with the Virtual Reality Modeling Language VRML (Smedbäck et al., 1999). In addition to being included as part of the Ciao system, the PiLLoW library is provided as a standard, standalone public domain library for SICStus Prolog and other Prolog and CLP systems, supporting most of its functionality. Please contact the authors or consult our WWW site http://www.clip.dia.fi.upm.es and the PiLLoW page at http://www.clip.dia.fi.upm.es/Software/pillow/pillow.html for download details and an up-to-date online version of the PiLLoW manual. The Ciao Prolog system is also freely available from http://www.clip.dia.fi.upm.es and http://www.ciaoprolog.org. Acknowledgments The authors would like to thank Lee Naish, Mats Carlsson, Tony Beaumont, Ken Bowen, Michael Codish, Markus Fromherz, Paul Tarau, Andrew Davison, and Koen De Bosschere for useful feedback on previous versions of this document and the PiLLoW code. The first versions of the Ciao system and the html.pl library were developed under partial support from the ACCLAIM ESPRIT project. Subsequent development has occurred in the context of MCYT projects “ELLA” and “EDIPIA” (MCYT TIC99-1151), ESPRIT project RADIOWEB, and NSF/CICYT collaboration “ECCOSIC” (Fulbright 98059). References Berners-Lee, T., Cailliau, R., Luotonen, A., Nielsen, H.F., & Secret, A. (1994). The World-Wide Web. Communications of the ACM, 37(8), 76–82. Bowen, K. 1996 (March). Personal communication. Available from http://www.als.com/als/html_pl.html. Bueno, F., Cabeza, D., Carro, M., Hermenegildo, M., López-Garcı́a, P., & Puebla, G. 1997 (August). The Ciao Prolog System. Reference Manual. The Ciao System Documentation Series–TR CLIP3/97.1. School of Computer Science, Technical University of Madrid (UPM). Cabeza, D., & Hermenegildo, M. (1995). Distributed Concurrent Constraint Execution in the CIAO System. Proc. of the 1995 compulog-net workshop on parallelism and implementation technologies. Utrecht, NL: U. Utrecht / T.U. Madrid. Available from http://www.clip.dia.fi.upm.es/. Cabeza, D., & Hermenegildo, M. 1996a (March). html.pl: An HTML package for (C)LP systems. Spain. Available from http://www.clip.dia.fi.upm.es/miscdocs/. Distributed WWW Programming using (Ciao-)Prolog and the PiLLoW lib 31 Cabeza, D., & Hermenegildo, M. 1996b (February). LP/CLP HTML and WWW interface publicly available. Posting in comp.lang.prolog. Available from http://www.clip.dia.fi.upm.es/. Cabeza, D., & Hermenegildo, M. 1997 (April). WWW Programming using Computational Logic Systems (and the PiLLoW/Ciao Library). Proceedings of the workshop on logic programming and the WWW at WWW6. Cabeza, D., & Hermenegildo, M. 1998 (June). A WWW Database Management Interface for Prolog. Technical Report CLIP2/98.0. School of Computer Science, Technical University of Madrid (UPM), Facultad Informática UPM, 28660-Boadilla del Monte, Madrid-Spain. Cabeza, D., Hermenegildo, M., & Varma, S. 1996 (September). The PiLLoW/Ciao Library for INTERNET/WWW Programming using Computational Logic Systems. Proceedings of the 1st workshop on logic programming tools for internet applications. Available from http://clement.info.umoncton.ca/~lpnet. Calejo, M. (1999). Java+prolog: A land of opportunities. Pages 1–2 of: Proceedings of the first international conference on the practical application of constraint technologies and logic programming. The Practical Application Company Ltd. Also available at http://dev.servisoft.pt/interprolog/paclp99/default.htm. Carlsson, M. 1988 (February). Sicstus Prolog User’s Manual. Po Box 1263, S-16313 Spanga, Sweden. Carro, M., & Hermenegildo, M. (1999). Concurrency in Prolog Using Threads and a Shared Database. Pages 320–334 of: 1999 international conference on logic programming. MIT Press, Cambridge, MA, U.S.A. Cederberg, Per, & CLIP Group, The. 1999 (June). Flexible Layout and Styling – The LaSt Language. Technical Report D2.2.M3 CLIP 3/99.0. RADIOWEB Project. Chikayama, T., Fujise, T., & Sekita, D. (1994). A Portable and Efficient Implementation of KL1. Tick, Evan (ed), Proc. of the 1994 icot/nsf workshop on parallel and concurrent programming. U. of Oregon. Colmerauer, A. (1975). Les gramaire de metamorphose. Tech. rept. Univ. D’aix-Marseille, Groupe De Ia. Colmerauer, A. (1990). An Introduction to Prolog III. Communications of the ACM, 28(4), 412–418. Davulcu, Hasan, Freire, Juliana, Kifer, Michael, & Ramakrishnan, I.V. 1999 (June). A layered architecture for querying dynamic web content. ACM SIGMOD international conference on management of data. URL: http://www.acm.org/sigmod/sigmod99/eproceedings/. De Bosschere, K. (1989). Multi–Prolog, Another Approach for Parallelizing Prolog. Pages 443–448 of: Proceedings of parallel computing. Elsevier, North Holland. ECRC. (1993). Eclipse user’s guide. European Computer Research Center. Grobe, M., & Naseer, Hasan. 1998 (July). An instantaneous introduction to CGI scripts and HTML forms. Available from http://www.cc.ukans.edu/~acs/docs/other/forms-intro.shtml. Hermenegildo, M. 1996 (April). Writing “Shell Scripts” in SICStus Prolog. Posting in comp.lang.prolog. Available from http://www.clip.dia.fi.upm.es/. Hermenegildo, M., & CLIP Group, The. (1994). Some Methodological Issues in the Design of CIAO - A Generic, Parallel, Concurrent Constraint System. Pages 123–133 of: Principles and practice of constraint programming. LNCS, no. 874. Springer-Verlag. Hermenegildo, M., Bueno, F., Garcı́a de la Banda, M., & Puebla, G. 1995a (December). The CIAO Multi-Dialect Compiler and System: An Experimentation Workbench for 32 D. Cabeza and M. Hermenegildo Future (C)LP Systems. Proceedings of the ilps’95 workshop on visions for the future of logic programming. Available from http://www.clip.dia.fi.upm.es/. Hermenegildo, M., Cabeza, D., & Carro, M. (1995b). Using Attributed Variables in the Implementation of Concurrent and Parallel Logic Programming Systems. Pages 631– 645 of: Proc. of the twelfth international conference on logic programming. MIT Press. Hermenegildo, M., Bueno, F., Cabeza, D., Carro, M., M. Garcı́a de la Banda, LópezGarcı́a, P., & Puebla, G. (1999a). The CIAO Multi-Dialect Compiler and System: An Experimentation Workbench for Future (C)LP Systems. Pages 65–85 of: Parallelism and Implementation of Logic and Constraint Logic Programming. Commack, NY, USA: Nova Science. Hermenegildo, M., Puebla, G., & Bueno, F. (1999b). Using Global Analysis, Partial Specifications, and an Extensible Assertion Language for Program Validation and Debugging. Pages 161–192 of: Apt, K. R., Marek, V., Truszczynski, M., & Warren, D. S. (eds), The Logic Programming Paradigm: a 25–Year Perspective. Springer-Verlag. Jaffar, Joxan, & Lassez, Jean-Louis. (1987). Constraint Logic Programming. Pages 111– 119 of: ACM symposium on principles of programming languages. ACM. Janson, S., & Haridi, S. (1991). Programming Paradigms of the Andorra Kernel Language. Pages 167–183 of: 1991 international logic programming symposium. MIT Press. Kowalski, R. A. (1974). Predicate Logic as a Programming Language. Pages 569–574 of: Proceedings ifips. Loke, S.W., & Davison, A. (1996). Logic programming with the World-Wide Web. Pages 235–245 of: 7th. ACM Conference on Hypertext. ACM Press. Available from http://www.cs.unc.edu/~barman/HT96/P14/lpwww.html. M. Dincbas, H. Simonis, & Van Hentenryck, P. (1990). Solving Large Combinatorial Problems in Logic Programming. Journal of logic programming, 8(1 & 2), 72–93. Partners, The RADIOWEB Project. 1997 (July). RADIOWEB EP25562: Automatic Generation of Web Sites for the Radio Brodcasting Industry – Project Description / Technical Annex. Technical Report. RADIOWEB Project. Ph. Bonnet, S. Bressan, L. Leth, & Thomsen, B. 1996 (September). Towards ECLiPSe Agents on the INTERNET. Proceedings of the 1st workshop on logic programming tools for internet applications. Available from http://clement.info.umoncton.ca/~lpnet/lpnet2.html. Smedbäck, G., Carro, M., & Hermenegildo, M. (1999). Interfacing Prolog and VRML and its Application to Constraint Visualization. Pages 453–471 of: The practical application of constraint technologies and logic programming. The Practical Application Company. Smolka, G. 1994 (November). The Definition of Kernel Oz. DFKI Oz documentation series. German Research Center for Artificial Intelligence (DFKI). S.W. Loke, A. Davison, & Sterling, L. 1996 (September). Lightweight Deductive Databases on the World-Wide Web. Proceedings of the 1st workshop on logic programming tools for internet applications. Available from http://clement.info.umoncton.ca/~lpnet/lpnet10.html. Szeredi, Péter, Molnár, Katalin, & Scott, Rob. 1996 (September). Serving Multiple HTML Clients from a Prolog Application. Proceedings of the 1st workshop on logic programming tools for internet applications. Available from http://clement.info.umoncton.ca/~lpnet/lpnet9.html. Tarau, P. 1996 (April). Binprolog 5.00. Posting in comp.lang.prolog. Available from http://clement.info.umoncton.ca/~tarau. Van Hentenryck, P. (1989). Constraint Satisfaction in Logic Programming. MIT Press. Warren, D.H.D., & Pereira, F. C. N. (1982). An Efficient, Easily Adaptable System For Distributed WWW Programming using (Ciao-)Prolog and the PiLLoW lib 33 Interpreting Natural Language Queries. American journal of computational linguistics, 8(3-4), 110–122.
2cs.AI
Porcellio scaber algorithm (PSA) for solving constrained optimization problems Yinyan Zhang1 ,⋆ , Shuai Li1 ,⋆⋆ , and Hongliang Guo2 ,⋆⋆⋆ arXiv:1710.04036v1 [cs.NE] 11 Oct 2017 1 Department of Computing, The Hong Kong Polytechnic University, Hong Kong, China Center for Robotics, School of Automation Engineering, University of Electronic Science and Technology of China, Chengdu, China 2 Abstract. In this paper, we extend a bio-inspired algorithm called the porcellio scaber algorithm (PSA) to solve constrained optimization problems, including a constrained mixed discrete-continuous nonlinear optimization problem. Our extensive experiment results based on benchmark optimization problems show that the PSA has a better performance than many existing methods or algorithms. The results indicate that the PSA is a promising algorithm for constrained optimization. 1 Introduction Modern optimization algorithms may be roughly classified into deterministic optimization algorithms and stochastic ones. The former is theoretically sound for well-posed problems but not efficient for complicated problems. For example, when it comes to nonconvex or large-scale optimization problems, deterministic algorithms may not be a good tool to obtain a globally optimal solution within a reasonable time due to the high complexity of the problem. Meanwhile, while stochastic ones may not have a strong theoretical basis, they are efficient in engineering applications and have become popular in recent years due to their capability of efficiently solving complex optimization problems, including NP-hard problems such as the travelling salesman problem. Bio-inspired algorithms take an important role in stochastic algorithms for optimization. These algorithms are designed based on the observations of animal behaviors. For example, one of the well known bio-inspired algorithm called particle swarm optimization initially proposed by Kennedy and Eberhart [1] is inspired by the social foraging behavior of some animals such as the flocking behavior of birds. There are some widely used benchmark problems in the field of stochastic optimization. The pressure vessel design optimization problem is an important benchmark problem in structural engineering optimization [2]. The problem is a constrained mixed discrete-continuous nonlinear optimization problem. In recent years, many bioinspired algorithms have been proposed to solve the problem [3–6]. The widely used benchmark problems also include a nonlinear optimization problem proposed by Himmelblau [7]. ⋆ e-mail: [email protected] ⋆⋆ e-mail: [email protected] ⋆⋆⋆ e-mail: [email protected] Recently, a novel bio-inspired algorithm called the porcellio scaber algorithm (PSA) has been proposed by Zhang and Li [8], which is inspired by two behaviors of porcellio scaber. In this paper, we extend the result in [8] to solve constrained optimization problems. As the original algorithm proposed in [8] deals with the case without constraints, we provide some improvements for the original PSA so as to make it capable of solving constrained optimization problems. Then, we compare the corresponding experiment results with reported ones for the aforementioned benchmark problems as case studies. Our extensive experiment results show that the PSA has much better performance in solving optimization problems than many existing algorithms. Before ending this introductory section, the main contributions of this paper are listed as follows: 1)We extend the PSA to solve constrained optimization problems, including the constrained mixed discretecontinuous nonlinear optimization problem. 2)We show that the PSA is better than many other existing algorithms in solving constrained optimization problems by extensive numerical experiments. 2 Problem Formulation The constrained optimization problem (COP) considered in this paper is presented as follows: minimize fˇ(x), subject to g j (x) ≤ 0, li ≤ xi ≤ ui , (1) with i = 1, 2, · · · , d and j = 1, 2, · · · , m, where x = [x1 , x2 , · · · , xd ]T is a d-dimension decision vector; li and ui are the corresponding lower bound and upper bound of the ith decision variable; fˇ(x) : Rd → R is the cost function Algorithm 1 Original PSA Cost function f (x), x = [x1 , x2 , · · · , xd ]T Generate initial position of porcellio scaber x0i (i = 1, 2, · · · , N) Environment condition Ex at position x is determined by f (x) Set weighted parameter λ for decision based on aggregation and the propensity to explore novel environments Initialize f∗ to an extremely large value Initialize each element of vector x∗ ∈ Rd to an arbitrary value while k < MaxS tep do Get the position with the best environment condition, i.e., xb = arg minxkj { f (xkj )} at the current time among the group of porcellio scaber if minxkj { f (xkj )} < f∗ then x∗ = xb f∗ = minxkj { f (xkj )} end if Randomly chose a direction τ = [τ1 , τ2 , · · · , τd ]T to detect Detect the best environment condition min{Ex } and worst environment condition max{Ex } at position xki + τ for i = 1 : N all N porcellio scaber for i = 1 : N all N porcellio scaber do Determine the difference with respect to the position to aggregate i.e., xki − arg minxkj { f (xkj )}) Determine where to explore, i.e., pτ Move to a new position according to (2) end for end while Output x∗ and the corresponding function value f∗ Visualization to be minimized. For the case that the problem is convex, there are many standard algorithms to solve the problem. However, for the case that the problem is not convex, the problem is difficult to solve. 3 Algorithm Design where λ ∈ (0, 1), τ is a vector with each element being a random number, and p is defined as follows: p= f (xki + τ) − min{ f (xki + τ)} max{ f (xki + τ)} − min{ f (xki + τ)} Evidently, the original PSA does not take constraints into consideration. Thus, it cannot be directly used to solve COPs. 3.2 Inequality constraint conversion In this subsection, we provide some improvements for the original PSA and make it capable of solving COPs. As the original PSA focuses on solving unconstrained problem, we first incorporate the inequality constraints g j (x) ≤ 0 ( j = 1, 2, · · · , m) into the cost function. To this end, the penalty method is used, and a new cost function is obtained as follows: fˇ(x) = f (x) + γ m X g2i (x)h(gi(x)), 3.1 Original PSA For the sake of understanding, the original PSA is given in algorithm 1 [8], which aims at solving unconstrained optimization problems of the following form: minimize f (x), where x is the decision vector and f is the cost function to be minimized. The main formula of the original PSA is given as follows [8]: xik+1 = xki − (1 − λ)(xki − arg min{ f (xkj )}) + λpτ, xkj (2) (3) i=1 where h(gi (x)) is defined as    1, if gi (x) > 0, h(gi (x)) =   0, if gi (x) ≤ 0, and γ ≫ 1 is the penalty parameter. By using a large enough value of γ (e.g., 1012 ), unless all the inequality constraints gi (x) ≤ 0 (i = 1, 2, · · · , m) are satisfied, PN 2 the term γ i=1 gi (x)h(gi(x)) takes a dominant role in the cost function. On the other hand, when all the inequality constraints gi (x) ≤ 0 (i = 1, 2, · · · , m) are satisfied, h(gi (x)) = 0, ∀i, and thus fˇ(x) = f (x). 3.3 Addressing simple bounds In terms of the simple bounds l j ≤ x j ≤ u j with j = 1, 2, · · · , d, they are handled via two methods. Firstly, to satisfy the simple bounds, the initial position of each porcellio scaber is set via the following formula: x0i, j = l j + (u j − l j ) × rand(0, 1) In this section, we modify the original PSA [8] and provide an improved PSA for solving COPs. . (4) where x0i, j denotes the initial value of the jth variable of the position vector of the ith (with i = 1, 2, · · · , N) porcellio scaber; rand(0, 1) denotes a random number in the region (0, 1), which can be realized by using the rand function in Matlab. The formula (4) guarantees that the initial positions of all the porcellio scaber satisfy the the simple bounds l j ≤ x j ≤ u j with j = 1, 2, · · · , d. Secondly, if the positions of all the porcellio scaber are updated according to (2) by replacing f (x) with fˇ(x) defined in (3) for the constrained optimization problem (1), then the updated values of the position vector xki may violate the simple bound constraints. To handle this issue, based on (2), a modified evolution rule is proposed as follows: xik+1 = PΩ (xki − (1 − λ)(xki − arg min{ fˇ(xkj )}) − λpτ), (5) xkj Algorithm 2 Algorithm for the evaluation of PΩ (x) with x = [x1 , x2 , · · · , xd ]T for i = 1 : d do if x1 < li then xi = li end if if xi > ui then xi = u i end if end for return y = [x1 , x2 , · · · , xd ]T Figure 1. A diagram showing the design parameters of a pressure vessel [9]. where λ ∈ (0, 1), τ is a vector with each element being a random number, and p= fˇ(xki + τ) − min{ fˇ(xki + τ)} . max{ fˇ(xk + τ)} − min{ fˇ(xk + τ)} i i Besides, PΩ is a projection function and make the updated position satisfy the simple bound constraints, where Ω = {x ∈ Rd |li ≤ xi ≤ ui , i = 1, 2 · · · , d}. The mathematical definition of PΩ (x) is PΩ (x) = arg miny∈Ω ky − xk2 with k · k2 denoting the Euclidean norm. The algorithm for the evaluation of PΩ (x) is given in Algorithm 2. Algorithm 3 PSA for COPs Cost function fˇ(x) as defined in (3), x = [x1 , x2 , · · · , xd ]T Generate initial position of porcellio scaber x0i (i = 1, 2, · · · , N) according to (4) Environment condition Ex at position x is determined by fˇ(x) Set weighted parameter λ for decision based on aggregation and the propensity to explore novel environments Set penalty parameter γ in fˇ(x) to a large enough value Initialize f∗ to an extremely large value Initialize each element of vector x∗ ∈ Rd to an arbitrary value while k < MaxS tep do Get the position with the best environment condition, i.e., xb = arg minxkj { f (xkj )} at the current time among the group of porcellio scaber if minxkj { f (xkj )} < f∗ then x∗ = xb f∗ = minxkj { f (xkj )} end if Randomly chose a direction τ = [τ1 , τ2 , · · · , τd ]T to detect Detect the best environment condition min{Ex } and worst environment condition max{Ex } at position xki + τ for i = 1 : N all N porcellio scaber for i = 1 : N all N porcellio scaber do Determine the difference with respect to the position to aggregate i.e., xki − arg minxkj { f (xkj )}) Determine where to explore, i.e., pτ Move to a new position according to (5) where PΩ (x) is evaluated via Algorithm 2 end for end while Output x∗ and the corresponding function value f∗ Visualization 3.4 PSA for COPs Based on the above modifications, the resultant PSA for solving COPs is given in Algorithm 3. In the following section, we will use some benchmark problems to test the performance of the PSA in solving COPs. 4 Case Studies In this section, we present experiment results regarding using the PSA for solving COPs. 4.1 Case I: Pressure vessel problem In this subsection, the pressure vessel problem is considered. The pressure vessel problem is to find a set of four design parameters, which are demonstrated in Fig. 1, to minimize the total cost of a pressure vessel considering the cost of material, forming and welding [1]. The four design parameters are the inner radius R, and the length L of the cylindrical section, the thickness T h of the head, the thickness T s of the body. Note that, T s and T h are integer multiples of 0.0625 in., and R and L are continuous variables. Table 1. Comparisons of best results for the pressure vessel problem [4] [9] [3] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] PSA x1 x2 x3 x4 g1 (x) g2 (x) g3 (x) g4 (x) f (x) 0.8125 0.7782 0.8125 1.125 1.125 1.125 0.8125 0.9375 1.125 0.8125 1.000 0.8125 1 0.8125 0.8125 0.4375 0.3846 0.4375 0.625 0.625 0.625 0.4375 0.5000 0.625 0.4375 0.625 0.4375 0.625 0.4375 0.4375 42.0984 40.3196 42.0984 58.2789 48.97 58.1978 40.3239 48.3290 58.291 41.9768 51.000 42.0870 51.2519 42.0984 42.0952 176.6366 200.000 176.6366 43.7549 106.72 44.2930 200.0000 112.6790 43.690 182.2845 91.000 176.7791 90.9913 176.6378 176.8095 8.00e-11† -3.172e-5 8.00e-11† -0.0002 -0.1799 -0.00178 -0.034324 -0.0048 0.000016 -0.0023 -0.0157 -2.210e-4 -1.011 -8.8000e-7 -6.2625e-5 -0.0359 4.8984e-5† -0.0359 -0.06902 -0.1578 -0.06979 -0.05285 -0.0389 -0.0689 -0.0370 -0.1385 -0.03599 -0.136 -0.0359 -0.0359 -2.724e-4 1.3312† -2.724e-4 -3.71629 97.760 -974.3 -27.10585 -3652.877 -21.2201 -22888.07 -3233.916 -3.51084 -18759.75 -3.5586 -738.7348 -63.3634 -40 -63.3634 -196.245 -132.28 -195.707 -40.0000 -127.3210 -196.3100 -57.7155 -149 -63.2208 -149.009 -63.3622 -63.1905 6059.7143 5885.33 6059.7143 7198.433 7980.894 7207.494 6288.7445 6410.3811 7198.0428 6171.000 7079.037 6061.1229 7172.300 6059.7258 6063.2118 † means that the corresponding constraint is violated. Algorithm 4 Algorithm for PΩ (x = [x1 , x2 , x3 , x4 ]T ) in the pressure vessel problem y1 = round(x1 /0.0625) × 0.0625 if y1 < 0.0625 then y1 = 0.0625 end if if y1 > 99 × 0.0625 then y1 = 99 × 0.0625 end if y2 = round(x2 /0.0625) × 0.0625 if y2 < 0.0625 then y2 = 0.0625 end if if y2 > 99 × 0.0625 then y2 = 99 × 0.0625 end if if x3 < 10 then y3 = 10 end if if x3 > 200 then y3 = 200 end if if x4 < 10 then y4 = 10 end if if x4 > 200 then y4 = 200 end if return y = [y1 , y2 , y3 , y4 ]T Let x = [x1 , x2 , x3 , x4 ]T = [T s , T h , R, L]T . The pressure vessel problem can be formulated as follows [9]: minimize f (x) = 0.6224x1 x3 x4 + 1.7781x2 x23 + 3.1661x21 x4 + 19.84x21 x3 , subject to g1 (x) = −x1 + 0.0193x3 ≤ 0, g2 (x) = −x2 + 0.00954x3 ≤ 0, 4 g3 (x) = −πx23 x4 − πx33 + 1296000 ≤ 0, 3 g4 (x) = x4 − 240 ≤ 0, Evidently, this problem has a nonlinear cost function, three linear and one nonlinear inequality constraints. Besides, there are two discrete and two continuous design variables. Thus, the problem is relatively complicated. As this problem is a mixed discrete-continuous optimization, the projection function PΩ (x) is slightly modified and presented in Algorithm 4. Besides, the initialization of the initial positions of porcellio scaber is modified as follows: x0i,1 = 0.0625 + f loor((99 − 1) × rand) × 0.0625, x0i,2 = 0.0625 + f loor((99 − 1) × rand) × 0.0625, x0i,3 = 10 + f loor(200 − 10) × rand, x0i,4 = 10 + f loor(200 − 10) × rand, where x0i, j denotes the jth variable of the position vector of the ith porcellio scaber; f loor(y) = argminx∈{0,1,2,··· } {x + 1 > y}, i.e., the f loor function obtains the integer part of a real number; rand denotes a random number in the region (0, 1). The functions f loor and rand are available at Matlab. The best result we obtained using the PSA in 1000 instances of executions and those by using various existing algorithms or methods for solving this problem are listed in Table 1. Note that, in the experiments, 40 porcellio scaber are used, the parameter λ is set to 0.6, and the MaxS tep is set to 100000 with τ being a zero-mean random number with the standard deviation being 0.1. As seen from Table 1, the best result obtained by using the PSA is better than most of the existing results. Besides, the difference between the best function value among all the ones in the table and the best function value obtained via using the PSA is quite small. 4.2 Case II: Himmelblau’s nonlinear optimization problem In this subsection, we consider a nonlinear optimization problem proposed by Himmelblau [7]. This problem is Table 2. Comparisons of best results for Himmelblau’s nonlinear optimization problem [21] [22] [23] [7] [24] PSA x1 x2 x3 x4 x5 g1 (x) g2 (x) g3 (x) f (x) 78.0 78.00 81.4900 78.6200 78.00 79.9377 33.0 33.00 34.0900 33.4400 33.00 33.8881 27.07997 29.995 31.2400 31.0700 29.995256 28.5029 45.0 45.00 42.2000 44.1800 45.00 41.3052 44.9692 36.776 34.3700 35.2200 36.775813 41.7704 92.0000 90.7147 90.5225 90.5208 92 91.6157 100.4048 98.8405 99.3188 98.8929 98.8405 100.4943 20.0000 19.9999† 20.0604 20.1316 20 20.0055 -31025.5602 -30665.6088 -30183.576 -30373.949 -30665.54 -30667.8113 † means that the corresponding constraint is violated. also one of the well known benchmark problems for bioinspired algorithms. The problem is formally described as follows [7]: minimize f (x) =5.3578547x23 + 0.8356891x1 x5 + 37.29329x1 − 40792.141, subject to g1 (x) =85.334407 + 0.0056858x2 x5 + 0.00026x1 x4 − 0.0022053x3 x5 , g2 (x) =80.51249 + 0.0071317x2 x5 + 0.0029955x1 x2 + 0.0021813x23, g3 (x) =9.300961 + 0.0047026x3 x5 + 0.0012547x1 x3 + 0.0019085x3 x4 , 0 ≤ g1 (x) ≤ 92, 90 ≤ g2 (x) ≤ 110, 20 ≤ g3 (x) ≤ 25, 78 ≤ x1 ≤ 102, 33 ≤ x2 ≤ 45, 27 ≤ x3 ≤ 45, 27 ≤ x4 ≤ 45, 27 ≤ x5 ≤ 45, with x = [x1 , x2 , x3 , x4 , x5 ]T being the decision vector. In this problem, each double-side nonlinear inequality can be represented by two single-side nonlinear inequality constraints. For example, the constraint 90 ≤ g2 (x) ≤ 110 can be replaced by the following two constraints: −g2 (x) ≤ −90, g2 (x) ≤ 110. Thus, this problem can also be solved by the PSA proposed in this paper. The best result we obtained via using the PSA in 1000 instances of executions, together with the result obtained by other algorithms or methods, is listed in Table 2. In the experiments, 40 porcellio scaber are used, the parameter λ is set to 0.6, and the MaxS tep is set to 100000 with τ being a zero-mean random number with the standard deviation being 0.1. Evidently, the best result generated by the PSA is ranked No. 2 among all the results in Table 2. By the above results, we conclude that the PSA is a relatively promising algorithm for solving constrained optimization problems. The quite smalle performance difference between the PSA and the best one may be the result of the usage of the penalty method with a constant penalty parameter. 5 Conclusions In this paper, the bio-inspired algorithm PSA has been extended to solve nonlinear constrained optimization problems by using the penalty method. Case studies have validated the efficacy and superiority of the resultant PSA. The results have indicated that the PSA is a promising algorithm for solving constraint optimization problems. There are several issues that requires further investigation, e.g., how to select a best penalty parameter that not only guarantees the compliance with constraints but also the optimality of the obtained solution. Besides, how to enhance the efficiency of the PSA is also worth investigating. Acknowledgement This work is supported by the National Natural Science Foundation of China (with numbers 91646114, 61370150, and 61401385), by Hong Kong Research Grants Council Early Career Scheme (with number 25214015), and also by Departmental General Research Fund of Hong Kong Polytechnic University (with number G.61.37.UA7L). References [1] J. Kennedy and R. Eberhart, “Particle swarm optimization,” in Proc. IEEE Int. Conf. Neural Netw., 1995, 1942–1948. [2] A. H. Gandomi, X. Y. Yang, “Benchmark problems in structural optimization,” in Computational Optimization Methods And Algorithms, Berlin: Springer-Verlag, 2011, pp. 259–281. [3] S. He , E. Prempain, and Q. H. Wu, “An improved particle swarm optimizer for mechanical design optimization problems,” Eng. Opt., vol. 36, no. 5, pp. 585–605, 2004. [4] A. H. Gandomi, X. S. Yang, and A. H. Alavi, “Cuckoo search algorithm: A metaheuristic approach to solve structural optimization problems,” Eng. Comput., vol. 29, pp. 17–35, 2013. [5] O. Pauline, H. C. Sin, D. D. C. V. Sheng, S. C. Kiong, and O. K. M., “Design optimization of structural engineering problems using adaptive cuckoo search algorithm,” in Proc. 3rd Int. Conf. Control Autom. Robot., 2017, pp. 745–748. [6] V. Garg and K. Deep, “Effectiveness of constrained laplacian biogeography based optimization for solving structural engineering design problems,” in Proc. 6th Int. Conf. Soft. Comput. Problem Solv., 2017, pp. 206– 219. [7] D. Himmelblau, Applied Nonlinear Programming, New York: McGraw-Hill, 1972. [8] Y. Zhang and S. Li, “PSA: A novel optimization algorithm based on survival rules of porcellio scaber,” Available at https://arxiv.org/abs/1709.09840. [9] X. S. Yang, “Firefly algorithm, stochastic test functions and design optimisation,” Int. J. Bio-Inspired Comp., vol. 2, no. 2, pp. 2, pp. 78–84, 2010. [10] K. S. Lee and Z. W. Geem, “A new meta-heuristic algorithm for continuous engineering optimization: Harmony search theory and practice,” Comput. Methods Appl. Mech. Engrg., vol. 194, pp. 3902–3933, 2005. [11] E. Sandgren, “Nonlinear integer and discrete programming in mechanical design optimization,” J. Mech. Des. ASME, vol. 112, 223–229, 1990. [12] S. J. Wu and P. T. Chow, “Genetic algorithms for nonlinear mixed discrete-integer optimization problems via meta-genetic parameter optimization,” Engrg. Optim., vol. 24, 137–159, 1995. [13] C. A. C. Coello, “Use of a self-adaptive penalty approach for engineering optimization problems,” Comput. Ind., vol. 41, no. 2, pp. 113–127, 2000. [14] K. Deb, “GeneAS: a robust optimal design technique for mechanical component design”, in: D. Dasgupta, Z. Michalewicz Eds., Evolutionary Algorithms in Engineering Applications, Springer-Verlag, Berlin, 1997, pp. 497–514. [15] B. K. Kannan and S. N. Kramer, “An augmented Lagrange multiplier based method for mixed integer discrete continuous optimization and its applications to mechanical design,” J. Mecha. Design, Trans. ASME, vol. 116, pp. 318–320, 1994. [16] S. Akhtar, K. Tai, T. Ray, “A socio-behavioural simulation model for engineering design optimization,” Eng. Optmiz., vol. 34, no. 4, pp. 341–354, 2002. [17] J. F. Tsai, H. L. Li, and N. Z. Hu, “Global optimization for signomial discrete programming problems in engineering design,” Eng. Optmiz. no. 34, no. 6, pp. 613–622, 2002. [18] C. A. C. Coello and N. C. Corteś, “Hybridizing a genetic algorithm with an artificial immune system for global optimization,” Eng. Optmiz., vol. 36, no. 5, pp. 607–634, 2004. [19] H. L. Li and C. T. Chou, “A global approach for nonlinear mixed discrete programming in design optimization,” Eng. Optmiz. vol. 22, pp. 109–122 1994. [20] A. Kaveh and S. Talatahari, “An improved ant colony optimization for constrained engineering design problems,” Eng. Comput. vol. 27, no. 1, pp. 155–182, 2010. [21] G. H. M. Omran and A. Salman, “Constrained optimization using CODEQ,” Chaos Soliton. Fract., vol. 42, pp. 662–668, 2009. [22] A. Homaifar, S. Lai, X. Qi, “Constrained optimization via genetic algorithms,” Simulation, vol. 62, no. 4, pp. 242–253, 1994. [23] M. Gen and R. Cheng, Genetic Algorithms and Engineering Design, Wiley, New York, 1997. [24] G. G. Dimopoulos, “Mixed-variable engineering optimization based on evolutionary and social metaphors,” Comput. Method. Appl. Mech. Eng., vol. 196, pp. 803–817, 2007.
9cs.NE
Logical Methods in Computer Science Vol. 2 (3:3) 2006, pp. 1–22 www.lmcs-online.org Submitted Published Dec. 16, 2005 Jul. 27, 2006 RELATIONAL PARAMETRICITY AND CONTROL MASAHITO HASEGAWA Research Institute for Mathematical Sciences, Kyoto University, Kyoto 606-8502 Japan, and PRESTO, Japan Science and Technology Agency e-mail address: [email protected] Abstract. We study the equational theory of Parigot’s second-order λµ-calculus in connection with a call-by-name continuation-passing style (CPS) translation into a fragment of the second-order λ-calculus. It is observed that the relational parametricity on the target calculus induces a natural notion of equivalence on the λµ-terms. On the other hand, the unconstrained relational parametricity on the λµ-calculus turns out to be inconsistent. Following these facts, we propose to formulate the relational parametricity on the λµ-calculus in a constrained way, which might be called “focal parametricity”. Dedicated to Prof. Gordon Plotkin on the occasion of his sixtieth birthday 1. Introduction The λµ-calculus, introduced by Parigot [26], has been one of the representative term calculi for classical natural deduction, and widely studied from various aspects. Although it still is an active research subject, it can be said that we have some reasonable understanding of the first-order propositional λµ-calculus: we have good reduction theories, well-established CPS semantics and the corresponding operational semantics, and also some canonical equational theories enjoying semantic completeness [16, 24, 25, 36, 39]. The last point cannot be overlooked, as such complete axiomatizations provide deep understanding of equivalences between proofs and also of the semantic structure behind the syntactic presentation. The second-order λµ-calculus (λµ2), again due to Parigot [27], has been studied in depth as a calculus for second-order classical natural deduction. In particular, strong normalization results of λµ2 [27, 23] and its extensions, e.g. with inductive types [21], have been a central research topic, because of the proof-theoretical importance of strong normalization. However, for λµ2, it seems that there are few attempts of giving an equational theory supported by some fine semantic structure. This situation is rather frustrating, since without such equational and semantic accounts, we cannot discuss e.g. the correctness of the impredicative encoding of the datatypes in λµ2. For the second-order λ-calculus λ2 (system 2000 ACM Subject Classification: F.3.2. Key words and phrases: polymorphism, parametricity, continuations. l LOGICAL METHODS IN COMPUTER SCIENCE c DOI:10.2168/LMCS-2 (3:3) 2006 CC Masahito Hasegawa Creative Commons 2 MASAHITO HASEGAWA F) [9, 33], a subsystem of λµ2, there are several beautiful results on the relational parametricity [34] and the universal properties of impredicative constructions [1, 15, 31, 40, 44], e.g. that µX.σ = ∀X.(σ → X) → X (where σ covariant in X) gives an initial algebra of the functor ΛX.σ in a suitable sense. We certainly wish to have such a story for λµ2 too. This work is an attempt to identify such an equational theory which is backed up by certain semantic structures. Specifically, we propose a relational parametricity principle which is sound and sufficiently powerful for deriving such equivalences on the λµ-terms. 1.1. Parametric CPS semantics. We first consider the semantics of λµ2 given by a CPS-translation into a fragment of λ2 — that of the second-order existential types ∃X.τ , conjunction types τ1 ∧ τ2 , and arrow types τ → R into a distinguished type R (this choice of the target calculus is due to a recent work of Fujita [7]). The translation (−)◦ sends a type variable X to X, arrow type σ1 → σ2 to (σ1◦ → R) ∧ σ2◦ , and the universal type ∀X.σ to ∃X.σ ◦ — while a term M : σ is sent to [[M ]] : σ ◦ → R. It can be considered as a natural extension of Streicher’s call-by-name CPS translation [36, 39, 43]. It follows that this translation already gives a reasonable equational theory on λµ2, in that it validates the standard βη-equalities1 . In fact, this is a consequence of a fibred version of the ”category of continuations” construction [16, 36, 39]. However, this is just a starting point; we observe that, if some of the impredicative constructions in the target calculus satisfy certain universal properties (e.g. ∃X.X is a terminal object) which follow from the relational parametricity, then so do the impredicative constructions in the source λµ2-calculus — but not quite in the way that we first might expect. For instance, the type ⊥ = ∀X.X does not give an initial object (cf. [37]) — instead it plays the role of the falsity type (or the “answer type”); in fact, we have a double-negation elimination from (σ → ⊥) → ⊥ to σ for any σ which actually is an algebra of the doublenegation monad ((−) → ⊥) → ⊥. As another major example, ∀X.(σ → X) → X does not give an initial algebra of ΛX.σ; it gives an initial algebra of ΛX.(σ → ⊥) → ⊥ — not with respect to all terms but to a certain class of terms (the “focal terms”, to be mentioned below). In particular, if X is not free in σ, ∀X.(σ → X) → X is isomorphic not to σ but to (σ → ⊥) → ⊥. In short, impredicative encodings in λµ2 get extra double negations, and the relational parametricity of λ2 is not consistent with the equational theory of λµ2 induced by the CPS semantics. As a consequence, we cannot encode cartesian products in λµ2, though they can be added easily. Also we cannot express the classical disjunctions [36], though they can be added without changing the target of the CPS translation. 1.2. Focal parametricity. These results suggest that the CPS translation into parametric target calculus gives a reasonable semantic foundation and equational theory for λµ2, which is sufficient for obtaining various interesting results. However, here the parametricity is used rather indirectly, via the CPS translation; we also wish to have a decent notion of parametricity directly within λµ2. To figure out what sort of parametricity principle can be expected for λµ2, recall the following fact on λ2 with parametricity: given a polymorphic term M : ∀X.F [X] → G[X] (with X covariant in F and G) and types σ1 , σ2 , the instances 1We can say more – we can show that this CPS-semantics is sound and complete with respect to the βη-theory of λµ2. This result, together with further syntactic analysis of this CPS translation, will appear in a forthcoming paper with Ken-etsu Fujita. RELATIONAL PARAMETRICITY AND CONTROL 3 M σ1 : F [σ1 ] → G[σ1 ] and M σ2 : F [σ2 ] → G[σ2 ] obey the naturality, in that the following diagram F [f ] - F [σ2 ] F [σ1 ] M σ1 M σ2 ? G[σ1 ] ? - G[σ2 ] G[f ] commutes for any f : σ1 → σ2 . This is no longer true for λµ2. For example, let F [σ] = (σ → ⊥) → ⊥, G[σ] = σ and M be the double-negation elimination (which does not exist in λ2); then the naturality for arbitrary maps implies inconsistency — we get σ ≃ (σ → ⊥) → ⊥ for every σ by letting f be the obvious map from σ to (σ → ⊥) → ⊥, which is enough to kill the theory [20]. Similar result can be observed for other “classical” proofs, e.g. of the Peirce law. To this end, we look at the focus [36] (centre [32, 42], C-maps [16]) of λµ2; a focal map is no other than an algebra morphism between the the double-negation monad mentioned above, i.e., a map making the naturality diagram for the double-negation elimination commute. It follows that a notion of relational parametricity on λµ2 in which the construction of the graph relations is allowed only for focal maps is consistent, as there are nontrivial models. Together with the definability (fullness) of the CPS translation, we see that it is at least as powerful as the parametricity on the CPS target calculus which we have mentioned above, thus gives a powerful principle for deriving the equivalences of terms in λµ2. (We actually conjecture that these two notions of parametricity do agree, but it is open as of writing this article.) This principle, which we shall call focal parametricity, should be a natural notion of parametricity for λµ2. We will sketch some use of focal parametricity for deriving “free theorems” for λµ2 syntactically. 1.3. Towards parametricity for computational effects. At the conceptual and abstract level, this story closely resembles to the study of linear parametricity and recursion [4, 30]. In the case of linear parametricity, the graph relations are allowed to be constructed only from the linear maps, and a linear map is an algebra map w.r.t. the lifting monad. We claim that, just like the linear parametricity gives a solution of accommodating nontermination and recursion in the polymorphic setting (as advocated by Plotkin [30]), the focal parametricity provides a way of accommodating control features in the polymorphic setting. In short: focal parametricity linear parametricity = non-termination first-class control As future work, it would be an interesting challenge to find a unifying framework of linear parametricity and focal parametricity; it should be useful to have parametric polymorphism, recursion, and control at once, as in the realistic programming languages (cf. [14, 18, 19]). More ambitiously, we are keen to see an adequate notion of parametricity for fairly general “effectful” settings. Possible starting points for this direction might include the “parametricity graphs” approach [5] which allows us to deal with parametricity at a general level (including the linear parametricity as an instance), and the “category of 4 MASAHITO HASEGAWA linear continuations construction” [12] which induces both the CPS translation and Girard translation as special cases. See Section 7 for further discussions related to this issue. 1.4. Construction of this paper. The rest of this paper is organised as follows. In section 2 and 3 we introduce the calculi and CPS-translation which are the subject of this study. In section 4 we consider the implications of the relational parametricity on the CPS-target calculus. The focal parametricity is introduced in section 5, followed by examples in section 6, including focally initial algebras and the type of Church numerals. Section 7 gives an alternative characterisation of focus, which suggests a generalisation of this work to a theory of parametricity for general effects. We then give some concluding remarks in Section 8. 2. The calculi 2.1. The second-order λµcalculus. The second-order λµ-calculus, λµ2, is given as follows. We essentially follow Parigot’s formulation [27] (with some flavour from Selinger’s [36]). The types are the same as those of the second-order λ-calculus λ2: σ ::= X | σ → σ | ∀X.σ In a typing judgement Γ ⊢ M : σ | ∆, Γ stands for the typing context of variables, while ∆ for the context of names (continuation variables). Γ, x : σ, Γ′ ⊢ x : σ | ∆ Γ, x : σ1 ⊢ M : σ2 | ∆ Γ ⊢ λxσ1 .M : σ1 → σ2 | ∆ Γ ⊢ M : σ1 → σ2 | ∆ Γ ⊢ N : σ1 | ∆ Γ ⊢ M N : σ2 | ∆ Γ ⊢ M : σ | ∆ (X 6∈ F T V (Γ, ∆)) Γ ⊢ ΛX.M : ∀X.σ | ∆ Γ ⊢ M : ∀X.σ1 | ∆ Γ ⊢ M σ2 : σ1 [σ2 /X] | ∆ Γ ⊢ M : σ2 | α : σ1 , ∆ (β : σ2 ∈ α : σ1 , ∆) Γ ⊢ µασ1 .[β]M : σ1 | ∆ RELATIONAL PARAMETRICITY AND CONTROL 5 The axioms for the equational theory are again the standard ones — note that we consider the extensional theory, i.e. with the η-axioms. (λxσ .M ) N λxσ .M x (ΛX.M ) σ ΛX.M X = = = = M [N/x] M (x 6∈ F V (M )) M [σ/X] M (X 6∈ F T V (M )) µα.[β](µγ.M ) µασ .[α]M σ →σ 1 2 .M ) N (µα ∀X.σ 1 .M ) σ (µα 2 = = = = µα.M [β/γ] M (α 6∈ F N (M )) µβ σ2 .M [[β](− N )/[α](−)] µβ σ1 [σ2 /X] .M [[β](− σ2 )/[α](−)] In the last two axioms, we make uses of so-called ”mixed substitution”; for instance, M [[β](− N )/[α](−)] means replacing occurances of the form [α]L in M by [β](L N ) recursively. In the sequel, we frequently use the following syntactic sugar. First, we let ⊥ be the type ∀X.X — the type of falsity. We may also write ¬σ for σ → ⊥. Using ⊥, we define the “named term” [β]M ≡ µα⊥ .[β]M : ⊥ (where M : σ, β : σ, with α fresh) and the µ-abstraction µασ .M : σ ≡ µασ .[α](M σ) for M : ⊥. It follows that µασ .[β]M = µασ .[β]M holds. With this ⊥, we can express the double-negation elimination in λµ2 by making use of both the polymorphic and classical features: Cσ = λm¬¬σ .µασ .m (λxσ .[α]x) : ¬¬σ → σ As expected, we have Cσ (λk¬σ .k M ) = M . The properties of ⊥ and Cσ will be further studied later under parametricity assumptions. 2.2. Target: the {∃, ∧, ¬}calculus. In tthe literature, the second-order λ-calculus (λ2) is often taken as the target of the CPS translation for λµ2. Fujita observed that it actually suffices to consider a fragment of λ2 with negations, conjunctions and existential types as a target [7]. In this paper we follow this insight. τ ::= X | R | ¬τ | τ ∧ τ | ∃X.τ ¬τ can be considered as a shorthand of τ → R. The type R can be replaced by ∃X.¬X ∧ X, but for simplicity we keep R as a type constant. The syntax of terms is a fairly standard one, though for conjunctions we employ a slightly less familiar elimination rule (with let-binding) so that it parallels that of the existential types. Γ, x : τ, Γ′ ⊢ x : τ Γ, x : τ ⊢ M : R Γ ⊢ λxτ .M : ¬τ Γ ⊢ M : ¬τ Γ ⊢ N : τ Γ⊢MN :R 6 MASAHITO HASEGAWA Γ ⊢ M : τ1 Γ ⊢ N : τ2 Γ ⊢ hM, N i : τ1 ∧ τ2 Γ ⊢ M : τ1 ∧ τ2 Γ, x : τ1 , y : τ2 ⊢ N : τ3 Γ ⊢ let hxτ1 , y τ2 i be M in N : τ3 Γ ⊢ M : τ1 [τ2 /X] Γ ⊢ hτ2 , M i : ∃X.τ1 Γ ⊢ M : ∃X.τ1 Γ, x : τ1 ⊢ N : τ2 X 6∈ F T V (Γ, τ2 ) Γ ⊢ let hX, xτ1 i be M in N : τ2 Again, we employ the standard βη-axioms. (λxσ .M ) N λxσ .M x let hx, yi be hL, M i in N let hx, yi be M in N [hx, yi/z] let hX, xi be hτ, M i in N let hX, xi be M in N [hX, xi/z] = = = = = = M [N/x] M (x 6∈ F V (M )) N [L/x, M/y] N [M/z] N [τ /X, M/x] N [M/z] 3. CPS translation 3.1. The CPS translation. We present a call-by-name CPS translation which can be considered as an extension of that introduced by Streicher [16, 39, 36] (rather than the translations by Plotkin [29], Parigot [27] or Fujita [7] which introduce extra negations and do not respect extensionality). X◦ = X (σ1 → σ2 )◦ = ¬σ1◦ ∧ σ2◦ (∀X.σ)◦ = ∃X.σ ◦ [[xσ ]] [[λxσ1 .M σ2 ]] [[M σ1 →σ2 N σ1 ]] [[ΛX.M σ ]] [[M ∀X.σ1 σ2 ]] σ [[µα 1 .[β σ2 ]M σ2 ]] where λhxσ , y τ i.M λhX, y τ i.M = = = = = = ◦ x¬σ ◦ ◦ λhx¬σ1 , kσ2 i.[[M ]] k ◦ λkσ2 .[[M ]] h[[N ]], ki ◦ λhX, kσ i.[[M ]] k ◦ λkσ1 [σ2 /X] .[[M ]] hσ2◦ , ki ◦ λασ1 .[[M ]] β ≡ λz σ∧τ .let hxσ , y τ i be z in M ≡ λz ∃X.τ .let hX, y τ i be z in M RELATIONAL PARAMETRICITY AND CONTROL 7 3.2. Soundness. The type soundness follows from a straightforward induction. Proposition 3.1 (type soundness). Γ ⊢ M : σ | ∆ =⇒ ¬Γ◦ , ∆◦ ⊢ [[M ]] : ¬σ ◦ ◦ when Γ is x : σ , . . . , x ◦ where ¬Γ◦ is x1 : ¬σ1◦ , . . . , xm : ¬σm 1 1 m : σm , and ∆ = α1 : ◦ ◦ σ1 , . . . , αn : σn for ∆ = α1 : σ1 , . . . , αn : σn . Note that (σ[τ /X])◦ ≡ σ ◦ [τ ◦ /X], [[M [N/x]]] ≡ [[M ]][[[N ]]/x], and also [[M [σ/X]]] ≡ [[M ]][σ ◦ /X] hold. Then we have the equational soundness: Proposition 3.2 (equational soundness). Γ ⊢ M = N : σ |∆ =⇒ ¬Γ◦ , ∆◦ ⊢ [[M ]] = [[N ]] : ¬σ ◦ In addition, we have the definability result: Proposition 3.3 (fullness). ¬Γ◦ , ∆◦ ⊢ N : ¬σ ◦ =⇒ N = [[M ]] for some Γ ⊢ M : σ | ∆ This can be proved by providing an inverse translation of the CPS translation, so that ¬Γ◦ , ∆◦ ⊢ P : ¬σ ◦ =⇒ Γ ⊢ P −1 : σ | ∆ ¬Γ◦ , ∆◦ ⊢ C : σ ◦ =⇒ Γ ⊢ C −1 [−σ ] : ⊥ | ∆ ¬Γ◦ , ∆◦ ⊢ A : R =⇒ Γ ⊢ A−1 : ⊥ | ∆ hold, where Program : ¬σ ◦ P ::= x | λk.A ◦ Continuation : σ C ::= k | hP, Ci | hσ ◦ , Ci | let hx, ki be C in C | let hX, ki be C in C Answer : R A ::= P C | let hx, ki be C in A | let hX, ki be C in A as follows. x−1 = x = µkσ .A−1 ◦ (λkσ .A)−1 k−1 hP, Ci−1 hσ ◦ , Ci−1 (let hx, ki be C1 in C2 )−1 (let hX, ki be C1 in C2 )−1 = = = = = [k][−] C −1 [− P −1 ] C −1 [− σ] C1−1 [λx.µk.C2−1 [−]] C1−1 [ΛX.µk.C2−1 [−]] (P C)−1 = C −1 [P −1 ] (let hx, ki be C in A)−1 = C −1 [λx.µk.A−1 ] (let hX, ki be C in A)−1 = C −1 [ΛX.µk.A−1 ] This can be considered as a “continuation-grabbing style transformation” in the sense of Sabry [35]. It follows that for any ¬Γ◦ , ∆◦ ⊢ M : ¬σ ◦ there exists ¬Γ◦ , ∆◦ ⊢ P : ¬σ ◦ generated by this grammar such that P = M — it suffices to take the β-normal form [7]. Moreover we can routinely show that [[P −1 ]] = P . Thus the CPS translation enjoys fullness: all terms are definable modulo the provable equality. This definability is important for relating the parametricity principles for the source and target calculi. 8 MASAHITO HASEGAWA 3.3. A semantic explanation. Here is a short explanation of why this CPS translation works, intended for readers with category theoretic background — on the “categories of continuations” construction [16, 39, 36], and on fibrations for polymorphic type theories [17]. As a response category C with a response object R induces a control category RC with RC (X, Y ) = C(RX , RY ), a fibred response category with finite products and simple coproducts (for existential quantifiers) induces a fibred control category with finite products and simple products (for universal quantifiers). Let us write CΓ for the response category over the type-context Γ. We assume that the weakening functor π ∗ : CΓ → CΓ×A has a left adjoint ∃A : CΓ×A → CΓ subject to the Beck-Chevalley condition. Thus CΓ×A (X, π ∗ (Y )) ≃ CΓ (∃A (X), Y ) We then have RCΓ×A (π ∗ (X), Y ) = ≃ ≃ ≃ ≃ = ∗ CΓ×A (Rπ (X) , RY ) π ∗ (X) ) CΓ×A (Y, RR X ∗ R CΓ×A (Y, π (R )) X CΓ (∃A (Y ), RR ) CΓ (RX , R∃A (Y ) ) RCΓ (X, ∃A (Y )) Hence π ∗ , regarded as the weakening functor from RCΓ to RCΓ×A , has a right adjoint given by ∃A , which can be used for interpreting the universal quantifier. Our CPS transformation is essentially a syntactic interpretation of this semantic construction. 4. CPS semantics with the parametric target calculus 4.1. Parametricity for the target calculus. As the target calculus can be seen as a subset of λ2 (via the standard encoding of the conjunctions and existential types), we can define the relational parametricity for the target calculus in the same way as for λ2, e.g. logic for parametricity [31, 40], system R [1], or system P [5]. One may directly define the parametricity principle (often called the simulation principle) for the existential type, see for example [31]. In this paper we only consider the relations constructed from the graphs of termsin-context, identity, and σ ∗ ’s obtained by the following construction, which we shall call “admissible relations”. Among admissible relations, the most fundamental are the graph relations. Given a term f (x) : τ2 with a free variable x : τ1 we define its graph relation hx ⊢ f (x)i : τ1 ↔ τ2 (hf i for short) by u hf i v iff f (u) = v. Given a type τ whose free type variables are included in X1 , . . . , Xn and admissible relations s1 : τ1 ↔ τ1′ , . . . , sn : τn ↔ τn′ , we define an admissible relation τ ∗ as follows. • Xi∗ = si : τi ↔ τi′ • R∗ is the identity relation on the terms of type R • (¬τ )∗ : ¬τ [τ1 /X1 , . . . ] ↔ ¬τ [τ1′ /X1 , . . . ] is the relation so that f (¬τ )∗ g iff x τ ∗ y implies f x R∗ g y (hence f x = g y) • (τ ∧τ ′ )∗ : (τ ∧τ ′ )[τ1 /X1 , . . . ] ↔ (τ ∧τ ′ )[τ1′ /X1 , . . . ] is the relation so that u (τ ∧τ ′ )∗ v iff u = hx, x′ i, v = hy, y ′ i and x τ ∗ y, x′ τ ′∗ y ′ • (∃X.τ )∗ : ∃X.τ [τ1 /X1 , . . . ] ↔ ∃X.τ [τ1′ /X1 , . . . ] is the relation so that u (∃X.τ )∗ v iff u = hτ ′ , xi, v = hτ ′′ , yi and x τ [r/X]∗ y for some admissible r : τ ′ ↔ τ ′′ RELATIONAL PARAMETRICITY AND CONTROL 9 In the last case, the relation τ [r/X]∗ : τ [τ ′ /X] ↔ τ [τ ′′ /X] is defined as τ ∗ with X ∗ = r. One may further define admissible relations ¬r, r ∧ s and ∃X.r for admissible r, s, so that (¬τ )∗ = ¬τ ∗ , (τ ∧ τ ′ )∗ = τ ∗ ∧ τ ′∗ and (∃X.τ )∗ = ∃X.τ ∗ hold. Let idτ : τ ↔ τ be the identity relation on the terms of type τ . The relational parametricity asserts that, for any τ whose free type variables are included in X1 , . . . , Xn and τ1 , . . . , τn , M : τ [τ1 /X1 , . . . , τn /Xn ] implies M τ ∗ M with si = idτi . Its consistency follows immediately from that of the parametricity for λ2. Proposition 4.1. As consequences of the parametricity, we can derive: (1) ∃X.X gives a terminal object ⊤ with a unique inhabitant ∗, so that for any M : ⊤ we have M = ∗. (2) ∃X.¬(τ ∧ X) ∧ X (which could be rewritten as ∃X.(X → ¬τ ) ∧ X) gives a final coalgebra νX.¬τ of ΛX.¬τ where X only occurs negatively in τ . (3) (as an instance of the last case) the isomorphism ∃X.¬(τ ∧ X) ∧ X ≃ ¬τ holds if X does not occur freely in τ . Their proofs are standard, cf. papers cited above [31, 1, 40, 5]. Below we will see the implications of these parametricity results on the target calculus. We refer to the λµ2-theory induced by the CPS translation into this parametric target calculus as λµ2P . 4.2. The falsity type. As a first example, let us consider the falsity type ⊥ = ∀X.X in λµ2. We have ⊥◦ = (∀X.X)◦ = ∃X.X ≃ ⊤ and (σ → ⊥)◦ = ¬(σ ◦ ∧ ⊥◦ ) ≃ ¬(σ ◦ ∧ ⊤) ≃ ¬σ ◦ Since ∃X.X is terminal (with a unique inhabitant ∗) in the parametric target calculus, ◦ we obtain [[µασ .M ]] = λασ .[[M ]]∗ and [[[β]M ]] = λu∃X.X .[[M ]]β, which coincide with Streicher’s translation. As a consequence, the following equations on the named terms and µ-abstractions are all validated in λµ2P . (µασ1 →σ2 .M ) N (µα∀X.σ1 .M ) σ2 [α′ ](µασ .M ) [α⊥ ]M = = = = µβ σ2 .M [[β](− N )/[α](−)] µβ σ1 [σ2 /X] .M [[β](− σ2 )/[α](−)] M [α′ /α] M Thus the type ⊥ serves as the falsity type as found in some formulation of the λµ-calculus. In addition, we can show that (σ, Cσ : ((σ → ⊥) → ⊥) → σ) is an algebra of the doublenegation monad ((−) → ⊥) → ⊥ on the term model. 4.3. Initial algebra? A more substantial example is the “initial algebra” µX.F [X] = ∀X.(F [X] → X) → X, with X positive in F [X] (here we see an unfortunate clash of µ’s for the name-binding and for the fixed-point on types, but this should not cause any serious 10 MASAHITO HASEGAWA problem). We calculate: (µX.F [X])◦ = = ≃ ≃ ≃ = ≃ (∀X.(F [X] → X) → X)◦ ∃X.¬(¬F [X]◦ ∧ X) ∧ X νX.¬¬F [X]◦ ¬¬F [X]◦ [νX.¬¬F [X]◦ /X] ¬¬F [X]◦ [(µX.F [X])◦ /X] ¬¬(F [µX.F [X]])◦ ((F [µX.F [X]] → ⊥) → ⊥)◦ This suggests that µX.F [X] is isomorphic not to F [µX.F [X]] but to its double negation (F [µX.F [X]] → ⊥) → ⊥. One might think that this contradicts the standard experience on λ2 with parametricity, where we have an isomorphism in : F [µX.F [X]] → µX.F [X]. Since λµ2 subsumes λ2, we have this in in λµ2 too; however, it should not be an isomorphism, regarding the CPS interpretation above (otherwise it causes a degeneracy). The truth is that, in λµ2P , the term in♯ = λm.µα.m (λx.[α](in x)) : ((F [µX.F [X]] → ⊥) → ⊥) → µX.F [X] is an isomorphism. It still is not an initial algebra of (F [−] → ⊥) → ⊥; we shall further consider this issue later. For now, we shall emphasize that the parametricity principle for λ2 should not be used for λµ2, at least without certain constraint — otherwise in would be an isomorphism, hence a degeneracy follows (because we have (σ → ⊥) → ⊥ ≃ σ for every σ). 4.4. Other impredicative encodings. Recall other impredicative encodings of logical connectives: ⊤ = ∀X.X → X σ1 ∧ σ2 = ∀X.(σ1 → σ2 → X) → X σ1 ∨ σ2 = ∀X.(σ1 → X) → (σ2 → X) → X ∃X.σ = ∀Y.(∀X.(σ → Y )) → Y Their CPS translations into the parametric target calculus satisfy: ⊤◦ (σ1 ∧ σ2 )◦ (σ1 ∨ σ2 )◦ (∃X.σ)◦ ≃ ≃ ≃ ≃ R ¬(¬σ1 ◦ ∧ ¬σ2◦ ) ¬¬σ1◦ ∧ ¬¬σ2◦ ¬∃X.¬σ ◦ As easily seen, these defined logical connectives in the source calculus do not obey the standard universal properties as in the parametric models of λ2. In short, they are all “double-negated”, hence amount to some classical encodings: • σ1 ∧ σ2 is not a cartesian product of σ1 and σ2 , but isomorphic to (σ1 → σ2 → ⊥) → ⊥. It is possible to add cartesian product types σ1 ×σ2 to λµ2, but then we also need to add coproduct types τ1 + τ2 to the target calculus, so that (σ1 × σ2 )◦ = σ1◦ + σ2◦ and σ1 ∧ σ2 ≃ ¬¬(σ1 × σ2 ). • ⊤ is not a terminal object, but isomorphic to ⊥ → ⊥. We can add a terminal object 1 to λµ2 and an initial object 0 to the target, so that 1◦ = 0 and ⊤ ≃ ¬¬1. • σ1 ∨ σ2 is not a coproduct of σ1 and σ2 , but isomorphic to (σ1 → ⊥) → (σ2 → ⊥) → ⊥. If there is a coproduct σ1 + σ2 , then it should follow that σ ∨ τ ≃ ¬¬(σ + τ ). On the other hand, it is not possible to enrich λµ2 with an initial object without a degeneracy, cf. Selinger’s note on control categories [37]. Alternatively we might RELATIONAL PARAMETRICITY AND CONTROL 11 add the “classical disjunction types” σ1 ℘σ2 [36] with (σ1 ℘σ2 )◦ = σ1◦ ∧ σ2◦ — hence σ1 → σ2 ≃ ¬σ1 ℘σ2 and σ1 ∨ σ2 ≃ ¬¬σ1 ℘¬¬σ2 . We note that ⊥ = ∀X.X serves as the unit of this classical disjunction. • ∃X.σ does not work as the existential type; it is isomorphic to ¬∀X.¬σ. 4.5. Answer-type polymorphism. Note that the answer type R has been considered just as a constant with no specific property. In fact we could have used any type for R — Everything is defined polymorphically regarding R. Thus we can apply the “answer-type polymorphism” principle (cf. [43]): in particular, a closed term of type σ in λµ2 can be considered to be sent to a λ2-term of type ∀R.¬σ ◦ . This way of reasoning goes behind the parametricity principle for our target calculus, but it is justified by the parametricity of λ2. For instance, consider the type ⊤ = ∀X.X → X of λµ2. We have ∀R.¬⊤◦ ≃ ∀R.¬R ≃ ∀R.R → R ≃ 1 in λ2 with parametricity. This means that, although ⊤ is not a terminal object in λµ2, it has a unique closed inhabitant. Similarly, we have ∀R.¬⊥◦ ≃ ∀R.R ≃ 0, thus we see that there is no closed inhabitant of ⊥ in λµ2. However, such reasonings based on the answer-type polymorphism become much harder for more complicated types. The force of answer-type polymorphism in this setting seems still not very obvious. 5. Focal parametricity We have seen that the CPS semantics with respect to the target calculus with relational parametricity induces a reasonable equational theory λµ2P . However, here the parametricity is used rather indirectly, via the CPS translation. We now consider a notion of parametricity which is directly available within λµ2. 5.1. CPS translating relations. The key of formulating the relational parametricity is the use of graph relations of terms (considered as representing a functional relation): without graph relations, relational parametricity reduces to just the basic lemma of the (secondorder) logical relations. On the other hand, it does not have to allow all terms to be used for constructing relations. In fact, in linear parametricity [30] only linear (or strict) maps are allowed to be used for constructing graph relations, and this choice allows a weaker notion of parametricity which can accommodate recursion. Naturally, we are led to look for a characterisation of λµ-terms which can be used for graph relations without breaking the soundness with respect to the CPS semantics into the parametric target calculus. Now suppose that we are allowed to use the graph relation hf i : σ1 ↔ σ2 of a term x : σ1 ⊢ f (x) : σ2 . To ensure the soundness of the use of this graph relation, we shall consider the CPS translation of such relations. For instance, we hope that hf i will be sent to a relation between types σ2◦ and σ1◦ in the target calculus. However, since x : ¬σ1◦ ⊢ [[f (x)]] : ¬σ2◦ , we have some relation σ2◦ ↔ σ1◦ only when [[f (x)]] = λk.x (g (k)) for some k : σ2◦ ⊢ g(k) : σ1◦ in the target calculus. If there is such g, we can complete the translation of the relations and reduce the parametricity principle on λµ2 to the parametricity on the target calculus. 12 MASAHITO HASEGAWA Fortunately, there is a way to characterise such “translatable” f ’s in the λµ-calculus without performing the CPS-translation (modulo a technical assumption on the CPS-target, known as “equalising requirement” [22]). It is the notion of “focus”, which we now recall below. 5.2. Focus. Definition 5.1. A λµ2-term M : σ1 → σ2 is called focal if it is an algebra morphism from (σ1 , Cσ1 ) to (σ2 , Cσ2 ), i.e. the following diagram commutes. (σ1 → ⊥) → ⊥ Cσ1 (M →⊥)→⊥ - Cσ2 ? σ1 (σ2 → ⊥) → ⊥ ? M - σ2 That is: M (µασ1 .k (λxσ1 .[α]x)) = µβ σ2 .k (λxσ1 .[β](M x)) : σ2 holds for any k : (σ1 → ⊥) → ⊥.2 In any λµ2-theory, focal terms compose, and the identity λxσ .x is obviously focal. So, the (equivalence classes of) focal maps form a category. Hereafter we shall call it the focus of the λµ2-theory. While this characterisation of focal maps is concise and closely follows the semantic considerations in [36, 19], there is a subtle problem; the βη-axioms of λµ2 are too weak to establish the focality of some important terms. This is because we have used the polymorphic feature of λµ2 for expressing Cσ — it involves the falsity type ⊥ = ∀X.X, but the axioms of λµ2 do not guarantee that ⊥ does work properly. If there were not sufficiently many focal maps, the parametricity principle restricted on focal maps would be useless. To see this issue more clearly, we shall look at another “classical” combinator (the Peirce law) Pσ1 ,σ2 = λm.µασ1 .[α](m (λxσ1 .µβ σ2 .[α]x)) : ((σ1 → σ2 ) → σ1 ) → σ1 which does not make use of polymorphism, and the “abort” map (Ex Falso Quodlibet) Aσ = λx⊥ .x σ : ⊥ → σ which is defined without the classical feature. It is well known that the double-negation elimination is as expressible as the Peirce law together with Ex Falso Quodlibet, see e.g. [2]. This is also the case at the level of (uniformity of) proofs. Let us say that M : σ1 → σ2 is repeatable if (M →σ3 )→M - (σ2 → σ3 ) → σ2 (σ1 → σ3 ) → σ1 Pσ1 ,σ3 Pσ2 ,σ3 ? σ1 ? M - σ2 2In [16], a focal map from σ to ⊥ is called a “C-term of type σ ”. C-terms of type σ with a free name 1 1 1 of σ2 correspond to focal maps from σ1 to σ2 , thus these notions (and the associated constructions of the CPS target categories via C-terms (C-maps) [16] and via focus [36]) are essentially the same. RELATIONAL PARAMETRICITY AND CONTROL 13 commutes for each σ3 ; and discardable if Aσ 1 σ1 ⊥ M Aσ @ 2 R @ - σ2 commutes. Proposition 5.2. In a λµ2-theory, M : σ1 → σ2 is focal if and only if it is both repeatable and discardable. We note that the corresponding result in the call-by-value setting has been observed by Führmann [8] as the characterisation of algebraic values as repeatable discardable expressions. Here we follow his terminology. This reformulation allows us to see that only the second diagram of A’s involves the polymorphically defined ⊥ and needs to be justified by additional conditions.3 On the other hand, the first diagram of P ’s is not problematic, as it does not make use of polymorphism at all. 5.3. Additional axioms. To this end, we add more axioms to λµ2 before thinking about parametricity. They are (1) λxσ1 →σ2 .x N : (σ1 → σ2 ) → σ2 is discardable for any N : σ1 (2) λx∀X.σ .x σ1 : ∀X.σ → σ[σ1 /X] is discardable for any σ and σ1 (3) λxσ .[α]x : σ → ⊥ is discardable for any α : σ which are equivalent to asking (1) M (σ1 → σ2 ) N = M σ2 for any M : ⊥ and N : σ1 (2) M (∀X.σ) σ1 = M (σ[σ1 /X]) for M : ⊥ (3) [α](M σ) = M for M : ⊥ and α : σ (α 6∈ F N (M )) and also equivalent to (1) (µασ1 →σ2 .M ) N = µβ σ2 .M [[β](− N )/[α](−)] (2) (µα∀X.σ1 .M ) σ2 = µβ σ1 [σ2 /X] .M [[β](− σ2 )/[α](−)] (3) [α′ ](µασ .M ) = M [α′ /α] Note that λµ2P discussed in Section 4 satisfies these conditions. Also we shall note that λxσ1 →σ2 .x N , λx∀X.σ .x σ1 , λx⊥ .[α](x σ) are all repeatable in λµ2. Together with these additional axioms, they become focal. (Alternatively, we could have ⊥ as a type constant and assume the standard axiomatization of λµ-calculus with the falsity type [16, 36] — in that case C is defined without polymorphism, and this problem disappears.) Below we develop the focal parametricity principle on top of λµ2 with these additional axioms. 3This problem was overlooked in the preliminary version of this paper [13] where it was wrongly assumed that repeatability alone would imply focality. 14 MASAHITO HASEGAWA 5.4. A parametricity principle for λµ2. Given a focal f : σ1 → σ2 we define its graph relation hf i : σ1 ↔ σ2 by u hf i v iff f u = v. Also, let idσ : σ ↔ σ be the identity relation on the terms of type σ. In this paper we only consider the relations given by the graphs of focal maps, identity, and σ ∗ ’s obtained by the following construction, which we shall call “focal relations”. Given a type σ whose free type variables are included in X1 , . . . , Xn and focal relations s1 : σ1 ↔ σ1′ , . . . , sn : σn ↔ σn′ , we define a focal relation σ ∗ as follows. • Xi∗ = si : σi ↔ σi′ • (σ → σ ′ )∗ : (σ → σ ′ )[σ1 /X1 , . . . ] ↔ (σ → σ ′ )[σ1′ /X1 , . . . ] is the relation so that f (σ → σ ′ )∗ g iff x σ ∗ y implies (f x) σ ′∗ (g y) • (∀X.σ)∗ : ∀X.σ[σ1 /X1 , . . . ] ↔ ∀X.σ[σ1′ /X1 , . . . ] is the relation so that u (∀X.σ)∗ v iff (u σ ′ ) σ[r/X]∗ (v σ ′′ ) holds for any focal relation r : σ ′ ↔ σ ′′ The focal relational parametricity asserts that, for any σ whose free type variables are included in X1 , . . . , Xn , M : σ[σ1 /X1 , . . . , σn /Xn ] implies M σ ∗ M with si = idσi . Thus the only departure from the standard parametricity principle is the condition that the graph relation construction is allowed only on focal maps. Note that this restriction is necessary; if we apply parametricity to polymorphic terms ΛX.CX or ΛX.PX,σ , we will get the naturality diagrams above for any term which is allowed to be used for the graph relation construction. 5.5. On consistency and soundness. The consistency of focal parametricity (in the sense that the equational theory of λµ2 with focal parametricity is not trivial) follows from the fact that there are non-trivial parametric models of λ2 in which there is an object R so τ that the continuation monad T τ = RR satisfies the “equalising requirement” [22], i.e. each component ητ : τ → T τ of its unit is an equaliser of ηT τ and T ητ . (Here we employ the syntax of the CPS target calculus as an internal language for such models, where the CPS translation is considered to give a semantic interpretation.) In such models, for any focal term f : σ1 → σ2 , there exists a unique y : σ2◦ ⊢ g(y) : σ1◦ such that [[f x]] = λy.x (g(y)) (cf. [36]). Using this fact, given a focal relation r : σ1 ↔ σ2 , we construct an admissible relation r ◦ : σ2◦ ↔ σ1◦ as follows. For a graph relation hf i : σ1 ↔ σ2 , we let hf i◦ = hgi : σ2◦ ↔ σ1◦ where g is the unique map as given above. For σ ∗ , σ ∗◦ is defined by straightforward induction: (σ → σ ′ )∗◦ = ¬σ ∗◦ ∧ σ ′∗◦ , (∀X.σ)∗◦ = ∃X.σ ∗◦ (where the parameter relations si are replaced by s◦i ). Theorem 5.3. In such a model, given a focal relation r : σ1 ↔ σ2 , M r N implies [[N ]] ¬r ◦ [[M ]]. Theorem 5.4 (consistency). Focal parametricity is consistent. We do not know if the term model of the parametric target calculus satisfies the equalising requirement — if so, by the definability result, the parametricity on the target and the focal parametricity on λµ2 should agree. Alternatively we should consider a refined target calculus with a construct ensuring the equalising requirement, as detailed in Taylor’s work on sober space (“a lambda calculus for sobriety” [41]). For now, we only know that one direction is true (thanks to the definability). Theorem 5.5. An equality derivable in λµ2P is also derivable in λµ2 with focal parametricity. RELATIONAL PARAMETRICITY AND CONTROL 15 6. Examples We show that certain impredicative encodings in λµ2 satisfy universal properties with respect to the focus using the focal parametricity principle. 6.1. Focal decomposition. We start with a remark on the following “focal decomposition” [36] (analogous to the linear decomposition σ1 → σ2 =!σ1 ⊸ σ2 [10]): there is a bijective correspondence between terms of σ1 → σ2 and focal terms of ¬¬σ1 → σ2 natural in σ1 and focal σ2 . f : ¬¬σ1 → σ2 focal f ♭ = f ◦ ησ1 = λxσ1 .f (λk.k x) : σ1 → σ2 g♯ = Cσ2 ◦ ¬¬g = g : σ1 → σ2 σ λm.µβ 2 .m (λxσ1 .[β](g x)) : ¬¬σ1 → σ2 focal ♯ ♭ Proposition 6.1. g♯ = g for any g : σ1 → σ2 , while f ♭ = f holds for f : ¬¬σ1 → σ2 if and only if f is focal. 6.2. Falsity as a focally initial object. Now we shall proceed to reason about impredicative encodings in λµ2. The first example is the falsity ⊥ = ∀X.X. First, we note that Aσ = λx⊥ .x σ : ⊥ → σ is focal. The parametricity on ⊥ says x ⊥∗ x for any x : ⊥. Since hAσ i : ⊥ ↔ σ, we have x ⊥ hAσ i x σ, i.e. Aσ (x ⊥) = x ⊥ σ = x σ. By extensionality we get x = x ⊥ for x : ⊥. Now suppose that g : ⊥ → σ is focal. Again by the parametricity on ⊥ we know x ⊥∗ x for any x : ⊥, hence x ⊥ hgi x σ. Thus g (x ⊥) = x σ; but x = x ⊥, so we have g x = x σ, hence g = λx⊥ .x σ = Aσ . So we conclude that Aσ is the unique focal map from ⊥ to σ. This means that ⊥ is initial in the focus. 6.3. Focally initial algebra. As in λ2, there is a fairly standard encoding µX.F [X] = ∀X.(F [X] → X) → X foldσ = λaF [σ]→σ .λxµX.F [X] .x σ a : (F [σ] → σ) → µX.F [X] → σ in = λy.ΛX.λkF [X]→X .k (F [foldX k] y) : F [µX.F [X]] → µX.F [X] for which the following diagram commutes (just by β-axioms). F [µX.F [X]] in - F [fold a] µX.F [X] fold a ? F [σ] a ? - σ Therefore in is a weak initial F -algebra. However, as we noted before, in is not an initial F -algebra — in fact it is not even an isomorphism. By applying the focal decomposition 16 MASAHITO HASEGAWA above, we obtain the commutative diagram ¬¬F [µX.F [X]] ¬¬F [fold a♭ ] in♯- µX.F [X] fold a♭ ? ¬¬F [σ] ? - σ a for any focal a : ¬¬F [σ] → σ. We show that fold a♭ is the unique focal map making this diagram commute, thus in♯ is an initial ¬¬F [−]-algebra in the focus. We sketch a proof which is fairly analogous to that for the corresponding result in parametric λ2 as given in [1]. First, from the parametricity on µX.F [X] we obtain that F [σ1 ] a- F [h] h ? F [σ2 ] b µX.F [X] σ1 ? - σ2 implies folda || σ1 h ? µX.F [X] ? - σ2 fold b whenever h is focal. We also have M (µX.F [X]) in = M for any M : µX.F [X] as a corollary (thanks to extensionality). By combining these observations, now we have the desired result. That is, if h : µX.F [X] → σ is focal and satisfies h ◦ in♯ = a ◦ ¬¬F [h], then foldσ a♭ x = h (foldµX.F [X] in x) = h (x (µX.F [X]) in) = hx so by extensionality we conclude foldσ a♭ = h. This also implies that in♯ is an isomorphism, with the inverse given by fold¬¬µX.F [X] (¬¬F [in]). As a special case, by letting F be a constant functor, we obtain isomorphisms between (σ → ⊥) → ⊥ and ∀X.(σ → X) → X where X is not free in σ. With some further calculation we see that in♯ = λm.ΛX.λkσ→X .µαX .m (λxσ .[α](k x)) is the inverse of λn.n ⊥ : (∀X.(σ → X) → X) → (σ → ⊥) → ⊥. We will see more about this isomorphism in Section 7. 6.4. The type of Church numerals. We conclude this section by a remark on the type of Church numerals N = ∀X.X → (X → X) → X. Recall that, in λ2 with parametricity, N is an initial algebra of ∀X.X → (− → X) → X ≃ 1 + (−), i.e. a natural numbers object, whose closed inhabitants are equal to the Church numerals Sn O which can be given by, as usual, O = ΛX.λxX f X→X .x : N S = λnN .ΛX.λxX f X→X .f (n X x f ) : N → N It is no longer true in λµ2, as observed by Parigot, as there are closed inhabitants which are not equal to Church numerals, e.g. µαN .[α](S (µβ N .[α]O)) = ΛX.λxX f X→X .µαX .[α](f (µβ X .[α]x)) : N In contrast, N in λµ2 with focal parametricity is a focally initial algebra of ∀X.X → (− → X) → X ≃ ⊥ → (− → ⊥) → ⊥; this can be shown in the same way as the case of focally RELATIONAL PARAMETRICITY AND CONTROL 17 initial algebras. Spelling this out, we have a focal map in : (⊥ → (N → ⊥) → ⊥) → N, and for any focal g : (⊥ → (σ → ⊥) → ⊥) → σ there exists a unique focal foldσ g : N → σ making the following diagram commute. ⊥ → (N → ⊥) → ⊥ in - N ⊥→(foldσ g→⊥)→⊥ foldσ g ? ⊥ → (σ → ⊥) → ⊥ g ? - σ To see this, it is useful to observe the following bijective correspondence (a variant of the focal decomposition): given focal g : (⊥ → (σ → ⊥) → ⊥) → σ we have go = g (λx⊥ kσ→⊥ .x) : σ gs = λy σ .g (λx⊥ kσ→⊥ .k y) : σ → σ and conversely, for a : σ and f : σ → σ we have a focal map ϕa,f = λm⊥→(σ→⊥)→⊥ .µασ .m ([α]a) (λy σ .[α](f y)) : (⊥ → (σ → ⊥) → ⊥) → σ It follows that (ϕa,f )o = a and (ϕa,f )s = f hold for any a and f , while ϕgo ,gs = g for any focal g. Now we define foldA g = λnN .n A go gs : N → A in = ϕO,S : (⊥ → (N → ⊥) → ⊥) → N It then follows that the diagram above commutes — and the focal parametricity implies that foldA g is the unique such focal map. 7. A general characterisation So far, we concentrated on the relational parametricity for λµ2. One may feel that this story is very specific to the case of λµ2, or of the first-class continuations, and is not immediately applicable to other computational effects. In this section we describe an alternative characterisation of the focus, which makes sense in any extension of λ2. Namely, we show that, any λ2-theory is equipped with a monad L, such that each type is equipped with an algebra structure — and then see that, in the case of λµ2 with focal parametricity, this monad L is isomorphic to the double-negation (continuation) monad, and focal maps are precisely the algebra maps of the monad L. This suggests a natural generalisation of this work to a theory of parametricity for general computational effects. 7.1. A monad on λ2. Let Lσ = ∀X.(σ → X) → X (with no free X in σ), and define ησ = λxσ .ΛX.λkσ→X .k x : σ → Lσ 2 µσ = λz L σ .ΛX.λkσ→X .z X (λy Lσ .y X k) : L2 σ → Lσ L(f ) = λy Lσ1 .ΛX.λhσ2 →X .y X (h ◦ f ) : Lσ1 → Lσ2 (f : σ1 → σ2 ) Proposition 7.1. On the term model of any λ2-theory, (L, η, µ) forms a monad. 18 MASAHITO HASEGAWA One might think that this is trivial as Lσ is isomorphic to σ when we assume the standard parametricity. This is not always the case however, as we have already seen, Lσ ≃ (σ → ⊥) → ⊥ in the focally parametric λµ2. Proposition 7.2. ασ = λy Lσ .y σ (λxσ .x) : Lσ → σ is an algebra of the monad (L, η, µ). Thus each σ is canonically equipped with an algebra structure ασ . Again one may think that this is trivial, as under the standard parametricity ασ is just an isomorphism with ησ being an inverse. However, again it is not the case in a non-trivial λµ2-theory. Now we define the notion of linear maps in terms of the monad L and the canonical algebras ασ — this is close to what we do in (axiomatic) domain theory for characterising the strict maps, and also in control categories for characterising the focal maps. Definition 7.3. f : σ1 → σ2 is linear when it is an algebra morphism from ασ1 to ασ2 , i.e. f ◦ ασ1 = ασ2 ◦ L(f ) holds. Lσ1 L(f ) - Lσ2 ασ1 ασ2 ? σ1 That is, f is linear when f ? - σ2 f (M σ1 (λxσ1 .x)) = M σ2 f holds for any M : Lσ1 . We may write f : σ1 ⊸ σ2 for a linear f : σ1 → σ2 . Under the standard parametricity every f : σ1 → σ2 is linear, while for focal parametricity on λµ2 we have that linear maps are precisely the focal maps (see below). In passing, we note the following interesting observation. Proposition 7.4. In a λ2-theory, the following conditions are equivalent. (1) algebras on σ1 → σ2 and ∀X.σ are determined in the pointwise manner, i.e. ασ1 →σ2 = λf L(σ1 →σ2 ) .λxσ1 .ασ2 (L(λgσ1 →σ2 .g x) f ) α∀X.σ = λxL(∀X.σ) .ΛX.ασ (L(λy ∀X.σ .y X) x) (2) λxσ1 →σ2 .x N is linear for any N : σ1 , and λx∀X.σ .x σ1 is linear for any σ and σ1 . Note that they are very close to the “additional axioms” for λµ2 discussed in Section 5. Also note that, if a λ2-theory satisfies one of these conditions, µσ and αLσ agree for every σ. and we have a “linear decomposition” correspondence between the maps of σ1 → σ2 and the linear maps of Lσ1 → σ2 . 7.2. Focal maps as algebra maps. Now we shall consider the double-negation monad ¬¬σ = (σ → ⊥) → ⊥ on λµ2 with focal parametricity. Proposition 7.5. In a focally parametric λµ2-theory, Cσ : ¬¬σ → σ is an algebra of the double-negation monad. Corollary 7.6. f : σ1 → σ2 is focal if and only if it is an algebra map from Cσ1 to Cσ2 . Proposition 7.7. The monad (L, η, µ) is isomorphic to the double negation monad in the ≃ focally parametric λµ2, with λxLσ .x ⊥ : Lσ → ¬¬σ. RELATIONAL PARAMETRICITY AND CONTROL 19 Proposition 7.8. The following diagram commutes in a focally parametric λµ2-theory: λxLσ .x ⊥- Lσ @ @ R @ ασ ¬¬σ Cσ σ Corollary 7.9. f : σ1 → σ2 is linear if and only if it is focal. Thus a focal map in a focally parametric λµ2-theory can be characterised just in terms of the monad L which is defined for arbitrary λ2-theory. We believe that the monad L deserves much attention. It has been considered trivial, but now we know that it does characterise an essential notion (focus) in the case of relational parametricity under the presence of control feature. In fact, the story does not end here; under the presence of non-termination or recursion, L behaves like a lifting monad — indeed it is a lifting in the theory of linear parametricity, because Lσ = ∀X.(σ → X) → X = ∀X.!(!σ ⊸ X) ⊸ X ≃ !σ where the last isomorphism follows from the fact that ∀X.!(F [X] ⊸ X) ⊸ X gives an initial algebra of F , cf. [4]. These observations suggest that there exists a general framework similar to (axiomatic or synthetic) domain theory where the lifting monad can be replaced by any strong monad — a continuation monad for example — on which a theory of parametricity for general computational effects can be built. Recently, Alex Simpson has made a progress in this direction, by developing a two-level polymorphic type theory (for interpreting types and algebras of a monad) in a constructive universe [38]. His work fits very well with the case of linear parametricity for recursion; it is plausible that it also explains the case of focal parametricity for first-class control. 8. Conclusion and future work We have studied the relational parametricity for λµ2, first by considering the CPS translation into a parametric fragment of λ2, and then by directly giving a constrained parametricity for λµ2. The later, which we call “focal parametricity”, seems to be a natural parametricity principle under the presence of first-class controls — in the same sense that linear parametricity works under the presence of recursion and non-termination. There remain many things to be addressed in future. In the previous section, we already discussed a research direction towards a relational parametricity for general effects. Below we shall briefly mention some future work more closely related to the main development of this paper. Firstly, we are yet to complete the precise comparison between focal parametricity on λµ2 and the parametricity on the CPS target calculus. This involves some subtle interaction between parametricity and a technical condition (equalising requirement). Secondly, we should study focal parametricity for extensions of λµ2. As we observed, λµ2 with focal parametricity does not have many popular datatypes, e.g. cartesian products, and classical disjunction types which however can be added with no problem. Adding general initial algebras is problematic (having an initial object already means inconsistency), but it might be safe to add certain carefully chosen instances. On the other hand, final coalgebras seem less problematic, though a generic account for them in λµ2 is still missing. 20 MASAHITO HASEGAWA Perhaps we also need to consider the CPS translation of such datatypes (cf. [3]) in a systematic way. An interesting topic we have not discussed in this paper is the Filinski-Selinger duality [6, 36] between call-by-name and call-by-value calculi with control primitives. In fact it is straightforward to consider its second-order extension: in short, universal quantifiers in callby-name (as studied in this paper) amount to existential quantifiers in call-by-value. We are not sure if the call-by-value calculus with existential quantifiers itself is of some interest. However, it can be a good starting point to understand the call-by-value parametric polymorphism (possibly with computational effects), from both syntactic and semantic aspects. In particular, it should provide new insights on the famous difficulty of accommodating first-class continuations in ML type system [11]. Finally, we also should consider if there is a better (ideally semantic) formulation of focal relations. In this paper we only consider those coming from focal maps, but it seems natural to regard a subalgebra (of the double-negation monad) of Cσ1 ×σ2 as a focal relation between σ1 and σ2 , where we assume the presence of cartesian product σ1 × σ2 . This looks very closely related to Pitts’ ⊤⊤-closed relations for λ2 with recursion [28]. Acknowledgement I thank Ken-etsu Fujita for discussions and cooperations related to this work. I am also grateful to Ryu Hasegawa, Paul-André Melliès and Alex Simpson for comments, discussions and encouragements. References [1] M. Abadi, L. Cardelli, and P.-L. Curien. Formal parametric polymorphism. Theoret. Comput. Sci. 121:9–58, 1993. [2] Z.M. Ariola and H. Herbelin. Minimal classical logic and control operators. In Proc. Automata, Languages and Programming, Springer Lecture Notes in Comput. Sci. 2719, pp.871–885, 2003. [3] G. Barthe and T. Uustalu. CPS translating inductive and coinductive types. In Proc. Partial Evaluation and Semantics-Based Program Manipulation, pp.131–142, 2002. [4] G.M. Bierman, A.M. Pitts, and C.V. Russo. Operational properties of Lily, a polymorphic linear lambda calculus with recursion. In Proc. Higher Order Operational Techniques in Semantics, Electronic Notes in Theoretical Computer Science 41, 2000. [5] B.P. Dunphy. Parametricity as a Notion of Uniformity in Reflexive Graphs. PhD thesis, University of Illinois, 2002. [6] A. Filinski. Declarative continuations: an investigation of duality in programming language semantics. In Proc. Category Theory and Computer Science, Springer Lecture Notes in Comput. Sci. 389, pp.224– 249, 1989. [7] K. Fujita. Galois embedding from polymorphic types into existential types. In Proc. Typed Lambda Calculi and Applications, Springer Lecture Notes in Comput. Sci. 3461, pp.194–208, 2005. [8] C. Führmann. Varieties of effects. In Proc. Foundations of Software Science and Computation Structures, Springer Lecture Notes in Comput. Sci. 2303, pp.144–159, 2002. [9] J.-Y. Girard. Interprétation fonctionnelle et élimination des coupures de l’arithmétique d’ordre supérieur. Thèse d’Etat, Université Paris VII, 1972. [10] J.-Y. Girard. Linear logic. Theoret. Comp. Sci. 50:1–102, 1987. [11] B. Harper, B.F. Duba and D. MacQueen. Typing first-class continuations in ML. J. Funct. Programming 3(4):465–484. [12] M. Hasegawa. Semantics of linear continuation-passing in call-by-name. In Proc. Functional and Logic Programming, Springer Lecture Notes in Comput. Sci. 2998, pp.229–243, 2004. RELATIONAL PARAMETRICITY AND CONTROL 21 [13] M. Hasegawa, Relational parametricity and control (extended abstract). In Proc. Logic in Computer Science, pp.72–81, 2005. [14] M. Hasegawa and Y. Kakutani. Axioms for recursion in call-by-value. Higher-Order and Symbolic Comput. 15(2/3):235–264, 2002. [15] R. Hasegawa. Categorical data types in parametric polymorphism. Math. Struct. Comp. Sci. 4(1):71– 109, 1994. [16] M. Hofmann and T. Streicher. Completeness of continuation models for λµ-calculus. Inf. Comput. 179(2):332–355, 2002. [17] B. Jacobs. Categorical Logic and Type Theory. Elsevier, 1999. [18] Y. Kakutani. Duality between call-by-name recursion and call-by-value iteration. In Proc. Computer Science Logic, Springer Lecture Notes in Comput. Sci. 2471, pp.506–521, 2002. [19] Y. Kakutani and M. Hasegawa. Parameterizations and fixed-point operators on control categories. Fundam. Inform. 65(1/2):153–172, 2005. [20] J. Lambek and P. Scott (1986) Introduction to Higher-order Categorical Logic. Cambridge University Press. [21] R. Matthes. Parigot’s second order λµ-calculus and inductive types. In Proc. Typed Lambda Calculi and Applications, Springer Lecture Notes in Comput. Sci. 2044, pp.329–343, 2001. [22] E. Moggi. Notions of computation and monads. Inf. Comput. 93(1):55–92, 1991. [23] K. Nakazawa and M. Tatsuta. Strong normalization proof with CPS-translation for second order classical natural deduction. J. Symb. Log. 68(3):851–859, 2003. Corrigendum: J. Symb. Log. 68(4):1415–1416, 2003. [24] C.-H.L. Ong. A semantic view of classical proofs: type-theoretic, categorical, and denotational characterizations (preliminary extended abstract). In Proc. Logic in Computer Science, pp.230–241, 1996. [25] C.-H.L. Ong and C.A. Stewart. A Curry-Howard foundation for functional computation with control. In Proc. Principles of Programming Languages, pp.215–227, 1997. [26] M. Parigot. λµ-calculus: an algorithmic interpretation of classical natural deduction. In Proc. Logic Programming and Automated Reasoning, Springer Lecture Notes in Comput. Sci. 624, pp.190–201, 1992. [27] M. Parigot. Proofs of strong normalisation for second order classical natural deduction. J. Symb. Log. 62(4):1461–1479, 1997. [28] A. Pitts, Parametric polymorphism and operational equivalence. Math. Struct. Comp. Sci. 10:321–359, 2000. [29] G.D. Plotkin. Call-by-name, call-by-value, and the λ-calculus. Theoret. Comput. Sci. 1(1):125–159, 1975. [30] G.D. Plotkin. Type theory and recursion (extended abstract). In Proc. Logic in Computer Science, pp.374, 1993. [31] G.D. Plotkin and M. Abadi. A logic for parametric polymorphism. In Proc. Typed Lambda Calculi and Applications, Springer Lecture Notes in Comput. Sci. 664, pp.361–375, 1993. [32] A.J. Power and E. Robinson. Premonoidal categories and notions of computation. Math. Struct. Comp. Sci. 7(5):453–468, 1997. [33] J.C. Reynolds. Towards a theory of type structure. In Proc. Colloque sur la Programmation, Springer Lecture Notes in Comput. Sci. 19, pp.408–425, 1974. [34] J.C. Reynolds. Types, abstraction and parametric polymorphism. In Proc. IFIP 9th World Computer Congress, Information Processing 83, pp.513–523, 1983. [35] A. Sabry. Note on axiomatizing the semantics of control operators. Tech. Rep. CIS-TR-96-03, University of Oregon, 1996. [36] P. Selinger. Control categories and duality: on the categorical semantics of the lambda-mu calculus. Math. Struct. Comp. Sci. 11(2):207–260, 2001. [37] P. Selinger. Some remarks on control categories. Manuscript, 2003. [38] A. Simpson. Relational parametricity for computational effects. Manuscript, 2006. [39] T. Streicher and B. Reus. Classical logic, continuation semantics and abstract machines. J. Funct. Program. 8(6):543–572, 1998. [40] I. Takeuti. An axiomatic system of parametricity. Fundam. Inform. 33(4):397–432, 1998. [41] P. Taylor. Sober spaces and continuations. Theory and Applications of Categories 10(12):248–300, 2002. 22 MASAHITO HASEGAWA [42] H. Thielecke. Categorical Structure of Continuation Passing Style. PhD thesis, University of Edinburgh, 1997. [43] H. Thielecke. Answer type polymorphism in call-by-name continuation passing. In Proc. European Symposium on Programming, Springer Lecture Notes in Comput. Sci. 2986, pp.279–293, 2004. [44] P. Wadler. Theorems for free! In Proc. Functional Programming Languages and Computer Architecture, pp.347–359, 1989. 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, 559 Nathan Abbott Way, Stanford, California 94305, USA.
6cs.PL
An Analysis on the Influence of Network Topologies on Local and Global Dynamics of Metapopulation Systems Daniela Besozzia Paolo Cazzanigab Dario Pescinib Giancarlo Maurib a Università degli Studi di Milano Dipartimento di Informatica e Comunicazione Via Comelico 39, 20135 Milano, Italy [email protected] b Università degli Studi di Milano-Bicocca Dipartimento di Informatica, Sistemistica e Comunicazione Viale Sarca 336, 20126 Milano, Italy cazzaniga/pescini/[email protected] Metapopulations are models of ecological systems, describing the interactions and the behavior of populations that live in fragmented habitats. In this paper, we present a model of metapopulations based on the multivolume simulation algorithm tau-DPP, a stochastic class of membrane systems, that we utilize to investigate the influence that different habitat topologies can have on the local and global dynamics of metapopulations. In particular, we focus our analysis on the migration rate of individuals among adjacent patches, and on their capability of colonizing the empty patches in the habitat. We compare the simulation results obtained for each habitat topology, and conclude the paper with some proposals for other research issues concerning metapopulations. 1 Introduction The field of metapopulations ecology deals with the study of spatial systems describing the behavior of interacting populations that live in fragmented habitats [17]. The purpose of these models is to understand how the local and global dynamics of metapopulation systems, usually balanced between local extinctions and new colonizations of unoccupied patches, depend on the spatial arrangement of the habitat. Consequently, relevant insights into related fields of ecological research, such as evolutionary ecology or conservation and landscape management, can be achieved. Indeed, the topology of fragmented habitats potentially holds relevant implications for the persistence of populations, and their robustness against natural or anthropogenic disturbance [36]. Recently, in addition to ever increasing applications of graph-based methods for the analysis of complex networks in cell biology [1, 2], graph theory has also been applied to the study of metapopulations systems. In graph models of metapopulations, nodes are used to represent habitat patches, and graph edges are used to denote some functional connections between patches (typically related to the dispersal of individuals). Attributes can be associated to nodes, describing the quality or dimension of patches, while different types of edges can be exploited to represent the distance between connected patches, the rate of dispersal between a couple of patches, or simply whether two patches are connected or not. Metapopulation models using graph-based methods [36, 15] are simple to implement and require relatively few data for their definition, while individual-based models implement more detailed aspects, P. Milazzo and M.J. Pérez Jiménez (Eds.): Applications of Membrane Computing, Concurrency and Agent-based Modelling in Population Biology (AMCA-POP 2010) EPTCS 33, 2010, pp. 1–17, doi:10.4204/EPTCS.33.1 c D. Besozzi et al. The influence of network topologies on metapopulations dynamics 2 concerning the nature and the interaction of populations [34, 4]. Both types of modeling approaches are useful for the analysis of specific features of metapopulations but, while the first focuses on the properties of the habitat topology, the second is more concerned with the emergent dynamics. In this paper, we present a stochastic multivolume model of metapopulations, which integrates the explicit representation of interactions between the individuals of the populations – and therefore allows to simulate the emergent local and global dynamics – with a graph description of the habitat topology – which allows to investigate the influence of distinct spatial structures on the dynamics. This model, which represents a simplified extension of a previous metapopulation model that we introduced in [7, 6], is based on the multivolume stochastic simulation algorithm tau-DPP [11, 8], a stochastic class of membrane systems. Membrane systems, or P systems, were introduced in [27] as a class of unconventional computing devices of distributed, parallel and nondeterministic type, inspired by the compartmental structure and the functioning of living cells. The basic model consists of a membrane structure where multisets of objects evolve according to given evolution rules. A comprehensive overview of P systems and of its many applications in various research areas, ranging from Biology to Linguistics to Computer Science, can be found in [28, 12, 29]. In tau-DPP, the distinct compartments of any multivolume model can be arranged according to a specified hierarchy (e.g., a membrane structure), under the additional assumption that the topological structure and the volume dimensions do not change during the system evolution (each volume is assumed to satisfy the standard requirements of the classical stochastic simulation algorithm, see [16] and [5] for more details). Inside each volume, two different types of rules can be defined: the internal rules, which modify the objects contained inside the volume where they take place (in the case of metapopulation, they describe the growth and death of population individuals according to the Lotka-Volterra model of preys and predators), and the communication rules, which are used to move the objects between adjacent volumes (in the case of metapopulation, they describe the migration of population individuals). In this paper, tau-DPP is exploited to analyze the emergent dynamics of metapopulation systems, where the focus is on the influence that the topology of patches has on the migration of individuals, and their capability to colonize other patches in the habitat. To this purpose, we consider six different habitat topologies, formally described by graph structures, and analyze how the topological structure of patchto-patch connections, and the rate of individual dispersal between connected patches, influence the local and global dynamics of a metapopulation. In particular, we will first consider how a given topology and a fixed dispersal rate between patches can influence the prey-predators dynamics, and then we will focus on the colonization of empty patches, starting from the dispersal of predators that live in a few patches which occupy peculiar positions in the given network topology. The paper is structured as follows: in Section 2 we present the concept of metapopulations in Ecology, and then describe the multivolume model of metapopulations by focusing, in particular, to the different habitat topologies. In Section 3 we will show the simulation results concerning the influence of these habitat topologies on the emergent dynamics of metapopulations, considering the effects of predators dispersal and colonization. Finally, in Section 4 we conclude the paper with some final remarks and several proposals for further research issues concerning metapopulations. 2 Metapopulations In this section, we first provide a brief introduction to the most relevant features of metapopulations, concerning both the topology of the habitats and the emergent dynamics. Then, we describe the modeling approach used in this paper, that is based on a stochastic class of membrane systems, which will be used D. Besozzi et al. 3 in Section 3 to analyze the influence of different network topologies on the dynamics of metapopulations. 2.1 Dynamical models of interacting populations in Ecology Since its introduction in [22], the concept of metapopulations (also called multi-patch systems) has been extensively applied in Ecology to analyze the behavior of interacting populations, to the purpose of determining how fragmented habitats can influence various aspects of these systems, such as local and global population persistence, or the evolution of species [18]. Lately, this topic has been largely employed for other populations species, living in both natural and artificial/theoretical fragmented landscapes [17]. A metapopulation consists of local populations, living in spatially separated habitats called patches – which can be characterized by different areas, quality or isolation – connected each other through a dispersal pool, which is the spatial place where individuals from a population spend some lifetime during the migration among patches. In multi-patch systems, two principal types of dynamics exist: on the one hand, the individuals of the different populations can have local interactions inside each patch (according to a given dynamical model, e.g., the Lotka-Volterra system of interaction between preys and predators [25]); on the other hand, the dispersal of individuals among mutually connected patches can influence the global behavior of the whole system [20, 21, 33, 37]. The dispersal of individuals, which is usually dependent on the distance between patches, may reduce the local population growth, and thus increase the extinction risk, which can be due also to environmental and demographical stochasticity. Hence, the persistence of populations is assumed to be balanced between local extinctions and the process of colonization, that is, the establishment of new populations in empty patches [17]. Several theoretical frameworks for metapopulation analysis have been defined up to now, remarking specific properties of multi-patch systems which have been either explicitly or implicitly considered in these modeling methods (see, e.g., [14, 17, 24, 19] for further details). For instance, referring to the landscape, most theoretical models take care of the spatial structure of the habitat, the local quality of the environment, the patch areas and their mutual connectivity (or isolation), in order to capture the effect of habitat fragmentation on species persistence. In fact, good local conditions can determine the growth and the survival of populations inside the patches, and high patch connectivity can decrease local extinction risk. Moreover, as dispersal and colonization are distance-dependent elements, they can be used to account for the importance of real landscape structures. Referring to population interactions and dynamics, colonization can depend or not on the cooperation of migrating individuals (in the first case, it is called “Allee effect”). Models not accounting for within-patch dynamics – but only assuming whether a patch is occupied or not – usually consider local dynamics on a faster time scale with respect to the global dynamics, and also neglect the dependence of colonization and extinction rates on population sizes. Finally, regional stochasticity can account for “bad” or “good” years over the local environmental quality, which depends on, e.g., the weather conditions which affect sustenance resource availability and, once more, they can influence the growth and survival of populations. Recently, graph-based models for metapopulations have started to be more and more defined because of the intuitive and visual way they hold for the representation of these ecological systems (see [36, 23, 35] and references therein). In these models, nodes represent habitat patches and graph edges denote functional connections between patches (typically related to the dispersal of individuals). In addition, attributes can be associated to nodes, describing the quality or dimension of patches, and different types of edges can be adopted to represent the distance between connected patches, the rate of dispersal between a couple of patches, or simply whether two patches are connected or not. These models allow to make insights into the features of habitat distribution, such as the predominant importance of some nodes or clusters of nodes with respect to other characteristics of metapopulation, like their dynamics, the 4 The influence of network topologies on metapopulations dynamics vulnerability to disturbance, the persistence of populations according to dispersal, and so on. These results open promising perspective in related research fields as evolutionary ecology, conservation biology, epidemiology, management and design of natural reserves. 2.2 A P system–based model of metapopulations: focusing on network topologies Most of the issues discussed in Section 2.1 were explicitly considered in our previous model for metapopulations [6, 7]. In those works, metapopulation models were based on a class of membrane systems called DPP [31, 30], which were used to execute qualitative stochastic simulations of the local and global dynamics of metapopulations. In particular, in [7] we introduced a model of metapopulations with predator-prey dynamics, where additional features were used in order to catch and better describe relevant properties of the modeled system. For instance, the regions of the membrane structure were represented as nodes of a weighted graph with attributes, where the weight associated to edges corresponds to the “distance” among connected regions, while attributes specify their surface dimension. These new features are necessary in order to outline the spatial distribution of patches and the relevant additional features associated to them: the dimension of a patch is needed to define the density of the populations living inside that patch, while the distance is needed to identify isolated patches, as well as to define the dispersal rates of migrating individuals. Moreover, by using some rules which do not modify the objects on which they act (the so-called “mute rules”), we modified the classical view of maximal parallelism, by allowing the maximal application of rules but, at the same time, reducing the maximal consumption of objects. The model was applied to investigate some emergent metapopulation behaviors, such as the influence of patch dimension, patch-to-patch distance, stochastic breeding, the dynamics underlying migration and colonization, the effects due to isolated patches, etc. Then, in [6] we extended the analysis of that model by focusing on periodic resource feeding strategies, and compared different systems where either increasing, decreasing, stationary or purely feeding stochastic phases were defined inside each patch. We have shown there, for instance, how the seasonal variance can transform the basic Lotka-Volterra dynamics inside each patch into a more complex dynamics, where the different phases of a feeding cycle can be identified through the effect that they have on the standard oscillations of preys and predators. In this section, we present a simplified model of metapopulations, which exploits the multivolume stochastic simulation algorithm tau-DPP [11, 5]. With respect to the previous model, here we will not need to use the concept of mute rules, as the probabilistic choice and applications of rules is already embedded in the tau leaping algorithm [10], on which tau-DPP is based. Moreover, we will not consider the presence of the dispersal pool, but we will instead focus our analysis on the direct communication of individuals among interconnected patches, according to some fixed network topologies. In order to compare the influence of each network, we have decided to perform our analysis on a total of 6 patches, spatially arranged in different ways. Namely, we assume that these network topologies can be described by graphs having the same number of nodes, but distinct connections, such as the chain, grid, star, ring, complete or random structure (see graphs a, b, c, d, e, f , respectively, in Fig. 1). From now on, we will refer to the formal data structure by using the term ‘graph’, and use the term ‘network’ to denote the topological relationship on each graph. Formally, each network topology ν ∈ {a, b, c, d, e, f }, can be generally described by a weighted undirected graph Gν = (N∆ν , E ν , wν ) where: • N∆ν is the set of nodes, such that each node pi ∈ N∆ν , i=1, . . ., 6, is characterized by a value δ (pi ) ∈ ∆ (with ∆ being a set of attributes of some kind); • E ν ⊆ {(pi , p j ) | pi , p j ∈ N∆ν } is the set of (undirected) edges between nodes; D. Besozzi et al. 5 Figure 1: Network topologies. • wν : E ν → R+ is the weight function associating a cost to each edge. In the case of metapopulations, the set of nodes N∆ν coincides with the set of patches, the attribute of a node represents the area of the patch, the edges characterize which patches are directly reachable from any patch (self-edges might exist as well but will not be considered in this work), and the weight wνi, j of an edge (pi , p j ) represents a cost to measure the effort that individuals have to face when moving from patch pi to p j . Given a network topology ν , we denote by Ad j(pi )ν the set of nodes that are directly connected to any node pi , that is, Ad j(pi )ν = {p j ∈ N∆ν | ∃ (pi , p j ) ∈ E ν }. We also denote by deg(pi )ν the degree of patch pi , that is, the number of patches directly connected to pi (formally, deg(pi )ν = card(Ad j(pi )ν )). We outline that, in what follows, we will assume that: (1) wνi, j = 1 for each (pi , p j ) ∈ E ν and each ν ∈ {a, b, c, d, e, f }, that is, all edges have the same cost; (2) δ (pi ) = 1 for each pi ∈ N∆ν and each ν ∈ {a, b, c, d, e, f }, that is, all patches have the same dimension. The rational behind this is that, in this paper, we focus our attention on the influence that different topologies of the habitat network can have on the local and global dynamics of metapopulations, regardless of the local features of each patch, or of the distances between patches. These features might be naturally added in further works related to this model, where real data can be used to define a specific model of some metapopulation systems. In addition to the chosen network topology, this model of metapopulations also considers the presence of species individuals, which locally interact according to a chosen dynamics, and give rise to global dynamics thanks to the dispersal processes. To this purpose, in this paper we assume that each patch is characterized by the Lotka-Volterra (LV) model describing the interaction between the individuals of two populations, namely preys and predators. Inside each patch, the LV model is described by the following set of internal rules: r1 : AX → X X r2 : XY → YY r3 : Y →λ where X denotes the preys, Y denotes the predators, A denotes the sustenance resources and λ is the The influence of network topologies on metapopulations dynamics 6 empty symbol. Rules r1 and r2 model the growth of preys and predators, respectively, while rule r3 models the death of predators. Each rule is also characterized by a stochastic constants (expressed in time−1 ), that is used – together with the current amounts of individuals occurring in the patch – to evaluate its application probability step by step, according to the tau leaping algorithm (see [10, 11, 8] for more details). All the simulations shown hereafter have been executed using the following values of stochastic constants and of initial amount of preys, predators, and sustenance resources: c1 =0.1, c2 =0.01, c3 =10, X0 =Y0 =1000, A0 =200 (the value of A is fixed for the entire duration of each simulation). The simulations have been performed with the software BioSimWare [5], that implements different stochastic simulation algorithms for both single and multivolume systems. The software is available for free download at http://bimib.disco.unimib.it/index.php/Software. In Fig. 2 we show the oscillating dynamics (left side) of preys and predators in the single patch, obtained with this choice of parameters, and the corresponding phase space (right side). These figures can be considered as reference to compare and discuss the dynamics obtained in the multi-patch model, as described in Section 3. 5000 5000 X Y 4500 4500 4000 4000 3500 3500 3000 2500 Y Individuals 3000 2500 2000 2000 1500 1500 1000 1000 500 0 500 0 2 4 6 8 10 0 500 Time [a.u.] 1000 1500 2000 2500 3000 3500 X Figure 2: The Lotka-Volterra dynamics in the single patch: oscillations in preys, X , and predators, Y (left side), and corresponding phase space (right side). The single patch model is then extended to a multi-patch model where, inside each patch pi of each network topology ν , we add as many communication rules as the number of patches connected to pi (that is, a total of deg(pi )ν rules inside each patch). These rules are needed to move population individuals among the various patches of the network, thus allowing to analyze the effects of migration and colonization in the metapopulation. This is done by attaching a destination target to each communication rule, specifying the destination patch, as it is usually done in P systems. Formally, in each patch pi of network ν , we add the so-called dispersal rules rd p j : Y → (Y,target(p j )), for each p j ∈ Ad j(pi )ν . Similarly to the local rules r1 , r2 , r3 , the probability of applying each dispersal rule is determined by using its stochastic constant cd p j , whose values will be given in the next section to consider different migration rates. D. Besozzi et al. 3 7 The influence of network topologies on metapopulation dynamics In this section we analyze how the topological structure of patch-to-patch connections, and the rate of individual dispersal between connected patches, influence the local and global dynamics of a metapopulation. In particular, in Section 3.1 we consider how a given topology and a fixed dispersal rate can influence the prey-predators dynamics, while in Section 3.2 we focus on the capability of colonization of empty patches, starting from the dispersal of predators living in a few patches which occupy peculiar positions in the given network topology. 3.1 Network topologies and migration In this section, we analyze the role of migration and compare the six network topologies with respect to four different conditions for the dispersal rules. Namely, we assume that each patch of each topology is initialized with a complete LV model as given in Section 2.2, where the value of the stochastic constant cd p j for the dispersal of predators, in each patch pi ∈ N∆ν , can assume one of the following values: 1. cd p j =1, for each p j ∈ Ad j(pi )ν ; 2. cd p j =10, for each p j ∈ Ad j(pi )ν ; 3. cd p j =20, for each p j ∈ Ad j(pi )ν ; 10 4. cd p j = deg(p , for each p j ∈ Ad j(pi )ν . i) By considering the first condition as reference, the power of dispersal in the second (third) condition is ten-fold (twenty-fold) the first one, irrespective of the position that patch pi occupies in the considered network. In other terms, the flux of dispersal from each patch, in the first three conditions, results amplified by the number of connections that each patch has with respect to the other patches in the network. On the contrary, the fourth condition corresponds to the situation when, for each patch p j ∈ Ad j(pi )ν , the sum of the values of constants of dispersal rules in pi is always equal to 10, but the rate of dispersal along each edge from pi to p j depends on the degree of pi . For instance, in the network topology a (Fig. 1), the value of cd p j in patches p0 and p5 is equal to 10, while the value of cd p j in patches p1 , . . ., p4 is equal to 5; in the network topology c (Fig. 1), the value of cd p j in patch p0 is equal to 2, while the value of cd p j in all other patches is equal to 10, and so on. So doing, we can weigh the dispersal of predators according to the position of each patch in the network, and simulate a situation where the flux of dispersal from each patch towards its adjacent patches is uniform throughout the whole network. For space limits, in Fig. 3 we present the phase spaces of all network topologies, obtained from simulations of the fourth condition only. For each network, in particular, we show the phase space of the local dynamics of each patch. The graphics show that, in the case of the chain graph (phase space (a)), the patches having different degrees are characterized by different dynamics: in fact, patches p0 and p5 show a different behavior with respect to the other patches. In addition to the role of patch degree, we can see that also the position of patches in the graph plays a central role: despite the fact that patches p1 , p2 , p3 and p4 have all the same degree, the dynamics inside p1 and p4 differs from that of patches p2 and p3 . This is due to the different power of dispersal rules of their two neighbors, namely cd p j = 10 in patches p0 , p5 , while cd p j = 5 in patches p2 , p3 , which cause a larger flux of predators dispersal towards patches p1 and p4 . The global effect is the presence of three different dynamics (one in p0 , p5 , another one in p1 , p4 , and a third one in p2 , p3 ), all of which are characterized by oscillations in X and Y with no regular amplitudes (compare these phase spaces with the standard LV phase space in the single patch model The influence of network topologies on metapopulations dynamics 8 (a) chain Y (b) grid 4000 3500 3000 2500 2000 1500 1000 500 Y 4000 3500 3000 2500 2000 1500 1000 500 3000 3000 2500 2500 0 0 2000 1 2 Patch 1500 2 Patch 1000 3 2000 1 X 1500 500 4 5 X 1000 3 500 4 0 5 0 (d) ring (c) star Y 8000 7000 6000 5000 4000 3000 2000 1000 0 Y 5000 4500 4000 3500 3000 2500 2000 1500 1000 500 3500 3500 3000 0 3000 0 2500 1 2 Patch 1500 2500 1 2000 X 2 Patch 1000 3 2000 500 4 5 500 4 0 5 0 (e) complete Y 4000 3500 3000 2500 2000 1500 1000 500 X 1500 1000 3 (f) random Y 5000 4500 4000 3500 3000 2500 2000 1500 1000 500 2500 2000 0 1500 X 1 2 Patch 1000 3 500 4 5 0 3500 3000 0 2500 1 2000 2 Patch 1500 X 1000 3 500 4 5 0 Figure 3: The power of migration: LV dynamics in the phase space of each network topology. D. Besozzi et al. 9 given in Fig. 2, right side, and also with the phase spaces in Fig. 3, graphics (d) and (e)). Furthermore, we can evidence that these oscillations are characterized by an initial wider amplitude, which is reduced during time. Similarly, the dynamics of the patches in the grid graph (phase space (b)) is influenced only by the number of edges; in this phase space, we can identify two different types of dynamics: one for the patches with three edges (p1 , p4 ) and another one for those with two connections. In the star graph (phase space (c)), the LV dynamics endures in all patches apart from p0 , where the number of preys X collapses to an attractor in zero, and no oscillations according to the LV dynamics in both X and Y can be established. In this patch, the number of predators fluctuates in a certain range, because of their dispersal from/to the other patches. Basically, in this condition patch p0 , that represents the center of the star, becomes a local area of the habitat where only dispersal occurs. The simulations for the ring and complete graphs (phase spaces (d), (e)) show very similar results: in both cases, all patches in each graph have the same degree (two in the first configuration and five in the second one), leading to regular oscillations in X and Y with almost constant amplitude. The results concerning the last configuration, the random graph (phase space (f)), show a combination of the effects described above. In particular, the dynamics of the patches differ each other depending on the degree of the patches themselves; moreover, in p4 , which is characterized by the highest degree, the high number of incoming predators (migrating from the four adjacent patches) leads to the extinction of preys (similarly to what happens in patch p0 of the star graph). We also tested, for each network topology, the other three conditions listed above. In these cases, the results have shown that the amplification of the power of dispersal with respect to the patch degree gives rise to a balance between the incoming and migrating individuals, which leads to comparable LV dynamics for all networks, with regular oscillations inside each patch (data not shown). 3.2 Network topologies and colonization In this section, we compare the six network topologies with respect to the capability of colonizing the empty patches that each network contains, starting from the patches that contain a complete LV model and that occupy a peculiar position in that network . We recall that in this work we are considering only the migration of predators, hence the empty patches are hereby assumed to contain no predators but only an initial amount of preys. In each network ν , the set of patches initialized with the complete LV model will be denoted as pνLV . To test the feature of colonization, we consider four different initial conditions, hereby denoted as ICk, k=1, . . . , 4, where Y0 =0 and: 1. IC1 is characterized by cd p j =1 and X0 =10; 2. IC2 is characterized by cd p j =1 and X0 =100; 3. IC3 is characterized by cd p j =10 and X0 =10; 4. IC4 is characterized by cd p j =10 and X0 =100. In each given network, all empty patches are initialized with the same chosen condition ICk, besides the patches in the set pνLV that are initialized with a standard LV model, having the communication constant cd p j equal to the one given in the chosen ICk, and all other parameters as given in Section 2.2. With this type of analysis, we expect to determine which features of the network topologies are more relevant with respect to the colonization of empty patches, under a given initial condition. All conditions have been tested for each network and, for each fixed initial condition, different sets of pνLV have been considered. In the following, for space limits, we present only some results of these simulations, and The influence of network topologies on metapopulations dynamics 10 briefly discuss the results obtained in the other analyzed conditions. In each of the following graph, preys (X ) are represented with solid lines, while predators (Y ) are represented with dashed lines. We start by considering the network ν = a, that is, the chain graph. In this case, we present the results obtained in all the initial conditions IC1, IC2, IC3, IC4, considering three sets of LV patches, namely paLV ={p0 , p5 }, paLV ={p2 } and paLV ={p0 }. In the first case (paLV ={p0 , p5 }, shown in Fig. 4) we can see that, when the power of dispersal is low (IC1, IC2), the time required by the predators to reach the patches p2 and p3 , which are at the highest distance from p0 and p5 , allows an initial uncontrolled growth of the preys in p2 and p3 , which subsequently undergo extinction as soon as the predators enter the patch. Such “delay” in the local establishment of a population of predators is the effect that prevent the formation of the LV dynamics; this effect, as shown hereafter, is a common aspect of all network topologies. Concerning the chain network, this is more evident in condition IC2, where the initial amount of preys inside the empty patches is higher than IC1: in this case, the LV dynamics can be established only in four of the six patches. On the other hand, with the initial conditions IC3 and IC4, the power of dispersal is sufficient to colonize all of the patches, irrespectively of the numbers of preys that are initially present in the empty patches and of the position of the LV complete patch. Similar results for the chain network have been obtained in the second analyzed case (paLV ={p2 }, shown in Fig. 5) and in the third case (paLV ={p0 }, data not shown). 12000 14000 12000 10000 Individuals Individuals 10000 8000 6000 8000 6000 4000 4000 2000 00 1 2 3 Patch 4 5 0 2 4 6 8 10 12 14 16 18 2000 20 00 Time [a.u.] 1 2 3 Patch 4500 4 5 0 2 4 6 8 10 12 14 16 18 20 Time [a.u.] 6000 4000 5000 3000 Individuals Individuals 3500 2500 2000 1500 4000 3000 2000 1000 500 00 1 2 Patch 3 4 5 0 2 4 6 8 10 12 14 16 18 Time [a.u.] 20 1000 25 20 00 15 1 2 Patch 10 3 4 Time [a.u.] 5 5 0 Figure 4: Colonization in the chain topology, with paLV ={p0 , p5 } and initial conditions IC1 (top left), IC2 (top right), IC3 (bottom left), IC4 (bottom right). D. Besozzi et al. 11 16000 25000 14000 20000 Individuals Individuals 12000 10000 8000 15000 10000 6000 4000 5000 2000 00 1 2 3 Patch 4 5 0 2 4 6 8 10 12 14 16 18 20 00 Time [a.u.] 1 2 3 Patch 6000 4 5 0 2 4 6 8 10 12 14 16 18 20 Time [a.u.] 9000 8000 5000 Individuals Individuals 7000 4000 3000 2000 6000 5000 4000 3000 2000 1000 00 1 2 Patch 3 4 5 0 2 4 6 8 10 12 14 16 18 Time [a.u.] 20 1000 00 1 2 Patch 3 4 5 0 2 4 6 8 10 12 14 16 18 20 Time [a.u.] Figure 5: Colonization in the chain topology, with paLV ={p2 } and initial conditions IC1 (top left), IC2 (top right), IC3 (bottom left), IC4 (bottom right). For the network topology ν = b, that is, the grid graph, we show the results obtained in the cases IC1, when pbLV ={p0 } (Fig. 6, left side) and pbLV ={p1 } (Fig. 6, right side). According to the position of the LV complete patches in this network topology, we can see that, in the first case, the predators are capable to colonize patches p1 and p3 , that are directly connected to p0 , and patch p4 , that is directly connected to both p1 and p3 . However, patches p2 and p5 cannot be colonized. In the second case, the higher degree of the LV complete patch p1 , allows the colonization of all patches. With the initial condition IC2 (data not shown), in the other tested cases pbLV ={p0 } and pbLV ={p1 }, only the patches directly connected to p0 and p1 , respectively, are colonized by the predators. For the network topology ν = c, that is, the star graph, we show the results obtained in the cases IC1, when pcLV ={p1 } (Fig. 7, left side) and pcLV ={p1 , p3 } (Fig. 7, right side). According to the position of the LV complete patches in this network topology, we can see that, in the first case, no patches are colonized because of the high degree of p0 (which is the only patch connected to p1 ) that spreads the predators over the other patches, thus preventing the formation of the LV dynamics. In the second case, the combined effect of migration from p1 and p3 allows the colonization of patch p0 , which is directly connected with both of them. We then performed other simulations starting with conditions IC3 and IC4: in these cases, the higher value of cd p j allows the colonization of every patch (except from patch p0 ) independently from the initial position of the LV complete patch (data not shown). On the contrary, when The influence of network topologies on metapopulations dynamics 12 16000 12000 14000 10000 Individuals Individuals 12000 10000 8000 8000 6000 6000 4000 4000 2000 00 1 2 3 Patch 4 5 0 2 4 6 8 10 12 14 16 18 2000 20 00 Time [a.u.] 1 2 3 Patch 4 5 0 2 4 6 8 10 12 14 16 18 20 Time [a.u.] Figure 6: Colonization in the grid topology, with initial condition IC1 and pbLV ={p0 } (left), pbLV ={p1 } (right). 25000 14000 12000 20000 Individuals Individuals 10000 15000 8000 6000 10000 4000 5000 00 1 2 3 Patch 4 5 0 2 4 6 8 10 12 14 16 18 2000 20 00 Time [a.u.] 1 2 3 Patch 4 5 0 2 4 6 8 10 12 14 16 18 20 Time [a.u.] Figure 7: Colonization in the star topology, with initial condition IC1 and pcLV ={p1 } (left), pcLV ={p1 , p3 } (right). 18000 20000 16000 18000 16000 14000 12000 Individuals Individuals 14000 10000 8000 12000 10000 8000 6000 6000 4000 4000 2000 00 1 2 Patch 3 4 5 0 2 4 6 8 10 12 14 16 18 Time [a.u.] 20 2000 00 1 2 Patch 3 4 5 0 2 4 6 8 10 12 14 16 18 20 Time [a.u.] Figure 8: Colonization in the ring topology, with pdLV ={p0 } and initial condition IC1 (left) and IC2 (right). D. Besozzi et al. 13 we assume pcLV ={p0 }, that is, the center of the star, then all patches are fully colonized, independently from the considered initial condition. For the network topology ν = d, that is, the circular graph, we show the results obtained in the cases IC1 and IC2, when pdLV ={p0 } (Fig. 8, left and right sides, respectively). Starting with the initial condition IC2, the predators are capable of colonizing only the patches directly connected to the LV complete patch p0 , while in the case IC1, also patch p4 (being at distance 2 from the LV complete patch) is colonized. These results highlight, in particular, another aspect that was more marginal in the other simulations: the stochastic nature of the communication process and of the growth of preys, which leads to the extinction of preys in patch p2 , while in patch p4 it drives the local behavior to an oscillatory dynamics. For the network topology ν = e, that is, the complete graph, we show the results obtained in the cases IC1, when peLV ={p0 } (Fig. 9, left side) and peLV ={p0 , p3 } (Fig. 9, right side). While in the second case – where the LV dynamics is initially placed in two patches – the predators can colonize all patches, in the first case the colonization of all empty patches fails. Once more, this is an effect of the stochastic noise combined with the low amounts of predators, which is in turn caused by the fact that the higher the number of adjacent patches, the lower the number of predators that persist inside each patch. In all other simulations performed with initial conditions IC3 and IC4, all patches have always been colonized, as the higher values of dispersal rules assure a more uniform spread of predators throughout the network, and thus flattens the influence of migration delay (data not shown). For the network topology ν = f , that is, the random graph, we show the results obtained in the cases f f IC1, when pLV ={p0 } (Fig. 10, left side) and pLV ={p2 } (Fig. 10, right side). According to the position of the LV complete patches in this network topology, we can see that, in the first case, all patches are colonized by predators (similar results are obtained by placing the LV complete model in patch p4 – data not shown). In the second case, patch p5 is not colonized because there is only one path of length 2 which connects it to the initial complete LV patch p2 ; the same holds for patch p3 , which has distance from p2 equal to 3. For similar reasons, considering the case of initial condition IC1, with the LV complete model in patch p3 , the only patch that is not colonized by predators is p2 (data not shown). In all the simulations performed with the initial condition IC2, some of the patches have not been colonized because of the high amount of preys initially occurring in the patches. On the other hand, with the initial conditions IC3, IC4, the power of dispersal allows the colonization of all patches (data not shown). 12000 8000 7000 10000 Individuals Individuals 6000 8000 6000 5000 4000 3000 4000 2000 2000 00 1 2 Patch 3 4 5 0 2 4 6 8 10 12 14 16 18 Time [a.u.] 20 25 1000 20 00 15 1 2 Patch 10 3 4 Time [a.u.] 5 5 0 Figure 9: Colonization in the complete topology, with initial condition IC1 and peLV ={p0 } (left), peLV ={p0 , p3 } (right). The influence of network topologies on metapopulations dynamics 14 12000 16000 14000 10000 Individuals Individuals 12000 8000 6000 10000 8000 6000 4000 4000 2000 00 1 2 Patch 3 4 5 0 2 4 6 8 10 12 14 16 18 Time [a.u.] 20 2000 00 1 2 Patch 3 4 5 0 2 4 6 8 10 12 14 16 18 20 Time [a.u.] f Figure 10: Colonization in the random topology, with initial condition IC1 and pLV ={p0 } (left), f pLV ={p2 } (right). 4 Discussion The fragmented habitats of real metapopulations are usually characterized by complex network topologies. In this paper, we have analyzed six small topologies that can be considered representative of local areas in a structured habitat, and we have investigated the influence that the degree and the position of each patch in the topology can have on the migration of individuals, as well as on the capability of colonizing empty patches. Our analysis suggests that, with respect to the power of migration (Section 3.1), we can identify different behaviours that depend on two characteristics of the topology: on a first level, the local behaviour inside each patch is influenced by its degree. This is especially evident if we compare the network topology described by the circular or complete graphs, with the topology described by the star graph: while in the first case (where all nodes have the same degree) all patches are characterized by a similar (regular) oscillating dynamics, in the second case the most critical node is the center of the star (which has a much higher degree than all other nodes in the same graph). In the latter case, this patch is likely to undergo a local modification of its initial dynamics, due to a more higher incoming migration of individuals from all other adjacent patches. On a second level, assuming in this case that the degree of nodes is equal, then also the position of each patch in the topology matters: for instance, we have seen that in the network topology described by the chain graph – where all nodes, besides the ones at the extremes of the chain, have the same degree – the local dynamics is also influenced by the dynamics of the adjacent patches in the graph. Therefore, in hypothetical habitats where there exist many patches connected in a linear way, our results suggest that the length of the chain might have a negative role in the establishment and in the maintenance of local dynamics. Considering the feature of colonization (Section 3.2), we have evidenced that, in most network topologies, the lack of colonization can be due to the delay of migrating predators with respect to the (uncontrolled) local growth of prey, which then leads to the extinction of preys and the prevention of the LV dynamics. To effectively measure how strong is the power of the delay, it would be interesting to understand whether the local growth of preys can be controlled by inducing their death and thus potentially allowing the establishment of oscillations. Besides this aspect deserving further investigations, our analysis have evidenced that the colonization of empty patches occurs more easily in those patches that are adjacent to the patch(es) initialized with the LV complete model. Once more, this highlights the relevance of the position of the patch(es) where standard oscillations in preys and predators are already D. Besozzi et al. 15 settled at the beginning of the simulation. Indeed, the power of colonization is stronger in the circular and complete networks – where the position of the LV complete patch is irrelevant (as the spread of migrating individuals throughout the network results uniform), and it is weaker in the star network – where the position of the LV complete patch is of primary importance (as the spread of migrating individuals throughout the network strongly depends on whether the patch is placed at the center or at the tips of the star). In addition to the investigations that we have presented in this work, further types of analysis that we plan to perform on metapopulation systems concern, for instance, the study of the aspects considered in this paper (migration, colonization, network topologies, etc.) by assuming other local and global dynamics, e.g., the population growth according to the logistic function. Moreover, an interesting issue that might be investigated is the synchronization of local population dynamics (e.g. by considering the establishment and decay of oscillations in preys and predators) during migration through a given network topology, or in the process of colonization. Concerning the use of graphs, other relevant questions regard the analysis of the dynamics with respect to graph properties, such as different measures of habitat connectivity (centrality indexes) [13, 26]. In this context, for example, the star graph can resemble the notion of hub (a node with high degree) in a typical scale-free network, a structure that is known to be robust to random disturbances but highly vulnerable to deliberate attacks on the hubs [32, 3]. Another topic of interest concerns the fact that various populations can coexist in a common habitat, but have distinct (inter)species dynamics or different dispersal capabilities in that habitat [9]. In cases like this, it would be interesting to construct and analyze different metapopulation models, one for each target species, according to both the patch-to-patch connections and to the specific population dynamics. By comparing and intersecting the results obtained on the distinct network topologies of the common habitat derived in this way, it would be possible to determine the locations of the habitat that are most important for each species, and thus aid the design of natural reserve systems where we can have the most appropriate solution for all species in terms of the maximal improvement of dispersal (reduction of species isolation) and the minimal spread of disturbances (diseases, pathogens, invasive species, etc.) [36]. We believe that our modeling approach opens interesting perspectives and can represent an useful tool for the investigation of a wide range of properties in metapopulation systems. We expect that applications of this model to real cases – characterized by complex habitat networks (where each patch possesses its own features of quality, occupancy, connectivity) and different population dynamics – will aid in the achievement of important results and new perspective in Ecology. References [1] T. Aittokallio & B. Schwikowski (2006): Graph-based methods for analysing networks in cell biology. Briefings in bioinformatics 7(3), pp. 243–255. Available at http://dx.doi.org/10.1093/bib/bbl022. [2] R. Albert (2005): Scale-free networks in cell biology. Journal of Cell Science 118(21), pp. 4947–4957. Available at http://dx.doi.org/10.1242/jcs.02714. [3] R. Albert & A. L. Barabási (2002): Statistical mechanics of complex networks. Reviews of Modern Physics 74(1), pp. 47–97. Available at http://dx.doi.org/10.1103/RevModPhys.74.47. [4] L. Berec (2002): Techniques of spatially explicit individual-based models: construction, simulation, and mean-field analysis. Ecological Modelling 150(1-2), pp. 55–81. Available at http://dx.doi.org/10. 1016/S0304-3800(01)00463-X. 16 The influence of network topologies on metapopulations dynamics [5] D. Besozzi, P. Cazzaniga, G. Mauri & D. Pescini (2010): BioSimWare: A P Systems–based Simulation Environment for Biological Systems. Accepted for presentation at CMC11, Jena, Germany, 2010. [6] D. Besozzi, P. Cazzaniga, D. Pescini & G. Mauri (2007): Seasonal variance in P system models for metapopulations. Progress in Natural Science 17(4), pp. 392–400. Available at http://www.informaworld.com/ smpp/content~db=all~content=a790271810~tab=linking. [7] D. Besozzi, P. Cazzaniga, D. Pescini & G. Mauri (2008): Modelling metapopulations with stochastic membrane systems. BioSystems 91(3), pp. 499 – 514. Available at http://www.sciencedirect.com/ science/article/B6T2K-4PD4XHR-1/2/0903081b39759345708d5fc97aeee6bc. [8] D. Besozzi, P. Cazzaniga, D. Pescini & G. Mauri (2009): Algorithmic Bioprocesses, chapter A Multivolume Approach to Stochastic Modelling with Membrane Systems, pp. 519–542. Springer Verlag. Available at http://www.springer.com/computer/theoretical+computer+science/book/ 978-3-540-88868-0. [9] A. Bunn (2000): Landscape connectivity: A conservation application of graph theory. Journal of Environmental Management 59(4), pp. 265–278. Available at http://dx.doi.org/10.1006/jema.2000.0373. [10] Y. Cao, D. T. Gillespie & L. R. Petzold (2006): Efficient step size selection for the tau-leaping simulation method. Journal of Chemical Physics 124, p. 044109. Available at http://www.ncbi.nlm.nih.gov/ pubmed/16460151. [11] P. Cazzaniga, D. Pescini, D. Besozzi & G. Mauri (2006): Tau leaping stochastic simulation method in P systems. In: H. J. Hoogeboom, G. Păun, G. Rozenberg & A. Salomaa, editors: Proc. of the 7th International Workshop on Membrane Computing, 4361. LNCS, pp. 298–313. Available at http://www.springerlink. com/content/y055172665v12t2k/?p=0a193a302bda4824b742ec37b8cda9d9&pi=18. [12] G. Ciobanu, G. Păun & M. J. Pérez-Jiménez, editors (2005): Applications of Membrane Computing. SpringerVerlag, Berlin. [13] S. N. Dorogovtsev & J. F. F. Mendes (2002): Evolution of networks. Advances in Available at http://www.informaworld.com/smpp/ Physics 51(4), pp. 1079–1187. content~db=all~content=a713801291~tab=linking. [14] J. B. Dunning Jr., D. J. Stewart, B. J. Danielson, B. R. Noon, T. L. Root, R. H. Lamberson & E.E. Stevens (1995): Spatially Explicit Population Models: Current Forms and Future Uses. Ecological Applications 5(1), pp. 3–11. Available at http://www.esajournals.org/doi/abs/10.2307/1942045. [15] A. Fall, M. Fortin, M. Manseau & D. O’brien (2007): Spatial Graphs: Principles and Applications for Habitat Connectivity. Ecosystems 10, pp. 448–461. Available at http://dx.doi.org/10.1007/ s10021-007-9038-7. [16] D. T. Gillespie (1977): Exact stochastic simulation of coupled chemical reactions. Journal of Physical Chemistry 81(25), pp. 2340–2361. Available at http://dx.doi.org/10.1021/j100540a008. [17] I. Hanski (1998): Metapopulation dynamics. Nature 396, pp. 41–49. Available at http://www.nature. com/nature/journal/v396/n6706/abs/396041a0.html. [18] A. Hastings & S. Harrison (1994): Metapopulation dynamics and genetics. Annual Review of Ecology and Systematics 25, pp. 167–188. Available at http://arjournals.annualreviews.org/doi/abs/10. 1146/annurev.es.25.110194.001123. [19] A. Hastings & C. L. Wolin (1989): Within-patch dynamics in a metapopulation. Ecology 70(5), pp. 1261– 1266. Available at http://www.esajournals.org/doi/abs/10.2307/1938184. [20] V. A. A. Jansen (2001): The dynamics of two diffusively coupled predator-prey populations. Theoretical Population Biology 59, pp. 119–131. Available at http://dx.doi.org/10.1006/tpbi.2000.1506. [21] V. A. A. Jansen & A. L. Lloyd (2000): Local stability analysis of spatially homogeneous solutions of multi-patch systems. Journal of Mathematical Biology 41, pp. 232–252. Available at http://www. springerlink.com/content/px0an76xh7551jew/. D. Besozzi et al. 17 [22] R. Levins (1969): Some demographic and genetic consequences of environmental heterogeneity for biological control. Bulletin of the Entomological Society of America 71, pp. 237–240. [23] E. S. Minor & D. L. Urban (2008): A Graph-Theory Framework for Evaluating Landscape Connectivity and Conservation Planning. Conservation Biology 22(2), pp. 297–307. Available at http://dx.doi.org/10. 1111/j.1523-1739.2007.00871.x. [24] A. Moilanen (2004): SPOMSIM: software for stochastic patch occupancy models of metapopulation dynamics. Ecological Modelling 179, pp. 533–550. Available at http://dx.doi.org/10.1016/j.ecolmodel. 2004.04.019. [25] J. D. Murray (2002): Mathematical Biology. I: An introduction. Springer-Verlag, New York. [26] M. E. J. Newman (2003): The Structure and Function of Complex Networks. SIAM Review 45(2), pp. 167– 256. Available at http://scitation.aip.org/getabs/servlet/GetabsServlet?prog=normal& id=SIREAD000045000002000167000001&idtype=cvips&gifs=yes. [27] G. Păun (2000): Computing with membranes. Journal of Computer and System Sciences 61(1), pp. 108–143. Available at http://dx.doi.org/10.1006/jcss.1999.1693. [28] G. Păun (2002): Membrane Computing. An Introduction. Springer-Verlag, Berlin. [29] G. Păun, G. Rozenberg & A. Salomaa, editors (2010): The Oxford Handbook of Membrane Computing. Oxford University Press. [30] D. Pescini, D. Besozzi, G. Mauri & C. Zandron (2006): Dynamical probabilistic P systems. International Journal of Foundations of Computer Science 17(1), pp. 183–204. Available at http://dx.doi.org/10. 1142/S0129054106003760. [31] D. Pescini, D. Besozzi, C. Zandron & G. Mauri (2006): Analysis and simulation of dynamics in probabilistic P systems. In: N. Pierce A. Carbone, editor: Proc. of 11th International Workshop on DNA Computing, DNA11, 3892. LNCS, London, ON, Canada, pp. 236–247. Available at http://www.springerlink.com/ content/7p7653442111r273/?p=832da88ca13a4d75be122f548c3b0df6&pi=18. [32] S. H. Strogatz (2001): Exploring complex networks. Nature 410, pp. 268–276. Available at http://tam. cornell.edu/SS_exploring_complex_networks.pdf. [33] A. D. Taylor (1990): Metapopulations, dispersal, and predator-prey dynamics: an overview. Ecology 71(2), pp. 429–433. Available at http://www.esajournals.org/doi/abs/10.2307/1940297. [34] J. M. J. Travis & C. Dytham (1998): The evolution of dispersal in a metapopulation: a spatially explicit, individual-based model. Proceedings of the Royal Society of London. Series B: Biological Sciences 265(1390), pp. 17–23. Available at http://dx.doi.org/10.1098/rspb.1998.0258. [35] D. Urban & T. Keitt (2001): Landscape Connectivity: A Graph-Theoretic Perspective. Ecology 82(5), pp. 1205–1218. Available at http://dx.doi.org/10.2307/2679983. [36] D. L. Urban, E. S. Minor, E. A. Treml & R. S. Schick (2009): Graph models of habitat mosaics. Ecology Letters 12, pp. 260–273. Available at http://dx.doi.org/10.1111/j.1461-0248.2008.01271.x. [37] W. W. Weisser, V. A. A. Jansen & M. P. Hassell (1997): The effects of a pool of dispersers on host-parasitoid systems. Journal of Theoretical Biology 189, pp. 413–425. Available at http://dx.doi.org/10.1006/ jtbi.1997.0529.
5cs.CE
Аналитический подход к синтезу многополосных фильтров и его сравнение с другими подходами arXiv:1612.01753v1 [cs.SY] 6 Dec 2016 c 2016 Богатырев А.Б., Горейнов С.А., Лямаев С.Ю. ∗ В настоящее время многополосные фильтры широко применяются в аналоговой и цифровой технике. Например, в современной аппаратуре связи, работающей в СВЧ и радиодиапазонах, часто требуются фильтры с несколькими полосами пропускания, соотвествующими различным стандартам беспроводных коммуникаций (таким, как IEEE 806.11, IEEE 806.16, GSM, LTE, GPS, CDMA, DVBT/T2 и др.). Разработка фильтров с многополосными спецификациями представляет собой сложную инженерную проблему, особенно если требуется одновременно обеспечить и высокую производительность компонента, и его компактную реализацию, что и представляет интерес на практике. К текущему моменту в литературе не появилось полностью удовлетворительных и универсальных решений этой проблемы. Очевидным подходом является модульный: многополосный фильтр получается в результате соединения нескольких однополосных. Недостаток его – существенная неоптимальность порядков синтезируемых фильтров, а значит и их массогабаритных характеристик. Этим объясняется интерес к разработке других подходов, идейно более сложных, но позволяющих получать фильтры, имеющие меньшие порядки при той же спецификации. Большую часть таких подходов можно условно разделить на следующие категории: 1) методы синтеза СВЧ фильтров, основанные на использовании многочастотных резонаторов; 2) методы, основанные на использовании частотных преобразований (например, [2], [3]); 3) оптимизационные методы, основанные на алгоритме Ремеза ([4], [5], [6] и др.). Подходы первого типа предполагают синтез фильтра на основе мультимодальных резонаторов и позволяют достигать высокой степени миниатюрности синтезируемых устройств. При таком решении в формировании полос пропускания и задержки фильтра одновременно участвуют резонансы нескольких мод колебаний от каждого резонатора, за счет чего уменьшается число резонаторов, а потому и массо-габаритные характеристики фильтра. Однако подходы этого типа специфичны только для СВЧ устройств, причем дизайн и реализация фильтров высокого порядка с их помощью представляет существенную трудность. Методы второго типа – синтез фильтра на основе многополосного частотного преобразования – являются аналитическими либо полуаналитическими, и осуществляют приведение однополосного (широкополосного) фильтра-прототипа к многополосной конфигурации за счет использования замен частотной переменной. Сложность таких преобразований быстро растет с увеличением числа полос пропускания, а обслуживаемые спецификации, как правило, ограничиваются симметричными. Большое внимание в технической литературе уделяется развитию методов третьего типа, связанных с синтезом оптимальных фильтров и близких к ним. Под оптимальным для заданной многополосной спецификации в данном случае понимается фильтр, который обладает наименьшим порядком среди всех физически осуществимых фильтров, удовлетворяющих требованиям этой спецификации. Скажем также, что под спецификацией (маской) фильтра здесь имеется в виду совокупность следующих параметров: 1) значения желаемых граничных частот всех полос пропускания и задержки; 2) максимальная допустимая величина неравномерности АЧХ на полосах пропускания и минимальная допустимая величина подавления в полосах задержки. Эти данные определяют желаемый вид амплитудно-частотной характеристики фильтра, не затрагивая других его характеристик (фазо-частотной, импульсной и т.д.). ∗ Поддержано грантом РНФ 16-11-10349 1 Все существующие методы синтеза оптимальных многополосных фильтров основываются на прямой численной оптимизации с помощью алгоритмов типа Ремеза, и, ввиду присущей для такой оптимизации принципиальной неустойчивости, имеют ограниченную область применимости: с их помощью возможен синтез фильтров с числом полос пропускания, как правило, не превышающим трех, и порядками, как правило, не выше 20. Авторами разработан аналитический подход к синтезу оптимальных многополосных фильтров, который может быть применен для спецификаций с общим числом полос (на текущий момент) вплоть до 23 и порядками вплоть до 1000. Целью работы является сравнение нового подхода к синтезу оптимальных многополосных фильтров с методом прямой оптимизации, основанном на алгоритме типа Ремеза, а также сравнение оптимальных фильтров с неоптимальными составными фильтрам, получаемыми модульным подходом. В первом разделе ставится оптимизационная задача, лежащая в основании проблемы синтеза оптимального многополосного фильтра. Второй раздел содержит краткое описание нового аналитического подхода к решению этой задачи. В третьем разделе приводятся рецепты, использованные нами при решении той же задачи методом прямой оптимизации. В четвертом разделе описывается модульный подход к синтезу неоптимальных многополосных фильтров. Пятый раздел содержит результаты численных экспериментов, посвященных сравнению этих трех подходов. В приложении приводятся графики фазо-частотной и импульсной характеристик оптимального четырехполосного фильтра. Авторы благодарны проф. Л. Баратшару за обсуждение задач равномерного рационального приближения и д-рам Ф. Зайферту и В. Люно (INRIA, Sophia-Antipolis) за предоставленный код, позволяющий рассчитывать оптимальные фильтры алгоритмом типа Ремеза. 1 Постановка задачи Поиск оптимального фильтра по заданной спецификации может быть сведен к решению серии задач о наименьшем уклонении типа сформулированных ниже. Для этого на каждом шаге фиксируется порядок фильтра и максимизируется величина подавления в полосах задержки при фиксированных остальных параметрах спецификации. Приведем две встречающиеся в литературе формулировки. Пусть E — множество, состоящее из m непересекающихся отрезков действительной оси (частотных диапазонов), разделенное на два подмножества: полосы пропускания E+ и полосы задержки E− . Скажем, что идеальная функция пропускания F равна 1 на отрезках из E+ и −1 на отрезках из E− . Задача 1.Найти вещественную рациональную функцию Rn степени не выше n, для которой величина отклонения от функции пропускания F минимальна в равномерной норме на E: ||Rn − F ||C(E) := max |Rn (x) − F (x)| → min =: µ. (1) x∈E Задача 2. Найти вещественную рациональную функцию Qn (x) степени не выше n, минимизирующую величину θ при условиях min |Qn (w)| ≥ θ−1 , w∈E− max |Qn (w)| ≤ θ. w∈E+ (2) Нетрудно показать, что эти задачи эквивалентны, и их решения отличаются дробнолинейной подстановкой, то есть Qn = f ◦Rn , где f – дробно-линейное преобразование, а обратные к минимальным отклонениям связаны преобразованием Жуковского µ−1 = (θ + θ−1 )/2. Отметим, что сформулированная задача о рациональной аппроксимации есть третья задача Золотарева для конденсатора (E+ , E− ) [12]. Она является многоэкстремальной: все множество рациональных функций разбивается на 2m−2 непересекающихся класса [7], [19], в каждом из которых решение существует, единственно и допускает альтернансную характеризацию: на E имеется 2n + 2 точек альтернанса, в которых для решения степени n достигается величина отклонения с последовательной переменой знака [20]. 2 До недавнего времени аналитическое решение этой задачи было известно только для случая m = 2 (для одной полосы пропускания и одной полосы задержки), найденное в 1870-х годах учеником П.Л. Чебышёва Е.И. Золотарёвым [17]. Именно оно около полувека спустя было использовано немецким учёным-электротехником В. Кауэром [18] для расчёта передаточных функций оптимальных фильтров низких частот, получивших название фильтров Кауэра-Золотарёва (эллиптических). К настоящему времени эти фильтры нашли широкое применение в аналоговой и цифровой технике, а метод аппроксимации АЧХ по ЗолотарёвуКауэру стал классическим. 2 Новый аналитический подход Подход к решению задач (1), (2), предлагаемый в данной статье, опирается на явные аналитические формулы, полученные в [1] и обобщающие решение Золотарева на случай m > 2. Идея этого подхода следующая: как было отмечено выше, все решения степени n задачи о наименьшем уклонении имеют 2n+2 точки альтернанса на E, причем каждая из них, находящаяся во внутренности множества E, с необходимостью будет критической точкой функциирешения R(x) со значением во множестве из четырех элементов ±1 ± µ для формулировки (1) и ±θ, ±θ−1 для формулировки (2). Всего же рациональная функция степени n имеет с учетом кратности 2n − 2 критических точки, поэтому решения рассматриваемых задач о наименьшем уклонении удовлетворяют следующему определению с малым параметром g: Определение 1 Рациональная функция R(x) называется g−экстремальной относительно 4-элементного множества значений Q, если все ее критические точки – за исключением g из них – простые со значениями в Q. Число исключительных критических точек подсчитывается по формуле  X X 1 ord dR(x) , (3) g =1+ ord dR(x) + 2 x: R(x)6∈Q x: R(x)∈Q где суммирование производится по всем точкам сферы Римана; ord dR(x) – порядок нуля дифференциала голоморфного отображения R : CP 1 → CP 1 в точке x (например, в простых полюсах функции R(x) это число равно нулю), и [·] – целая часть числа. Функции с малым числом экстремальности весьма специфичны и заполняют многообразия малой размерности в пространстве всех рациональных функций. При решении задач о наименьшем уклонении возможно перейти от поиска по всему пространству рациональных функций к поиску по этим многообразиям. Экстремальные рациональные функции обладают следующим эффективным малопараметрическим представлением [1]: ! Z (x,w) R(x) = sn dζ + A(e) τ , Q = {±1, ±1/k(τ )}, (4) (e,0) где dζ – голоморфный дифференциал на римановой поверхности рода g, периоды которого лежат в решетке периодов эллиптического синуса, и фазовый сдвиг A(e) также соизмерим с этой решеткой. Эта поверхность определяется по рациональной функуции R(x) как двулистная накрывающая сферы Римана с ветвлением в точках, где R(x) принимает значения из Q с нечётной кратностью. Возникаюшая риманова поверхнось не произвольна, это так называема кривая Калоджеро-Мозера: она разветвленно накрывает тор, определяемый по множеству выделенных значений Q. Используемая параметризация экстремальных функций позволяет контролировать поведение решения в переходных полосах фильтра (выбор класса) и непосредственно решать задачу о фильтре наименьшей степени для заданной спецификации без рассмотрения цепочки задач о наименьшем уклонении. Вычислительные средства, используемые для нахождения экстремальных рациональных функций по явной аналитической формуле, включают разработанный ранее [1, 9, 10, 11] аппарат эффективных вычислений на римановых поверхностях, 3 и позволяют устойчиво вычислять решения степени n равной по меньшей мере нескольким сотням. С использованием нового аналитического подхода были рассчитаны примеры решений оптимизационной задачи 1. На Рис. 1 представлен график функции-решения степени 654 для спецификации с числом отрезков m = 23. На Рис. 2 изображен график решения (для спецификации с m = 7) из класса, допускающего наличие полюсов в первой, второй, третьей и шестой переходных полосах. 1.0 0.5 0.0 -0.5 -1.0 0.00 0.05 0.10 0.15 0.20 0.25 0.30 Рис. 1: График решения оптимизационной задачи (для спецификации с m = 23) 3 2 1 0 -1 -2 -3 0.00 0.05 0.10 0.15 Рис. 2: График решения оптимизационной задачи (для спецификации с m = 7) Детальное изложение алгоритма, основанного на использовании явной аналитической формулы (4) будет приведено в отдельной работе, поскольку требует сложного математического аппарата. 3 Прямая оптимизация Решения оптимизационной задачи могут быть вычислены приближенно, например, алгоритмами типа Ремеза [13, 14, 7]. Отправной точкой снова служит теорема Ахиезера: оптимальная 4 рациональная функция φ(w)/ψ(w) степени n должна иметь на E по крайней мере 2n + 2 точки альтернанса. Предположим, что мы имеем приближенную дробь, заданную, например, положением нулей и полюсов или коэффициентами числителя и знаменателя по некоторому полиномиальному базису; и, кроме того, приближенные точки альтернанса, множество которых обозначим за A. Рассматриваемые алгоритмы состоят в поочередном уточнении каждого из этих двух объектов: 1. имея множество точек A ⊂ E, можно изменить дробь так, чтобы на дискретном множестве A соблюдался альтернанс; 2. имея дробь, можно изменить положение точек с целью увеличения на A равномерной нормы ошибки приближения – или же убедиться, что это невозможно, то есть равномерная норма ошибки не уменьшается при ограничении последней с E на A. Кроме того, требуется начальное приближение, выбор которого из-за локальной сходимости алгоритмов типа Ремеза весьма важен. Изложим кратко использованные нами рецепты для всех указанных шагов. Выбор начального приближения. Мы начинаем с выбора множества A, именно, используются 1/(2n + 2)-квантили равновесной меры для множества E, полученной при помощи численного решения интегрального уравнения с логарифмическим ядром [16]. Шаг 2 (уточнение A по заданной дроби φ/ψ). Рассматривается сначала более широкое множество, составленное из концов наших m интервалов и критических точек функции ошибки φ(w)/ψ(w)−F (w), лежащих на E. Точки, в которых отклонение меньше полученного ранее на шаге 1, отбрасываются. Новое множество A должно подчиняться правилу перемены знаков и содержать 2n + 2 точки; наличие меньшего или большего их количества исправляется с помощью введенной ранее равновесной меры; например, выбрасываются точки, соответствующие меньшим значениям плотности этой меры. Поиск критических точек осуществляется методом Брента или, если приближение достаточно хорошее, проще — методом Ньютона. Шаг 1 (уточнение дроби φ/ψ по заданному A). В отличие от полиномиальных приближений, условие на альтернанс на множестве A, по всей видимости, невозможно представить в виде линейной системы; в лучшем случае возникают обобщенные задачи на собственные значения, вида       V+ −V+ φ 0 Σ+ V+ φ =µ (5) V− V− ψ 0 Σ− V− ψ для первой формулировки экстремальной задачи, или вида       V− 0 φ 0 Σ− V− φ =θ 0 Σ + V+ ψ V+ 0 ψ (6) для второй формулировки (см. раздел 1). Последнюю задачу можно найти в [7]. В уравнениях (5–6) использованы обозначения: V± — матрица Вандермонда по узлам A, принадлежащим E± ; Σ± — диагональные матрицы с элементами ±1, фиксированными для каждого из интервалов пропускания или задержки, по узлам A, принадлежащим E± ; φ, ψ — векторы коэффициентов числителя и знаменателя рациональной дроби; µ, θ — экстремальные альтернирующие значения. Наличие матриц Σ± связано с возможным изменением знака альтернанса в соседних интервалах. Как видно, матричные задачи (5–6) несимметричны, и соответствующие пучки могут оказаться сингулярными; даже в случае двух интервалов может оказаться, что стандартной мантиссы не хватит для вычисления хотя бы одного знака коэффициентов φ, ψ (не говоря уже о корнях). Кроме того, перебор всех вариантов знаков альтернанса в соседних интервалах означает экспоненциальную по m сложность. Некоторым преимуществом, по сравнению с задачами на собственные значения, обладает редукция задачи (1), сформулированной относительно заданного множества A, к задаче линейного программирования, причем и здесь возникает экспоненциальный по m перебор, 5 связанный с выбором знака знаменателя дроби на каждом интервале. Вот эта задача: потребуем минимизации величины t ∈ R при ограничениях −tσ(w)ψ(w) ≤ σ(w)φ(w) − σ(w)ψ(w)F (w) ≤ tσ(w)ψ(w), w ∈ A, j = 1, . . . , m, причем мы предполагаем signψ(w) =: σ(w) априори заданным на каждом интервале. Формально от последнего предположения можно освободиться некоторым увеличением числа переменных. Хорошие результаты для такой задачи показывает метод внутренней точки для объединенных прямой и двойственной формулировок [15]. Линейная параметризация числителей и знаменателей дроби существенно ограничивает устойчивость алгоритмов типа Ремеза [13]. Максимальная степень решения R, полученная таким методом при вычислениях с двойной точностью зависит от конфигурации множества E и не превосходит n = 20. 4 Модульный подход Модульный подход не связан с решением сформулированной оптимизационной задачи и предполагает получение (неоптимального) многополосного фильтра в результате соединения нескольких однополосных. Архитектурно это может осуществляться, например, путем параллельного включения полосно-пропускающих фильтров, каждый из которых обслуживает одну рабочую полосу из заданной многополосной спецификации, либо путем каскадного соединения полосно-пропускающих и полосно-заграждающих фильтров. Неоптимальные фильтры, получаемые модульным подходом, ниже мы называем составными. Нами использовался следующий рецепт их построения: по каждой полосе пропускания рассчитывалась передаточная функция соотвествующего полосового эллиптического фильтра, затем полученные функции складывались. Параметры эллиптических фильтров оптимизировались ручным перебором для достижения как можно меньшего порядка итогового многополосного фильтра при условии, чтобы его АЧХ была вписана в заданный спецификацией коридор. 5 Примеры синтеза В этом разделе приводятся примеры синтеза цифровых многополосных фильтров с помощью трех подходов: нового аналитического подхода, метода прямой оптимизации и модульного подхода. Первые два подхода, основываются на решении сформулированной выше оптимизационной задачи, и дают оптимальные фильтры (то есть порядка, минимального достижимого для заданной спецификации), последний подход заключается в соединении однополосных эллиптических фильтров и дает неоптимальные многополосные фильтры. Оптимальные цифровые фильтры получались из оптимальных аналоговых путем стандартного, так называемого билинейного, преобразования частоты. Прямая оптимизация ни для одного из рассмотренных примеров не дала удовлетворительных результатов, ввиду сложности спецификаций. Её результаты приведены для первого и второго примера. Модульный подход, как видно из примеров, дает фильтры с существенно большими порядками, в сравнении с оптимальными. 5.1 Однополосный фильтр С помощью нового аналитического подхода нами был рассчитан однополосный оптимальный фильтр 18-ого порядка с сильно несимметричными ширинам переходных полос, равными 0.016 и 2 · 10−5 . График его АЧХ приводится на Рис. 3. 6 Magnitude response in dB -2.0 -10 -20 -30 -40 -46.9 -60 -70 -80 -90 -100 0.0 0.1 0.2 0.3 Normalized frequency 0.4 0.5 Рис. 3: АЧХ однополосного оптимального фильтра Стандартное частотное преобразование, используемое при синтезе полосового эллиптического фильтра из НЧ-прототипа, не может обеспечить такой разницы в ширинах переходных полос, и эллиптический фильтр, рассчитанный по той же спецификации, имеет больший порядок – 28. График его АЧХ представлен на Рис. 4 Magnitude response in dB -2.0 -10 -20 -30 -40 -46.9 -60 -70 -80 -90 -100 0.0 0.1 0.2 0.3 Normalized frequency 0.4 0.5 Рис. 4: АЧХ однополосного эллиптического фильтра Результаты прямой численной оптимизации для такой спецификации приведены в Табл. 5.1. При расчетах с помощью алгоритма типа Ремеза границы полос фильтра задавались спецификацией, неравномерность в полосе пропускания фиксировалась равной 2 dB, а затухание в полосах задержки (второй столбец в таблице) определялось, исходя из порядка получаемого оптимального фильтра. Затухание в полосах задержки в −46.9 dB для метода прямой оптимизации оказалось недостижимым ввиду того, что уже для расчета фильтра 10 порядка 7 требовались большие временные затраты. Порядок 3 4 5 6 8 9 10 Затухание в полосе задержки -3.3812 -4.2272 -7.5894 -10.612 -19.355 -22.378 — Число итераций 102 154 211 308 457 652 >1000 -46.9 ? 18 Таблица 1: Результаты прямой численной оптимизации для однополосного фильтра. 5.2 Двухполосный фильтр В качестве примера оптимального двухполосного фильтра с помощью аналитического подхода был рассчитан фильтр 16-ого порядка с минимальным затуханием в полосах задержки в 40 dB, и величиной пульсаций АЧХ в полосах пропускания в 2.6 dB. Ширины переходных полос: 0.012, 0.012, 0.003, 0.008. График АЧХ приведен на Рис. 5. Magnitude response (dB) -2.6 -10 -20 -30 -40.0 -50 -60 -70 -80 -90 -100 0.0 0.1 0.2 0.3 Normalized frequency 0.4 0.5 Рис. 5: АЧХ двухполосного оптимального фильтра Построенный по той же спецификации составной фильтр имеет порядок 23. График его АЧХ представлен на Рис. 6. 8 Magnitude response (dB) -2.6 -10 -20 -30 -40.0 -50 -60 -70 -80 -90 -100 0.0 0.1 0.2 0.3 Normalized frequency 0.4 0.5 Рис. 6: АЧХ двухполосного составного фильтра Результаты прямой оптимизации для такой спецификации представлены в Табл. 2. При расчетах границы полос фильтра задавались спецификацией, неравномерность в полосе пропускания фиксировалась равной 2 dB, а затухание в полосах задержки (второй столбец в таблице) определялось, исходя из порядка получаемого оптимального фильтра. В данном случае алгоритм типа Ремеза оказался неприменимым для поиска оптимальных фильтров начиная уже с восьмого порядка, соответственно, оптимальный фильтр 16-ого порядка, найденный с помощью аналитического подхода, метод прямой оптимизицации рассчитать не позволяет. Порядок 3 4 5 6 7 8 16 Затухание в полосах задержки -5.3421 -9.1785 -12.649 -16.013 -19.215 — Число итераций 151 273 351 408 594 > 1000 -40 ? Таблица 2: Результаты прямой оптимизации для двухполосного фильтра. 5.3 Четырёхполосный фильтр С помощью аналитического подхода нами был построен четырёхполосный оптимальный фильтр 36-ого порядка с минимальным затуханием в полосах задержки в 42.8 dB, неравномерностью АЧХ в полосах пропускания в 2.0 dB, и ширинами переходных полос от 0.002 до 0.005. График АЧХ полученного фильтра приведен на Рис. 7. 9 Magnitude response (dB) -2.0 -10 -20 -30 -42.8 -50 -60 -70 -80 -90 -100 0.0 0.1 0.2 0.3 Normalized frequency 0.4 0.5 Рис. 7: АЧХ четырёхполосного оптимального фильтра Рассчитанный по той же спецификации составной фильтр имеет порядок 55. Его АЧХ приводится на Рис. 8. Magnitude response (dB) -2.0 -10 -20 -30 -42.8 -50 -60 -70 -80 -90 -100 0.0 0.1 0.2 0.3 Normalized frequency 0.4 0.5 Рис. 8: АЧХ четырёхполосного составного фильтра 5.4 Пятиполосный фильтр Для пятиполосной спецификации был рассчитан оптимальный фильтр 76-ого порядка с минимальным затуханием АЧХ в полосах задержки в 50 dB, и неравномерностью в полосах пропускания в 2.0 dB. Ширины переходных полос лежат в промежутке от 0.002 до 0.005. График АЧХ представлен на Рис. 9. 10 Magnitude response (dB) -2.0 -10 -20 -30 -40 -50.0 -60 -70 -80 -90 -100 0.0 0.1 0.2 0.3 Normalized frequency 0.4 0.5 Рис. 9: АЧХ четырёхполосного оптимального фильтра Построенный по той же спецификации составной фильтр будет имеет 121. Его АЧХ приводится на Рис. 10 Magnitude response (dB) -2.0 -10 -20 -30 -40 -50.0 -60 -70 -80 -90 -100 0.0 0.1 0.2 0.3 Normalized frequency 0.4 0.5 Рис. 10: АЧХ четырёхполосного составного фильтра 5.5 Фильтр режекторного типа с двумя полосами задержки График АЧХ оптимального фильтра 16-ого порядка режекторного типа, осуществляющего точное вырезание двух заданных частот, представлен на Рис. 11. Участок АЧХ, содержащий вырезаемые частоты, в большем масшатабе представлен на Рис. 12. 11 0 Magnitude response (dB) -10 -20 -30 -40 -51.9 -60 -70 -80 -90 -100 0.0 0.1 0.2 0.3 Normalized frequency 0.4 0.5 Рис. 11: АЧХ оптимального фильтра режекторного типа с двумя полосами задержки. 0 Magnitude response (dB) -10 -20 -30 -40 -51.9 -60 -70 -80 -90 -100 0.255 0.256 0.257 0.258 Normalized frequency 0.259 0.260 Рис. 12: Участок АЧХ, содержащий вырезаемые частоты. Составной фильтр, обеспечивающий такое же качество аппроксимации АЧХ, имеет 62-ой порядок. 5.6 Фильтр с двумя полосами пропускания, расположенными критически близко друг к другу С помощью аналитического подхода был рассчитан оптимальный фильтр 24-ого порядка с двумя полосами пропускания, расположенными критически близко друг к другу. Соответствующий график АЧХ приводится на Рис. 13. Подобные фильтры могут быть использованы, 12 если требуется выделить из спектра некоторую частотную полосу и при этом задержать одну или несколько частот, сорежащихся внутри этой полосы. Magnitude response (dB) -2.0 -10 -20 -30 -40 -50.0 -60 -70 -80 -90 -100 0.0 0.1 0.2 0.3 Normalized frequency 0.4 0.5 Рис. 13: АЧХ оптимального фильтра с двумя полосами пропускания, расположенными критически близко друг к другу. Magnitude response (dB) -2.0 -10 -20 -30 -40 -50.0 -60 -70 -80 -90 -100 0.250 0.251 0.252 0.253 Normalized frequency 0.254 0.255 Рис. 14: Участок АЧХ, содержащий вырезаемую частоту. Составной фильтр, обеспечивающий такое же качество аппроксимации АЧХ, имеет 59-ый порядок. 13 6 Заключение В статье приведено сравнение трех подходов к синтезу многополосных фильтров: нового аналитического подхода, прямой численной оптимизации на основе метода Ремеза и полуаналитический модульный подход. Прямая численная оптимизация сегодня наиболее алгоритмически проработана: существуют и совершенствуются готовые пакеты для инженерных расчетов. К сожалению, неустранимая неустойчивость алгоритмов ремезовского типа не позволяет решать слишком сложные задачи: при использовании двойной точности (15 десятичных знаков) порядок фильтра не доходит до 20, и при этом невозможно достичь хороших аппроксимационных свойств в случае сложных спецификаций, например, при большом числе полос пропускания и задержки, узких переходных полосах, полосах пропускания, расположенных критически близко друг к другу. Модульный подход состоит в разбиении сложной задачи на ряд простых и их последовательном решении с использованием дроби Золотарева для построения АЧХ полосового фильтра. Его преимущество состоит в том, что таким образом можно гарантированно получить (эрзац-) решение с заданной спецификацией. Как правило, оно далеко от оптимального: порядок составного фильтра может в несколько раз превышать порядок оптимального с той же спецификацией. Ситуация усугубляется с ростом сложности спецификации фильтра. Наиболее перспективным, с нашей точки зрения, как и наименее изученным с алгоритмической точки зрения, является аналитический подход, опирающийся на сложный математический аппарат. Авторы намереваются продолжать исследования в этом направлении. 7 Приложение Phase response (rad) На Рис. 15, 16, 17 приводятся графики фазо-частотной и импульсной характеристики, а также группового времени задержки оптимального четырёхполосного фильтра из примера 5.3. Его амплитудно-частотная характеристика представлена на Рис. 7. 5 0 -5 -10 -15 0.0 0.1 0.2 0.3 Normalized frequency 0.4 Рис. 15: Фазо-частотная характеристика четырёхполосного оптимального фильтра. 14 0.5 Group delay (samples) 250 200 150 100 50 0 0.0 0.1 0.2 0.3 Normalized frequency 0.4 0.5 Amplitude Рис. 16: Групповое время задержки четырёхполосного оптимального фильтра. 0.15 0.10 0.05 0.00 -0.05 -0.10 -0.15 0 50 100 150 Sample number 200 250 300 Рис. 17: Импульсная характеристика четырёхполосного оптимального фильтра (точки графика соединены с квадратичной интерполяцией). Список литературы [1] A.B. Bogatyrev, Chebyshev representation for rational functions, Sb. Math., 201:11 (2010), pp. 1579–1598. [2] A. Mohan, S. Singh, A. Biswas, Generalized synthesis and design of symmetrical multiple passband filters, Progress In Electromagnetics Research B, Vol. 42, pp. 115-139, 2012. [3] J. Lee, and K. Sarabandi, Design of triple-passband microwave filters using frequency transformation, IEEE Trans. On Microwave Theory and Tech., vol. MTT-56, No. 1, pp 187-193, Jan. 2008. [4] V. Lunot, S. Bila, and F. Seyfert, Optimal synthesis for multi-band microwave filters, IEEE MTT-S Int. Microw. Symp. Dig., pp. 115–118, Jun. 2007. [5] D. Deslandes and F. Boone, An iterative design procedure for the synthesis of generalized dual-bandpass filters, Int.J. RF Microw. Computer-Aided Eng., vol. 19, no. 5, pp. 607-614, 2009. [6] G. Macchiarella, "Equi-ripple" Synthesis of Multiband Prototype Filters Using a Remez-Like Algorithm, IEEE Microwave And Wireless Components Letters, Vol. 23, No. 5, pp. 231-233, May 2013. 15 [7] R.A.-R. Амer, The approximation problem of electrical filters, Basel-Stuttgart, Birkhauser, 1964. [8] V. Crnojevic-Bengin, Advances in Multi-Band Microstrip Filters, Cambridge University Press, 2015. [9] A.B. Bogatyrev, Computations in moduli spaces, Computational Methods and Function Theory, 7 (2007), No. 2, 309-324. [10] А.Б. Богатырев Экстремальные многочлены и римановы поверхности, М., МЦНМО, 2005. (монография). A.B. Bogatyrev, Extremal Polynomials and Riemann Surfaces, Springer Monographs in Mathematics, ISBN 978-3-642-25633-2 (print). [11] А.Б. Богатырев, Конформное отображение прямоугольных семиугольников, Математический сборник 203:12 (2012), стр 35-56. [12] А.А. Гончар, О задачах Е.И.Золотарева, связанных с рациональными функциями, Математический сборник 78(120):4 (1969), стр 640-654. [13] Е.Я. Ремез Основы численных методов чебышевского приближения, Киев, Наукова думка, 1969. [14] L. Veidinger, On the numerical determination of the best approximations in the Chebyshev sense, Numer. Math., Vol. 2, pp. 99-105, 1960. [15] S. Boyd, L. Vandenberghe, Convex Optimization, Cambridge University Press, 2004. [16] W. Fuchs, On Chebyshev approximation on sets with several components // D.A. Brannan and J.G. Clunie, eds., Aspects of Contemporary Complex Analysis, pp. 399-408, Academic Press, 1980. [17] Е.И. Золотарев, Приложение эллиптических функций к вопросам о функциях, наименее и наиболее отклоняющихся от нуля, Зап. Росс. Акад Наук, ХХХ стр. 37-41, 54-71, 1877. [18] W. Cauer, Theorie der linearen Wechselstromschaltungen, Bd. 1. Becker und Erler, Leipzig, 1941; Bd. 2. Akademie, Berlin, 1960. [19] В.Н. Малоземов, Задача синтеза многополосного электрического фильтра, Ж. вычисл. матем. и матем. физ., 19:3 (1979), 601–609. [20] Н.И. Ахиезер, Об одной задаче Е.И. Золотарева, Изв. Акад. наук СССР, VII серия, 1929, №10, стр. 919–931. Институт вычислительной математики РАН, Москва, 119991, ул. Губкина, 8 [email protected], [email protected], [email protected] 16
3cs.SY
Bloofi: Multidimensional Bloom Filters Adina Crainiceanua,∗, Daniel Lemireb b LICEF a US Naval Academy, USA Research Center, TELUQ University of Quebec, Canada arXiv:1501.01941v3 [cs.DB] 21 Sep 2016 Abstract Bloom filters are probabilistic data structures commonly used for approximate membership problems in many areas of Computer Science (networking, distributed systems, databases, etc.). With the increase in data size and distribution of data, problems arise where a large number of Bloom filters are available, and all them need to be searched for potential matches. As an example, in a federated cloud environment, each cloud provider could encode the information using Bloom filters and share the Bloom filters with a central coordinator. The problem of interest is not only whether a given element is in any of the sets represented by the Bloom filters, but which of the existing sets contain the given element. This problem cannot be solved by just constructing a Bloom filter on the union of all the sets. Instead, we effectively have a multidimensional Bloom filter problem: given an element, we wish to receive a list of candidate sets where the element might be. To solve this problem, we consider 3 alternatives. Firstly, we can naively check many Bloom filters. Secondly, we propose to organize the Bloom filters in a hierarchical index structure akin to a B+ tree, that we call Bloofi. Finally, we propose another data structure that packs the Bloom filters in such a way as to exploit bit-level parallelism, which we call Flat-Bloofi. Our theoretical and experimental results show that Bloofi and Flat-Bloofi provide scalable and efficient solutions alternatives to search through a large number of Bloom filters. Keywords: Bloom filter index, multidimensional Bloom filter, federated cloud, data provenance 1. Introduction of Bloom filters, and these filters need to be searched to find the sets containing particular objects. Bloom filters [3] are used to efficiently check whether an object is likely to be in the set (match) or whether the object is definitely not in the set (no match). False positives are possible, but false negatives are not. Due to their efficiency, compact representation, and flexibility in allowing a trade-off between space and false positive probability, Bloom filters are popular in representing diverse sets of data. They are used in databases [23], distributed systems [5], web caching [14], and other network applications [4]. For example, Google BigTable [6] and Apache Cassandra [30] use Bloom filters to reduce the disk lookups for non-existent data. As digital data increases in both size and distribution, applications generate a large number Our work is motivated by highly distributed data provenance applications, in which data is tracked as it is created, modified, or sent/received between the multiple sites participating in the application, each site maintaining the data in a cloud environment. Bloom filters can be maintained by each individual site and shared with a central location. For each piece of data, we need to find the sites holding the data. Thus, we may need to search through a large number of Bloom filters stored at the central location. ∗ Corresponding author. Tel.: 00+1+ 410 293-6822; fax: 00+1+410 293-2686. Email addresses: [email protected] (Adina Crainiceanu), [email protected] (Daniel Lemire) Preprint submitted to Information Systems Indexing Bloom filters is different than indexing generic objects to improve search time. There is one level of indirection between the elements searched for, and the objects directly indexed by the index structure. In particular, each Bloom filter is a compact representation of an underlying set of elements. The question of interest is an all-membership query: given a particular element (not a Bloom filter), which underlying sets contain that element? The query subject is an element, but September 22, 2016 the objects we are indexing and searching through are Bloom filters, so what we are creating is a meta-index. The traditional index structures, such as hash indexes, B+trees, R trees etc. and their distributed versions [1] do not directly apply in this case as we are indexing Bloom filters and not the keys themselves. All we are given from each site is a Bloom filter. There has been significant work in using Bloom filters in various applications, and developing variations of Bloom filters. Counting filters [14, 15] support deletions from the Bloom filter; compressed Bloom filters [21] are used with web caching; stable Bloom filters [11] eliminate duplicates in streams, spectral Bloom filters [7] extend the applicability of Bloom filters to multi-sets, multi-class Bloom Filter (MBF) [20] use perelement probabilities. Yet there has been few attempts to accelerate queries over many Bloom filters, what we call the multidimensional Bloom filter problem, even though our problem is closely related to signature file methods (see Section 8) where one seeks to index setvalue attributes. To solve this problem, we propose Bloofi (Bloom Filter Index), a hierarchical index structure for Bloom filters. Bloofi provides probabilistic answers to allmembership queries and scales to tens of thousands of Bloom filters. When the probability of false positives is low, Bloofi of order d (a tunable parameter) can provide O(d logd N) search cost, where N is the number of Bloom filters indexed. Bloofi also provides support for inserts, deletes, and updates with O(d logd N) cost and requires O(N) storage cost. In designing Bloofi, we take advantage of the fact that the bitwise OR between Bloom filters of same length, constructed using the same hash functions, is also a Bloom filter. The resulting Bloom filter represents the union of the sets represented by the individual Bloom filters. This property allows us to construct a tree where the leaf levels are the indexed Bloom filters, and the root level is a Bloom filter that represents all the elements in the system. This tree is used to prune the search space (eliminate Bloom filters as candidates for matches) while processing all-membership queries. Our performance evaluation shows that Bloofi performs best when the false positive probability of the union Bloom filter (a Bloom filter that is the union of all the indexed Bloom filters) is low and provides O(d × logd N) search performance in most cases, with O(N) storage cost and O(d × logd N) maintenance cost. Bloofi could be used whenever a large number of Bloom filters that use the same hash functions need to be checked for matches. Bloom filters are constructed over bitmaps, i.e., vector of Booleans. With bitmaps, we can exploit bit-level parallelism: on a 64-bit processor, we can compute the bitwise or between 64 bits using a single instruction. We use bit-level parallelism with Bloofi to optimize the construction of the data structure. However, we have also designed an alternative data structure that is designed specifically to exploit bit-level parallelism (henceforth Flat-Bloofi). Though not as scalable as Bloofi, it can be fast when the number of Bloom filters is moderate. This article is an extended version of “Bloofi: A Hierarchical Bloom Filter Index with Applications to Distributed Data Provenance” [9] published in the 2nd International Workshop on Cloud Intelligence Cloud-I 2013. The paper was completely revised, and the new version introduces an additional data structure, FlatBloofi, a new implementation for Bloofi that improves the performance by an order of magnitude, and a new performance evaluation. The rest of this paper is structured as follows: Section 2 describes a distributed data provenance application for Bloofi. Section 3 briefly reviews the concept of Bloom filter. Section 4 introduces Bloofi, a hierarchical index structure for Bloom filters. Section 5 introduces the maintenance algorithms and a theoretical performance analysis. Section 6 introduces Flat-Bloofi, a data structure for the multidimensional Bloom filter problem, designed to exploit bit-level parallelism. Section 7 shows the experimental results. We discuss related work in Section 8 and conclude in Section 9. 2. Motivation: provenance application to distributed data In this section we describe the distributed data provenance application that motivated our work on Bloofi. Let us assume that a multinational corporation with hundreds of offices in geographically distributed locations (sites) around the world is interested in tracking the documents produced and used within the corporation. Each document is given a universally unique identifier (uuid) and is stored in the local repository, in a cloud environment. Documents can be sent to another location (site) or received from other locations, multiple documents can be bundled together to create new documents, which therefore are identified by new uuids, documents can be decomposed in smaller parts that become documents themselves, and so on. All these “events” that are important to the provenance of a document are recorded in the repository at the site generating the event. The events can be stored as RDF triples in a scalable cloud triple store such as Rya [25]. The data can be modeled as a Directed Acyclic Graph (DAG), with labeled edges (event names) and nodes (document uuids). As 2 documents travel between sites, the DAG is in fact distributed not only over the machines in the cloud environment at each site, but also over hundreds of geographically distributed locations. The data provenance problem we are interested in solving is finding all the events and document uuids that form the “provenance” path of a given uuid (all “ancestors” of a given node in the distributed graph). Storing all the data, or even all the uuids and their location, in a centralized place is not feasible, due to the volume and speed of the documents generated globally. Fully distributed data structures, such as Chord [29] or P-Ring [10], require even more communication (messages) than the centralized solution, increasing the latency and bandwidth consumption, so they are also not feasible due to the volume and speed of the documents generated globally. Moreover, local regulations might impose restrictions on where the data can be stored. However, since all the global locations belong to the same corporation, data exchange and data tracking must be made possible. Without any information on the location of a uuid, each provenance query for a uuid must be sent to all sites. Each site can then determine the local part of the provenance path, and return it. However, the provenance might contain new uuids, so a new query needs to be sent to each site for each new uuid connected to the original uuid, until no new uuids are found. This recursive process could consume significant bandwidth and latency in a geographically distributed system. To minimize the number of unnecessary messages sent to determine the full provenance of an object, each local site maintains a Bloom filter of all the uuids in the local system. Updates to the Bloom filter are periodically propagated to a centralized location (the headquarters for example). Since the Bloom filters are compact representations of the underlying data, less bandwidth is consumed when Bloom filters are sent versus sending the actual data. At the central location, a Bloofi index is constructed from the Bloom filters, and every time a provenance query for a uuid is made, the Bloofi index is used to quickly determine the sites that might store provenance information for the given uuid. If the query load is too high and having the Bloofi index in a single location affects performance and/or availability, multiple Bloofi indexes could be constructed in several locations. structure is stored on disk. When we expect many requests for values that are not present, it is helpful to have an auxiliary data structure that will quickly dismiss these requests. Bloom filters can serve this purpose. Each Bloom filter [3] is a bit array (or bitmap) of length m constructed by using a set of k hash functions. The empty Bloom filter has all bits 0. To add an element to the filter, each of the k hash functions maps the new element to a position in the bit array. The bit in that position is turned to 1. To check whether an element is a member of the set represented by the Bloom filter, the k hash functions are applied to the test element. If any of the resulting k positions is 0, the test element is not in the set, with probability 1. If all k positions are 1, the Bloom filter matches the test element, and the test element might be in the set (it might be a true positive or a false positive). There is a trade-off between the size of the Bloom filter and the probability of false positives, pfalse , returned by it. We have that pfalse ≈ (1 − e−kn/m )k assuming that there are n elements in the filter [22]; the probability is minimal when k = m/n ln 2. The probability pfalse can be lowered by increasing the size of the Bloom filter (m). For a fixed number of elements (n), the probability goes to zero exponentially. In the rest of the paper we assume that all the Bloom filters indexed have the same length and use the same set of hash functions. 4. Indexing Bloom filters We are given a collection of N Bloom filters B. Given a query for a value, we want to find all Bloom filters that are a match. We are most interested in the case where there are relatively few such Bloom filters and when a sequential search is potentially inefficient. 4.1. Bloofi: a hierarchical Bloom filter index Bloofi, the Bloom filter index, is based on the following idea. We construct a tree: the leaves of the tree are the Bloom filters to be indexed, and the parent nodes are Bloom filters obtained by applying a bitwise OR on the child nodes. This process continues until the root is reached. The index has the property that each non-leaf Bloom filter in the tree represents the union of the sets represented by the Bloom filters in the sub-tree rooted at that node. As a consequence, if an object matches a leaf-level Bloom filter, it matches all the Bloom filters in the path from that leaf to the root. Conversely, if a particular Bloom filter in Bloofi does not match an object, there is no match in the entire sub-tree rooted at that node. Using Bloofi, a membership query starts by first querying the root Bloom filter: if it does not match the 3. Bloom filters Checking for the presence of a value in a set or similar data structure can be expensive, especially if the data 3 queried object, then none of the indexed sets contain the object and a negative answer is returned. If the root does match the object, the query proceeds by checking which of the child Bloom filters matches the object. The query continues down the path of Bloom filters matching the object, until the leaf level is reached. In a balanced tree, the height of Bloofi is logarithmic in the number of Bloom filters indexed, and each step in the query process goes down one level in the tree. In the best case, a query with a negative answer is answered in constant time (check the root only), and a query with a positive answer is answered in logarithmic time. However, if multiple paths in the index are followed during the query process, the query time increases. Section 5.1 introduces our heuristics for Bloofi construction such that the number of “misleading” paths in the Bloofi is reduced (similar Bloom filters are in the same sub-tree). There are many possible implementations for Bloofi: as a tree similar with binary search trees, AVL trees, B+ trees, etc. Due to the flexibility allowed by having a balanced tree with the number of child pointers higher than two, we implement Bloofi like a B+ trees. We start with an order parameter d, and each non-leaf node maintains l child pointers: d ≤ l ≤ 2d for all non-root nodes, and 2 ≤ l ≤ 2d for the root. Each node in Bloofi stores only one value, which is different than general search trees. For the leaves, the value is the Bloom filter to be indexed. For all non-leaf nodes, the value is obtained by applying bitwise OR on the values of its child nodes. Throughout the paper we use the usual definitions for tree, node in a tree, root, leaf, depth of a node (the number of edges from root to the node), height of a tree (maximum depth of a node in the tree), sibling, and parent. Fig. 1 shows an example of a Bloofi index of order 2. Each internal node has between 2 and 4 child pointers. The leaf level of the tree contains the original Bloom filters indexed by the Bloofi index, with identifiers 1, 2, 3, 4, 5, and 6. The node identifiers are shown here for ease of presentation, but they are also used in practice during updates and deletes to identify the node that needs to be updated or deleted (see Section 5.2 and Section 5.3 for details). In the rest of the paper, we often use “node X” to refer to the node with identifier X. At the next higher level, the values are obtained by applying bitwise OR on the values of the children nodes, so the value of the node 7 is the bitwise OR between values of nodes 1, 2, 3, and 4. The process continues until the root is reached. We use the following notation. Given a node, its parent is written node.parent. The ordered set of its children is written by node.children. The number of children is written node.nbDesc with the convention Id:9 1 1 1 1 1 0 1 0 Id:7 1 1 1 1 0 0 0 0 1 0 0 0 0 0 0 0 Id:1 0 1 0 0 0 0 0 0 Id:2 0 0 1 0 0 0 0 0 Id:3 0 0 0 1 0 0 0 0 Id:4 0 0 0 0 1 0 1 0 Id:8 0 0 0 0 1 0 0 0 Id:5 0 0 0 0 0 0 1 0 Id:6 Figure 1: Bloofi Tree of Order 2 that node.nbDesc is zero for a leaf node. For i = 0, . . . node.nbDesc − 1, node.children[i] is the (i + 1)th children of the node. Each node has a corresponding bit array indicated by node.val. We let | be the bitwise OR operation so that when node is not a leaf, the bit array is just the aggregation of the bit array of the children: node.val =node.children[0].val node.children[1].val · · · node.children[node.nbDesc − 1].val. Individual bit values in the bit array are accessed as node.val[i] for i = 0, . . . , m. Since Bloofi is a balanced tree, with each internal node having at least d child nodes, where d is the order of the tree, the height of a Bloofi index of order d is at most blogd Nc, where N is the number of Bloom filters to index. 4.2. Search The search algorithm (Algorithm 1) returns the identifiers of all the leaf-level Bloom filters that match a given object in the subtree rooted at the given node. It first checks whether the current node value matches the object (line 3). If not, then none of the Bloom filters in that sub-tree match the object, so the empty set is returned (line 4). If the current node does match the object, then either it is a leaf, in which case it returns the identifier (line 8), or it is an inner node, in which case the findMatches function is called recursively for all of its child nodes (lines 12–13). Example. Consider a query for object value 4 in the Bloofi tree in Figure 1. The findMatches function in Algorithm 1 is invoked with arguments root 4 Algorithm 1 : findMatches(node,o) 5. Bloofi maintenance 1: //RETURN VALUE: the identifiers of leaves in the sub- 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: We introduce the algorithms for inserting, deleting, and updating Bloom filters. tree rooted at node with Bloom filters matching the object o //if node does not matches the object, return empty set, else check the descendants if not match(node.val,o) then return ∅; else //if this node is a leaf, just return the identifier if node.nbDesc = 0 then return node.id; else //if not leaf, check the descendants returnList = ∅; for i = 0; i < node.nbDesc; i++ do returnList.add(findMatches(node.children[i],o)); return returnList; 5.1. Insert Ideally, when inserting Bloom filters, we would like to keep them in partitions so that the overlap between different partitions is small. That is, we would like similar Bloom filters to be grouped together as much as possible. And, conversely, we would like Bloom filters from different partitions to be as different as possible. Such problems are commonly NP-hard (e.g., the Minimum Graph Bisection Problem) though they can be sometimes approximated efficiently. We leave a more formal investigation of this problem to future work and use a heuristic. The algorithm for inserting (Algorithm 2) finds a leaf which is “close” to the input Bloom filter in a given metric space, and inserts the new Bloom filter next to that leaf. The intuition is that similar Bloom filters should be in the same sub-tree to improve search performance. As distance metric, we use the Hamming distance. That is, we count the number of bits that differ. This can be computed quickly by computing the cardinality of the bitwise exclusive OR of two bit arrays along with fast functions to count the number of 1s in the resulting words (e.g., Long.bitCount in Java). We could consider other distance metric, and we experiment with Cosine and Jaccard metrics in Section 7.2.6. The new Bloom filter is inserted by first updating the value of the current node by computing the bitwise or with the value of the filter to be inserted (since that node will be in the sub-tree), and then recursively calling the insert function on the child node most similar with the new value (line 10). Once the most similar leaf node is located, a new leaf is created for the new Bloom filter (line 33) and is inserted as a sibling of the node by calling the insertIntoParent function (Algorithm 3). This function takes as parameters the new node newEntry, and the most similar node to it, node. We insert newEntry as a sibling of node. If the number of children in the parent is still at most 2d, the insert is complete. If an overflow occurs, the node splits (lines 9-16) and the newly created node is returned by the function. The splits could occasionally propagate up to the root level. In that case, a new root is created, and the height of the Bloofi tree increases (line 18). Example. Consider the Bloofi tree in Fig. 1 and assume that we insert the Bloom filter with value “00100100”. The new node is inserted as a child of node 7 (Hamming distance between the new node and nodes and 4. In line 3 of Algorithm 1, the algorithm checks whether the value of the root matches 4. For simplicity of presentation, assume that there is only one hash function used by the Bloom filters, the function is h(x) = x mod 8, and the elements in the underlying set are integers. Since root.val[4] is 1, the root matches the queried object 4 and the search proceeds by invoking the findMatches function for each of its child nodes. The first child node, node 7, does not match the queried object, so findMatches for that sub-tree returns ∅. The second child node of the root, node 8, matches 4, so the search continues at the next lower level. Node 5 matches the queried object, and is a leaf, so the findMatches function returns the identifier 5. Leaf 6 does not match the queried object, so that findMatches call returns ∅. Now, the recursive call on node 8 returns with the value {5}, and finally the call on the root returns {5}, which is the result of the query. Search cost. The complexity of the search process is given by the number of findMatches invocations. In the best case, if there are no leaf-level Bloom filters matching a given object, the number of Bloom filters to be checked for matches is 1 (the root). To find a leaflevel Bloom filter that matches a query, the number of findMatches invocations is O(d logd N) in the best case (one path is followed, and at each node, all children are checked to find the one that matches) and O(N) in the worst case (since the maximum number of nodes in a Bloofi tree is dN + (N − 1)/(d − 1)e, the search cost is O(N) if all nodes need to be checked for matches). 5 Algorithm 3 : node) Algorithm 2 : insert(newBloomFilter, node) 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: // D is a distance function between bit arrays //insert into the sub-tree rooted at the given node //RETURN: null or pointer to new child if split occurred //if node is not leaf, direct the search for the new filter place if node.nbDesc > 0 then //update the value of the node to contain the new filter node.val = node.val newBloomFilter; //find the most similar child and insert there find child C minimizing D(C.val, newBloomFilter) newSibling = insert(newBloomFilter, C); //if there was no split, just return null if newSibling = null then return null; else //there was a split; check whether a new root is needed if node.parent = null then //root was split; create a new root newRoot = new BFINode() ; // create new node newRoot.val = node.val newSibling.val; newRoot.parent = null; newRoot.children.add(node); newRoot.children.add(newSibling); root = newRoot; node.parent = newRoot; newSibling.parent = newRoot; return null; else newSibling = insertIntoParent(newSibling, node) insertIntoParent(newEntry, //insert into the node’s parent, after the node pointer //RETURN: null or pointer to new child if split occurred node.parent.children.addAfter(newEntry, node); newEntry.parent = node.parent; //check for overflow if node.nbDesc > 2d then return null; else //overflow, so split P = node.parent; P0 = new BFINode(); move last d children from P to P0 ; update parent information for all children of P0 ; re-compute P.val as the OR between its children values; 15: compute P0 .val as the OR between its children values; 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 16: return P0 ; Id:9 1 1 1 1 1 1 1 0 Id:7 1 1 1 0 0 0 0 0 return newSibling; //current node is root or not //there was a split or not else //if node is leaf, need to insert into the parent //create a node for newBloomFilter newLeaf = new BFINode(); newLeaf.val = newBloomFilter; //insert the new leaf into the parent node newSibling = insertIntoParent(newLeaf, node); 1 0 0 0 0 0 0 0 Id:1 return newSibling; //current node is leaf or not 0 1 0 0 0 0 0 0 Id:2 0 0 1 0 0 0 0 0 Id:3 Id:11 0 0 1 1 0 1 0 0 0 0 1 0 0 1 0 0 Id:10 0 0 0 1 0 0 0 0 Id:4 Id:8 0 0 0 0 1 0 1 0 0 0 0 0 1 0 0 0 Id:5 0 0 0 0 0 0 1 0 Id:6 Figure 2: Bloofi Tree After Insert and Split 6 7 and 8 is 4, so let’s assume that node 7 is chosen as the closest node), which needs to split. The resulting Bloofi tree is shown in Fig. 2. Theorem 1 gives the cost of the insert algorithm for Bloofi. The cost metric we use to measure the performance of an operation in Bloofi is the number of Bloofi nodes accessed by that operation: either the Bloom filter value is read/modified by that operation, or the parent or children pointers in the node are read/modified. a sibling. If redistribution is possible, the entries are redistributed, parent information in the moving nodes is updated, and the Bloom filter values in the parent node, sibling node, and all the way up to the root are updated (lines 15–21). If redistribution is not possible, the parent node merges with a sibling, by giving all its entries to the sibling (lines 23–29). The Bloom filter value in the sibling node is updated, and the delete procedure is called recursively for the parent node. Occasionally, the delete propagates up to the root. If only one child remains in the root, the root is deleted and the height of the tree decreases (lines 7–9). Example. Assume that the node with id 5 and value “00001000” is deleted from Fig. 1. The resulting tree, after deletion of node 5 and redistribution between 8 and 7 is shown in Fig. 3. Theorem 1 (Insert Cost). The number of Bloofi nodes accessed during the insert operation in Bloofi is O(d logd N), where d is the order of the Bloofi index and N is the number of Bloom filters that are indexed. P ROOF. The following components are part of an insert operation: Theorem 2 (Delete Cost). The number of Bloofi nodes accessed during the delete operation in Bloofi is O(d logd N), where d is the order of the Bloofi index and N is the number of Bloom filters that are indexed. 1. The values of all nodes in the path from the root to the new leaf are updated to reflect the newly inserted Bloom filter. Updating the value of a node means computing the OR with the newly inserted Bloom filter, so only the old and the new Bloom filter values need to be accessed. The cost of the update is therefore constant (2). The height of Bloofi tree is at most blogd Nc and at each level we perform a constant amount of work, so the total cost for that update is O(logd N). P ROOF. (1) Once the reference to a node is deleted from its parent in the Bloofi tree (constant cost operation), the values of the nodes from the deleted node to the root need to be recomputed, so the total cost is O(d logd N). (2) Occasionally, a redistribute or merge is needed, with a cost in O(d). In the worst case, the merge and delete propagates up to the root, so the worst case cost for merge is O(d logd N). From (1) and (2) it follows that the cost of the delete operation is O(d logd N). 2. At each level in the tree, a search for the most similar child node is performed (line 9), and the cost of that search is O(d), so total cost due to the search for the placement of the new leaf is O(d logd N). When subjected to many insertions and deletions, though the Bloofi tree remains balanced, it could be that the partition of the Bloom filters as per their Hamming distance could degrade in quality. The performance of Bloofi could diminish in such instances and it could become necessary to reconstruct the Bloofi data structure. 3. The cost of a split is O(d) since there are at most 2d + 1 children for a node. In the worst case, the split propagates up to the root, and the height of the tree is O(logd N), so the worst case cost for the split operations is O(d logd N). 5.3. Update Object insertions in the underlying set lead to updates of the Bloom filters, so we expect the update operation for Bloofi to be quite frequent. Instead of treating a Bloom filter update as a delete followed by insert, we use an “in-place” update. If the Bloofi tree becomes inefficient in routing due to updates (too many false positives during search) the Bloofi tree can be reconstructed from scratch in batch mode. Algorithm 5 shows the pseudo-code for the update algorithm. The algorithm takes as parameters the leaf node corresponding to the updated value and the new Bloom filter value for that node. All the Bloom filters in the path from the leaf to the root are updated by OR-ing with the new value. From the three points, we see that the cost of the insert operation is O(d logd N). 5.2. Delete The delete algorithm (Algorithm 4) deletes the given node from the Bloofi index. When the procedure is first invoked with the leaf to be deleted as argument, the pointer to that leaf in the parent is deleted. If the parent node is not underflowing (at least d children are left), the Bloom filter values of the nodes in the path from the parent node to the root are re-computed to be the bitwise OR of their remaining children (line 32) and the delete procedure terminates. If there is an underflow (lines 11– 29), the parent node tries to redistribute its entries with 7 Algorithm 4 : delete(childNode) //find the parent node parentNode = childNode.parent; //remove the reference to the node from its parent parentNode.children.remove(childNode); 5: //check whether the tree height needs to be reduced 1: 2: 3: 4: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: Id:9 1 1 1 1 0 0 1 0 if parentNode = root AND parentNode.nbDesc = 1 then root = parentNode.children.get(0); root.parent = null; return null //if not, check if underflow at the parent if parentNode.underflow then //underflow, so try to redistribute first sibling = sibling of parentNode; if sibling.canRedistribute then //redistribute with sibling remove some children from sibling to even out the number of children insert new children into parentNode update .parent information for all nodes moved Id:7 1 1 1 0 0 0 0 0 1 0 0 0 0 0 0 0 Id:1 0 1 0 0 0 0 0 0 Id:2 0 0 1 0 0 0 0 0 Id:3 0 0 0 1 0 0 1 0 Id:8 0 0 0 1 0 0 0 0 Id:4 0 0 0 0 0 0 1 0 Id:6 Figure 3: Bloofi Tree After Delete and Redistribute //update value of all nodes involved, up to the root sibling.val = OR of all children value; recomputeValueToTheRoot(parentNode); else //merge with sibling move all children from parentNode to sibling; update .parent information for all nodes moved Id:9 1 1 1 1 1 0 1 1 26: 27: 28: 29: 30: 31: 32: 33: //recompute sibling value sibling.val =OR of all childrenValue //delete the parentNode delete(parentNode); //merge or redistribute else //no underflow //re-compute the value of all Bloom filters up to the root recomputeValueToTheRoot(parentNode); Id:7 1 1 1 1 1 0 0 0 1 0 0 0 0 0 0 0 Id:1 Algorithm 5 : update(leaf,newBloomFilter) //update all values on the path from leaf to the root node = leaf; repeat 4: node.val = node.val newBloomFilter; 5: node = node.parent; 6: until node = null 1: 2: 3: 0 1 0 0 0 0 0 0 Id:2 0 0 1 0 0 0 0 0 Id:3 0 0 0 1 0 0 0 0 Id:4 0 0 0 0 1 0 1 1 Id:8 0 0 0 0 1 0 0 0 Id:5 0 0 0 0 0 0 1 1 Id:6 Figure 4: Bloofi Tree After Update 8 Example. In the Bloofi tree in Fig. 1, assume that we update the value of node 6 to be “00000011”. The values of all the nodes in the path from node 6 to the root are OR-ed with “00000011” and the resulting tree is shown in Fig. 4. Checking for membership in a Bloom filter is equivalent to checking the value of a few bits at random locations in a bitmap. Though fast, this operation does not exploit bit-level parallelism: the processor’s ability to do several bitwise operations in one instruction. Let us assume that we have a 64-bit processor. We propose a new approach (Flat-Bloofi) which stores the data corresponding to 64 Bloom filters in a packed data structure. Each Bloom filter is backed by a m-bit bitmap. In their place, we construct a single array of 64-bit integers of length m (henceforth a Flat-Bloofi array). The first 64-bit integer corresponds to the first bit of each of the 64 bitmaps. And so on. Thus, the value of the ith bit of the jth bitmap is the value of the jth bit of the ith integer in Flat-Bloofi array. Given N Bloom filters, we create dN/64e Flat-Bloofi arrays. When N is not a multiple of 64, some bits are unused in one of the Flat-Bloofi arrays. We organize Flat-Bloofi using the following data structures: Theorem 3 (Update Cost). The number of Bloofi nodes accessed during the update operation in Bloofi is O(logd N), where d is the order of the Bloofi index and N is the number of Bloom filters that are indexed. 5.4. Improving pruning efficiency In Bloofi, each non-leaf node value is the bitwise OR of its children values. As the total number of objects in the underlying sets indexed by Bloofi increases, the probability of false positive results returned by the Bloom filters at the higher levels in the tree increases. In the worst case, all bits in the Bloofi nodes at higher levels in the tree could be one. This leads to decreased pruning efficiency of the higher levels in the tree, as more false positive paths are followed during search. To improve upon the number of Bloom filters that need to be checked for matches during a query, we propose the following heuristic. During the insert procedure, we do not split a node that has all the bits set to one, even if the node is full. This could stop the splitting a little too early, but it avoids creating multiple levels in the tree with all the bits set to one. Our experimental results in Section 7.2 show that the search cost is indeed improved by using this heuristic when the root level value has all bits set to one. Effectively, Bloofi can be viewed as a forest instead of a tree. Alternatively, we could dynamically change the size of the Bloom filters when the false positive probability at the root reaches 1. In such a case, if the application allows, we could reconstruct the base Bloom filters to have a lower false positive probability, and reconstruct the Bloofi tree from bottom-up. The index construction time for 100 000 Bloom filters was only about 15 seconds in our experiments, so periodic reconstruction of the index is a viable solution. • We maintain ζ Flat-Bloofi arrays. With this data, we can index L = ζ × 64 Bloom filters. • We use an array β of L bits, of which exactly N are set to true. This indicates which index locations are in use. Thus if a Bloom filter is deleted from the index and then a new one inserted, we can reuse the space. • We use a hash table which maps from Bloom filter identifiers to internal index values (in the range [0, L)). We also maintain an array of identifiers of length up to L which gives us the identifier of the Bloom filter stored at a given index. Combined together, the hash table and the array of identifiers provide a two-way index from Bloom filter identifiers to index locations. Queries. Given k hash functions, we map a given value to k index locations in the range [0, m). For each FlatBloofi array, we retrieve the corresponding k 64-bit integers and compute their bit-wise AND aggregate. We then iterate over the bits having a value of true: each one corresponds to a matching Bloom filter. We use our array of identifiers to recover the corresponding Bloom filter identifiers. Thus if we have N Bloom filters, we will access no more than k × ζ 64-bit integers from the Flat-Bloofi arrays. Iterating through the set bits can be done quickly using fast functions such as Java’s Long.bitCount. 6. Bit-level parallelism Bloofi keeps the Bloom filters as they are, and only adds new (aggregated) Bloom filters to accelerate the queries. However, in a worst case scenario, Bloofi may need to check many Bloom filters. In such a case, Bloofi may not be faster, and could even be slower, than a naive approach which merely checks every Bloom filter. 9 Insertion. When inserting a new Bloom filter, using the bit array β, we first seek an available index. If none is found, then we create a new array of 64-bit integers, thus, effectively, making available 64 new index positions. The bit array β, the array of identifiers, and the hash table mapping to index values are updated. Finally, we iterate through all of the set bits in the bitmap of the new Bloom filter and set the corresponding bits in the Flat-Bloofi array using a bit-wise OR operation. size of Bloom filters, different underlying data distributions, and, for Bloofi, different similarity metrics used for Bloofi construction and different order values. We also compare Bloofi and Flat-Bloofi’s performance with the “naive” case, where the Bloom filters are searched linearly, without any index. We show that in most cases, Bloofi achieves logarithmic search performance, with low maintenance cost, regardless of the underlying data distribution. Deletion. When deleting a Bloom filter, we use the hash table to recover its index using its identifier. The key is then removed from the hash table. The corresponding bit in β is set to false. There are then two possibilities. 7.1. Experiments setup We implemented Bloofi and Flat-Bloofi in Java and ran our experiments using Oracle’s JDK version 1.7.0 45. For Bloom filters, we use the implementation provided by Skjegstad [28], modified to use faster hashing and a more efficient BitSet implementation [19]. The experiments were run on a HP Z820 Workstation with an Intel Xeon E5-2640 processor (2.50 GHz) having 6 cores. Our test machine had 32 GB of RAM (DDR3-1600, 4 × 8 GB). We did not use parallelism and all our data structures are in RAM. • If this Bloom filter was stored alone in a Flat-Bloofi array, then the Flat-Bloofi array is removed. We also remove the corresponding 64 bits in β as well as the corresponding 64 entries in the array of identifiers. We scan the values of the hash table, and deduct 64 from all index entries exceeding index of the deleted Bloom filter. • Otherwise, we go through the Flat-Bloofi array and unset the bits corresponding to the Bloom filter using a bit-wise AND operation. Because we do not keep a copy of the original Bloom filter, we need to update every single component of the Flat-Bloofi array. 7.1.1. Performance metrics As performance metrics we use: • search bf-cost: the number of Bloom filters checked to find the one(s) matching a queried object, averaged over 50 000 searches We believe that this compaction approach should provide reasonable performance and memory usage in a context where deletions and insertions are frequent. In the worst case scenario, however, and after many deletions, we could have N Flat-Bloofi arrays indexing N Bloom filters. To guard against such inefficiencies, we would need more aggressive compaction strategies, but we leave them to future work. Note We could further accelerate the queries by replacing many (ζ) Flat-Bloofi arrays, with a single array containing words of ζ × 64 bits. This would improve memory locality. However, it would make compaction more expensive. • search time: the average time, in milliseconds, to find all the Bloom filters matching a queried object • storage cost: space required to store the Bloom filters and/or the associated index structure, if applicable. For Bloofi, we estimate this cost as the number of bytes for a Bloom filter, multiplied by the number of nodes in the Bloofi tree, including the leaves; for Flat-Bloofi, the storage cost is estimated as the number of bytes for a Bloom filters, multiplied by number of Bloom filters rounded up to a multiple of 64 (Flat-Bloofi uses longs for storage); for the “naive” case, the storage cost is estimated as the number of bytes for a Bloom filters, multiplied by number of Bloom filters Update. Updating a Bloom filter is easiest: we go through the corresponding Flat-Bloofi array and set the corresponding bits as we did with an insertion. 7. Experimental evaluation • maintenance bf-cost: the average number of Bloofi nodes accessed during an insert, delete, or update operation We evaluate Bloofi’s and Flat-Bloofi’s search performance and maintenance cost for different number and • maintenance time: the average time, in milliseconds, for an insert, delete, or update operation 10 7.1.2. Parameters varied As described in Section 3, a Bloom filter is a bit array of length m constructed using a set of k hash functions. In practice, when constructing a Bloom filter, one does not specify the length and the number of hash functions. It is unlikely that the average engineer would know which values to pick. Rather, one specifies the expected maximal number of elements to be stored, nexp , (a possibly large number) as well as the desired probability of having a false positive, ρfalse , (e.g., 1%). One can reasonably expect an engineer to be able to set these values from domain knowledge. Then the number of hash functions and the size of the bitmaps can be computed using l the following m formulas k = d− ln ρfalse / ln 2e and m = k/ ln 2 ∗ nexp . In the experiments we vary the following parameters: parameter value N — Number of Bloom filters indexed d — Bloofi order m — Bloom filter size (bits) n — Nb of elements in each Bloom filter ρfalse — Desired probability of false positives Construction method Similarity measure Data distribution 1000 2 100 992 100 0.01 iterative Hamming nonrandom Table 1: Default Values for Parameters run each experiment 10 times, and we report the averages over the last 5 runs. Since our values x are integers, we picked hash functions at random of the form h(x) = ax mod m where a is an odd integer defining the hash function. We found that this choice gave good performance in our case. • N: the number of Bloom filters indexed; • d: Bloofi order; 7.2. Performance results 7.2.1. Varying number of Bloom filters indexed N Fig. 5a shows the increase in search time as N increases from 100 to 100 000 for Bloofi, Flat-Bloofi, and Naive case. Note the logarithmic scale on both X and Y axes. For Bloofi, the increase in search time is logarithmic as long as the false positive probability (pfalse ) at the root is less than one (N ≤ 1000), but the increase is higher than logarithmic after that, due to high value for pfalse at the high levels of the tree. However, even for 100 000 filters, Bloofi still performs orders of magnitude better than the “naive” case. The difference between “naive” case and Bloofi is not so big when only a few Bloom filters are checked, likely because the search time depends not only on the number of Bloom filters checked, but also on the locality of nodes in memory. We see that the curves for Bloofi and Flat-Bloofi intersect each other. For small numbers of Bloom filters, Flat-Bloofi performs better, due to its superior memory locality and exploitation of bit-level parallelism. However as the number of Bloom filters increases, Bloofi performs better, due to its superior pruning abilities. For Bloofi, using bulk construction leads to improved search performance, since a global sort of all the Bloom filters is performed before the bulk insert, while the incremental construction is greedy and might not lead to optimal placement. However, the cost of sorting is O(N 2 ) in our implementation, which leads to high index construction time for the bulk construction. To evaluate the effect of the in-place update for Bloofi introduced in Section 5.3, we performed experiments where the Bloofi tree is built incrementally using only • m: the size, in bits, of the Bloom filters indexed: m is varied indirectly, by specifying nexp ; • n: the number of elements in each Bloom filter indexed; • ρfalse : the desired probability of false positives in the Bloom filters indexed; • index construction method: iterative, where we insert Bloom filters one by one using the algorithm in Section 5.1, or bulk. For the bulk construction, we first sort all Bloom filters such that the first Bloom filter is the one closest to the empty Bloom filter, the second is the filter closest to the first Bloom filter, etc., and then construct the Bloofi tree by always inserting next to the right-most leaf; • similarity measure: the measure used to define “closeness” during insert. We consider Hamming, Cosine and Jaccard distances; • data distribution: nonrandom, with nonoverlapping ranges for each Bloom filter: each Bloom filter i contains n integers in the range [i × n, (i + 1) × n) and random, with overlapping ranges for data in the Bloom filters: each Bloom filter i contains n random integers in a randomly assigned range. For each experiment we vary one parameter and use the default values shown in Table 1 for the rest. We 11 100 10-1 105 Flat Bloofi Bloofi-Bulk Naive Flat-AU Bloofi-AU Naive-AU 10-2 10-3 10-4 102 103 104 Number of Bloom Filters Indexed (a) Search Time vs. N 105 104 107 Ideal Bloofi Bloofi-Bulk Bloofi-AU Naive Storage Cost (kB) 101 Search BF-Cost Search Time (ms) 102 103 102 101 102 103 104 105 106 Flat Bloofi Bloofi-Bulk Naive 105 104 103 102 Number of Bloom Filters Indexed (b) Search BF-Cost vs. N 103 104 105 Number of Bloom Filters Indexed (c) Storage Cost vs. N Figure 5: Varying Number of Bloom Filters N half of the elements in each Bloom filter. The rest of the elements are inserted then in each Bloom filter and Bloofi is updated in-place. We perform a similar experiment for Flat-Bloofi and the Naive case. The AU (After Updates) curves in Fig. 5a show the search time in the final data structure. As we expected, for Flat-Bloofi and Naive, the After Updates and normal curves are almost identical, since the properties of these data structures are not affected by updates. However, the BloofiAU and Bloofi curves are also almost identical, which shows that the in-place update maintains the search performance of the Bloofi tree. This shows that using the heuristic increases the search performance of Bloofi index when the false positive probability at the high levels in the tree is high. Fig. 5c shows the increase in the storage cost for Bloofi, Flat-Bloofi, and Naive, as the number of Bloom filters indexed increases. In all cases, the storage cost increases linearly with N. The storage cost is lowest for Naive case, as no extra information besides the actual Bloom filters is maintained. Flat-Bloofi has a small overhead, only because sometimes rounds up the space to multiples of 64, so it can take advantage of the bitlevel parallelism. The storage cost for Bloofi is also quite low, as the number of non-leaf nodes in the Bloofi tree is less than N. The storage cost for bulk construction (Bloofi-bulk) is slightly higher than for incremental construction (Bloofi), because constructing a tree by always inserting in the right-most leaf leads in general to skinnier trees, with more levels and more nodes. Fig. 6a shows the cost, in terms of time, of maintaining Bloofi, Flat-Bloofi, and the Naive data structure. The maintenance cost for Naive is negligible, as the Bloom filters are just maintained in a list. For Flat-Bloofi, the maintenance cost increases only slightly with the number of Bloom filters, as the cost of the different operations in Flat-Bloofi depends mainly on the size of the Bloom filters and the number of bits turned on, and does not depend much on the number of Bloom filters. For Bloofi, the trend is increasing for the insert and delete, as there are more nodes in the Bloofi tree that get impacted by insert or delete. The cost of updates does not increase after the root becomes all one and does not split, because we use in-place updates and the height of the tree does not increase after N > 10000. We find the relative cost of insert, delete, and update for Bloofi and Flat-Bloofi quite interesting. For Bloofi, update is the cheapest operation, both as time and number of Bloom filters accessed (see Fig. 6b), since only the values of the nodes from the leaf to the root need to be updated (OR-ed with the new value). However, Fig. 5b shows similar trends for the search bf-cost (average number of Bloom Filter nodes accessed for a search). The search bf-cost performance metric is not used for Flat-Bloofi and Naive, as for these data strictures, all the Bloom filters are checked during a search. In the “ideal” case for Bloofi, when exactly one path from root to the leaf is followed during search, the search bf-cost is approximately l logl N + 1 if each non-leaf node has l children, and the search bf-cost increases logarithmically with N. In our experiments, the increase in search bf-cost is logarithmic as long as the false positive probability (pfalse ) at the root is less than one (N ≤ 1000), but the increase is higher than logarithmic after that, due to high value for pfalse at the high levels of the tree. However, even for 100 000 filters, Bloofi still performs two orders of magnitude better than the “naive” case. If the size of the Bloom filters increases, the search cost decreases to the “ideal” cost, as shown in Fig. 8a. To evaluate the effects of the heuristic introduces in Section 5.4, we run the same experiment without using the heuristic, so always splitting the root even if all the bits were set to 1. When there are Bloofi nodes with all bits 1, both the search bf-cost and the search time when the heuristic is used are lower than when the heuristic is not used (search bf-cost is 104.29 vs. 110.17 for N = 10 000 and 876.33 vs. 974.92 for N = 100 000). 12 10-1 Flat-Insert Bloofi-Insert Naive-Insert Flat-Delete Bloofi-Delete Naive-Delete Flat-Update Bloofi-Update Naive-Update 10-2 10-3 10-4 10-5 10-6 102 103 104 Number of Bloom Filters Indexed (a) Maintenance Time vs. N 105 103 Average Nb Nodes Accessed 100 Average Nb Nodes Accessed Operation Time (ms) 101 Bloofi-Insert Bloofi-Delete Bloofi-Update 102 101 102 103 104 Number of Bloom Filters Indexed (b) Maintenance BF-Cost vs. N 105 140 Bloofi-Insert Bloofi-Delete Bloofi-Update 120 100 80 60 40 20 0 0 5 10 15 20 25 Bloofi Order (c) Maintenance BF-Cost vs. d Figure 6: Maintenance Cost for Bloofi, the insert operation is the most expensive as bf-cost, but delete becomes the most expensive as time, with the increased number of indexed Bloom filters. The reason for this difference is that while during a delete operation fewer nodes are accessed (no need to search for the place in the tree), we do more work at each node — we need to re-compute the values of each node in the path from the leaf to root, by OR-ing all the children value. During insert, the values of the nodes get updated by OR-ing with the newly inserted Bloom filter. For Flat-Bloofi, when inserting a sparse Bloom filter, only a few words need to change, so it is fast. When deleting, we do not know which bit changed, so we have to set them all to zero, which takes longer. If the Bloom filters would be more dense, it is possible that deletions could be faster than insertions. During updates, we do not know how the new Bloom filter differs from the old one, and we cannot compute the difference (with XOR) since we no longer have the old one, so we have to go through the set bits in the Bloom filter, and set them all to 1. The running time is close to an insert, which is what we see in Fig. 6a. Comparing Bloofi and Flat-Bloofi, Bloofi’s updates are cheaper, as Bloofi only needs to OR the new value with a few Bloom filters. For inserts, Flat-Bloofi is faster, as it does not need to search (and compute distances) the tree for the best place to insert the new node. For deletes, Bloofi is faster when the number of Bloom filters is below 10 000 (and the pfalse at the root is not 1), but Flat-Bloofi’s cost does not depend much on the number of Bloom filters, so it becomes faster for large number of Bloom filters indexed. tributions are needed. The update bf-cost does not increase after the root of the Bloofi tree becomes one, as the root does not split in that case, so the height of the Bloofi tree does not increase with the increased number of indexed Bloom filters. 7.2.2. Varying Bloofi order d Fig. 7a and Fig. 7b show the search time and search bf-cost as the order of Bloofi increases. The search bfcost and search time increase as d increases, since the search cost is proportional to d logd N. For a constant N, the function f (x) = x log x N is convex, with minimum value when x = 2.718(e). The best search performance is achieved for Bloofi tree of low order. The search bf-cost obtained from experiments is close to the ideal search cost for full trees (2d children per non-leaf node), which shows that our algorithms for tree construction perform well, and not many nodes outside of the path from the root to the answer leaf are checked during search. Bulk construction performs better than incremental construction, due to the global sort. The Bloofi and Bloofi-AU lines are almost identical, which shows that our in-place update maintains the performance of the Bloofi tree. The storage cost decreases with order (Fig. 7c), as the number of non-leaf nodes in a Bloofi tree of order d is N−1 and N−1 between 2d−1 d−1 , so higher the order, the lower the overhead of storing the constructed Bloofi tree. While the storage cost is lower for higher orders, the search cost is higher (Fig. 7b), so there is a trade-off between search and storage cost. We expect search performance to be more important than storage in practice, and the storage cost of Bloofi is similar with the Naive case even in the worst case (at most twice as much space is needed for Bloofi as it is needed for the Naive case), so we believe that Bloofi trees of low order will be used more in practice. The storage cost for bulk construction is slightly higher than for incremental construction, because always inserting into the right-most leaf leads to The maintenance bf-cost for Bloofi, as the average number of Bloom filters accessed during a maintenance operation, is shown in Fig. 6b. The maintenance bf-cost increases logarithmically with N (Fig. 6b), as expected from Theorems 1–3. The bf-cost of insert is higher than the delete, as the place for the new node needs to be found during insert. The update cost is the lowest, as we use in-place updates, and no splits, merges, or redis13 Search Time (ms) 0.007 Search BF-Cost Bloofi Bloofi-Bulk Bloofi-AU 0.008 0.006 0.005 0.004 0.003 0.002 90 20 80 18 70 16 60 50 40 20 10 0 0 5 10 15 20 25 Ideal-Skinny Ideal-Full Bloofi Bloofi-Bulk Bloofi-AU 30 0.001 0 0 5 Bloofi Order (a) Search Time vs. d Storage Cost (MB) 0.009 10 15 20 Bloofi Bloofi-Bulk Bloofi-AU Naive 14 12 10 8 6 4 2 25 Bloofi Order (b) Search BF-Cost vs. d 0 0 5 10 15 20 25 Bloofi Order (c) Storage Cost vs. d Figure 7: Varying Bloofi Order d when pfalse increases. pfalse < 1 at the root for all the ρfalse values tested in the experiment, so Bloofi’s performance is close to the ideal case. skinnier, taller trees, with more nodes. Fig. 6c shows the variation of maintenance bf-cost with the order of Bloofi tree. The insert and delete costs (O(d logd N)) increase with d, while the update cost (O(logd N)) decreases with d. A more surprising result is shown in Fig. 9b. The search time for the Naive case, Bloofi, and Flat-Bloofi is decreasing in the experiment, even if the search bfcost is increasing. The main reason is the memory locality. As the ρfalse increases, the size of the Bloom filters decreases, leading to better memory locality properties. Flat-Bloofi, with its efficient exploitation of the bitlevel parallelism benefits the most from the low memory footprint. This is consistent with the results shown in Fig. 8b. A second reason for the decrease in the search time for all cases is that the number k of hash functions used for the Bloom filters decreases as ρfalse increases. k = d− ln ρfalse / ln 2e and decreases from 24 to 4 in the experiment. As fewer hash functions are used, fewer bits in the Bloom filters need to be checked for matches. This contributes to the faster search time. 7.2.3. Varying Bloom filter size We vary the Bloom filter size m by varying the number of expected elements in the Bloom filter nexp from l m 100 to 100 000. m = k/ ln 2 ∗ nexp . Fig. 8a shows the search bf-cost variation with the Bloom filter size in a system with 100 000 total elements (1000 filters with 100 elements each). The search bf-cost for Bloofi is always below Naive cost, and it decreases to the ideal cost as the size of the Bloom filters increases and the false positive probability at the high level nodes in Bloofi decreases. In fact, O(d logd N) search cost is achieved as soon as pfalse < 1 for the root, even if pfalse is close to 1 (0.993 in our experiments for size 100 992). The search time (Fig. 8b) also decreases for Bloofi as pfalse at the higher levels is reduced, while the search time for Naive case is almost constant. For small Bloom filter sizes, the search time for the Naive case is slightly lower than using Bloofi, likely due to memory locality. The search time for Flat-Bloofi is lower than for Bloofi when the pruning capabilities of Bloofi are reduced, due to the efficient bit level parallelism exploited by FlatBloofi. As the size of the Bloom filters increases, the memory locality of Flat-Bloofi is reduced, and the trend for the search time is upward, while the trend is downward for Bloofi. 7.2.5. Varying the number of elements n Fig. 9c shows how the search time varies with the increase in n, the number of elements in the indexed Bloom filters, as the size of the Bloom filters remains constant. Flat-Bloofi provides the best performance in this case, as it benefits from the memory locality and bit-level parallelism, and the performance is almost constant regardless of the actual number of elements in the Bloom filter. Search time for Bloofi increases only slightly as long as pfalse < 1 at the root, even when the number of elements in the system is ten times larger than the expected number of elements in a Bloom filter (for n = 100, there are 100 000 elements in the system, and nbElExp = 10 000). Bloofi’s performance degrades as its pruning capabilities are reduced when pfalse = 1 at the root. The search bf-cost for Bloofi varies in a similar way (not shown). 7.2.4. Varying the probability of false positives Fig. 9a shows how the search bf-cost for Bloofi increases as we increase the desired probability of false positives in the Bloom filters indexed. As expected, the bf-cost slowly increases as ρfalse and implicitly pfalse increases, as the pruning capabilities of Bloofi are reduced 14 900 10-1 Ideal Bloofi Naive 102 Search BF-Cost 800 Search Time (ms) Search BF-Cost 103 Flat Bloofi Naive 10-2 700 Hamming Cosine Jaccard 600 500 400 300 200 100 101 103 104 105 106 10-3 107 103 104 Bloom Filter Size (bits) 105 106 0 102 107 Bloom Filter Size (bits) (a) Search BF-Cost vs. Filter Size 103 104 105 Number of Bloom Filters Indexed (b) Search Time vs. Filter Size (c) Search BF-Cost vs. Metric vs. N Figure 8 102 101 10-7 10-6 10-5 10-4 10-3 10-2 10-1 100 100 Flat Bloofi Naive 10-2 10-3 10-7 10-6 Desired False Positive Probability (a) Search BF-Cost vs. ρfalse Search Time (ms) 10-1 Ideal Bloofi Naive Search Time (ms) Search BF-Cost 103 10-5 10-4 10-3 10-2 Desired False Positive Probability (b) Search Time vs. ρfalse 10-1 100 10-1 Flat Bloofi Naive 10-2 10-3 100 101 102 103 104 Number of Elements in Bloom Filters (c) Search Time vs. n Figure 9 filters, which is set to 100 for these experiments. In the nonrandom case, there is no overlap between the sets represented by different Bloom filters, while in the random case, we could have overlap between the sets. We expect that in a real scenario, the random case is more common. The search cost is shown in Fig. 10b and the search time is shown in Fig. 10c. We expected the performance in the random case to be a little worse than in the nonrandom case, since multiple Bloom filters might match a queried object. However, the overlap of ranges in the nonrandom case was not enough to lead to a substantial increase in the search cost or search time for the nonrandom case, even if the number of results was indeed larger for nonrandom case. The search performance is similar for both distributions used, which shows that Bloofi is robust to the underlying data distribution. 7.2.6. Varying similarity metric During Bloofi construction, we use a similarity metric to measure the similarity between two Bloom filters, and this metric determines the location of the Bloom filters in Bloofi. In this section we experiment with several metrics: • Hamming(A, B) = |A xor B|, • Jaccard(A, B) = 1 − |A and B|/|A or B|, • and Cosine(A, B) = 1 − |A and B|/kAk2 × kBk2 , where |A| is the number of 1s in the bit array A. The search bf-cost is similar for all the metrics (Fig. 8c). When Jaccard is used, the search cost is a little lower, but the differences are small, and they might be just due to chance. A similar trend was obtained for search time, as shown in Fig. 10a. The search time is the lowest for Jaccard, and highest for Hamming. 7.3. Experimental results conclusion 7.2.7. Varying underlying data distribution We use the following distributions for the underlying data in the Bloom filters: nonrandom, in which we insert in each Bloom filter 0 ≤ i ≤ N the n integers in the range [i × n, i × n + n), and random, in which we insert in each Bloom filter n integers randomly chosen from a random range assigned to that Bloom filter. n is the actual number of elements in the Bloom Our experimental evaluation shows that: • For Bloofi, the search cost increases logarithmically with N, but gets worse if the false positive probability at the root is 1. For optimal performance, the size of the Bloom filters should be based on the estimate for the total number of elements in the entire system. If the false positive 15 10-1 10-2 10-3 102 103 104 Number of Bloom Filters Indexed (a) Search Time vs. Metric vs. N 105 104 102 Bloofi-Random Bloofi-Nonrandom Naive Search Time (ms) 105 Hamming Cosine Jaccard Search BF-Cost Search Time (ms) 100 103 102 101 102 103 104 Number of Bloom Filters Indexed 105 101 100 10-1 Flat-Nonrandom Bloofi-Nonrandom Naive-Nonrandom Flat-Random Bloofi-Random Naive-Random 10-2 10-3 10-4 102 103 104 105 Number of Bloom Filters Indexed (b) Search BF-Cost vs. Data Distribution (c) Search Time vs. Data Distribution vs. N vs. N Figure 10 • • • • • • probability at the root is below 1, even if close to 1, the search cost is O(d logd N). For Flat-Bloofi, the search time increases with N. For low number of Bloom filters, search time for Flat-Bloofi is lower than for Bloofi. Search costs for Bloofi increase with order, since search cost is in O(d logd N), so low order is preferred for Bloofi. Storage cost for Bloofi is O(N + N/d) For Bloofi, insert cost and delete cost are O(d logd N), and update cost is O(logd N) Bulk construction gives slightly better search results, since the trees constructed with bulk construction are skinnier. However, differences in performance between bulk and incremental construction are small. The cost of sorting, which is the first step in bulk construction, is O(N 2 ) in our implementation, so the operation is expensive. Our experimental results show that the Bloofi algorithm for insertion produces a tree close to the tree obtained by using a global ordering of Bloom filters. The distance metric used to compare the “closeness” between Bloom filters does not have a big effect on the search performance of the resulting Bloofi tree, but the Jaccard distance seems to lead to best search performance. based on Bloom filters, and uses a data structure similar to Flat-Bloofi. Mullin [23] uses Bloom filters to reduce the cost of semijoins in distributed databases. Most applications of Bloom filter [4, 6], use the Bloom filters directly and do not search through a large number of Bloom filters. B+ trees [8] inspired the implementation of the Bloofi tree. However, each node in Bloofi has only one value, and the children of a node do not represent completely disjoined sets, so multiple paths might be followed during search. A closely related idea to that of the multidimensional Bloom filter problem dates back to superimposed codes [26] and descriptor files [24]: descriptors (effectively bit arrays) are searched through large files with a hierarchical data structure constructed by OR-ing the descriptions. When applied to set-valued attributes, these descriptors are called “signatures”: each possible value is mapped to a fixed number of bit positions that are set to true if the value is present, sets are constructed by setting all the bit positions corresponding to all values. The S-tree [12, 17] is an implementation of this idea which resembles Bloofi: signatures are organized in a similar tree structure using the Hamming distance to aggregate similar signatures. S-trees are primarily used to index set-valued attributes. Our problem differs in that we are provided Bloom filters in a distributed setting, and must quickly locate which Bloom filter matches a given query. 8. Related work Part of the existing work related to Bloom filters [7, 11, 13, 14, 21] is concerned with extending or improving the Bloom filters themselves and does not deal with the problem of searching through a large set of Bloom filters. Applications of the Bloom filters to web caching [14] use multiple Bloom filters, but their number is in general small and a linear search through the Bloom filters is performed. [16] introduces an XML filtering system Our Flat-Bloofi approach is similar to the wordparallel, bit-serial (WPBS) approach used for scanning signatures [2, 18], except that our data structure is inmemory, supports moderately fast deletion and does not require dedicated hardware. It is also similar to bitsliced signature files [27, 31] as they apply to text indexing. 16 9. Conclusions and future work [7] S. Cohen and Y. Matias. Spectral Bloom filters. In Proceedings of the 2003 ACM SIGMOD International Conference on Management of Data, SIGMOD ’03, pages 241–252, New York, NY, USA, 2003. ACM. [8] D. Comer. Ubiquitous b-tree. ACM Comput. Surv., 11(2):121– 137, June 1979. [9] A. Crainiceanu. Bloofi: A hierarchical bloom filter index with applications to distributed data provenance. In Proceedings of the 2Nd International Workshop on Cloud Intelligence, Cloud-I ’13, pages 4:1–4:8, New York, NY, USA, 2013. ACM. [10] A. Crainiceanu, P. Linga, A. Machanavajjhala, J. Gehrke, and J. Shanmugasundaram. P-ring: An efficient and robust p2p range index structure. In Proceedings of the 2007 ACM SIGMOD International Conference on Management of Data, SIGMOD ’07, pages 223–234, New York, NY, USA, 2007. ACM. [11] F. Deng and D. Rafiei. Approximately detecting duplicates for streaming data using stable Bloom filters. In Proceedings of the 2006 ACM SIGMOD International Conference on Management of Data, SIGMOD ’06, pages 25–36, New York, NY, USA, 2006. ACM. [12] U. Deppisch. S-tree: A dynamic balanced signature index for office retrieval. In Proceedings of the 9th Annual International ACM SIGIR Conference on Research and Development in Information Retrieval, SIGIR ’86, pages 77–87, New York, NY, USA, 1986. ACM. [13] S. Dutta, S. Bhattacherjee, and A. Narang. Towards “intelligent compression” in streams: A biased reservoir sampling based Bloom filter approach. In Proceedings of the 15th International Conference on Extending Database Technology, EDBT ’12, pages 228–238, New York, NY, USA, 2012. ACM. [14] L. Fan, P. Cao, J. M. Almeida, and A. Z. Broder. Summary cache: a scalable wide-area web cache sharing protocol. IEEE/ACM Trans. Netw., 8(3):281–293, 2000. [15] D. Ficara, S. Giordano, G. Procissi, and F. Vitucci. Blooming trees: Space-efficient structures for data representation. In Proceedings of the 2008 IEEE International Conference on Communications, pages 5828–5832, May 2008. [16] X. Gong, W. Qian, Y. Yan, and A. Zhou. Bloom filter-based XML packets filtering for millions of path queries. In In Proc. ICDE, pages 890–901, 2005. [17] D. L. Lee, Y. M. Kim, and G. Patel. Efficient signature file methods for text retrieval. IEEE Trans. Knowl. Data Eng., 7(3):423– 435, Jun 1995. [18] D. L. Lee and F. Lochovsky. HYTREM—a hybrid text-retrieval machine for large databases. IEEE Trans. Comput., 39(1):111– 123, Jan 1990. [19] D. Lemire. JavaEWAH — a compressed alternative to the Java BitSet class (version 0.8.3). https://github.com/ lemire/javaewah [last checked 10-03-2014], 2014. [20] D. Li, H. Cui, Y. Hu, Y. Xia, and X. Wang. Scalable data center multicast using multi-class Bloom filter. In Proceedings of the 2011 19th IEEE International Conference on Network Protocols, ICNP ’11, pages 266–275, Washington, DC, USA, 2011. IEEE Computer Society. [21] M. Mitzenmacher. Compressed Bloom filters. In Proceedings of the Twentieth Annual ACM Symposium on Principles of Distributed Computing, PODC ’01, pages 144–150, New York, NY, USA, 2001. ACM. [22] M. Mitzenmacher and E. Upfal. Probability and Computing: Randomized Algorithms and Probabilistic Analysis. Cambridge University Press, New York, NY, USA, 2005. [23] J. K. Mullin. Optimal semijoins for distributed database systems. IEEE Trans. Softw. Eng., 16(5):558–560, May 1990. [24] J. L. Pfaltz, W. J. Berman, and E. M. Cagley. Partialmatch retrieval using indexed descriptor files. Commun. ACM, 23(9):522–528, Sept. 1980. We introduced Bloofi, a hierarchical index structure for Bloom filters. By taking advantage of intrinsic properties of Bloom filters, Bloofi reduces the search cost of membership queries over thousands of Bloom filters and efficiently supports updates of the existing Bloom filters as well as insertion and deletion of filters. Our experimental results show that Bloofi scales to tens of thousands of Bloom filters, with low storage and maintenance cost. In the extreme worst case, Bloofi’s performance is similar with not using any index (O(N) search cost), and in the vast majority of scenarios, Bloofi delivers close to logarithmic performance even if the false positive probability at the root is close to (but less than) one. When there are fewer Bloom filters, we found that an alternative designed to exploit bit-level parallelism (Flat-Bloofi) fared better. We could pursue more advanced applications. For example, Bloofi and Flat-Bloofi could be applied when only current data from a moving window needs to be maintained. If the window of interest is multiple days, separate Bloom filters can be constructed for data collected each day. Old Bloom filters can be deleted from Bloofi, and new filters inserted, so only the objects in the current window are represented in the Bloofi index. 10. Acknowledgements Special thanks to C. Crainiceanu for insightful discussions while developing Bloofi, and D. Rapp, A. Skene, and B. Cooper for providing motivation and applications for this work. 11. References [1] M. K. Aguilera, W. Golab, and M. A. Shah. A practical scalable distributed b-tree. Proc. VLDB Endow., 1(1):598–609, Aug. 2008. [2] S. R. Ahuja and C. S. Roberts. An associative/parallel processor for partial match retrieval using superimposed codes. In Proceedings of the 7th Annual Symposium on Computer Architecture, ISCA ’80, pages 218–227, New York, NY, USA, 1980. ACM. [3] B. H. Bloom. Space/time trade-offs in hash coding with allowable errors. Commun. ACM, 13(7):422–426, July 1970. [4] A. Broder and M. Mitzenmacher. Network applications of Bloom filters: A survey. In Internet Math., pages 636–646, 2002. [5] F. Chang, J. Dean, S. Ghemawat, W. C. Hsieh, and D. A. Wallach. BigTable: A distributed storage system for structured data. In OSDI, pages 205–218, 2006. [6] F. Chang, J. Dean, S. Ghemawat, W. C. Hsieh, D. A. Wallach, M. Burrows, T. Chandra, A. Fikes, and R. E. Gruber. BigTable: A distributed storage system for structured data. ACM Trans. Comput. Syst., 26(2):1–26, June 2008. 17 [25] R. Punnoose, A. Crainiceanu, and D. Rapp. Rya: A scalable RDF triple store for the clouds. In Proceedings of the 1st International Workshop on Cloud Intelligence, Cloud-I ’12, pages 4:1–4:8, New York, NY, USA, 2012. ACM. [26] C. Roberts. Partial-match retrieval via the method of superimposed codes. Proceedings of the IEEE, 67(12):1624–1642, Dec 1979. [27] R. Sacks-Davis, A. J. Kent, and K. Ramamohanarao. Multikey access methods based on superimposed coding techniques. ACM Trans. Database Syst., 12(4):655–696, Nov. 1987. [28] M. Skjegstad. Java-BloomFilter — a stand-alone Bloom filter implementation written in java (version 1.0). https: //github.com/magnuss/java-bloomfilter [last checked 10-03-2014], 2011. [29] I. Stoica, R. Morris, D. Karger, M. F. Kaashoek, and H. Balakrishnan. Chord: A scalable peer-to-peer lookup service for internet applications. In Proceedings of the 2001 Conference on Applications, Technologies, Architectures, and Protocols for Computer Communications, SIGCOMM ’01, pages 149–160, New York, NY, USA, 2001. ACM. [30] H. T. Vo, C. Chen, and B. C. Ooi. Towards elastic transactional cloud storage with range query support. Proc. VLDB Endow., 3(1-2):506–514, Sept. 2010. [31] J. Zobel, A. Moffat, and K. Ramamohanarao. Inverted files versus signature files for text indexing. ACM Trans. Database Syst., 23(4):453–490, Dec. 1998. 18
8cs.DS
A neuromorphic hardware architecture using the Neural Engineering Framework for pattern recognition Runchun Wang, Chetan Singh Thakur, Tara Julia Hamilton, Jonathan Tapson, André van Schaik The MARCS Institute, University of Western Sydney, Sydney, NSW, Australia [email protected] Abstract—We present a hardware architecture that uses the Neural Engineering Framework (NEF) to implement largescale neural networks on Field Programmable Gate Arrays (FPGAs) for performing pattern recognition in real time. NEF is a framework that is capable of synthesising large-scale cognitive systems from subnetworks. We will first present the architecture of the proposed neural network implemented using fixed-point numbers and demonstrate a routine that computes the decoding weights by using the online pseudoinverse update method (OPIUM) in a parallel and distributed manner. The proposed system is efficiently implemented on a compact digital neural core. This neural core consists of 64 neurons that are instantiated by a single physical neuron using a time-multiplexing approach. As a proof of concept, we combined 128 identical neural cores together to build a handwritten digit recognition system using the MNIST database and achieved a recognition rate of 96.55%. The system is implemented on a state-of-the-art FPGA and can process 5.12 million digits per second. The architecture is not limited to handwriting recognition, but is generally applicable as an extremely fast pattern recognition processor for various kinds of patterns such as speech and images. millions of pattern recognitions in real time. The NEF, which was first introduced in 2003, is a framework that is capable of building large systems from subnetworks with a standard three-layer neural structure (the first layer contains the input neurons; the second layer is a hidden layer, which consists of a large number of non-linear neurons; and the third layer is the output layer, which consists of linear neurons). The NEF has been used to construct SPAUN, which is the first brain model, implemented in software and is capable of performing cognitive tasks (Eliasmith et al., 2012). This demonstrates that the NEF is a powerful tool for synthesising large-scale cognitive systems. We have previously presented a compact neural core architecture specifically for FPGA implementation of large NEF networks (Wang et al., 2014a). In this paper, we present an application that uses this neural core to build pattern recognition systems. The outline for this paper is as follows: Section 2.1 introduces the basic concepts of the NEF; the algorithm and theory is presented in Section 2.2; the hardware implementation is presented in Section 2.3; the performance for different design choices will be thoroughly compared in Section 3; in section 4 we compare our work with other solutions and discuss future works. Keywords: neural engineering framework; time-multiplexing; pattern recognition; pseudo inverse; MNIST; neuromorphic engineering 2. Materials and methods 1. Introduction 2.1 Background Neural networks have been proved to be powerful tools for real world tasks, such as pattern recognition, classification, regression, and prediction. However, their high computational demands are not ideally suited to modern computer architectures. This constraint has so far often prohibited their use in applications that need real-time control, such as interactive robotic systems. On the other hand, scientists have been developing hardware platforms that are optimised for neural networks over the past two decades (Vogelstein et al., 2007; Boahen, 2006; Pfeil et al., 2013; Wang et al., 2014d). However, these systems are not capable of synthesising large-scale neural networks for these real world tasks from subnetworks and therefore are not very suitable, as pointed out by Tapson et al. (Tapson et al., 2013). In this section, we review the theoretical framework of a Here, we present a generic hardware architecture that uses the Neural Engineering Framework (NEF) (Eliasmith and Anderson, 2003) to implement large-scale neural networks on FPGAs, which are capable of processing up to Figure 1 | A typical NEF network. The stimulus X(t) is encoded into a large number of nonlinear hidden layer neurons N using randomly initialised connection weights. The output of the system, Y(t), is the linear sum of the weighted spike trains from the hidden neurons. 1 trained using the training dataset only and is subsequently validated using the test dataset. The proposed digit recognition system is a three-layer feed forward neural network, consisting of 784 input layer neurons (pixels), 8192 (8k) hidden layer neurons and ten output layer neurons. The input layer neurons are connected to the hidden layer neurons using randomly weighted all-toall connections. The hidden layer neurons are also connected to the output-layer neurons using all-to-all connections but with weights calculated using a pseudoinverse operation. In the digit recognition system, a single input digit (28x28=784 pixels) is mapped onto a layer of input neurons, which we refer to as a vector Img with a dimension of 784× 1. The Img matrix is multiplied by a matrix, Random_weights, with a dimension of 8192 × 784. The resultant vector, referred to as Vin with a dimension of 8192×1, is thus given by: Figure 2 | Tuning curves maps input stimuli to spike rates. For clarity, this figure only shows the tuning curve of 16 neurons. Each neuron in the neural layer has a distinct tuning curve. 𝑉𝑉𝑉𝑉𝑉𝑉 = 𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅𝑅_𝑤𝑤𝑤𝑤𝑤𝑤𝑤𝑤ℎ𝑡𝑡𝑡𝑡×𝐼𝐼𝐼𝐼𝐼𝐼 (1) 𝑌𝑌   = 𝑊𝑊×𝐻𝐻 (2) Each value in Vin is the sum of the randomly weighted pixels, and is the stimulus for the corresponding neuron in the hidden layer. Each neuron of the hidden layer responds to its Vin value according to a distinct tuning curve (Figure 2). The output of the hidden layer neurons for each input digit is collected in a matrix referred to as H with a dimension of 8192×1. Finally, the response of the output layer neuron is given by: typical NEF system, which encodes an input stimulus into a spiking rate of neurons of a heterogeneous population and decodes the desired function by linearly combining the responses of these neurons. The topology of the NEF network is illustrated in Figure 1. A NEF network performs three tasks to calculate a desired function f(X): 1. Encoding: An encoder will have a fixed random weight (RW) for each hidden layer neuron, and multiplies the input stimulus by this weight. The firing rate of individual neurons is a nonlinear function of the input stimulus weighted by the random weights. The parameters of the neurons are also randomised, so that each neuron in the hidden layer exhibits a distinct tuning curve. An example of such tuning curves is shown in Figure 2. where, W is the decoding weight (a matrix with a dimension of 10×8192, ten columns for ten digits: 0-9) and Y (a Boolean matrix with a dimension of 10×1) represents the corresponding value of the input digit. For example, if the input digit represents 2, then, during training, Y[2] will be set to 1 and the other values in Y will be set to 0. Since this is a linear system, the weights can be found by calculating W = H+Y, where H+ is the pseudo-inverse of H. 2. Decoding: The activity, H, of the hidden neurons (i.e. the spike rate of each neuron) can be measured over the desired range of input values X. The output of each neuron will be multiplied by their decoding weights such that WH = f(X) = Y. Since this is a linear system, these weights can be found by calculating W = YH+, where H+ is the MoorePenrose pseudo-inverse (Penrose and Todd, 1955) of H. The above description is for one single digit. For training purposes, we used 60000 sample digits and hence the dimensions of Img, Vin, H and Y will change to 784×60,000, 8192×60,000, 8192×60,000 and 10×60,000, respectively. When we use the digits from the test dataset with 10,000 digits, the dimensions of Img, Vin, H and Y will change to 784×10,000, 8192×10,000, 8192×10,000 and 10×10,000, respectively. In the testing phase, the predicted output Y will be the product of W*H and will be compared with the expected output to obtain the error rate (the number of unrecognised digits among 10000 test digits). We will address the details of testing in Section 3. 3. Averaging: The output of the system, Y(t), is the linear sum of the weighted spike trains from the neurons. 2.2 Algorithm and Theory 2.2.1 Methodology Recognition or classification of handwritten digits is a standard machine learning problem, and in the form of the MNIST database (Lecun et al., 1998) it has become a benchmark problem. Hence, as a proof of concept, we have used the proposed design framework to implement a digit recognition system (Figure 3). Importantly, the same system could be used for other pattern recognition applications. In the MNIST database, the digits are represented as 28 × 28 = 784 pixels, and the training and testing dataset contain 60,000 and 10,000 digits, respectively. The system is 2.2.2 Modelling Our aim is to develop a fast hardware pattern recognition system running in real time, rather than aiming for the lowest test error. Thus, we have adopted a hardwaredriven method to implement our system, which will achieve the best trade-off between performance and hardware resources. This method will first consider the hardware 2 Figure 3 | System Topology. The inputs are the pixels; they are connected to a higher-dimensional hidden layer with 8k neurons, using randomly weighted connections. The output layer consists of linear neurons and the output layer weights are solved analytically using the pseudoinverse operation. constraints, and then all the building blocks will be optimised. conversion will reduce the hardware cost significantly with a negligible performance loss, and will be presented in detail in Section 2.3.2. We will compare the performance differences in section 3.1. This conversion is carried out by comparing the grey scale value with 0 - if it is larger than 0, that pixel will be set 1; else it will be set to 0. For FPGA implementations, there will be a significant difference in the hardware cost between fixed-point and floating-point implementations, as the latter requires many more digital signal processors (DSPs). More importantly, the floating-point number is represented by 64-bits, which would lead to a huge data storage requirement, which would be a bottleneck for the system. Thus, we have implemented our system using fixed-point numbers. To guarantee that the pixels of each digit from the input layer will be nonlinearly projected to the high dimensional hidden layer, for each neuron in the hidden layer, the encoder will first generate a uniformly distributed random weight for each pixel of one input digit and then sum these weighted pixels up for generating the stimulus. For verification of our hardware system, the random weights used in the software and in the hardware models should be the same and produce identical results. In a software model, random weights are generated using special routines, which is difficult to implement on hardware. Before implementing the design in hardware, we have modelled our system in Python, which is a popular software programming language, using the fixed-point representation. This will ensure that the software and the hardware results are the same, and avoid any performance drop or malfunctioning of the system in hardware due to conversion from floating to fixed point numbers. The models presented in the remaining part of this section were all software models unless otherwise specified. One option is to use a look up table (LUT) in the FPGA to store the random weights generated by the software model. The major drawback of this solution is that it requires a significant amount of memory, which scales linearly with number of input neurons and hidden layer neurons. For FPGA implementations, the most efficient way to generate random numbers is to use linear feedback shift registers (LFSRs), as we have previously used to implement a randomly weighed all-to-all connectivity in a spiking neural network (Wang et al., 2014c). Based on that work, we have developed an encoder, which uses LFSRs to perform the nonlinear projection. We have implemented the 2.2.3 Input layer The input layer will read digits from the MNIST database and map them into the input layer pixels (one by one). This task consists of not only converting the dimension from 28×28 to 784×1 but also converting the grey scale value (an 8-bit number that ranges from 0 to 255) of the pixels to a binary value. The latter is a major difference between our system and existing algorithms (Tapson and van Schaik, 2013) (Lecun et al., 1998). This 3 ELSE: T = Stim + 4×N_index F_rate = max(2 × N_index × T / N_A , 0) END Here F_rate represents the firing rate of the neuron as a result of the input stimulus, N_index represents the index of the neuron in the neural core, and T is calculated as shown for the different neurons. N_A represents the size of the hidden layer, Max_Stim represents the maximum value of the stimulus and Stim represents the current value of the input stimulus using an integer in the range of [0, Max_Stim) to code for an input range of [-1, 1). Figure 4 shows the tuning curves of a set of N_A = 64 of the proposed fixed-point neurons, using Max_Stim = 255. The transfer function is thus a nonlinear function of the stimulus since the value of F_rate cannot go negative. Our system requires the stimulus to be nonlinearly encoded into the firing rate of the neuron and it is hardware intensive to use digital circuits to implement conventional nonlinear functions such as tanh. Instead, this piecewise linear function can be easily implemented using a single 9-bit fixed-point multiplier. We will present its implementation in detail in section 2.3.3. Figure 4 | The tuning curves of the proposed fixed-point non-spiking neuron. This figure shows the tuning curve of 64 neurons. same LFSR encoder in software to ensure that the random weights are identical in both implementations. We have highly optimised the encoder for hardware implementation, and details of this will be presented in Section 2.3. 2.2.4 Rate neuron The NEF intrinsically uses spike rates to calculate the weights, and low-pass filters to sum the weighted output spikes to implement the desired function. In contrast, we have implemented our neurons as non-spiking neurons that compute their firing rate directly. If these neurons were to be implemented as leaky-integrate-and-fire neurons on FPGA, as we have done previously (Wang et al., 2014c), their average firing rates would have to be measured for each value of the input stimulus to compute the decoding weights. This method is quite inefficient and inflexible, as we would have to repeat the measurements each time the parameters of the neurons change. Another drawback is that spiking neurons running in real time would not be able to accurately communicate their firing rate in a short time period, e.g., 1ms. This would significantly limit their usage in real time applications. Using non-spiking neurons, their actual firing rate can be communicated immediately after presenting the stimulus to the neurons. This feature is quite important for applications that need real-time control, such as interactive robotic systems. 2.2.5 Hidden layer We refer to the set of 64 neurons as a neural core, which will be used as the standard building block for our digit recognition system. Multiple neural cores can easily be combined to build real-time large-scale neural networks using our design framework. Furthermore, the development cycle of large-scale neural networks will be significantly shortened as there is no requirement for measurement of the firing rate anymore, since each neural core has the same set of known tuning curves. The hidden layer was implemented with 128 identical neural cores, for a total of 8192 (8k) neurons and 8192×(784+10) ≈ 6.5M synaptic connections. This hidden layer size has achieved the best trade-off between performance and memory usage and we will compare the performance differences in Section 3.2. Given an input image, the encoder will generate, via the random weight projection, a different Vin for each neuron in each core, even if each core contains identical neurons. In other words, even though neuron[0] in neural core[0] and neuron[0] in neural core[1] have the same tuning curve as a function of Vin, the are highly likely to get different Vin so that their firing rates will be different too. In a system with non-spiking neurons, the system will not compute correctly if these neurons cannot reproduce the same firing rate as the one used to calculate the decoding weights. In other words, the computed firing rate must be repeatable for a given input value. Based on these requirements, we proposed to compute the firing rate of each neuron using its index in the array together with the stimulus value to produce a ‘broken-stick’ nonlinearity using the following algorithm: 2.2.6 Regression The decoding weights are obtained by calculating W = H+Y, where H+ is the pseudoinverse of H. However, the pseudo-inverse of the matrix H of size 60000 × 8192 requires a huge amount of memory and computational time. We have previously developed an online pseudoinverse update method (OPIUM) (Tapson and van Schaik, 2013), which is an incremental method to compute the pseudoinverse solution to the regression FOR N_index in (0, N_A-1): IF N_index < N_A/2: T = Max_Stim - (Stim + 4×N_index) 4 problem, which requires significantly less memory. Hence, we use this method here to compute the decoding weights. We chose to use a 6-bit resolution for the decoding weights, to obtain the best trade-off between performance and memory usage. We will address this in details in section 3.1. The pseudoinverse method only gives the best solution with the lowest square root error for any given H matrix, i.e., any given set of random weights; it does not necessarily achieve the lowest test error for the MNIST data set. So we adopted a regression method to find the best seed, which will be used by the encoder to generate random weights, and will in turn change the H matrix. In this way, we can obtain the lowest possible test error in our system. Figure 5 shows the flow of this regression method. It uses a simplified version of OPIUM, called OPIUM lite (Tapson and van Schaik, 2013), which is a fast online method for calculating an approximation to the pseudoinverse. It is significantly quicker than the full-scale OPIUM, but will find output weights resulting in a slightly worse test error. OPIUM lite is used with different random seeds, i.e., for different random weight vectors, until a seed is found with a target error below a desired threshold. After that, the full scale OPIUM is used to compute the decoding weights with that seed. As there is no guarantee that OPIUM lite will be able to achieve a target error below the desired threshold, a time-out mechanism is introduced. In our system, this timeout will be activated when the regression has run for 1000 seeds. If a time-out happens we simply use the seed that has so far resulted in the lowest error and then use the full scale OPIUM to compute the decoding weights. 2.3 Hardware implementation 2.3.1 Topology To efficiently implement the system on an FPGA, we use a time-multiplexing approach (Cassidy et al., 2011; Wang et al., 2013, 2014d, 2014c, 2014b, 2015; Thakur et al., 2014), which leverages the high-speed digital circuit. State-of-the-art FPGAs can easily run at a clock speed of 266MHz (clock period 3.75ns). Thus, we can exploit timemultiplexing approach to simulate 218 neurons (256k, powers of two are preferable as they optimise memory use for storage) in ~1 millisecond by only implementing one physical neuron on an FPGA. We refer to these neurons as time-multiplexed (TM) neurons. This means that on every clock cycle, a TM neuron will be processed. Each TM neuron is updated every 256k/266MHz ≈ 943 µs while a sub-millisecond resolution is generally acceptable for neural simulations. The time-multiplexing approach is however constrained by its data storage requirement. The on-chip SRAM is limited in size (usually only tens of MBs). Due to bandwidth constraints it is difficult to use off-chip memory with the time-multiplexing approach, as new values need to be available from memory every clock cycle to provide real-time simulation. Furthermore, the architecture of the system will be more complex when using off-chip memory because it needs a dedicated memory controller. Nevertheless, using off-chip memory promises the ability to implement much larger networks and we will investigate this option for future designs. However, we chose to use onchip memory for the current work to keep the architecture simple. Figure 5 | The flow of the proposed regression method. 5 Figure 6 | FPGA implementation of the proposed system. (a) The system topology;(b) The internal structure of the timemultiplexed system. Figure 6 shows the topology of the FPGA implementation of the system, which consists of an input layer (the encoder), a hidden layer with 128 neural cores and an output layer with 10 neurons. The encoder and the hidden layer are both implemented with the timemultiplexing approach and Figure 6b shows their internal structure. It consists of a physical encoder, a physical neuron, a global counter and a weight buffer. The global counter processes the time-multiplexed (TM) encoders and neurons sequentially. The decoding weights of the physical neuron are stored in the weight buffer. For simplicity, let us assume that each TM encoder and TM neuron are processed in only one clock cycle. This means that in every clock cycle, a TM encoder will generate the stimulus for an input digit, and the corresponding TM neuron will generate a firing rate with that stimulus and then multiply it with the decoding weights (ten numbers for ten digits obtained by using the OPIUM). The input digit will not change and will remain static until all the TM neurons finish their processing. The output of every TM neuron will be ten weighted firing rates, each of which will be accumulated by its corresponding output neuron. Using a pipelined architecture, the result from calculating one time step for a TM encoder and neuron only has to be available just before the turn of that TM encoder and TM neuron comes around again. The above description assumes that it only takes one clock cycle to process one TM encoder and TM neuron, while this timing requirement is quite difficult to meet in a practical design. We will address this issue in detail in next section. binary value. This saves significant hardware resources in the FPGA, since otherwise we would need 784 multipliers to compute the multiplication between all pixels and their corresponding random weights. Each binary pixel is used to control a 2-input multiplexer, one is connected to its corresponding random weight and the other is tied down to zero. If the value of a pixel is high, that corresponding random weight will be accumulated for the generation of stimulus for a hidden layer neuron. The major challenge in implementing the encoder in hardware using the time-multiplexing approach is to meet the timing requirement. We need to sum all the 784 weighted pixels in 3.75 ns, since each TM neuron needs to be processed in one clock cycle. Moreover, this operation will require 784 adders, which will cost a significant amount of hardware resources. The introduction of pipelines will mitigate the critical timing requirement, but will need even more adders. As a compromise we chose to process each TM encoder and TM neuron in a time slot of four clock cycles. So the encoder will perform this sum operation in four cycles, each of which will sum 784/4=196 weighted pixels. This modification not only mitigates the critical timing requirement, but also reduces the number of adders that are needed. The price paid is that the timemultiplexing rate has to be divided by four. Hence, we can only time-multiplex 64k neurons rather than 256k neurons. Figure 7 shows the structure of the physical encoder, which consists of an input buffer, a global counter, 49 random weight (RW) generators (each implemented with an 20-bit LFSR), 196 2-input multiplexers and a sum up module. When an input digit arrives, it is stored in the input buffer. In each time slot, the global counter sends that stored digits to multiplexers for generating the weighted pixels. The lowest 196 bits are sent in the first clock cycle (of that time slot) and then the higher 196 bits in the next clock 2.3.2 Physical encoder The encoder will generate a uniformly distributed random weight for each pixel of the input digit, and then sum these weighted pixels to generate the stimulus for each neuron in the hidden layer. We have pre-processed the input digit by converting grey-scale value of each pixel to a 6 Figure 7. The structure of the physical encoder cycle, one by one, and highest 196 bits in the fourth clock cycle. implemented with a single 9-bit multiplier, which computes the F_rate and multiplies it with one and only one decoding weight. In the digit recognition system implemented here, the neuron needs to multiply F_rate with ten decoding weights (for ten digits: 0-9). A naïve implementation would instantiate ten identical neurons, each with one decoding weight (for each output neuron), and would cost 10 multipliers. The whole operation would require 11 multiplications. Since the time slot consists of four clock cycles, we can distribute these 11 multiplications to these four clock cycles so that only 11/4=3 multipliers will be needed. Based on this strategy, the neuron has been efficiently implemented with three identical 9-bit multipliers as shown in Figure 8. The number of the implementable multipliers is usually one of the bottlenecks Each RW generator generates a 20-bit random number, which is divided into four 5-bit random signed numbers. Hence, 49 RW generators will provide totally 49x4 = 196 5bit random weights, each is sent to its corresponding multiplexer. All these LFSRs will reload their own initial seed (obtained using the pseudoinverse method) on the arrival of an input digit. After that, it keeps generating random numbers until a new input digit arrives. In this way, we can guarantee that the encoder will generate the exact same set of random weights (for each incoming digit) with any given seed. This “on the fly” generation scheme reduces the usage of the memory significantly, as there is no requirement for storing the random weights anymore – only the seeds need to be stored. The accumulator module sums the 784 weighted pixels (in four clock cycles) for generating the stimulus for that TM neuron. A naive implementation would need a 196input 5-bit parallel adder and create a large delay (~20 ns). To mitigate this critical timing requirement, we use a 2stage pipeline, which consists of fourteen 14-input 5-bit parallel adders and one 14-input 9-bit parallel adder. Since it is a pipelined design, the stimulus (for each TM neuron) is still being generated every time slot (with a latency of two clock cycles). 2.3.3 Physical neuron The rate neuron achieves a significant reduction in memory usage, since it computes its firing rate with its index, the input stimulus and fixed parameters, none of which need memory access. Memory access is only needed to read the decoding weights. In our previous work (Wang et al., 2014a), the physical neuron has already been Figure 8. The structure of the physical neuron 7 TABLE I Device utilisation Altera Cyclone 5CGXFC5C6F27C7 Adaptive Logic Modules (ALMs) RAMs DSPs 2162/29080 480k/4.5M   3/450 of large-scale FPGA/ASIC design. The multiplier’s inputs A and B are 9 bits wide and the output result is 18 bits wide. All of the three multipliers will need four clock cycles to process the algorithm. For multiplier [0], the first cycle computes the F_rate, which is represented by a 7-bit number, by multiplying N_index and T; the second cycle latches F_rate at input A of the multiplier; the third and fourth cycle multiplies F_rate with the decoding weight [0] and [1], respectively. For multiplier [1], the first, second, third and fourth cycle multiplies F_rate with the decoding weight [2],[3],[4] and [5] respectively. For multiplier [2], the first, second, third and fourth cycle multiplies F_rate with the decoding weight [6],[7],[8] and [9] respectively. Again, since it is a pipelined design, the output of each TM neuron is updated only once in its time slot (with a latency of four clock cycles). 2.3.4 Output layer The output layer consists of ten neurons (Figure 6) that will linearly sum the results of all the 8k TM neurons. Since it is a time-multiplexed system, this sum is just an accumulation of the outputs of the TM neurons of each time slot and the computational cost can be reduced in magnitudes. Hence, the implementation of each output neuron will only need a register and an adder. When all the 8k neurons have all been processed, the index of the output neuron with the maximum value will be sent out as the result, which indicates the most likely input digit. After that, the values of the ten output neurons are cleared. 2.3.5 Utilisation The system was developed using the standard ASIC design flow, and can thus be easily implemented with stateof-the-art manufacturing technologies, should an integrated circuit implementation be desired. A bottom-up design flow was adopted, in which we designed and verified each module separately. Once the module level verification was complete, all the modules were integrated together for toplevel verification. We have successfully implemented 128 proposed neural cores, yielding 8k neurons, on an Altera Cyclone V FPGA (on a Terasic Cyclone GX starter kit). The design uses less than 6% of the hardware resources (with the exception of the RAMs, Table I). Note that this utilisation table includes the circuits that carry out other tasks such as the JTAG interface. Figure 9. (a) and (b) The histogram of the error rate for configuration 1 and configuration 2; (c) the normalised histogram of the difference between the paired errors (blue) and sample T distributions modelling the data (red); (d) the distribution of the estimated mean of the difference data. system as our goal is to develop a hardware system running in real time, rather than exploiting an algorithm that is as accurate as possible. The performance results were obtained using the full test set of 10,000 handwritten digits after training on the full 60,000 digit training set, unless otherwise specified. The results presented in Section 3.1-3.2 were all obtained using the software (Python) models. The results presented in section 3.3 were obtained from the hardware implementation. 3. Results The results presented here will focus on how different design choices will affect the performance of the proposed 3.1 Comparison across different configurations 8 Compared to our previous work (Tapson and van Schaik, 2013), we have made three major modifications: the greyscale pixel in the input images were replaced by black & white (binary) pixels; tanh neurons in the hidden layer were replaced by rate neurons; and 64-bit floating-point numbers for the decoding weights were replaced by 6-bit fixed-point numbers. We investigated the effects of these modifications using four configurations: configuration 1 was the configuration used in our previous work (Tapson and van Schaik, 2013); configuration 2 used black and white images; configuration 3 used black and white images and rate neurons instead of tanh neurons; and configuration 4 had all three modifications. The hidden layer consisted of 8k neurons in all four configurations. lite to calculate the decoding weights and the test error. This significantly reduces the simulation time needed for these tests while still providing a fair comparison between the four configurations. We first investigated the effect of using the binary values in the input layer. We compared the performance result between the one using the grey-scale values and binary values (see Figure 9). The top two panels show a histogram of the number of errors out of 10,000 test patterns. Given the skewed nature of the two error distributions, rather than simply reporting p-values to indicate the statistical significance of this difference, we have chosen to display the full distribution here. Because the same set 100 random weight vectors was used for each configuration, we can determine a paired difference between the two configurations, shown as a histogram in Figure 9c. We then modelled the distribution of the difference of errors using a non-central T distribution, which is optimal for modelling distributions that are approximately Gaussian but contain outliers. We followed the Bayesian estimation method according to Kruschke (Kruschke, 2012) using Markov Chain Monte Carlo For each configuration, 100 test runs were conducted, each with a different random seed. The same set of 100 seeds was used for all four configurations, so that the encoder will generate the same random weights. Since the goal of this exercise was simply to investigate the impact of the three modifications on performance, rather than to find the best possible performance, we only used the first five steps of the regression method, i.e., we only used OPIUM Figure 11. (a) The histogram of the error rate for configuration 4; (b) the normalised histogram of the difference between the paired errors (blue) and sample T distributions modelling the data (red); (c) the distribution of the estimated mean of the difference data. Figure 10. (a) The histogram of the error rate for configuration 3; (b) the normalised histogram of the difference between the paired errors (blue) and sample T distributions modelling the data (red); (c) the distribution of the estimated mean of the difference data. 9 simulation. We simulated the Markov Chain for 110,000 steps and discarded the first 10,000 steps as a burn in period. Figure 9d shows the distribution of the 100,000 mean values for the T distribution modelling the data, and the red curves in Figure 9c show 50 examples of the T distribution with parameters (mean, standard deviation, and a normality parameter – see (Kruschke, 2012)) taken at random from the Markov Chain. From the distribution of the mean value for the difference data (Figure 9d), we can see that configuration 2 results in 59.5 more errors on average. If we define a difference of 10 or fewer errors as a region of practical equivalence (ROPE), or, in other words, we consider as insignificant a change of 10 or fewer errors out of 10,000 tests, i.e., a change of less than 0.1%, we note that the 95% highest density interval (HDI) of the distribution of the mean of the difference of errors is outside the ROPE, and therefore we conclude that changing the input images from grey scale to binary values results in a small but significant increase in error of around 0.6%. Figure 12. Error rates as a function of the number of neurons in the hidden layer. respectively. It is clear that the error decreases with the number of hidden layer neurons, although with a diminishing return. Since the system used the timemultiplexing approach and rate neurons, the hardware cost of a single TM neuron is almost negligible. The memory required by the decoding weights is linearly proportional to size of the hidden layer and is thus the bottleneck of the system. To achieve a good balance between the desired accuracy and memory, we chose to implement the hidden layer with 8k rather than 16k neurons. Next, we investigated the effect of using the rate neurons in the hidden layer. The distribution of errors for this configuration (configuration 3) is shown in Figure 10a. This should be compared with configuration 2 (Figure 9b) and their paired difference is shown in Figure 10b. Figure 10c shows the distribution of the mean of the difference in errors between configuration 3 and configuration 2. It shows that changing from tanh neurons to rate neurons increases the number of errors by approximately 18.5. However, this difference is not strongly significant, as the 95% HDI is not entirely outside the ROPE, indicating that a difference within the region of practical equivalence is amongst the possible mean values. Finally, we investigated the effect of using limited-resolution decoding weights. Figure 11a shows the distribution of errors for this configuration and the difference between configuration 3 and configuration 4 is close to zero (Figure 11b). In fact the distribution of the mean of the error difference is entirely within the ROPE, indicating that somewhat surprisingly there is no significant loss in performance when using 6-bit fixed-point output weights instead of floating point weights. 3.2 System performance To explore the best performance that the proposed system can achieve, 1000 runs were carried out using the full regression method (Figure 5) with different random seeds. The lowest error achieved with lite and full version of OPIUM is 4.52% and 3.45%, respectively. After that, the decoding weights (obtained with full version of OPIUM) were loaded into the FPGA board for real time digit recognition. The pixels of input digits were converted to binary values in software and a Python-based front-end client software sent the selected test digit to the FPGA via JTAG interface. Since the system runs at 266MHz and the hidden layer contains 8k neurons, each of which has a time slot of four clock cycles, the processing time for one input digit will be 8k×4/266MHz ≈ 120 µs, yielding 1s/120µs ≈ 8k digit recognitions per second. Due to the fact that our system only used 8k out of 64k neurons in one single TM neuron layer, the maximum number of the digit recognitions that can be processed by one TM neuron layer is ~64k per second. The system used less than 6% of the hardware resources (with the exception of the RAMs), multiple TM neuron layers can be instantiated to run in parallel. It is practical to scale this system to process millions of digit recognitions in one second. We will address this in details in section 4.2. The performance drop between configuration 1 and 4 was merely 0.8%. We can therefore conclude that, in this digit recognition system, the modifications that we made achieved significant reductions in terms of hardware cost with a minimal drop in performance. 3.2 Size of the hidden layer In this scenario, we used configuration 4 from the previous section and changed the hidden layer size in the range from 1k to 16k neurons. For each size, ten test runs (each with a different random seed) were conducted. Again, to reduce the testing time, we used OPIUM lite to calculate the decoding weights and then calculate the test error. 4. Discussion 4.1 Comparison with other solutions The work reported here constitutes the basis for building real-time, large-scale, general purpose hardware pattern recognition systems using the NEF, hence we are mainly interested in the trade-off between the scale, the The median error over 10 runs (Figure 12) for the hidden layer with 1k, 2k, 4k, 8k, 12k and 16k neurons was 14.5%, 10.4%, 6.96%, 5.01%, 4.47% and 4.33% 10 performance and the hardware cost. We will concentrate on comparing our work with the solutions that were developed for similar goals, rather than the solutions that are extremely optimised for achieving the lowest error rate of MNIST although they cannot be efficiently implemented on hardware. TABLE II Comparison with other solutions The IBM TrueNorth system is a general-purpose system for building large-scale neural networks running in real time (Merolla et al., 2014). When it was programmed for digit recognition, it achieved a result of 8.06% error rate in the 10000 test set of the MNIST with 13 cores, each of which consisted of TM 256 spiking neurons and needs ~96k bits memories (Esser et al., 2013). Hence, our system achieved a much lower error rate while with significantly fewer hardware resources, especially the memories (Table II). Regarding the processing speed, their system needs 20 time steps (each one is 1 ms) to process one digit, whereas our system needs only 120 µs (approximately 167 times speedup). Moreover, while their system consists of a feature extractor that clusters and extracts features from data, our system is feature-less, hence can be easily configured for different input data without feature extractions. The TrueNorth system however has much more applications besides pattern recognition task, as compared to our system. Error Computation time Resources Minitaur 8% 0.152 s 155k bits TrueNorth 8.06% 20 ms 1.248M bits This work 3.45% 120 µs   480k bits is mainly used by the encoders. Hence, the maximum number of the physical hidden neurons that can be implemented is 230k/1600 ≈ 143. The memory requirement of one single TM hidden neuron layer is 64k×60bits = 3840k bits. The on-chip SRAM, which is 52M bits, can be used to implement up to 13 TM hidden neuron layers. To further scale up the system, we need to use external memories. The bandwidth requirement is indeed a bottleneck for the time-multiplexing approach, as new values need to be available from memory every four clock cycles. The maximum theoretical bandwidth of one DDR3 SDRAM memory and one QDRII+ SRAM memory on the DE5 board is 512 bits and 72 bits @266MHz, respectively. The DDR3 memory, in general, can only achieve an efficiency of 70% (of the theoretical bandwidth) as it will need flow control, which takes into consideration the bus turn around time, refresh cycles, and so on. The maximum number of neuron arrays is ((512bits × 2 × 70% + 72bits×4)×4)/60bits ≈ 67. Adding the ones using the onchip SRAM, the theoretical maximum number of neuron layers is 80, yielding 64k×80 = 5.12M neurons. As the maximum number of the digit recognitions that can be processed by one TM neuron layer is ~64k per second, the maximum number of the digit recognitions that can be processed by the system with 80 parallel layers is therefore 5.12M per second. The Minitaur, which is an event–based neural network accelerator, achieved an error rate of 8% on a deep spiking network with 1785 neurons (Neil and Liu, 2014). Since the scheme it used is a variant of the time-multiplexing approach, which only needs very few neurons to be physically implemented, the cost of one single neuron is also negligible and the bottleneck again is the memory. Each of the neuron used by the Minitaur needs 73 bits memories and the connection weight needs 16 bit memories. Our neuron needs 60 bit memories for the decoding weights. The processing time of the Minitaur for one digit is 0.152s (table II), which is approximately 1300 times slower than our system. 4.2 Future work Since the larger the scale is, the more pattern recognitions can be carried out, our future work will focus on scaling up the network that we have presented here. It is a scalable design as it is a fully digital implementation. The number of TM hidden neurons implemented by a single physical neuron will increase linearly with the amount of available memory, as long as the multiplexing scale keeps the time resolution within the biological time scale. The number of physical neurons will increase linearly with the number of available ALMs. The programmability of the FPGA, especially the decoding weights, makes the integration of the system with the desired pattern recognition applications seamless. However, the advantages of running large-scale networks in real-time are strongly reduced if such neural networks take a long time to compute the decoding weights. Hence, another major improvement is to speed up this computationally extensive task. One promising solution is to implement the OPIUM on FPGA, since this algorithm is an adaption procedure without the requirement of hundreds of Gigabyte RAMs and is quite friendly for hardware implementation. Running OPIUM in real time makes it possible to upgrade the system to be a true turnkey solution for pattern recognition in real world. In addition, since the proposed system does not need feature extraction, it could be used for any other pattern recognition tasks such as speaker recognition, natural language processing and so on. In the following calculation, we will use the digits recognition system as a metric and different applications will require different amounts of hardware resources while still using the same topology. We can calculate the theoretical maximum network size on a state-of-the-art FPGA board, such as the Terasic DE5 board containing an Altera Stratix V (5SGXEA7N2F45C2) FPGA with ~230k ALMs, two DDR3 SDRAMs and four QDRII+ SRAMs. One single TM hidden layer requires ~1600 ALMs, which 11 5. Acknowledgment Tapson, J., and van Schaik, A. (2013). Learning the pseudoinverse solution to network weights. Neural Netw. 45, 94–100. doi:10.1016/j.neunet.2013.02.008. This work has been supported by the Australian Research Council Grant DP140103001. The support by the Altera university program is gratefully acknowledged. This work was inspired by the Capo Caccia Cognitive Neuromorphic Engineering Workshop 2013, 2014 and Telluride Neuromorphic workshop 2013. Thakur, C. S., Hamilton, T. J., Tapson, J., van Schaik, A., and Lyon, R. F. (2014). FPGA Implementation of the CAR Model of the Cochlea. in IEEE International Symposium on Circuits and Systems, 1853– 1856. doi:10.1109/ISCAS.2014.6865170. Vogelstein, R. J., Mallik, U., Vogelstein, J. T., and Cauwenberghs, G. (2007). Dynamically reconfigurable silicon array of spiking neurons with conductance-based synapses. IEEE Trans. Neural Netw. 18, 253–65. doi:10.1109/TNN.2006.883007. 6. References Boahen, K. (2006). Neurogrid: emulating a million neurons in the cortex. Conf. Proc. IEEE Eng. Med. Biol. Soc. Suppl, 6702. doi:10.1109/IEMBS.2006.260925. Wang, R., Cohen, G., Stiefel, K. M., Hamilton, T. J., Tapson, J., and van Schaik, A. (2013). An FPGA Implementation of a Polychronous Spiking Neural Network with Delay Adaptation. Front. Neurosci. 7, 14. doi:10.3389/fnins.2013.00014. Cassidy, A., Andreou, A. G., and Georgiou, J. (2011). Design of a one million neuron single FPGA neuromorphic system for real-time multimodal scene analysis. 2011 45th Annu. Conf. Inf. Sci. Syst., 1–6. doi:10.1109/CISS.2011.5766099. Wang, R., Hamilton, T. J., Tapson, J., and van Schaik, A. (2014a). A compact neural core for digital implementation of the Neural Engineering Framework. in BIOCAS2014 doi:10.1109/BioCAS.2014.6981784. Eliasmith, C., and Anderson, C. (2003). Neural Engineering: Computation, Representation, and Dynamics in Neurobiological Systems. Boston: MA: MIT Press. Wang, R., Hamilton, T. J., Tapson, J., and van Schaik, A. (2014b). A compact reconfigurable mixed-signal implementation of synaptic plasticity in spiking neurons. in 2014 IEEE International Symposium on Circuits and Systems (ISCAS) (IEEE), 862–865. doi:10.1109/ISCAS.2014.6865272. Eliasmith, C., Stewart, T. C., Choo, X., Bekolay, T., DeWolf, T., Tang, Y., Tang, C., and Rasmussen, D. (2012). A large-scale model of the functioning brain. Science 338, 1202–5. doi:10.1126/science.1225266. Wang, R., Hamilton, T. J., Tapson, J., and van Schaik, A. (2014c). An FPGA design framework for large-scale spiking neural networks. in 2014 IEEE International Symposium on Circuits and Systems (ISCAS) (Melboune: IEEE), 457–460. doi:10.1109/ISCAS.2014.6865169. Esser, S. K., Andreopoulos, A., Appuswamy, R., Datta, P., Barch, D., Amir, A., Arthur, J., Cassidy, A., Flickner, M., Merolla, P., et al. (2013). Cognitive computing systems: Algorithms and applications for networks of neurosynaptic cores. in The 2013 International Joint Conference on Neural Networks (IJCNN) (IEEE), 1–10. doi:10.1109/IJCNN.2013.6706746. Wang, R. M., Hamilton, T. J., Tapson, J. C., and van Schaik, A. (2014d). A mixed-signal implementation of a polychronous spiking neural network with delay adaptation. Front. Neurosci. 8, 51. doi:10.3389/fnins.2014.00051. Kruschke, J. K. (2012). Bayesian Estimation Supersedes the t Test. J. Exp. Psychol. Gen. 142, 573–603. doi:10.1037/a0029146. Lecun, Y., Bottou, L., Bengio, Y., and Haffner, P. (1998). Gradient-based learning applied to document recognition. Proc. IEEE 86, 2278– 2324. doi:10.1109/5.726791. Wang, R. M., Hamilton, T. J., Tapson, J. C., and van Schaik, A. (2015). A neuromorphic implementation of multiple spike-timing synaptic plasticity rules for large-scale neural networks. Front. Neurosci. 9, 1–17. doi:10.3389/fnins.2015.00180. Merolla, P. A., Arthur, J. V., Alvarez-Icaza, R., Cassidy, A. S., Sawada, J., Akopyan, F., Jackson, B. L., Imam, N., Guo, C., Nakamura, Y., et al. (2014). A million spiking-neuron integrated circuit with a scalable communication network and interface. Science (80-. ). 345, 668–673. doi:10.1126/science.1254642. Neil, D., and Liu, S. (2014). Minitaur, an Event-Driven FPGA-Based Spiking Network Accelerator. IEEE Trans. Very Large Scale Integr. Syst., 1–1. doi:10.1109/TVLSI.2013.2294916. Penrose, R., and Todd, J. A. (1955). A generalized inverse for matrices. Math. Proc. Cambridge Philos. Soc. 51, 406–413. doi:10.1017/S0305004100030401. Pfeil, T., Grübl, A., Jeltsch, S., Müller, E., Müller, P., Petrovici, M. A, Schmuker, M., Brüderle, D., Schemmel, J., and Meier, K. (2013). Six networks on a universal neuromorphic computing substrate. Front. Neurosci. 7, 11. doi:10.3389/fnins.2013.00011. Tapson, J. C., Cohen, G. K., Afshar, S., Stiefel, K. M., Buskila, Y., Wang, R. M., Hamilton, T. J., and van Schaik, A. (2013). Synthesis of neural networks for spatio-temporal spike pattern recognition and processing. Front. Neurosci. 7, 153. doi:10.3389/fnins.2013.00153. 12
9cs.NE
ON THE BINOMIAL EDGE IDEALS OF BLOCK GRAPHS arXiv:1402.2041v1 [math.AC] 10 Feb 2014 FARYAL CHAUDHRY, AHMET DOKUYUCU, RIDA IRFAN A BSTRACT. We find a class of block graphs whose binomial edge ideals have minimal regularity. As a consequence, we characterize the trees whose binomial edge ideals have minimal regularity. Also, we show that the binomial edge ideal of a block graph has the same depth as its initial ideal. 1. I NTRODUCTION In this paper we study homological properties of some classes of binomial edge ideals. Let G be a simple graph on the vertex set [n] and let S = K[x1 , . . ., xn , y1 , . . . , yn ] be the polynomial ring in 2n variables over a field K. For 1 ≤ i < j ≤ n, we set fi j = xi y j − x j yi . The binomial edge ideal of G is defined as JG = ( fi j : {i, j} ∈ E(G)). Binomial edge ideals were introduced in [8] and [12]. Algebraic and homological properties of binomial edge ideals have been studied in several papers. In [5], it was conjectured that JG and in< (JG ) have the same extremal Betti numbers. Here < denotes the lexicographic order in S induced by x1 > x2 > · · · > xn > y1 > y2 > · · · > yn . This conjecture was proved in [3] for cycles and complete bipartite graphs. In [6], it was shown that, for a closed graph G, JG and in< (JG ) have the same regularity which can be expressed in the combinatorial data of the graph. We recall that a graph G is closed if and only if it has a quadratic Gröbner basis with respect to the lexicographic order. In support of the conjecture given in [5], we show, in Section 3, that if G is a block graph, then depth(S/JG ) = depth(S/ in< (JG )); see Theorem 3.2. By a block graph we mean a chordal graph G with the property that any two maximal cliques of G intersect in at most one vertex. Also, in the same section, we show a similar equality for regularity. More precisely, in Theorem 3.3 we show that reg(S/JG ) = reg(S/ in< (JG )) = ℓ if G a Cℓ -graph. Cℓ -graphs constitute a subclass of the block graphs; see Section 3 for definition and Figure 1 for an example. In [11] it was shown that, for any connected graph G on the vertex set [n], we have ℓ ≤ reg(S/JG ) ≤ n − 1, where ℓ is the length of the longest induced path of G. 2010 Mathematics Subject Classification. 13D02, 05E40. Key words and phrases. Binomial edge ideals, regularity, depth. The first and the third author were supported by the Higher Education Commission of Pakistan and the Abdus Salam School of Mathematical Sciences, Lahore, Pakistan. 1 The main motivation of our work was to answer the following question. May we characterize the connected graphs G whose longest induced path has length ℓ and reg(S/JG ) = ℓ? We succeeded to answer this question for trees. In Theorem 4.1, we show that if T is a tree whose longest induced path has length ℓ, then reg(S/JT ) = ℓ if and only if T is caterpillar. A caterpillar tree is a tree T with the property that it contains a path P such that any vertex of T is either a vertex of P or it is adjacent to a vertex of P. In [12], the so-called weakly closed graphs were introduced. This is a class of graphs which includes closed graphs. In the same paper, it was shown that a tree is caterpillar if and only if it is a weakly closed graph. Having in mind our Theorem 4.1 and Theorem 3.2 in [6] which states that reg(S/JG) = ℓ if G is a connected closed graph whose longest induced path has length ℓ, and by some computer experiments, we are tempted to formulate the following. Conjecture 1.1. If G is a connected weakly closed graph whose longest induced path has length ℓ, then reg(S/JG) = ℓ. 2. P RELIMINARIES In this section we introduce the notation used in this paper and summarize a few results on binomial edge ideals. Let G be a simple graph on the vertex set [n] = {1, . . ., n}, that is, G has no loops and no multiple edges. Furthermore, let K be a field and S = K[x1 , . . . , xn , y1 , . . ., yn ] be the polynomial ring in 2n variables. For 1 ≤ i < j ≤ n, we set fi j = xi y j − x j yi . The binomial edge ideal JG ⊂ S associated with G is generated by all the quadratic binomials fi j = xi y j − x j yi such that {i, j} ∈ E(G). Binomial edge ideals were introduced in the papers [8] and [12]. We first recall some basic definitions from graph theory. A vertex i of G whose deletion from the graph gives a graph with more connected components than G is called a cut point of G. A chordal graph is a graph without cycles of length greater than or equal to 4. A clique of a graph G is a complete subgraph of G. The cliques of a graph G form a simplicial complex, ∆(G), which is called the clique complex of G. Its facets are the maximal cliques of G. A graph G is a block graph if and only if it is chordal and every two maximal cliques have at most one vertex in common. This class was considered in [5, Theorem 1.1]. The clique complex ∆(G) of a chordal graph G has the property that there exists a leaf order on its facets. This means that the facets of ∆(G) may be ordered as F1 , . . ., Fr such that, for every i > 1, Fi is a leaf of the simplicial complex generated by F1 , . . . , Fi . A leaf F of a simplicial complex ∆ is a facet of ∆ with the property that there exists another facet of ∆, say G, such that, for every facet H 6= F of ∆, H ∩ F ⊆ G ∩ F. 2.1. Gröbner bases of binomial edge ideals. Let < be the lexicographic order on S induced by the natural order of the variables. As it was shown in [8], the Gröbner basis of JG with respect to this order may be given in terms of the admissible paths of G. 2 Definition 2.1. [8] Let i < j be two vertices of G. A path i = i0 , i1 , . . . , ir−1, ir = j from i to j is called admissible if the following conditions are fulfilled: (1) ik 6= il for k 6= l; (2) for each k = 1, . . . , r − 1 on has either ik < i or ik > j; (3) for any proper subset { j1 , . . . , js} of {i1 , . . . , ir−1}, the sequence i, j1, . . . , js, j is not a path in G. Given an admissible path π in G from i to j, we set uπ = (∏ik > j xik )(∏il <i yil ). Theorem 2.2. [8] The set of binomials Γ= [ {uπ fi j : π is an admissible path f rom i to j} i< j is the reduced Gröbner basis of JG with respect to the lexicographic order on S induced by x1 > · · · > xn > y1 > · · · > yn . 2.2. Primary decomposition of binomial edge ideals. Theorem 2.2 shows, in particular, that in< (JG ) is a radical monomial ideal which implies that the binomial edge ideal JG is radical as well. Hence JG is equal to the intersection of all its minimal primes. These minimal prime ideals were determined in [8]. Let S ⊂ [n] be a (possible empty) subset of [n] and let G1 , . . . , Gc(S ) be the connected components of G[n]\S , where G[n]\S denotes the restriction of G to the vertex set [n] \ S . ei be the complete graph on the vertex set of Gi . Let For 1 ≤ i ≤ c(S ), let G PS (G) = ( [ {xi , yi }, JG̃1 , . . . , JG̃c(S ) ). i∈S Theorem 2.3. [8] JG = \ PS (G) S ⊂[n] In particular, the minimal primes of JG are among PS (G), where S ⊂ [n]. Theorem 2.4. [8] Let G be a connected graph on the vertex set [n], and S ⊂ [n]. Then PS (G) is a minimal prime ideal of JG if and only if S = 0/ or S 6= 0/ and for each i ∈ S one has c(S \ {i}) < c(S ). A set S which satisfies the condition in the above theorem is called a cut-point set of G. 3. I NITIAL IDEALS OF BINOMIAL EDGE IDEALS OF BLOCK GRAPHS In this section, we first show that, for a block graph G on [n] with c connected components, we have depth(S/JG ) = depth(S/ in< (JG )) = n + c, where < denotes the lexicographic order induced by x1 > · · · > xn > y1 > · · · > yn in the ring S = K[x1 , . . ., xn , y1 , . . . , yn ]. We begin with the following lemma. 3 Lemma 3.1. Let G be a graph on the vertex set [n] and let i ∈ [n]. Then in< (JG , xi , yi ) = (in< (JG ), xi , yi ). Proof. We have in< (JG , xi , yi ) = in< (JG\{i} , xi , yi ) = (in< (JG\{i} ), xi , yi ). Therefore, we have to show that (in< (JG ), xi , yi ) = (in< (JG\{i} ), xi , yi ). The inclusion ⊇ is obvious since JG\{i} ⊂ JG . For the other inclusion, let us take u to be a minimal generator of in< (JG ). If xi | u or yi | u, obviously u ∈ (in(JG\{i} ), xi , yi ). Let now xi ∤ u and yi ∤ u. This means that u = uπ xk yl for some admissible path π from k to l which does not contain the vertex i. Then it follows that π is a path from k to l in G \ {i}, hence u ∈ in< (JG\{i} ).  Theorem 3.2. Let G be a block graph. Then depth(S/JG ) = depth(S/ in< (JG )) = n + c, where c is the number of connected component of G. Proof. Let G1 , . . . , Gc be the connected components of G and Si = K[{x j , y j } j∈Gi ]. Then S/JG ∼ = S1 /JG1 ⊗ · · · ⊗ Sc /JGc , so that depth S/JG = depth S1 /JG1 + · · · + depth Sc /JGc . Moreover, we have S/ in< (JG ) ∼ = S/ in< (JG1 ) ⊗ · · · ⊗ S/ in< (JGc ), thus depth S/ in< (JG ) ∼ = depth S1 / in< (JG1 ) + · · · + depth Sc / in< (JGc ). Therefore, without loss of generality, we may assume that G is connected. By [5, Theorem 1.1] we know that depth(S/JG ) = n + 1. In order to show that depth(S/ in< (JG )) = n + 1, we proceed by induction on the number of maximal cliques of G. Let ∆(G) be the clique complex of G and let F1 , . . . , Fr be a leaf order on the facets of ∆(G). If r = 1, then G is a simplex and the statement is well known. Let r > 1; since Fr is a leaf, there exists a unique vertex, say i ∈ Fr , such that Fr ∩ Fj = {i} where Fj is a branch of Fr . Let Ft1 , . . ., Ftq be the facets of ∆(G) which intersect the leaf Fr in the vertex {i}. Following the proof of [5, Theorem 1.1] we may T T write JG = J1 ∩ J2 where J1 = i∈S / PS (G) and J2 = i∈S PS (G). Then, as it was shown in the proof of [5, Theorem 1.1], it follows that J1 = JG′ where G′ is obtained from G Sq by replacing the cliques Ft1 , . . ., Ftq and Fr by the clique on the vertex set Fr ∪ ( j=1 Ft j ). Also, J2 = (xi , yi ) + JG′′ where G′′ is the restriction of G to the vertex set [n] \ {i}. We have in< (JG ) = in< (J1 ∩ J2 ). By [1, Lemma 1.3], we have in< (J1 ∩ J2 ) = in< (J1 ) ∩ in< (J2 ) if and only if in< (J1 + J2 ) = in< (J1 ) + in< (J2 ). But in< (J1 + J2 ) =in< (JG′ + (xi , yi )+JG′′ ) =in< (JG′ +(xi , yi )). Hence, by Lemma 3.1, we get in< (J1 +J2 ) =in< (JG′ )+ (xi , yi ) = in< (J1 ) + in< (J2 ). Therefore, we get in< (JG ) = in< (J1 ) ∩ in< (J2 ) and, consequently, we have the following exact sequence of S-modules S S S S −→ ⊕ −→ −→ 0. 0 −→ in< (JG ) in< (J1 ) in< (J2 ) in< (J1 + J2 ) By using again Lemma 3.1, we have in< (J2 ) = in< ((xi , yi ), JG′′ ) = (xi , yi ) + in< (JG′′ ). Thus, we have actually the following exact sequence S S S S −→ ⊕ −→ −→ 0. (1) 0 −→ in< (JG ) in< (JG′ ) (xi , yi ) + in< (JG′′ ) (xi , yi ) + in< (JG′ ) Since G′ inherits the properties of G and has a smaller number of maximal cliques than G, it follows, by the inductive hypothesis, that depth(S/JG′ ) = depth(S/ in< (JG′ )) = 4 n+1. Let Si be the polynomial ring S/(xi , yi ). Then S/((xi , yi )+in< (JG′′ )) ∼ = Si / in< (JG′′ ). ′′ Since G is a graph on n − 1 vertices with q + 1 connected components and satisfies our conditions, the inductive hypothesis implies that depth S/((xi , yi ) + in< (JG′′ )) = n + q ≥ n + 1. Hence, depth(S/ in< (JG′ ) ⊕ S/((xi , yi ) + in< (JG′′ ))) = n + 1. Next, we observe that S/((xi , yi ) + in< (JG′ )) ∼ = Si / in< (JH ), where H is obtained from G′ Sq by replacing the clique on the vertex set Fr ∪ ( j=1 Ft j ) by the clique on the vertex set Sq Fr ∪ ( j=1 Ft j ) \ {i}. Hence, by the inductive hypothesis, depth(S/((xi, yi ) + in< (JG′ ))) = n since H is connected and its vertex set has cardinality n − 1. Hence, by applying the Depth lemma to our exact sequence (1), we get depth S/JG = depth S/ in< (JG ) = n + 1.  Let G be a connected graph on the vertex set [n] which consists of (i) a sequence of maximal cliques F1 , . . ., Fℓ with dim Fi ≥ 1 for all i such that |Fi ∩ Fi+1 | = 1 for 1 ≤ i ≤ ℓ −1 and Fi ∩Fj = 0/ for any i < j such that j 6= i +1, together with (ii) some additional edges of the form F = { j, k} where j is an intersection point of two consecutive cliques Fi , Fi+1 for some 1 ≤ i ≤ ℓ − 1, and k is a vertex of degree 1. In other words, G is obtained from a graph H with ∆(H) = hF1 , . . . , Fl i whose binomial edge ideal is Cohen-Macaulay (see [5, Theorem 3.1]) by attaching edges in the intersection points of the facets of ∆(H). Therefore, G looks like the graph displayed in Figure 1. • • • • • • • • • • • • • • • • • • • F IGURE 1. Cℓ -graph Such a graph has, obviously, the property that its longest induced path has length equal to ℓ. If a connected graph G satisfies the above conditions (i) and (ii), we say that G is a Cℓ -graph. In the case that dim Fi = 1 for 1 ≤ i ≤ ℓ, then G is called a caterpillar graph. 5 We should also note that any Cℓ –graph is chordal and has the property that any two distinct maximal cliques intersect in at most one vertex. So that any Cℓ -graph is a connected block graph. Theorem 3.3. Let G be a Cℓ -graph on the vertex set [n]. Then reg(S/JG ) = reg(S/ in< (JG )) = ℓ. Proof. Let G consists of the sequence of maximal cliques F1 , . . ., Fℓ as in condition (i) to which we add some edges as in condition (ii). So the maximal cliques of G are F1 , . . . , Fℓ and all the additional whiskers. We proceed by induction on the number r of maximal cliques of G. If r = ℓ, then G is a closed graph whose binomial edge ideal is CohenMacaulay, hence the statement holds by [6, Theorem 3.2]. Let r > ℓ and let F1′ , . . . , Fr′ be a leaf order on the facets of ∆(G). Obviously, we may choose a leaf order on ∆(G) such that Fr′ = Fℓ . With the same arguments and notation as in the proof of Theorem 3.2, we get the sequence (1). We now observe that G′ is a Cℓ−1 -graph, hence, by the inductive hypothesis, (2) reg S S = ℓ − 1. = reg JG′ in< (JG′ ) The graph G′′ has at most two non-trivial connected components. One of them, say H1 , is a Cℓ′ -graph with ℓ′ ∈ {ℓ − 2, ℓ − 1}. The other possible non-trivial component, say H2 , occurs if |Fℓ | ≥ 3 and, in this case, H2 is a clique of dimension |Fℓ | − 2 ≥ 1. By the inductive hypothesis, we obtain (3) reg S S S S = reg = reg + reg ≤ ℓ − 1 + 1 = ℓ. JG′′ in< (JG′′ ) JH1 JH2 Relations (2) and (3) yield reg(S/ in< (JG′ ) ⊕ S/((xi, yi ) + in< (JG′′ ))) ≤ ℓ. From the exact sequence (1) we get (4)     S S S S ≤ max{reg , reg ⊕ + 1} ≤ ℓ. reg in< (JG ) in< (JG′ ) (xi , yi ) + in< (JG′′ ) in< (JG′ ) By [7, Theorem 3.3.4], we know that reg(S/JG ) ≤ reg(S/ in< (JG ), and by [10, Theorem 1.1], we have reg(S/JG ) ≥ ℓ. By using all these inequalities, we get the desired conclusion.  4. B INOMIAL EDGE IDEALS OF CATERPILLAR TREES Matsuda and Murai showed in [10] that, for any connected graph G on the vertex set [n], we have ℓ ≤ reg(S/JG ) ≤ n − 1, where ℓ denotes the length of the longest induced path of G, and conjectured that reg(S/JG ) = n − 1 if and only if T is a line graph. Several recent papers are concerned with this conjecture; see, for example, [6], [13], and [14]. One may ask as well to characterize connected graphs G whose longest induced path has length ℓ and reg(S/JG ) = ℓ. In this section, we answer this question for trees. 6 A caterpillar tree is a tree T with the property that it contains a path P such that any vertex of T is either a vertex of P or it is adjacent to a vertex of P. Clearly, any caterpillar tree is a Cℓ -graph for some positive integer ℓ. • • • • • • • • • • • • • • • • • • • • • • F IGURE 2. Caterpillar • • • • • • • • F IGURE 3. Induced graph H Caterpillar trees were first studied by Harary and Schwenk [9]. These graphs have applications in chemistry and physics [4]. In Figure 2, an example of caterpillar tree is displayed. Note that any caterpillar tree is a narrow graph in the sense of Cox and Erskine [2]. Conversely, one may easily see that any narrow tree is a caterpillar tree. Moreover, as it was observed in [11], a tree is a caterpillar graph if and only if it is weakly closed in the sense of definition given in [11]. In the next theorem we characterize the trees T with reg(S/JT ) = ℓ where ℓ is the length of the longest induced path of T . Theorem 4.1. Let T be a tree on the vertex set [n] whose longest induced path P has length ℓ. Then reg(S/JT ) = ℓ if and only if T is caterpillar. Proof. Let T be a caterpillar tree whose longest induced path has length ℓ. Then, by the definition of a caterpillar tree, it follows that T is a Cℓ -graph. Hence, reg(S/JT ) = ℓ by Theorem 3.3. Conversely, let reg(S/JT ) = ℓ and assume that T is not caterpillar. Then T contains an induced subgraph H with ℓ + 3 vertices as in Figure 3. 7 Then, by [15, Theorem 27], it follows that reg(S/JH ) = ℓ + 1. Thus, since reg(S/JH ) ≤ reg(S/JG ) (see [10, Corollary 2.2]), it follows that reg(S/JG ) ≥ ℓ + 1, contradiction to our hypothesis.  R EFERENCES [1] A. Conca, Gorenstein ladder determinantal rings, J. London Math. Soc. 54(3) (1996), 453–474. [2] D. A. Cox and A. Erskine, On closed graphs, arXiv:1306.5149. [3] A. Dokuyucu, Extremal Betti numbers of some classes of binomial edge ideals, arXiv:1310.2903. [4] S. El-Basil, Applications of caterpillar trees in chemistry and physics, J. Math. Chem. 1(2) (1987), 153–174. [5] V. Ene, J. Herzog, T. Hibi, Cohen-Macaulay binomial edge ideals, Nagoya Math. J. 204 (2011), 57–68. [6] V. Ene and A. Zarojanu, On the regularity of binomial edge ideals, to appear in Math. Nachr. [7] J. Herzog and T. Hibi, Monomial Ideals, Graduate Texts in Mathematics 260, Springer, 2010. [8] J. Herzog, T. Hibi, F. Hreinsdotir, T. Kahle, J. Rauh, Binomial edge ideals and conditional independence statements, Adv. Appl. Math. 45 (2010), 317–333. [9] F. Harary and A. J. Schwenk, The number of caterpillars, Discrete Math. 6(4), (1973), 359–365. [10] K. Matsuda and S. Murai, Regularity bounds for binomial edge ideals, J. Commut. Algebra 5 (2013), 141–149. [11] K. Matsuda, Weakly closed graphs and F-purity of binomial edge ideals, arXiv: 1209.4300. [12] M. Ohtani, Graphs and Ideals generated by some 2-minors, Commun. Algebra 39 (2011), no. 3, 905– 917. [13] S. Saeedi Madani and D. Kiani, Binomial edge ideals of graphs, Electron. J. Combin, 19 (2012), no. 2, # P44. [14] S. Saeedi Madani and D. Kiani, The regularity of binomial edge ideals of graphs, arXiv: 1310.6126. [15] S. Zafar and Z. Zahid, On the Betti numbers of some classes of binomial edge ideals, Electron. J. Combin. 20 (2013) no. 4, # P37. A BDUS S ALAM S CHOOL OF M ATHEMATICAL S CIENCES , GC U NIVERSITY, L AHORE . 68-B, N EW M USLIM T OWN , L AHORE 54600, PAKISTAN E-mail address: [email protected] FACULTY OF M ATHEMATICS AND C OMPUTER S CIENCE , OVIDIUS U NIVERSITY B D . M AMAIA 124, 900527 C ONSTANTA , AND L UMINA -T HE U NIVERSITY OF S OUTH -E AST E UROPE S OS . C OLENTINA NR . 64 B , B UCHAREST, ROMANIA E-mail address: [email protected] A BDUS S ALAM S CHOOL OF M ATHEMATICAL S CIENCES , GC U NIVERSITY, L AHORE . 68-B, N EW M USLIM T OWN , L AHORE 54600, PAKISTAN E-mail address: ridairfan [email protected] 8
0math.AC
S. Khor 12/5/2010 Static and dynamic characteristics of protein contact networks Susan Khor1 Abstract The principles underlying protein folding remains one of Nature’s puzzles with important practical consequences for Life. An approach that has gathered momentum since the late 1990’s, looks at protein heteropolymers and their folding process through the lens of complex network analysis. Consequently, there is now a body of empirical studies describing topological characteristics of protein macro-molecules through their contact networks and linking these topological characteristics to protein folding. The present paper is primarily a review of this rich area. But it delves deeper into certain aspects by emphasizing short-range and long-range links, and suggests unconventional places where “power-laws” may be lurking within protein contact networks. Further, it considers the dynamical view of protein contact networks. This closer scrutiny of protein contact networks raises new questions for further research, and identifies new regularities which may be useful to parameterize a network approach to protein folding. Preliminary experiments with such a model confirm that the regularities we identified cannot be easily reproduced through random effects. Indeed, the grand challenge of protein folding is to elucidate the process(es) which not only generates the specific and diverse linkage patterns of protein contact networks, but also reproduces the dynamic behavior of proteins as they fold. Keywords: network analysis, protein contact networks, protein folding 1. Introduction Breaking the code underlying protein folding has remained an intellectually tantalizing puzzle as well as a problem of great practical significance. Everything a protein requires for correct folding under normal circumstances appears to be embedded in its amino-acid sequence (Afinsen 1973), although a minority rely on the aid of chaperone molecules to fulfill their destiny. Due to the large sizes that amino-acid sequences can take, a random search approach to protein folding is deemed infeasible for practical biological purposes (Levinthal 1969). However, an argument based on separability of the protein folding problem, i.e. that the problem can be separated into parts which can be solved independently and assembled into an optimal solution2, has been conceived as a way out of Levinthal’s paradox (Zwanzig et al 1992; Karplus 1997). This argument is supported by the observation that some sections of protein sequences have a propensity to fold to their secondary structures. In medicine, protein misfolding has been identified as a causative factor in diseases such as cystic fibrosis, ALS and Alzheimer’s (Chen et al 2008). Proteins play many roles in biological cells, e.g. as structural material, 1 Contact info.: [email protected] For a more whimsical description, see Herbert A. Simon’s parable of the two watchmakers in The Architecture of Complexity in The Sciences of the Artificial, 1969 MIT Press. 2 1 S. Khor 12/5/2010 catalysts, adaptors, hormones, transporters and regulators (Tramontano 2006). Proteins attain their functionality through their unique (though not necessarily static) native three dimensional states and are the ultimate expression of genes. Thus, the ability to predict the three dimensional structure of a protein sequence is useful to comprehend genomic data. Current approaches to the protein structure prediction problem such as comparative modeling, fold-recognition methods (profile-based and sequence threading) and fragment-based methods rely heavily on existing knowledge of protein sequences and their folds (Tramontano 2006). Notwithstanding the success of these methods, understanding the protein folding process from first principles is a more complete and satisfying solution, and may prove invaluable for protein design and therapies targeting protein misfolding. In general, protein folding is a process that occurs in stages. What essentially begins as a linear hetero-polymer (organized as a backbone with protruding side chain groups) obtains local structure in the form of secondary alpha helices and beta sheets and finally global structure as the secondary structures arrange themselves compactly in three dimensions. For a long time, this spontaneous biological self-organization has been attributed to various inter-atomic physical forces and chemical constraints impacting a protein molecule. However, in the last decade or so, another theory based on the network topology of a protein’s native state has blossomed. Alm and Baker (1999) even suggest that “protein folding mechanisms and landscapes are largely determined by the topology of the native state and are relatively insensitive to details of the interatomic interactions.” In this other theory, a network view of protein molecules (mostly in their native states) is adopted. The general recipe to transform a protein molecule into a network is to represent amino acid residues (Cα or Cβ) as nodes, and contact (spatial, non-covalent) distances between pairs of amino acid residues below a certain threshold as links. Such protein contact networks or maps (Vendruscolo et al 2002) are constructed from the Cartesian coordinates of amino acid residues of protein molecules stored in the Protein Data Bank (PDB) (Berman et al 2000). By examining protein contact networks (PCN), researchers have compiled a list of topological characteristics shared by a diverse (in terms of structural class, homology and taxon) set of proteins and speculated on the reasons for the observed topological characteristics in relation to the protein folding mechanism. For example, a common feature of protein contact networks is their small-world nature, i.e. they have lattice like clustering coefficients but random graph like diameters and characteristic path lengths (Watts and Strogatz 1998). The need for rapid communication between amino acid residues to facilitate interaction cooperativity crucial for protein folding is frequently cited as the reason for the small-world feature of PCNs (Vendruscolo et al 2002; Dokholyan et al 2002; Atilgan et al 2004; Del Sol et al 2006). Protein contact networks are also reported to exhibit high assortativity values which can be related to protein folding speeds (Bagler and Sinha 2007). 2 S. Khor 12/5/2010 In this paper, we collected the PCN structural characteristics that have been reported in literature on various sets of proteins and using different methods of PCN construction, and applied them on a single set of proteins – the GH64 dataset – with a single PCN construction method. We find that in general, the reported network characteristics hold for GH64. We also carry a line of inquiry found in the literature (Green and Higman 2003) of probing the effects of short-range links and of long-range links on network characteristics of PCNs throughout the paper. Our investigations led us to new research questions, and to new quantitative and qualitative observations about PCNs which could be helpful to finally realize a network approach to protein folding. These new observations include: about 30% of all links are long-range, a power-law like distribution of link sequence distance, and for proteins which are not too large, the maximum link sequence distance is about 70% of a protein’s size. However our model of a network approach to protein folding is far from complete as the problem of choosing endpoints for long-range links remains elusive (about 60% of a protein’s amino acids are involved in at least one long-range interaction). 2. Protein Contact Map (PCN) A protein contact network or PCN (Vendruscolo et al 2002) is an adjacency matrix representing a network whose nodes are the Cα atom of amino acid residues of a protein, and where a link is placed between a pair of nodes when the node pair is situated less than some distance threshold (TH) apart from each other. Distance between node pairs is the Euclidean distance between their 3D Cartesian coordinates obtained from the Protein Data Bank or PDB (Berman et al 2000). For this paper, TH is 7Å. Structural characteristics of PCNs do not seem overly sensitive to the choice of the threshold value (Bartoli et al 2007). We build a PCN for each protein in the GH64 dataset. Examples of four such PCNs can be found in Figure 1. The proteins were randomly chosen for their differences in size: 1aep, 1agd, 1psd and 1CVJ have 153, 385, 813 and 1261 nodes in their PCNs respectively. So far, we have referred to PCNs as uniform entities. In actuality, there are variations in the way PCNs are constructed. For example, a single PCN may represent several non-homologous proteins rather than a single protein. PCNs may also represent different aspects (e.g. surface or core), states (e.g. native or transitional), structural classes (e.g. α, β, α+β or α/β), or types (e.g. globular or fibrous) of proteins. Further, the nodes and links of PCNs may carry different meanings, e.g. atoms of the side chain group of an amino acid may be included so that a node may represent more than one atom and multiple links between nodes or weighted links are allowed. Examples of these alternative PCN constructions can be found in the references for this paper. Incidentally, an earlier use of a matrix to depict protein folding can be found 3 in (Tanaka and Scheraga 1977). S. Khor 12/5/2010 Figure 1 Left: Protein Contact Networks (7Å) for four proteins in the GH64 dataset. A shaded cell (x, y) denotes a link between nodes x and y. Right: Networks produced from two of the PCNs: 1aep (top) and 1psd (bottom). SE links are pink, LE links are turquoise, yellow highlights nodes with more than 8 direct neighbours. Sections 4 and 5 of the text provide further explanation. 3. The GH64 Protein Dataset The 64 proteins in the GH64 dataset (Table 1) were selected from literature surveyed, specifically (Green and Higman 2003). The dataset encompass proteins from different protein classes, fold types and branches of life. Their sizes range from 69 to 1734 residues (Figure 2). Proteins which did not form a single component (1cuk and 1ho4), or had unusually high link density (1feo) in the PCNs we constructed were excluded from the dataset. So too were proteins with more nodes in their PCNs than their DSSP output (Kabsch and Sander 1983) (2hmz and 1epf). For the reverse situation, we truncated the DSSP output. Another protein dataset, EVA132, is described in Appendix A and it is used as a check to increase confidence in the main observations made in this paper. Table 1 Proteins in the GH64 Dataset 1mjc 1gvp 1ten 1ris 2acy 1tlk 1ayc 1sha 1CD8 1d4t 1e86 2fgf 1eif 1pdo 1h7i 1amx 1bj7 1aep 1gm6 3rab 1wba 1rbp 1eyl 153L 1fap 1nsj 1hro 1jr8 256b 1ICE 1arb 1vlt 1urn 1amp 1j8m 1cjl 1beb 1OBP 1b7f 1hng 1agd 1aye 1g4t 1eov 1bmt 7tim 1ce7 1hwn 2AAI 1fbv 1bf5 1jly 1dar 1eun 1rpx 1bbp 1bih 1psd 1b8a 1ava 1CVJ 3eca 3kbp 1dio 4 12/5/2010 2000 1800 1600 1400 1200 1000 800 600 400 200 0 1mjc 1ten 2acy 1ayc 1CD8 1e86 1eif 1h7i 1bj7 1gm6 1wba 1eyl 1fap 1hro 256b 1arb 1urn 1j8m 1beb 1b7f 1agd 1g4t 1bmt 1ce7 2AAI 1bf5 1dar 1rpx 1bih 1b8a 1CVJ 3kbp Number of residues (Nodes) S. Khor GH64 Proteins Figure 2 Size of GH64 PCNs in terms of the number of Cα atoms documented in their PDB files. 4. Links: short-range (SE) and long-range (LE) A link is placed between a pair of nodes representing the Cα atom of amino acids when the node pair is situated less than 7Å apart from each other (section 2). We partitioned the set of links in a PCN into two sets: long-range links (LE) and short-range links (SE). A link between nodes x and y is classified as long-range if their absolute distance on the amino acid sequence chain is more than some distance threshold (LE_TH). Long-range links connect amino acids which are far apart from each other in the primary structure but are in close spatial proximity in the tertiary structure. In this study, LE_TH is 9 (Green and Higman 2003), although we also consider LE_TH = 4. Unless otherwise stated, LE links refer to long-range links with LE_TH = 9. Figures 3(a)-(c) examine various aspects of PCN links in the GH64 dataset. Similar observations are made on the EVA132 dataset (Appendix A). The number of links M in a PCN increases linearly with protein size (number of nodes in a PCN) (Figure 3a). The number of long-range links |LE|, regardless of LE_TH, also increases linearly with protein size, albeit at a slower rate (Figure 3a). For comparison, we cut in half the sequence distance threshold for long-range links (LE_TH) from 9 to 4 (Figures 3a &b). On average, 30% of all links in a PCN are LE (when LE_TH = 9, mean |LE| / M = 0.2929 with standard deviation of 0.0834; when LE_TH = 4, mean |LE| / M = 0.3549 with std. dev. = 0.1005). Instead of the entire PCN, Gaci and Balev (2009) considered the subgraph induced by the set of amino acids participating in secondary structures (links belonging to the less evolutionary conserved loop regions between SSEs are excluded). They call such a subgraph Secondary Structure Elements Interaction Network or SSE-IN. Gaci and Balev (2009) observed that the ratio of the number of interactions between secondary structures to the total number of interactions in SSE-INs does not exceed 20%. 5 S. Khor 12/5/2010 8000 PCN Links (< 7A) 7000 Long-range links (> 9) Count 6000 Long-range links (> 4) 5000 4000 3000 2000 1000 0 0 200 400 600 800 1000 1200 1400 1600 1800 Nodes Figure 3a Link count M, by protein size. Proportion of all links 0.6 0.5 0.4 0.3 0.2 Long-range links (> 9) 0.1 Long-range links (> 4) 0 0 200 400 600 800 1000 1200 1400 1600 1800 Nodes Figure 3b Long-range links as a proportion of all links (|LE|/M), by protein size. When LE_TH is 9, the fraction of links in LE averages at 0.2929 with a standard deviation of 0.0834. When LE_TH is 4, the average is 0.3549 with a standard deviation of 0.1005 0.12 PCN Links (< 7A) Lattice 8 Lattice 4 Link Density 0.10 0.08 0.06 0.04 0.02 0.00 0 200 400 600 800 1000 1200 1400 Nodes Figure 3c Link density by protein size. 6 1600 1800 S. Khor 12/5/2010 The GH64 PCNs have low link densities, and link density decreases rapidly with protein size (Figure 3c). Link density is the fraction of actual links out of all possible links: 2M / [N (N-1)]. On a log-log plot, link density for PCN in Figure 3c straightens out into a line (section 9). For reasons which will become clearer in section 5, Figure 3c compares the link densities of GH64 PCNs with those of two linear lattices: Lattice8 and Lattice4. LatticeV is a linear lattice with V/2 nearest neighbours to the left and to the right where possible (V/2 nodes at each of the two ends of the lattice chain will have fewer links than the rest of the nodes in the middle which will have V links each). For a given network size (number of nodes), PCN link densities are indistinguishable from Lattice8 link densities (Figure 3c). 5. Node Degree and Degree Distribution Typically, a node in a PCN represents the Cα atom of amino acids (section 2). The degree of a node is the number of links attached to the node. In the present context, node degree measures the number of contacts a node has in a PCN. Gaci and Balev (2009) remarked on the homogeneity of node degree in their SSE-INs. The mean degree of SSE-INs increases very slightly with protein size and falls within the range of 5 and 8. The absence of nodes with much higher degrees is attributed to the excluded volume effect which imposes a physical limit on the number of residues that can reside within a given radius around another amino acid. Node degree distribution is the probability that a node has a particular degree. Node degree distributions for a variety of PCNs (i.e. PCNs constructed in different ways and from different protein sets) are bell-shaped, characteristic of a Gaussian distribution (Green and Higman 2003; Atilgan et al 2004; Bagler and Sinha 2005). Although, Green and Higman (2003) found that node degree distributions of PCNs which consider only long-range interactions exhibit if not scale-free tendencies, then exponential or highly right skewed distributions, irrespective of fold type. However, their PCN is unlike our PCN and other PCNs referenced in this paper. Each amino acid residue is still represented by a single node in the Green and Higman PCN. However, all atoms of an amino acid are considered when deciding on contact or link establishment, and multiple links between nodes are allowed. Therefore the Green and Higman PCN can register much larger node degrees, with reported modes of 100 (Green and Higman 2003, p. 783). Gaci and Balev (2009) also observed scale-free tendencies in the node degree distributions of their SSE-INs, with the caveat of a sharp cut-off above the mean node degree. Finding scale-free connectivity patterns in PCNs is attractive since such connectivity pattern has direct consequences on efficiency of information transfer and robustness to random attacks in proteins (Green and Higman 2003; Atilgan et al 2004). Node degree statistics for PCNs in GH64 is presented in Figure4a. The mean node degrees are independent of protein size and hover around 8 (mean node degree averaged over all PCNs in GH64 is 7.9696 with a standard deviation of 0.3126). Little difference is observed between the corresponding 7 S. Khor 12/5/2010 mean node degrees and the median node degrees. The standard deviation values are about four times smaller than the corresponding mean node degrees. All these statistics point towards bell shaped degree distributions as reported in the literature, and as shown in Figure 4b for four proteins in GH64. 18 16 Node Degree 14 12 max 10 mid 8 mean 6 std.dev. min 4 2 0 0 200 400 600 800 1000 1200 1400 1600 1800 Nodes Figure 4a Node degree summary statistics for GH64 PCNs. The average mean node degree (K) is 7.9696 with a standard deviation of 0.3126. 0.35 0.30 Probability 0.25 1aep 0.20 1agd 0.15 1psd 1CVJ 0.10 0.05 0.00 0 2 4 6 8 10 Degree 12 14 16 Figure 4b Node degree distributions of four PCNs in the GH64 dataset. Since we have partition the set of links into SE and LE (section 4), we can similarly classify the set of nodes into two subsets (although these two subsets are not necessarily disjoint): SE_nodes for the set of nodes which are endpoints of links in SE, and LE_nodes for the set of nodes which are endpoints of links in LE. Figure 5a compares the sizes of these subsets and we find that LE_nodes is generally slightly smaller than SE_nodes for proteins in GH64. This is not entirely surprising since we expect almost all nodes to be in SE_nodes. For GH64, we found that the mean |SE_nodes| / N is 0.9970 with a std. dev. of 0.0039, and the mean |LE_nodes| / N is 0.6659 with a std. dev. of 0.1093 where N = number of nodes. Thus there is significant overlap between SE_nodes and LE_nodes, almost a subset 8 S. Khor 12/5/2010 relationship. For GH64, we found that mean |SE_nodes ∩ LE_nodes| / N is 0.6628 with a std. dev. of 0.1103. Green and Higman (2003) found that between 5% to 25% of nodes within each of their PCNs do not have long-range contacts, i.e. are not in LE_nodes. For the GH64 PCNs, the mean (N |LE_Nodes|) / N is 0.3341 with a std. dev. of 0.1093 (Figure 5b). Similar observations are made on the EVA132 dataset (Appendix A). Node Count 1800 1600 SE 1400 LE 1200 1000 800 600 400 200 0 200 400 600 800 1000 1200 1400 1600 1800 Nodes Figure 5a Number of nodes which are endpoints for links in SE (SE_nodes), and number of nodes which are endpoint for links in LE (LE_nodes), by protein size for GH64. SE_nodes as a fraction of all nodes averages at 0.9970 with a standard deviation of 0.0039. LE_nodes as a fraction of all nodes averages at 0.6659 with a standard deviation of 0.1093. SE_nodes SE_ and LE_nodes Proportion of all nodes 1.2 LE_nodes Not in LE_nodes 1.0 0.8 0.6 0.4 0.2 0.0 0 200 400 600 800 1000 1200 1400 1600 1800 Nodes Figure 5b Sizes of different subsets of nodes as a proportion of all nodes for GH64 PCNs. On average, 0.6628 ± 0.1103 of all nodes are in both SE_nodes and LE_nodes, while 0.3341 ± 0.1093 of all nodes are not in LE_nodes. Being able to distinguish LE_nodes for a protein without prior knowledge of its 3D structure could be an important step in predicting the 3D structure of proteins. Unfortunately, as we have observed above, more than half of the amino acids in a protein sequence are expected to have at least one long- 9 S. Khor 12/5/2010 range interaction (in the protein’s native state). Perhaps a better strategy is to try to identify distinguishing characteristics of the 30% or so nodes which are not involved in long-range interactions. What about the node degree characteristics of SE_nodes and of LE_nodes? We use two ways to do this comparison. First, we compute node degree statistics for nodes in SE_nodes (LE_nodes) using the node degree values from the PCN constructed with SE (LE) only. The result of this first comparison is displayed in Figure 6a. It yielded no significant difference at the 95% confidence level with the twosided paired t test (p-value = 0.871) or with the two-sided paired Wilcoxon test (p-value = 0.3305). Nonetheless, we observed some differences between the degree distributions of PCN_SE (PCN constructed with SE only) and PCN_LE (PCN constructed with LE only). The narrow degree ranges of our PCNs limits our ability to observe long-tailed behavior over several scales (Figure 6b). PCN SE avg 7 PCN LE avg 6 Degree 5 4 3 2 1 1mjc 1ten 2acy 1ayc 1CD8 1e86 1eif 1h7i 1bj7 1gm6 1wba 1eyl 1fap 1hro 256b 1arb 1urn 1j8m 1beb 1b7f 1agd 1g4t 1bmt 1ce7 2AAI 1bf5 1dar 1rpx 1bih 1b8a 1CVJ 3kbp 0 GH64 Proteins Figure 6a Degree statistics for SE_nodes and for LE_nodes based respectively on PCNs constructed from short-range links (SE) only and from long-range links (LE) only. Error bars mark ± standard deviation. 0.6 1aep 0.7 1agd 0.6 1psd 0.5 1CVJ 1aep 0.5 Probability Probability 0.9 0.8 0.4 0.3 0.2 1agd 1psd 0.4 1CVJ 0.3 0.2 0.1 0.1 0 0 0 2 4 6 0 8 2 4 6 8 10 PCN_LE Degree PCN_SE Degree Figure 6b Degree distributions of PCNs constructed with short-range (long-range) only links. 10 S. Khor 12/5/2010 Second, we compute node degree statistics for nodes in SE_nodes (LE_nodes) using the node degree values from the entire PCN. Figure 6c displays the result of this second comparison. According to the two-sided paired t test, and the two-sided paired Wilcoxon test, there is a significant difference at the 95% confidence level between the two vectors. However, given the high overlap between SE_nodes and LE_nodes, this difference though statistically significant, may be slight in magnitude. 14 12 Degree 10 8 6 4 SE avg 2 LE avg 1mjc 1ten 2acy 1ayc 1CD8 1e86 1eif 1h7i 1bj7 1gm6 1wba 1eyl 1fap 1hro 256b 1arb 1urn 1j8m 1beb 1b7f 1agd 1g4t 1bmt 1ce7 2AAI 1bf5 1dar 1rpx 1bih 1b8a 1CVJ 3kbp 0 GH64 Proteins Figure 6c Degree statistics for SE_nodes and for LE_nodes based on node degree values for the entire PCN. Error bars mark ± standard deviation. 6. Clustering Clustering or transitivity reflects the cliquishness of nodes in a network: if node X connects to node Y and to node Z, how likely is it that nodes Y and Z are connected to each other? There are different ways of measuring such transitive relationships, strongly indicated in graphs by the presence of triangles. One way is by taking the average clustering of all nodes in a network to yield the clustering coefficient: C = 1 N N 2ei where ki is the degree of node i, and ei is the number of links that exist i − 1) ∑ k (k i =1 i amongst the ki nodes (Watts and Strogatz 1998). Vendruscolo et al (2002) reports C values of around 0.58 ± 0.04 for their PCN (which has a different construction than ours), and Bagler and Sinha (2005) found C values of around 0.553 ± 0.027, irrespective of protein structural class as defined in SCOP (Murzin et al 1995). For the GH64 PCNs, the C values averaged at 0.5484 with a std. dev. of 0.0233, and they are independent of protein size. Figure 7a compares them with the C values for Lattice8, Lattice4 and the theoretical C values for regular (CREGULAR) and random (CRANDOM) networks of the same size (same number of nodes). CRANDOM ~ K / N, and CREGULAR = 3 (K-2) / [4 (K-1)], where K is average degree and N is number of nodes (Watts 1999). The theoretical C values for 1D regular networks (CREGULAR) are indistinguishable from the C values for Lattice8 (not surprising since mean degree of 8 is used). The C 11 S. Khor 12/5/2010 values for GH64 PCNs are slightly smaller than CREGULAR, and closer to the C values for Lattice4. This last observation is telling as SE includes protein backbone links, and the protein backbone is the main source of high clustering (Bartoli et al 2007). Further, Green and Higman (2003) observed that PCNs built with only long-range links (LE) have relatively lower C values than those for PCNs with all links. The same phenomenon is observed with GH64 proteins. Figure 7b shows the effect of randomizing PCN links. Unlike randomizing only long-range links (randLE), randomizing only short-range links (randSE) reduces clustering to levels similar to those of random graphs or randomizing all links (randAll). Clustering Coefficient 1.0 0.8 Regular 0.6 Lattice8 Lattice4 0.4 pcn Random 0.2 0.0 0 200 400 600 800 1000 1200 1400 1600 1800 Nodes Figure 7a Clustering coefficient values (± one standard deviation) for GH64 PCNs. Clustering coefficients average at 0.5484 with standard deviation of 0.0233. Clustering Coefficient 1.0 0.8 pcn randLE randSE randAll 0.6 0.4 0.2 1mjc 1ten 2acy 1ayc 1CD8 1e86 1eif 1h7i 1bj7 1gm6 1wba 1eyl 1fap 1hro 256b 1arb 1urn 1j8m 1beb 1b7f 1agd 1g4t 1bmt 1ce7 2AAI 1bf5 1dar 1rpx 1bih 1b8a 1CVJ 3kbp 0.0 GH64 Proteins Figure 7b Randomizing SE reduces clustering more than randomizing LE. Links are randomized in the usual manner (Maslov and Sneppen 2002), by rewiring nodes while preserving node degrees and without introducing multiple links between nodes. For example, to randomize the set of long-range links (randLE), two LE links e1(a, b) and e2(c, d) are picked uniformly 12 S. Khor 12/5/2010 at random with replacement from LE. If both e3(a, c) and e4(b, d) do not already exist in the network, then e3 and e4 replace e1 and e2. High clustering in PCNs is almost always discussed in terms of the small-world property (Watts and Strogatz 1998). Since the small-world property also involves the characteristic path length statistic (section 8), the importance of short inter-node distances to protein folding inevitably dominates the discussion. As a result, the role of high clustering (at the local interaction level) to protein folding is somewhat under explained. A small exception to this is Bagler and Sinha (2005; 2007). They suggest that high clustering in PCNs is indicative of a modular hierarchical organization as a result of the protein folding process, but called for further investigation into this hypothesis (Bagler and Sinha 2005). In (Bagler and Sinha 2007), they report a negative correlation between protein folding speed and high clustering levels in PCN_LE (PCNs that only take into account long-range links). However, they did not find any significant relationship between protein folding speed and clustering levels of entire PCNs. Hence, the exact role clustering plays in protein folding is still an open question. Since most of the clustering comes from short-range links (SE), which comprise backbone and secondary structure links, it may be that high clustering of short-range links is necessary merely as a scaffolding device to create the “all-important” long-range contacts. Alternatively, it may be that the high clustering levels found in PCNs is a side effect of another network characteristic with a clearer relationship with some aspect of protein folding, for example assortativity and protein folding speed (section 7). Or, it could be that the local organization of short-range links really does play a role in some aspect of protein folding. In social networks, transitive relationships are assumed to be part of the nature of human social behavior, and the problem is to explain the establishment and subsequent efficient reuse of “random” short-cuts. An interesting example of such a study is Kleinberg (2000), although how far the analogy between human social networks and protein contact networks (or any other kind of residue “interaction” network) applies to protein folding remains to be seen. 7. Assortativity Network assortativity refers to the extent that nodes associate or connect with their own kind. A common form of assortativity measured for PCNs is node degree. In this section (and throughout this paper), positive assortativity refers to the proclivity of nodes with small (large) degree to link with other nodes of small (large) degree. Using the method in (Newman 2002), Bagler and Sinha (2007) report degree-degree correlation coefficients up to 0.58, which is considered unusual for networks with biological origins (we discuss this point further ahead). Nonetheless, the positive assortativity values could be correlated in a positive manner to protein folding speeds (Bagler and Sinha 2007). Similarly, we find that the GH64 PCNs have positive degree-degree correlations (Figure 8a). Their assortativity values average at 0.3387 with a standard deviation of 0.0536, and are independent of 13 S. Khor 12/5/2010 protein size. Figure 8b uses an alternative method (which is less sensitive to the effects of superconnected nodes) to assess degree assortativity (Pastor-Satorras et al 2001). In this other method, a positive correlation between degree k and the average degree of nodes directly neighbouring nodes of degree k is interpreted as evidence of positive degree-degree assortativity. In general, the plots in Figure 8b agree with the summary in Figure 8a. Although, the plots show some weakening (even reversal) in the relationship as node degree increases, which could be due to the limits on node degree (Bagler and Sinha 2007). This coupled with assortativity values close to those for Lattice4 (Figure 8a) is telling. Like clustering (section 6), assortativity is more sensitive to random rewiring of short-range links (randSE) than to random rewiring of long-range links (randLE) (Figure 8c). And when analyzed separately, long-range links (LE) show less positive assortativity than short-range links (SE). This means that like clustering, the high positive assortativity values of PCNs also mainly stem from SE. 0.8 Assortativity 0.6 Lattice8 0.4 Lattice4 pcn 0.2 randAll 0.0 -0.2 0 200 400 600 800 1000 1200 1400 1600 1800 Nodes Figure 8a The GH64 PCNs have positive degree assortativity, with values close to Lattice4. Mean Assortativity is 0.3387 with a standard deviation of 0.0536. Average Neighbourhood Degree 12.0 10.0 8.0 1aep 1agd 6.0 1psd 1CVJ 4.0 2.0 0.0 0 2 4 6 8 10 Degree 12 14 16 Figure 8b Average neighbourhood degree for degree k is the average degree of all nodes adjacent to all nodes of degree k. A positive correlation implies positive degree-degree assortativity. 14 S. Khor 12/5/2010 0.8 Assortativity 0.6 pcn randLE randSE randAll 0.4 0.2 0.0 1mjc 1ten 2acy 1ayc 1CD8 1e86 1eif 1h7i 1bj7 1gm6 1wba 1eyl 1fap 1hro 256b 1arb 1urn 1j8m 1beb 1b7f 1agd 1g4t 1bmt 1ce7 2AAI 1bf5 1dar 1rpx 1bih 1b8a 1CVJ 3kbp -0.2 GH64 PCMs Figure 8c Effect of randomizing links on Assortativity. randSE produces a larger effect than randLE. 0.6 Assortativity 0.4 0.2 0.0 SE -0.2 LE -0.4 0 200 400 600 800 1000 1200 1400 1600 1800 Nodes Figure 8d Assortativity for long-range links (LE) and short-range links (SE). Previously, a number of biological networks including gene regulatory networks were described as disassortative, and it was suggested that this negative assortativity (specifically nodes of high degree or hubs are not directly connected with each other in the networks studied) is advantageous in the sense that the effects of harmful perturbations could be better localized (Maslov and Sneppen 2002). Brede and Sinha (2005) conclude that the stability of networks with assortative mixing by node degree (i.e. positive assortativity) declines more rapidly with increases in network size. A system with fragile stability is easily dislodged from its equilibrium state by small disturbances. However, the positive assortativity of PCNs may actually work to the benefit of the protein folding process by helping information to flow quickly and thus facilitate coordinated action crucial for correct and rapid protein folding. Further, native state proteins “adjust” themselves during ligand-binding, and thus some vulnerability to perturbations or marginal stability may be advantageous (Taverna and Goldstein 2002). 15 S. Khor 12/5/2010 Indeed if percolation is important, Vazquez and Moreno (2003) conclude that node degree assortativity can make networks robust to random node or edge removals. Additionally, there could be some delegation of responsibilities between interacting biological networks in the sense that the amino acid chain is the product of gene translation and concerns about containing unwanted perturbations in a folding protein may be taken care of by the disassortative structure of genetic networks. Additionally, since LE is less assortative than SE (Figure 8d), there may still be some degree of isolation between parts (node subsets) of a PCN to buffer against unexpected perturbations. It appears that there are yet interesting discussions to be had on this topic. 8. Average Path Length Average path length of a network is the average shortest path between all node-pairs. It represents the number of links that needs to be traversed on average when trying to move between nodes in a network. PCNs are known to have average path lengths characteristic of random graphs of the same size. For their respective protein sets and PCN constructions, Vendruscolo et al (2002) report an average path length of 4.1 ± 0.9, while Bagler and Sinha (2005) report an average path length of 6.88 ± 2.61. Path length is widely mentioned as a topological feature of PCNs that is highly relevant to protein folding (Vendruscolo et al 2002; Dokholyan et al 2002; Atilgan 2004; Del Sol et al 2006). The argument is: Short path lengths are conducive to rapid communication between amino acid molecules of a protein, which facilitates interaction cooperativity crucial for protein folding. We revisit this point elsewhere (manuscript submitted). Briefly, we find that shorter inter-node distances is no guarantee of finding a global optimum more easily if the shorter average path lengths is the result of more links and the fitness function is such that additional links increase frustration. Figure 9a gives various path length statistics for GH64 PCNs. Both diameter (maximum shortest path length found) and average path length increase logarithmically as protein size (nodes) increases. When compared with average path lengths of other canonical networks, the average path lengths of PCNs are much shorter than regular graphs and approximate the average path lengths expected of random graphs of the same size (Figure 9b). Although the standard deviations indicate rather large dispersions of shortest path lengths in the PCNs, the average path length and median path length values are very close to each other (Figure 9a). We gather from this that there is little skew in the distribution of shortest path lengths for PCNs, and it is indeed the case. Figure 9c shows the Gaussian like distributions of shortest path lengths for four GH64 PCNs. 16 S. Khor 12/5/2010 32 28 Path Length 24 20 maximum 16 mean 12 median 8 4 0 0 200 400 600 800 1000 1200 1400 1600 1800 Nodes Figure 9a Diameter, average (± one standard deviation) and median path length for GH64 PCNs. 300 Lattice4 Mean Path Length 250 Lattice8 Regular 200 pcn 150 Random 100 50 0 0 200 400 600 800 1000 1200 1400 1600 1800 Nodes Figure 9b Average path lengths of PCNs are much closer to average path lengths of random networks (LRANDOM) than to average path length of regular networks (LREGULAR). LRANDOM ~ ln N / ln K, and LREGULAR = N (N + K-2) / [2K (N-1)], where K is average degree and N is number of nodes (Watts 1999). 0.25 1aep Probability 0.20 1agd 1psd 0.15 1CVJ 0.10 0.05 0.00 0 5 10 15 20 25 30 35 Shortest Path Length Figure 9c Distribution of shortest path lengths for four GH64 PCNs. 17 S. Khor 12/5/2010 Figures 10a&b respectively show the effect of randomizing links on the average path lengths and on the diameters of PCNs. Like Clustering (section 6) and Assortativity (section 7), randomizing only long-range links (randLE) produces a smaller effect than randomizing only short-range links (randSE). Both the two-sided paired t test and the two-sided paired Wilcoxon test report a significant difference at the 95% confidence level between the randSE and the randLE vectors of mean path length values (Figure 10a). Indirectly, this shows that a larger proportion of the magnitude of a PCN’s average path length is due to SE. 28 Mean Path Length 24 pcn randLE randSE randAll 20 16 12 8 4 0 0 200 400 600 800 1000 1200 1400 1600 1800 Nodes 44 40 36 32 28 24 20 16 12 8 4 0 pcn randLE randSE randAll 1mjc 1ten 2acy 1ayc 1CD8 1e86 1eif 1h7i 1bj7 1gm6 1wba 1eyl 1fap 1hro 256b 1arb 1urn 1j8m 1beb 1b7f 1agd 1g4t 1bmt 1ce7 2AAI 1bf5 1dar 1rpx 1bih 1b8a 1CVJ 3kbp Maximum Path Length Figure 10a Effect of randomizing links on the average path lengths of GH64 PCNs. randSE has a stronger effect than randLE. GH64 Proteins Figure 10b Effect of randomizing links on the diameters of GH64 PCNs. randSE has a stronger effect than randLE. Randomization of links also reveals that it is possible to rearrange the links of a PCN so that the average path length is significantly reduced. Thus the question: if short inter-nodal distances are important for protein folding, why aren’t the average path lengths of PCNs shorter than they are? 18 S. Khor 12/5/2010 Preserving high clustering and positive assortativity (if they are important for protein folding) is not an adequate answer since it is still possible to maintain clustering and positive assortativity at levels higher than would be in random graphs, while significantly reducing the average path lengths of PCNs by randomizing the long-range links (randLE). We investigate this question elsewhere and find evidence showing that randLE can be less conducive to search than PCN (manuscript submitted). 9. Power-laws in PCNs In the more recent history of the science of complex networks, power-law distribution or the lack of scale is often associated with the node degree variable. We have already touched upon this in section 5 in relation to PCNs. In this section we offer two other (non-node degree) places in PCNs where power-law distribution can be found. The first resides across proteins (PCNs) in the relationship between nodes and link density. This derives directly from the mean node degree constant, K (Figure 4a). The second resides within individual PCNs in terms of the distribution of link sequence distances. 9.1 Link Density Distribution across PCNs Figure 11 (left) is the link density plot in Figure 3c on a log-log scale, and Figure 11 (right) is a similar plot for Figure A3 in Appendix A. Both show clear power-law relationships, but with an atypical exponent of -1. Number of links, M = K N / 2 where K is mean average node degree and N is number of nodes. Link density = (2 M) / [N (N-1)] ≈ K / N. Empirical data tells us that K = 8 (section 5). 1.000 1.000 10 100 1000 0.100 0.010 1 10000 Link Density Link Density 1 10 100 1000 10000 0.100 0.010 PCN Links (< 7A) PCN Links (< 7A) 8/N 8/N 0.001 0.001 Nodes (EVA132) Nodes (GH64) Figure 11 Links density plots on logarithmic scales. 9.2 Link Sequence Distance Distribution for a PCN Figure 12a summarizes the link sequence distance for PCNs in GH64. Sequence distance is the absolute distance of a link on the protein sequence (section 4). Minimum sequence distance for all PCNs is 1. We find for N < 4000, the mean link sequence distance generally increases with protein size as a consequence of being pulled up by the maximum link sequence distance which generally increases with protein size. However, the median link sequence distance remains fairly constant with protein size and 19 S. Khor 12/5/2010 well below the average link sequence distance per PCN. Similar observations are made for PCNs in the EVA132 dataset (Figure A8). These summary statistics hint at a non-Gaussian distribution for link sequence distances. The link sequence distance distributions for four proteins on a log-log scale can be seen in Figures 12b and 13a. There is a straight line region with a negative slope and a sharp cut-off point in each plot, revealing traces of a power-law. Taking the maximum link sequence distance as a fraction of the number of nodes per PCN reveals that on average, links have a maximum span of about 0.7 N (Figures 12c and 13b). Link Sequence Distance 160 Avg. 140 Std. dev. 120 Median 100 80 60 40 20 0 0 200 400 600 800 1000 1200 1400 1600 1800 1200 1400 1600 1800 Nodes Link Sequence Distance 1600 Max 1400 1200 1000 800 600 400 200 0 0 200 400 600 800 1000 Nodes Figure 12a Link sequence distance summary statistics for GH64 PCNs indicate right skewed distributions for link sequence distance. 20 12/5/2010 Reversed Cumulative Probability S. Khor 1 0.1 0.01 1aep 1agd 0.001 1psd 1CVJ 0.0001 1 10 100 1000 Link Sequence Distance Figure 12b Link sequence distance distributions for 4 GH64 PCNs on logarithmic scales. 1.2 MaxLinkSeqDist/N 1.0 0.8 0.6 0.4 0.2 0.0 0 200 400 600 800 1000 1200 1400 1600 1800 Nodes Figure 12c Maximum link sequence distance as a fraction of the number of nodes in a PCN. MaxLinkSeqDist/N averages at 0.7874 ± 0.1402 for GH64. Reversed Cumulative Probability 1.0000 0.1000 0.0100 1fp3 1S5L 0.0010 1m32 1sw6 0.0001 1 10 100 1000 Link Sequence Distance 10000 Figure 13a Link sequence distance distributions for 4 EVA132 PCNs on logarithmic scales. 21 S. Khor 12/5/2010 1.2 MaxLinkSeqDist/N 1.0 0.8 0.6 0.4 0.2 0.0 0 800 1600 2400 3200 4000 4800 5600 6400 Nodes Figure 13b Maximum link sequence distance as a fraction of the number of nodes in a PCN. MaxLinkSeqDist/N averages at 0.7068 ± 0.1860 for EVA132. 10. A Dynamic View In this section, we study the effects of adding long-range links to a PCN already containing shortrange links. We assume links are independent of each other and that links of a shorter sequence distance form before links of a longer sequence distance. Long-range links are added one at a time, and in order of non-decreasing link sequence distance, and we do not pay attention to the order of links having the same sequence distance but use random selection instead. This is admittedly a crude way of simulating the folding process of a protein, but it captures its essence. We monitor the change over time of two network characteristics: node betweeness and average path length. Based on the literature surveyed, we expect a number of nodes to exhibit distinctively higher node betweeness, and we expect the average path length to decrease over time. That average path length will decrease is a given (although occasional small increases is possible), but what is more interesting and pertinent is the way the general decrease happens. Betweeness of a node is a measure of the node’s centrality, or importance in terms of path traversal between nodes in a network. More specifically, the betweeness of a node is the fraction of shortest paths found between all node pairs that pass through the node. In an effort to identify amino acids that play a key role in a protein’s folding process, Vendruscolo et al (2002) observed that key residues often exhibit significantly higher node betweeness in a protein’s transition state. However, this signal attenuates as a protein reaches its native state (due to compactness). Hence, looking at node betweeness in a protein’s native state PCN is more likely to produce false positives of a protein’s nucleation sites. Nonetheless, a topological (network structure) understanding of the protein folding process may help us understand how a protein’s unique native conformation is chosen (Vendruscolo et al 2002). Dokholyan et al (2002) used topological characteristics of protein conformation graphs (PCN) to distinguish conformations belonging to a protein’s transition state ensemble (TSE) that will cross the 22 S. Khor 12/5/2010 energy barrier and reach the protein’s native state versus those that will not. They found that posttransition conformations (TSE conformations which have their nucleus formed and are more likely to reach the native state) are more small-world like than pre-transitions conformations (TSE conformations which have not formed their nucleus and are less likely to reach the native state) in the sense that the average path length of post-transition conformation graphs (PCN) is significantly shorter than the average path length of pre-transition PCNs. In other words, there is a tightening of the small-world structure of proteins as they approach their native conformations (become more compact). Figure 14a shows that as the 1agd protein “folds” (using the scheme described above), average node betweeness decreases slightly, but experiences a phase transition just after t=350, resulting in a sudden and substantial increase in average node betweeness accompanied also by an increase in node betweeness standard deviation, and a distinct shortening of average path length (Figure 14c). Both the median and the maximum node betweeness also register sudden and substantial increases at the same point in time (Figure 14b). These effects indicate a wider dispersion of node betweeness values amongst the nodes with some nodes exhibiting much higher node betweeness as observed in (Vendruscolo et al 2002). In Figure 15a, we compare the distribution of node betweeness for 1agd at three points in time: before the transition point (t=250), around the transition point (t=355) and at the end of the folding process (t=482). All three plots are highly right-skewed (the use of a log-log plot helps with visualization). Limiting the comparison to the three points in time, we find a definite widening of node betweeness distribution from t=250 to t=355, followed by a narrowing of node betweeness distribution from t=355 to t=482 (the tail of the plot swishes to the right then to the left). Betweeness of nodes become more evenly spread out amongst nodes in 1agd’s native state. However, the folding dynamics of 1aep shows a more subtle transition (Figure 14 right). At around the transition point (t=29) where average path length shortens at a faster rate (Figure 14f), there is no sudden or substantial increase in average node betweeness (Figure 14d) and maximum node betweeness is actually dipping rapidly (Figure 14e). But there is a spike in median node betweeness (Figure 14e). These effects are not indicative of a widening then narrowing range of node betweeness values (Figure 15b), but a convergence of some kind (average and median values get closer to each other in both 1aep and 1agd). It appears that as with 1agd, betweeness of nodes become more evenly spread out amongst nodes in 1aep’s native state (and therefore become less indicative of the key residues). Analogous to the idea of crossing an energy barrier in protein folding kinetics, this change in node betweeness could be seen as crossing some kind of communication barrier. Within the nucleation model of protein folding, time prior to the transition point could be regarded as a nucleation growth phase. After the nucleus is formed, the protein polymer becomes committed to its native conformation and quickly reaches it as indicated by the rapid shortening of average path lengths. It would be interesting to investigate this effect further: (i) to test the reliability of median node 23 S. Khor 12/5/2010 betweeness as an indicator of a nucleation event in protein folding, and (ii) to monitor the nucleation rates for proteins of different fold types and sizes to see whether there are constants or specific 0.14 0.12 0.10 0.08 0.06 0.04 0.02 0.00 -0.02 -0.04 -0.06 (a) 0.25 avg median Node Betweeness (d) 0.20 avg 0.15 median 0.10 0.05 0.00 -0.05 -0.10 0 50 0 100 150 200 250 300 350 400 450 500 10 20 30 0.006 max 0.005 0.004 0.003 0.002 0.001 0 0 70 0.60 (e) 0.025 0.50 0.020 0.40 0.015 0.30 0.010 0.20 median 0.005 0.10 max 0.000 50 100 150 200 250 300 350 400 450 0.00 0 10 20 Time 30 40 50 60 Time 6.5 (c) 20 Shortest Path Length 25 Shortest Path Length 60 0.030 Median median 0.50 0.45 0.40 0.35 0.30 0.25 0.20 0.15 0.10 0.05 0.00 Maxim um Median 0.007 (b) 50 Time Time 0.008 40 Maxim um Nodes Betweeness relationships. hpl 15 10 5 0 (f) 6.0 hpl 5.5 5.0 4.5 4.0 3.5 3.0 0 50 100 150 200 250 300 350 400 450 500 Time 0 10 20 30 40 50 60 70 Time Figure 14 Left: plots for 1agd. Right: plots for 1aep. Each time step marks the addition of a longrange link to the PCN. At time=0, the PCN only has short-range links. (a) and (d): Average node betweeness ± standard deviation. Median node betweeness lie below average values throughout. (b) and (e): Median and maximum node betweeness values. (c) and (f): Average path length measured using the harmonic mean method (Newman, 2003) to allow for possibility of disconnected PCNs. hpl is more reliable than apl when dealing with disconnected networks, e.g. 1agd (Figure 16). 24 S. Khor 12/5/2010 Reversed Cumulative Probability 1.000 0.100 1agd 0.010 t=250 t=355 t=482 0.001 0.0001 0.001 0.01 0.1 1 Node Betweeness Reversed Cumulative Probability Figure 15a Distribution of node betweeness for 1agd at three points in time: 250, 355 and 482, on logarithmic scales. The tail ends of the plots swishes to the right then to the left. 1.000 0.100 1aep 0.010 t=15 t=29 t=62 0.001 0.0001 0.001 0.01 0.1 1 Node Betweeness Figure 15b Distribution of node betweeness for 1aep at three points in time: 15, 29 and 62, on logarithmic scales. The tail ends of the plots swishes only in one direction, towards the left. For comparison, Figures 16 and 17 show how average path length changes if long-range links are added in random order, i.e. not added in order of non-decreasing sequence distance. For both proteins, the drop in average path length occurs earlier when long-range links are added in random order, than when long-range links are added in order of non-decreasing link sequence distance order. This kind of decrease is similar to that observed in Figure 18 (section 11). Hence protein folding is a specific rewiring process (Dokholyan et al 2002). 25 12/5/2010 350 300 Link Sequence Distance Link Sequence Distance S. Khor 1agd 250 200 150 100 50 0 0 350 300 250 200 150 100 50 0 50 100 150 200 250 300 350 400 450 500 0 Time Time 25 hpl 20 Shortest Path Length Shortest Path Length 25 15 10 5 0 hpl 20 15 10 5 0 0 50 100 150 200 250 300 350 400 450 500 0 Time 50 45 40 35 30 25 20 15 10 5 0 apl 0 50 100 150 200 250 300 350 400 450 500 Time S hortest Path Length Shortest Path Length 50 100 150 200 250 300 350 400 450 500 50 100 150 200 250 300 350 400 450 500 Time 50 45 40 35 30 25 20 15 10 5 0 apl 0 50 100 150 200 250 300 350 400 450 500 Time Figure 16 Behavior of average path length as long-range links for 1agd are added in nondecreasing order (left) versus in random order (right). 26 12/5/2010 140 Link Sequence Distance Link Sequence Distance S. Khor 1aep 120 100 80 60 40 20 0 0 10 20 30 40 50 60 140 120 100 80 60 40 20 0 70 0 10 20 Time 50 60 70 6.5 Shortest Path Length Shortest Path Length 40 Time 6.5 hpl 6.0 5.5 5.0 4.5 4.0 3.5 3.0 hpl 6.0 5.5 5.0 4.5 4.0 3.5 3.0 0 10 20 30 40 50 60 70 0 10 20 Time 30 40 50 60 70 Time 25 Shortest Path Length 25 Shortest Path Length 30 apl 20 15 10 5 0 apl 20 15 10 5 0 0 10 20 30 40 50 60 70 Time 0 10 20 30 40 50 60 70 Time Figure 17 Behavior of average path length as long-range links for 1aep are added in nondecreasing order (left) versus in random order (right). 11. A Network Approach to Protein Folding From a network perspective, the protein folding problem boils down to generating the right set of links between amino acid residues of a protein. While many network characteristics of PCNs have been discovered over the past decade, there is less (published) effort to integrate this knowledge into a single model and use it for the protein folding problem. Perhaps this is due to the current difficulty of creating networks to simultaneously fit a number of static and dynamic structural characteristics, still incomplete description of PCNs, the very specific and diverse arrangement of links in PCNs, and/or even the 27 S. Khor 12/5/2010 relative success of knowledge-based protein structure prediction methods. In this section, we outline an approach to protein folding that uses several of the network structural characteristics of PCNs mentioned in this paper. This model is still in its infancy, but we hope that it is a good first step in realizing a network approach to protein folding ab initio, or at least put to rest naïve conceptions of PCN models. The model begins with short-range links arranged on a linear lattice with N nodes. We use Lattice6 with N nodes, i.e. each node has 3 nearest neighbours to its left and to its right where possible. This gives approximately V V  N −  links, or ≈ 3N when V=6. Since we found in section 4 that |SE| ≈ 0.7 M 2 2 and M = 4 N, V=6 gives an empirically reasonable number of short-range links to start with. Long-range links are then added to the lattice. The endpoints of a long-range link is selected uniformly at random from the set of nodes such that the absolute distance between them are within [10, 0.7 N] (section 9.2). We made two independent runs, and set N to 385. The statistics we monitored are link sequence distance distribution, node degree distribution, average path length, clustering, and assortativity. Figure 18 (specifically plots lin_11 and lin_12) present the results of our experiment with the model. The results are compared with statistics from the 1agd PCN, and runs made with the model on a ring topology (plots ring_11 and ring_12). For the experiments on a ring topology, the initial lattice is still linear, but long-range links are added as if the lattice is a ring. Results from both topologies showed no significant differences in that both failed to approximate the statistics for 1agd. Sorting the links generated by the model (plots slin_11 and slin_12) did not help to narrow this gap, although some difference in average path length behavior is observed (the initial descend is slower). 11.1 The problem of identifying LE_nodes: some pitfalls What our model lacks, amongst other elements, is a reliable way to identify the endpoints of longrange links, or the set of LE_nodes. The last observation in section 5 (Figure 6c) implies that for the most part, long-range links (LE) more so than short-range links (SE) connect nodes with many contacts in a PCN. At this point, given the assortative nature of PCNs (section 7) and the frequent description of proteins with their domains or modules, and protein folding as a strict process from secondary to tertiary structures and beyond (see Gō 1983 for a messier view), it may be tempting to picture long-range links connecting hub nodes, i.e. nodes of high degree. However, this picture may not be entirely accurate for two possibly related reasons. First, for PCNs of proteins in their native state, hubs do not necessarily occupy a central position (section 10). The correlation between node degree and node betweeness rapidly declines as protein size increases (Figure 19, Appendix B). This implies that many shortest paths in a PCN do not go through 28 S. Khor 12/5/2010 hub nodes, and since long-range links provide important short-cuts links in PCNs, it is contradictory to Reversed Cumulative Probability think of long- range links connecting hub nodes. 1.000 0.100 0.010 ring_11 ring_12 lin_11 lin_12 0.001 1agd 0.000 1 10 100 1000 Link Sequence Distance 0.30 25 ring_11 ring_12 lin_11 lin_12 1agd 0.20 0.15 20 15 0.10 10 0.05 5 0.00 0 2 4 6 8 10 12 14 0 16 0 Degree 50 100 150 200 250 300 350 400 450 500 Time 0.7 0.5 0.6 ring_11 ring_12 lin_11 lin_12 slin_11 slin_12 0.4 0.5 Asso rtativity C lu sterin g C o efficien t ring_11 ring_12 lin_11 lin_12 1agd slin_11 slin_12 HP L P robability 0.25 0.4 ring_11 ring_12 lin_11 lin_12 slin_11 slin_12 0.3 0.2 0.1 0.3 0.2 0.1 0.0 0.0 0 50 100 150 200 250 300 350 400 450 500 Time 0 50 100 150 200 250 300 350 400 450 500 Time Figure 18 Results from a network approach to protein folding compared with the network statistics of the PCN for 1agd which is of the same size. The PCN for 1agd has a clustering coefficient of 0.5397, an assortativity value of 0.3037, and about 72% of its nodes are endpoints of long-range links. In the model, for both ring and linear topology, about 91% of nodes are in LE_nodes. 29 12/5/2010 1.0 1.0 0.8 0.8 H ierarc h y D eg ree-Cen trality Co rrelatio n S. Khor 0.6 0.4 0.2 0.6 0.4 0.2 0.0 0.0 0 200 400 600 800 1000 1200 1400 1600 1800 0 200 400 600 800 1000 1200 1400 1600 1800 Nodes Nodes Figure 19 (Left) Pearson’s correlation between node degree and centrality for GH64 PCNs. (Right) Gao’s hierarchy index for GH64 PCNs. Further, and as a possible consequence also, PCNs actually show declining hierarchical structure with increases in protein size (Figure 19). Following Trusina et al (2004), hierarchical organization is gauged with the formulae in (Gao 2001) which defines a hierarchical path as one with that satisfies one of the following conditions: monotonically increasing then monotonically decreasing node degree, monotonically increasing node degree, or monotonically decreasing node degree. A network where a high fraction of its shortest paths are also hierarchical paths will have a hierarchical index close to 1.0, signaling pronounced hierarchical organization. However, declining average clustering levels with increases in node degree has also been used to detect hierarchical organization (Ravasz et al 2002; Ravasz and Barabasi 2003). Using this method, Aftabuddin and Kundu (2006) report evidence of hierarchical structure for their weighted PCN, which is similar to the Greene and Higman (2003) PCN. We also observe hierarchical tendencies in the four randomly chosen GH64 PCNs (Figure B3). Evidently, there is some reconciliation to be performed between the two measures of hierarchy. Second, there is evidence (depending on the scale used) of a positive correlation between node degree and hydrophobicity (Alves and Martinez 2007; Aftabuddin and Kundu 2007) which implies that hub nodes in PCNs tend to be hydrophobic. Hydrophobic residues shun water molecules and generally lie in the core of a protein. As a result, these residues come into close proximity with many other residues, and thus gain their hub status. The relationship(s) between hydrophobicity, high node degree, assortativity and average path length needs further study, keeping in mind that the relationship(s) may differ for transition versus native state proteins. 12. Summary and Outlook Our main objective with this review paper is to integrate the many network characteristics of PCNs which have been reported in the literature, and to understand their respective roles and also the interplay between them. An attempt to apply the statistics to a network approach of protein folding was also 30 S. Khor 12/5/2010 made. In addition, we considered the dynamic aspects of PCNs, i.e. how their network statistics change as a protein folds. Our model is woefully simple, but we hope it provides good hints for building better models and integrating the dynamic and static aspects of PCNs. One can easily imagine several ways to modify the model by adding more constraints, e.g. restrict the set of LE_nodes to 0.6 N (section 5), use some kind of preferential selection mechanism to fit to the link sequence distance distribution (section 9) and node degree distribution (section 5). The model could also be extended to include link deletion and/or rewiring (Dokholyan et al 2002 observed changes in node degrees between post- and pretransition states). It may also be interesting to extend the approach in section 11 to investigate how the dynamics of PCNs couples with the conformational landscape (Scala et al 2001; Doye 2002; Kovacs et al 2005; Auer et al 2007). Studies show that it is not only important for a protein to arrive at its final destination, a.k.a. its native state, but how it gets there, its journey or folding pathway(s), is also important (Chen et al 2008). In light of the exposition in this paper, a network approach may be the vehicle to address key aspects of the protein folding problem in an integrated way: the existence of a unique native structure, folding pathway(s) in conformation space to the native structure, protein folding rates, and information in an amino acid sequence to propel the attainment of all this. In Table 2, we summarize the network structural statistics mentioned in this paper for PCNs in the GH64 and EVA132 data sets. We find a general agreement, both in qualitative and quantitative terms, between the observed network structural characteristics of these two data sets, and with those reported in literature. On this topic, there are of course other existing network characteristics and measurements, and other ways of constructing PCNs, that can and need to be explored. However it could also be useful to go further, and devise measures geared towards capturing the specific linkage patterns of PCNs. Table 2 Summary of quantitative values: mean ± standard deviation reported. Section Statistic GH64 EVA132 |LE|/M 0.2929 0.2611 4 Fraction of links in LE (links with sequence distance > 9) ± 0.0834 ± 0.0986 K 7.9696 7.9147 5 Average node degree ± 0.3126 ± 0.4300 |SE_nodes|/N 0.9970 1.0000 5 Fraction of nodes which are endpoints to links in SE ± 0.0039 ± 0.0004 |LE_nodes|/N 0.6659 0.6348 5 Fraction of nodes which are endpoints to links in LE ± 0.1093 ± 0.1367 0.5484 0.5538 6 Clustering ± 0.0233 ± 0.0292 0.3387 0.3457 7 Assortativity ± 0.0536 ± 0.0743 0.7874 0.7068 9.2 (Maximum Link Sequence Distance) / N ± 0.1402 ± 0.1860 31 S. Khor 12/5/2010 Throughout this paper, we have maintained a separation of short-range (SE) and long-range (LE) links. We did this to better understand their respective contributions to structural characteristics of PCNs. But ultimately, the prize is to predict the long-range links of PCNs to within a level of accuracy. Notwithstanding the physical, chemical and geometrical constraints, this is a challenging combinatorial task. Even if we could identify LE_nodes accurately, the probability that a link chosen at random from the set of all possible links with endpoints in LE_nodes is about 6/N (this includes links with sequence distances less than 10 or some LE_TH). Hence a pure network model of protein folding, like the one we attempted in section 11, is unlikely to be a winner. A more likely model could be one that incorporates multiple approaches. Given the importance of short inter-node distances between residues (section 8), the sparseness of long-range links in PCNs could appear paradoxical. However, our model does show that in general, it only takes a few long-range links to reduce the average path length significantly, and to levels that is not improved upon by further addition of long-range links (Figure 18). According to Ngo and Marks (1992), long-range links (non-local interactions) actually increases the computational complexity of the protein folding problem (see also Ngo et al 1994). Thus, if a few well-placed long-range links is sufficient to reduce the average path length to a good enough level, this “least effort” (albeit, it could have taken evolution quite some time to figure the optimal wirings) strategy may well be adopted by proteins as a way out of the paradox. References Aftabuddin, Md., and Kundu, S. (2006) Weighted and Unweighted Network of Amino Acids within Protein. Physica A 396(2), pp. 895-904. Aftabuddin, Md., and Kundu, S. (2007) Hydrophobic, Hydrophilic and Charged Amino Acids’ Network within Protein. Biophysical Journal 93(1), pp. 225-231. Alm, E., and Baker, D. (1999) Matching Theory and Experiment in Protein Folding. Curr. Opin. Struc. Biol. 9, pp. 189-196. Alves, N.A., and Martinez, A. S. (2007) Inferring topological features of proteins from amino acid residue networks. Physica A 375, pp. 336-344. Anfinsen, C.B. (1973) Principles that Govern the Folding of Protein Chains. Science 181, pp. 223-230. Atilgan, A.R., Akan, P., and Baysal, C. (2004) Small-world Communication of Residues and Significance for Protein Dynamics. Biophysics Journal 86, pp. 85-91. Auer, S., Miller, M.A., Krivov, S.V., Dobson, C.M., Karplus, M. and Vendruscolo, M. (2007) Importance of Metastable States in the Free Energy Landscapes of Polypeptide Chains. Physical Review Letters 99, 178104. Bagler, G., and Sinha, S. (2005) Network Properties of Protein Structures. Physica A: Statistics Mechanics and its Apps. 346(1-2), pp. 27-33. Bagler, G., and Sinha, S. (2007) Assortative Mixing in Protein Contact Networks and Protein Folding Kinetics. Structural Bioinformatics 23(14), pp. 1760-1767. Bartoli, L., Fariselli, P., and Casadio, R. (2007) The Effect of Backbone on the Small-world Properties of Protein Contact Networks. Physical Biology 4, pp. L1-L5. Berman, H.M., Westbrook, J., Feng, Z., Gilliland, G., Bhat, T.N., Weissig, H., Shindyalov, I.N., and Bourne, P.E. (2000) The Protein Data Bank. Nucleic Acids Research 28, pp. 235-242. http://www.rcsb.org/pdb Brede, M., and Sinha S. (2005) Assortative Mixing by Degree Makes a Network More Unstable. arXiv:condmat/0507710v1 32 S. Khor 12/5/2010 Chen, Y., Ding, F., Nie, H., Serohijos, A.W., Sharma, S., Wilcox, K.C., Yin, S., and Dokholyan, N.V. (2008) Protein Folding: Then and Now. Archives of Biochemistry and Biophysics 469, pp. 4 -19. Del Sol, A., Fujihashi, H., Amoros, D., and Nussinov, R. (2006) Residues Crucial for Maintaining Short Paths in Network Communication Mediate Signaling in Proteins. Molecular Systems Biology 2. Dokholyan, N.V., Li, L., Ding, F., and Shakhnovich, E.I. (2002) Topological Determinants of Protein Folding. PNAS 99(13), pp. 8637-8641. Doye, J.P.K. (2002) The Network Topology of a Potential Energy Landscape: A Static Scale-Free Network. Physical Review Letters 88, 238701. Gaci, O., and Balev, S. (2009) Node Degree Distribution in Amino Acid Interaction Networks. In: Proc. Computational Structural Bioinformatics Workshop, Washington D.C. USA. Gao, L (2001) On inferring autonomous system relationships in the Internet. IEEE/ACM Transactions on Networking 9: 733-745. Gō, N. (1983) Theoretical Studies of Protein Folding. Ann. Rev. Biophys. Bioeng. 12, pp. 183-210. Greene, L.H., and Higman, V.A. (2003) Uncovering Network Systems within Protein Structures. Journal of Molecular Biology 334, pp. 781-791. Kabsch, W., and Sander, C. (1983) Dictionary of Protein Secondary Structure: Pattern Recognition of Hydrogenbonded and Geometrical Features. Biopolymers 22(12), pp. 2577-2637. http://swift/cmbi.ru.nl/gv/dssp Karplus, M. (1997) The Levinthal Paradox: Yesterday and Today. Folding & Design 2, pp. S69-S75. Kleinberg, J. (2000) Navigation in a Small World. Nature 406, 845 Kovacs, I.A., Szalay, M.S. and Csermely, P. (2005) Water and Molecular Chaperones Act as Weak Links of Protein Folding Networks: Energy Landscape and Punctuated Equilibrium Changes Point towards a Game Theory of Proteins. FEBS Letters 579(11), pp. 2254-2260. Levinthal, C. (1969) How to Fold Graciously. In: Debrunner, J.T.P., and Munck, E. (eds.) Mossbauer Spectroscopy in Biological Systems: Proceedings of a Meeting held at Allerton House. Monticello, Illinois. University of Illinois Press, pp. 22-24. Maslov, S., and Sneppen, K. (2002) Specificity and Stability in Topology of Protein Networks. Science 296 pp. 910-913. Murzin, A.G., Brenner, S.E., Hubbard, T., and Chothia, C. (1995) SCOP: A Structural Classification of Proteins Database for the Investigation of Sequences and Structures. J. Mol. Biol. 247, pp. 536-540. http://scop.mrclmb.cam.ac.uk/scop Newman, M.E.J. (2002) Assortative Mixing in Networks. Physical Review Letters 89, 208701. Newman, M.E.J. (2003) The Structure and Function of Complex Networks. SIAM Review 45, pp. 167-256. Ngo, J.T. and Marks, J. (1992) Computational Complexity of a Problem in Molecular-Structure Prediction. Protein Engineering 5(4), pp.313-321. Ngo, J.T., Marks, J., and Karplus, M. (1994) Computational Complexity, Protein Structure Prediction and the Levinthal Paradox. In: Merz K. Jr. and Le Grand, S. (eds.) The Protein Folding Problem and Tertiary Structure Prediction, pp. 435 – 508, Birkhauser, Boston MA. Pastor-Satorras, R., Vazquez, A., and Vespignani, A. (2001) Dynamical and Correlation Properties of the Internet. Physical Review Letters 87, 258701-1-4. Ravasz, E., Somera, A.L., Mongru, D.A., Oltvai, Z.N. and Barabasi, A.-L. (2002) Hierarchical Organization of Modularity in Metabolic Networks. Science 297, pp. 1551-1555. Ravasz, E., and Barabasi, A.-L. (2003) Hierarchical Organization In Complex Networks. Physical Review E 67, 026112. Rost, B. (1999) Twilight Zone of Protein Sequence Alignments. Protein Engineering 12(2), pp. 85-94. http://cubic.bioc.columbia.edu/ava/res/unique_list.html (Sep 23 2010). Scala, A., Amaral, L.A.N., and Barthélémy, M. (2001) Small-world Networks and the Conformation Space of a Lattice Polymer Chain. Europhysics Letters 55(4), 594 Tanaka, S. and Scheraga, H.A. (1977) Model of Protein Folding: Incorporation of a one-dimensional short-range (Ising) model into a three-dimensional model. Proc. Natl. Acad. Sci. USA 74(4), pp. 1320-1323. Taverna, D.M. and Goldstein, R.A. (2002) Why are Proteins Marginally Stable. Proteins 46, pp. 105-109. Tramontano, A. (2006) Protein Structure Prediction:Concepts and Applications. Wiley-VCH Verlag GmbH &Co. Trusina, A., Maslov, S., Minnhagen, P., and K. Sneppen. (2004) Hierarchy measures in complex networks. Physical Review Letters 92, 178702. Vazquez, A., and Moreno, Y. (2003) Resilience to damage of graphs with degree correlation. Physical Review E 33 S. Khor 12/5/2010 67, 015101-1-4(R). Vendruscolo, M., Dokholyan, N.V., Paci, E., and Karplus, M. (2002) Small-world View of the Amino Acids that Play a Key Role in Protein Folding. Physical Review E 65, 061910-1-4. Watts, D.J., and Strogatz, S.H. (1998) Collective Dynamics of ‘small-world’ Networks. Nature 393, pp. 440-442. Watts, D.J. (1999) Small Worlds: The Dynamics of Networks between Order and Randomness. Princeton University Press, Princeton, NJ. Zwanzig, R., Szabo A., and Bagchi, B. (1992) Levinthal’s Paradox. Proc. Natl. Acad. Sci. USA 89, pp. 20-22. Appendix A. The EVA132 Protein Dataset The EVA132 protein dataset was extracted from the list of 3477 unique chains archived by EVA (Rost, 1999). 200 proteins were selected at random from this list, with no overlap with GH64. PCNs for the proteins in EVA132 were constructed and selected in the manner as described in sections 2 and 3, producing 132 valid PCNs (listed in Table A1) for us to work with. Table A1. PID of proteins in the EVA132 dataset 7000 6000 5000 4000 3000 2000 1000 0 1dfe 1ctf 1apc 1AX8 1iko 1grj 1awp 1ylx 1mfq 1o9g 1sml 1e8o 2aql 1btk 1hh2 1a59 1h3e 1bkj 1fgg 1rhz 1adu 1e3h 2fmt 1a5k 1aoi 1upt 1ee4 2bpt 1eo8 1e6e 1knz 1m3 1h6d Number of Residues (Nodes) 1dfe, 1bi6, 1a7i, 2ezh, 1ctf, 1cfw, 1tif, 1gh5, 1apc, 1cto, 1by2, 1d0d, 1AX8, 1gak, 1jgs, 1j74, 1iko, 2a1j, 1ECY, 1af3, 1grj, 1f8a, 1lf7, 1faj, 1awp, 1qhn, 1r5p, 1CZ4, 1ylx, 1j77, 1bwp, 1lkv, 1mfq, 1jfx, 1hek, 1gy5, 1o9g, 1e7k, 1F9Z, 1awc, 1sml, 1boo, 1tfr, 1ltq, 1e8o, 1pvl, 1bob, 1sbp, 2aql, 1xiz, 1pnf, 1fkm, 1btk, 1c28, 1nrj, 1e6c, 1hh2, 1dpt, 1g2q, 1a1r, 1a59, 1f45, 1i5e, 1esg, 1h3e, 1wdu, 1i85, 1gk4, 1bkj, 1dj8, 1oft, 1jzt, 1fgg, 1rh5, 1sw6, 1bfd, 1rhz, 1b44, 1g7r, 1aui, 1adu, 1h7z, 1zrl, 1dhp, 1e3h, 1ojh, 1bp7, 1kke, 2fmt, 1K3I, 1bwd, 1d8d, 1a5k, 1bih, 1bev, 1fp3, 1aoi, 1tmf, 1l1o, 1KQ4, 1upt, 1h4l, 1ngw, 1b4u, 1ee4, 1a2z, 1eqz, 1jct, 2bpt, 1e8t, 1zhq, 1ewt, 1eo8, 1eum, 1g2c, 1fp7, 1e6e, 1l8w, 1ndb, 1g8m, 1knz, 1gg1, 1b37, 1bcp, 1m32, 1fz6, 1jb0, 1hqm, 1h6d, 1S5L, 1mjg, 1M34 EVA132 Proteins Figure A1 Size of EVA132 PCNs in terms of the number of Cα atoms documented their PDB files. 34 S. Khor 12/5/2010 30000 PCN Links (< 7A) 25000 Count 20000 15000 10000 5000 0 0 1000 2000 3000 4000 5000 6000 7000 Nodes Link Density Figure A2 Link count M, by protein size for EVA132 proteins. 0.20 0.18 0.16 0.14 0.12 0.10 0.08 0.06 0.04 0.02 0.00 PCN Links (< 7A) 0 1000 2000 3000 4000 5000 6000 Nodes Figure A3 Link density by protein size for EVA132 proteins. Link Count 20000 18000 SE 16000 LE 14000 12000 10000 8000 6000 4000 2000 0 0 800 1600 2400 3200 4000 4800 5600 6400 Nodes Figure A4a Number of short-range (SE) and long-range (LE) links, by protein size for EVA132. The fraction of links in LE is 0.2611 ± 0.0986. The fraction of links in SE is 0.7389 ± 0.0986. 35 S. Khor 12/5/2010 6400 SE 5600 LE Node Count 4800 4000 3200 2400 1600 800 0 0 800 1600 2400 3200 4000 4800 5600 6400 Nodes Figure A4b Number of nodes which are endpoints for links in SE (SE_nodes) and nodes which are endpoint for links in LE (LE_nodes), by protein size for EVA132. The fraction of nodes in LE_nodes is 0.6348 ± 0.1367.The fraction of nodes in SE_nodes is 1.0000 ± 0.0004. SE_nodes SE_ and LE_nodes Proportion of all nodes 1.2 LE_nodes Not in LE_nodes 1.0 0.8 0.6 0.4 0.2 0.0 0 800 1600 2400 3200 4000 4800 5600 6400 Nodes Figure A4c Sizes of different subsets of nodes as a proportion of all nodes for EVA132 PCNs. On average, 0.6347 ± 0.1367 of all nodes are in both SE_nodes and LE_nodes, while 0.3652 ± 0.1367 of all nodes are not in LE_nodes. 36 S. Khor 12/5/2010 18 16 Node Degree 14 12 max 10 mid 8 mean 6 std.dev. 4 min 2 0 0 800 1600 2400 3200 4000 4800 5600 6400 Nodes Figure A5a Node degree summary statistics for EVA132 PCNs. Mean node degree average at 7.9147 with a std. dev. of 0.4300. 0.30 Probability, P(k) 0.25 1sw6 0.20 1fp3 0.15 1m32 0.10 1S5L 0.05 0.00 0 2 4 6 8 10 12 14 16 Degree, k Figure A5b Node degree distributions for four PCNs in the EVA132 dataset. The respective PCNs of 1sw6, 1fp3, 1m32 and 1S5L has 508, 804, 2103 and 5130 nodes respectively. Clustering Coefficient 1.0 0.8 0.6 0.4 0.2 1dfe 1ctf 1apc 1AX8 1iko 1grj 1awp 1ylx 1mfq 1o9g 1sml 1e8o 2aql 1btk 1hh2 1a59 1h3e 1bkj 1fgg 1rhz 1adu 1e3h 2fmt 1a5k 1aoi 1upt 1ee4 2bpt 1eo8 1e6e 1knz 1m3 1h6d 0.0 EVA132 Proteins Figure A6 Clustering coefficients ± standard deviation. Mean is 0.5538 with a std. dev. of 0.0292. 37 S. Khor 12/5/2010 0.8 Assortativity 0.6 0.4 0.2 1dfe 1ctf 1apc 1AX8 1iko 1grj 1awp 1ylx 1mfq 1o9g 1sml 1e8o 2aql 1btk 1hh2 1a59 1h3e 1bkj 1fgg 1rhz 1adu 1e3h 2fmt 1a5k 1aoi 1upt 1ee4 2bpt 1eo8 1e6e 1knz 1m3 1h6d 0.0 EVA132 Proteins Figure A7 Assortativity values. Mean is 0.3457 with a std. dev. of 0.0743. Link Sequence Distance 300 Avg. 250 Std. dev. Median 200 150 100 50 0 0 800 1600 2400 3200 4000 4800 5600 6400 4000 4800 5600 6400 Nodes Link Sequence Distance 4800 Max 4000 3200 2400 1600 800 0 0 800 1600 2400 3200 Nodes Figure A8 Link sequence distance summary statistics for EVA132 PCNs indicate right skewed distributions for link sequence distance. 38 S. Khor 12/5/2010 Appendix B Additional material for Figure 19 (section 11). Figure B1 Degree-node centrality scatter plots for four GH64 PCNs. Correlation coefficients are given in the table below. Both methods show weakening positive correlation with increase in N. We did not report Spearman’s rho values as their significance could not be computed due to ties. Correlation method 1aep 1agd 1psd 1CVJ Pearson 0.6691 0.3112 0.3010 0.1222 Kendall’s tau 0.5689 0.4661 0.4114 0.3616 All correlation coefficients are significant at the 95% confidence level. 0.10 Average Node Centrality 0.08 0.06 1aep 0.04 1agd 1psd 0.02 1CVJ 0.00 0 2 4 6 8 10 12 14 16 -0.02 -0.04 Degree Figure B2 Node centrality for nodes with degree k are averaged and reported with their standard deviations. The relationship is marginally positive and grows weaker with increase in protein size. The large standard deviations point to wide dispersion in node centrality values, as seen in the scatter plots in Figure B1. 39 S. Khor 12/5/2010 Average Clustering Coefficient 1.2 1.0 0.8 1aep 1agd 0.6 1psd 1CVJ 0.4 0.2 0.0 0 2 4 6 8 10 Degree 12 14 16 Figure B3 Some evidence of hierarchical organization in PCNs. 40
5cs.CE
THE EXISTENCE OF NON-INNER AUTOMORPHISMS OF ORDER p IN FINITE THIN p-GROUPS arXiv:1604.07267v1 [math.GR] 25 Apr 2016 MARCO RUSCITTI AND LEIRE LEGARRETA Abstract. In this paper we study the existence of at least one noninner automorphism of order p of a finite thin p-group, whenever the prime p is. Marco Ruscitti DISIM Università degli studi dell’Aquila 67100 L’Aquila, Italy E-mail address: [email protected] Leire Legarreta Matematika Saila Euskal Herriko Unibertsitatea UPV/EHU 48080 Bilbao, Spain E-mail address: [email protected] 1. Introduction The main goal of this paper is to contribute to the longstanding conjecture of Berkovich posed in 1973, that conjectures that every finite p-group admits a non-inner automorphism of order p, where p denotes a prime number [15, Problem 4.13]. The conjecture has attracted the attention of many mathematicians during the last couple of decades, and has been confirmed for many classes of finite p-groups. It is remarkable to put on record that, in 1965, Liebeck [12] proved the existence of a non-inner automorphism of order p in all finite p-groups of class 2, where p is an odd prime. However, the fact that there always exists a non-inner automorphism of order 2 in all finite 2-groups of class 2 was proved by Abdollahi [1] in 2007. The conjecture was confirmed for finite regular p-groups by Schmid [14] in 1980. Indeed, Deaconescu [8] proved it for all finite p-groups G which are not strongly Frattinian. Moreover, Abdollahi [2] proved it for finite p-groups G such that G/Z(G) is a powerful p-group, and Jamali and Visesh [11] did the same for finite p-groups with cyclic commutator subgroup. In the realm of finite groups, quite recently, the result has been confirmed for semi-abelian p-groups by Benmoussa and Guerboussa [5], and for p-groups of nilpotency 2010 Mathematics Subject Classification. 20D15, 20D45. Key words and phrases. Finite p-groups, non-inner automorphisms, derivation, thin p-groups. The first author would like to thank the Department of Mathematics at the University of the Basque Country for its excellent hospitality while part of this paper was being written. The second author is supported by the Spanish Government, grants MTM201128229-C02-02 and MTM2014-53810-C2-2-P, and by the Basque Government, grant IT75313 and IT974-16. 1 2 M.RUSCITTI AND L.LEGARRETA class 3, by Abdollahi, Ghoraishi and Wilkens [3]. Finally, Abdollahi et al [4] proved the conjecture for p-groups of coclass 2. With the contribution of this paper we add another class of finite p-groups to the above list, by proving that the above mentioned conjecture holds true for all finite thin p-groups, whenever the prime p is. The organization of the paper is as follows. In Section 2 we exhibit some preliminary facts and tools that will be used in the proof of the main result of the paper, and in Section 3 we recall elementary matters about thin p-groups and we prove the main result as well. Throughout the paper, most of the notation is standard and it can be found, for instance, in [13]. 2. Preliminaries In this section, we recall some facts about derivations in the multiplicative setting, and some related lemmas, which will be useful to prove the main Theorem 3.5 of the paper. The reader could be referred to [10] for more details and explicit proofs about derivations. Definition 2.1. Let G be a group and let M be a right G-module. A derivation δ : G → M is a function such that δ(gh) = δ(g)h δ(h), for all g, h ∈ G. In terms of its properties, it is well-known that a derivation is uniquely determined by its values over a set of generators of G. Let F be a free group generated by a finite subset X and let G = hX : r1 , . . . , rn i be a group whose free presentation is F/R, where R is the normal closure of the set of relations {r1 , . . . , rn } of G. Then a standard argument shows that M is a G-module if and only if M is an F -module on which R acts trivially. Indeed, if we denote by π the canonical homomorphism π : F → G, then the action of F on M is given by mf = mπ(f ), for all m ∈ M and all f ∈ F . Continuing with the same notation, we have the following results. Lemma 2.2. Let M be an F -module. Then every function f : X → M extends in a unique way to a derivation δ : F → M . Lemma 2.3. Let M be a G-module and let δ : G → M be a derivation. Then δ̄ : F → M given by the composition δ(f ) = δ(π(f )) is a derivation such that δ(ri ) = 0 for all i ∈ {1, . . . , n}. Conversely, if δ : F → M is a derivation such that δ(ri ) = 0 for all i ∈ {1, . . . , n}, then δ(f R) = δ(f ) defines, uniquely, a derivation on G = F/R to M such that δ = δ ◦ π. In the following lemma, we study the relationship between derivations and automorphisms of a finite p-group. Lemma 2.4. Let G be a finite p-group and let M be a normal abelian subgroup of G viewed as a G-module. Then for any derivation δ : G → M , we can define uniquely an endomorphism φ of G such that φ(g) = gδ(g) for all g ∈ G. Furthermore, if δ(M ) = 1, then φ is an automorphism of G. In order to reduce some calculations in terms of commutators, we keep in mind the following result. NON-INNER AUTOMORPHISMS OF ORDER p IN FINITE THIN p-GROUPS 3 Lemma 2.5. Let F be a free group, p be a prime number and A be an F -module. If δ : F → A is a derivation then, (i) δ(F p ) = δ(F )p [δ(F ),p−1 F ], (ii) if [A,i F ] = 1, we have δ(γi (F )) ≤ [δ(F ),i−1 F ] for all i ∈ N. p−1 p−2 Proof. Let x ∈ F . We have δ(xp ) = δ(x)x +x +···+1 . Since (x − 1)p−1 ≡ xp−1 + xp−2 + · · · + 1 mod p, the first assertion follows. Now let us prove the second assertion by induction on i. Clearly, the assertion holds when i = 1. Let us suppose, by inductive hypothesis that if [A,k F ] = 1 then δ(γk (F )) ≤ [δ(F ),k−1 F ] for some k ∈ N. Let us take any a ∈ F and any b ∈ γk (F ), and let us suppose that [A,k+1 F ] = 1. Then δ([a, b]) = [δ(a), b][a, δ(b)][a, b, δ(a)][a, b, δ(b)] ∈ [δ(F ),k F ].  3. Berkovich Conjecture for finite thin p-groups To develop the section, we start enumerating some structural properties concerned about thin p-groups. Firstly, let us recall that in a group G an antichain is a set of mutually incomparable elements in the lattice of its normal subgroups. It is well-known that, if G is a p-group of maximal class, then the lattice of its normal subgroups consists of p + 1 maximal subgroups and of the terms of the lower central series of G. Thus, a p-group of maximal class has only one antichain, which consists of its maximal subgroups. The necessity to extend the family of groups of maximal class to a bigger family of p-groups with a bound on the antichains, leads us to introduce the formal definition of thin p-group. Let us introduce the definition of thin p-groups as in [7]. Forwards, we mention as well some already proved results about the existence of non-inner automorphisms of order p in certain specific cases to avoid repetitions. Definition 3.1. Let G be a finite p-group. Then G is thin if every antichain in G contains at most p + 1 elements. The following results about finite thin p-groups are discussed in [6]. Lemma 3.2. Let G be a finite thin p-group, and let p be an odd prime. (i) If N is a normal subgroup of G, then N is a term of the lower central series of G if and only if N is the unique normal subgroup of its order. (ii) If G is not of maximal class, then |G| ≥ p5 and G/γ3 (G) is of exponent p. Lemma 3.3. Let G be a finite thin p-group and let us take any h ∈ γi (G) − γi+1 (G). Then the following called coverty property holds, [h, G]γi+2 (G) = γi+1 (G). Remark 3.4. The properties shown in Lemma 3.2 give us a lot of information about thin p-groups. Since an elementary abelian p-group is thin if and only if its order is p2 (see [7]), then every finite thin p-group is a two generator group. Secondly, by [6] we know that the lower and the upper central series of this kind of groups coincide, and consequently that all quotients of 4 M.RUSCITTI AND L.LEGARRETA these series are elementary abelian p-groups of order at most p2 . Consequently, Z(G) must be cyclic of order p. In particular, the quotients of the lower and upper central of finite thin p-groups have exponent p. Moreover, if G is a finite thin p-group, then Φ(G) = γ2 (G), Z2 (G) ≤ Z(Φ(G)) and the property stated in the above Lemma 3.3 holds equivalently for terms of the upper central series of G. Since Liebeck in [12] proved the existence of at least a non-inner automorphism of order p in all finite p-groups of class 2, where p is an odd prime, Abdollahi in [1] proved the existence of such an non-inner automorphism of order 2 in all finite 2-groups of class 2, and Abdollahi, Ghoraishi and Wilkens in [3] did the same in the case of finite p-groups of nilpotency class 3, in our study, we can deal with finite p-groups of nilpotency class c ≥ 4. On the other hand, since Deaconescu in [8] proved the existence of at least a non-inner automorphism of order p for all finite p-groups G which are not strongly Frattinian, we may assume that the finite thin p-groups G we are interested in, are strongly Frattinian, in other words, that the groups of our interest satisfy CG (Φ(G)) = Z(Φ(G)). As a result due to Abdollahi in [2], we have that if G is a fi nite p-group such that G has no non-inner automorphisms of order p leaving Φ(G) elementwise fixed, then d(Z2 (G)/Z(G)) = d(G)d(Z(G)). Thus, in view of this previous result, in order to prove the existence of a non-inner automorphism of order p in a finite thin p-group G, we may assume without any loss of generality that the condition d(Z2 (G)/Z(G)) = d(G)d(Z(G)) holds. Thus, using the consequences got in Remark 3.4 we have Z2 (G)/Z(G) is isomorphic to an elementary abelian group of order p2 . It is also showed in [9] (see Theorem B) that every finite thin 2-group is a group of maximal class. Thus in the following we focus our attention on finite thin p-groups, where p is an odd prime. Now we are ready to prove the next theorem. Theorem 3.5. Let G be a finite thin p-group, where p is an odd prime. Then G has a non-inner automorphism of order p. Proof. Let us denote c the nilpotency class of G. As it has been said before, we can assume c ≥ 4. From Remark 3.4 and its consequences and assumptions we know that G is a two generator p-group, the lower and the upper central series of G coincide, Φ(G) = γ2 (G), Z2 (G) ≤ Z(Φ(G)), Z(G) ∼ = Cp , d(Z2 (G)/Z(G))) = d(G)d(Z(G)) and Z2 (G)/Z(G) ∼ = Cp × Cp . In particular, [Z2 (G), γ2 (G)] = 1 and Ω1 (Z2 (G)) is an elementary abelian subgroup of G. Indeed, G/γ3 (G) has order p3 , class 2 and by Lemma 3.2 we may assume that its exponent is p, i.e. G/γ3 (G) is an extraspecial p-group of exponent p and order p3 . Our goal is to obtain at least an automorphism of G of order p. Firstly, we define an assignment on generators of the free group generated by two elements sending them to Ω1 (Z2 (G)). By Lemma 2.2 it is possible to extend these assignments to a derivation. Secondly, we show that this map preserves the relations defining the quotient G/γ3 (G), and then we apply Lemma 2.3 to induce a derivation from G/γ3 (G) to Ω1 (Z2 (G)). Finally, we lift this NON-INNER AUTOMORPHISMS OF ORDER p IN FINITE THIN p-GROUPS 5 found map to a derivation from G to Ω1 (Z2 (G)), applying Lemma 2.4. In the following paragraphs we describe in detail each of the mentioned steps. Let x → u, y → v be an assignment on generators x, y of the two generator free group F2 , with u, v ∈ Ω1 (Z2 (G)). By Lemma 2.3 this assignment extends uniquely to a derivation δ : F2 → Ω1 (Z2 (G)) such that δ(x) = u and δ(y) = v. Making perhaps some abuse of notation, we can assume that G/γ3 (G) corresponds to the presentation hx, y | xp , y p , [y, x, x], [y, x, y]i. Now let us see that the equalities δ(xp ) = 1, δ(y p ) = 1, δ([y, x, x]) = 1 and δ([y, x, y]) = 1 hold. To do it, firstly, let us show that δ is trivial on the p-th powers of elements of F2 . In fact, considering π ′ the canonical epimorphism from F2 to G/γ3 (G) we have δ(f p ) = δ(f )f ′ p−1 δ(f p−1 ) = · · · = δ(f )f p−1 +···+1 = δ(f )π (f ) p−1 +···+1 ′ = δ(f )π (f p = δ(f )p [δ(f ), π ′ (f )](2) = 1, p−1 +···+1) = f or all f ∈ F2 . Secondly, let us analyze the behaviour of δ on commutators. Since for any g, h ∈ G it holds that gh = hg[g, h], then applying δ to this previous equality, we get δ(gh) = δ(hg[g, h]) = δ(hg)[g,h] δ([g, h]), and consequently taking also into account that [Z2 (G), γ2 (G)] = 1, we get δ([g, h]) = δ(gh)(δ(hg)[g,h] )−1 = δ(gh)(δ(hg))−1 = [δ(g), h][g, δ(h)], which is an element of Z(G). Moreover, δ([y, x, y]) = [δ([y, x]), y][[y, x], δ(y)] = 1, δ([y, x, x]) = [δ([y, x]), x][[y, x], δ(x)] = 1. (Take into account that the previous two equalities can be obtained as well, applying properly item (ii) of Lemma 2.5.) By Lemma 2.3 we can induce a derivation δ from G/γ3 (G) to Ω1 (Z2 (G)). The map δ′ : G → Ω1 (Z2 (G)) defined by the law δ′ (g) = δ(gγ3 (G)) for all g ∈ G, is a derivation from G to Ω1 (Z2 (G)). By Lemma 2.4, δ′ induces an automorphism φ of G by the law φ(g) = gδ′ (g) for all g ∈ G, leaving, in particular, Φ(G) elementwise fixed. Clearly, Z2 (G) ≤ Z(γ3 (G)). In fact, the previous inclusion holds since Z2 (G) ≤ Z(Φ(G)), Φ(G) = γ2 (G) and Z2 (G) = γc−1 (G) ≤ γ3 (G). This allows us to prove that the automorphism φ has order p. In fact, φp (g) = φp−1 (gδ′ (g)) = φp−1 (g)φp−1 (δ′ (g)) = φp−1 (g)δ′ (g) = φp−2 (gδ′ (g))δ′ (g) = · · · = g(δ′ (g))p = g, for all g ∈ G. Thus, doing this previous construction we produce a set of automorphisms of G of order p, whose size is equal to |Ω1 (Z2 (G))|2 , in other words, whose size is the number of possible choices for the images of the above generators. Now, we distinguish the only two possible cases: Z2 (G) ∼ = Cp × Cp × Cp or Z2 (G) ∼ = Cp2 × Cp . In the former case, when Z2 (G) ∼ = Cp × Cp × Cp , we produce p6 automorphisms of G of order p. However, the number of inner automorphisms of G induced by elements of Z3 (G) is at most p4 . Thus, a counting argument is enough to say that G has a non-inner automorphism of G of order p, and we get the statement of the Theorem in this case. Otherwise, in the latter case, when Z2 (G) ∼ = Cp2 × Cp , choose an assignment x → u, y → v such that u, v ∈ Ω1 (Z2 (G)) − {1}, u is not central, and let φ be the automorphism of G of order p obtained by this assignment. On the other hand, we know that φ is inner if and only if there exists an element hφ of Z3 (G) − Z2 (G) such that hpφ ∈ Z(G), φ(g) = ghφ and δ′ (g) = [g, hφ ], for 6 M.RUSCITTI AND L.LEGARRETA all g ∈ G. Under these circumstances, since Z(G) ≤ Ω1 (Z2 (G)) we would deduce that [hφ , G]Z(G) ≤ Ω1 (Z2 (G)) < Z2 (G), which is in contradiction with the analogous coverty property of Lemma 3.3. Consequently, this second case does not happen and the statement of the Theorem is proved.  4. Acknowledgements The first author would like to thank the Department of Mathematics at the University of the Basque Country for its excellent hospitality while part of this paper was being written; he also wish to thank Professors Gustavo A. Fernández Alcober, Norberto Gavioli and Carlo Maria Scoppola for their suggestions. References [1] A. Abdollahi, Finite p-groups of class 2 have non-inner automorphisms of order p, J. Algebra 312 (2007), 876–879. [2] A. Abdollahi, Powerful p-groups have non-inner automorphism of order p and some cohomology, J. Algebra 323 (2010), 779–789. [3] A. Abdollahi, S. M. Ghoraishi and B. Wilkens, Finite p-groups of class 3 have non-inner automorphisms of order p, Beitr. Algebra Geom. 54 (2013), 363–381. [4] A. Abdollahi, S. M. Ghoraishi, Y. Guerboussa, M. Reguiat and B. Wilkens, Non-inner automorphism of order p for finite p-groups of coclass 2, J. Group Theory 17 (2014), 267–272. [5] M. T. Benmoussa and Y. Guerboussa, Some properties of semi-abelian p-groups, Bull. Austral. Math. Soc. 91 (2015), 86–91. [6] R. Brandl, A. Caranti and C.M. Scoppola, Metabelian thin p-groups, Q. J. Math 43 (1992), 157–173. [7] A. Caranti, S. Mattarei, F. Newman and C.M. Scoppola, Thin groups of prime powerorder and thin Lie algebras, Q. J. Math 47 (1996), 279–296. [8] M. Deaconescu, Non-inner automorphisms of order p of finite p-groups, Journal of Algebra 250 (2002), 283–287. [9] R. brandl, The DIlworth number of subgroup lattices, Arch. Math. 50 (1988), 502–510. [10] N. Gavioli, V. Pannone, Frobenius partitions in extraspecial p-groups Geometriae Dedicata 74 (1999), 313–323. [11] A. R. Jamali and R.Viseh, On the existence of non-inner automorphism of order two in finite 2-groups, Bull. Aust. Math. Soc. 87 (2013), 278–287. [12] H. Liebeck, Outer automorphisms in nilpotent p-groups of class 2, J London Math. Soc. 40 (1965), 268–275. [13] D. J. S. Robinson, A course in the theory of groups, second edition, Springer-Verlag, New York, 1996. [14] P. Schmid, A cohomological property for regular p-groups, Math. Z. 175 (1980), 1–3. [15] Unsolved Problems in Group Theory, The Kourovka Notebook, No. 17, edited by V. D. Mazurov and E. I. Khukhro, Russian Academy of Sciences, Siberian Division, Institute of Mathematics, Novosibirisk, 2010. DISIM, Università degli studi dell’Aquila, 67100 L’Aquila, Italy, E-mail address: [email protected] Matematika Saila, Euskal Herriko Unibertsitatea UPV/EHU, 48080 Bilbao, Spain, E-mail address: [email protected]
4math.GR
Reassembling Trees for the Traveling Salesman Jens Vygen arXiv:1502.03715v2 [cs.DM] 5 Jan 2016 University of Bonn revised version – December 23, 2015 Abstract Many recent approximation algorithms for different variants of the traveling salesman problem (asymmetric TSP, graph TSP, s-t-path TSP) exploit the well-known fact that a solution of the natural linear programming relaxation can be written as convex combination of spanning trees. The main argument then is that randomly sampling a tree from such a distribution and then completing the tree to a tour at minimum cost yields a better approximation guarantee than simply taking a minimum cost spanning tree (as in Christofides’ algorithm). We argue that an additional step can help: reassembling the spanning trees before sampling. Exchanging two edges in a pair of spanning trees can improve their properties under certain conditions. We demonstrate the usefulness for the metric s-t-path TSP by devising a deterministic polynomial-time algorithm that improves on Sebő’s previously best approximation ratio of 85 . keywords: traveling salesman problem, s-t-path TSP, approximation algorithm, spanning tree 1 Introduction The traveling salesman problem (TSP) is probably the best-known NP-hard combinatorial optimization problem. Although for the general metric TSP Christofides’ [1976] algorithm with its approximation ratio 23 is still unbeaten, we have seen progress for several variants and special cases in particular since 2010. See Vygen [2012] for a detailed survey. Many of the recent approximation algorithms begin by solving the natural linear programming relaxation, which was first proposed by Dantzig, Fulkerson and Johnson [1954]. It was observed by Held and Karp [1970] that a solution x∗ to this LP can (after scaling down by a factor n−1 n except for the s-t-path case) be written as convex combination (or, equivalently, probability distribution) of spanning trees. Of course, this distribution is far from unique. Asadpour et al. [2010] and Oveis Gharan, Saberi and Singh [2011] improved the approximation ratio for the asymmetric TSP and graph TSP, respectively, by randomly sampling a spanning ∗ tree from a maximum entropy distribution describing n−1 n x and then completing it to a tour in an optimal way. An, Kleinberg and Shmoys [2015] considered the metric s-t-path TSP and showed that a spanning tree randomly chosen from any distribution describing x∗ is —in expectation— good enough to improve on Christofides’ algorithm for this problem. 1 In this paper, we propose to modify the distribution before sampling. By exchanging two edges in a pair of trees with certain properties we obtain two new trees and hence a new distribution. We call this step reassembling trees. Under certain conditions the two new trees have better properties than the old ones. For the s-t-path TSP we show that this step can indeed improve the approximation ratio. 1.1 The s-t-path TSP Let us define the (metric) s-t-path TSP formally. As in the classical version of the TSP, we want to visit a set of cities at minimum total cost. However, rather than returning to the origin at the end, we are given the origin and the destination as input. More precisely, we are given a finite set V , two elements s and t of V , and a symmetric distance function c : V × V → R≥0 satisfying the triangle inequality. Throughout this paper we will denote by n the numberPof elements of V . n−1 We ask for a sequence V = {v1 , . . . , vn } with v1 = s and vn = t, such that i=1 c(vi , vi+1 ) is minimized. The classical metric TSP is the special case when s = t. We note that in both variants we can either require that every city is visited exactly once, or, equivalently, we can drop the requirement that c satisfies the triangle inequality but allow visiting cities more than once. The s-t-path TSP (for s 6= t) is clearly no easier than the classical metric TSP (we can reduce the latter to the former by guessing two cities that are adjacent in an optimum tour); in particular 123 unless P = NP there is no polynomial-time approximation algorithm with better ratio than 122 (Karpinski, Lampis and Schmied [2013]). We assume s 6= t henceforth. It is sufficient to compute a connected multi-graph with vertex set V in which exacty s and t have odd degree; such a graph will be called an {s, t}-tour. Here is why: given an {s, t}-tour, we can find an Eulerian walk from s to t (using every edge exactly once) in linear time and shortcut whenever a vertex is visited not for the first time; this yields an s-t-path with vertex set V , which —due to the triangle inequality— is no more expensive than the {s, t}-tour. 1.2 Previous approximation algorithms Christofides’ [1976] algorithm, originally designed for the classical metric TSP, works also for the s-t-path TSP. It first computes a minimum cost spanning tree (V, S) in the complete graph spanned by V , and then adds a minimum cost TS -join J, where TS is the set of vertices whose degree has the wrong parity (even for s or t, odd for other vertices). The result is an {s, t}-tour. Hoogeveen [1991] showed that Christofides’ algorithm has approximation ratio 35 for the s-tpath TSP, and that in fact this ratio is asymptotically attained by an infinite set of examples. An, Kleinberg and Shmoys [2015] proposed the best-of-many Christofides algorithm for the s√ 1+ 5 t-path TSP and proved that it has approximation ratio 2 ≈ 1.619. The algorithm is quite simple: it computes an optimum solution to the natural LP relaxation (see (1) below) and writes 2 it as convex combination of spanning trees. For each of these spanning trees, (V, S), it computes a minimum weight TS -join. J, where TS is the set of vertices whose degree has the wrong parity, obtains an {s, t}-tour S ∪ J, and finally outputs the best of these. We will go into details in Subsection 1.4. This was the first improvement over Christofides’ algorithm that applied to general metrics. Then Sebő [2013] improved the analysis, obtaining the approximation ratio 58 . We will describe how in Subsection 1.8. For the special case where c is the metric closure of an unweighted graph, better approximation algorithms have been obtained by Mömke and Svensson [2011], Mucha [2014], and An, Kleinberg and Shmoys [2015] (in this order). The best known approximation ratio 1.5, obtained first by Sebő and Vygen [2014], matches the integrality ratio of the LP in this special case. Gao [2013] gave a simpler proof of this result. Some of the above-mentioned papers apply also to a generalization (to T -tours, for general T ); see Section 6 for a brief discussion. 1.3 Notation  For a given instance (V, s, t, c) let n := |V |, and let E := V2 be the edge set of the complete graph on V . For U ⊆ V , δ(U ) denotes the set of edges with exactly one endpoint in U , and E[U ] the set of edges with both endpoints in U . We write δ(v) := δ({v}) for v ∈ V . For T ⊆ V with |T | even, a T -join is a set J ⊆ E for which |δ(v) ∩ J| is odd for all v ∈ T and |δ(v) ∩ J| is even for all v ∈ V \ T . A T -cut is a cut δ(U ) for which |U ∩ T | is odd. The intersection of a T -join and a T -cut always contains an odd number of edges. Edmonds [1965] proved that a minimum weight T -join can be computed in polynomial time. P P For a vector x ∈ RE and F ⊆ E we write x(F ) := e∈F xe and c(x) := e={v,w}∈E c(v, w)xe ; moreover, χF ∈ {0, 1}E denotes the incidence vector of F (i.e., χFe = 1 for e ∈ F and χFe = 0 P for e ∈ E \ F ), and c(F ) := c(χF ) = e={v,w}∈F c(v, w). By S we denote the set of edge sets of spanning trees in (V, E). For S ∈ S, the set TS := {v ∈ V \ {s, t} : |δ(v) ∩ S| odd} ∪ {v ∈ {s, t} : |δ(v) ∩ S| even} contains the vertices whose degree in S has the wrong parity. 1.4 Best-of-many Christofides Our algorithm will be an extension of the best-of-many Christofides algorithm that was proposed by An, Kleinberg and Shmoys [2015]. Therefore, we first describe this algorithm in more detail. The algorithm begins by solving the LP relaxation min c(x) subject to x(δ(U )) x(δ(U )) x(δ(v)) x(δ(v)) xe ≥ ≥ = = ≥ (∅ = 6 U ⊂ V, |U ∩ {s, t}| even) (∅ = 6 U ⊂ V, |U ∩ {s, t}| odd) (v ∈ V \ {s, t}) (v ∈ {s, t}) (e ∈ E) 2 1 2 1 0 3 (1) Obviously, the integral solutions to (1) are precisely the incidence vectors of the edge sets of the Hamiltonian s-t-paths in (V, E). So this LP is indeed a relaxation. Following an idea of Heldand Karp [1970], An, Kleinberg and Shmoys [2015] observed that the polytope defined by (1) is x ∈ RE 6 U ⊂ V, x(E[U ]) ≤ ≥0 : x(E) = n−1, x(E[U ]) ≤ |U |−1 ∀ ∅ = |U |−2 ∀ {s, t} ⊆ U ⊂ V and hence is contained in the spanning tree polytope of (V, E) (Edmonds [1970]). an optimum solution x∗ (in fact every feasible solution) can P Therefore, P be written as ∗ S x = S∈S pS χ , where p is a distribution on S, i.e., pS ≥ 0 for all S ∈ S and S∈S pS = 1. By Carathéodory’s theorem we can assume that pS > 0 for less than n2 spanning trees (V, S). An optimum LP solution x∗ , such spanning trees, and such numbers pS can be computed in polynomial time, as can be shown with the ellipsoid method (Grötschel, Lovász and Schrijver [1981]) or using the splitting-off technique (cf. Genova and Williamson [2015]). We will fix x∗ henceforth. We will also fix the distribution p for the rest of the introduction but will modify it later. For each S ∈ S with pS > 0, the best-of-many Christofides algorithm then computes a . minimum weight TS -join J, and considers the {s, t}-tour S ∪ J; the output is the best of these. Note that trying all S ∈ S with pS > 0 leads to a deterministic polynomial-time algorithm which is at least as good as randomly picking S ∈ S with probability pS . 1.5 Basic Analysis We follow the basic analysis of An, Kleinberg and Shmoys [2015]. The cost of the {s, t}-tour that the best-of-many Christofides algorithm computes for a given instance depends on its choice of This is at most P : J is a TS -join}). P p only: it is BOMC(p) := minS∈S: pS >0 (c(S) + min{c(J) ∗ S∈S pS c(S) = c(x ). S∈S pS (c(S) + min{c(J) : J is a TS -join}). Note that A well-known result of Edmonds and Johnson [1973] says that the minimum weight of a TS -join is the minimum c(y) over all y in the TS -join polyhedron  y ∈ RE (2) ≥0 : y(C) ≥ 1 ∀ TS -cuts C . Therefore BOMC(p) ≤ c(x∗ ) + X pS c(y S ) (3) S∈S for any set of vectors (y S )S∈S such that y S is in the TS -join polyhedron (2). The difficulty in the analysis lies in finding an appropriate set of vectors (y S )S∈S . Let us call them correction vectors (although An, Kleinberg and Shmoys [2015] used this term with a different meaning), because they bound the cost of parity correction. 1.6 Narrow cuts Let C := {δ(U ) : ∅ = 6 U ⊂ V, x∗ (δ(U )) < 2}. The elements of C are called narrow cuts. By ∗ (1) they are {s, t}-cuts. If there are no narrow cuts except δ(s) and δ(t), then x2 is a valid 4 correction vector for all S ∈ S, leading to BOMC(p) ≤ 32 c(x∗ ), which is Wolsey’s [1980] analysis of Christofides’ algorithm for the classical metric TSP. But in the s-t-path TSP we will in general have narrow cuts. The following property is useful: Lemma 1 (An, Kleinberg and Shmoys [2015]) The narrow cuts form a chain: there are sets {s} = L0 ⊂ L1 ⊂ · · · ⊂ Lℓ−1 ⊂ Lℓ = V \ {t} so that C = {δ(Li ) : i = 0, . . . , ℓ}. Proof: We have x∗ (δ(s)) = x∗ (δ(t)) = 1 and hence δ(s) ∈ C and δ(V \ {t}) = δ(t) ∈ C. Suppose we have U ′ ⊂ V and U ′′ ⊂ V with δ(U ′ ), δ(U ′′ ) ∈ C and s ∈ U ′ ∩ U ′′ ∈ / {U ′ , U ′′ }. Then t ∈ / U ′ ∪ U ′′ ∗ ′ ∗ ′′ ∗ ′ ′′ ∗ ′′ ′ and 2 + 2 > x (δ(U )) + x (δ(U )) ≥ x (δ(U \ U )) + x (δ(U \ U )) ≥ 2 + 2, a contradiction. ✷ We remark: Proposition 2 Given x∗ , the set C of narrow cuts can be computed in polynomial time. Proof: Lemma 1 implies that there is an order V = {v1 , v2 , . . . , vn } such that each narrow cut has the form δ({v1 , . . . , vi }) and is the only {vi , vi+1 }-cut C with x∗ (C) < 2. Thus it suffices to compute a {v, w}-cut C with minimum x∗ (C) for all v, w ∈ V with v 6= w. This can be done by n 2 applications of any polynomial-time max-flow algorithm (or more efficiently by computing a Gomory-Hu tree). ✷ Similarly to Lemma 1 we have: Lemma 3 For all C, C ′ ∈ C with C 6= C ′ we have x∗ (C ∩ C ′ ) ≤ 1 1 ∗ x (C) + x∗ (C ′ ) − 1. 2 2 Proof: Let C = δ(Li ) and C ′ = δ(Lj ) with 0 ≤ i < j ≤ ℓ. Then x∗ (C) + x∗ (C ′ ) − 2x∗ (C ∩ C ′ ) = x∗ (δ(Lj \ Li )) ≥ 2. ✷ Moreover, An, Kleinberg and Shmoys [2015] and Sebő [2013] observed that X pC pS ≤ x∗ (C) − 1 even := (4) S∈S : |S∩C| even and pC one := X S∈S : |S∩C|=1 pS ≥ 2 − x∗ (C) for every narrow cut C ∈ C. Note that (4) and (5) follow directly from x∗ (C) = for all C ⊆ E and |S ∩ C| ≥ 1 for all C ∈ C and S ∈ S. From this we also get X  |S ∩ C| − 1   1 ∗ x (C) − 1 − pC := pS pC = even many 2 2 S∈S 5 (5) P S∈S pS |S ∩ C| (6) s t Figure 1: A spanning tree (V, S). Filled circles show vertices in TS . The edge set S is partitioned into its s-t-path IS (turquoise) and its TS -join JS (red). The narrow cuts are those shown in grey (dotted and solid). Those that have an even number of edges of S are shown in solid grey; each of them contains (at least) one red and (at least) one blue edge. for all C ∈ C. For S ∈ S let IS denote the edge set of the s-t-path in (V, S). Let JS := S \ IS and note that JS is a TS -join. See Figure 1 for an example. Sebő [2013] observed that X X X (7) pS χS∩C ≤ p S χI S C∈C S∈S : |S∩C|=1 S∈S because IS (in fact every s-t-path) intersects every narrow cut (in fact every {s, t}-cut), and if S ∩ δ(Li ) = S ∩ δ(Lj ) = {e} for some 0 ≤ i < j ≤ ℓ and e ∈ E, then S ∩ δ(Lj \ Li ) = ∅, contradicting that (V, S) is connected. 1.7 Correction vectors Consider y S := βx∗ + (1 − 2β)χJS + z S (8) z S (C) ≥ β(2 − x∗ (C)) (9) for S ∈ S, where 0 ≤ β ≤ 12 , and z S ∈ RE ≥0 is a nonnegative vector satisfying for all C ∈ C with |S ∩ C| even. Lemma 4 (An, Kleinberg and Shmoys [2015]) For every S ∈ S and every TS -cut C we have y S (C) ≥ 1. Proof: Let S ∈ S and C be a TS -cut. JS is a TS -join, so |JS ∩ C| ≥ 1. If C ∈ / C, then x∗ (C) ≥ 2 and hence y S (C) ≥ βx∗ (C) + (1 − 2β)|JS ∩ C| ≥ 2β + 1 − 2β = 1. If C ∈ C, then |IS ∩ C| (the intersection of an s-t-path and an {s, t}-cut) is odd and |JS ∩ C| (the intersection of a TS -join and a TS -cut) is odd, so |S ∩ C| is even. Hence y S (C) = βx∗ (C) + (1 − 2β)|JS ∩ C| + z S (C) ≥ βx∗ (C) + 1 − 2β + z S (C) ≥ 1 due to (9). ✷ 6 So y S is in the TS -join polyhedron (2) for all S ∈ S. For any distribution p and nonnegative vectors (z S )S∈S with (9), we get with (3) and (8) the bound X X BOMC(p) ≤ (1 + β)c(x∗ ) + (1 − 2β) pS c(JS ) + pS c(z S ). (10) S∈S S∈S Now the question is how to choose the vectors z S . 1.8 The analyses of An, Kleinberg, Shmoys, and Sebő An, Kleinberg and Shmoys [2015], Sebő [2013], and then also Gao [2015], chose X  z S = αχIS + max 0, 2β − α − βx∗ (C) v C , (11) C∈C : |S∩C| even C where v C ∈ RE ≥0 are vectors with v (C) ≥ 1 for all C ∈ C. As IS ∩ C 6= ∅ (recall that IS is the edge set of an s-t-path), this choice implies z S (C) ≥ α + (2β − α − βx∗P (C)) = 2β − βx∗ (C) for P all C ∈ C with |S ∩ C| even, as required in (9). I S Writing Ip := S∈S pS χ and Jp := S∈S pS χJS we get, with (10) and (11) and c(Ip ) + c(Jp ) = c(x∗ ): X BOMC(p) ≤ (1 + β)c(x∗ ) + (1 − 2β)c(Jp ) + pS c(z S ) S∈S = (1 + β)c(x∗ ) + (1 − 2β)c(Jp ) + αc(Ip ) X X  max 0, 2β − α − βx∗ (C) c(v C ) pS + S∈S ∗ C∈C : |S∩C| even = (1 + α + β)c(x ) + (1 − α − 2β)c(Jp ) X ∗ C + pC even max {0, 2β − α − βx (C)} c(v ) C∈C ∗ ≤ (1 + α + β)c(x ) + (1 − α − 2β)c(Jp ) X + (x∗ (C) − 1) max {0, 2β − α − βx∗ (C)} c(v C ), C∈C where we used (4) in the last inequality. The three papers choose the vectors v C (C ∈ C) differently. P An, Kleinberg and Shmoys [2015] showed that v C (C ∈ C) can be chosen so that C∈C v C ≤ x∗ . Observing (x − 1) (2β − α − βx) ≤ √ (β−α)2 4β for all x ∈ R and setting β = √1 5 and α = 1 − √2 , 5 they obtained BOMC(p) ≤ 1+2 5 c(x∗ ). P Sebő [2013] chose v C := 2−x1∗ (C) S∈S : |S∩C|=1 pS χS∩C for C ∈ C. Then indeed v C (C) ≥ 1 for √ all C ∈ C due to (5). Using (7) and observing (x−1)(2β−α−βx) ≤ α + β − 2 αβ for all x ≤ 2 one 2−x 7 √ gets BOMC(p) ≤ (1 + α + β)c(x∗ ) + (1 − α − 2β)c(Jp ) + (α + β − 2 αβ)c(Ip ). Setting β = 25 and 1 α = 10 , this yields BOMC(p) ≤ 58 c(x∗ ). (Sebő [2013] set β = 49 and α = 19 , which yields the same bound if c(Jp ) ≥ 53 c(x∗ ); otherwise he used y S = χJS (S ∈ S) as correction vectors). Gao [2015] simply chose v C to be the incidence vector of a cheapest edge in C, which is clearly best possible in this framework, but he could not obtain a better approximation ratio. 1.9 New approach We use the ideas of An, Kleinberg and Shmoys [2015] and Sebő [2013] but define z S differently; see Section 2. Like Sebő [2013], we will boundP c(z S ) by a constant fraction of c(Ip ). More precisely, S E we will find vectors z ∈ R≥0 with (9) and S∈S pS c(z S ) ≤ (1 − 2β)c(Ip ). With (10) this will immediately yield BOMC(p) ≤ (2 − β)c(x∗ ). The question is how large we can choose β. In the Appendix we give an example that shows that it will in general not be possible to choose β > 52 and hence directly improve on Sebő’s [2013] approximation ratio of 58 . Therefore we will P modify p first. By reassembling the trees that contribute to the convex combination x∗ = S∈S pS χS we eliminate the most critical configurations. We will show how in Section 3. Then we can complete the calculation in Section 4 and obtain an improved approximation ratio. 2 New correction vectors Since we want to bound the weighted sum of the costs of the vectors z S by a multiple of c(Ip ) (the weighted sum of the costs of the s-t-paths IS , S ∈ S), each pair (S, e) with S ∈ S and e ∈ IS ′ will make a contribution to some of the vectors z S (where S ′ ∈ S can be S or a different tree). As in Sebő’s [2013] analysis, there are two types of contributions. A pair (S, e) will contribute ′ γS,e (1 − 2β) to z S and a total of (1 − γS,e )(1 − 2β) to vectors z S for other trees S ′ . The latter contribution is distributed as follows: if C ∈ C is the narrow cut with S ∩ C = {e} (there can be ′ only one such cut), then e will contribute to z S for all S ′ ∈ S with |S ′ ∩ C| even. Sebő’s [2013] analysis is essentially equivalent to choosing γS,e = 21 for all S ∈ S and e ∈ IS . We will obtain an improvement by choosing individual values. 2.1 The new vectors For any S ∈ S and C ∈ C choose an edge eSC ∈ IS ∩ C. Moreover, for any C ∈ C let eC ∈ C be a minimum cost edge in C. For any pair S ∈ S and e ∈ IS we will choose a number 0 ≤ γS,e ≤ 1 later. Then, for S ∈ S, we set o n  X X χ{eC } . (12) z S := (1 − 2β)γS,e χ{e} + max 0, β(2 − x∗ (C)) − (1 − 2β)γS,eS C e∈IS C∈C : |S∩C| even The first term in (12) is the direct contribution of the edges of IS to z S . The second term is exactly what is still needed to obtain (9) for all C ∈ C with |S ∩ C| even; see the proof of Lemma 8 5 below. We will have P to show P that the total cost of the weighted sum of the second terms in (12) is not more than S∈S pS e∈IS (1 − 2β)(1 − γS,e )c(e); see Section 2.2. P P Lemma 5 If 0 ≤ β ≤ 12 and S∈S pS c(z S ) ≤ (1 − 2β) S∈S pS c(IS ) for the vectors z S (S ∈ S) defined in (12), then BOMC(p) ≤ (2 − β)c(x∗ ). Proof: Note that the vectors z S are nonnegative for all S ∈ S (as β ≤ 21 and γS,e ≥ 0 for all e ∈ IS ). We have for every S ∈ S and C ∈ C with |S ∩ C| even:   z S (C) ≥ (1 − 2β)γS,eS + β(2 − x∗ (C)) − (1 − 2β)γS,eS = β(2 − x∗ (C)), C C as required by (9). So P the bound immmediately follows from (10), using P 2β) S∈S pS c(IS ) and S∈S pS (c(JS ) + c(IS )) = c(x∗ ). P S∈S pS c(z S ) ≤ (1 − ✷ We will try to maximize β. 2.2 Bounding the cost The cost of the vectors P z S (S ∈ S) will of course depend on the choice of the γS,e (S ∈ S, e ∈ IS ). P The desired inequality S∈S pS c(z S ) ≤ (1 − 2β) S∈S pS c(IS ) is implied by o n X X ∗ pS (1 − 2β)(1 − γS,eS ), pS max 0, β(2 − x (C)) − (1 − 2β)γS,eS ≤ C C S∈S : |S∩C|=1 S∈S : |S∩C| even as may be seen from (12) and will be formally shown in the proof of Lemma 7 below. To write this inequality in a more compact form (see (13) below), we divide by 1 − 2β and use the following notation: Definition 6 Given γS,e ≥o0 for S ∈ S and e ∈ IS , we define the benefit of (S, C) ∈ S×C n numbers β(2−x∗ (C)) , γS,eS if |S ∩ C| is even, bS,C := 1 − γS,eS if |S ∩ C| = 1, and to be bS,C := min 1−2β C C bS,C = 0 otherwise. Now all we need to show is that we have enough benefit at every narrow cut: Lemma 7 Let 0 ≤ β < 1 2 and 0 ≤ γS,e ≤ 1 for S ∈ S and e ∈ IS . If X S∈S pS bS,C ≥ β(2 − x∗ (C))pC even 1 − 2β for all C ∈ C, then BOMC(p) ≤ (2 − β)c(x∗ ). 9 (13) Proof: By (13) and Definition 6 we have for every C ∈ C:   X β(2 − x∗ (C))pC β(2 − x∗ (C)) even ≤ pS min , γS,eS + C 1 − 2β 1 − 2β S∈S : |S∩C| even X pS (1 − γS,eS ). C (14) S∈S : |S∩C|=1 We compute: P c(z S ) pS 1 − 2β S∈S = X S∈S = X  pS  X γS,e c(e) + e∈IS pS X X     ∗ β(2 − x (C)) − γS,eS max 0, c(eC ) C 1 − 2β C∈C : |S∩C| even γS,e c(e) e∈IS S∈S     ∗ (C)) ∗ (C))pC X β(2 − x β(2 − x even  − pS min , γS,eS  c(eC ) + C 1 − 2β 1 − 2β C∈C S∈S : |S∩C| even X X X X ≤ pS γS,e c(e) + pS (1 − γS,eS )c(eC ) X C e∈IS S∈S ≤ ≤ = C∈C S∈S : |S∩C|=1 X γS,e c(e) + X γS,e c(e) + X pS X pS X pS c(IS ) e∈IS S∈S S∈S X X C∈C S∈S : |S∩C|=1 e∈IS X S∈S pS X e∈IS pS (1 − γS,eS )c(eSC ) C (1 − γS,e )c(e) S∈S (we used (14) in the first, γS,eS ≤ 1 and c(eC ) ≤ c(eSC ) in the second, and (7) in the third C inequality). Now the assertion follows from Lemma 5. ✷ Let us quickly check the obvious (although we will not need it): if we simply choose γS,e = 21 P β for all S ∈ S and e ∈ IS , then we have for all C ∈ C: if 1−2β (2 − x∗ (C)) ≤ 21 , then S∈S pS bS,C ≥ β 1−2β (2 − x∗ (C))pC even , and otherwise X S∈S 1 1 1 C ∗ C ≥ ((2 − x∗ (C)) + pC pS bS,C = pC even ) ≥ 2(2 − x (C))peven one + peven 2 2 2 (the first inequality follows from (5), and the second one follows from 0 ≤ (2 − x∗ (C)) + pC even ≤ 1 (cf. (4)) and the fact that a + b ≥ 4ab for all a, b ≥ 0 with a + b ≤ 1). So we have (13) for β = 52 and obtain again Sebő’s [2013]Papproximation ratio 58 . This is tight 1 1 C for x∗ (C) = 23 and pC one = peven = 2 , when the total benefit S∈S pS bS,C is 2 . 10 2.3 More benefit Let us first give an informal description of our idea. The approximation guarantee can be readily 1 1 C improved if there are no cuts C with x∗ (C) ≈ 23 (and pC one ≈ 2 and peven ≈ 2 ; see the previous paragraph). We would like to obtain more benefit (i.e., more than 12 ) for “critical” cuts C (i.e., those with x∗ (C) ≈ 32 ), and to achieve this we will reduce the benefit for less critical cuts (but still have enough). If C is a critical cut, S ∈ S, and eSC does not belong to any other critical cut, we can choose γS,e > 12 if |S ∩ C| is even and γS,e < 21 if |S ∩ C| = 1. We will describe how exactly at the beginning of Section 4. In this case we get bS,C > 21 . However, this does not work if, for a critical cut C and every S ∈ S, the edge eSC also belongs to another critical cut C ′ (and |S ∩ C| + |S ∩ C ′ | = 3). In this case we can only choose γS,e = 21 and get bS,C = 12 . But note that then S has at least one edge in C ∩ C ′ . However, due to Lemma 3, there cannot be too many edges in the intersection of two critical cuts: certainly less than one per tree on average. We will fix a constant ξ between 32 and 2, and consider C ξ := {C ∈ C : x∗ (C) < ξ}. These cuts were called (ξ − 1)-narrow by An, Kleinberg and Shmoys [2015], but we prefer to call them ξ-narrow. Cuts that are not ξ-narrow will not be critical. For any C ∈ C ξ \ {δ(s), δ(t)}, let C← and C→ be the adjacent ξ-narrow cuts in both directions. More precisely, if C = δ(Lj ), then C← := δ(Li ) and C→ := δ(Lk ), where i = max{ι : ι < j, x∗ (δ(Lι )) < ξ} and k = min{κ : κ > j, x∗ (δ(Lκ )) < ξ} (cf. Lemma 1). Let C be a critical cut. By Lemma 3, x∗ (C ∩ C← ) < 1 and x∗ (C ∩ C→ ) < 1, so. there must be trees S ∈ S with pS > 0 with less than two edges in the disjoint union (C ∩ C← ) ∪ (C ∩ C→ ). Therefore, if every tree S with pS > 0 has either larger benefit than 21 or (benefit exactly 12 . P and at least two edges in (C ∩ C← ) ∪ (C ∩ C→ )), we get S∈S pS bS,C > 21 , which leads to an improvement. This will be essentially our argument. As can be seen from Figure 2, there are however —in addition to trees with more than two edges in C— four configurations (orange and purple) that do not have this property. Our reassembling step, to be described next, aims at avoiding two out of these four configurations (one of the two orange ones and one of the two purple ones). It will turn out that this is enough. 3 Reassembling Trees In this Psection we show how to reassemble the trees that contribute to the convex combination x∗ = S∈S pS χS in order to remove certain bad configurations. Given a constant 23 < ξ < 2 (the exact value will be chosen later), we number the ξ-narrow cuts C ξ = {C0 , . . . , Cℓ′ } from left to right; i.e., for 0 ≤ i < k ≤ ℓ′ and Ci = δ(Lι ) and Ck = δ(Lκ ) we have ι < κ. Note that C0 = δ(s) and Cℓ′ = δ(t). Moreover, for C = Cj (i ∈ {1, . . . , ℓ′ − 1}) we have C← = Cj−1 and C→ = Cj+1 . 11 C← C→ C type 010 011 110 111 020 021 120 022 220 121 121 Figure 2: Configurations at a ξ-narrow cut C; here C← and C→ are the adjacent ξ-narrow cuts. The types, according to Definition 8, are shown on the right. In each configuration we see the (one or two) edges of S ∩ C for some S ∈ S; if there are two, the edge eSC that belongs to the s-t-path is shown on top. If C is critical (i.e., x∗ (C) ≈ 32 ), each of these configurations will get benefit at least 1 1 because eSC belongs 2 . Green configurations will get benefit strictly more than 2 , which is possible . to no other critical cut. Blue configurations have two edges in (C ∩ C← ) ∪ (C ∩ C→ ), which is more than possible on average. Orange and purple configurations are problematic. Configurations . with even more edges in (C ∩ C← ) ∪ (C ∩ C→ ) or with three or more edges in C (these will be called good) are not shown. 3.1 Types of trees at ξ-narrow cuts We now define the type of a spanning tree at a ξ-narrow cut. We remark that the type can depend on the value of ξ. This is no problem since ξ is a fixed constant (chosen later). Definition 8 Fix a constant 32 < ξ < 2. Then, for any tree S ∈ S and any cut C ∈ C ξ \{δ(s), δ(t)} we define the type of S at C as follows. Let l = |S ∩C ∩C←| and m = |S ∩C| and r = |S ∩C ∩C→|. If m ≥ 3 or l + r ≥ 3 or (l + r ≥ 1 and S ∩ C ′ 6= {e} for all e ∈ S ∩ C and all C ′ ∈ C ξ ), then the type is “ good”, otherwise the type is “ lmr”. Note that if the type of S at C is good, then |S ∩ C| ≥ 2. See Figure 2 for a list of all types that are not good, and Figure 3 for the types of the tree in Figure 1 (assuming that all narrow cuts are in C ξ ). All types are also listed in Table 1 on page 19. 12 s t 021 111 120 010 good 121 Figure 3: The spanning tree (V, S) from Figure 1. Assuming that all narrow cuts (grey vertical lines) are ξ-narrow, we list the type of S at each C ∈ C ξ \ {δ(s), δ(t)} according to Definition 8. For the cut C marked good we have l = 0, m = 2, r = 1, and S ∩ C ′ 6= {e} for all e ∈ S ∩ C and all C ′ ∈ C ξ . 3.2 Reassembling lemma Here is our key lemma for reassembling trees. Lemma 9 Let i ∈ {1, . . . , ℓ′ − 1}, so Ci ∈ C ξ \ {δ(s), δ(t)}. Let S1 , S2 ∈ S such that S1 has type 120 at Ci and S2 has type 011 at Ci . Then there are two edges e1 ∈ S1 and e2 ∈ S2 such that S1′ := (S1 \ {e1 }) ∪ {e2 } ∈ S and ′ S2 := (S2 \ {e2 }) ∪ {e1 } ∈ S. Moreover we have: (a) At each of C1 , . . . , Ci−1 , the new trees have the same type as the old trees. (b) At Ci , S1′ has type 121, and S2′ has type 010. (c) If S1′ has type 110 or 021 at Cj for some j > i, then S1 has the same type at Cj . (d) If S2′ has type 110 or 021 at Cj for some j > i, then S2 has the same type at Cj or S1′ has type good at each of Ci+1 , . . . , Cj . See Figure 4 for an example. Proof: Let e2 be the only edge in S2 ∩ Ci . As S2 has type 011 at Ci , there is an index k ∈ {i + 1, . . . , ℓ − 1} such that e2 belongs to the cuts Ci , . . . , Ck but neither Ci−1 nor Ck+1 . Let S1 ∩ Ci = {e0 , e1 }, where e0 belongs to the s-t-path in S1 (so IS1 ∩ Ci = {e0 }). As S1 has type 120 (and not good) at Ci , there must be an edge in S1 ∩ Ci that is the only edge of S1 in some other ξ-narrow cut, and such an edge must belong to the s-t-path in S1 . So there exists an index h ∈ {0, . . . , i − 1} such that Ch ∩ S1 = {e0 }; moreover e1 ∈ / Ci−1 ∪ Ci+1 . The graph (V, S1 ∪ {e2 }) contains a circuit A. Any circuit has even intersection with any cut. As e2 ∈ / Ch , the circuit A does not contain e0 . However, A must contain (at least) a second edge in Ci besides e2 ; so A contains e1 . 13 v2 e2 e0 e1 S1 S1′ S2 S2′ v0 e0 e2 Ch Ci Ck e1 Ch Ci Ck Figure 4: Reassembling trees: exchanging two edges in trees of types 120 and 011 (Lemma 9). We have S1′ ∈ S because e1 belongs to the circuit A in (V, S1 ∪ {e2 }). We have S2′ ∈ S because S2 ∩ Ci = {e2 } and e1 ∈ Ci . Property (a) is obvious as nothing changes for C0 , . . . , Ci−1 : note that e1 , e2 ∈ Ci \ Ci−1 . Property (b) follows from S1′ ∩ Ci = {e0 , e2 } and S2′ ∩ Ci = {e1 }. To show (c) and (d), we first prove: Claim: S1′ has type good at Ci+1 , . . . , Ck . To this end, observe that |S1′ ∩ Cj | ≥ |(S1 \ {e1 }) ∩ Cj | + 1 ≥ 2 for j = i, . . . , k. Let v2 be the “right” endpoint of e2 , and v0 the “right” endpoint of e0 (i.e., if Ci = δ(Lι ), then v0 , v2 ∈ / Lι ; cf. Figure 4.) Let P be the v0 -v2 -path in S1′ . We observe that (∗) P crosses every cut among Ci+1 , . . . , Ck an odd number of times and every cut Cj with j ≤ i or j > k an even number of times. Therefore P contains neither e0 (it contains an even number of edges from S1′ ∩ Ch = {e0 }) nor e2 (it contains an even number of edges from S1′ ∩ Ci = {e0 , e2 }). Now let j ∈ {i + 1, . . . , k} and e ∈ IS1′ ∩ Cj . We have e 6= e0 because e0 ∈ / Cj . Moreover, e 6= e2 because e2 ∈ / IS1′ (as this s-t-path contains an odd number of edges from S1′ ∩ Ch = {e0 } / Ci . and from S1′ ∩ Ci = {e0 , e2 }). So e ∈ Suppose S1′ ∩ Cq = {e} for some q (otherwise S1′ has type good at Cj because e2 guarantees l + r ≥ 1); then q > k (as e2 ∈ Ci ∪ · · · ∪ Ck ), and from (∗) we get e ∈ / E(P ). Then we have ′ e, e2 ∈ S1 ∩ Cj and |E(P ) ∩ Cj | is odd and e, e2 ∈ / E(P ). This implies |S1′ ∩ Cj | ≥ 3, so again S1′ has type good at Cj . The claim is proved. The claim directly implies (c) and (d) for j ∈ {i + 1, . . . , k}. Now let j ∈ {k + 1, . . . , ℓ′ − 1}. Suppose S1 and S1′ have different types at Cj . Since l, m, r (cf. Definition 8) are identical at Cj , the only remaining reason for different types is that S1 ∩Cj ′ = {e} (and thus S1′ ∩ Cj ′ = {e, e2 }) for some i < j ′ ≤ k and e ∈ S1 ∩ Cj = S1′ ∩ Cj . But then the new type is good. Now suppose S2 and S2′ have different types at Cj for some j ∈ {k + 1, . . . , ℓ′ − 1}. Again l, m, r are identical at Cj , and the only remaining reason for different types is that S2′ ∩ Cj ′ = {e} / IS2 , (and thus S2 ∩ Cj ′ = {e, e2 }) for some i < j ′ ≤ k and e ∈ S2 ∩ Cj = S2′ ∩ Cj . But then e ∈ because IS2 contains an odd number of edges in Cj ′ and must contain e2 . This implies that S2 ∩Cj contains another edge in addition to e, and hence |S2′ ∩ Cj | = |S2 ∩ Cj | ≥ 2. Therefore the new 14 type can only be 120 or 121 or 220. 3.3 ✷ Resulting types P ξ Let pC τ := S∈S:S has type τ at C pS for every type τ and C ∈ C \ {δ(s), δ(t)}. We apply the previous lemma from left to right, and at each cut as long as possible. In order to obtain a polynomial-time algorithm, we will round all pS down to integer multiples of nǫ2 , for some small positive constant ǫ. Corollary 10 For any constants 23 < ξ < 2 and ǫ > 0 there is a polynomial-time algorithm which, given an instance (V, s, t, c) and an optimum solution x∗ of (1), a set S+ ⊆ S and numbers pS P 2 with nǫ pS ∈ N for S ∈ S+ and S∈S+ pS ≤ 1, computes another set S̄+ ⊆ S and numbers p̄S P P 2 with nǫ p̄S ∈ N for S ∈ S̄+ , such that S∈S+ pS χS = S∈S̄+ p̄S χS and C C min{p̄011 , p̄120 }=0 and C C p̄110 ≤ pC 110 + p̄good and C C p̄021 ≤ pC 021 + p̄good (15) for all C ∈ C ξ \ {δ(s), δ(t)}. Proof: We first compute the ξ-narrow cuts (cf. Proposition 2) and process them from left to right, ignoring δ(s) and δ(t). Initially, S̄+ := S+ and p̄ := p. At each Ci (1 ≤ i ≤ ℓ′ − 1) we check the types of all trees S ∈ S̄+ . Whenever we have two such trees S1 and S2 of type 120 and 011, respectively, we set δ := min{p̄S1 , p̄S2 }, decrease p̄S1 and p̄S2 by δ, and increase p̄S1′ and p̄S2′ by δ, where S1′ and S2′ are chosen as in Lemma 9. If S2′ but not S2 has type 110 or 021 at Cj for some j > i, then S1′ has type good at each of Ci+1 , . . . , Cj , and we maintain the properties P P C C C C Ch Ch } = 0 for h < i and p̄110j ≤ p110j + S∈S ′ p̄S and p̄021j ≤ p021j + S∈S ′ p̄S for all j, , p̄120 min{p̄011 where S ′ := {S ∈ S, S has type good at Cj and type 121 or good at Ci , . . . , Cj−1 }. We remove a tree S from S̄+ if p̄S drops to zero. Note that at any stage, all p̄S (and δ) are 2 ✷ integer multiples of nǫ2 , so there are never more than nǫ trees in S̄+ . By symmetry, we also have: Corollary 11 For any constants 32 < ξ < 2 and ǫ > 0 there is a polynomial-time algorithm which, given an instance (V, s, t, c) and an optimum solution x∗ of (1), a set S+ ⊆ S and numbers pS P 2 with nǫ pS ∈ N for S ∈ S+ and S∈S+ pS ≤ 1, computes another set S̄+ ⊆ S and numbers p̄S P P 2 with nǫ p̄S ∈ N for S ∈ S̄+ , such that S∈S+ pS χS = S∈S̄+ p̄S χS and C C min{p̄110 , p̄021 }=0 and C C p̄011 ≤ pC 011 + p̄good for all C ∈ C ξ \ {δ(s), δ(t)}. and C C p̄120 ≤ pC 120 + p̄good (16) ✷ We conclude: 15 Theorem 12 For any constants 23 < ξ < 2 and ǫ > 0 there is a polynomial-time algorithm which, given an instance (V, s, t, c) and an optimum solution P x∗ of (1), computes a set S+ ⊆ S of trees ∗ such that there exists a distribution p on S with x = S∈S pS χS and pS = 0 for all S ∈ S \ S+ and  C C C C C C C min pC ≤ pC (17) 120 + p021 , p011 + p110 , p011 + p021 , p120 + p110 good + ǫ for all C ∈ C ξ \ {δ(s), δ(t)}. P Proof: First compute any distribution p′ with x∗ = S∈S p′S χS and with less than n2 trees S ′ of these trees, using the ellipsoid method (Grötschel, Lovász and Schrijver with p′S > 0, and the set S+ 2 [1981]) or the splitting-off technique (cf. Genova and Williamson [2015]). Then set p′′S := nǫ2 ⌊ nǫ p′S ⌋ P ′′ be the set of trees with p′′ > 0. Note that ′ ′′ for all S ∈ S; and let S+ S S∈S (pS − pS ) < ǫ. ′′ and p′′ . We get S̄ and p̄ with min{p̄ C , p̄ C } = 0 for all Then apply Corollary 11 to S+ + 110 021 ξ C , p̄ C }=0 ¯120 C ∈ C \ {δ(s), δ(t)}. Applying Corollary 10 to S̄+ and p̄ yields S̄¯+ and p̄¯ with min{p̄¯011 C C } ≤ p̄ C , p̄ ¯good ¯021 for all C ∈ C ξ \ {δ(s), δ(t)}. Then p := p̄¯ + p′ − p′′ is a distribution and min{p̄¯110 ′ . ✷ as required. We output S+ := S̄¯+ ∪ S+ 2 Note that our algorithm only needs the set S+ , which contains less than nǫ + n2 trees. The above proof shows that we can also compute the distribution p in polynomial time, but it is needed only for the analysis. 4 Improved approximation ratio We now show how to set the numbers γS,e for S ∈ S and e ∈ IS so that the total benefit (according to Definition 6) is large. . For some constant β slightly larger than 52 (to be determined later), let f (x) := β(2−x)(x−1) 1−2β By Lemma 7 and (4), an average benefit of f (x∗ (C)) from the trees will be sufficient for a narrow cut C. Ideally, we would like to have γS,e ≥ f (x∗ (C)) if e ∈ S ∩ C and |S ∩ C| even, and 1 − γS,e ≥ f (x∗ (C)) if e ∈ S ∩ C and |S ∩ C| = 1. But this may be impossible because f (x∗ (C)) can be greater than 21 for β > 25 . Therefore we cut off at 12 . More precisely: For S ∈ S and e ∈ IS we define two numbers 0 ≤ f1 , f2 ≤ 12 . If |S ∩ C| > 1 for all C ∈ C with e ∈ C, then f1 := 0, otherwise f1 := min{ 12 , max{f (x∗ (C)) : e ∈ C ∈ C, |S ∩ C| = 1}}. If |S ∩ C| is odd for all C ∈ C with e ∈ C, then f2 := 0, otherwise f2 := min{ 12 , max{f (x∗ (C)) : e ∈ C ∈ C, |S ∩ C| even}}. If f2 < f1 , then we set γS,e := f2 , otherwise we set γS,e := 1 − f1 . 4.1 Less critical cuts Lemma 13 For all C ∈ C with f (x∗ (C)) ≤ 1 2 we have (13). 16 Proof: By the above choice of γS,eS (S ∈ S), we have γS,eS ≥ f (x∗ (C)) if |S ∩ C| is even C C  P ′ S ∈ S : |S ∩ and 1 − γS,eS ≥ f (x∗ (C)) if |S ∩ C| = 1. Let q := ′ S∈S pS where S := C C| even, β(2−x∗ (C)) 1−2β X S∈S < γS,eS . We have (by Definition 6) pS bS,C ≥ q · ∗ As pC one ≥ 2 − x (C) ≥ X pS bS,C S∈S C  β(2 − x∗ (C)) ∗ C ∗ + pC even − q · f (x (C)) + pone · f (x (C)). 1 − 2β 2−x∗ (C) x∗ (C)−1 pC even ≥ 2−x∗ (C) x∗ (C)−1 (pC even − q) by (5) and (4), we get    2 − x∗ (C) β(2 − x∗ (C)) β(2 − x∗ (C))pC even ∗ + f (x (C)) 1 + ∗ . ≥ q· pC = even − q 1 − 2β x (C) − 1 1 − 2β ✷ So we need to analyze only the remaining cuts (with f (x∗ (C)) > q q 1 1 ≤ x∗ (C) ≤ 32 + 54 − 2β ). more precisely with 23 − 54 − 2β 4.2 1 2 and hence x∗ (C) ≈ 1.5, Most critical cuts Now we consider the cuts C ∈ C with f (x∗ (C)) > Subsection 2.3: 1 2. We first establish what we outlined in Lemma 14 Let 0.4 ≤ β < 0.5 and 1.7 ≤ ξ ≤ 1.8. Let C ∈ C ξ \ {δ(s), δ(t)} with f (x∗ (C)) ≥ 21 , and S ∈ S with |S ∩ C| = 1 or |S ∩ C| even. Then: • bS,C ≥ 12 . • Moreover, if eSC ∈ / C← ∪ C→ or S ∩ C ′ 6= {eSC } for all C ′ ∈ C ξ , then bS,C ≥ 1 − f (ξ). Proof: First let |S ∩ C| = 1. Then bS,C = 1 − γS,eS . For S and e = eSC we have f1 = C γS,eS = f2 ≤ 12 . Moreover, if eSC ∈ / C← ∪ C→ , then f2 ≤ f (ξ). C n o ∗ (C)) Now let |S ∩ C| be even. Then bS,C := min β(2−x . , γ S S,e 1−2β 1 2 ≥ f2 , so C We first observe that x∗ (C) < 1.7 and f (ξ) ≥ f (1.8) ≥ 0.32 and hence β(2−x∗ (C)) 1−2β = f (x∗ (C)) x∗ (C)−1 > f (x∗ (C)) 0.7 ≥ 75 > 1 − f (ξ). Now consider the second term. We have f2 = 12 ≥ f1 , so γS,eS = 1 − f1 ≥ 12 . Moreover, if C S ∩ C ′ 6= {eSC } for all C ′ ∈ C ξ (this holds in particular if |S ∩ C| = 6 1 and eSC ∈ / C← ∪ C→ ), then f1 ≤ f (ξ). ✷ Now we can bound the benefit for most critical cuts, of course using a distribution according to Theorem 12. 17 Lemma 15 Let 0.4 ≤ β < 0.5P and 1.7 ≤ ξ ≤ 1.8 such that ν := 1 − f (ξ) > 21 . Let ǫ > 0. Let p be ∗ a distribution on S with x = S∈S pS χS and (17). Let C ∈ C ξ \ {δ(s), δ(t)} with f (x∗ (C)) > 12 and x∗ (C) ≥ 2 − 3ξ . Then    X 3 ∗ 1 2 pS bS,C ≥ 1 + 5 − (x (C) + ξ) − ǫ ν− − (4ν − 1) pC (18) many . 2 2 S∈S Proof: As before, let C← and C→ be the adjacent ξ-narrow cuts left and P right. ∗ Let lS = |S ∩ C ∩ CP |, m = |S ∩ C|, and r = |S ∩ C ∩ C |. Note that ← S S → S∈S pS mS = x (C) and, using Lemma 3, S∈S pS lS = x∗ (C← ∩ C) ≤ 12 (x∗ (C← ) + x∗ (C)) − 1 ≤ 12 (ξ + x∗ (C)) − 1. P Analogously, S∈S pS rS ≤ 21 (ξ + x∗ (C)) − 1. For all S ∈ S with mS ≥ 3, we have 2bS,C − (mS + 1)(ν − 12 ) + (4ν − 1)⌊ mS2−1 ⌋ ≥ 1. (19) (If mS is odd, then bS,C = 0 and thus 2bS,C −(mS +1)(ν − 21 )+(4ν −1)⌊ mS2−1 ⌋ = mS ν −3ν +1 ≥ 1. If mS is even, then bS,C ≥ 12 and thus 2bS,C −(mS +1)(ν − 12 )+(4ν −1)⌊ mS2−1 ⌋ ≥ mS ν −5ν + 52 ≥ 23 .) Now we distinguish four cases (cf. (17)). C C Case 1: pC 120 + p021 ≤ pgood + ǫ. For S ∈ S, let aS = 1 if SPhas type 120 or 021 at C, aS = −1 if S has type good at C, and aS = 0 otherwise. Note that S∈S pS aS ≤ ǫ. Then for all trees S ∈ S we have (cf. Lemma 14 and Table 1): • mS ≥ 3, or • bS,C ≥ 1 2 and lS + rS − mS + aS ≥ 0, or • bS,C ≥ ν and lS + rS − mS + aS ≥ −2, and hence (using (19) for the case mS ≥ 3) 2bS,C + (lS + rS − mS + aS )(ν − 12 ) + (4ν − 1)⌊ mS2−1 ⌋ ≥ 1. Taking the weighted sum, this implies (using (6)) X 2 pS bS,C ≥ 1 + (2 − ξ − ǫ) (ν − 12 ) − (4ν − 1)pC many . S∈S As x∗ (C) ≥ 2 − ξ 3 implies 2 − ξ ≥ 5 − 23 (x∗ (C) + ξ), we obtain (18). C C Case 2: pC 011 + p110 ≤ pgood + ǫ. For S ∈ S, let aS = 1 if SPhas type 011 or 110 at C, aS = −1 if S has type good at C, and aS = 0 otherwise. Note that S∈S pS aS ≤ ǫ. Then for all trees S ∈ S we have (cf. Lemma 14 and Table 1): 18 bS,C benefit ≥ ν type 010 011 110 111 020 021 120 022 220 121 good good good 1 2 1 2 1 2 ν 1 2 1 2 1 2 1 2 1 2 ν 1 2 0 l m r number of edges in C← ∩ C 0 0 1 1 0 0 1 0 2 1 l l ≥0 C 1 1 1 1 2 2 2 2 2 2 2 2 m≥3 C ∩ C→ 0 1 0 1 0 1 0 2 0 1 ≥1−l ≥3−l ≥0 Case 1 Case 2 Case 3 Case 4 l+r−m l+r+m 2l + r l + 2r −1 0 0 1 −2 −1 −1 0 0 0 −1 1 −m ≥ 1 2 2 3 2 3 3 4 4 4 2 4 m ≥ 0 1 2 3 0 1 2 2 4 3 1 3 0 ≥ 0 2 1 3 0 2 1 4 2 3 1 3 0 ≥ Table 1: The different types and their contributions. The bounds on the benefit (second column) follow from Lemma 14; here we use f (x∗ (C)) ≥ 21 . After reassembling, except for an ǫ fraction of the trees, the two orange types (011 and 120) cannot occur simultaneously, and if the two purple types (110 and 021) occur simultaneously, this is compensated by good types. • mS ≥ 3, or • bS,C ≥ 1 2 and lS + rS + mS + aS ≥ 3, or • bS,C ≥ ν and lS + rS + mS + aS ≥ 1, and hence (using again (19) for the case mS ≥ 3) 2bS,C + (lS + rS + mS + aS − 3)(ν − 12 ) + (4ν − 1)⌊ mS2−1 ⌋ ≥ 1. Taking the weighted sum, this implies X 2 pS bS,C ≥ 1 + (5 − 2x∗ (C) − ξ − ǫ) (ν − 21 ) − (4ν − 1)pC many , S∈S implying (18) because ξ ≥ x∗ (C). 19 C C Case 3: pC 011 + p021 ≤ pgood + ǫ. For S ∈ S, let aS = 1 if SPhas type 011 or 021 at C, aS = −1 if S has type good at C, and aS = 0 otherwise. Note that S∈S pS aS ≤ ǫ. Then for all trees S ∈ S we have (cf. Lemma 14 and Table 1): • mS ≥ 3, or • bS,C ≥ 1 2 and 2lS + rS + aS ≥ 2, or • bS,C ≥ ν and 2lS + rS + aS ≥ 0, and hence (using once more (19) for the case mS ≥ 3) 2bS,C + (2lS + rS + aS − 2)(ν − 12 ) + (4ν − 1)⌊ mS2−1 ⌋ ≥ 1. Taking the weighted sum, this implies X   2 pS bS,C ≥ 1 + 5 − 32 (x∗ (C) + ξ) − ǫ ν − 12 − (4ν − 1)pC many , S∈S i.e., (18). C C Case 4: pC 110 + p120 ≤ pgood + ǫ. This is symmetric to Case 3. So (18) is proved in all cases. 4.3 ✷ Setting the constants We now obtain our main result easily: Theorem 16 If ξ = 1.73 and ǫ = 0.01 and p is a distribution as obtained in Theorem 12, then BOMC(p) ≤ (2 − β)c(x∗ ) for β = 0.401. In particular, we have an 1.599-approximation algorithm for the s-t-path TSP, and the integrality ratio of (1) is at most 1.599. Proof: We have ν = 1 − f (ξ) > 0.6. We use Lemma 7 and need to show (13). Let C ∈ C be a narrow cut. If f (x∗ (C)) ≤ 12 , we have shown (13) in Lemma 13. So let now C ∈ C be a narrow cut with f (x∗ (C)) > 12 . Note that 1.44 < x∗ (C) < 1.56 and thus in particular C ∈ C ξ \ {δ(s), δ(t)} and x∗ (C) ≥ 2 − 3ξ . We apply Lemma 15 to C. The constants ξ, ǫ, and β are chosen so that    3 1 2β 1 + 5 − (x∗ (C) + ξ) − ǫ ν− (x∗ (C) − 1)(2 − x∗ (C)) (20) ≥ 2 2 1 − 2β holds for all values of x∗ (C). 20 2β 3 ∗ 6+4ξ(2−ξ) , so 4β(2 − ξ) ≥ 3 − 6β − 4β(2 − ξ)(ξ − 1) and hence 1−2β (2 − x (C)) 3−6β−4β(2−ξ)(ξ−1) (ξ) = 4ν−1 = 3−4f 2 2 . Therefore, using (6) and (4), 2(1−2β) Moreover, β ≥ 2β 1−2β (2 − ξ) ≥ ≥ 2β(2 − x∗ (C))pC even + (4ν − 1)pC many 1 − 2β   4ν − 1 ∗ 2β(2 − x∗ (C)) 4ν − 1 C − (x (C) − 1) = peven + 1 − 2β 2 2   2β(2 − x∗ (C)) 4ν − 1 4ν − 1 ∗ ∗ ≤ (x (C) − 1) − (x (C) − 1) + 1 − 2β 2 2 2β (x∗ (C) − 1)(2 − x∗ (C)). = 1 − 2β Together with (18) and (20), this directly implies (13). 5 ✷ Enhancements The constants ξ and β in the previous section are not optimal, but they are close. The bounds are almost tight for Case 3 (and 4) and x∗ (C) ≈ 1.52 and pC many = 0. However, we now suggest two ideas for a refined analysis that leads to a further improvement. Firstly, since (in contrast to Sebő’s [2013] analysis) the worst case does not occur in x∗ (C) = 1.5, but in a slightly larger value, one can increase β and hence improve the approximation ratio by increasing the γ-values slightly. Secondly, the analysis in Case 3 (and 4) of Lemma 15 can be refined (and the analysis was not tight in Case 1 and 2 anyway), as we will indicate now. Consider a critical cut C in Case 3, and 1 3 ′ ′ ξ′ ′ assume for simplicity pC many = 0. Let 2 ≤ ξ ≤ 2 with f (ξ ) = 2 , and let C← be the next ξ -narrow ′ ξ )+x(C ∩C ξ ) ≤ 3 x(C)+ 1 ξ+ 1 ξ ′ − 3 cut to the left of C. We have benefit 21 for at most a 21 x(C ∩C→ ← 4 4 2 2 fraction of the trees, and larger benefit for the others. More generally, we have benefit at most ξ ) + x(C ∩ C y ) ≤ 3 x(C) + 1 ξ + 1 y − 3 fraction of the trees, for 1 − f (y) for at most a 21 x(C ∩ C→ ← 4 4 2 2 ′ all y ∈ [ξ , ξ]. See Figure 5. We have not performed the necessary calculations to obtain the best possible approximation ratio with these ideas. However, it seems that the resulting improvements are rather small. For a much better bound, we would probably need stronger reassembling results. 6 Discussion Theorem 16 readily leads also to an improved approximation ratio for the prize-collecting s-t-path TSP, simply by applying Theorem 6 of An, Kleinberg and Shmoys [2015]. See Guttmann-Beck et al. [2000] for further applications. 21 benefit ≥ ′ ξ C← y C← ξ C← C ξ C→ type 1 − f (ξ) 010 1 2 120 1 − f (y) 120 1 2 110 1 − f (y) 110 1 − f (ξ) 020 1 2 022 Figure 5: Refined analysis of Case 3. Theorem 16 improves the best known upper bound on the integrality ratio of the LP (1). The best known lower bound is 32 , shown by the metric closure of an unweighted circuit. For metric closures of unweighted graphs the integrality ratio is indeed 32 (even for T -tours), as Sebő and Vygen [2014] proved. For general metrics, this remains open. The most natural open question is of course to improve the approximation ratio further. Our improvement was only small, but the reassembling technique could be more powerful than we were able to prove. It seems that a stronger version of Lemma 9 would be needed. It would also be interesting to generalize our algorithm to the T -tour problem for general T (Sebő’s [2013] 58 approximation algorithm and the previous algorithm of Cheriyan, Friggstad and Gao [2015] work also for this more general problem). Finally, applying our technique to other TSP variants would be very interesting. Acknowledgement The author thanks the three referees for careful reading and excellent suggestions. References An, H.-C., Kleinberg, R., and Shmoys, D.B. [2015]: Improving Christofides’ algorithm for the s-t path TSP. Journal of the ACM 62 (2015), Article 34 Asadpour, A., Goemans, M.X., Mądry, A., Oveis Gharan, S., and Saberi, A. [2010]: An O(log n/ log log n)approximation algorithm for the asymmetric traveling salesman problem. Proceedings of the 21st Annual ACM-SIAM Symposium on Discrete Algorithms (SODA 2010), 379–389 22 Cheriyan, J., Friggstad, Z., and Gao, Z. [2015]: Approximating minimum-cost connected T -joins. Algorithmica 72 (2015), 126–147 Christofides, N. [1976]: Worst-case analysis of a new heuristic for the traveling salesman problem. Technical Report 388, Graduate School of Industrial Administration, Carnegie-Mellon University, Pittsburgh 1976 Dantzig, G.B., Fulkerson, D.R., and Johnson, S.M. [1954]: Solution of a large scale traveling salesman problem. Operations Research 2 (1954), 393–410 Edmonds, J. [1965]: The Chinese postman’s problem. Bulletin of the Operations Research Society of America 13 (1965), B-73 Edmonds, J. [1970]: Submodular functions, matroids and certain polyhedra. In: Combinatorial Structures and Their Applications; Proceedings of the Calgary International Conference on Combinatorial Structures and Their Applications 1969 (R. Guy, H. Hanani, N. Sauer, J. Schönheim, eds.), Gordon and Breach, New York 1970, pp. 69–87 Edmonds, J., and Johnson, E.L. [1973]: Matching, Euler tours and the Chinese postman. Mathematical Programming 5 (1973), 88–124 Gao, Z. [2013]: An LP-based 23 -approximation algorithm for the s-t path graph traveling salesman problem. Operations Research Letters 41 (2013), 615–617 Gao, Z. [2015]: On the metric s-t path traveling salesman problem. SIAM Journal on Discrete Mathematics 29 (2015), 1133–1149 Genova, K., and Williamson, D.P. [2015]: An experimental evaluation of the best-of-many Christofides’ algorithm for the traveling salesman problem. In: Algorithms – ESA 2015; LNCS 9294 (N. Bansal, I. Finocchi, eds.), Springer, Berlin 2015, pp. 570–581 Grötschel, M., Lovász, L., and Schrijver, A. [1981]: The ellipsoid method and its consequences in combinatorial optimization. Combinatorica 1 (1981), 169–197 Guttmann-Beck, N., Hassin, R., Khuller, S., and Raghavachari, B. [2000]: Approximation algorithms with bounded performance guarantees for the clustered traveling salesman problem. Algorithmica 28 (2000), 422–437 Held, M., and Karp, R.M. [1970]: The traveling-salesman problem and minimum spanning trees. Operations Research 18 (1970), 1138–1162 Hoogeveen, J.A. [1991]: Analysis of Christofides’ heuristic: some paths are more difficult than cycles. Operations Research Letters 10 (1991), 291–295 Karpinski, M., Lampis, M., and Schmied, R. [2013]: New inapproximability bounds for TSP. In: Algorithms and Computation. Proceedings of the 24th ISAAC Symposium; LNCS 8283 (L. Cai, S.-W. Cheng, T.-W. Lam, eds.), Springer 2013, pp. 568–578 Mömke, T., and Svensson, O. [2011]: Approximating graphic TSP by matchings. Proceedings of the 52nd Annual Symposium on Foundations of Computer Science (FOCS 2011), 560–569 Mucha, M. [2014]: 13 9 -approximation for graphic TSP. Theory of Computing Systems 55 (2014), 640–657 23 Oveis Gharan, S., Saberi, A., and Singh, M. [2011]: A randomized rounding approach to the traveling salesman problem. Proceedings of the 52nd Annual IEEE Symposium on Foundations of Computer Science (FOCS 2011), 550–559 Sebő, A. [2013]: Eight fifth approximation for TSP paths. In: Integer Programming and Combinatorial Optimization; Proceedings of the 16th IPCO Conference; LNCS 7801 (J. Correa, M.X. Goemans, eds.), Springer 2013, pp. 362–374 Sebő, A., and Vygen, J. [2014]: Shorter tours by nicer ears: 7/5-approximation for graph-TSP, 3/2 for the path version, and 4/3 for two-edge-connected subgraphs. Combinatorica 34 (2014), 597–629 Vygen, J. [2012]: New approximation algorithms for the TSP. OPTIMA 90 (2012), 1–12 Wolsey, L.A. [1980]: Heuristic analysis, linear programming and branch and bound. Mathematical Programming Study 13 (1980), 121–134 24 Appendix: an Example The following example shows that we cannot get more benefit than Sebő [2013], no matter how we choose the numbers γS,e , if we represent the LP solution x∗ in an arbitrary way as convex combination of spanning trees. We show one instance with 20 vertices and 30 edges. From this we obtain an infinite sequence of instances by extending the wall-like part in the middle, inserting copies of the blue part, adding 4 vertices and 6 edges in each step. The number next to an edge e is x∗ (e); then x∗ is a feasible solution of (1). Grey vertical lines show the narrow cuts. We have x∗ (C) = 32 for all C ∈ C \ {δ(s), δ(t)}. 1 2 1 2 1 3 4 1 2 s 1 2 1 4 1 2 1 1 1 2 1 1 2 1 2 1 1 2 1 4 1 2 1 1 2 1 1 4 t 1 2 1 3 4 1 4 1 2 1 2 1 1 2 Consider the red sets in the following figure and all singletons; call this set of sets U . Then the 30 vectors δ(U ), U ∈ U , are easily shown to be linearly independent. Since x∗ satisfies all constraints of (1) that correspond to these sets with equality, x∗ is indeed a vertex of the polytope defined by (1). Hence it is an optimum solution for some objective function. 1 2 1 2 1 3 4 1 1 2 s 1 4 1 4 1 2 1 1 2 1 1 2 1 2 1 2 1 1 2 1 1 4 1 2 1 1 2 1 4 t 1 2 1 3 4 1 2 1 2 1 2 1 ∗ Now P we willS show a (bad) 1decomposition of x into incidence vectors of trees. We have = S∈S pS χ , where pS = 4 for the following four trees and pS = 0 for all other spanning trees. In the wall-like part (grey cuts 6–9 from left in the top figure), the four trees have types 011, 110, 021, and 120. For each of these four trees S, each edge e of its s-t-path IS within the wall-like part belongs to one narrow cut C with |C ∩ S| = 1 and one narrow cut C ′ with |C ′ ∩ S| = 2. No matter how we choose γS,e , the total benefit of this edge to both cuts is 1, so the average benefit x∗ 25 that a narrow cut in the wall-like part receives is at most 12 . This shows that reassembling trees is necessary. We were unable to prove that the best-of-many Christofides algorithm has no better approximation ratio than 1.6, but to obtain a better ratio a completely different analysis would be necessary. In fact, no better lower bound than 1.5 is known. s t s t s t s t 26
8cs.DS